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 972df1d..0000000 --- a/libguestfs-1.0.85-weaken-dependency-on-libntfs-3g.patch +++ /dev/null @@ -1,44 +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. - ---- - -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-1.0.87-use-ext4-dev-tools.patch b/libguestfs-1.0.87-use-ext4-dev-tools.patch deleted file mode 100644 index b38bfa6..0000000 --- a/libguestfs-1.0.87-use-ext4-dev-tools.patch +++ /dev/null @@ -1,277 +0,0 @@ -From c4e8aa245a243b020d6b7bd832674be871a43610 Mon Sep 17 00:00:00 2001 -From: Richard Jones -Date: Wed, 24 Mar 2010 22:02:34 +0000 -Subject: [PATCH] Use ext4 dev tools on RHEL 5 (RHBZ#576688). - ---- - daemon/ext2.c | 136 +++++++++++++++++++++++++++++++++++--------------------- - 1 files changed, 85 insertions(+), 51 deletions(-) - -diff --git a/daemon/ext2.c b/daemon/ext2.c -index 85ddce5..ff6459b 100644 ---- a/daemon/ext2.c -+++ b/daemon/ext2.c -@@ -28,6 +28,32 @@ - #include "c-ctype.h" - #include "actions.h" - -+/* Choose which tools like mke2fs to use. For RHEL 5 (only) there -+ * is a special set of tools which support ext2/3/4. eg. On RHEL 5, -+ * mke2fs only supports ext2/3, but mke4fs supports ext2/3/4. -+ * -+ * We specify e4fsprogs in the package list to ensure it is loaded -+ * if it exists. -+ */ -+static int -+e2prog (char *name) -+{ -+ char *p = strstr (name, "e2"); -+ if (!p) return 0; -+ p++; -+ -+ *p = '4'; -+ if (access (name, X_OK) == 0) -+ return 0; -+ -+ *p = '2'; -+ if (access (name, X_OK) == 0) -+ return 0; -+ -+ reply_with_error ("cannot find required program %s", name); -+ return -1; -+} -+ - char ** - do_tune2fs_l (const char *device) - { -@@ -37,7 +63,11 @@ do_tune2fs_l (const char *device) - char **ret = NULL; - int size = 0, alloc = 0; - -- r = command (&out, &err, "/sbin/tune2fs", "-l", device, NULL); -+ char prog[] = "/sbin/tune2fs"; -+ if (e2prog (prog) == -1) -+ return NULL; -+ -+ r = command (&out, &err, prog, "-l", device, NULL); - if (r == -1) { - reply_with_error ("%s", err); - free (err); -@@ -49,7 +79,7 @@ do_tune2fs_l (const char *device) - p = out; - - /* Discard the first line if it contains "tune2fs ...". */ -- if (STREQLEN (p, "tune2fs ", 8)) { -+ if (STRPREFIX (p, "tune2fs ") || STRPREFIX (p, "tune4fs ")) { - p = strchr (p, '\n'); - if (p) p++; - else { -@@ -121,7 +151,11 @@ do_set_e2label (const char *device, const char *label) - int r; - char *err; - -- r = command (NULL, &err, "/sbin/e2label", device, label, NULL); -+ char prog[] = "/sbin/e2label"; -+ if (e2prog (prog) == -1) -+ return -1; -+ -+ r = command (NULL, &err, prog, device, label, NULL); - if (r == -1) { - reply_with_error ("%s", err); - free (err); -@@ -138,7 +172,11 @@ do_get_e2label (const char *device) - int r, len; - char *out, *err; - -- r = command (&out, &err, "/sbin/e2label", device, NULL); -+ char prog[] = "/sbin/e2label"; -+ if (e2prog (prog) == -1) -+ return NULL; -+ -+ r = command (&out, &err, prog, device, NULL); - if (r == -1) { - reply_with_error ("%s", err); - free (out); -@@ -162,7 +200,11 @@ do_set_e2uuid (const char *device, const char *uuid) - int r; - char *err; - -- r = command (NULL, &err, "/sbin/tune2fs", "-U", uuid, device, NULL); -+ char prog[] = "/sbin/tune2fs"; -+ if (e2prog (prog) == -1) -+ return -1; -+ -+ r = command (NULL, &err, prog, "-U", uuid, device, NULL); - if (r == -1) { - reply_with_error ("%s", err); - free (err); -@@ -183,8 +225,11 @@ do_get_e2uuid (const char *device) - * to use tune2fs -l and then look for a particular string in - * the output. - */ -+ char prog[] = "/sbin/tune2fs"; -+ if (e2prog (prog) == -1) -+ return NULL; - -- r = command (&out, &err, "/sbin/tune2fs", "-l", device, NULL); -+ r = command (&out, &err, prog, "-l", device, NULL); - if (r == -1) { - reply_with_error ("%s", err); - free (out); -@@ -240,7 +285,11 @@ do_resize2fs (const char *device) - char *err; - int r; - -- r = command (NULL, &err, "/sbin/resize2fs", device, NULL); -+ char prog[] = "/sbin/resize2fs"; -+ if (e2prog (prog) == -1) -+ return -1; -+ -+ r = command (NULL, &err, prog, device, NULL); - if (r == -1) { - reply_with_error ("%s", err); - free (err); -@@ -257,7 +306,11 @@ do_e2fsck_f (const char *device) - char *err; - int r; - -- r = command (NULL, &err, "/sbin/e2fsck", "-p", "-f", device, NULL); -+ char prog[] = "/sbin/e2fsck"; -+ if (e2prog (prog) == -1) -+ return -1; -+ -+ r = command (NULL, &err, prog, "-p", "-f", device, NULL); - if (r == -1) { - reply_with_error ("%s", err); - free (err); -@@ -274,11 +327,15 @@ do_mke2journal (int blocksize, const char *device) - char *err; - int r; - -+ char prog[] = "/sbin/mke2fs"; -+ if (e2prog (prog) == -1) -+ return -1; -+ - char blocksize_s[32]; - snprintf (blocksize_s, sizeof blocksize_s, "%d", blocksize); - - r = command (NULL, &err, -- "/sbin/mke2fs", "-O", "journal_dev", "-b", blocksize_s, -+ prog, "-O", "journal_dev", "-b", blocksize_s, - device, NULL); - if (r == -1) { - reply_with_error ("%s", err); -@@ -296,11 +353,15 @@ do_mke2journal_L (int blocksize, const char *label, const char *device) - char *err; - int r; - -+ char prog[] = "/sbin/mke2fs"; -+ if (e2prog (prog) == -1) -+ return -1; -+ - char blocksize_s[32]; - snprintf (blocksize_s, sizeof blocksize_s, "%d", blocksize); - - r = command (NULL, &err, -- "/sbin/mke2fs", "-O", "journal_dev", "-b", blocksize_s, -+ prog, "-O", "journal_dev", "-b", blocksize_s, - "-L", label, - device, NULL); - if (r == -1) { -@@ -319,11 +380,15 @@ do_mke2journal_U (int blocksize, const char *uuid, const char *device) - char *err; - int r; - -+ char prog[] = "/sbin/mke2fs"; -+ if (e2prog (prog) == -1) -+ return -1; -+ - char blocksize_s[32]; - snprintf (blocksize_s, sizeof blocksize_s, "%d", blocksize); - - r = command (NULL, &err, -- "/sbin/mke2fs", "-O", "journal_dev", "-b", blocksize_s, -+ prog, "-O", "journal_dev", "-b", blocksize_s, - "-U", uuid, - device, NULL); - if (r == -1) { -@@ -336,40 +401,6 @@ do_mke2journal_U (int blocksize, const char *uuid, const char *device) - return 0; - } - --/* Run mke2fs to create a filesystem of type fstype, where fstype -- * is the string "ext2", "ext3" or "ext4". -- * -- * This is more complex than it seems. -- * -- * On RHEL 5, the -t option was deprecated. Moreover RHEL <= 5.4 -- * systems have a bug where the -t option doesn't work (it doesn't -- * correctly ignore the following argument). -- * -- * On RHEL 5, to create an ext4dev filesystem you have to use -- * the special command /sbin/mke4fs. This can also create ext2/3 -- * using the '-t fstype' option. -- * -- * On Fedora 11+, mke4fs was renamed mke2fs, and it can use the -- * '-t fstype' option to specify the filesystem type. -- * -- * So it seems best to run /sbin/mke4fs if it exists, or /sbin/mke2fs -- * otherwise. We specify e4fsprogs in the package list to ensure it -- * is loaded if it exists. -- */ --static const char * --get_mke2fs (void) --{ -- static const char *const progs[] = { "/sbin/mke4fs", "/sbin/mke2fs", NULL }; -- int i; -- -- for (i = 0; progs[i]; ++i) -- if (access (progs[i], F_OK) == 0) -- return progs[i]; -- -- reply_with_error ("no mke2fs binary found in appliance"); -- return NULL; --} -- - int - do_mke2fs_J (const char *fstype, int blocksize, const char *device, - const char *journal) -@@ -377,8 +408,9 @@ do_mke2fs_J (const char *fstype, int blocksize, const char *device, - char *err; - int r; - -- const char *prog = get_mke2fs (); -- if (!prog) return -1; -+ char prog[] = "/sbin/mke2fs"; -+ if (e2prog (prog) == -1) -+ return -1; - - char blocksize_s[32]; - snprintf (blocksize_s, sizeof blocksize_s, "%d", blocksize); -@@ -407,8 +439,9 @@ do_mke2fs_JL (const char *fstype, int blocksize, const char *device, - char *err; - int r; - -- const char *prog = get_mke2fs (); -- if (!prog) return -1; -+ char prog[] = "/sbin/mke2fs"; -+ if (e2prog (prog) == -1) -+ return -1; - - char blocksize_s[32]; - snprintf (blocksize_s, sizeof blocksize_s, "%d", blocksize); -@@ -437,8 +470,9 @@ do_mke2fs_JU (const char *fstype, int blocksize, const char *device, - char *err; - int r; - -- const char *prog = get_mke2fs (); -- if (!prog) return -1; -+ char prog[] = "/sbin/mke2fs"; -+ if (e2prog (prog) == -1) -+ return -1; - - char blocksize_s[32]; - snprintf (blocksize_s, sizeof blocksize_s, "%d", blocksize); --- -1.6.6.1 - diff --git a/libguestfs.spec b/libguestfs.spec index eb99bde..1e31b52 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: 1%{?dist}.10 +Version: 1.2.2 +Release: 1%{?dist} License: LGPLv2+ Group: Development/Libraries URL: http://libguestfs.org/ @@ -56,25 +56,17 @@ ExclusiveArch: %{ix86} x86_64 # 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 patch to weaken dependency on libntfs-3g. -Patch2: libguestfs-1.0.85-weaken-dependency-on-libntfs-3g.patch - -# Backport patch to use ext4 tools on RHEL 5 (RHBZ#576688). -Patch3: libguestfs-1.0.87-use-ext4-dev-tools.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: mkisofs BuildRequires: libxml2-devel %ifarch %{ix86} x86_64 +# https://fedorahosted.org/rel-eng/ticket/2982#comment:3 BuildRequires: kvm %endif %ifarch ppc ppc64 @@ -132,7 +124,7 @@ BuildRequires: perl-Sys-Virt # Runtime requires: %ifarch %{ix86} x86_64 -Requires: qemu-system-x86 >= 0.10.5 +Requires: kvm %endif %ifarch ppc ppc64 Requires: qemu-system-ppc >= 0.10.5 @@ -232,7 +224,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} @@ -276,11 +268,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 @@ -392,9 +389,6 @@ Requires: jpackage-utils %setup -q %patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 mkdir -p daemon/m4 @@ -456,7 +450,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) @@ -467,6 +461,9 @@ 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 +# 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) # 567567 32-bit all guestfish xstrtol test failure on 32-bit %if %{runtests} @@ -481,12 +478,6 @@ export LIBGUESTFS_DEBUG=1 # guestfsd: error: unknown signature, expected "BYT;" [...] export SKIP_TEST_PART_GET_PARTTYPE=1 -# This fails for unknown reasons: -# /sbin/e4fsck -p -f /dev/VG/LV -# guestfsd: error: [no message sent to stderr] -# This issue is now fixed by upstream commit 00a9ae7365e6bad2. -export SKIP_TEST_LVRESIZE=1 - make check %endif @@ -618,10 +609,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 @@ -693,6 +688,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Apr 12 2010 Richard W.M. Jones - 1:1.2.2-1 +- New upstream stable branch version 1.2.2. + * Wed Mar 31 2010 Richard W.M. Jones - 1:1.0.85-1.el5.10 - BuildRequire kvm on x86 platforms.