From 633b21bb263324b6981066d06d1c123fc93d2851 Mon Sep 17 00:00:00 2001 From: Marek Marczykowski Date: Thu, 15 Sep 2011 13:37:34 +0200 Subject: [PATCH] dom0: do not sync rpmdb with UpdateVM after each pkg installation This doesn't make sense sice at every qvm-dom0-update we begin with sync rpmdb. Also this allow embedding sync_rpmdb_updatevm.sh into qvm-dom0-update. --- dom0/aux-tools/sync_rpmdb_updatevm.sh | 10 ---------- dom0/qvm-tools/qvm-dom0-update | 4 +++- rpm_spec/core-dom0.spec | 7 ------- 3 files changed, 3 insertions(+), 18 deletions(-) delete mode 100755 dom0/aux-tools/sync_rpmdb_updatevm.sh diff --git a/dom0/aux-tools/sync_rpmdb_updatevm.sh b/dom0/aux-tools/sync_rpmdb_updatevm.sh deleted file mode 100755 index 88a8b29f..00000000 --- a/dom0/aux-tools/sync_rpmdb_updatevm.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -UPDATEVM=`qvm-get-updatevm` - -if [ -n "$UPDATEVM" ]; then - /usr/lib/qubes/qrexec_client -d "$UPDATEVM" -l 'tar c /var/lib/rpm /etc/yum.repos.d /etc/yum.conf 2>/dev/null' 'user:tar x -C /var/lib/qubes/dom0-updates' -fi - -# Ignore errors (eg VM not running) -exit 0 diff --git a/dom0/qvm-tools/qvm-dom0-update b/dom0/qvm-tools/qvm-dom0-update index 50007871..d6ac222f 100755 --- a/dom0/qvm-tools/qvm-dom0-update +++ b/dom0/qvm-tools/qvm-dom0-update @@ -31,7 +31,9 @@ echo "Checking for dom0 updates" # Start VM if not running already qvm-run -a $UPDATEVM true || exit 1 -/usr/lib/qubes/sync_rpmdb_updatevm.sh || exit 1 + +/usr/lib/qubes/qrexec_client -d "$UPDATEVM" -l 'tar c /var/lib/rpm /etc/yum.repos.d /etc/yum.conf 2>/dev/null' 'user:tar x -C /var/lib/qubes/dom0-updates' + qvm-run --pass_io $UPDATEVM "/usr/lib/qubes/qubes_download_dom0_updates.sh --doit --nogui $*" || exit 1 # Wait for download completed while pidof -x qubes-receive-updates >/dev/null; do sleep 0.5; done diff --git a/rpm_spec/core-dom0.spec b/rpm_spec/core-dom0.spec index f94dcae9..74c3b6e8 100644 --- a/rpm_spec/core-dom0.spec +++ b/rpm_spec/core-dom0.spec @@ -39,7 +39,6 @@ URL: http://www.qubes-os.org BuildRequires: xen-devel Requires: python, xen-runtime, pciutils, python-inotify, python-daemon, kernel-qubes-dom0 Conflicts: qubes-gui-dom0 < 1.1.13 -Requires: yum-plugin-post-transaction-actions Requires: xen >= 4.1.0-2 Requires: createrepo Requires: gnome-packagekit @@ -92,7 +91,6 @@ cp aux-tools/convert_dirtemplate2vm.sh $RPM_BUILD_ROOT/usr/lib/qubes cp aux-tools/create_apps_for_appvm.sh $RPM_BUILD_ROOT/usr/lib/qubes cp aux-tools/remove_appvm_appmenus.sh $RPM_BUILD_ROOT/usr/lib/qubes cp aux-tools/reset_vm_configs.py $RPM_BUILD_ROOT/usr/lib/qubes -cp aux-tools/sync_rpmdb_updatevm.sh $RPM_BUILD_ROOT/usr/lib/qubes/ cp qmemman/server.py $RPM_BUILD_ROOT/usr/lib/qubes/qmemman_daemon.py cp ../common/meminfo-writer $RPM_BUILD_ROOT/usr/lib/qubes/ cp ../qrexec/qrexec_daemon $RPM_BUILD_ROOT/usr/lib/qubes/ @@ -123,9 +121,6 @@ cp restore/qfile-daemon-dvm $RPM_BUILD_ROOT/usr/lib/qubes mkdir -p $RPM_BUILD_ROOT/etc/yum.real.repos.d cp qubes-cached.repo $RPM_BUILD_ROOT/etc/yum.real.repos.d/ -mkdir -p $RPM_BUILD_ROOT/etc/yum/post-actions -cp misc/qubes_sync_rpmdb_updatevm.action $RPM_BUILD_ROOT/etc/yum/post-actions/ - mkdir -p $RPM_BUILD_ROOT/var/lib/qubes mkdir -p $RPM_BUILD_ROOT/var/lib/qubes/vm-templates mkdir -p $RPM_BUILD_ROOT/var/lib/qubes/appvms @@ -310,7 +305,6 @@ fi /usr/lib/qubes/qmemman_daemon.py* /usr/lib/qubes/meminfo-writer /usr/lib/qubes/qfile-daemon-dvm* -/usr/lib/qubes/sync_rpmdb_updatevm.sh /usr/lib/qubes/qubes-receive-updates %attr(4750,root,qubes) /usr/lib/qubes/qfile-dom0-unpacker /usr/lib/qubes/keep-dom0-clock-synced @@ -366,7 +360,6 @@ fi /etc/xdg/autostart/qubes-guid.desktop /etc/xdg/autostart/qubes-clock-watch.desktop /etc/security/limits.d/99-qubes.conf -/etc/yum/post-actions/qubes_sync_rpmdb_updatevm.action %dir /etc/dracut.conf.d/* %dir /usr/share/dracut/modules.d/ %dir /usr/share/dracut/modules.d/90qubes-pciback/*