diff --git a/.cvsignore b/.cvsignore index b0e631b..e9386a2 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -libguestfs-1.0.85.tar.gz +libguestfs-1.2.1.tar.gz diff --git a/libguestfs-1.0.85-bash-regexp-quoting-fix-for-rhel-5.patch b/libguestfs-1.0.85-bash-regexp-quoting-fix-for-rhel-5.patch deleted file mode 100644 index 094378e..0000000 --- a/libguestfs-1.0.85-bash-regexp-quoting-fix-for-rhel-5.patch +++ /dev/null @@ -1,110 +0,0 @@ -From 4891ff9945177e8666af8381d1e0a54b8ce363e2 Mon Sep 17 00:00:00 2001 -From: Richard Jones -Date: Tue, 2 Mar 2010 10:34:20 +0000 -Subject: [PATCH] More complete fix for bash regexp quoting bug. - -Commit 457fccae1b665347 was not a complete fix, in that it -didn't work properly on RHEL 5 era bash (3.2.x). For example: - - file=libntfs-3g.so.74 - [[ "$file" =~ ^lib(.*)\.so\.([0-9]+)\. ]] && \ - echo "lib${BASH_REMATCH[1]}.so.${BASH_REMATCH[2]}.*" - -would on those old shells print: - - libntfs-3g.so.7.* - -It seems the final \. was being treated as a plain period (ie. -match anything). - -The only way to work around this incompatibility is to assign the -patterns to variables and match on those, ie: - - p='^lib(.*)\.so\.([0-9]+)\.' - [[ "$file" =~ $p ]] && ... - -This works in both old and new shells. ---- - appliance/supermin-split.sh.in | 29 ++++++++++++++++++++--------- - 1 files changed, 20 insertions(+), 9 deletions(-) - -diff --git a/appliance/supermin-split.sh.in b/appliance/supermin-split.sh.in -index 753fca3..cd29b8a 100755 ---- a/appliance/supermin-split.sh.in -+++ b/appliance/supermin-split.sh.in -@@ -55,24 +55,35 @@ for path in $(find -not -name fakeroot.log); do - # question E14 here http://tiswww.case.edu/php/chet/bash/FAQ and - # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=487387#25 - # (RHBZ#566511). -+ p_etc='^\./etc' -+ p_dev='^\./dev' -+ p_var='^\./var' -+ p_lib_modules='^\./lib/modules/' -+ p_builddir='^\./builddir' -+ p_ld_so='^ld-[.0-9]+\.so$' -+ p_libbfd='^libbfd-.*\.so$' -+ p_libgcc='^libgcc_s-.*\.so\.([0-9]+)$' -+ p_lib123so='^lib(.*)-[-.0-9]+\.so$' -+ p_lib123so123='^lib(.*)-[-.0-9]+\.so\.([0-9]+)\.' -+ p_libso123='^lib(.*)\.so\.([0-9]+)\.' - - # All we're going to keep are the special files /init, the daemon, - # configuration files (/etc), devices and modifiable stuff (/var). - if [ "$path" = "./init" -o "$file" = "guestfsd" ]; then - echo "$path" >&5 - -- elif [[ "$path" =~ ^\./etc || "$path" =~ ^\./dev || "$path" =~ ^\./var ]] -+ elif [[ "$path" =~ $p_etc || "$path" =~ $p_dev || "$path" =~ $p_var ]] - then - echo "$path" >&5 - - # Kernel modules are always copied in from the host, including all - # the dependency files. -- elif [[ "$path" =~ ^\./lib/modules/ ]]; then -+ elif [[ "$path" =~ $p_lib_modules ]]; then - : - - # On mock/Koji, exclude bogus /builddir directory which for some - # reason contains some yum temporary files (RHBZ#566512). -- elif [[ "$path" =~ ^\./builddir ]]; then -+ elif [[ "$path" =~ $p_builddir ]]; then - : - - elif [ -d "$path" ]; then -@@ -82,27 +93,27 @@ for path in $(find -not -name fakeroot.log); do - - # Some libraries need fixed version numbers replaced by wildcards. - -- elif [[ "$file" =~ ^ld-[.0-9]+\.so$ ]]; then -+ elif [[ "$file" =~ $p_ld_so ]]; then - echo "$dir/ld-*.so" >&6 - - # Special case for libbfd -- elif [[ "$file" =~ ^libbfd-.*\.so$ ]]; then -+ elif [[ "$file" =~ $p_libbfd ]]; then - echo "$dir/libbfd-*.so" >&6 - - # Special case for libgcc_s--.so.N -- elif [[ "$file" =~ ^libgcc_s-.*\.so\.([0-9]+)$ ]]; then -+ elif [[ "$file" =~ $p_libgcc ]]; then - echo "$dir/libgcc_s-*.so.${BASH_REMATCH[1]}" >&6 - - # libfoo-1.2.3.so -- elif [[ "$file" =~ ^lib(.*)-[-.0-9]+\.so$ ]]; then -+ elif [[ "$file" =~ $p_lib123so ]]; then - echo "$dir/lib${BASH_REMATCH[1]}-*.so" >&6 - - # libfoo-1.2.3.so.1.2.3 (but NOT '*.so.N') -- elif [[ "$file" =~ ^lib(.*)-[-.0-9]+\.so\.([0-9]+)\. ]]; then -+ elif [[ "$file" =~ $p_lib123so123 ]]; then - echo "$dir/lib${BASH_REMATCH[1]}-*.so.${BASH_REMATCH[2]}.*" >&6 - - # libfoo.so.1.2.3 (but NOT '*.so.N') -- elif [[ "$file" =~ ^lib(.*)\.so\.([0-9]+)\. ]]; then -+ elif [[ "$file" =~ $p_libso123 ]]; then - echo "$dir/lib${BASH_REMATCH[1]}.so.${BASH_REMATCH[2]}.*" >&6 - - else --- -1.6.5.2 - diff --git a/libguestfs-1.0.85-weaken-dependency-on-libntfs-3g.patch b/libguestfs-1.0.85-weaken-dependency-on-libntfs-3g.patch deleted file mode 100644 index 852baf2..0000000 --- a/libguestfs-1.0.85-weaken-dependency-on-libntfs-3g.patch +++ /dev/null @@ -1,63 +0,0 @@ -From: Richard Jones -Date: Fri, 12 Mar 2010 15:10:28 +0000 (+0000) -Subject: Special case hostfiles handling for libntfs-3g.so -X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=commitdiff_plain;h=599f94c9c14c970dcfd7cec8d6898cd3b46af8ca - -Special case hostfiles handling for libntfs-3g.so - -The ntfs-3g project keeps bumping their soname, and this causes -dependency problems for the Fedora package. The root of the problem -is we depend on /lib/libntfs-3g.so., but if keeps bumping, -the dependency keeps breaking. - -This commit changes the hostfiles (and hence dependency) to be on -/lib/libntfs-3g.so.* instead. The downside to this is we could end -up pulling more files into the appliance than are strictly required, -but it will fix the Fedora packaging problems being felt by the -Fedora maintainer of ntfs-3g. - -After applying this commit, the change to hostfiles looks like this: - -@@ -1489,7 +1489,7 @@ - ./lib/libpam_misc.so.0 - ./lib/libdmraid.so - ./lib/libidn.so.11 --./lib/libntfs-3g.so.74 -+./lib/libntfs-3g.so.* - ./lib/libext2fs.so.2.* - ./lib/libpam.so.0 - ./lib/libsepol.so.1 -@@ -1520,7 +1520,6 @@ - ./lib/libnss_files-*.so - ./lib/libgio-2.0.so.0 - ./lib/libpam_misc.so.0.* --./lib/libntfs-3g.so.74.* - ./lib/libanl.so.1 - ./lib/libdevmapper-event-lvm2.so.2.* - ./lib/libpthread.so.0 ---- - -diff --git a/appliance/supermin-split.sh.in b/appliance/supermin-split.sh.in -index cd29b8a..94990dd 100755 ---- a/appliance/supermin-split.sh.in -+++ b/appliance/supermin-split.sh.in -@@ -63,6 +63,7 @@ for path in $(find -not -name fakeroot.log); do - p_ld_so='^ld-[.0-9]+\.so$' - p_libbfd='^libbfd-.*\.so$' - p_libgcc='^libgcc_s-.*\.so\.([0-9]+)$' -+ p_libntfs3g='^libntfs-3g\.so\..*$' - p_lib123so='^lib(.*)-[-.0-9]+\.so$' - p_lib123so123='^lib(.*)-[-.0-9]+\.so\.([0-9]+)\.' - p_libso123='^lib(.*)\.so\.([0-9]+)\.' -@@ -104,6 +105,11 @@ for path in $(find -not -name fakeroot.log); do - elif [[ "$file" =~ $p_libgcc ]]; then - echo "$dir/libgcc_s-*.so.${BASH_REMATCH[1]}" >&6 - -+ # Special case for libntfs-3g.so.* -+ elif [[ "$file" =~ $p_libntfs3g ]]; then -+ [ -n "$libntfs3g_once" ] || echo "$dir/libntfs-3g.so.*" >&6 -+ libntfs3g_once=1 -+ - # libfoo-1.2.3.so - elif [[ "$file" =~ $p_lib123so ]]; then - echo "$dir/lib${BASH_REMATCH[1]}-*.so" >&6 diff --git a/libguestfs.spec b/libguestfs.spec index 093a040..5bbfb48 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -41,8 +41,8 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.0.85 -Release: 2%{?dist}.4 +Version: 1.2.1 +Release: 1%{?dist} License: LGPLv2+ Group: Development/Libraries URL: http://libguestfs.org/ @@ -52,17 +52,11 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root # Disable FUSE tests, not supported in Koji at the moment. Patch0: libguestfs-1.0.79-no-fuse-test.patch -# More complete fix for bash regexp quoting screw-up. -Patch1: libguestfs-1.0.85-bash-regexp-quoting-fix-for-rhel-5.patch - -# Backport upstream commit to weaken dependency on libntfs-3g.so.N. -Patch2: libguestfs-1.0.85-weaken-dependency-on-libntfs-3g.patch - # Basic build requirements: BuildRequires: /usr/bin/pod2man BuildRequires: /usr/bin/pod2text BuildRequires: febootstrap >= 2.6 -BuildRequires: hivex-devel >= 1.2.0 +BuildRequires: hivex-devel >= 1.2.1 BuildRequires: augeas-devel >= 0.5.0 BuildRequires: readline-devel BuildRequires: genisoimage @@ -85,6 +79,7 @@ BuildRequires: dosfstools, zerofree, lsof, scrub, libselinux BuildRequires: parted, btrfs-progs, gfs2-utils BuildRequires: hfsplus-tools, nilfs-utils, reiserfs-utils BuildRequires: jfsutils, xfsprogs +BuildRequires: vim-minimal %ifarch %{ix86} x86_64 BuildRequires: grub, ntfsprogs %endif @@ -97,6 +92,7 @@ Requires: dosfstools, zerofree, lsof, scrub, libselinux Requires: parted, btrfs-progs, gfs2-utils Requires: hfsplus-tools, nilfs-utils, reiserfs-utils Requires: jfsutils, xfsprogs +Requires: vim-minimal %ifarch %{ix86} x86_64 Requires: grub, ntfsprogs %endif @@ -220,7 +216,7 @@ Requires: %{name} = %{epoch}:%{version}-%{release} Requires: guestfish Requires: perl-Sys-Virt Requires: perl-XML-Writer -Requires: hivex +Requires: hivex >= 1.2.1 # Obsolete and replace earlier packages. Provides: virt-cat = %{epoch}:%{version}-%{release} @@ -264,11 +260,16 @@ para-virtualized (PV), what applications are installed and more. Virt-list-filesystems can be used to list out the filesystems in a virtual machine image (for shell scripts etc). +Virt-list-partitions can be used to list out the partitions in a +virtual machine image. + Virt-ls is a command line tool to list out files in a virtual machine. Virt-rescue provides a rescue shell for making interactive, unstructured fixes to virtual machines. +Virt-resize can resize existing virtual machine disk images. + Virt-tar is an archive, backup and upload tool for virtual machines. Virt-win-reg lets you look inside the Windows Registry for @@ -380,8 +381,6 @@ Requires: jpackage-utils %setup -q %patch0 -p1 -%patch1 -p1 -%patch2 -p1 mkdir -p daemon/m4 @@ -419,6 +418,14 @@ export PATH=/usr/sbin:$PATH # not the site dir. make INSTALLDIRS=vendor %{?_smp_mflags} +# Useful for debugging appliance problems. +echo "==== files in initramfs ====" +find initramfs -type f +echo "==== hostfiles ====" +ls -l appliance/*.supermin.hostfiles +cat appliance/*.supermin.hostfiles +echo "============" + %check # Enable debugging - very useful if a test does fail, although @@ -435,7 +442,7 @@ export LIBGUESTFS_DEBUG=1 # 504273 ppc, ppc64 "no opcode defined" # 505109 ppc, ppc64 "Boot failure! No secondary bootloader specified" # 502058 i386, x86-64 F-11 need to boot with noapic (WORKAROUND ENABLED) -# 502074 i386 F-11 commands segfault randomly +# 502074 i386 all commands segfault randomly # 503236 i386 F-12 cryptomgr_test at doublefault_fn # 507066 all F-12 sequence of chroot calls (FIXED) # 513249 all F-12 guestfwd broken in qemu (FIXED) @@ -446,12 +453,36 @@ export LIBGUESTFS_DEBUG=1 # 548121 all F-13 udevsettle command is broken (WORKAROUND) # 553689 all F-13 missing SeaBIOS (FIXED) # 563103 all F-13 glibc incorrect emulation of preadv/pwritev +# (WORKAROUND using LD_PRELOAD) +# 567567 32-bit all guestfish xstrtol test failure on 32-bit (FIXED) +# 575734 all F-14 microsecond resolution for blkid cache +# (FIXED upstream but still broken in F-14) + +# Workaround #563103 +cat > rhbz563103.c <<'EOF' +#include +#include +#include +ssize_t preadv (int fd,...) { errno = ENOSYS; return -1; } +ssize_t preadv64 (int fd,...) { errno = ENOSYS; return -1; } +ssize_t pwritev (int fd,...) { errno = ENOSYS; return -1; } +ssize_t pwritev64 (int fd,...) { errno = ENOSYS; return -1; } +EOF +gcc -fPIC -c rhbz563103.c +gcc -shared -Wl,-soname,rhbz563103.so.1 rhbz563103.o -o rhbz563103.so +LD_PRELOAD=$(pwd)/rhbz563103.so +export LD_PRELOAD + +# Workaround #575734 in F-14 +export SKIP_TEST_MKE2JOURNAL_U=1 +export SKIP_TEST_MKE2JOURNAL_L=1 + +# Unknown why this fails - could be also #575734. +export SKIP_TEST_SWAPON_LABEL=1 %if %{runtests} -%if 0 make check %endif -%endif %install @@ -579,10 +610,14 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man1/virt-inspector.1* %{_bindir}/virt-list-filesystems %{_mandir}/man1/virt-list-filesystems.1* +%{_bindir}/virt-list-partitions +%{_mandir}/man1/virt-list-partitions.1* %{_bindir}/virt-ls %{_mandir}/man1/virt-ls.1* %{_bindir}/virt-rescue %{_mandir}/man1/virt-rescue.1* +%{_bindir}/virt-resize +%{_mandir}/man1/virt-resize.1* %{_bindir}/virt-tar %{_mandir}/man1/virt-tar.1* %{_bindir}/virt-win-reg @@ -654,6 +689,14 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Apr 8 2010 Richard W.M. Jones - 1:1.2.1-1 +- New upstream stable branch version 1.2.1. +- Includes the new tools virt-list-partitions, virt-resize, and + updated virt-rescue and virt-win-reg (with regedit support). +- Reenable tests. +- Fixes bugs: 580650, 579155, 580246, 579664, 578123, 509597, + 505329, 576876, 576688, 576689, 569757, 567567, 570181. + * Fri Mar 12 2010 Richard W.M. Jones - 1:1.0.85-2.4 - Backport upstream patch to remove dependency on /lib/libntfs-3g.so.N. - The above depends on the bash quoting patch, so apply that first. diff --git a/sources b/sources index a0da15e..97ae114 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -1712af8f2abf7ada2ba973af4968a5ee libguestfs-1.0.85.tar.gz +4b3b98c0a5100566c7eeac647e818f04 libguestfs-1.2.1.tar.gz