Package: libvirt Version: 0.9.6-2 Severity: normal Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu precise ubuntu-patch
Version: 0.9.6-2 debian/rules tries to copy the logrotate files from $(CURDIR)/daemon/*, but the files exist in $(CURDIR)/debian/build/daemon/*. Also, the /var/log/libvirt/qemu (and such) files are created using libvirt-bin.dirs, but that means that, if they are empty, they are removed when we apt-get remove libvirt-bin. The logrotate files are not, which then raises errors on subsequent logrotate runs. *** /tmp/tmpwWRd8m In Ubuntu, the attached patch was applied to achieve the following: ## ---------------- REPLACE THIS WITH ACTUAL INFORMATION --------------------- ## Please add all necessary information about why the change needed to go in ## Ubuntu, quote policy, spec or any other background material and why it can ## and should be used in Debian too. If the patch is composed of multiple ## independent pieces, please send them as separate bug reports. ## ---------------- REPLACE THIS WITH ACTUAL INFORMATION --------------------- * Move creation of /var/log/libvirt/{lxc,uml,qemu} dirs from libvirt-bin.dirs to libvirt-bin.postinst. Otherwise after a 'apt-get remove libvirt-bin', that dir will be removed (if empty) but /etc/logrotate.d/libvirtd will still try to rotate it and raise errors. (LP: #886770) * debian/rules: Fix a bug in the new logic for installing upstream-supplied logrotate files. (LP: #887312) Thanks for considering the patch. -- System Information: Debian Release: wheezy/sid APT prefers oneiric-updates APT policy: (500, 'oneiric-updates'), (500, 'oneiric-security'), (500, 'oneiric'), (100, 'oneiric-backports') Architecture: amd64 (x86_64) Kernel: Linux 3.0.0-12-generic (SMP w/8 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash
diff -Nru libvirt-0.9.6/debian/changelog libvirt-0.9.6/debian/changelog diff -Nru libvirt-0.9.6/debian/libvirt-bin.dirs libvirt-0.9.6/debian/libvirt-bin.dirs --- libvirt-0.9.6/debian/libvirt-bin.dirs 2011-10-17 12:33:24.000000000 -0500 +++ libvirt-0.9.6/debian/libvirt-bin.dirs 2011-11-07 12:58:46.000000000 -0600 @@ -10,6 +10,3 @@ /var/lib/libvirt/sanlock /var/cache/libvirt /var/cache/libvirt/qemu -/var/log/libvirt/qemu -/var/log/libvirt/uml -/var/log/libvirt/lxc diff -Nru libvirt-0.9.6/debian/libvirt-bin.postinst libvirt-0.9.6/debian/libvirt-bin.postinst --- libvirt-0.9.6/debian/libvirt-bin.postinst 2011-10-17 12:34:49.000000000 -0500 +++ libvirt-0.9.6/debian/libvirt-bin.postinst 2011-11-07 12:58:36.000000000 -0600 @@ -116,6 +116,10 @@ apparmor_parser -r "$profile" || true fi done + + for dir in qemu uml lxc; do + mkdir -p /var/log/libvirt/$dir + done ;; abort-upgrade|abort-remove|abort-deconfigure) diff -Nru libvirt-0.9.6/debian/rules libvirt-0.9.6/debian/rules --- libvirt-0.9.6/debian/rules 2011-10-31 21:29:48.000000000 -0500 +++ libvirt-0.9.6/debian/rules 2011-11-07 14:56:53.000000000 -0600 @@ -93,7 +93,7 @@ #dh_installinit --name=libvirt-guests --no-restart-on-upgrade -- defaults 29 71 for l in $(LOGROTATE); do \ - cp $(CURDIR)/daemon/$$l.logrotate \ + cp $(CURDIR)/debian/build/daemon/$$l.logrotate \ debian/libvirt-bin.$$l.logrotate; \ dh_installlogrotate --name=$$l; \ done