diff --git a/0001-regressions-Disable-test-for-576879.patch b/0001-regressions-Disable-test-for-576879.patch new file mode 100644 index 0000000..0d3dcfc --- /dev/null +++ b/0001-regressions-Disable-test-for-576879.patch @@ -0,0 +1,66 @@ +From 7eaecf8303c229268f1f55dcb5e37ff9f0bf420d Mon Sep 17 00:00:00 2001 +From: Richard W.M. Jones +Date: Mon, 6 Dec 2010 16:46:00 +0000 +Subject: [PATCH 1/2] regressions: Disable test for 576879. + +This test has worked only intermittently for a while. Disable +it. The upstream bug has been reopened. +--- + regressions/Makefile.am | 2 +- + regressions/rhbz576879.sh | 14 +++++++++----- + 2 files changed, 10 insertions(+), 6 deletions(-) + +diff --git a/regressions/Makefile.am b/regressions/Makefile.am +index 10c5c48..15f6d7b 100644 +--- a/regressions/Makefile.am ++++ b/regressions/Makefile.am +@@ -29,7 +29,6 @@ TESTS = \ + rhbz503169c10.sh \ + rhbz503169c13.sh \ + rhbz557655.sh \ +- rhbz576879.sh \ + rhbz578407.sh \ + rhbz580246.sh \ + test-add-domain.sh \ +@@ -56,6 +55,7 @@ SKIPPED_TESTS = \ + test-bootbootboot.sh + + FAILING_TESTS = \ ++ rhbz576879.sh \ + test-qemudie-launchfail.sh + + random_val := $(shell awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null) +diff --git a/regressions/rhbz576879.sh b/regressions/rhbz576879.sh +index 0f44cbb..c9d7445 100755 +--- a/regressions/rhbz576879.sh ++++ b/regressions/rhbz576879.sh +@@ -24,17 +24,21 @@ set -e + + rm -f test1.img + ++# Somewhere after 1.7, the first test started to hang. ++# ++# Somewhere between ~ 1.5.23 and ~ 1.5.24 the second test started ++# to hang. ++# ++# We don't understand why. I have disabled this test and reopened ++# the upstream bug. ++# -- RWMJ 2010-12-06 ++ + ../fish/guestfish -N disk < +Date: Mon, 6 Dec 2010 17:44:06 +0000 +Subject: [PATCH 2/2] Add --with-febootstrap-yum-config. + +This allows the febootstrap --yum-config option to be passed through, +allowing a separate yum configuration to be used. + +The hope is that this will enable building in Koji. +--- + appliance/make.sh.in | 9 +++++---- + configure.ac | 22 +++++++++------------- + 2 files changed, 14 insertions(+), 17 deletions(-) + +diff --git a/appliance/make.sh.in b/appliance/make.sh.in +index bab0529..55b6530 100755 +--- a/appliance/make.sh.in ++++ b/appliance/make.sh.in +@@ -24,12 +24,13 @@ set -e + excludes="--exclude '^perl' --exclude '^python' --exclude '^fedora-logos' --exclude '^redhat-logos' --exclude '^dracut' --exclude '^upstart' --exclude '^plymouth' --exclude '^systemd' --exclude '^linux-firmware' --exclude '^kbd-misc'" + + # Run febootstrap on the package list. +-if [ -z "@PACKAGE_DIRECTORY@" ]; then +- @FEBOOTSTRAP@ -v -o supermin.d $excludes --names $(< packagelist ) +-else +- @FEBOOTSTRAP@ -v -o supermin.d $excludes @PACKAGE_DIRECTORY@/* ++if [ "x@FEBOOTSTRAP_YUM_CONFIG@" != "xno" ]; then ++ extra="--yum-config '@FEBOOTSTRAP_YUM_CONFIG@'" + fi + ++echo @FEBOOTSTRAP@ -v -o supermin.d --names $(< packagelist ) $excludes $extra ++@FEBOOTSTRAP@ -v -o supermin.d --names $(< packagelist ) $excludes $extra ++ + # Remove some things that we don't want in the appliance. This is + # copied from the old febootstrap-minimize. However minimization is + # not so important now that we are caching the appliance. +diff --git a/configure.ac b/configure.ac +index 682fa11..a20de9b 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -200,19 +200,15 @@ if test "x$enable_appliance" = "xyes"; then + $FEBOOTSTRAP --version >/dev/null 2>&1 || + AC_MSG_ERROR([febootstrap >= 3.0 must be installed, your version is too old]) + +- dnl Build from local package files, used when building with no network +- dnl access, ie. under Koji. +- AC_MSG_CHECKING([if we should build the appliance from local packages]) +- AC_ARG_WITH([local-package-directory], +- [AS_HELP_STRING([--with-local-package-directory], +- [build from local packages in dir @<:@default=no@:>@])], +- [local_package_directory=$withval], +- [local_package_directory=no]) +- AC_MSG_RESULT([$local_package_directory]) +- PACKAGE_DIRECTORY= +- test "x$local_package_directory" != "xno" && +- PACKAGE_DIRECTORY="$local_package_directory" +- AC_SUBST([PACKAGE_DIRECTORY]) ++ dnl Pass a febootstrap --yum-config option. ++ AC_MSG_CHECKING([febootstrap --yum-config option]) ++ AC_ARG_WITH([febootstrap-yum-config], ++ [AS_HELP_STRING([--with-febootstrap-yum-config=FILE], ++ [pass febootstrap --yum-config option @<:@default=no@:>@])], ++ [FEBOOTSTRAP_YUM_CONFIG="$withval"], ++ [FEBOOTSTRAP_YUM_CONFIG=no]) ++ AC_MSG_RESULT([$FEBOOTSTRAP_YUM_CONFIG]) ++ AC_SUBST([FEBOOTSTRAP_YUM_CONFIG]) + + dnl Which distro? + dnl +-- +1.7.3.2 + diff --git a/libguestfs.spec b/libguestfs.spec index c4ddb4d..bdb2f33 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -30,7 +30,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.7.19 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv2+ Group: Development/Libraries URL: http://libguestfs.org/ @@ -40,16 +40,23 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root # Disable FUSE tests, not supported in Koji at the moment. Patch0: libguestfs-1.7.13-no-fuse-test.patch +# Disable test for RHBZ#576879 which wasn't working (or bug reappeared). +Patch1: 0001-regressions-Disable-test-for-576879.patch +# Add --with-febootstrap-yum-config option. +Patch2: 0002-Add-with-febootstrap-yum-config.patch +BuildRequires: autoconf, automake, libtool, gettext-devel + # Basic build requirements: BuildRequires: /usr/bin/pod2man BuildRequires: /usr/bin/pod2text -BuildRequires: febootstrap >= 3.0 +BuildRequires: febootstrap >= 3.1 BuildRequires: hivex-devel >= 1.2.2 BuildRequires: augeas-devel >= 0.5.0 BuildRequires: readline-devel BuildRequires: genisoimage BuildRequires: libxml2-devel BuildRequires: qemu-kvm >= 0.10-7 +BuildRequires: createrepo BuildRequires: glibc-static BuildRequires: libselinux-devel BuildRequires: fuse-devel @@ -121,7 +128,7 @@ BuildRequires: qemu-img # Runtime requires: Requires: qemu-kvm >= 0.12 -Requires: febootstrap >= 3.0 +Requires: febootstrap >= 3.1 # For libguestfs-test-tool. Requires: genisoimage @@ -421,6 +428,10 @@ php-%{name} contains PHP bindings for %{name}. %setup -q %patch0 -p1 +%patch1 -p1 +%patch2 -p1 +autoreconf -i +rm appliance/make.sh mkdir -p daemon/m4 @@ -431,7 +442,17 @@ mkdir -p daemon/m4 %else mkdir repo find /var/cache/yum -type f -name '*.rpm' -print0 | xargs -0 cp -t repo -%define extra --with-local-package-directory=$(pwd)/repo +createrepo repo +cp /etc/yum.conf yum.conf +cat >> yum.conf < - 1:1.7.19-2 +- Rebuild appliance properly using febootstrap 3.1 and alternate yum repo. + * Sun Dec 5 2010 Richard Jones - 1:1.7.19-1 - New upstream development version 1.7.19. - Appliance building in this version has been substantially rewritten