From b1f9e5c8c47d1ec823b124863f1808b8f19d2764 Mon Sep 17 00:00:00 2001 From: Richard W.M. Jones Date: Oct 31 2011 12:54:04 +0000 Subject: - New upstream stable branch version 1.12.9. - Remove remaining two non-upstream patches. Upstream contains a full workaround for qemu -machine bugs. --- diff --git a/.gitignore b/.gitignore index de5e7f9..c614f5e 100644 --- a/.gitignore +++ b/.gitignore @@ -94,3 +94,4 @@ libguestfs-1.5.3.tar.gz /libguestfs-1.12.6.tar.gz /libguestfs-1.12.7.tar.gz /libguestfs-1.12.8.tar.gz +/libguestfs-1.12.9.tar.gz diff --git a/0001-Fix-qemu-machine-option-for-latest-qemu-thanks-Marku.patch b/0001-Fix-qemu-machine-option-for-latest-qemu-thanks-Marku.patch deleted file mode 100644 index 7908c70..0000000 --- a/0001-Fix-qemu-machine-option-for-latest-qemu-thanks-Marku.patch +++ /dev/null @@ -1,74 +0,0 @@ -diff -ur libguestfs-1.12.8.old/src/launch.c libguestfs-1.12.8/src/launch.c ---- libguestfs-1.12.8.old/src/launch.c 2011-10-19 18:34:13.000000000 +0100 -+++ libguestfs-1.12.8/src/launch.c 2011-10-19 19:40:28.898547335 +0100 -@@ -76,10 +76,10 @@ - static void print_qemu_command_line (guestfs_h *g, char **argv); - static int connect_unix_socket (guestfs_h *g, const char *sock); - static int qemu_supports (guestfs_h *g, const char *option); -- --#if 0 - static int qemu_supports_re (guestfs_h *g, const pcre *option_regex); - -+static pcre *re_machine_name; -+ - static void compile_regexps (void) __attribute__((constructor)); - static void free_regexps (void) __attribute__((destructor)); - -@@ -97,13 +97,15 @@ - abort (); \ - } \ - } while (0) -+ -+ COMPILE (re_machine_name, "-machine .*\\bname\\b", 0); - } - - static void - free_regexps (void) - { -+ pcre_free (re_machine_name); - } --#endif - - /* Functions to add a string to the current command line. */ - static void -@@ -524,14 +526,19 @@ - if (qemu_supports (g, "-nodefconfig")) - add_cmdline (g, "-nodefconfig"); - -- /* The qemu -machine option (added 2010-12) is a bit more sane -- * since it falls back through various different acceleration -- * modes, so try that first (thanks Markus Armbruster). -+ /* The qemu -machine option (added 2010-12) falls back through -+ * various different acceleration modes, so try that first (thanks -+ * Markus Armbruster). However in qemu commit 9052ea6bf4962b13 -+ * the syntax was changed, so we have to detect that. - */ -- if (qemu_supports (g, "-machine")) { -+ if (qemu_supports_re (g, re_machine_name)) { /* after 2011-07-23 */ -+ add_cmdline (g, "-machine"); -+ add_cmdline (g, "pc,accel=kvm:tcg"); -+ } -+ else if (qemu_supports (g, "-machine")) { /* after 2010-12 */ - add_cmdline (g, "-machine"); - add_cmdline (g, "accel=kvm:tcg"); -- } else { -+ } else { /* no -machine option */ - /* qemu sometimes needs this option to enable hardware - * virtualization, but some versions of 'qemu-kvm' will use KVM - * regardless (even where this option appears in the help text). -@@ -1173,7 +1180,6 @@ - return strstr (g->qemu_help, option) != NULL; - } - --#if 0 - /* As above but using a regex instead of a fixed string. */ - static int - qemu_supports_re (guestfs_h *g, const pcre *option_regex) -@@ -1185,7 +1191,6 @@ - - return match (g, g->qemu_help, option_regex); - } --#endif - - /* Check if a file can be opened. */ - static int diff --git a/libguestfs-1.12.0-configure-force-machine-accel-tcg.patch b/libguestfs-1.12.0-configure-force-machine-accel-tcg.patch deleted file mode 100644 index a63ec6d..0000000 --- a/libguestfs-1.12.0-configure-force-machine-accel-tcg.patch +++ /dev/null @@ -1,25 +0,0 @@ -Only in libguestfs-1.12.0: autom4te.cache -diff -ur libguestfs-1.12.0.old/configure libguestfs-1.12.0/configure ---- libguestfs-1.12.0.old/configure 2011-07-20 16:40:27.000000000 +0100 -+++ libguestfs-1.12.0/configure 2011-07-20 18:48:50.261315374 +0100 -@@ -36849,7 +36849,7 @@ - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for virtio-serial support in $QEMU" >&5 - $as_echo_n "checking for virtio-serial support in $QEMU... " >&6; } -- if $QEMU -nographic -device \? 2>&1 | grep -sq virtio-serial; then -+ if $QEMU -machine accel=tcg -nographic -device \? 2>&1 | grep -sq virtio-serial; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 - $as_echo "yes" >&6; } - else -diff -ur libguestfs-1.12.0.old/configure.ac libguestfs-1.12.0/configure.ac ---- libguestfs-1.12.0.old/configure.ac 2011-07-20 16:35:50.000000000 +0100 -+++ libguestfs-1.12.0/configure.ac 2011-07-20 18:48:41.251139811 +0100 -@@ -326,7 +326,7 @@ - fi - - AC_MSG_CHECKING([for virtio-serial support in $QEMU]) -- if $QEMU -nographic -device \? 2>&1 | grep -sq virtio-serial; then -+ if $QEMU -machine accel=tcg -nographic -device \? 2>&1 | grep -sq virtio-serial; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) diff --git a/libguestfs.spec b/libguestfs.spec index 5bb067e..80dfee7 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -29,7 +29,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 -Version: 1.12.8 +Version: 1.12.9 Release: 1%{?dist} License: LGPLv2+ Group: Development/Libraries @@ -37,16 +37,6 @@ URL: http://libguestfs.org/ Source0: http://libguestfs.org/download/1.12-stable/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root -%if 0%{?fedora} >= 16 -# Force qemu-kvm test to run with -machine accel=tcg flag. -Patch0: libguestfs-1.12.0-configure-force-machine-accel-tcg.patch - -# Non-upstream patch to fix -machine option. This is not upstream -# because qemu look like they might revert (ie. fix) the -machine -# option so that this patch would not be needed. -Patch1: 0001-Fix-qemu-machine-option-for-latest-qemu-thanks-Marku.patch -%endif - # Basic build requirements: BuildRequires: /usr/bin/pod2man BuildRequires: /usr/bin/pod2text @@ -501,11 +491,6 @@ for %{name}. %prep %setup -q -%if 0%{?fedora} >= 16 -%patch0 -p1 -%patch1 -p1 -%endif - mkdir -p daemon/m4 # Replace developer-specific README that ships with libguestfs, with @@ -867,6 +852,11 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Oct 31 2011 Richard W.M. Jones - 1:1.12.9-1 +- New upstream stable branch version 1.12.9. +- Remove remaining two non-upstream patches. Upstream contains a full + workaround for qemu -machine bugs. + * Wed Oct 19 2011 Richard W.M. Jones - 1:1.12.8-1 - New upstream stable branch version 1.12.8. - Remove patch for skipping FUSE tests. 1.12.8 includes a backport diff --git a/sources b/sources index e42cac8..7c78dba 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -676a1fd2d990e207def4ee6c53f37563 libguestfs-1.12.8.tar.gz +bec3625a6ad88dab88e8d61e487e81b5 libguestfs-1.12.9.tar.gz