Matteo Cafasso | 28 Jun 21:49 2016
Picon

[PATCH] Reserve entries to tsk_dirent struct

Already implemented entries.

tsk_inode
tsk_type
tsk_size
tsk_name
tsk_flags

Easy ones to add.

tsk_atime_sec
tsk_atime_nsec
tsk_mtime_sec
tsk_mtime_nsec
tsk_ctime_sec
tsk_ctime_nsec
tsk_blksize
tsk_blocks

Further ideas.

tsk_nlink
tsk_link_name

Signed-off-by: Matteo Cafasso <noxdafox <at> gmail.com>
---
 daemon/tsk.c                      |  4 +++-
 generator/structs.ml              |  6 ++++++
 tests/tsk/test-filesystem-walk.sh | 16 ++++++++++++++--
 3 files changed, 23 insertions(+), 3 deletions(-)
(Continue reading)

Pino Toscano | 24 Jun 17:42 2016
Picon

[PATCH] RFC: OCaml tools: add and use a Getopt module

Add a new Getopt module to mllib, to parse command line arguments with
handlers close to the ones used with Arg, but using getopt(3) (actually
getopt_long_only) to do the real parsing.  This allow us to provide
options for OCaml tools with a syntax similar to the C tools, and use
the additional features getopt offers and Arg does not.

Do a single-step conversion of Common_utils and all the OCaml tools to
the syntax of Getopt.

As side-change due to the conversion, extra arguments for sysprep
operation can have more keys for the same argument.
---
 builder/Makefile.am                       |   2 +
 builder/cmdline.ml                        |  91 ++++---
 customize/Makefile.am                     |   2 +
 customize/customize_main.ml               |  33 +--
 dib/Makefile.am                           |   3 +
 dib/cmdline.ml                            |  80 +++---
 generator/customize.ml                    | 104 ++++----
 get-kernel/Makefile.am                    |   2 +
 get-kernel/get_kernel.ml                  |  26 +-
 mllib/Makefile.am                         |   3 +
 mllib/common_utils.ml                     |  54 ++--
 mllib/common_utils.mli                    |   2 +-
 mllib/getopt-c.c                          | 398 ++++++++++++++++++++++++++++++
 mllib/getopt.ml                           |  51 ++++
 mllib/getopt.mli                          |  73 ++++++
 resize/Makefile.am                        |   2 +
 resize/resize.ml                          |  51 ++--
 sparsify/Makefile.am                      |   9 +-
(Continue reading)

Pino Toscano | 23 Jun 11:09 2016
Picon

[PATCH] p2v: improve error message for sudo with password

Print a better error message when the non-root user on the conversion
server requires a password to use sudo, and p2v is told to use sudo.

See also RHZ#1340809.
---
 p2v/ssh.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/p2v/ssh.c b/p2v/ssh.c
index 76a6827..97d76ae 100644
--- a/p2v/ssh.c
+++ b/p2v/ssh.c
 <at>  <at>  -97,6 +97,7  <at>  <at>  static void free_regexps (void) __attribute__((destructor));

 static pcre *password_re;
 static pcre *ssh_message_re;
+static pcre *sudo_password_re;
 static pcre *prompt_re;
 static pcre *version_re;
 static pcre *feature_libguestfs_rewrite_re;
 <at>  <at>  -140,6 +141,7  <at>  <at>  compile_regexps (void)

   COMPILE (password_re, "password:", 0);
   COMPILE (ssh_message_re, "(ssh: .*)", 0);
+  COMPILE (sudo_password_re, "sudo: a password is required", 0);
   /* The magic synchronization strings all match this expression.  See
    * start_ssh function below.
    */
 <at>  <at>  -160,6 +162,7  <at>  <at>  free_regexps (void)
 {
(Continue reading)

Cédric Bosdonnat | 23 Jun 10:18 2016
Gravatar

[PATCH] p2v: kiwi: make sure launch-virt-p2v is executable

virt-p2v-make-kiwi now forces the launch-virt-p2v mode to 0755 to
ensure the executable bit it set for user.
---
 p2v/virt-p2v-make-kiwi.in | 1 +
 1 file changed, 1 insertion(+)

diff --git a/p2v/virt-p2v-make-kiwi.in b/p2v/virt-p2v-make-kiwi.in
index e493bd4..3506e9b 100644
--- a/p2v/virt-p2v-make-kiwi.in
+++ b/p2v/virt-p2v-make-kiwi.in
 <at>  <at>  -190,6 +190,7  <at>  <at>  cp $datadir/issue $output/root/etc/issue

 mkdir -p $output/root/usr/bin
 cp $datadir/launch-virt-p2v $output/root/usr/bin
+chmod 0755 $output/root/usr/bin/launch-virt-p2v

 mkdir -p $output/root/$libexecdir
 cp $host_libexecdir/virt-p2v $output/root/$libexecdir
--

-- 
2.6.6
Richard W.M. Jones | 22 Jun 16:14 2016
Picon
Gravatar

[PATCH 1/2] v2v: Fix conversion of floppy removable devices (RHBZ#1309706).

The previous code treated floppy disks and CD-ROMs as the same kind of
thing, resulting in malformed libvirt XML.  You would see the
following error when importing a guest into libvirt:

  error: Failed to define domain from /tmp/v2vlibvirt063486.xml
  error: internal error: Invalid floppy device name: hdb

because we incorrectly generated this bogus libvirt XML fragment:

  <disk device='floppy' type='file'>
    <driver name='qemu' type='raw'/>
    <target dev='hdb' bus='ide'/>
  </disk>

This commit models floppy devices as a distinct type, occupying their
own bus ("/dev/fdX").  When writing to libvirt, we generate correct
XML fragments, looking like this:

  <disk device='floppy' type='file'>
    <driver name='qemu' type='raw'/>
    <target dev='fda'/>
  </disk>

Miscellaneous other changes were required in the code.  There is also
a regression test (see following commit).

Note this ignores floppy disks in '-o qemu' mode.
---
 v2v/input_libvirtxml.ml      |  1 +
 v2v/output_libvirt.ml        |  6 ++++--
(Continue reading)

Maxim Perevedentsev | 22 Jun 15:43 2016

[PATCH] ext: change e2fsck retcode processing during resize

e2fsck returns 1 in case of "file system errors corrected".
We treat it as success in normal e2fsck, but fail if e2fsck
is run by resize2fs.

Change 'manual' execution of e2fsck to dedicated function call.
---
 daemon/ext2.c | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/daemon/ext2.c b/daemon/ext2.c
index 5dd67c7..95a65ae 100644
--- a/daemon/ext2.c
+++ b/daemon/ext2.c
 <at>  <at>  -192,24 +192,18  <at>  <at>  do_get_e2uuid (const char *device)
 static int
 if_not_mounted_run_e2fsck (const char *device)
 {
-  CLEANUP_FREE char *err = NULL;
-  int r, mounted;
+  int r = 0, mounted;

   mounted = is_device_mounted (device);
   if (mounted == -1)
     return -1;

   if (!mounted) {
-    r = commandf (NULL, &err,
-                  COMMAND_FLAG_FOLD_STDOUT_ON_STDERR,
-                  str_e2fsck, "-fy", device, NULL);
-    if (r == -1) {
(Continue reading)

Cédric Bosdonnat | 22 Jun 14:02 2016
Gravatar

[PATCH v3 0/4] virt-p2v support for openSUSE / SLES

Diff to v2:
  * remove leftover variable declaration in gui.c

Cédric Bosdonnat (4):
  p2v: use yast2 lan on SUSE distros rather than NM
  p2v: fix dependencies for SLES / openSUSE
  p2v: add virt-p2v-make-kiwi to generate kiwi config
  p2v: add -x option to nm-online

 .gitignore                 |   3 +
 configure.ac               |   2 +
 p2v/Makefile.am            |  31 +++++-
 p2v/dependencies.m4        |  19 ++--
 p2v/gui.c                  |   5 +-
 p2v/kiwi-config.sh         |  73 +++++++++++++++
 p2v/kiwi-config.xml.in     |  92 ++++++++++++++++++
 p2v/launch-virt-p2v.in     |  17 +++-
 p2v/utils.c                |   2 +-
 p2v/virt-p2v-make-disk.pod |   1 +
 p2v/virt-p2v-make-kiwi.in  | 228 +++++++++++++++++++++++++++++++++++++++++++++
 p2v/virt-p2v-make-kiwi.pod | 184 ++++++++++++++++++++++++++++++++++++
 p2v/virt-p2v.pod           |   1 +
 13 files changed, 640 insertions(+), 18 deletions(-)
 create mode 100755 p2v/kiwi-config.sh
 create mode 100644 p2v/kiwi-config.xml.in
 create mode 100644 p2v/virt-p2v-make-kiwi.in
 create mode 100644 p2v/virt-p2v-make-kiwi.pod

--

-- 
2.6.6
(Continue reading)

Cédric Bosdonnat | 22 Jun 13:49 2016
Gravatar

[PATCH v2 0/4] virt-p2v support for openSUSE / SLES

Diff to v1:
  * Use access rather than stat in gui.c
  * Remove now uneeded and missplaced include for stat.h

Cédric Bosdonnat (4):
  p2v: use yast2 lan on SUSE distros rather than NM
  p2v: fix dependencies for SLES / openSUSE
  p2v: add virt-p2v-make-kiwi to generate kiwi config
  p2v: add -x option to nm-online

 .gitignore                 |   3 +
 configure.ac               |   2 +
 p2v/Makefile.am            |  31 +++++-
 p2v/dependencies.m4        |  19 ++--
 p2v/gui.c                  |   6 +-
 p2v/kiwi-config.sh         |  73 +++++++++++++++
 p2v/kiwi-config.xml.in     |  92 ++++++++++++++++++
 p2v/launch-virt-p2v.in     |  17 +++-
 p2v/utils.c                |   2 +-
 p2v/virt-p2v-make-disk.pod |   1 +
 p2v/virt-p2v-make-kiwi.in  | 228 +++++++++++++++++++++++++++++++++++++++++++++
 p2v/virt-p2v-make-kiwi.pod | 184 ++++++++++++++++++++++++++++++++++++
 p2v/virt-p2v.pod           |   1 +
 13 files changed, 641 insertions(+), 18 deletions(-)
 create mode 100755 p2v/kiwi-config.sh
 create mode 100644 p2v/kiwi-config.xml.in
 create mode 100644 p2v/virt-p2v-make-kiwi.in
 create mode 100644 p2v/virt-p2v-make-kiwi.pod

--

-- 
(Continue reading)

Cédric Bosdonnat | 22 Jun 11:45 2016
Gravatar

[PATCH 0/4] virt-p2v support for openSUSE / SLES

Hi there,

Here are a few patches to get virt-p2v working on openSUSE and SLES. Note
that I intentionnaly use icewm and yast2 lan for SLES and openSUSE since SLES
doesn't ship metacity and all of NetworkManager pieces.

Cédric Bosdonnat (4):
  p2v: use yast2 lan on SUSE distros rather than NM
  p2v: fix dependencies for SLES / openSUSE
  p2v: add virt-p2v-make-kiwi to generate kiwi config
  p2v: add -x option to nm-online

 .gitignore                 |   3 +
 configure.ac               |   2 +
 p2v/Makefile.am            |  31 +++++-
 p2v/dependencies.m4        |  19 ++--
 p2v/gui.c                  |   7 +-
 p2v/kiwi-config.sh         |  73 +++++++++++++++
 p2v/kiwi-config.xml.in     |  92 ++++++++++++++++++
 p2v/launch-virt-p2v.in     |  17 +++-
 p2v/utils.c                |   2 +-
 p2v/virt-p2v-make-disk.pod |   1 +
 p2v/virt-p2v-make-kiwi.in  | 228 +++++++++++++++++++++++++++++++++++++++++++++
 p2v/virt-p2v-make-kiwi.pod | 184 ++++++++++++++++++++++++++++++++++++
 p2v/virt-p2v.pod           |   1 +
 13 files changed, 642 insertions(+), 18 deletions(-)
 create mode 100755 p2v/kiwi-config.sh
 create mode 100644 p2v/kiwi-config.xml.in
 create mode 100644 p2v/virt-p2v-make-kiwi.in
 create mode 100644 p2v/virt-p2v-make-kiwi.pod
(Continue reading)

Richard W.M. Jones | 18 Jun 17:09 2016
Picon
Gravatar

[PATCH 0/7] p2v: Multiple improvements to the look of virt-p2v.

In the run dialog, I have implemented an ANSI colour escape sequence
interpreter, so that colours displayed by the remote virt-v2v are now
shown to the user.
(https://bugzilla.redhat.com/show_bug.cgi?id=1314244)

This requires virt-v2v to send colours.  It wasn't doing that because
the output was a pipe (as we capture the output into the log file).
So I added a global --colours option to make the tools show ANSI
escape sequences even if the output is not a tty.

We don't want to show debug messages to the user during conversion.
This was tricky: I solved it by only sending back stdout from virt-v2v
to virt-p2v.  However that doesn't show error messages, so if an error
is encountered, a virt-v2v wrapper script shows the last few lines of
the complete log file (in which the error appears).

Various font fixes.

Rich.
Richard W.M. Jones | 17 Jun 21:51 2016
Picon
Gravatar

[from IRC] virt-v2v: error: virt-v2v is unable to convert this guest type (linux/ubuntu)


20:35 < user333> Hello libguestfs ! Is this : virt-v2v: error: virt-v2v is unable to convert this guest type
(linux/ubuntu) really a thing ?
20:37 < user333> I got this error with the latest dev.

Yes it is.  Full support for Debian-based distros is possible, but
could be a bit of work.

However there are some baby-steps that someone could take towards that
goal.  I would start by looking at the v2v/linux.{ml,mli} module, and
converting that so it would work (also) on apt-based distros.

Rich.

--

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html

Gmane