Pino Toscano | 18 Apr 11:45 2014
Picon

[PATCH 1/2] ruby: tests: isolate boilerplate in common file

Isolate in a common file all the standard boilerplate in tests, i.e. the
import of the test framework and the guestfs module (including the
import path hack needed for the latter).

Thanks to Vít Ondruch for the precious hints and suggestions.
---
 ruby/Makefile.am                   |  3 ++-
 ruby/t/tc_010_load.rb              |  5 +----
 ruby/t/tc_020_create.rb            |  5 +----
 ruby/t/tc_030_create_flags.rb      |  7 ++-----
 ruby/t/tc_040_create_multiple.rb   |  7 ++-----
 ruby/t/tc_050_handle_properties.rb |  7 ++-----
 ruby/t/tc_060_explicit_close.rb    |  7 ++-----
 ruby/t/tc_070_optargs.rb           |  7 ++-----
 ruby/t/tc_100_launch.rb            |  5 +----
 ruby/t/tc_410_close_event.rb       |  5 +----
 ruby/t/tc_420_log_messages.rb      |  5 +----
 ruby/t/tc_800_rhbz507346.rb        |  7 ++-----
 ruby/t/tc_810_rhbz664558c6.rb      |  7 ++-----
 ruby/t/tc_820_rhbz1046509.rb       |  7 ++-----
 ruby/t/test_helper.rb              | 22 ++++++++++++++++++++++
 15 files changed, 45 insertions(+), 61 deletions(-)
 create mode 100644 ruby/t/test_helper.rb

diff --git a/ruby/Makefile.am b/ruby/Makefile.am
index 8c96844..f605188 100644
--- a/ruby/Makefile.am
+++ b/ruby/Makefile.am
 <at>  <at>  -29,7 +29,8  <at>  <at>  EXTRA_DIST = \
 	lib/guestfs.rb \
(Continue reading)

Pino Toscano | 17 Apr 11:38 2014
Picon

[PATCH] daemon: parted: part-get-name: switch from sgdisk to parted (RHBZ#1088424).

Use parted to get the name of partitions in GPT layouts instead of
sgdisk, to reduce the possible discrepancy between output of tools.

The actual case here is that recent parted versions fixed/improved their
UTF-16 handling of partition names in GPT, and sgdisk seems to not be
properly handling them, returning also unicode control bytes.
Since parted can provide partition names already, just make use of it.

Since sgdisk is no more needed for part_get_name, the function is no
more optional on it.
---
 daemon/parted.c      | 80 ++++++++++++++++++++++++++++++++++++----------------
 generator/actions.ml |  1 -
 2 files changed, 55 insertions(+), 26 deletions(-)

diff --git a/daemon/parted.c b/daemon/parted.c
index fce4cf9..5b049f5 100644
--- a/daemon/parted.c
+++ b/daemon/parted.c
 <at>  <at>  -886,27 +886,6  <at>  <at>  extract_uuid (const char *value)
   return ret;
 }

-static char *
-extract_optionally_quoted (const char *value)
-{
-  size_t value_len = strlen (value);
-
-  if (value_len >= 2 &&
-      ((value[0] == '\'' && value[value_len - 1] == '\'') ||
(Continue reading)

Richard W.M. Jones | 16 Apr 13:09 2014
Picon

[PATCH] disk-create: Fix this API so it works correctly with block devices (RHBZ#1088262).

When you call guestfs_disk_create on a block device with format=raw
then it will try to discard the blocks on the device.
---
 configure.ac         |  1 +
 daemon/blkdiscard.c  |  3 +++
 generator/actions.ml |  4 ++++
 src/create.c         | 46 +++++++++++++++++++++++++++++++++++++++-------
 4 files changed, 47 insertions(+), 7 deletions(-)

diff --git a/configure.ac b/configure.ac
index 887feea..014332e 100644
--- a/configure.ac
+++ b/configure.ac
 <at>  <at>  -291,6 +291,7  <at>  <at>  AC_CHECK_HEADERS([\
     byteswap.h \
     endian.h \
     errno.h \
+    linux/fs.h \
     linux/raid/md_u.h \
     printf.h \
     sys/inotify.h \
diff --git a/daemon/blkdiscard.c b/daemon/blkdiscard.c
index 7b63b99..612c97f 100644
--- a/daemon/blkdiscard.c
+++ b/daemon/blkdiscard.c
 <at>  <at>  -25,7 +25,10  <at>  <at> 
 #include <fcntl.h>
 #include <unistd.h>
 #include <sys/ioctl.h>
+
(Continue reading)

Pino Toscano | 15 Apr 14:15 2014
Picon

[PATCH] builder: add per-repository proxy configuration

Add the possibility to configure the proxy in each repository .conf
file, specifying whether use no proxy at all, follow the system
configuration or use a specific proxy.
---
 builder/builder.ml       | 10 +++++-----
 builder/downloader.ml    | 44 ++++++++++++++++++++++++++++++++++++--------
 builder/downloader.mli   | 15 +++++++++++++--
 builder/index_parser.ml  |  4 ++--
 builder/index_parser.mli |  2 +-
 builder/list_entries.ml  |  4 ++--
 builder/list_entries.mli |  2 +-
 builder/sources.ml       | 12 +++++++++++-
 builder/sources.mli      |  1 +
 builder/virt-builder.pod | 25 +++++++++++++++++++++++++
 10 files changed, 97 insertions(+), 22 deletions(-)

diff --git a/builder/builder.ml b/builder/builder.ml
index 81eb2d9..062dbb9 100644
--- a/builder/builder.ml
+++ b/builder/builder.ml
 <at>  <at>  -136,25 +136,25  <at>  <at>  let main () =
   let downloader = Downloader.create ~debug ~curl ~cache in
   let repos = Sources.read_sources ~prog ~debug in
   let repos = List.map (
-    fun { Sources.uri = uri; Sources.gpgkey = gpgkey } ->
+    fun { Sources.uri = uri; Sources.gpgkey = gpgkey; Sources.proxy = proxy } ->
       let gpgkey =
         match gpgkey with
         | None -> Sigchecker.No_Key
         | Some key -> Sigchecker.KeyFile key in
(Continue reading)

Richard W.M. Jones | 14 Apr 19:00 2014
Picon

[PATCH v4 NOT TO BE APPLIED] New tool: virt-v2v.

This is a rewrite of the original virt-v2v tool.  The original was
written by Matt Booth et al in Perl between 2009 and 2013.
---
 .gitignore                       |   6 +
 Makefile.am                      |   6 +-
 configure.ac                     |   5 +-
 fish/guestfish.pod               |   1 +
 po/POTFILES                      |   2 +
 po/POTFILES-ml                   |  11 +
 src/guestfs.pod                  |   5 +
 v2v/Makefile.am                  | 163 ++++++++++
 v2v/README                       |  23 ++
 v2v/cmdline.ml                   | 197 ++++++++++++
 v2v/convert_linux_common.ml      | 236 +++++++++++++++
 v2v/convert_linux_common.mli     |  45 +++
 v2v/convert_linux_enterprise.ml  | 637 +++++++++++++++++++++++++++++++++++++++
 v2v/convert_linux_enterprise.mli |  19 ++
 v2v/convert_linux_grub.ml        | 330 ++++++++++++++++++++
 v2v/convert_linux_grub.mli       |  43 +++
 v2v/convert_windows.ml           |  22 ++
 v2v/convert_windows.mli          |  19 ++
 v2v/link.sh.in                   |  22 ++
 v2v/source_libvirt.ml            | 118 ++++++++
 v2v/source_libvirt.mli           |  27 ++
 v2v/target_local.ml              |  86 ++++++
 v2v/target_local.mli             |  21 ++
 v2v/types.ml                     |  84 ++++++
 v2v/types.mli                    |  77 +++++
 v2v/utils-c.c                    |  43 +++
 v2v/utils.ml                     |  44 +++
(Continue reading)

Pino Toscano | 14 Apr 14:29 2014
Picon

[PATCH] sysprep: remove also hidden files/dirs in temporary dirs

List manually and remove the content left (hidden files/directories) in
temporary directories after the glob listing & removal.
---
 sysprep/sysprep_operation_tmp_files.ml | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/sysprep/sysprep_operation_tmp_files.ml b/sysprep/sysprep_operation_tmp_files.ml
index dc0247e..d5a52f3 100644
--- a/sysprep/sysprep_operation_tmp_files.ml
+++ b/sysprep/sysprep_operation_tmp_files.ml
 <at>  <at>  -24,15 +24,22  <at>  <at>  module G = Guestfs
 let tmp_files_perform ~debug ~quiet g root side_effects =
   let typ = g#inspect_get_type root in
   if typ <> "windows" then (
-    let paths = [ "/tmp/*";
-                  "/var/tmp/*"; ] in
+    let paths = [ "/tmp";
+                  "/var/tmp"; ] in
     List.iter (
       fun path ->
-        let files = g#glob_expand path in
+        let files = g#glob_expand (path ^ "/*") in
         Array.iter (
           fun file ->
             g#rm_rf file;
         ) files;
+        (try
+          let files = g#ls path in
+          Array.iter (
+            fun file ->
(Continue reading)

Richard W.M. Jones | 9 Apr 15:50 2014
Picon

[PATCH v3 NOT TO BE APPLIED] New tool: virt-v2v.

This is a rewrite of the original virt-v2v tool.  The original was
written by Matt Booth et al in Perl between 2009 and 2013.
---
 .gitignore                       |   5 +
 Makefile.am                      |   6 +-
 configure.ac                     |   3 +-
 fish/guestfish.pod               |   1 +
 po/POTFILES                      |   2 +
 po/POTFILES-ml                   |  11 ++
 src/guestfs.pod                  |   5 +
 v2v/Makefile.am                  | 185 +++++++++++++++++++++
 v2v/README                       |  15 ++
 v2v/cmdline.ml                   | 197 ++++++++++++++++++++++
 v2v/convert_linux_common.ml      | 131 +++++++++++++++
 v2v/convert_linux_common.mli     |  35 ++++
 v2v/convert_linux_enterprise.ml  | 185 +++++++++++++++++++++
 v2v/convert_linux_enterprise.mli |  19 +++
 v2v/convert_linux_grub.ml        | 160 ++++++++++++++++++
 v2v/convert_linux_grub.mli       |  35 ++++
 v2v/convert_windows.ml           |  22 +++
 v2v/convert_windows.mli          |  19 +++
 v2v/source_libvirt.ml            | 118 ++++++++++++++
 v2v/source_libvirt.mli           |  27 +++
 v2v/target_local.ml              |  86 ++++++++++
 v2v/target_local.mli             |  21 +++
 v2v/types.ml                     |  84 ++++++++++
 v2v/types.mli                    |  77 +++++++++
 v2v/utils-c.c                    |  43 +++++
 v2v/utils.ml                     |  44 +++++
 v2v/v2v.ml                       | 344 +++++++++++++++++++++++++++++++++++++++
(Continue reading)

Pino Toscano | 9 Apr 13:58 2014
Picon

[PATCH 1/8] sysprep: remove systemd journals

---
 sysprep/sysprep_operation_logfiles.ml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sysprep/sysprep_operation_logfiles.ml b/sysprep/sysprep_operation_logfiles.ml
index cf525c2..bb35daf 100644
--- a/sysprep/sysprep_operation_logfiles.ml
+++ b/sysprep/sysprep_operation_logfiles.ml
 <at>  <at>  -101,6 +101,9  <at>  <at>  let globs = List.sort compare [

   (* Red Hat subscription manager log files *)
   "/var/log/rhsm/*";
+
+  (* journals of systemd *)
+  "/var/log/journal/*";
 ]
 let globs_as_pod = String.concat "\n" (List.map ((^) " ") globs)

--

-- 
1.9.0
Richard W.M. Jones | 9 Apr 11:22 2014
Picon

[PATCH] build: Remove code coverage and code profiling options.

This reverts commit 5a2e320ec9390b2146feea6d7b3b8c36a34d0a90.
---
 .gitignore                    |  4 ----
 align/Makefile.am             |  1 -
 builder/Makefile.am           |  2 --
 cat/Makefile.am               |  3 ---
 configure.ac                  | 24 ------------------------
 customize/Makefile.am         |  2 --
 df/Makefile.am                |  1 -
 diff/Makefile.am              |  1 -
 edit/Makefile.am              |  1 -
 erlang/Makefile.am            |  3 +--
 examples/Makefile.am          | 24 ++++++++----------------
 fish/Makefile.am              |  1 -
 format/Makefile.am            |  1 -
 fuse/Makefile.am              |  7 ++-----
 inspector/Makefile.am         |  1 -
 make-fs/Makefile.am           |  1 -
 mllib/Makefile.am             |  2 --
 rescue/Makefile.am            |  1 -
 resize/Makefile.am            |  2 --
 src/Makefile.am               |  4 +---
 sysprep/Makefile.am           |  2 --
 test-tool/Makefile.am         |  3 +--
 tests/c-api/Makefile.am       | 40 +++++++++++++---------------------------
 tests/charsets/Makefile.am    |  3 +--
 tests/events/Makefile.am      |  1 -
 tests/mount-local/Makefile.am |  1 -
 tests/mountable/Makefile.am   |  3 +--
 tests/parallel/Makefile.am    |  3 +--
(Continue reading)

Richard W.M. Jones | 9 Apr 11:06 2014
Picon

[PATCH] sparsify: Use automake to build and link virt-sparsify binary.

There are two observations which make this possible: (1) virt-sparsify
contains at least one C unit, so automake thinks it is compiling a C
program.  (2) Automake lets us add a *_LINK rule to override linking.

We list the C sources of virt-sparsify as virt_sparsify_SOURCES, so
automake thinks it is building a C program as normal.

We override virt_sparsify_LINK to make it actually link an OCaml
program.

We add virt_sparsify_DEPENDENCIES listing the OCaml objects so that
they get built before linking.

We need a small linker script (link.sh) which adds some options at the
end of the linker command line which are impossible to add using pure
automake.

Inspired by the same idea in supermin:
https://github.com/libguestfs/supermin/blob/master/src/Makefile.am
---
 .gitignore           |   1 +
 configure.ac         |   2 +
 sparsify/Makefile.am | 104 ++++++++++++++++++++++-----------------------------
 sparsify/link.sh.in  |  22 +++++++++++
 4 files changed, 69 insertions(+), 60 deletions(-)
 create mode 100644 sparsify/link.sh.in

diff --git a/.gitignore b/.gitignore
index dc8aaf8..3e6a084 100644
--- a/.gitignore
(Continue reading)

Stuart Young | 8 Apr 07:12 2014

Problem with virt-sysprep

Hi there,

I was wondering if you could help me with a problem I'm having with virt-sysprep. It's a recurrent problem running virt-sysprep:
Examining the guest ...
Fatal error: exception Guestfs.Error("guestfs_launch failed.
See http://libguestfs.org/guestfs-faq.1.html#debugging-libguestfs
and/or run 'libguestfs-test-tool'.")
So I ran virt-sysprep and libguestfs-test-tool after setting these:

 export LIBGUESTFS_DEBUG=1
 export LIBGUESTFS_TRACE=1

... and have attached the output files.

Do you have any ideas on how to fix this?

Bests,

Stuart

-- -- Stuart Young Director of Bioinformatics Annai Systems 2100 Palomar Airport Road, Suite 210, Carlsbad, CA 92008 Mobile: 305-781-2286 Email: stuarty <at> annaisystems.com
_______________________________________________
Libguestfs mailing list
Libguestfs <at> redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs

Gmane