Re: [Libguestfs] Plan for 1.40

2018-11-02 Thread Richard W.M. Jones
On Fri, Nov 02, 2018 at 06:02:16PM +0100, Pino Toscano wrote: > On Friday, 2 November 2018 14:22:21 CET Richard W.M. Jones wrote: > > I feel it's been many months since we had a stable release and we've > > added some significant new features in that time, notably support for > > v2v to OpenStack.

Re: [Libguestfs] [PATCH v3 4/4] lib, p2v: Use single_element() macro where possible.

2018-11-02 Thread Richard W.M. Jones
On Fri, Nov 02, 2018 at 05:15:47PM +0100, Pino Toscano wrote: > > - if (params->data->uefi_vars) { > > - start_element ("nvram") { > > - string (params->data->uefi_vars); > > - } end_element (); > > - } > > + if (params->data->uefi_vars) > > + single_element ("nvram", param

Re: [Libguestfs] guestfs_launch() fails when C application is started as a systemd service

2018-11-02 Thread Richard W.M. Jones
On Fri, Nov 02, 2018 at 06:04:08PM +0200, Peter Dimitrov wrote: > Hello, > > I have a simple C program that uses libguestfs to extract info about disk > usage from a libvirt domain. It works when ran manually as root, but fails > when started as a systemd service. > > I'm attaching the service fi

Re: [Libguestfs] [PATCH v3 4/4] lib, p2v: Use single_element() macro where possible.

2018-11-02 Thread Richard W.M. Jones
On Fri, Nov 02, 2018 at 05:15:47PM +0100, Pino Toscano wrote: > On Friday, 2 November 2018 16:05:04 CET Richard W.M. Jones wrote: > > diff --git a/common/utils/libxml2-writer-macros.h > > b/common/utils/libxml2-writer-macros.h > > index d74dcd465..a99b245bb 100644 > > --- a/common/utils/libxml2-wr

Re: [Libguestfs] Plan for 1.40

2018-11-02 Thread Pino Toscano
On Friday, 2 November 2018 14:22:21 CET Richard W.M. Jones wrote: > I feel it's been many months since we had a stable release and we've > added some significant new features in that time, notably support for > v2v to OpenStack. > > If you have anything that you'd like to get in before 1.40 then l

Re: [Libguestfs] [PATCH v3 0/4] common/utils: Move libxml2 writer macros to a common header file.

2018-11-02 Thread Pino Toscano
On Friday, 2 November 2018 16:05:00 CET Richard W.M. Jones wrote: > v1 was here: > https://www.redhat.com/archives/libguestfs/2018-October/msg00047.html > v2 was here: > https://www.redhat.com/archives/libguestfs/2018-October/msg00051.html > > v3: > > - Back to using string/string_format and att

Re: [Libguestfs] [PATCH v3 4/4] lib, p2v: Use single_element() macro where possible.

2018-11-02 Thread Pino Toscano
On Friday, 2 November 2018 16:05:04 CET Richard W.M. Jones wrote: > diff --git a/common/utils/libxml2-writer-macros.h > b/common/utils/libxml2-writer-macros.h > index d74dcd465..a99b245bb 100644 > --- a/common/utils/libxml2-writer-macros.h > +++ b/common/utils/libxml2-writer-macros.h > @@ -86,7 +8

Re: [Libguestfs] [PATCH v3 2/4] common/utils: Move libxml2 writer macros to a common header file.

2018-11-02 Thread Richard W.M. Jones
On Fri, Nov 02, 2018 at 03:05:02PM +, Richard W.M. Jones wrote: > The last point causes the most churn since we must change the callers > to avoid format string security bugs. This comment was left in error and I've removed it in my copy. Rich. -- Richard Jones, Virtualization Group, Red Ha

[Libguestfs] [PATCH v3 4/4] lib, p2v: Use single_element() macro where possible.

2018-11-02 Thread Richard W.M. Jones
After the previous commit, wherever we had: start_element ("foo") { string ("bar"); } end_element (); this can now be replaced by: single_element ("foo", "bar"); --- common/utils/libxml2-writer-macros.h | 2 +- lib/launch-libvirt.c | 78 p

[Libguestfs] [PATCH v3 1/4] docs: Allow enhanced comments for macros (ie. #define).

2018-11-02 Thread Richard W.M. Jones
--- docs/make-internal-documentation.pl | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/make-internal-documentation.pl b/docs/make-internal-documentation.pl index a6673c48f..e08adad70 100755 --- a/docs/make-internal-documentation.pl +++ b/docs/make-interna

[Libguestfs] [PATCH v3 2/4] common/utils: Move libxml2 writer macros to a common header file.

2018-11-02 Thread Richard W.M. Jones
In some places when generating XML output in C code we use some clever macros: start_element ("memory") { attribute ("unit", "MiB"); string_format ("%d", g->memsize); } end_element (); This commit which is mostly refactoring moves the repeated definitions of these macros into a common

[Libguestfs] [PATCH v3 3/4] inspector: Use libxml writer macros.

2018-11-02 Thread Richard W.M. Jones
Change virt-inspector so it uses the common set of macros. I also added: - single_element() and single_element_format(): creates bar which is used extensively by virt-inspector - base64(): used by virt-inspector for the icon --- common/utils/libxml2-writer-macros.h | 41 +++ inspe

[Libguestfs] [PATCH v3 0/4] common/utils: Move libxml2 writer macros to a common header file.

2018-11-02 Thread Richard W.M. Jones
v1 was here: https://www.redhat.com/archives/libguestfs/2018-October/msg00047.html v2 was here: https://www.redhat.com/archives/libguestfs/2018-October/msg00051.html v3: - Back to using string/string_format and attribute/attribute_format. - Add both single_element and single_element_format.

Re: [Libguestfs] [PATCH v2 3/4] inspector: Use libxml writer macros.

2018-11-02 Thread Pino Toscano
On Thursday, 4 October 2018 14:03:49 CET Richard W.M. Jones wrote: > Change virt-inspector so it uses the common set of macros. I also > added: > > - single_element(): > >creates bar which is used extensively by virt-inspector As mentioned in patch #2, having two variants single_elements

[Libguestfs] [PATCH v2 REPOST] lib: Allow db_dump package to be a weak dependency

2018-11-02 Thread Richard W.M. Jones
We went around the houses a few times last year in order to try to fix this old Debian bug: https://bugzilla.redhat.com/show_bug.cgi?id=1409024 My last attempt was: https://www.redhat.com/archives/libguestfs/2017-October/msg00058.html which I believe was neither reviewed nor rejected, so I'm re

Re: [Libguestfs] [PATCH v2 REPOST] lib: Allow db_dump package to be a weak dependency (RHBZ#1409024).

2018-11-02 Thread Pino Toscano
On Friday, 2 November 2018 15:27:17 CET Richard W.M. Jones wrote: > We do this by defining DB_DUMP unconditionally and then testing the > special exit code given by the shell if the command is not found (see > http://www.tldp.org/LDP/abs/html/exitcodes.html). > > Packagers may either: > > (1) Pro

[Libguestfs] [PATCH REPOST] Introduce a wrapper around xmlParseURI.

2018-11-02 Thread Richard W.M. Jones
Previously posted: https://www.redhat.com/archives/libguestfs/2017-December/msg00046.html Rich. ___ Libguestfs mailing list Libguestfs@redhat.com https://www.redhat.com/mailman/listinfo/libguestfs

[Libguestfs] [PATCH REPOST] Introduce a wrapper around xmlParseURI.

2018-11-02 Thread Richard W.M. Jones
We only use xmlParseURI to parse our own "homebrew" URIs, for example the ones used by guestfish --add or virt-v2v. Unfortunately xmlParseURI cannot handle URIs with spaces or other non-RFC-compliant characters so simple commands like these fail: $ guestfish -a 'ssh://example.com/virtual machin

[Libguestfs] [PATCH v2 REPOST] lib: Allow db_dump package to be a weak dependency (RHBZ#1409024).

2018-11-02 Thread Richard W.M. Jones
We do this by defining DB_DUMP unconditionally and then testing the special exit code given by the shell if the command is not found (see http://www.tldp.org/LDP/abs/html/exitcodes.html). Packagers may either: (1) Provide db_dump as a build requirement, but make it a weak dependency at runtime, o

[Libguestfs] [PATCH v2 1/2] v2v: copy-to-local: Remove references to using this tool for ESXi.

2018-11-02 Thread Richard W.M. Jones
virt-v2v is capable of accessing ESXi hypervisors now. There is only one remaining use of this tool - when converting from Xen hypervisors over ssh which are using host block devices for storage. --- v2v/virt-v2v-copy-to-local.pod | 27 ++- 1 file changed, 2 insertions(+),

Re: [Libguestfs] [PATCH v2 2/4] common/utils: Move libxml2 writer macros to a common header file.

2018-11-02 Thread Pino Toscano
On Thursday, 4 October 2018 14:03:48 CET Richard W.M. Jones wrote: > In some places when generating XML output in C code we use some clever > macros: > > start_element ("memory") { > attribute ("unit", "MiB"); > string ("%d", g->memsize); > } end_element (); > > This commit which is m

[Libguestfs] [PATCH v2 0/2] v2v: Split up huge manual page into smaller pages.

2018-11-02 Thread Richard W.M. Jones
Previously posted: https://www.redhat.com/archives/libguestfs/2018-November/msg0.html https://www.redhat.com/archives/libguestfs/2018-November/msg1.html This completes the split and rewrite of the virt-v2v manual to make it much simpler to understand and digest. Rich. __

[Libguestfs] Plan for 1.40

2018-11-02 Thread Richard W.M. Jones
I feel it's been many months since we had a stable release and we've added some significant new features in that time, notably support for v2v to OpenStack. If you have anything that you'd like to get in before 1.40 then let me know by following up. On my list are just two items: * virt-v2v docu