Maros Zatko | 17 Apr 16:55 2015
Picon

[PATCH v3] inspector: recognize ppc64 and ppc64le archs (RHBZ#1211996)

Patch extracts MSB/LSB info from /bin/file output and passes it as separate
parameter from elf_arch. Then it is sent to impl_file_architecture and checked.

Modified magic_for_file to handle regex changes.

Fixes: RHBZ#1211996

Maros Zatko (1):
  inspector: recognize ppc64 and ppc64le archs (RHBZ#1211996)

 src/filearch.c | 24 +++++++++++++++---------
 1 file changed, 15 insertions(+), 9 deletions(-)

--

-- 
1.9.3
Maros Zatko | 16 Apr 16:51 2015
Picon

[PATCH v2] inspector: recognize ppc64 and ppc64le archs (RHBZ#1211996)

Patch extracts MSB/LSB info from /bin/file output and prepends it
to elf_arch. Then it is sent to impl_file_architecture and checked.

Now using guestfs_int_safe_asprintf instead of malloc + snprintf.
Modified magic_for_file.

Fixes: RHBZ#1211996

Maros Zatko (1):
  inspector: recognize ppc64 and ppc64le archs (RHBZ#1211996)

 src/filearch.c | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

--

-- 
1.9.3
Maros Zatko | 15 Apr 18:35 2015
Picon

[PATCH] inspector: recognize ppc64 and ppc64le archs (RHBZ#1211996)

Patch extracts MSB/LSB info from /bin/file output and prepends it
to elf_arch. Then it is sent to impl_file_architecture and checked.
Fixes: RHBZ#1211996

Maros Zatko (1):
  inspector: recognize ppc64 and ppc64le archs (RHBZ#1211996)

 src/filearch.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

--

-- 
1.9.3
Pino Toscano | 15 Apr 15:30 2015
Picon

[PATCH 1/2] v2v: generalize test-v2v-i-ova-zip.sh

Rename test-v2v-i-ova-zip.sh (and associated data) to
test-v2v-i-ova-formats, and generalize it a bit so it can test different
compression types for the ova "envelope".
---
 v2v/Makefile.am                     |   8 +--
 v2v/test-v2v-i-ova-formats.expected |  15 ++++
 v2v/test-v2v-i-ova-formats.ovf      | 138 ++++++++++++++++++++++++++++++++++++
 v2v/test-v2v-i-ova-formats.sh       |  94 ++++++++++++++++++++++++
 v2v/test-v2v-i-ova-zip.expected     |  15 ----
 v2v/test-v2v-i-ova-zip.ovf          | 138 ------------------------------------
 v2v/test-v2v-i-ova-zip.sh           |  77 --------------------
 7 files changed, 251 insertions(+), 234 deletions(-)
 create mode 100644 v2v/test-v2v-i-ova-formats.expected
 create mode 100644 v2v/test-v2v-i-ova-formats.ovf
 create mode 100755 v2v/test-v2v-i-ova-formats.sh
 delete mode 100644 v2v/test-v2v-i-ova-zip.expected
 delete mode 100644 v2v/test-v2v-i-ova-zip.ovf
 delete mode 100755 v2v/test-v2v-i-ova-zip.sh

diff --git a/v2v/Makefile.am b/v2v/Makefile.am
index 887600c..06f8380 100644
--- a/v2v/Makefile.am
+++ b/v2v/Makefile.am
 <at>  <at>  -23,12 +23,12  <at>  <at>  EXTRA_DIST = \
 	HACKING README.RHEV-M \
 	test-v2v-i-ova.ovf \
 	test-v2v-i-ova.xml \
+	test-v2v-i-ova-formats.expected \
+	test-v2v-i-ova-formats.ovf \
 	test-v2v-i-ova-gz.expected \
(Continue reading)

Pino Toscano | 15 Apr 13:41 2015
Picon

[PATCH 1/2] v2v: support tar.gz and tar.xz ova files

When dealing with a ova detected as gzip of xz, uncompress few bytes of
it to check whether it is a compressed tarball, and if so untar it.

Related to RHBZ#1186800.
---
 v2v/input_ova.ml | 48 ++++++++++++++++++++++++++++++++++++++++++------
 1 file changed, 42 insertions(+), 6 deletions(-)

diff --git a/v2v/input_ova.ml b/v2v/input_ova.ml
index 74db1f7..a84037d 100644
--- a/v2v/input_ova.ml
+++ b/v2v/input_ova.ml
 <at>  <at>  -43,13 +43,32  <at>  <at>  object
        *)
       if is_directory ova then ova
       else (
+        let uncompress_head zcat file =
+          let cmd = sprintf "%s %s" zcat (quote file) in
+          let chan_out, chan_in, chan_err = Unix.open_process_full cmd [||] in
+          let buf = String.create 512 in
+          let len = input chan_out buf 0 (String.length buf) in
+          (* We're expecting the subprocess to fail because we close
+           * the pipe early, so:
+           *)
+          ignore (Unix.close_process_full (chan_out, chan_in, chan_err));
+
+          let tmpfile, chan = Filename.open_temp_file ~temp_dir:tmpdir "ova.file." "" in
+          output chan buf 0 len;
+          close_out chan;
+
(Continue reading)

Pino Toscano | 14 Apr 17:05 2015
Picon

[PATCH 1/4] v2v: domainxml: factor out connect and pool loading

Factor out the connection and pool loading out of v2v_pool_dumpxml, so
it can be used in later implementations requiring a pool.

Should be just code motion.
---
 v2v/domainxml-c.c | 84 +++++++++++++++++++++++++++++++++----------------------
 1 file changed, 51 insertions(+), 33 deletions(-)

diff --git a/v2v/domainxml-c.c b/v2v/domainxml-c.c
index 4224d72..077c153 100644
--- a/v2v/domainxml-c.c
+++ b/v2v/domainxml-c.c
 <at>  <at>  -106,6 +106,55  <at>  <at>  libvirt_auth_default_wrapper (virConnectCredentialPtr cred,
   }
 }

+virStoragePoolPtr
+connect_and_load_pool (const char *conn_uri, const char *pool_name)
+{
+  /* We have to assemble the error on the stack because a dynamic
+   * string couldn't be freed.
+   */
+  char errmsg[256];
+  virErrorPtr err;
+  virConnectPtr conn;
+  virStoragePoolPtr pool;
+
+  /* We have to call the default authentication handler, not least
+   * since it handles all the PolicyKit crap.  However it also makes
+   * coding this simpler.
(Continue reading)

Richard W.M. Jones | 14 Apr 15:32 2015
Picon

ANNOUNCE: libguestfs & virt-v2v & virt-p2v RHEL 7.2 preview packages available

[The subject line isn't strictly correct, as virt-p2v packages aren't
available right now, but will be shortly]

If you are running RHEL 7.1 then you may be interested in trying out
the newer RHEL 7.2 preview versions of:

 - libguestfs
 - virt-v2v (Technical Preview in RHEL 7.1, Supported in RHEL 7.2)
 - virt-p2v (Technical Preview in RHEL 7.2)

To install the preview repository, copy the attached file into
/etc/yum.repos.d/

Then use this command to update virt-v2v:

  yum install virt-v2v libguestfs-tools-c libguestfs-xfs

To convert Windows guests you'll also need libguestfs-winsupport which
is finally available in RHN (V2VWIN channel) or you can get it from
http://people.redhat.com/~rjones/libguestfs-winsupport/

Please note these packages are *not* supported by Red Hat.  If you
find bugs, please file them using the link below:

  https://bugzilla.redhat.com/enter_bug.cgi?product=Red%20Hat%20Enterprise%20Linux%207&component=libguestfs

To downgrade back to the RHEL 7.1 supported packages, delete
/etc/yum.repos.d/libguestfs-RHEL-7.2-preview.repo , uninstall
libguestfs, then reinstall libguestfs from RHN.

(Continue reading)

Pino Toscano | 14 Apr 13:24 2015
Picon

[PATCH] v2v: convert libvirt display port configuration

Read the port configuration from the XML of libvirt domains, restoring
it when writing new libvirt XMLs instead of always setting the
"autoport" option.
---
 v2v/input_disk.ml       |  2 +-
 v2v/input_libvirtxml.ml | 13 +++++++++++--
 v2v/output_libvirt.ml   |  8 +++++++-
 v2v/output_qemu.ml      |  3 ++-
 v2v/types.ml            |  1 +
 v2v/types.mli           |  1 +
 6 files changed, 23 insertions(+), 5 deletions(-)

diff --git a/v2v/input_disk.ml b/v2v/input_disk.ml
index 2c70368..40bd783 100644
--- a/v2v/input_disk.ml
+++ b/v2v/input_disk.ml
 <at>  <at>  -87,7 +87,7  <at>  <at>  class input_disk verbose input_format disk = object
       s_features = [ "acpi"; "apic"; "pae" ];
       s_display =
         Some { s_display_type = Window; s_keymap = None; s_password = None;
-               s_listen = LNone };
+               s_listen = LNone; s_port = None };
       s_disks = [disk];
       s_removables = [];
       s_nics = [network];
diff --git a/v2v/input_libvirtxml.ml b/v2v/input_libvirtxml.ml
index 4fb6358..2e8fa1f 100644
--- a/v2v/input_libvirtxml.ml
+++ b/v2v/input_libvirtxml.ml
 <at>  <at>  -117,14 +117,23  <at>  <at>  let parse_libvirt_xml ~verbose xml =
(Continue reading)

Pino Toscano | 14 Apr 10:40 2015
Picon

[PATCH] v2v: convert libvirt display listen configuration (RHBZ#1174073)

Read the listen configuration from the XML of libvirt domains, restoring
it when writing new libvirt XMLs.
---
 v2v/input_disk.ml       |  3 ++-
 v2v/input_libvirtxml.ml | 26 ++++++++++++++++++++++++--
 v2v/output_libvirt.ml   | 11 +++++++++++
 v2v/types.ml            | 15 +++++++++++++--
 v2v/types.mli           |  5 +++++
 5 files changed, 55 insertions(+), 5 deletions(-)

diff --git a/v2v/input_disk.ml b/v2v/input_disk.ml
index 969c43c..2c70368 100644
--- a/v2v/input_disk.ml
+++ b/v2v/input_disk.ml
 <at>  <at>  -86,7 +86,8  <at>  <at>  class input_disk verbose input_format disk = object
       s_vcpu = 1;                         (* 1 vCPU is a safe default *)
       s_features = [ "acpi"; "apic"; "pae" ];
       s_display =
-        Some { s_display_type = Window; s_keymap = None; s_password = None };
+        Some { s_display_type = Window; s_keymap = None; s_password = None;
+               s_listen = LNone };
       s_disks = [disk];
       s_removables = [];
       s_nics = [network];
diff --git a/v2v/input_libvirtxml.ml b/v2v/input_libvirtxml.ml
index d0d0e95..4fb6358 100644
--- a/v2v/input_libvirtxml.ml
+++ b/v2v/input_libvirtxml.ml
 <at>  <at>  -95,14 +95,36  <at>  <at>  let parse_libvirt_xml ~verbose xml =
         match xpath_to_string " <at> keymap" "" with "" -> None | k -> Some k in
(Continue reading)

Pino Toscano | 13 Apr 13:41 2015
Picon

[PATCH 1/2] filearch: move libmagic code in an own function

Also use a cleanup attribue to ease the close of the magic_t handle.

This is mostly code motion, hopefully with no actual behaviour changes.
---
 src/filearch.c | 100 +++++++++++++++++++++++++++++++++++++++------------------
 1 file changed, 68 insertions(+), 32 deletions(-)

diff --git a/src/filearch.c b/src/filearch.c
index 8708a4b..219eaae 100644
--- a/src/filearch.c
+++ b/src/filearch.c
 <at>  <at>  -42,6 +42,22  <at>  <at> 

 #if defined(HAVE_LIBMAGIC)

+# ifdef HAVE_ATTRIBUTE_CLEANUP
+# define CLEANUP_MAGIC_T_FREE __attribute__((cleanup(cleanup_magic_t_free)))
+
+static void
+cleanup_magic_t_free (void *ptr)
+{
+  magic_t m = *(magic_t *) ptr;
+
+  if (m)
+    magic_close (m);
+}
+
+# else
+# define CLEANUP_MAGIC_T_FREE
+# endif
(Continue reading)

Maros Zatko | 9 Apr 16:35 2015
Picon

[PATCH] sparsify: support QEMU detect-zeroes in copying mode (RHBZ#1130506)

Fixes RHBZ#1130506
See also: https://lists.gnu.org/archive/html/qemu-devel/2012-07/msg03747.html

Maros Zatko (1):
  sparsify: support QEMU detect-zeroes in copying mode (RHBZ#1130506)

 sparsify/copying.ml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--

-- 
1.9.3

Gmane