[libvirt PATCH 10/10] virsh: snapshot: remove pointless cleanup labels

2021-08-10 Thread Ján Tomko
Signed-off-by: Ján Tomko --- tools/virsh-snapshot.c | 130 +++-- 1 file changed, 46 insertions(+), 84 deletions(-) diff --git a/tools/virsh-snapshot.c b/tools/virsh-snapshot.c index 889959640d..ee99d0e061 100644 --- a/tools/virsh-snapshot.c +++

[libvirt PATCH 09/10] virsh: snapshot: use g_auto where possible

2021-08-10 Thread Ján Tomko
Signed-off-by: Ján Tomko --- tools/virsh-snapshot.c | 135 + 1 file changed, 43 insertions(+), 92 deletions(-) diff --git a/tools/virsh-snapshot.c b/tools/virsh-snapshot.c index 350f9e803c..889959640d 100644 --- a/tools/virsh-snapshot.c +++

[libvirt PATCH 08/10] virsh: checkpoint: remove pointless cleanup labels

2021-08-10 Thread Ján Tomko
Signed-off-by: Ján Tomko --- tools/virsh-checkpoint.c | 87 ++-- 1 file changed, 29 insertions(+), 58 deletions(-) diff --git a/tools/virsh-checkpoint.c b/tools/virsh-checkpoint.c index 5c1d25ecf8..1f3a318014 100644 --- a/tools/virsh-checkpoint.c +++

[libvirt PATCH 04/10] virsh: checkpoint: move variables inside the loop

2021-08-10 Thread Ján Tomko
Use g_auto to free them instead of open-coding it. Signed-off-by: Ján Tomko --- tools/virsh-checkpoint.c | 19 --- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/tools/virsh-checkpoint.c b/tools/virsh-checkpoint.c index e88f9ffb47..2b89f376c9 100644 ---

[libvirt PATCH 06/10] virsh: cmdCheckpointInfo: delete unused variables

2021-08-10 Thread Ján Tomko
Signed-off-by: Ján Tomko --- tools/virsh-checkpoint.c | 4 1 file changed, 4 deletions(-) diff --git a/tools/virsh-checkpoint.c b/tools/virsh-checkpoint.c index 2b89f376c9..9e942a226b 100644 --- a/tools/virsh-checkpoint.c +++ b/tools/virsh-checkpoint.c @@ -478,8 +478,6 @@

[libvirt PATCH 05/10] virsh: snapshot: move variables inside the loop

2021-08-10 Thread Ján Tomko
Use g_auto to free them, instead of open-coding it. Signed-off-by: Ján Tomko --- tools/virsh-snapshot.c | 23 +-- 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/tools/virsh-snapshot.c b/tools/virsh-snapshot.c index e64117785c..350f9e803c 100644 ---

[libvirt PATCH 07/10] virsh: checkpoint: use g_auto where possible

2021-08-10 Thread Ján Tomko
Signed-off-by: Ján Tomko --- tools/virsh-checkpoint.c | 78 +--- 1 file changed, 24 insertions(+), 54 deletions(-) diff --git a/tools/virsh-checkpoint.c b/tools/virsh-checkpoint.c index 9e942a226b..5c1d25ecf8 100644 --- a/tools/virsh-checkpoint.c +++

[libvirt PATCH 02/10] virsh: add cleanup function for virshDomainCheckpoint

2021-08-10 Thread Ján Tomko
Signed-off-by: Ján Tomko --- tools/virsh-util.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/virsh-util.h b/tools/virsh-util.h index 87673bce9f..ba79d04fb8 100644 --- a/tools/virsh-util.h +++ b/tools/virsh-util.h @@ -50,8 +50,10 @@ void virshSecretFree(virSecretPtr secret);

[libvirt PATCH 01/10] vsh: table: define cleanup function

2021-08-10 Thread Ján Tomko
Signed-off-by: Ján Tomko --- tools/vsh-table.h | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/vsh-table.h b/tools/vsh-table.h index a8cfca62d5..5ce416cfa1 100644 --- a/tools/vsh-table.h +++ b/tools/vsh-table.h @@ -30,3 +30,4 @@ vshTable *vshTableNew(const char *format, ...); int

[libvirt PATCH 03/10] virsh: add cleanup function for virshDomainSnapshot

2021-08-10 Thread Ján Tomko
Signed-off-by: Ján Tomko --- tools/virsh-util.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/virsh-util.h b/tools/virsh-util.h index ba79d04fb8..6115b05d4d 100644 --- a/tools/virsh-util.h +++ b/tools/virsh-util.h @@ -55,8 +55,10 @@ void

[libvirt PATCH 00/10] virsh: moments: use g_auto more (glib chronicles)

2021-08-10 Thread Ján Tomko
Ján Tomko (10): vsh: table: define cleanup function virsh: add cleanup function for virshDomainCheckpoint virsh: add cleanup function for virshDomainSnapshot virsh: checkpoint: move variables inside the loop virsh: snapshot: move variables inside the loop virsh: cmdCheckpointInfo:

[libvirt PATCH 2/5] vsh: cmdEcho: use separate variable for argument

2021-08-10 Thread Ján Tomko
Do not use 'arg' which is later used for an allocated string. Signed-off-by: Ján Tomko --- tools/vsh.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/vsh.c b/tools/vsh.c index 3bbaecd2ea..bf32a8dc22 100644 --- a/tools/vsh.c +++ b/tools/vsh.c @@ -3199,17

[libvirt PATCH 1/5] vsh: do not cast away const

2021-08-10 Thread Ján Tomko
Instead of using the same variable to store either a const pointer or an allocated string, always make a copy. Signed-off-by: Ján Tomko --- tools/vsh.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tools/vsh.c b/tools/vsh.c index 123284c636..3bbaecd2ea 100644

[libvirt PATCH 0/5] vsh: use g_auto more (glib chronicles)

2021-08-10 Thread Ján Tomko
Except for vshCommandParse. -EPARSE Ján Tomko (5): vsh: do not cast away const vsh: cmdEcho: use separate variable for argument vsh: use g_auto where possible vsh: remove pointless cleanup labels vsh: use g_clear_pointer tools/vsh.c | 91

[libvirt PATCH 4/5] vsh: remove pointless cleanup labels

2021-08-10 Thread Ján Tomko
Remove cleanup sections that are no longer needed, as well as unnecessary 'ret' variables. Signed-off-by: Ján Tomko --- tools/vsh.c | 18 +- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/tools/vsh.c b/tools/vsh.c index 71fbb7401f..f4b555fb8b 100644 ---

[libvirt PATCH 3/5] vsh: use g_auto where possible

2021-08-10 Thread Ján Tomko
Excluding vshCommandParse. Signed-off-by: Ján Tomko --- tools/vsh.c | 46 ++ 1 file changed, 14 insertions(+), 32 deletions(-) diff --git a/tools/vsh.c b/tools/vsh.c index bf32a8dc22..71fbb7401f 100644 --- a/tools/vsh.c +++ b/tools/vsh.c @@ -122,7

[libvirt PATCH 5/5] vsh: use g_clear_pointer

2021-08-10 Thread Ján Tomko
Replace remaining uses of VIR_FREE with g_clear_pointer. Signed-off-by: Ján Tomko --- tools/vsh.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tools/vsh.c b/tools/vsh.c index f4b555fb8b..1f384d4ea6 100644 --- a/tools/vsh.c +++ b/tools/vsh.c @@ -2253,10 +2253,7 @@

Re: [libvirt PATCH 09/13] selinux: introduce meson option for selinux policy install

2021-08-10 Thread Daniel P . Berrangé
On Tue, Aug 10, 2021 at 11:10:56AM +0200, Pavel Hrdina wrote: > On Fri, Aug 06, 2021 at 06:48:06PM +0100, Daniel P. Berrangé wrote: > > The /etc/os-release file may not even exist on OS and checking specific > > OS names / versions in the build rules duplicates conditions that are > > set in the

Re: [libvirt PATCH 01/13] security: add SELinux policy for virt

2021-08-10 Thread Daniel P . Berrangé
On Tue, Aug 10, 2021 at 10:39:23AM +0200, Pavel Hrdina wrote: > On Fri, Aug 06, 2021 at 06:47:58PM +0100, Daniel P. Berrangé wrote: > > From: Nikola Knazekova > > > > SELinux policy was created for: > > > > Hypervisor drivers: > > - virtqemud (QEMU/KVM) > > - virtlxcd (LXC) > > - virtvboxd

Re: [libvirt PATCH] meson: Always use the / operator to join paths

2021-08-10 Thread Daniel P . Berrangé
On Tue, Aug 10, 2021 at 05:54:28PM +0200, Andrea Bolognani wrote: > This is the preferred way to do it, but there were a few > instances in which some of the path components had embedded > slashes instead. > > Signed-off-by: Andrea Bolognani > --- > docs/internals/meson.build | 2 +- >

[libvirt PATCH] meson: Always use the / operator to join paths

2021-08-10 Thread Andrea Bolognani
This is the preferred way to do it, but there were a few instances in which some of the path components had embedded slashes instead. Signed-off-by: Andrea Bolognani --- docs/internals/meson.build | 2 +- docs/kbase/meson.build | 2 +- docs/manpages/meson.build | 2 +-

Re: [PATCH 1/4] test_driver: Implement virDomainGetJobInfo

2021-08-10 Thread Martin Kletzander
On Thu, Jul 22, 2021 at 03:13:22PM +0800, Luke Yue wrote: As in testDomainGetControlInfo, a background job should be running between 0-1 seconds, so make the testDomainGetJobInfo consistent with it. Signed-off-by: Luke Yue --- src/test/test_driver.c | 51

Re: [PATCH v2 0/4] interface define: add support for validation against schema

2021-08-10 Thread Jano Tomko
On a %A in %Y, Kristina Hanicova wrote: > On Fri, Aug 6, 2021 at 4:26 PM Kristina Hanicova > wrote: > >> This is v2 of: >> https://listman.redhat.com/archives/libvir-list/2021-August/msg00187.html >> >> Changes since v1 (suggested by Peter): >> * split of the patch containing api and virsh

Re: [PATCH 0/4] qemu: Open chardev logfile on behalf of QEMU

2021-08-10 Thread Jano Tomko
On a %A in %Y, Michal Privoznik wrote: > See 4/4 for explanation. > > Michal Prívozník (4): > virDomainDefGetSecurityLabelDef: Fix const correctness > qemuDomainOpenFile: Take virDomainDef instead of virDomainObj > qemuDomainOpenFile: Take @cfg instead of driver > qemu: Open chardev

Re: [PATCH v2 0/4] interface define: add support for validation against schema

2021-08-10 Thread Kristina Hanicova
On Fri, Aug 6, 2021 at 4:26 PM Kristina Hanicova wrote: > This is v2 of: > https://listman.redhat.com/archives/libvir-list/2021-August/msg00187.html > > Changes since v1 (suggested by Peter): > * split of the patch containing api and virsh adjustments into separate > patches > * change of

Re: [PATCH 0/4] qemu: Open chardev logfile on behalf of QEMU

2021-08-10 Thread Pavel Hrdina
On Fri, Aug 06, 2021 at 05:22:34PM +0200, Michal Privoznik wrote: > See 4/4 for explanation. > > Michal Prívozník (4): > virDomainDefGetSecurityLabelDef: Fix const correctness > qemuDomainOpenFile: Take virDomainDef instead of virDomainObj > qemuDomainOpenFile: Take @cfg instead of driver >

Re: [PATCH v2] domain_conf: Fix memory leak when free'ing virDomainObj

2021-08-10 Thread Pavel Hrdina
On Tue, Aug 10, 2021 at 09:47:21PM +0800, Luke Yue wrote: > Free dom->deprecations when free'ing virDomainObj > > Signed-off-by: Luke Yue > --- > src/conf/domain_conf.c | 11 +++ > 1 file changed, 11 insertions(+) Reviewed-by: Pavel Hrdina signature.asc Description: PGP signature

[PATCH v2] domain_conf: Fix memory leak when free'ing virDomainObj

2021-08-10 Thread Luke Yue
Free dom->deprecations when free'ing virDomainObj Signed-off-by: Luke Yue --- src/conf/domain_conf.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 09da4ab952..7e1d30bdb2 100644 --- a/src/conf/domain_conf.c +++

Re: [PATCH 1/2] virDomain: interface: add virNetDevOpenvswitchInterfaceClearTxQos and virNetDevOpenvswitchInterfaceClearRxQos.

2021-08-10 Thread Pavel Hrdina
On Mon, Aug 09, 2021 at 10:05:59AM +0800, zhangjl02 wrote: > From: Jinsheng Zhang > > Instead of cleaning all qos rules each time new qos is set, tx and rx's qos > can be set or clean respectively. > Replace virReportError with VIR_WARN to let the cleaning process continue > when error occurs.

Re: [PATCH] domain_conf: Fix memory leak when free'ing virDomainObj

2021-08-10 Thread Luke Yue
On Tue, 2021-08-10 at 11:51 +0200, Pavel Hrdina wrote: > On Mon, Aug 09, 2021 at 03:04:35PM +0800, Luke Yue wrote: > > Free dom->deprecations when free'ing virDomainObj > > > > Signed-off-by: Luke Yue > > --- > >  src/conf/domain_conf.c | 6 ++ > >  1 file changed, 6 insertions(+) > > > >

Re: [libvirt PATCH 2/2] meson: Detect and reject invalid rst2html5 command

2021-08-10 Thread Andrea Bolognani
On Tue, Aug 10, 2021 at 11:05:42AM +0100, Daniel P. Berrangé wrote: > On Mon, Aug 09, 2021 at 05:13:29PM +0200, Andrea Bolognani wrote: > > The version coming from the rst2html5 package instead of the > > docutils package is unable to successfully generate the libvirt > > documentation. > > > >

Re: [libvirt PATCH 2/2] meson: Detect and reject invalid rst2html5 command

2021-08-10 Thread Daniel P . Berrangé
On Mon, Aug 09, 2021 at 05:13:29PM +0200, Andrea Bolognani wrote: > The version coming from the rst2html5 package instead of the > docutils package is unable to successfully generate the libvirt > documentation. > > Examples of users encountering build issues because of the wrong > version of

Re: [libvirt PATCH 0/2] meson: Detect and reject invalid rst2html5 command

2021-08-10 Thread Pavel Hrdina
On Mon, Aug 09, 2021 at 05:13:27PM +0200, Andrea Bolognani wrote: > Previous attempt at solving this issue: > > https://listman.redhat.com/archives/libvir-list/2021-June/msg00097.html > > The solution presented here should be way more future-proof, though > there's of course always the risk

Re: [PATCH] domain_conf: Fix memory leak when free'ing virDomainObj

2021-08-10 Thread Pavel Hrdina
On Mon, Aug 09, 2021 at 03:04:35PM +0800, Luke Yue wrote: > Free dom->deprecations when free'ing virDomainObj > > Signed-off-by: Luke Yue > --- > src/conf/domain_conf.c | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c > index

Re: [libvirt PATCH 00/13] selinux: introduce sVirt policy and build

2021-08-10 Thread Pavel Hrdina
On Fri, Aug 06, 2021 at 06:47:57PM +0100, Daniel P. Berrangé wrote: > This is an extension of > > https://listman.redhat.com/archives/libvir-list/2021-July/msg00167.html > > The original patches from that series are unchanged apart from the > commit message, and tweak to the min fedora version

Re: [libvirt PATCH 09/13] selinux: introduce meson option for selinux policy install

2021-08-10 Thread Pavel Hrdina
On Fri, Aug 06, 2021 at 06:48:06PM +0100, Daniel P. Berrangé wrote: > The /etc/os-release file may not even exist on OS and checking specific > OS names / versions in the build rules duplicates conditions that are > set in the RPM. > > Instead we just look for existance of the tools we need to

Re: [libvirt PATCH 07/13] rpm: move logic for setting selinux policy variables

2021-08-10 Thread Pavel Hrdina
On Fri, Aug 06, 2021 at 06:48:04PM +0100, Daniel P. Berrangé wrote: > It is currently mixed in with the comment and variables controlling the > min OS version. > > Signed-off-by: Daniel P. Berrangé > --- > libvirt.spec.in | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-) > >

Re: [libvirt PATCH 01/13] security: add SELinux policy for virt

2021-08-10 Thread Pavel Hrdina
On Fri, Aug 06, 2021 at 06:47:58PM +0100, Daniel P. Berrangé wrote: > From: Nikola Knazekova > > SELinux policy was created for: > > Hypervisor drivers: > - virtqemud (QEMU/KVM) > - virtlxcd (LXC) > - virtvboxd (VirtualBox) > > Secondary drivers: > - virtstoraged (host storage mgmt) > -