Ubuntu Pastebin

Paste from serge at Sun, 27 Sep 2015 18:50:28 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
diff -Nru libvirt-1.2.16/debian/changelog libvirt-1.2.16/debian/changelog
--- libvirt-1.2.16/debian/changelog	2015-09-18 00:24:18.000000000 -0500
+++ libvirt-1.2.16/debian/changelog	2015-09-27 13:47:00.000000000 -0500
@@ -1,3 +1,11 @@
+libvirt (1.2.16-2ubuntu11) wily; urgency=medium
+
+  * Fix the preinst and postinst: the check for whether libvirt-bin was
+    running was wrong for upstart systems, but we don't need to do that
+    anyway - just stop libvirt-bin unconditionally.  (LP: #1499199)
+
+ -- Serge Hallyn <serge.hallyn@ubuntu.com>  Sun, 27 Sep 2015 15:47:08 +0000
+
 libvirt (1.2.16-2ubuntu10) wily; urgency=medium
 
   * Add qemu-block-extra libraries to libvirt apparmor profile (LP: #1495895)
diff -Nru libvirt-1.2.16/debian/libvirt-bin.postinst libvirt-1.2.16/debian/libvirt-bin.postinst
--- libvirt-1.2.16/debian/libvirt-bin.postinst	2015-08-11 23:55:44.000000000 -0500
+++ libvirt-1.2.16/debian/libvirt-bin.postinst	2015-09-27 11:12:12.000000000 -0500
@@ -224,15 +224,6 @@
         set_autostart
     fi
 
-    # restart libvirt-bin if we had to turn it off.
-    # remove this after 16.10 release
-    WASRUNNING="/run/libvirt/wasrunning"
-    if [ -e "$WASRUNNING" ]; then
-        service libvirt-bin start
-        service libvirt-guests start
-        rm -f "$WASRUNNING"
-    fi
-
     ;;
 
     abort-upgrade|abort-remove|abort-deconfigure)
diff -Nru libvirt-1.2.16/debian/libvirt-bin.preinst libvirt-1.2.16/debian/libvirt-bin.preinst
--- libvirt-1.2.16/debian/libvirt-bin.preinst	2015-08-14 08:38:47.000000000 -0500
+++ libvirt-1.2.16/debian/libvirt-bin.preinst	2015-09-27 13:49:40.000000000 -0500
@@ -10,14 +10,14 @@
 		if [ -e /etc/libvirt/qemu/networks/autostart/default.xml ]; then
 			touch "$EXISTED"
 		fi
-		# Stop libvirt if we are switching to systemd
-		# remove this after 16.10 release
-		WASRUNNING="/run/libvirt/wasrunning"
+		# 1.2.16-2ubuntu6 added systemd scripts.  A systemd-based
+		# system before that used sysvinit to track libvirt.  By
+		# itself that results in libvirtd running untracked by
+		# systemd.  So in that case, stop the running libvirt-bin
+		# ourselves.
+		# XXX Remove this after 16.10 release
 		if [ -n "$2" ] &&  dpkg --compare-versions "$2" le 1.2.16-2ubuntu6; then
-			if service libvirt-bin status > /dev/null 2>&1; then
-				service libvirt-bin stop
-				touch "$WASRUNNING"
-			fi
+			service libvirt-bin stop || true
 		fi
 			;;
 
Download as text