Re: [Libguestfs] [PATCH v2] builder: Allow GnuPG v2 or v1 to be used (RHBZ#1438939).

2017-04-06 Thread Pino Toscano
On Thursday, 6 April 2017 12:23:46 CEST Richard W.M. Jones wrote: > All of the GPG commands we run are compatible with either v1 or v2, so > this simply involves looking for either gpg2 or gpg binaries at > runtime. > --- LGTM. Thanks, -- Pino Toscano signature.asc Description: This is a

Re: [Libguestfs] [PATCH v4 3/9] v2v: linux: Replace 'ki_supports_virtio' field.

2017-04-06 Thread Richard W.M. Jones
On Thu, Apr 06, 2017 at 05:06:08PM +0200, Pino Toscano wrote: > On Thursday, 6 April 2017 12:04:21 CEST Richard W.M. Jones wrote: > > Previously the kernel_info field 'ki_supports_virtio' really meant > > that the kernel supports virtio-net. That was used as a proxy to mean > > the kernel

Re: [Libguestfs] [PATCH v4 0/9] v2v: Add drivers for virtio-rng, balloon, pvpanic.

2017-04-06 Thread Pino Toscano
On Thursday, 6 April 2017 12:04:18 CEST Richard W.M. Jones wrote: > v1: https://www.redhat.com/archives/libguestfs/2017-April/msg00031.html > v2: https://www.redhat.com/archives/libguestfs/2017-April/msg00040.html > v3: https://www.redhat.com/archives/libguestfs/2017-April/msg00051.html > > v3 ->

[Libguestfs] [PATCH v6 6/7] New API: yara_scan

2017-04-06 Thread Matteo Cafasso
The yara_scan API parses the file generated by the daemon counterpart function and returns the list of yara_detection structs to the user. It writes the daemon's command output on a temporary file and parses it, deserialising the XDR formatted yara_detection structs. It returns to the caller the

[Libguestfs] [PATCH v6 4/7] New API: yara_destroy

2017-04-06 Thread Matteo Cafasso
The yara_destroy API allows to claim resources back via the removal of the previously loaded Yara rules. Signed-off-by: Matteo Cafasso --- daemon/yara.c | 14 ++ generator/actions_yara.ml | 8 generator/proc_nr.ml | 1 +

[Libguestfs] [PATCH v6 2/7] appliance: add yara dependency

2017-04-06 Thread Matteo Cafasso
libyara3 on Debian/Ubuntu yara on SUSE/RedHat Signed-off-by: Matteo Cafasso --- appliance/packagelist.in | 4 daemon/Makefile.am | 3 ++- m4/guestfs_daemon.m4 | 14 ++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git

[Libguestfs] [PATCH v6 PATCH 7/7] yara_scan: added API tests

2017-04-06 Thread Matteo Cafasso
Signed-off-by: Matteo Cafasso --- configure.ac | 1 + tests/yara/Makefile.am | 26 +++ tests/yara/test-yara-scan.sh | 61 3 files changed, 88 insertions(+) create mode 100644

[Libguestfs] [PATCH v6 3/7] New API: yara_load

2017-04-06 Thread Matteo Cafasso
The yara_load API allows to load a set of Yara rules contained within a file on the host. Rules can be in binary format, as when compiled with yarac command, or in source code format. In the latter case, the rules will be first compiled and then loaded. Subsequent calls of the yara_load API will

[Libguestfs] [PATCH v6 5/7] New API: internal_yara_scan

2017-04-06 Thread Matteo Cafasso
The internal_yara_scan runs the Yara engine with the previously loaded rules against the given file. For each rule matching against the scanned file, a struct containing the file name and the rule identifier is returned. The gathered list of yara_detection structs is serialised into XDR format

[Libguestfs] [PATCH v6 0/7] Feature: Yara file scanning

2017-04-06 Thread Matteo Cafasso
v6: - use new test functions - fix yara_detection struct field names - revert yara_load function to initial version With Pino we were exploring the idea of allowing Users to load multiple rule files with subsequent calls to yara_load API.

[Libguestfs] [PATCH] v2v: ovf: Add virtio-rng and memory balloon device

2017-04-06 Thread Tomáš Golembiovský
This affects -o rhv and -o vdsm. Signed-off-by: Tomáš Golembiovský --- v2v/create_ovf.ml | 23 +++ 1 file changed, 23 insertions(+) diff --git a/v2v/create_ovf.ml b/v2v/create_ovf.ml index cfca63452..03df7f934 100644 --- a/v2v/create_ovf.ml +++

[Libguestfs] [PATCH v3 5/8] v2v: -o libvirt: Add virtio-rng, balloon and pvpanic to output XML (RHBZ#1438794).

2017-04-06 Thread Richard W.M. Jones
When outputting libvirt XML, create virtio-rng, a memory balloon device, and a pvpanic device, if the guest supports it. Thanks: Daniel Berrangé for advice on memballoon --- v2v/create_libvirt_xml.ml | 26 ++ v2v/test-v2v-i-ova.xml| 4 2 files changed, 30

[Libguestfs] [PATCH v3 4/8] v2v: Extend guestcaps to record drivers for virtio-rng, balloon and pvpanic.

2017-04-06 Thread Richard W.M. Jones
Extend the guestcaps structure so it records whether a guest supports (or drivers were added) for virtio-rng, the virtio memory balloon, and the ISA pvpanic device. --- v2v/convert_linux.ml | 3 +++ v2v/convert_windows.ml | 6 +- v2v/linux_kernels.ml | 21 +

[Libguestfs] [PATCH v3 8/8] v2v: windows: Prefer virtio-win ISO over directory (RHBZ#1438794).

2017-04-06 Thread Richard W.M. Jones
The exploded tree has many missing drivers (eg. virtio-rng). The ISO contains the complete set, so prefer it. --- v2v/virt-v2v.pod | 34 +- v2v/windows_virtio.ml | 4 +++- 2 files changed, 28 insertions(+), 10 deletions(-) diff --git a/v2v/virt-v2v.pod

[Libguestfs] [PATCH v3 3/8] v2v: linux: Replace 'ki_supports_virtio' field.

2017-04-06 Thread Richard W.M. Jones
Previously the kernel_info field 'ki_supports_virtio' really meant that the kernel supports virtio-net. That was used as a proxy to mean the kernel supports virtio in general. This change splits the field so we explicitly test for both virtio-blk and virtio-net drivers, and store the results as

[Libguestfs] [PATCH v3 7/8] v2v: -o qemu: Add virtio-rng, balloon and pvpanic to output (RHBZ#1438794).

2017-04-06 Thread Richard W.M. Jones
--- v2v/output_qemu.ml | 12 1 file changed, 12 insertions(+) diff --git a/v2v/output_qemu.ml b/v2v/output_qemu.ml index a6feeaab4..7246511dc 100644 --- a/v2v/output_qemu.ml +++ b/v2v/output_qemu.ml @@ -211,6 +211,18 @@ object ) ); +(* Add the miscellaneous KVM

[Libguestfs] [PATCH v3 2/8] v2v: linux: Fix Xen PV-only detection.

2017-04-06 Thread Richard W.M. Jones
We want to detect if a Linux kernel is Xen PV only ("PV-only"). Such a kernel will not boot on KVM, and if a guest has only PV-only kernels, it will not be able to boot at all on the target. Our previous test was wrong. It tested whether the xennet.ko module exists. This module was renamed in

Re: [Libguestfs] [PATCH v3 2/8] v2v: linux: Fix Xen PV-only detection.

2017-04-06 Thread Richard W.M. Jones
On Thu, Apr 06, 2017 at 09:13:24AM +0100, Richard W.M. Jones wrote: > - let is_xen_kernel = List.mem "xennet" modules in > + let is_xen_pv_only_kernel = > + check_config "CONFIG_X86_XEN" config_file || > + check_config "CONFIG_X86_64_XEN"

Re: [Libguestfs] IRC question: squashfs

2017-04-06 Thread Pino Toscano
On Thursday, 6 April 2017 00:26:26 CEST Richard W.M. Jones wrote: > > >From josv on IRC: > > > Hi! I am on Fedora 25 and installed libguestfs (1.36.2) from the > > fedora repo. It seems that the squashfs feature is missing in this > > installation (guestfish add-drive /dev/null : run : available

[Libguestfs] [PATCH v4 4/9] v2v: Extend guestcaps to record drivers for virtio-rng, balloon and pvpanic.

2017-04-06 Thread Richard W.M. Jones
Extend the guestcaps structure so it records whether a guest supports (or drivers were added) for virtio-rng, the virtio memory balloon, and the ISA pvpanic device. --- v2v/convert_linux.ml | 3 +++ v2v/convert_windows.ml | 6 +- v2v/linux_kernels.ml | 21 +

[Libguestfs] [PATCH v4 6/9] v2v: -o glance: Add virtio-rng to output properties (RHBZ#1438794).

2017-04-06 Thread Richard W.M. Jones
Only virtio-rng is supported at the time. --- v2v/output_glance.ml | 5 + 1 file changed, 5 insertions(+) diff --git a/v2v/output_glance.ml b/v2v/output_glance.ml index 04a284337..b712d6801 100644 --- a/v2v/output_glance.ml +++ b/v2v/output_glance.ml @@ -138,6 +138,11 @@ object |

[Libguestfs] [PATCH v4 8/9] v2v: windows: Prefer virtio-win ISO over directory (RHBZ#1438794).

2017-04-06 Thread Richard W.M. Jones
The exploded tree has many missing drivers (eg. virtio-rng). The ISO contains the complete set, so prefer it. --- v2v/virt-v2v.pod | 34 +- v2v/windows_virtio.ml | 4 +++- 2 files changed, 28 insertions(+), 10 deletions(-) diff --git a/v2v/virt-v2v.pod

Re: [Libguestfs] [PATCH] builder: Allow GnuPG v2 or v1 to be used (RHBZ#1438939).

2017-04-06 Thread Pino Toscano
On Tuesday, 4 April 2017 23:13:58 CEST Richard W.M. Jones wrote: > All of the GPG commands we run are compatible with either v1 or v2, so > this simply involves changing the configure script to find either > binary. > --- Why not simply check it at runtime? We have Common_utils.which already.

[Libguestfs] [PATCH v2] builder: Allow GnuPG v2 or v1 to be used (RHBZ#1438939).

2017-04-06 Thread Richard W.M. Jones
All of the GPG commands we run are compatible with either v1 or v2, so this simply involves looking for either gpg2 or gpg binaries at runtime. --- builder/builder.ml| 10 -- builder/cmdline.ml| 8 +++- builder/virt-builder.pod | 7 +-- docs/guestfs-building.pod