- Update to version 1.20.2

* proto: Fix stack overflow when there are many progress events (RHBZ#909624).
  * rescue: Count the mountable filesystems when displaying the 'suggest' message.
  * lib: Define CLEANUP_CMD_CLOSE macro and use it throughout the library.
  * lib: Allow guestfs_free_* functions to be safely called with a NULL pointer.
  * btrfs: Fix btrfs_subvolume_list on F18 (RHBZ#903620).
  * daemon: Check parameter of base64-out and tar-out before running external command (RHBZ#908322).
  * daemon: download: Add extra check that download file is not a directory (RHBZ#908321).
  * daemon: Add more information to certain calls to perror.
  * daemon: Call wipefs before mkfs to work around pathological behaviour in btrfs.
  * lib: Add CLEANUP_* macros which automatically free things when leaving scope.
  * header: Deprecate LIBGUESTFS_HAVE_* in favour of GUESTFS_HAVE_*.
  * fuse: Use guestfs_rename to implement rename(2) syscall (RHBZ#895910).
  * New API: rename: Rename file within the same filesystem (RHBZ#895910).
  * fuse: If guestfs_last_errno returns 0, don't return no error to FUSE layer.
  * daemon: Change ln, ln-f (hard-link) APIs to use link(2) instead of external ln (RHBZ#895905).
  * Fix checksums-out command (RHBZ#895904).
  * launch: appliance: Fix parsing of QEMU_OPTIONS.
  * launch: appliance: Small refactoring of virtio-scsi detection code.

- enable ruby bindings only in 12.2 or later, ruby is too fragile

OBS-URL: https://build.opensuse.org/package/show/Virtualization/libguestfs?expand=0&rev=190
This commit is contained in:
Olaf Hering 2013-02-25 20:54:52 +00:00 committed by Git OBS Bridge
parent 63ec84ea32
commit 518efff326
12 changed files with 183 additions and 351 deletions

View File

@ -0,0 +1,46 @@
From a1c89bf03dd432f0e4c8c26fe01fd9b2a50df97e Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 19 Feb 2013 15:37:18 +0000
Subject: [PATCH] build: Only add 'serial-tests' for automake >= 1.12 (thanks
Hilko Bengen).
Earlier versions of automake complain if they get a configuration
parameter which they don't understand. The error is:
configure.ac:27: error: option 'serial-tests' not recognized
Use some m4 hackery to work around this.
---
configure.ac | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 105b2e7..d4495bf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -24,7 +24,24 @@ m4_define([libguestfs_release], [11])
AC_INIT([libguestfs],libguestfs_major.libguestfs_minor.libguestfs_release)
AC_CONFIG_AUX_DIR([build-aux])
-AM_INIT_AUTOMAKE([foreign serial-tests])
+
+dnl Initialize automake. automake < 1.12 didn't have serial-tests and
+dnl gives an error if it sees this, but for automake >= 1.13
+dnl serial-tests is required so we have to include it. Solution is to
+dnl test for the version of automake (by running an external command)
+dnl and provide it if necessary. Note we have to do this entirely using
+dnl m4 macros since automake queries this macro by running
+dnl 'autoconf --trace'.
+m4_define([serial_tests], [
+ m4_esyscmd([automake --version | head -1 | awk '
+ {
+ split ($NF, version, ".");
+ if (version[1] == 1 && version[2] >= 12)
+ print "serial-tests";
+ }'
+ ])
+])
+AM_INIT_AUTOMAKE(foreign serial_tests) dnl NB: Do not [quote] this parameter.
m4_ifndef([AM_SILENT_RULES], [m4_define([AM_SILENT_RULES],[])])
AM_SILENT_RULES([yes]) # make --enable-silent-rules the default.

View File

@ -1,53 +0,0 @@
From 9fd41abd40c3ffc10985e862dc34c868360a1b22 Mon Sep 17 00:00:00 2001
From: Olaf Hering <olaf@aepfle.de>
Date: Wed, 2 Jan 2013 16:13:06 +0100
Subject: [PATCH] daemon: copy entire lvm directory
cp will fail if /etc/lvm is an empty directory. Copy the entire
directory and adjust environment variable.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
RWMJ:
- Fixed a couple of whitespace issues.
---
daemon/lvm-filter.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/daemon/lvm-filter.c b/daemon/lvm-filter.c
index 52d6b3d..fddf816 100644
--- a/daemon/lvm-filter.c
+++ b/daemon/lvm-filter.c
@@ -47,7 +47,7 @@ void
copy_lvm (void)
{
struct stat statbuf;
- char cmd[64];
+ char cmd[64], env[64];
int r;
/* If /etc/lvm directory doesn't exist (or isn't a directory) assume
@@ -68,8 +68,8 @@ copy_lvm (void)
exit (EXIT_FAILURE);
}
- /* Hopefully no dotfiles in there ... XXX */
- snprintf (cmd, sizeof cmd, "%s -a /etc/lvm/* %s", str_cp, lvm_system_dir);
+ /* Copy the entire directory */
+ snprintf (cmd, sizeof cmd, "%s -a /etc/lvm/ %s", str_cp, lvm_system_dir);
r = system (cmd);
if (r == -1) {
perror (cmd);
@@ -85,7 +85,8 @@ copy_lvm (void)
}
/* Set environment variable so we use the copy. */
- setenv ("LVM_SYSTEM_DIR", lvm_system_dir, 1);
+ snprintf (env, sizeof env, "%s/lvm", lvm_system_dir);
+ setenv ("LVM_SYSTEM_DIR", env, 1);
/* Set a handler to remove the temporary directory at exit. */
atexit (rm_lvm_system_dir);
--
1.8.0.1

View File

@ -1,56 +0,0 @@
From d8f14591d10df847fad2e24f2f430b2543020912 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Fri, 18 Jan 2013 07:11:13 +0000
Subject: [PATCH] daemon: lvm: Fix various paths relative to new
lvm_system_dir.
This fixes commit 9fd41abd40c3ffc10985e862dc34c868360a1b22.
---
daemon/lvm-filter.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/daemon/lvm-filter.c b/daemon/lvm-filter.c
index fddf816..0048f29 100644
--- a/daemon/lvm-filter.c
+++ b/daemon/lvm-filter.c
@@ -37,7 +37,13 @@ GUESTFSD_EXT_CMD(str_rm, rm);
/* This runs during daemon start up and creates a complete copy of
* /etc/lvm so that we can modify it as we desire. We set
- * LVM_SYSTEM_DIR to point to the copy.
+ * LVM_SYSTEM_DIR to point to the copy. Note that the final directory
+ * layout is:
+ * /tmp/lvmXXXXXX (lvm_system_dir set to this)
+ * /tmp/lvmXXXXXX/lvm ($LVM_SYSTEM_DIR set to this)
+ * /tmp/lvmXXXXXX/lvm/lvm.conf (configuration file)
+ * /tmp/lvmXXXXXX/lvm/cache
+ * etc.
*/
static char lvm_system_dir[] = "/tmp/lvmXXXXXX";
@@ -130,10 +136,11 @@ static int
set_filter (const char *filter)
{
char lvm_conf[64];
- snprintf (lvm_conf, sizeof lvm_conf, "%s/lvm.conf", lvm_system_dir);
+ snprintf (lvm_conf, sizeof lvm_conf, "%s/lvm/lvm.conf", lvm_system_dir);
char lvm_conf_new[64];
- snprintf (lvm_conf_new, sizeof lvm_conf, "%s/lvm.conf.new", lvm_system_dir);
+ snprintf (lvm_conf_new, sizeof lvm_conf, "%s/lvm/lvm.conf.new",
+ lvm_system_dir);
FILE *ifp = fopen (lvm_conf, "r");
if (ifp == NULL) {
@@ -224,7 +231,7 @@ static int
rescan (void)
{
char lvm_cache[64];
- snprintf (lvm_cache, sizeof lvm_cache, "%s/cache/.cache", lvm_system_dir);
+ snprintf (lvm_cache, sizeof lvm_cache, "%s/lvm/cache/.cache", lvm_system_dir);
unlink (lvm_cache);
--
1.8.0.1

View File

@ -0,0 +1,38 @@
From 8a06055533023aea942cdce548e0befaf7562ebc Mon Sep 17 00:00:00 2001
From: Olaf Hering <olaf@aepfle.de>
Date: Mon, 25 Feb 2013 10:53:24 +0100
Subject: [PATCH] lib: avoid pragma usage in inspect-fs-windows
pragma GCC diagnostic is a gcc 4.6+ feature, compilation fails with
older compilers:
inspect-fs-windows.c: In function 'map_registry_disk_blob':
inspect-fs-windows.c:502: error: #pragma GCC diagnostic not allowed inside functions
inspect-fs-windows.c:503: error: #pragma GCC diagnostic not allowed inside functions
inspect-fs-windows.c:505: error: #pragma GCC diagnostic not allowed inside functions
make[3]: *** [libguestfs_la-inspect-fs-windows.lo] Error 1
Use memcpy instead of pragma to fix compile error.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
src/inspect-fs-windows.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/inspect-fs-windows.c b/src/inspect-fs-windows.c
index 346cc55..68ae97c 100644
--- a/src/inspect-fs-windows.c
+++ b/src/inspect-fs-windows.c
@@ -499,10 +499,8 @@ map_registry_disk_blob (guestfs_h *g, const void *blob)
* Note deliberate cast-align violation here since the data is in a
* very odd place within the blob. Thanks Microsoft!
*/
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wcast-align"
- part_offset = le64toh (* (uint64_t *) ((char *) blob + 4));
-#pragma GCC diagnostic pop
+ memcpy(&part_offset, (char *) blob + 4, sizeof(part_offset));
+ part_offset = le64toh (part_offset);
partitions = guestfs_part_list (g, devices[i]);
if (partitions == NULL)

View File

@ -0,0 +1,40 @@
From ff0269e80fcd2031afa7d48e414b7ca7e1ef4d7a Mon Sep 17 00:00:00 2001
From: Hilko Bengen <bengen@hilluzination.de>
Date: Mon, 18 Feb 2013 22:43:41 +0100
Subject: [PATCH] out-of-tree build: fix test-tool
(Not entirely sure whether using Gnulib to replace standard functions
is a good idea at all.)
link with libgnu:
CCLD libguestfs-test-tool
libguestfs_test_tool-test-tool.o: In function `main':
/home/bengen/src/deb/pkg-libvirt/libguestfs/debian/build-default/test-tool/../../../test-tool/test-tool.c:103: undefined reference to `rpl_getopt_long'
/home/bengen/src/deb/pkg-libvirt/libguestfs/debian/build-default/test-tool/../../../test-tool/test-tool.c:113: undefined reference to `rpl_optarg'
/home/bengen/src/deb/pkg-libvirt/libguestfs/debian/build-default/test-tool/../../../test-tool/test-tool.c:125: undefined reference to `rpl_optarg'
/home/bengen/src/deb/pkg-libvirt/libguestfs/debian/build-default/test-tool/../../../test-tool/test-tool.c:126: undefined reference to `rpl_optarg'
/home/bengen/src/deb/pkg-libvirt/libguestfs/debian/build-default/test-tool/../../../test-tool/test-tool.c:109: undefined reference to `rpl_optarg'
libguestfs_test_tool-test-tool.o: In function `set_qemu':
/home/bengen/src/deb/pkg-libvirt/libguestfs/debian/build-default/test-tool/../../../test-tool/test-tool.c:382: undefined reference to `rpl_perror'
/home/bengen/src/deb/pkg-libvirt/libguestfs/debian/build-default/test-tool/../../../test-tool/test-tool.c:366: undefined reference to `rpl_perror'
libguestfs_test_tool-test-tool.o: In function `make_files':
/home/bengen/src/deb/pkg-libvirt/libguestfs/debian/build-default/test-tool/../../../test-tool/test-tool.c:416: undefined reference to `rpl_perror'
/home/bengen/src/deb/pkg-libvirt/libguestfs/debian/build-default/test-tool/../../../test-tool/test-tool.c:428: undefined reference to `rpl_perror'
---
test-tool/Makefile.am | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/test-tool/Makefile.am b/test-tool/Makefile.am
index 200f2cb..bb2e03c 100644
--- a/test-tool/Makefile.am
+++ b/test-tool/Makefile.am
@@ -37,7 +37,8 @@ libguestfs_test_tool_CFLAGS = \
$(GPROF_CFLAGS) $(GCOV_CFLAGS)
libguestfs_test_tool_LDADD = \
- $(top_builddir)/src/libguestfs.la
+ $(top_builddir)/src/libguestfs.la \
+ $(top_builddir)/gnulib/lib/libgnu.la
libguestfs-test-tool.1 $(top_builddir)/html/libguestfs-test-tool.1.html: stamp-libguestfs-test-tool.pod

View File

@ -1,188 +0,0 @@
From 448a02373df95dafc0d4b3e4db0e77c96a09074d Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Sat, 15 Dec 2012 18:14:05 +0000
Subject: [PATCH] ruby: Enable C compiler warnings.
This has the desirable side effect that the correct CFLAGS get passed
to the C compiler when building the Ruby extension.
---
.gitignore | 1 +
configure.ac | 1 +
generator/ruby.ml | 12 ++++++++++--
ruby/Makefile.am | 8 ++++----
ruby/ext/guestfs/extconf.rb | 33 ---------------------------------
ruby/ext/guestfs/extconf.rb.in | 37 +++++++++++++++++++++++++++++++++++++
6 files changed, 53 insertions(+), 39 deletions(-)
delete mode 100644 ruby/ext/guestfs/extconf.rb
create mode 100644 ruby/ext/guestfs/extconf.rb.in
diff --git a/.gitignore b/.gitignore
index 3873a19..6ee66e3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -344,6 +344,7 @@ Makefile.in
/ruby/examples/guestfs-ruby.3
/ruby/examples/stamp-guestfs-ruby.pod
/ruby/ext/guestfs/extconf.h
+/ruby/ext/guestfs/extconf.rb
/ruby/ext/guestfs/_guestfs.bundle
/ruby/ext/guestfs/_guestfs.c
/ruby/ext/guestfs/_guestfs.so
diff --git a/configure.ac b/configure.ac
index 41f1760..8cc2fbf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1464,6 +1464,7 @@ AC_CONFIG_FILES([Makefile
ruby/Makefile
ruby/Rakefile
ruby/examples/Makefile
+ ruby/ext/guestfs/extconf.rb
sparsify/Makefile
src/Makefile
src/libguestfs.pc
diff --git a/generator/ruby.ml b/generator/ruby.ml
index daf94a5..7033713 100644
--- a/generator/ruby.ml
+++ b/generator/ruby.ml
@@ -413,6 +413,11 @@ ruby_user_cancel (VALUE gv)
let doc = String.concat "\n * " doc in
let doc = trim doc in
+ (* Because Ruby documentation appears as C comments, we must
+ * replace any instance of "/*".
+ *)
+ let doc = replace_str doc "/*" "/ *" in
+
let args = List.map name_of_argt args in
let args = if optargs <> [] then args @ ["{optargs...}"] else args in
let args = String.concat ", " args in
@@ -667,15 +672,18 @@ ruby_user_cancel (VALUE gv)
) all_functions;
pr "\
+extern void Init__guestfs (void); /* keep GCC warnings happy */
+
/* Initialize the module. */
-void Init__guestfs ()
+void
+Init__guestfs (void)
{
m_guestfs = rb_define_module (\"Guestfs\");
c_guestfs = rb_define_class_under (m_guestfs, \"Guestfs\", rb_cObject);
e_Error = rb_define_class_under (m_guestfs, \"Error\", rb_eStandardError);
#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
- rb_define_alloc_func (c_guestfs, ruby_guestfs_create);
+ rb_define_alloc_func (c_guestfs, (rb_alloc_func_t) ruby_guestfs_create);
#endif
rb_define_module_function (m_guestfs, \"create\", ruby_guestfs_create, -1);
diff --git a/ruby/Makefile.am b/ruby/Makefile.am
index 37eb3f3..5b755e5 100644
--- a/ruby/Makefile.am
+++ b/ruby/Makefile.am
@@ -47,10 +47,6 @@ CLEANFILES = \
if HAVE_RUBY
-TESTS = run-bindtests run-ruby-tests
-
-TESTS_ENVIRONMENT = $(top_builddir)/run --test
-
all: $(generator_built)
$(RAKE) build
$(RAKE) rdoc
@@ -64,4 +60,8 @@ install:
$(INSTALL) -p -m 0644 $(srcdir)/lib/guestfs.rb $(DESTDIR)$(RUBY_SITELIB)
$(INSTALL) -p -m 0755 $(builddir)/ext/guestfs/_guestfs.so $(DESTDIR)$(RUBY_SITEARCH)
+TESTS = run-bindtests run-ruby-tests
+
+TESTS_ENVIRONMENT = $(top_builddir)/run --test
+
endif
diff --git a/ruby/ext/guestfs/extconf.rb b/ruby/ext/guestfs/extconf.rb
deleted file mode 100644
index d86e26d..0000000
--- a/ruby/ext/guestfs/extconf.rb
+++ /dev/null
@@ -1,33 +0,0 @@
-# libguestfs Ruby bindings -*- ruby -*-
-# @configure_input@
-# Copyright (C) 2009 Red Hat Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-require 'mkmf'
-
-extension_name = '_guestfs'
-
-dir_config(extension_name)
-
-unless have_header("guestfs.h")
- raise "<guestfs.h> not found"
-end
-unless have_library("guestfs", "guestfs_create", "guestfs.h")
- raise "libguestfs not found"
-end
-
-create_header
-create_makefile(extension_name)
diff --git a/ruby/ext/guestfs/extconf.rb.in b/ruby/ext/guestfs/extconf.rb.in
new file mode 100644
index 0000000..15259ea
--- /dev/null
+++ b/ruby/ext/guestfs/extconf.rb.in
@@ -0,0 +1,37 @@
+# libguestfs Ruby bindings -*- ruby -*-
+# @configure_input@
+# Copyright (C) 2009-2012 Red Hat Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+require 'mkmf'
+
+extension_name = '_guestfs'
+
+dir_config(extension_name)
+
+unless have_header("guestfs.h")
+ raise "<guestfs.h> not found"
+end
+unless have_library("guestfs", "guestfs_create", "guestfs.h")
+ raise "libguestfs not found"
+end
+
+$CFLAGS =
+ "#{$CFLAGS} @CFLAGS@ -DGUESTFS_PRIVATE_FUNCTIONS=1 " <<
+ "@WARN_CFLAGS@ @WERROR_CFLAGS@"
+
+create_header
+create_makefile(extension_name)
--
1.8.0.1

View File

@ -1,4 +1,4 @@
From 1b0c7cedf7020a0ac20c60c25f9ca1822768be40 Mon Sep 17 00:00:00 2001
From f010abe024b47057f814e369b7b647e52d001019 Mon Sep 17 00:00:00 2001
From: Olaf Hering <olaf@aepfle.de>
Date: Mon, 3 Sep 2012 19:50:44 +0200
Subject: [PATCH] force virtio_blk in old guest kernel
@ -69,7 +69,7 @@ index 5729dd4..fb33ca1 100644
len = strlen (ret);
if (part_num > 0)
diff --git a/fish/options.c b/fish/options.c
index 40671b5..8a7b8cf 100644
index 384ef43..74703ca 100644
--- a/fish/options.c
+++ b/fish/options.c
@@ -27,6 +27,8 @@
@ -101,10 +101,10 @@ index 40671b5..8a7b8cf 100644
exit (EXIT_FAILURE);
}
diff --git a/src/guestfs-internal.h b/src/guestfs-internal.h
index df52f74..471a467 100644
index 49341e2..1303a7e 100644
--- a/src/guestfs-internal.h
+++ b/src/guestfs-internal.h
@@ -354,6 +354,8 @@ struct guestfs_h
@@ -318,6 +318,8 @@ struct guestfs_h
virDomainPtr dom; /* libvirt domain */
} virt;
#endif
@ -114,7 +114,7 @@ index df52f74..471a467 100644
/* Per-filesystem data stored for inspect_os. */
diff --git a/src/handle.c b/src/handle.c
index 685571a..efcbcf4 100644
index cb00a2e..b0d75c1 100644
--- a/src/handle.c
+++ b/src/handle.c
@@ -215,6 +215,22 @@ parse_environment (guestfs_h *g,
@ -141,10 +141,10 @@ index 685571a..efcbcf4 100644
}
diff --git a/src/inspect-fs-unix.c b/src/inspect-fs-unix.c
index 8d3e6b0..97b355b 100644
index 40f797d..45d50ee 100644
--- a/src/inspect-fs-unix.c
+++ b/src/inspect-fs-unix.c
@@ -1412,7 +1412,7 @@ resolve_fstab_device_diskbyid (guestfs_h *g, const char *part,
@@ -1370,7 +1370,7 @@ resolve_fstab_device_diskbyid (guestfs_h *g, const char *part,
return 0;
/* Make the partition name and check it exists. */
@ -153,7 +153,7 @@ index 8d3e6b0..97b355b 100644
if (!is_partition (g, device)) {
free (device);
return 0;
@@ -1489,7 +1489,7 @@ resolve_fstab_device (guestfs_h *g, const char *spec, Hash_table *md_map)
@@ -1447,7 +1447,7 @@ resolve_fstab_device (guestfs_h *g, const char *spec, Hash_table *md_map)
if (disk_i != -1 && disk_i <= 26 &&
slice_i > 0 && slice_i <= 1 /* > 4 .. see comment above */ &&
part_i >= 0 && part_i < 26) {
@ -163,10 +163,10 @@ index 8d3e6b0..97b355b 100644
}
else if ((part = match1 (g, spec, re_diskbyid)) != NULL) {
diff --git a/src/launch-appliance.c b/src/launch-appliance.c
index 4f21db7..e8e91d5 100644
index a86a8cc..1067d17 100644
--- a/src/launch-appliance.c
+++ b/src/launch-appliance.c
@@ -940,6 +940,9 @@ qemu_supports_virtio_scsi (guestfs_h *g)
@@ -935,6 +935,9 @@ qemu_supports_virtio_scsi (guestfs_h *g)
}
}
@ -177,10 +177,10 @@ index 4f21db7..e8e91d5 100644
}
diff --git a/src/launch-libvirt.c b/src/launch-libvirt.c
index 2a3bc7f..d23edf5 100644
index 6ad19de..b8efc4f 100644
--- a/src/launch-libvirt.c
+++ b/src/launch-libvirt.c
@@ -175,6 +175,13 @@ launch_libvirt (guestfs_h *g, const char *libvirt_uri)
@@ -177,6 +177,13 @@ launch_libvirt (guestfs_h *g, const char *libvirt_uri)
return -1;
}
@ -195,13 +195,13 @@ index 2a3bc7f..d23edf5 100644
TRACE0 (launch_libvirt_start);
diff --git a/test-tool/test-tool.c b/test-tool/test-tool.c
index 9db086b..d44b9fa 100644
index d71caed..58cc885 100644
--- a/test-tool/test-tool.c
+++ b/test-tool/test-tool.c
@@ -103,6 +103,16 @@ main (int argc, char *argv[])
int i;
struct guestfs_version *vers;
char *p;
@@ -95,6 +95,16 @@ main (int argc, char *argv[])
guestfs_h *g;
char *qemu = NULL;
int qemu_use_wrapper;
+ char *disk_name, *partition_name;
+ int use_virtio_blk = 0;
+
@ -215,7 +215,7 @@ index 9db086b..d44b9fa 100644
for (;;) {
c = getopt_long (argc, argv, options, long_options, &option_index);
@@ -275,19 +285,19 @@ main (int argc, char *argv[])
@@ -281,19 +291,19 @@ main (int argc, char *argv[])
fflush (stdout);
/* Create the filesystem and mount everything. */
@ -238,6 +238,3 @@ index 9db086b..d44b9fa 100644
fprintf (stderr,
_("libguestfs-test-tool: failed to mount /dev/sda1 on /\n"));
exit (EXIT_FAILURE);
--
1.8.0.1

View File

@ -1,22 +0,0 @@
[ 478s] ERROR: RPATH "/usr/src/packages/BUILD/libguestfs-1.19.36/src/.libs" on /usr/src/packages/BUILDROOT/libguestfs-1.19.36-0.x86_64/usr/lib64/ruby/site_ruby/1.8/x86_64-linux/_guestfs.so is not allowed
[ 478s] ERROR: RPATH "/usr/src/packages/BUILD/libguestfs-1.19.36/src/.libs" on /usr/src/packages/BUILDROOT/libguestfs-1.19.36-0.x86_64/usr/lib64/ruby/site_ruby/1.8/x86_64-linux/_guestfs.so is not allowed
---
ruby/Makefile.am | 4 ++++
1 file changed, 4 insertions(+)
Index: libguestfs-1.19.36/ruby/Makefile.am
===================================================================
--- libguestfs-1.19.36.orig/ruby/Makefile.am
+++ libguestfs-1.19.36/ruby/Makefile.am
@@ -53,6 +53,10 @@ TESTS_ENVIRONMENT = $(top_builddir)/run
all: $(generator_built)
$(RAKE) build
+ sed -i 's|-Wl,-R\ -Wl,\$$(libdir)||' $(top_builddir)/ruby/ext/guestfs/Makefile
+ sed -i 's|-Wl,-R\$$(libdir)||' $(top_builddir)/ruby/ext/guestfs/Makefile
+ sed -i 's|-Wl,-R[^[:blank:]]*/src/.libs||' $(top_builddir)/ruby/ext/guestfs/Makefile
+ make -C $(top_builddir)/ruby/ext/guestfs clean all
$(RAKE) rdoc
RUBY_SITELIB := $(shell $(RUBY) -rrbconfig -e "puts RbConfig::CONFIG['sitelibdir']")

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c1891c68b1c11e009bf8914fe6fe97f6fc95674d483ad8142199e36e8bc57064
size 9308704

3
libguestfs-1.20.2.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d1c95b8ba5454d9bf6b0d239c0e6e8711a102bec1aabb5d03c8101725eafeb81
size 9487688

View File

@ -1,3 +1,31 @@
-------------------------------------------------------------------
Mon Feb 25 21:51:17 CET 2013 - ohering@suse.de
- Update to version 1.20.2
* proto: Fix stack overflow when there are many progress events (RHBZ#909624).
* rescue: Count the mountable filesystems when displaying the 'suggest' message.
* lib: Define CLEANUP_CMD_CLOSE macro and use it throughout the library.
* lib: Allow guestfs_free_* functions to be safely called with a NULL pointer.
* btrfs: Fix btrfs_subvolume_list on F18 (RHBZ#903620).
* daemon: Check parameter of base64-out and tar-out before running external command (RHBZ#908322).
* daemon: download: Add extra check that download file is not a directory (RHBZ#908321).
* daemon: Add more information to certain calls to perror.
* daemon: Call wipefs before mkfs to work around pathological behaviour in btrfs.
* lib: Add CLEANUP_* macros which automatically free things when leaving scope.
* header: Deprecate LIBGUESTFS_HAVE_* in favour of GUESTFS_HAVE_*.
* fuse: Use guestfs_rename to implement rename(2) syscall (RHBZ#895910).
* New API: rename: Rename file within the same filesystem (RHBZ#895910).
* fuse: If guestfs_last_errno returns 0, don't return no error to FUSE layer.
* daemon: Change ln, ln-f (hard-link) APIs to use link(2) instead of external ln (RHBZ#895905).
* Fix checksums-out command (RHBZ#895904).
* launch: appliance: Fix parsing of QEMU_OPTIONS.
* launch: appliance: Small refactoring of virtio-scsi detection code.
-------------------------------------------------------------------
Mon Feb 25 20:11:27 CET 2013 - ohering@suse.de
- enable ruby bindings only in 12.2 or later, ruby is too fragile
-------------------------------------------------------------------
Sun Feb 24 18:11:07 CET 2013 - ohering@suse.de

View File

@ -29,7 +29,11 @@
%define with_lua_bindings 1
%define with_python_bindings 1
%define with_perl_bindings 1
%if %suse_version > 1210
%define with_ruby_bindings 1
%else
%define with_ruby_bindings 0
%endif
%define with_fuse 1
%define with_hivex 1
%define with_zerofree 1
@ -127,12 +131,11 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
Summary: Compatibility package for guestfs-tools
License: GPL-2
Group: System/Filesystems
Version: 1.20.1
Version: 1.20.2
Release: 0
Patch795503: 0001-daemon-copy-entire-lvm-directory.patch
Patch7955032: 0001-daemon-lvm-Fix-various-paths-relative-to-new-lvm_sys.patch
Patch1: 0001-ruby-Enable-C-compiler-warnings.patch
Patch5: libguestfs-1.13.14-ruby.patch
Patch0: 0001-build-Only-add-serial-tests-for-automake-1.12-thanks.patch
Patch1: 0001-lib-avoid-pragma-usage-in-inspect-fs-windows.patch
Patch2: 0001-out-of-tree-build-fix-test-tool.patch
Patch1000: 1000-force-virtio_blk-in-old-guest-kernel.patch
Source0: %{name}-%{version}.tar.gz
Source789653: Pod-Simple-3.23.tar.gz
@ -413,10 +416,9 @@ virtual machines.
%prep
: _ignore_exclusive_arch '%{?_ignore_exclusive_arch}'
%setup -q -a 789653
%patch795503 -p1
%patch7955032 -p1
%patch0 -p1
%patch1 -p1
%patch5 -p1
%patch2 -p1
%patch1000 -p1
%build