[Pkg-libvirt-commits] [SCM] Libvirt Debian packaging branch, experimental, updated. debian/0.9.13_rc1-1

Guido Günther agx at sigxcpu.org
Tue Jun 26 14:27:29 UTC 2012


The following commit has been merged in the experimental branch:
commit 5f715edb475d02a54a22a5c2e72ee860cc312bf9
Author: Guido Günther <agx at sigxcpu.org>
Date:   Tue Jun 26 09:27:54 2012 +0200

    Install systemd init scripts on Linux

diff --git a/debian/libvirt-bin.install b/debian/libvirt-bin.install
index 72f23a4..c0d028c 100644
--- a/debian/libvirt-bin.install
+++ b/debian/libvirt-bin.install
@@ -8,3 +8,4 @@ usr/lib/libvirt/connection-driver
 usr/share/augeas/*
 usr/share/libvirt/*
 usr/share/man/man8/*
+lib/systemd/system/*
diff --git a/debian/patches/debian/Debianize-systemd-service-files.patch b/debian/patches/debian/Debianize-systemd-service-files.patch
new file mode 100644
index 0000000..ae68d69
--- /dev/null
+++ b/debian/patches/debian/Debianize-systemd-service-files.patch
@@ -0,0 +1,37 @@
+From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx at sigxcpu.org>
+Date: Tue, 26 Jun 2012 09:30:39 +0200
+Subject: Debianize systemd service files
+
+---
+ daemon/libvirtd.service.in      |    4 ++--
+ tools/libvirt-guests.service.in |    2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/daemon/libvirtd.service.in b/daemon/libvirtd.service.in
+index 33724ee..9b2c443 100644
+--- a/daemon/libvirtd.service.in
++++ b/daemon/libvirtd.service.in
+@@ -8,8 +8,8 @@ Description=Virtualization daemon
+ Before=libvirt-guests.service
+ 
+ [Service]
+-EnvironmentFile=-/etc/sysconfig/libvirtd
+-ExecStart=@sbindir@/libvirtd $LIBVIRTD_ARGS
++EnvironmentFile=-/etc/default/libvirt-bin
++ExecStart=@sbindir@/libvirtd $libvirtd_opts
+ ExecReload=/bin/kill -HUP $MAINPID
+ KillMode=process
+ # Override the maximum number of opened files
+diff --git a/tools/libvirt-guests.service.in b/tools/libvirt-guests.service.in
+index bc63e91..ea1902a 100644
+--- a/tools/libvirt-guests.service.in
++++ b/tools/libvirt-guests.service.in
+@@ -3,7 +3,7 @@ Description=Suspend Active Libvirt Guests
+ After=syslog.target network.target
+ 
+ [Service]
+-EnvironmentFile=-/etc/sysconfig/libvirt-guests
++EnvironmentFile=-/etc/default/libvirt-guests
+ # Hack just call traditional service until we factor
+ # out the code
+ ExecStart=/etc/init.d/libvirt-guests start
diff --git a/debian/patches/series b/debian/patches/series
index 236d693..9d01a9c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -10,3 +10,4 @@ Disable-gnulib-s-test-nonplocking-pipe.sh.patch
 Disable-failing-virnetsockettest.patch
 Don-t-fail-if-we-can-t-setup-avahi.patch
 Reduce-udevadm-settle-timeout-to-10-seconds.patch
+debian/Debianize-systemd-service-files.patch
diff --git a/debian/rules b/debian/rules
index 853b284..26fea3b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -29,6 +29,7 @@ ifneq (,$(findstring $(DEB_HOST_ARCH_OS), linux))
   WITH_OPENVZ         = --with-openvz
   WITH_NETCF          = --with-netcf
   WITH_SANLOCK        = --with-sanlock
+  WITH_INIT_SCRIPT    =	--with-init-script=systemd
   ifneq (,$(findstring $(DEB_HOST_ARCH), amd64 i386 ia64 mips mipsel powerpc))
       WITH_NUMA       = --with-numactl
   else
@@ -52,6 +53,7 @@ else
   WITH_LXC            = --without-lxc
   WITH_NUMA           = --without-numactl
   WITH_NETCF          = --without-netcf
+  WITH_INIT_SCRIPT    =	--with-init-script=none
 endif
 
 DEB_BUILDDIR := $(CURDIR)/debian/build
@@ -70,7 +72,7 @@ DEB_CONFIGURE_EXTRA_FLAGS :=     \
 	$(WITH_STORAGE_LVM)	 \
 	$(WITH_STORAGE_ISCSI)	 \
 	$(WITH_STORAGE_DISK)	 \
-	--with-init-script=none  \
+	$(WITH_INIT_SCRIPT)      \
 	$(WITH_NUMA)             \
 	--without-selinux        \
 	--without-esx		 \
@@ -99,6 +101,8 @@ binary-install/libvirt-bin::
 	cp $(CURDIR)/tools/libvirt-guests.init.sh $(CURDIR)/debian/libvirt-bin.libvirt-guests.init
 	cp $(CURDIR)/tools/libvirt-guests.sysconf $(CURDIR)/debian/libvirt-bin.libvirt-guests.default
 	dh_installinit --name=libvirt-guests --no-restart-on-upgrade -- defaults 29 71
+	-mv debian/libvirt-bin/lib/systemd/system/libvirtd.service \
+	    debian/libvirt-bin/lib/systemd/system/libvirt-bin.service
 	rm debian/libvirt-bin/usr/lib/libvirt/connection-driver/*.la
 
 	for l in $(LOGROTATE); do \
@@ -111,7 +115,6 @@ build/libvirt-bin::
 	# Add empty dir so dh_install doesn't fail on kFreebsd until we have Polkit support
 	mkdir -p debian/tmp/usr/share/polkit-1
 
-
 binary-install/libvirt-doc::
 	find $(EXAMPLES_DIR) -name "*.o" -type f -delete -o -name .libs -type d -exec rm -rf {} \;
 	rm -f $(EXAMPLES_DIR)domain-events/events-c/event-test

-- 
Libvirt Debian packaging



More information about the Pkg-libvirt-commits mailing list