From 13c54badcbb17d60d55ee4e8316210541a4e61d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Sat, 8 Aug 2015 02:01:15 +0200 Subject: [PATCH] Move `/usr/share/qubes/xdg` to `/var/lib/qubes/xdg` No files in /usr should be modified during package runtime, `/var` is for that. So move this data there. --- misc/qubes-desktop-file-install | 8 ++++---- misc/qubes-trigger-desktop-file-install | 2 +- rpm_spec/core-vm.spec | 8 ++++---- vm-systemd/misc-post.sh | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/misc/qubes-desktop-file-install b/misc/qubes-desktop-file-install index 1510a7c..5b551ae 100755 --- a/misc/qubes-desktop-file-install +++ b/misc/qubes-desktop-file-install @@ -31,8 +31,8 @@ Description: 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). + Qubes modifies the XDG_CONFIG_DIRS to first include the `/var/lib/qubes/xdg` + directory (XDG_CONFIG_DIRS=/var/lib/qubes/xdg:/etc/xdg). Usage: qubes-desktop-file-install [--dir DIR] [--force] @@ -48,7 +48,7 @@ Usage: qubes-desktop-file-install --version Examples: - qubes-desktop-file-install --dir /usr/share/qubes/xdg/autostart --add-only-show-in X-QUBES /etc/xdg/autostart/pulseaudio.desktop + qubes-desktop-file-install --dir /var/lib/qubes/xdg/autostart --add-only-show-in X-QUBES /etc/xdg/autostart/pulseaudio.desktop Arguments: FILE Path to desktop entry file @@ -94,7 +94,7 @@ __version__ = '1.0.0' locale.setlocale(locale.LC_ALL, '') # Default Qubes directory that modified desktop entry config files are stored in -QUBES_XDG_CONFIG_DIR = '/usr/share/qubes/xdg' +QUBES_XDG_CONFIG_DIR = '/vat/lib/qubes/xdg' class DesktopEntry(xdg.DesktopEntry.DesktopEntry): diff --git a/misc/qubes-trigger-desktop-file-install b/misc/qubes-trigger-desktop-file-install index aa50b92..d7af239 100755 --- a/misc/qubes-trigger-desktop-file-install +++ b/misc/qubes-trigger-desktop-file-install @@ -20,7 +20,7 @@ # --add-not-show-in ENVIRONMENT Add ENVIRONMENT to the list of desktop environment where the desktop files should not be displayed QUBES_DESKTOP_FILE_INSTALL='/usr/bin/qubes-desktop-file-install' -QUBES_XDG_CONFIG_DIR=/usr/share/qubes/xdg/autostart +QUBES_XDG_CONFIG_DIR=/var/lib/qubes/xdg/autostart XDG_CONFIG_DIR=/etc/xdg/autostart INSTALL_CMD=""${QUBES_DESKTOP_FILE_INSTALL}" --force --dir "${QUBES_XDG_CONFIG_DIR}"" diff --git a/rpm_spec/core-vm.spec b/rpm_spec/core-vm.spec index ecf90c7..21a968f 100644 --- a/rpm_spec/core-vm.spec +++ b/rpm_spec/core-vm.spec @@ -129,7 +129,7 @@ if [ -e /etc/init/serial.conf ]; then fi %triggerin -- pulseaudio-module-x11 -/usr/bin/qubes-desktop-file-install --force --dir /usr/share/qubes/xdg/autostart --remove-show-in --add-not-show-in X-QUBES /etc/xdg/autostart/pulseaudio.desktop +/usr/bin/qubes-desktop-file-install --force --dir /var/lib/qubes/xdg/autostart --remove-show-in --add-not-show-in X-QUBES /etc/xdg/autostart/pulseaudio.desktop %triggerin -- iptables if ! grep -q IPTABLES_DATA /etc/sysconfig/iptables-config; then @@ -160,7 +160,7 @@ for F in plymouth-shutdown prefdm splash-manager start-ttys tty ; do done # Update all autostart xdg desktop configuration files (modified copies are -# placed in /usr/share/qubes/xdg/autostart) +# placed in /var/lib/qubes/xdg/autostart) /usr/lib/qubes/qubes-trigger-desktop-file-install clean # Create NetworkManager configuration if we do not have it @@ -313,7 +313,7 @@ if [ $1 -eq 0 ] ; then rm /lib/firmware/updates fi - rm -rf /usr/share/qubes/xdg + rm -rf /var/lib/qubes/xdg fi %posttrans @@ -426,7 +426,7 @@ rm -f %{name}-%{version} /usr/share/nautilus-python/extensions/qvm_move_nautilus.py* /usr/share/nautilus-python/extensions/qvm_dvm_nautilus.py* -%dir /usr/share/qubes +%dir /var/lib/qubes /usr/share/qubes/mime-override/globs %dir /home_volatile %attr(700,user,user) /home_volatile/user diff --git a/vm-systemd/misc-post.sh b/vm-systemd/misc-post.sh index a68fc90..e5c35e8 100755 --- a/vm-systemd/misc-post.sh +++ b/vm-systemd/misc-post.sh @@ -27,7 +27,7 @@ INTERFACE=eth0 /usr/lib/qubes/setup-ip # Start services which haven't own proper systemd unit: # Start AppVM specific services -INSTALL_CMD='/usr/bin/qubes-desktop-file-install --force --dir /usr/share/qubes/xdg/autostart' +INSTALL_CMD='/usr/bin/qubes-desktop-file-install --force --dir /var/lib/qubes/xdg/autostart' if [ ! -f /etc/systemd/system/cups.service ]; then if [ -f /var/run/qubes-service/cups ]; then