[Pkg-libvirt-commits] [SCM] Libguestfs Debian packaging branch, experimental, updated. debian/1%1.21.40-1

Hilko Bengen bengen at debian.org
Sat Jun 1 11:05:01 UTC 2013


The following commit has been merged in the experimental branch:
commit 9b1107daf893a423ff9fc1071997c2f9d8f1255b
Author: Hilko Bengen <bengen at debian.org>
Date:   Fri May 17 18:57:02 2013 +0200

    Updated patch queue
    
    - Use pkg-config for Python (proper fix for #707141)
    - Removed ntfsprogs from packagelist (Closes: #708520)
    - Changed selinux mountpoint (CLoses: #707217)
    - Fixed build with --disable-appliance

diff --git a/debian/patches/0003-Use-pkg-config-for-Python.patch b/debian/patches/0003-Use-pkg-config-for-Python.patch
new file mode 100644
index 0000000..9e2894b
--- /dev/null
+++ b/debian/patches/0003-Use-pkg-config-for-Python.patch
@@ -0,0 +1,93 @@
+From: Hilko Bengen <bengen at debian.org>
+Date: Fri, 17 May 2013 18:37:37 +0200
+Subject: Use pkg-config for Python
+
+At least libpython2.7-dev and libpython3.3-dev on current
+Debian/unstable ship with pkg-config files. As with the pkg-config
+check for Lua, we check for versioned and an unversioned .pc files.
+---
+ configure.ac       |   35 ++++++++++++++++++++---------------
+ python/Makefile.am |    2 +-
+ 2 files changed, 21 insertions(+), 16 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index c809741..0aa1716 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1106,7 +1106,6 @@ AM_CONDITIONAL([HAVE_PERL],
+ dnl Check for Python (optional, for Python bindings).
+ PYTHON_PREFIX=
+ PYTHON_VERSION=
+-PYTHON_INCLUDEDIR=
+ PYTHON_INSTALLDIR=
+ 
+ AC_ARG_ENABLE([python],
+@@ -1117,23 +1116,30 @@ AS_IF([test "x$enable_python" != "xno"],[
+     AC_CHECK_PROG([PYTHON],[python],[python],[no])
+ 
+     if test "x$PYTHON" != "xno"; then
+-        AC_MSG_CHECKING([Python prefix])
+-        PYTHON_PREFIX=`$PYTHON -c "import sys; print (sys.prefix)"`
+-        AC_MSG_RESULT([$PYTHON_PREFIX])
+-
+ 	AC_MSG_CHECKING([Python version])
+         PYTHON_VERSION_MAJOR=`$PYTHON -c "import sys; print (sys.version_info@<:@0@:>@)"`
+         PYTHON_VERSION_MINOR=`$PYTHON -c "import sys; print (sys.version_info@<:@1@:>@)"`
+         PYTHON_VERSION="$PYTHON_VERSION_MAJOR.$PYTHON_VERSION_MINOR"
+ 	AC_MSG_RESULT([$PYTHON_VERSION])
+-
+-        AC_MSG_CHECKING([for Python include path])
+-        if test -z "$PYTHON_INCLUDEDIR"; then
+-            python_path=`$PYTHON -c "import distutils.sysconfig; \
+-                                     print (distutils.sysconfig.get_python_inc ());"`
+-            PYTHON_INCLUDEDIR=$python_path
+-        fi
+-        AC_MSG_RESULT([$PYTHON_INCLUDEDIR])
++        # Debian: python-2.7.pc, python-3.2.pc
++        PKG_CHECK_MODULES([PYTHON], [python-"$PYTHON_VERSION"],[
++            AC_SUBST([PYTHON_CFLAGS])
++            AC_SUBST([PYTHON_LIBS])
++            AC_SUBST([PYTHON_VERSION])
++            AC_DEFINE([HAVE_PYTHON],[1],[Python library found at compile time])
++        ],[
++            PKG_CHECK_MODULES([PYTHON], [python],[
++                AC_SUBST([PYTHON_CFLAGS])
++                AC_SUBST([PYTHON_LIBS])
++                AC_SUBST([PYTHON_VERSION])
++                AC_DEFINE([HAVE_PYTHON],[1],[Python library found at compile time])
++            ],[
++                AC_MSG_WARN([python $PYTHON_VERSION not found])
++            ])
++        ])
++        AC_MSG_CHECKING([Python prefix])
++        PYTHON_PREFIX=`$PYTHON -c "import sys; print (sys.prefix)"`
++        AC_MSG_RESULT([$PYTHON_PREFIX])
+ 
+         AC_ARG_WITH([python-installdir],
+                     [AS_HELP_STRING([--with-python-installdir],
+@@ -1171,11 +1177,10 @@ AS_IF([test "x$enable_python" != "xno"],[
+ 
+     AC_SUBST(PYTHON_PREFIX)
+     AC_SUBST(PYTHON_VERSION)
+-    AC_SUBST(PYTHON_INCLUDEDIR)
+     AC_SUBST(PYTHON_INSTALLDIR)
+ ])
+ AM_CONDITIONAL([HAVE_PYTHON],
+-    [test "x$PYTHON" != "xno" && test "x$PYTHON_INCLUDEDIR" != "x" && test "x$PYTHON_INSTALLDIR" != "x"])
++    [test "x$PYTHON" != "xno" && test "x$PYTHON_LIBS" != "x" ])
+ 
+ dnl Check for Ruby and rake (optional, for Ruby bindings).
+ AC_ARG_ENABLE([ruby],
+diff --git a/python/Makefile.am b/python/Makefile.am
+index e514a76..ecc25d5 100644
+--- a/python/Makefile.am
++++ b/python/Makefile.am
+@@ -43,7 +43,7 @@ libguestfsmod_la_SOURCES = guestfs-py.c guestfs-py.h guestfs-py-byhand.c
+ 
+ libguestfsmod_la_CPPFLAGS = \
+ 	-DGUESTFS_PRIVATE=1 \
+-	-I$(PYTHON_INCLUDEDIR) \
++	$(PYTHON_CFLAGS) \
+ 	-I$(top_srcdir)/src -I$(top_builddir)/src
+ 
+ libguestfsmod_la_CFLAGS = \
diff --git a/debian/patches/0004-remove-last-trace-of-ntfsprogs.patch b/debian/patches/0004-remove-last-trace-of-ntfsprogs.patch
new file mode 100644
index 0000000..5ab3b75
--- /dev/null
+++ b/debian/patches/0004-remove-last-trace-of-ntfsprogs.patch
@@ -0,0 +1,20 @@
+From: =?UTF-8?q?Bastien=20ROUCARI=C3=88S?= <roucaries.bastien at gmail.com>
+Date: Fri, 17 May 2013 10:11:37 +0200
+Subject: remove last trace of ntfsprogs
+
+---
+ appliance/packagelist.in |    1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/appliance/packagelist.in b/appliance/packagelist.in
+index 8a4a5ea..54895b8 100644
+--- a/appliance/packagelist.in
++++ b/appliance/packagelist.in
+@@ -79,7 +79,6 @@
+   mtools
+   nilfs-tools
+   ntfs-3g
+-  ntfsprogs
+   openssh-client
+   reiserfsprogs
+   sysvinit /* for /sbin/reboot */
diff --git a/debian/patches/0005-Fix-for-changed-selinux-mountpoint.patch b/debian/patches/0005-Fix-for-changed-selinux-mountpoint.patch
new file mode 100644
index 0000000..10212bf
--- /dev/null
+++ b/debian/patches/0005-Fix-for-changed-selinux-mountpoint.patch
@@ -0,0 +1,61 @@
+From: Hilko Bengen <bengen at debian.org>
+Date: Fri, 17 May 2013 19:07:48 +0200
+Subject: Fix for changed selinux mountpoint
+
+---
+ appliance/init   |    2 +-
+ daemon/command.c |    7 ++-----
+ 2 files changed, 3 insertions(+), 6 deletions(-)
+
+diff --git a/appliance/init b/appliance/init
+index fc49126..813442b 100755
+--- a/appliance/init
++++ b/appliance/init
+@@ -80,7 +80,7 @@ else
+ fi
+ 
+ if grep -sq selinux=1 /proc/cmdline; then
+-  mount -t selinuxfs none /selinux
++  mount -t selinuxfs none /sys/fs/selinux
+ fi
+ 
+ # Update the system clock.
+diff --git a/daemon/command.c b/daemon/command.c
+index 9d9c81d..fde3826 100644
+--- a/daemon/command.c
++++ b/daemon/command.c
+@@ -45,7 +45,7 @@ do_command (char *const *argv)
+   int r;
+   CLEANUP_FREE char *sysroot_dev = NULL, *sysroot_dev_pts = NULL,
+     *sysroot_proc = NULL, *sysroot_selinux = NULL, *sysroot_sys = NULL;
+-  int dev_ok, dev_pts_ok, proc_ok, selinux_ok, sys_ok;
++  int dev_ok, dev_pts_ok, proc_ok, sys_ok;
+ 
+   /* We need a root filesystem mounted to do this. */
+   NEED_ROOT (, return NULL);
+@@ -70,7 +70,7 @@ do_command (char *const *argv)
+   sysroot_dev = sysroot_path ("/dev");
+   sysroot_dev_pts = sysroot_path ("/dev/pts");
+   sysroot_proc = sysroot_path ("/proc");
+-  sysroot_selinux = sysroot_path ("/selinux");
++  sysroot_selinux = sysroot_path ("/sys/fs/selinux");
+   sysroot_sys = sysroot_path ("/sys");
+ 
+   if (sysroot_dev == NULL || sysroot_dev_pts == NULL ||
+@@ -86,8 +86,6 @@ do_command (char *const *argv)
+   dev_pts_ok = r != -1;
+   r = command (NULL, NULL, str_mount, "--bind", "/proc", sysroot_proc, NULL);
+   proc_ok = r != -1;
+-  r = command (NULL, NULL, str_mount, "--bind", "/selinux", sysroot_selinux, NULL);
+-  selinux_ok = r != -1;
+   r = command (NULL, NULL, str_mount, "--bind", "/sys", sysroot_sys, NULL);
+   sys_ok = r != -1;
+ 
+@@ -96,7 +94,6 @@ do_command (char *const *argv)
+   CHROOT_OUT;
+ 
+   if (sys_ok) umount_ignore_fail (sysroot_sys);
+-  if (selinux_ok) umount_ignore_fail (sysroot_selinux);
+   if (proc_ok) umount_ignore_fail (sysroot_proc);
+   if (dev_pts_ok) umount_ignore_fail (sysroot_dev_pts);
+   if (dev_ok) umount_ignore_fail (sysroot_dev);
diff --git a/debian/patches/0006-run-Turn-error-message-about-missing-LIBGUESTFS_PATH.patch b/debian/patches/0006-run-Turn-error-message-about-missing-LIBGUESTFS_PATH.patch
new file mode 100644
index 0000000..afa55cd
--- /dev/null
+++ b/debian/patches/0006-run-Turn-error-message-about-missing-LIBGUESTFS_PATH.patch
@@ -0,0 +1,30 @@
+From: Hilko Bengen <bengen at debian.org>
+Date: Fri, 17 May 2013 22:28:18 +0200
+Subject: run: Turn error message about missing LIBGUESTFS_PATH into warning;
+ output to STDERR
+
+The previous behavior caused the build to abort when trying to build
+the sysprep documentation -- without much of a hint of what went
+wrong.
+---
+ run.in |    7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/run.in b/run.in
+index 7545f0b..c4771b7 100755
+--- a/run.in
++++ b/run.in
+@@ -66,9 +66,10 @@ chcon --reference=/tmp tmp 2>/dev/null ||:
+ if [ "x at ENABLE_APPLIANCE@" = "xyes" ]; then
+     export LIBGUESTFS_PATH="$b/appliance"
+ elif [ -z "$LIBGUESTFS_PATH" ]; then
+-    echo "run: error: You used './configure --disable-appliance' so you must put an"
+-    echo "run: error: appliance somewhere and set LIBGUESTFS_PATH to point to it."
+-    exit 1
++    cat <<'EOF' >&2
++run: warning: You used './configure --disable-appliance' so LIBGUESTFS_PATH
++run: warning: has not been set automatically.
++EOF
+ fi
+ 
+ if [ -z "$LD_LIBRARY_PATH" ]; then
diff --git a/debian/patches/0007-test-events.sh-ignore-trace-get_path-line.patch b/debian/patches/0007-test-events.sh-ignore-trace-get_path-line.patch
new file mode 100644
index 0000000..77780cf
--- /dev/null
+++ b/debian/patches/0007-test-events.sh-ignore-trace-get_path-line.patch
@@ -0,0 +1,32 @@
+From: Hilko Bengen <bengen at debian.org>
+Date: Sun, 19 May 2013 18:01:10 +0200
+Subject: test-events.sh: ignore "trace get_path" line
+
+The test would fail when LIBGUESTFS_PATH was not set.
+---
+ fish/test-events.sh |    5 +----
+ 1 file changed, 1 insertion(+), 4 deletions(-)
+
+diff --git a/fish/test-events.sh b/fish/test-events.sh
+index 79957ed..32e0a31 100755
+--- a/fish/test-events.sh
++++ b/fish/test-events.sh
+@@ -22,7 +22,7 @@ set -e
+ 
+ rm -f test.out
+ 
+-./guestfish -a /dev/null <<'EOF' | grep -v get_verbose | grep -v get_trace | grep -v 'library .*0x' | grep -v 'library command' > test.out
++./guestfish -a /dev/null <<'EOF' | grep -v get_verbose | grep -v get_trace | grep -v 'library .*0x' | grep -v 'library command' | grep -v 'get_path' > test.out
+ trace true
+ 
+ event ev1 * "echo $EVENT $@"
+@@ -59,9 +59,6 @@ trace shutdown = 0
+ enter get_autosync
+ trace get_autosync
+ trace get_autosync = 1
+-enter get_path
+-trace get_path
+-trace get_path = "'$LIBGUESTFS_PATH'"
+ enter get_pgroup
+ trace get_pgroup
+ trace get_pgroup = 0
diff --git a/debian/patches/series b/debian/patches/series
index 0552a51..72273e3 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,7 @@
 0001-Fix-for-systemd-based-Debian-systems.patch
 0002-Fix-guestfs-supermin-appliance-path.patch
+0003-Use-pkg-config-for-Python.patch
+0004-remove-last-trace-of-ntfsprogs.patch
+0005-Fix-for-changed-selinux-mountpoint.patch
+0006-run-Turn-error-message-about-missing-LIBGUESTFS_PATH.patch
+0007-test-events.sh-ignore-trace-get_path-line.patch

-- 
Libguestfs Debian packaging



More information about the Pkg-libvirt-commits mailing list