Re: [libvirt] [PATCH 00/30] storagefile, security: qcow2 data_file support

2019-10-10 Thread Han Han
Hi Cole, I merged crobinso/qcow2-data_file branch to 37b565c00. Reserved new capabilities introduced by these to branches to resolve conflicts. Then build and test as following: # ./autogen.sh&& ./configure --without-libssh --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu

Re: [libvirt] [PATCH v2 2/3] tests: libxl: ACPI slic table test

2019-10-10 Thread Jim Fehlig
On 9/16/19 6:47 AM, Marek Marczykowski-Górecki wrote: > On Mon, Sep 16, 2019 at 12:23:35PM +, Jim Fehlig wrote: >> On 9/15/19 1:43 PM, Marek Marczykowski-Górecki wrote: >>> Signed-off-by: Marek Marczykowski-Górecki >>> --- >>>tests/libxlxml2domconfigdata/fullvirt-acpi-slic.json | 54

Re: [libvirt] [PATCH 0/5] security_stack: Perform rollback if one of stacked drivers fails

2019-10-10 Thread Cole Robinson
On 9/16/19 5:12 AM, Michal Privoznik wrote: See 5/5 for explanation. Michal Prívozník (5): security: Pass @migrated to virSecurityManagerSetAllLabel security: Rename virSecurityManagerGetDriver() to virSecurityManagerGetVirtDriver() security: Introduce

Re: [libvirt] [PATCH 0/3] security: Don't remember labels for TPM

2019-10-10 Thread Cole Robinson
On 10/1/19 11:00 AM, Michal Privoznik wrote: As it turns out, /dev/tpm0 can't be opened more than once. This doesn't fit into our seclabel remembering approach and thus disable it for TPM devices. There's also another type of files which can't be opened more than once - /dev/vfio/N. Usually,

Re: [libvirt] [PATCH 3/3] security: Don't remember labels for TPM

2019-10-10 Thread Cole Robinson
On 10/1/19 11:00 AM, Michal Privoznik wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1755803 The /dev/tpmN file can be opened only once, as implemented in drivers/char/tpm/tpm-dev.c:tpm_open() from the kernel's tree. Any other attempt to open the file fails. And since we're opening the file

Re: [libvirt] [PATCH v2 1/1] IDE: deprecate ide-drive

2019-10-10 Thread John Snow
On 10/10/19 7:54 AM, Peter Krempa wrote: > On Thu, Oct 10, 2019 at 13:42:26 +0200, Philippe Mathieu-Daudé wrote: >> On 10/10/19 1:26 PM, Peter Krempa wrote: >>> On Thu, Oct 10, 2019 at 13:22:37 +0200, Philippe Mathieu-Daudé wrote: On 10/10/19 12:43 AM, John Snow wrote: > It's an old

Re: [libvirt] [PATCH v2 1/1] src/driver.c: remove duplicated code in virGetConnect* functions

2019-10-10 Thread Cole Robinson
On 10/8/19 5:02 PM, Daniel Henrique Barboza wrote: All the 6 virGetConnect* functions in driver.c shares the same code base. This patch creates a new static function virGetConnectGeneric() that contains the common code to be used with all other virGetConnect*. Signed-off-by: Daniel Henrique

Re: [libvirt] [PATCH v3 3/4] conf: Add XML resolution support for video models

2019-10-10 Thread Cole Robinson
On 10/7/19 11:35 PM, jcfara...@gmail.com wrote: From: Julio Faracco XML need to support both properties together. This commit adds XML support for video model if they are set. Domain configuration is able to parse this properties as 'x' and 'y'. Code is not using same label as QEMU: 'xres' and

Re: [libvirt] [PATCH v3 2/4] qemu: Generate 'xres' and 'yres' for video devices

2019-10-10 Thread Cole Robinson
On 10/7/19 11:35 PM, jcfara...@gmail.com wrote: From: Julio Faracco Now, QEMU command line can define 'xres' and 'yres' if XML contains both properties from video model. This is generetaed if resolution was set. Code let QEMU handle if video model supports this feature. Signed-off-by: Julio

[libvirt] [dockerfiles PATCH] Refresh after forcing an UTF-8 locale

2019-10-10 Thread Andrea Bolognani
The corresponding libvirt-jenkins-ci commit is 7ee840dc17ca. Signed-off-by: Andrea Bolognani --- Pushed under the Dockerfile refresh rule. Plain-text diff below. buildenv-libosinfo-centos-7.zip | Bin 546 -> 575 bytes buildenv-libosinfo-debian-10.zip | Bin 646 -> 663

Re: [libvirt] [PATCH 00/30] storagefile, security: qcow2 data_file support

2019-10-10 Thread Daniel Henrique Barboza
Hi, ACKed basically everything, perhaps one or two patches I found something worth talking about but nothing too gamebreaker. Logic-wise everything made sense to me, but I believe someone else with a deeper understanding of the storage backend in Libvirt might know better. I am not sure how

Re: [libvirt] [jenkins-ci PATCH] lcitool: Force LANG=en_US.UTF-8 for the containers

2019-10-10 Thread Andrea Bolognani
On Thu, 2019-10-10 at 17:13 +0200, Fabiano Fidêncio wrote: > As we cannot and should not rely on how the containers were generated, > let's force the container LANG to be en_US.UTF-8 otherwise some > containers (Debian 9, Ubuntu 16, and Ubuntu 18) would simply bail when > dealing with environment

Re: [libvirt] [PATCH 30/30] security: selinux: Label externalDataStore

2019-10-10 Thread Daniel Henrique Barboza
On 10/7/19 6:49 PM, Cole Robinson wrote: We mirror the labeling strategy that was used for its top image Signed-off-by: Cole Robinson --- Reviewed-by: Daniel Henrique Barboza src/security/security_selinux.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git

Re: [libvirt] [PATCH 29/30] security: selinux: break out SetImageLabelRelative

2019-10-10 Thread Daniel Henrique Barboza
On 10/7/19 6:49 PM, Cole Robinson wrote: This will be used for recursing into externalDataStore Signed-off-by: Cole Robinson --- Reviewed-by: Daniel Henrique Barboza src/security/security_selinux.c | 20 +++- 1 file changed, 15 insertions(+), 5 deletions(-) diff

Re: [libvirt] [PATCH 28/30] security: selinux: Restore image label for externalDataStore

2019-10-10 Thread Daniel Henrique Barboza
On 10/7/19 6:49 PM, Cole Robinson wrote: Rename the existing virSecuritySELinuxRestoreImageLabelInt to virSecuritySELinuxRestoreImageLabelSingle, and extend the new ImageLabelInt handle externalDataStore Signed-off-by: Cole Robinson --- Reviewed-by: Daniel Henrique Barboza

Re: [libvirt] [PATCH 27/30] security: selinux: Add is_toplevel to SetImageLabelInternal

2019-10-10 Thread Daniel Henrique Barboza
On 10/7/19 6:49 PM, Cole Robinson wrote: This will simplify future patches and make the logic easier to follow Signed-off-by: Cole Robinson --- Reviewed-by: Daniel Henrique Barboza src/security/security_selinux.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff

Re: [libvirt] [PATCH 26/30] security: selinux: Drop !parent handling in SetImageLabelInternal

2019-10-10 Thread Daniel Henrique Barboza
On 10/7/19 6:49 PM, Cole Robinson wrote: The only caller always passes in a non-null parent Signed-off-by: Cole Robinson --- A replay from patch 20. I wonder how much common code there are between security_dac.c and security_selinux.c. Reviewed-by: Daniel Henrique Barboza

Re: [libvirt] [PATCH 25/30] security: selinux: Simplify SetImageLabelInternal

2019-10-10 Thread Daniel Henrique Barboza
On 10/7/19 6:49 PM, Cole Robinson wrote: All the SetFileCon calls only differ by the label they pass in. Rework the conditionals to track what label we need, and use a single SetFileCon call Signed-off-by: Cole Robinson --- Reviewed-by: Daniel Henrique Barboza

Re: [libvirt] [PATCH 23/30] security: dac: break out SetImageLabelRelative

2019-10-10 Thread Daniel Henrique Barboza
On 10/7/19 6:49 PM, Cole Robinson wrote: This will be used for recursing into externalDataStore Signed-off-by: Cole Robinson --- Reviewed-by: Daniel Henrique Barboza src/security/security_dac.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git

Re: [libvirt] [PATCH 24/30] security: dac: Label externalDataStore

2019-10-10 Thread Daniel Henrique Barboza
On 10/7/19 6:49 PM, Cole Robinson wrote: We mirror the labeling strategy that was used for its sibling image Signed-off-by: Cole Robinson --- Reviewed-by: Daniel Henrique Barboza src/security/security_dac.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git

Re: [libvirt] [PATCH 22/30] security: dac: Restore image label for externalDataStore

2019-10-10 Thread Daniel Henrique Barboza
On 10/7/19 6:49 PM, Cole Robinson wrote: Rename the existing virSecurityDACRestoreImageLabelInt to virSecurityDACRestoreImageLabelSingle, and extend the new ImageLabelInt handle externalDataStore Signed-off-by: Cole Robinson --- Reviewed-by: Daniel Henrique Barboza

Re: [libvirt] [PATCH 21/30] security: dac: Add is_toplevel to SetImageLabelInternal

2019-10-10 Thread Daniel Henrique Barboza
On 10/7/19 6:49 PM, Cole Robinson wrote: This will simplify future patches and make the logic easier to follow Signed-off-by: Cole Robinson --- Reviewed-by: Daniel Henrique Barboza src/security/security_dac.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

Re: [libvirt] [PATCH 20/30] security: dac: Drop !parent handling in SetImageLabelInternal

2019-10-10 Thread Daniel Henrique Barboza
On 10/7/19 6:49 PM, Cole Robinson wrote: The only caller always passes in a non-null parent Signed-off-by: Cole Robinson --- Reviewed-by: Daniel Henrique Barboza src/security/security_dac.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git

Re: [libvirt] [PATCH 19/30] storagefile: Fill in meta->externalDataStore

2019-10-10 Thread Daniel Henrique Barboza
On 10/7/19 6:49 PM, Cole Robinson wrote: Add virStorageSourceNewFromExternalData, similar to virStorageSourceNewFromBacking and use it to fill in a virStorageSource for externalDataStore Signed-off-by: Cole Robinson --- Reviewed-by: Daniel Henrique Barboza src/util/virstoragefile.c

[libvirt] [jenkins-ci PATCH] lcitool: Force LANG=en_US.UTF-8 for the containers

2019-10-10 Thread Fabiano Fidêncio
As we cannot and should not rely on how the containers were generated, let's force the container LANG to be en_US.UTF-8 otherwise some containers (Debian 9, Ubuntu 16, and Ubuntu 18) would simply bail when dealing with environment variables inherited from Gitlab CI which contains non-POSIX

Re: [libvirt] [PATCH 18/30] storagefile: Add externalDataStore member

2019-10-10 Thread Daniel Henrique Barboza
On 10/7/19 6:49 PM, Cole Robinson wrote: Add the plumbing to track a externalDataStoreRaw as a virStorageSource Signed-off-by: Cole Robinson --- src/util/virstoragefile.c | 9 + src/util/virstoragefile.h | 3 +++ 2 files changed, 12 insertions(+) diff --git

[libvirt] [PATCH 1/2] tests: Add capabilitie for QEMU 4.2.0 on ppc64

2019-10-10 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- .../caps_4.2.0.ppc64.replies | 24406 .../qemucapabilitiesdata/caps_4.2.0.ppc64.xml | 1087 + 2 files changed, 25493 insertions(+) create mode 100644 tests/qemucapabilitiesdata/caps_4.2.0.ppc64.replies create mode 100644

[libvirt] [PATCH 2/2] tests: Add capabilitie for QEMU 4.2.0 on aarch64

2019-10-10 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- .../caps_4.2.0.aarch64.replies| 20684 .../caps_4.2.0.aarch64.xml| 321 + 2 files changed, 21005 insertions(+) create mode 100644 tests/qemucapabilitiesdata/caps_4.2.0.aarch64.replies create mode 100644

[libvirt] [PATCH 0/2] tests: Add capabilities for QEMU 4.2.0 on ppc64 and aarch64

2019-10-10 Thread Andrea Bolognani
This will be useful to test Jirka's changes to how we handle default CPU models on more architectures. The version posted to the list is heavily snipped, but you can grab the full one with $ git fetch https://gitlab.com/abologna/libvirt caps-4.2.0 Andrea Bolognani (2): tests: Add

Re: [libvirt] [PATCH 17/30] storagefile: Split out virStorageSourceNewFromChild

2019-10-10 Thread Daniel Henrique Barboza
On 10/7/19 6:49 PM, Cole Robinson wrote: Future patches will use this for external data file handling Signed-off-by: Cole Robinson --- Reviewed-by: Daniel Henrique Barboza src/util/virstoragefile.c | 47 ++- 1 file changed, 31 insertions(+), 16

Re: [libvirt] [PATCH v2 2/3] qemu: Implement the ccf-assist pSeries feature

2019-10-10 Thread Daniel Henrique Barboza
On 10/9/19 7:06 PM, Cole Robinson wrote: On 10/8/19 4:06 PM, Daniel Henrique Barboza wrote: This patch adds the implementation of the ccf-assist pSeries feature, based on the QEMU_CAPS_MACHINE_PSERIES_CAP_CCF_ASSIST capability that was added in the previous patch. Signed-off-by: Daniel

Re: [libvirt] [PATCH v4 00/26] scripts: convert most perl scripts to python

2019-10-10 Thread Daniel P . Berrangé
On Thu, Oct 10, 2019 at 03:28:39PM +0200, Ján Tomko wrote: > On Wed, Oct 09, 2019 at 12:37:15PM +0100, Daniel P. Berrangé wrote: > > Note that the check-spacing.py script is significantly > > slower in Python than in Perl. After researching this > > it appears there is nothing that can be done.

Re: [libvirt] [PATCH v4 02/26] build-aux: rewrite augeas test generator in Python

2019-10-10 Thread Ján Tomko
On Wed, Oct 09, 2019 at 12:37:17PM +0100, Daniel P. Berrangé wrote: As part of an goal to eliminate Perl from libvirt build tools, rewrite the augeas-gentest.pl tool in Python. This was a straight conversion, manually going line-by-line to change the syntax from Perl to Python. Thus the overall

Re: [libvirt] [PATCH v4 00/26] scripts: convert most perl scripts to python

2019-10-10 Thread Ján Tomko
On Wed, Oct 09, 2019 at 12:37:15PM +0100, Daniel P. Berrangé wrote: Note that the check-spacing.py script is significantly slower in Python than in Perl. After researching this it appears there is nothing that can be done. The Perl regex engine is simply much better optimized than the Python

Re: [libvirt] [PATCH v3 06/19] util: rewrite auto cleanup macros to use glib's equivalent

2019-10-10 Thread Bjoern Walk
Daniel P. Berrangé [2019-10-10, 11:54AM +0100]: > diff --git a/docs/hacking.html.in b/docs/hacking.html.in > index 3f1542b6de..6e62b2d4ff 100644 > --- a/docs/hacking.html.in > +++ b/docs/hacking.html.in > @@ -1028,6 +1028,24 @@ BAD: >The GLib APIs g_strdup_printf / g_strdup_vprint should

Re: [libvirt] [PATCH] util: drop support for stack traces with logging

2019-10-10 Thread Ján Tomko
On Thu, Oct 10, 2019 at 01:05:43PM +0100, Daniel P. Berrangé wrote: The log filters have supported the use of a "+" before the source match string to request that a stack trace be emitted for every log message: commit 548563956e484e0e43e9a66a89bdda0f95930108 Author: Daniel P. Berrange Date:

Re: [libvirt] [PATCH v3 19/19] build: remove use of usleep gnulib module in favour of g_usleep

2019-10-10 Thread Ján Tomko
On Thu, Oct 10, 2019 at 11:54:13AM +0100, Daniel P. Berrangé wrote: The usleep function was missing on older mingw versions, but we can rely on it existing everywhere these days. It may only support times upto 1 second in duration though, so we'll prefer to use g_usleep instead. The

Re: [libvirt] [PATCH v3 18/19] util: replace strerror/strerror_r with g_strerror

2019-10-10 Thread Ján Tomko
On Thu, Oct 10, 2019 at 11:54:12AM +0100, Daniel P. Berrangé wrote: g_strerror is offers the safety/correctness benefits of strerror_r, with the API design convenience of strerror. Use of virStrerror should be eliminated through the codebase in favour of g_strerror. commandhelper.c is a

Re: [libvirt] [PATCH v3 01/19] build: probe for glib-2 library in configure

2019-10-10 Thread Ján Tomko
On Thu, Oct 10, 2019 at 11:53:55AM +0100, Daniel P. Berrangé wrote: Prepare for linking with glib by probing for it at configure time. Per supported platforms target, the min glib versions on relevant distros are: RHEL-8: 2.56.1 RHEL-7: 2.50.3 Debian (Buster): 2.58.3 Debian (Stretch):

Re: [libvirt] [PATCH v3 02/19] build: link to glib library

2019-10-10 Thread Ján Tomko
On Thu, Oct 10, 2019 at 11:53:56AM +0100, Daniel P. Berrangé wrote: Add the main glib.h to internal.h so that all common code can use it. Historically glib allowed applications to register an alternative memory allocator, so mixing g_malloc/g_free with malloc/free was not safe. This was

[libvirt] [PATCH] util: drop support for stack traces with logging

2019-10-10 Thread Daniel P . Berrangé
The log filters have supported the use of a "+" before the source match string to request that a stack trace be emitted for every log message: commit 548563956e484e0e43e9a66a89bdda0f95930108 Author: Daniel P. Berrange Date: Wed May 9 15:18:56 2012 +0100 Allow stack traces to be

Re: [libvirt] [PATCH v2 1/1] IDE: deprecate ide-drive

2019-10-10 Thread Peter Krempa
On Thu, Oct 10, 2019 at 13:42:26 +0200, Philippe Mathieu-Daudé wrote: > On 10/10/19 1:26 PM, Peter Krempa wrote: > > On Thu, Oct 10, 2019 at 13:22:37 +0200, Philippe Mathieu-Daudé wrote: > > > On 10/10/19 12:43 AM, John Snow wrote: > > > > It's an old compatibility shim that just delegates to

Re: [libvirt] [PATCH v2 1/1] IDE: deprecate ide-drive

2019-10-10 Thread Philippe Mathieu-Daudé
On 10/10/19 1:26 PM, Peter Krempa wrote: On Thu, Oct 10, 2019 at 13:22:37 +0200, Philippe Mathieu-Daudé wrote: On 10/10/19 12:43 AM, John Snow wrote: It's an old compatibility shim that just delegates to ide-cd or ide-hd. I'd like to refactor these some day, and getting rid of the super-object

[libvirt] [libvirt-dbus] [PATCH 0/2] Implement snapshots

2019-10-10 Thread Simon Kobyda
Implement snapshot interface and its APIs. Simon Kobyda (2): Introduce Domain Snapshot Interface Implement snapshots APIs data/org.libvirt.Domain.xml | 26 +++ data/org.libvirt.DomainSnapshot.xml | 41 src/connect.c | 6 + src/connect.h

[libvirt] [libvirt-dbus] [PATCH 2/2] Implement snapshots APIs

2019-10-10 Thread Simon Kobyda
Signed-off-by: Simon Kobyda --- data/org.libvirt.Domain.xml | 26 data/org.libvirt.DomainSnapshot.xml | 34 + src/domain.c| 158 + src/domainsnapshot.c| 205 +++- tests/libvirttest.py

[libvirt] [libvirt-dbus] [PATCH 1/2] Introduce Domain Snapshot Interface

2019-10-10 Thread Simon Kobyda
Signed-off-by: Simon Kobyda --- data/org.libvirt.DomainSnapshot.xml | 7 +++ src/connect.c | 6 +++ src/connect.h | 1 + src/domainsnapshot.c| 79 + src/domainsnapshot.h| 9

Re: [libvirt] [PATCH v2 1/1] IDE: deprecate ide-drive

2019-10-10 Thread Peter Krempa
On Thu, Oct 10, 2019 at 13:22:37 +0200, Philippe Mathieu-Daudé wrote: > On 10/10/19 12:43 AM, John Snow wrote: > > It's an old compatibility shim that just delegates to ide-cd or ide-hd. > > I'd like to refactor these some day, and getting rid of the super-object > > will make that easier. > > >

[libvirt] [PATCH v3 12/19] admin: convert admin server code to use auto free macros

2019-10-10 Thread Daniel P . Berrangé
Reviewed-by: Ján Tomko Signed-off-by: Daniel P. Berrangé --- src/admin/admin_server.c | 204 --- 1 file changed, 85 insertions(+), 119 deletions(-) diff --git a/src/admin/admin_server.c b/src/admin/admin_server.c index 0d6091937d..ba87f701c3 100644 ---

[libvirt] [PATCH v3 19/19] build: remove use of usleep gnulib module in favour of g_usleep

2019-10-10 Thread Daniel P . Berrangé
The usleep function was missing on older mingw versions, but we can rely on it existing everywhere these days. It may only support times upto 1 second in duration though, so we'll prefer to use g_usleep instead. The commandhelper program is not changed since that can't link to glib. Fortunately

[libvirt] [PATCH v3 15/19] util: convert virIdentity class to use GObject

2019-10-10 Thread Daniel P . Berrangé
Converting from virObject to GObject is reasonably straightforward, as illustrated by this patch for virIdentity In the header file - Remove typedef struct _virIdentity virIdentity - Add #define VIR_TYPE_IDENTITY virIdentity_get_type () G_DECLARE_FINAL_TYPE (virIdentity,

[libvirt] [PATCH v3 06/19] util: rewrite auto cleanup macros to use glib's equivalent

2019-10-10 Thread Daniel P . Berrangé
To facilitate porting over to glib, this rewrites the auto cleanup macros to use glib's equivalent. As a result it is now possible to use g_autoptr/VIR_AUTOPTR, and g_auto/VIR_AUTOCLEAN, g_autofree/VIR_AUTOFREE interchangably, regardless of which macros were used to declare the cleanup types.

[libvirt] [PATCH v3 08/19] conf: convert virSecretObj APIs to use autofree

2019-10-10 Thread Daniel P . Berrangé
Reviewed-by: Ján Tomko Signed-off-by: Daniel P. Berrangé --- src/conf/virsecretobj.c | 46 +++-- 1 file changed, 17 insertions(+), 29 deletions(-) diff --git a/src/conf/virsecretobj.c b/src/conf/virsecretobj.c index 7800912bff..aeae82332b 100644 ---

[libvirt] [PATCH v3 07/19] src: add support for g_autoptr with virObject instances

2019-10-10 Thread Daniel P . Berrangé
Libvirt currently uses the VIR_AUTOUNREF macro for auto cleanup of virObject instances. GLib approaches things differently with GObject, reusing their g_autoptr() concept. This introduces support for g_autoptr() with virObject, to facilitate the conversion to GObject. Only virObject classes

[libvirt] [PATCH v3 13/19] rpc: convert methods using virIdentityPtr to auto free macros

2019-10-10 Thread Daniel P . Berrangé
Reviewed-by: Ján Tomko Signed-off-by: Daniel P. Berrangé --- src/rpc/virnetserverclient.c | 47 ++ src/rpc/virnetserverprogram.c | 13 +++--- tests/virnetserverclienttest.c | 3 +-- 3 files changed, 23 insertions(+), 40 deletions(-) diff --git

[libvirt] [PATCH v3 18/19] util: replace strerror/strerror_r with g_strerror

2019-10-10 Thread Daniel P . Berrangé
g_strerror is offers the safety/correctness benefits of strerror_r, with the API design convenience of strerror. Use of virStrerror should be eliminated through the codebase in favour of g_strerror. commandhelper.c is a special case as its a tiny single threaded test program, not linked to glib,

[libvirt] [PATCH v3 03/19] util: use glib memory allocation functions

2019-10-10 Thread Daniel P . Berrangé
Convert the VIR_ALLOC family of APIs with use of the g_malloc family of APIs. Use of VIR_ALLOC related functions should be incrementally phased out over time, allowing return value checks to be dropped. Use of VIR_FREE should be replaced with auto-cleanup whenever possible. We previously used the

[libvirt] [PATCH v3 14/19] remote: convert methods using virIdentityPtr to auto free macros

2019-10-10 Thread Daniel P . Berrangé
Reviewed-by: Ján Tomko Signed-off-by: Daniel P. Berrangé --- src/remote/remote_daemon.c | 3 +-- src/remote/remote_daemon_dispatch.c | 35 ++--- 2 files changed, 13 insertions(+), 25 deletions(-) diff --git a/src/remote/remote_daemon.c

[libvirt] [PATCH v3 01/19] build: probe for glib-2 library in configure

2019-10-10 Thread Daniel P . Berrangé
Prepare for linking with glib by probing for it at configure time. Per supported platforms target, the min glib versions on relevant distros are: RHEL-8: 2.56.1 RHEL-7: 2.50.3 Debian (Buster): 2.58.3 Debian (Stretch): 2.50.3 OpenBSD (Ports): 2.58.3 FreeBSD (Ports): 2.56.3 OpenSUSE

[libvirt] [PATCH v3 04/19] util: use glib string allocation/formatting functions

2019-10-10 Thread Daniel P . Berrangé
Convert the string duplication APIs to use the g_strdup family of APIs. We previously used the 'strdup-posix' gnulib module because mingw does not set errno to ENOMEM on failure We previously used the 'strndup' gnulib module because this function does not exist on mingw. We previously used the

[libvirt] [PATCH v3 16/19] libxl: convert over to use GRegex for regular expressions

2019-10-10 Thread Daniel P . Berrangé
Reviewed-by: Ján Tomko Reviewed-by: Pavel Hrdina Signed-off-by: Daniel P. Berrangé --- src/libxl/libxl_capabilities.c | 42 +++--- 1 file changed, 19 insertions(+), 23 deletions(-) diff --git a/src/libxl/libxl_capabilities.c b/src/libxl/libxl_capabilities.c index

[libvirt] [PATCH v3 05/19] util: convert virSystemdActivation to use VIR_DEFINE_AUTOPTR_FUNC

2019-10-10 Thread Daniel P . Berrangé
Using the standard macro will facilitate the conversion to glib's auto cleanup macros. Reviewed-by: Ján Tomko Signed-off-by: Daniel P. Berrangé --- src/util/virsystemd.c | 10 +- src/util/virsystemd.h | 5 +++-- tests/virsystemdtest.c | 2 +- 3 files changed, 9 insertions(+), 8

[libvirt] [PATCH v3 11/19] access: convert polkit driver to auto free memory

2019-10-10 Thread Daniel P . Berrangé
Reviewed-by: Ján Tomko Signed-off-by: Daniel P. Berrangé --- src/access/viraccessdriverpolkit.c | 38 +++--- 1 file changed, 14 insertions(+), 24 deletions(-) diff --git a/src/access/viraccessdriverpolkit.c b/src/access/viraccessdriverpolkit.c index

[libvirt] [PATCH v3 09/19] util: use glib base64 encoding/decoding APIs

2019-10-10 Thread Daniel P . Berrangé
Replace use of the gnulib base64 module with glib's own base64 API family. Reviewed-by: Ján Tomko Signed-off-by: Daniel P. Berrangé --- bootstrap.conf| 1 - configure.ac | 5 - src/conf/virsecretobj.c | 26 --

[libvirt] [PATCH v3 17/19] conf: convert over to use GRegex for regular expressions

2019-10-10 Thread Daniel P . Berrangé
Reviewed-by: Ján Tomko Reviewed-by: Pavel Hrdina Signed-off-by: Daniel P. Berrangé --- src/conf/domain_event.c | 25 ++--- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/src/conf/domain_event.c b/src/conf/domain_event.c index b33589f472..40031a46c8 100644

[libvirt] [PATCH v3 10/19] util: convert virIdentity implementation and test suite to g_autoptr

2019-10-10 Thread Daniel P . Berrangé
To simplify the later conversion from virObject to GObject, introduce the use of g_autoptr to the virIdentity implementnation and test suite. Reviewed-by: Ján Tomko Signed-off-by: Daniel P. Berrangé --- src/util/viridentity.c | 36 ++--- tests/viridentitytest.c |

[libvirt] [PATCH v3 00/19] Integrate usage of glib into libvirt

2019-10-10 Thread Daniel P . Berrangé
This is a followup to a previous patch series: v0: https://www.redhat.com/archives/libvir-list/2019-August/msg01374.html v1: https://www.redhat.com/archives/libvir-list/2019-September/msg01331.html v2: https://www.redhat.com/archives/libvir-list/2019-October/msg00271.html The focus in this

[libvirt] [PATCH v3 02/19] build: link to glib library

2019-10-10 Thread Daniel P . Berrangé
Add the main glib.h to internal.h so that all common code can use it. Historically glib allowed applications to register an alternative memory allocator, so mixing g_malloc/g_free with malloc/free was not safe. This was feature was dropped in 2.46.0 with: commit

Re: [libvirt] [PATCH v2 17/23] conf: convert over to use GRegex for regular expressions

2019-10-10 Thread Daniel P . Berrangé
On Wed, Oct 09, 2019 at 10:08:32AM +0200, Bjoern Walk wrote: > Daniel P. Berrangé [2019-10-07, 06:14PM +0100]: > > @@ -2306,20 +2304,17 @@ > > virDomainQemuMonitorEventStateRegisterID(virConnectPtr conn, > > return -1; > > data->flags = flags; > > if (event && flags != -1) { >

Re: [libvirt] [PATCH 0/5] security_stack: Perform rollback if one of stacked drivers fails

2019-10-10 Thread Daniel P . Berrangé
On Thu, Oct 10, 2019 at 11:29:17AM +0100, Richard W.M. Jones wrote: > On Wed, Oct 09, 2019 at 07:49:29PM -0400, Cole Robinson wrote: > > In that bug, I see that rjones (cc'd) said that libvirt not > > remembering labels/uid causes issues for libguestfs that requires > > workarounds. Rich, do you

Re: [libvirt] [PATCH 0/5] security_stack: Perform rollback if one of stacked drivers fails

2019-10-10 Thread Richard W.M. Jones
On Wed, Oct 09, 2019 at 07:49:29PM -0400, Cole Robinson wrote: > In that bug, I see that rjones (cc'd) said that libvirt not > remembering labels/uid causes issues for libguestfs that requires > workarounds. Rich, do you have links to threads or bug reports where > this is described in more

Re: [libvirt] [PATCH v2 18/23] virsh: convert command line parsing to use GOptionContext

2019-10-10 Thread Daniel P . Berrangé
On Mon, Oct 07, 2019 at 06:14:20PM +0100, Daniel P. Berrangé wrote: > The GOptionContext API has the benefit over getopt_long that it will > automatically handle --help output formatting. > > Signed-off-by: Daniel P. Berrangé > --- > tools/virsh.c | 304

Re: [libvirt] [PATCH v4 00/26] scripts: convert most perl scripts to python

2019-10-10 Thread Daniel P . Berrangé
On Thu, Oct 10, 2019 at 09:22:29AM +0200, Andrea Bolognani wrote: > On Thu, 2019-10-10 at 08:55 +0200, Erik Skultety wrote: > > On Wed, Oct 09, 2019 at 02:01:37PM +0200, Peter Krempa wrote: > > > On Wed, Oct 09, 2019 at 12:37:15 +0100, Daniel Berrange wrote: > > > > Note that the check-spacing.py

Re: [libvirt] [PATCH v2 1/1] IDE: deprecate ide-drive

2019-10-10 Thread Thomas Huth
On 10/10/2019 00.43, John Snow wrote: > It's an old compatibility shim that just delegates to ide-cd or ide-hd. > I'd like to refactor these some day, and getting rid of the super-object > will make that easier. > > Either way, we don't need this. > > Libvirt-checked-by: Peter Krempa >

Re: [libvirt] [PATCH 0/2] qemu: Add support for host-model pseries machine option

2019-10-10 Thread Daniel P . Berrangé
On Wed, Oct 09, 2019 at 02:29:37PM -0300, Fabiano Rosas wrote: > Daniel P. Berrangé writes: > > > What userspace tool is broken, and in what way ? > > The major use case, as far as I know, is from software license > managers which use this to determine how much to charge for > software. I would

Re: [libvirt] [PATCH v2 1/1] IDE: deprecate ide-drive

2019-10-10 Thread Markus Armbruster
John Snow writes: > It's an old compatibility shim that just delegates to ide-cd or ide-hd. > I'd like to refactor these some day, and getting rid of the super-object > will make that easier. > > Either way, we don't need this. > > Libvirt-checked-by: Peter Krempa > Signed-off-by: John Snow

[libvirt] [PATCH] qemu_process: Initialize domain definition for QMP query

2019-10-10 Thread Michal Privoznik
When constructing QMP capabilities we allocate a dummy domain object to pass to qemuMonitorOpen(). However, after 75dd595861 the function also expects domain definition to be allocated for the domain object. The referenced commit already fixed qemumonitortestutils.c but forgot to fix the other

Re: [libvirt] [PATCH 1/2] qemu: Fix @vm locking issue when connecting to the monitor

2019-10-10 Thread Michal Privoznik
On 10/9/19 11:42 PM, Jonathon Jongsma wrote: This change gives me a segfault at startup when running libvirtd from my working directory. Reverting these two patches solves the issue. Oops, yes. The qemuProcessQMPConnectMonitor() needs the same treatement as qemuMonitorCommonTestNew(). Since

Re: [libvirt] Limiting old version back compat for language bindings ?

2019-10-10 Thread Andrea Bolognani
On Mon, 2019-10-07 at 16:29 +0100, Daniel P. Berrangé wrote: > On Mon, Oct 07, 2019 at 04:58:34PM +0200, Andrea Bolognani wrote: > > It seems to me that people who want to run the latest version of > > whatever application will also use a non-obsolete operating system, > > and conversely people

Re: [libvirt] [PATCH v4 00/26] scripts: convert most perl scripts to python

2019-10-10 Thread Andrea Bolognani
On Thu, 2019-10-10 at 08:55 +0200, Erik Skultety wrote: > On Wed, Oct 09, 2019 at 02:01:37PM +0200, Peter Krempa wrote: > > On Wed, Oct 09, 2019 at 12:37:15 +0100, Daniel Berrange wrote: > > > Note that the check-spacing.py script is significantly > > > slower in Python than in Perl. After

Re: [libvirt] [PATCH v3 01/12] conf: add replug option for usb hostdev

2019-10-10 Thread Nikolay Shirokovskiy
On 09.10.2019 20:02, Jonathon Jongsma wrote: > On Tue, 2019-09-17 at 16:47 +0300, Nikolay Shirokovskiy wrote: >> If usb device attached to a domain is unplugged from host and >> then plugged back then it will no longer be available in guest. >> We are going to support this case so that device

Re: [libvirt] [PATCH v4 00/26] scripts: convert most perl scripts to python

2019-10-10 Thread Erik Skultety
On Wed, Oct 09, 2019 at 02:01:37PM +0200, Peter Krempa wrote: > On Wed, Oct 09, 2019 at 12:37:15 +0100, Daniel Berrange wrote: > > [...] > > > - src/rpc/gendispatch.pl > > - src/rpc/genprotocol.pl > > - tools/wireshark/util/genxdrstub.pl > > [...] > > > Note that the check-spacing.py script is