[Pkg-libvirt-commits] [libvirt] 01/01: Rename libvirt-bin.service back to libvirtd.service
Guido Guenther
agx at moszumanska.debian.org
Mon May 12 06:56:06 UTC 2014
This is an automated email from the git hooks/post-receive script.
agx pushed a commit to branch experimental
in repository libvirt.
commit 4c4977efc348282ab844b4e2478d841e7ed1bab4
Author: Laurent Bigonville <bigon at debian.org>
Date: Mon May 12 08:50:53 2014 +0200
Rename libvirt-bin.service back to libvirtd.service
and use symlink or Alias= instead. This is what upstream uses.
Closes: #730604
---
debian/control | 2 +-
debian/libvirt-bin.postinst | 12 ++++++++++++
debian/patches/debian/Debianize-systemd-service-files.patch | 9 +--------
debian/rules | 2 --
4 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/debian/control b/debian/control
index e20a0b1..0076cf3 100644
--- a/debian/control
+++ b/debian/control
@@ -5,7 +5,7 @@ Maintainer: Debian Libvirt Maintainers <pkg-libvirt-maintainers at lists.alioth.deb
Uploaders: Guido Günther <agx at sigxcpu.org>, Laurent Léonard <laurent at open-minds.org>
Build-Depends:
debhelper (>= 7),
- dh-systemd (>= 1.3),
+ dh-systemd (>= 1.18),
libxml2-dev,
libncurses5-dev,
libreadline-dev,
diff --git a/debian/libvirt-bin.postinst b/debian/libvirt-bin.postinst
index b3df139..05c4638 100644
--- a/debian/libvirt-bin.postinst
+++ b/debian/libvirt-bin.postinst
@@ -96,6 +96,18 @@ case "$1" in
add_users_groups
add_statoverrides
+ # When renaming the .service file, systemd might become confused, we
+ # need to ensure that the libvirtd daemon is fully stopped before
+ # trying to restart it again. (Bug: #730604)
+ if dpkg --compare-versions "$2" le-nl "1.2.1-3~"; then
+ if [ -d /run/systemd/system ]; then
+ start-stop-daemon --stop --quiet --pidfile /var/run/libvirtd.pid \
+ --oknodo --exec /usr/sbin/libvirtd --retry 1
+ fi
+ # Remove everything we know about libvirt-bin.service
+ deb-systemd-helper purge libvirt-bin.service >/dev/null
+ fi
+
# Make sure the directories don't get removed on package removal since
# logrotate chokes otherwise.
for dir in qemu uml lxc; do
diff --git a/debian/patches/debian/Debianize-systemd-service-files.patch b/debian/patches/debian/Debianize-systemd-service-files.patch
index 283ab8c..a638605 100644
--- a/debian/patches/debian/Debianize-systemd-service-files.patch
+++ b/debian/patches/debian/Debianize-systemd-service-files.patch
@@ -22,16 +22,9 @@ index 086da36..9bc433c 100644
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure
-diff --git a/tools/libvirt-guests.service.in b/tools/libvirt-guests.service.in
-index d8d7adf..e743edd 100644
--- a/tools/libvirt-guests.service.in
+++ b/tools/libvirt-guests.service.in
-@@ -1,11 +1,11 @@
- [Unit]
- Description=Suspend Active Libvirt Guests
--After=network.target libvirtd.service
-+After=network.target libvirt-bin.service
- Documentation=man:libvirtd(8)
+@@ -5,7 +5,7 @@ Documentation=man:libvirtd(8)
Documentation=http://libvirt.org
[Service]
diff --git a/debian/rules b/debian/rules
index 9e2b3a7..1f7c5f6 100755
--- a/debian/rules
+++ b/debian/rules
@@ -141,8 +141,6 @@ override_dh_install:
ifneq (,$(findstring $(DEB_HOST_ARCH_OS), linux))
# Linux supports more nice things:
dh_install -p libvirt-bin usr/lib/systemd/system lib/systemd/
- mv debian/libvirt-bin/lib/systemd/system/libvirtd.service \
- debian/libvirt-bin/lib/systemd/system/libvirt-bin.service
dh_install -p libvirt-bin usr/lib/libvirt/virt-aa-helper
dh_install -p libvirt-bin etc/apparmor.d
dh_install -p libvirt-bin usr/share/polkit-1
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libvirt.git
More information about the Pkg-libvirt-commits
mailing list