Commit Graph

62 Commits

Author SHA1 Message Date
Marek Marczykowski-Górecki
6799aad15e
debian: make ShellCheck happy 2019-01-15 21:10:27 +01:00
Marek Marczykowski-Górecki
f4c10d47da
Convert /usr/local from a symlink to a mount point on upgrade
Fixes QubesOS/qubes-issues#1150
2018-07-11 15:27:34 +02:00
Marek Marczykowski-Górecki
23250f84b2
Create /etc/dconf/profile/user dynamically, if not present
The /etc/dconf/profile/user file in some distributions is part of dconf
package, in some not. There are even cases where it changes between
package versions (Fedora 27 don't have it, but Fedora 28 do).
Also, base Debian Stretch don't have it, but Kali Linux based on it do.

To avoid overly complex dependency handling, create the file dynamically
on package installation if it's missing in that particular case. The
file content is canonical:

    user-db:user
    system-db:local

Fixes QubesOS/qubes-issues#3834
2018-05-02 02:57:37 +02:00
Marek Marczykowski-Górecki
d25ecb4e40
Fix packaging: 'user' group, BACKEND_VMM var
- BACKEND_VMM may not be available as env variable (mock build), provide
it explicitly
- 'user' group may not exists at package build time, set it at package
installation
2018-05-01 17:34:52 +02:00
Marek Marczykowski-Górecki
24c875030e
debian: don't call dconf if it isn't installed
The dconf package isn't required by qubes-core-agent - the package ships
a configuration for it, useful if user have it installed for other
reasons. Don't try to rebuild dconf database if dconf isn't installed -
avoid misleading error message.

Fixes QubesOS/qubes-issues#3492
2018-03-13 17:10:40 +01:00
Marek Marczykowski-Górecki
3ddd687286
Call qubes.PostInstall service to notify dom0 about all apps/features
Update dom0 about all applications installed, not only desktop files for
them. Update also supported features and other things advertised
initially at template installation.

Fixes QubesOS/qubes-issues#3579
2018-02-13 17:05:42 +01:00
Marek Marczykowski-Górecki
7ecb74ae3b
Disable automatic scaling in GNOME/GTK applications
GNOME automatically set scaling factor to 2 when HiDPI is detected.
Unfortunately it does it also on not really HiDPI displays, making the
whole UI unusably large. There is no middle ground - scaling factor must
be integer, so 1.5 is not supported. Lets opt on a conservative side and
fallback to scaling factor 1.

Solution by @alyssais, thanks!
Fixes QubesOS/qubes-issues#3108
2018-01-12 06:00:18 +01:00
Marek Marczykowski-Górecki
47e6a84f79
debian: use systemd-preset logic from rpm package
It is more robust, especially handle "# Units below this line will be
re-preset on package upgrade" part of 75-qubes-vm.preset file. This is
needed to fix system configuration without the need to rebuild the whole
template.

QubesOS/qubes-issues#2913
2017-12-15 02:50:05 +01:00
Marek Marczykowski-Górecki
f16753c67b
debian: fix shellcheck warnings in debian packaging 2017-09-30 05:05:33 +02:00
Marek Marczykowski-Górecki
7e608a8bb4
Remove DisposableVM savefile related files
In Qubes 4.0 we no longer use two-stage DisposableVM startup.
2017-06-08 22:11:35 +02:00
Marek Marczykowski-Górecki
3e7a45b4ac
Split network-related files to -networking and -network-manager packages
This will save a lot of dependencies if networking is not needed in VMs
based on given template. Thanks to updates proxy over qrexec, template
itself do not need to have network configured too.

QubesOS/qubes-issues#2771
2017-06-08 22:11:34 +02:00
Marek Marczykowski-Górecki
cf97f4f8e7
Merge remote-tracking branch 'qubesos/pr/40'
* qubesos/pr/40:
  Stop unnecessary services in Debian
2017-02-20 23:27:07 +01:00
Marek Marczykowski-Górecki
d9cacf66dd
debian: don't fail the upgrade if glib-compile-schemas fails
Thanks @adrelanos
2017-02-20 23:25:39 +01:00
Marek Marczykowski-Górecki
7d97fd3a82
debian: fix lintian warning - command-with-path-in-maintainer-script
Reported by @adrelanos
https://github.com/QubesOS/qubes-core-agent-linux/pull/39#issuecomment-280951206
2017-02-19 22:43:06 +01:00
unman
1ed2954f91
Stop unnecessary services in Debian 2017-02-16 22:41:14 +00:00
unman
8d1b74d732
Apply gschema override preventing previews in nautilus in Debian 2017-02-12 03:06:48 +00:00
unman
58febd6d20
Add systemd override for haveged in xenial and stretch. (#2161)
Reenable haveged.service after debian package installation
2016-11-14 02:33:20 +00:00
Manuel Amador (Rudd-O)
59aec8e5eb Clean up early initialization and setup of /rw 2016-10-23 20:19:51 +00:00
HW42
7c15b9b0ea
systemd: remove obsolete symlinks with rm instead of systemctl
The systemctl in Debian unstable fails when trying to disable a removed
service. The manpage do not mention a switch to change this behaviour.
But it says:

  Note that this operation creates only the suggested symlinks for
  the units. While this command is the recommended way to manipulate
  the unit configuration directory, the administrator is free to make
  additional changes manually by placing or removing symlinks in the
  directory.

So a simple rm should be fine.
2016-07-28 21:54:50 +02:00
HW42
5ab7e80306
systemd: fix qubes-mount-home path in cleanup script 2016-07-28 21:54:38 +02:00
Marek Marczykowski-Górecki
90be5be630
systemd: cleanup removed services
Fixes QubesOS/qubes-issues#2192
2016-07-27 05:19:46 +02:00
Marek Marczykowski-Górecki
a11897a1d0
Revert "network: use drop-ins for NetworkManager configuration (#1176)"
Apparently unmanaged devices are loaded only from main
NetworkManager.conf. Exactly the same line pasted (not typed!) to main
NetworkManager.conf works, but in
/etc/NetworkManager/conf.d/30-qubes.conf it doesn't.
BTW There was a typo in option name ("unmanaged_devices" instead of
"unmanaged-devices", but it wasn't the cause).

This reverts commit 6c4831339c.

QubesOS/qubes-issues#1176
2015-11-28 17:43:15 +01:00
Marek Marczykowski-Górecki
9d52b7d178
debian: install locales-all instead of custom locales generation
The custom way proved to be unreliable - for example does not survive
`locales` package upgrade. So settle on much more reliable way.

Fixes QubesOS/qubes-issues#1195
2015-10-27 00:23:20 +01:00
Patrick Schleizer
2eb0ed2be1
removed trailing spaces 2015-10-15 04:34:55 +02:00
Patrick Schleizer
9664c97e55 minor 2015-10-06 17:13:52 +00:00
Marek Marczykowski-Górecki
6c4831339c
network: use drop-ins for NetworkManager configuration (#1176)
Do not modify main /etc/NetworkManager/NetworkManager.conf as it would
cause conflicts during updates. Use
/etc/NetworkManager/conf.d/30-qubes.conf instead.
Also remove some dead code for dynamically generated parts (no longer
required to "blacklist" eth0 in VMs - we have proper connection
generated for it). It was commented out for some time already

Fixes QubesOS/qubes-issues#1176
2015-10-06 15:15:26 +02:00
Patrick Schleizer
cf55fa54c9 fix typo 2015-09-20 04:01:57 +00:00
Marek Marczykowski-Górecki
4703e3fca7
Remove dynamically generated autostart desktop files
qubesos/qubes-issues#1151
2015-08-27 22:08:04 +02:00
Marek Marczykowski-Górecki
c6fa6c9b19
debian: remove SELinux disabling code
Debian doesn't have it enabled anyway. Do not prevent the user from
tinkering with that.

(reported by @adrelanos)
Fixes qubesos/qubes-issues#1103
2015-08-09 20:06:59 +02:00
Jason Mehring
b6c19fc2ef qubes-desktop-file-install: Manages xdg desktop entry files
qubes-desktop-file-install is called by qubes-triggers-desktop-file-install. It's
arguments are based on the Gnome desktop-install-file utility to allow it to be replaced
by same.  Currently the Gnome utility can not be used since it automatically validates
the .desktop entry files with no option to skip validation and will fail on some third
party .desktop files that are not formed properly.

A single trigger script is shared between Fedora, Debian.  This script is used by the
package managers triggers and will copy original .desktop files from `/etc/xdg/autostart`
to `/usr/share/qubes/xdg/autostart` and modify the OnlyShownIn / NotShownIn, etc.  The
original .desktop files are left untouched and left in place.

Qubes modifies the XDG_CONFIG_DIRS to first include the `/usr/share/qubes/xdg`
directory (XDG_CONFIG_DIRS=/usr/share/qubes/xdg:/etc/xdg).

If a package gets removed, it's desktop entry is also removed from the /usr/share/qubes/xdg
directory.

'qubes-desktop-file-install' options:
   --dir DIR                          Install desktop files to the DIR directory (default: <FILE>)
   --force                            Force overwrite of existing desktop files (default: False)
   --remove-show-in                   Remove the "OnlyShowIn" and "NotShowIn" entries from the desktop file (default: False)
   --remove-key KEY                   Remove the KEY key from the desktop files, if present
   --set-key (KEY VALUE)              Set the KEY key to VALUE
   --remove-only-show-in ENVIRONMENT  Remove ENVIRONMENT from the list of desktop environment where the desktop files should be displayed
   --add-only-show-in ENVIRONMENT     Add ENVIRONMENT to the list of desktop environment where the desktop files should be displayed
   --remove-not-show-in ENVIRONMENT   Remove ENVIRONMENT from the list of desktop environment where the desktop files should not be displayed
   --add-not-show-in ENVIRONMENT      Add ENVIRONMENT to the list of desktop environment where the desktop files should not be displayed
2015-08-07 09:15:30 -04:00
Jason Mehring
f95c3990ba debian: Add systemd drop-in support which include conditionals to prevent services from starting
Modified postinst to use drop-ins and removed old code that was using overrides
2015-08-04 10:32:29 -04:00
Marek Marczykowski-Górecki
51d55c03dc
debian: fix permissions of /var/lib/qubes/dom0-updates
qubesos/qubes-issues#1029
2015-07-18 15:06:40 +02:00
Marek Marczykowski-Górecki
b368ffe5c6 fedora, debian: make sure that default locale is generated
Otherwise some GUI applications would not start.
2015-06-16 02:27:23 +02:00
Jason Mehring
4373cda566 Changed location of PROTECTED_FILE_LIST to /etc/qubes/protected-files.d 2015-04-25 02:36:43 +02:00
Jason Mehring
56b0685aaa whonix: Added protected-files file used to prevent scripts from modifying files that need to be protected
A file is created in /var/lib/qubes/protected-files.  Scripts can grep this file before modifying
        known files to be protected and skip any modifications if the file path is within protected-files.

        Usage Example:
            if ! grep -q "^/etc/hostname$" "${PROTECTED_FILE_LIST}" 2>/dev/null; then

        Also cleaned up maintainer scripts removing unneeded systemd status functions and streamlined
        the enable/disable systemd unit files functions
2015-04-25 02:36:43 +02:00
Marek Marczykowski-Górecki
d41ae5bc7f debian: update NetworkManager configuration
Especially add unmanaged-devices, otherwise NM will break vif*
configuration.
2015-03-30 22:49:50 +02:00
Marek Marczykowski-Górecki
52d502bce2 debian: fix handling SysV units in disableSystemdUnits
systemctl is-enabled always reports "disabled" for them (actually not a
real "disabled", but and error, but exit code is the same). So simply
always disable the unit, it is no-op for already disabled ones.
BTW systemctl preset also do not work for them.
2015-03-30 21:46:01 +02:00
Jason Mehring
bb850ab95d debian: Remove 'exit 0' in maintainer section scripts to all other debhelpers (if any) to also execute 2015-02-11 08:02:55 -05:00
Marek Marczykowski-Górecki
b40c791914 debian: change systemctl set-default back to manual symlink
systemd in wheezy is old enough to not have this option.
2015-02-10 17:22:04 +01:00
HW42
641c516d76 debian: postinst: remove redundant and misleading trigger output 2015-02-05 01:22:21 +01:00
HW42
60a181b3f4 debian: postinst: enable haveged only if installed 2015-02-05 01:22:21 +01:00
HW42
05da6e6379 debian: postinst: don't start systemd services
Starting services in the postinst script doesn't make much sense since
the package is normally installed in the template. In addition the start
can fail when executed through a trigger.
2015-02-05 01:22:20 +01:00
HW42
e8f25bfac8 debian: postinst: cleanup 2015-02-05 01:22:20 +01:00
HW42
de53e1d0bb debian: postinst: enable netfilter-persistent service 2015-02-05 01:22:20 +01:00
HW42
5080c7c2d3 debian: postinst: remove fedora specific code
/etc/iptables/rules.* are already part of the packet.
The removed code has never done something in debian (since
/etc/iptables/rules.* already exists).
2015-02-05 01:22:20 +01:00
HW42
07c2f2a5f4 debian: postinst: use systemctl to set default target 2015-02-05 01:22:20 +01:00
HW42
a5fbbea98d debian: postinst: don't create /rw - it is already part of the package 2015-02-05 01:22:20 +01:00
HW42
b2307cfee6 debian: postinst: don't remove /etc/udev/rules.d/*
removing /etc/udev/rules.d/* in debian makes no sense since this folder
is only for custom udev rules.
2015-02-05 01:22:20 +01:00
HW42
47550ee2b6 debian: don't generate regular conf files in postinst 2015-02-05 01:22:19 +01:00
HW42
8a9d2378f6 debian: postinst: use dpkg-divert
dpkg-divert is not ideal for config files but should work better than
direct cp/mv.
2015-02-05 01:22:19 +01:00