[Pkg-libvirt-maintainers] Bug#770485: Default to "pygrub" in xen libxl backend

Ian Campbell ijc at debian.org
Fri Nov 21 16:47:33 UTC 2014


Package: libvirt0
Version: 1.2.9-4
Tags: patch

The Debian Xen packaging moves the pygrub from $BINDIR to a private
libexec dir (specifically /usr/lib/xen-$(VERSION)/bin), however libvirt
hardcodes /usr/bin/pygrub, which causes pygrub not to be found.

If the bare string "pygrub" is used instead then libxl (the xen
toolstakc library used by libvirt) will instead use the version from the
libexec dir.

I think this is a reasonable change for upstream, so I've posted it
there:
https://www.redhat.com/archives/libvir-list/2014-November/msg00822.html

However even if upstream aren't keen it certainly applies to the Debian
packaging of libvirt since it is needed to integrate with the packaging
of the hypervisor side.

BTW, an alternative to this patch would be to explicitly
list /usr/lib/xen-4.4/bin/pygrub, but IMHO that is strictly worse.

It would be great if this could be fixed in Jessie.

Ian.

>From 2d7550310012ae4f9b0b82c4c70f75c65f51412a Mon Sep 17 00:00:00 2001
From: Ian Campbell <ijc at debian.org>
Date: Fri, 21 Nov 2014 14:28:35 +0000
Subject: [PATCH] Specify "pygrub" by default for libxl backend guests.

Using an absolute path prevents libxl from providing the correct
default.
---
 debian/patches/debian/Pygrub-path.patch | 19 +++++++++++++++++++
 debian/patches/series                   |  1 +
 2 files changed, 20 insertions(+)
 create mode 100644 debian/patches/debian/Pygrub-path.patch

diff --git a/debian/patches/debian/Pygrub-path.patch b/debian/patches/debian/Pygrub-path.patch
new file mode 100644
index 0000000..30c2489
--- /dev/null
+++ b/debian/patches/debian/Pygrub-path.patch
@@ -0,0 +1,19 @@
+From: Ian Campbell <ijc at debian.org>
+Date: Fri, 21 Nov 2014 13:45:51 +0000
+Subject: allow libxl to find default path to pygrub.
+
+The Xen debian packages relocate pygrub into
+/usr/lib/xen-X.Y/bin/pygrub, not /usr/bin/pygrub. Since libxl knows to
+DTRT with a bare "pygrub" just use that by default.
+
+--- a/src/libxl/libxl_conf.h
++++ b/src/libxl/libxl_conf.h
+@@ -53,7 +53,7 @@
+ # define LIBXL_LIB_DIR LOCALSTATEDIR "/lib/libvirt/libxl"
+ # define LIBXL_SAVE_DIR LIBXL_LIB_DIR "/save"
+ # define LIBXL_DUMP_DIR LIBXL_LIB_DIR "/dump"
+-# define LIBXL_BOOTLOADER_PATH BINDIR "/pygrub"
++# define LIBXL_BOOTLOADER_PATH "pygrub"
+ 
+ /* libxl interface for setting VCPU affinity changed in 4.5. In fact, a new
+  * parameter has been added, representative of 'VCPU soft affinity'. If one
diff --git a/debian/patches/series b/debian/patches/series
index 14dcfbe..f41db22 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
+debian/Pygrub-path.patch
 debian/remove-RHism.diff.patch
 debian/Don-t-enable-default-network-on-boot.patch
 debian/fix-Debian-specific-path-to-hvm-loader.patch
-- 
2.1.1



More information about the Pkg-libvirt-maintainers mailing list