Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package libvirt for openSUSE:Factory checked 
in at 2021-12-16 21:18:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libvirt (Old)
 and      /work/SRC/openSUSE:Factory/.libvirt.new.2520 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libvirt"

Thu Dec 16 21:18:51 2021 rev:345 rq:940538 version:7.10.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/libvirt/libvirt.changes  2021-12-06 
23:59:09.060613461 +0100
+++ /work/SRC/openSUSE:Factory/.libvirt.new.2520/libvirt.changes        
2021-12-16 21:19:18.450521130 +0100
@@ -1,0 +2,14 @@
+Tue Dec 14 16:36:15 UTC 2021 - James Fehlig <jfeh...@suse.com>
+
+- libxl: Implement domainGetMessages API
+  cbae4eaa-libxl-add-domainGetMessages.patch
+  bsc##1193623
+
+-------------------------------------------------------------------
+Mon Dec 13 15:15:35 UTC 2021 - James Fehlig <jfeh...@suse.com>
+
+- Don't spawn pkttyagent when stdin is not a tty
+  0001-util-Don-t-spawn-pkttyagent-when-stdin-is-not-a-tty.patch
+  bsc#1193574
+
+-------------------------------------------------------------------

New:
----
  0001-util-Don-t-spawn-pkttyagent-when-stdin-is-not-a-tty.patch
  cbae4eaa-libxl-add-domainGetMessages.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libvirt.spec ++++++
--- /var/tmp/diff_new_pack.WTlra4/_old  2021-12-16 21:19:19.758521628 +0100
+++ /var/tmp/diff_new_pack.WTlra4/_new  2021-12-16 21:19:19.758521628 +0100
@@ -292,9 +292,11 @@
 Patch3:         b9a5faea-libxl-handle-death-thread.patch
 Patch4:         5c5df531-libxl-search-domid-in-thread.patch
 Patch5:         a7a03324-libxl-protect-logger-access.patch
+Patch6:         cbae4eaa-libxl-add-domainGetMessages.patch
 # Patches pending upstream review
 Patch100:       libxl-dom-reset.patch
 Patch101:       network-don-t-use-dhcp-authoritative-on-static-netwo.patch
+Patch102:       0001-util-Don-t-spawn-pkttyagent-when-stdin-is-not-a-tty.patch
 # Need to go upstream
 Patch150:       libvirt-power8-models.patch
 Patch151:       ppc64le-canonical-name.patch

++++++ 0001-libxl-add-support-for-BlockResize-API.patch ++++++
--- /var/tmp/diff_new_pack.WTlra4/_old  2021-12-16 21:19:19.794521642 +0100
+++ /var/tmp/diff_new_pack.WTlra4/_new  2021-12-16 21:19:19.798521643 +0100
@@ -119,7 +119,7 @@
  static int
  libxlDomainGetJobInfo(virDomainPtr dom,
                        virDomainJobInfoPtr info)
-@@ -6552,6 +6641,7 @@ static virHypervisorDriver libxlHypervis
+@@ -6575,6 +6664,7 @@ static virHypervisorDriver libxlHypervis
      .domainGetNumaParameters = libxlDomainGetNumaParameters, /* 1.1.1 */
      .nodeGetFreeMemory = libxlNodeGetFreeMemory, /* 0.9.0 */
      .nodeGetCellsFreeMemory = libxlNodeGetCellsFreeMemory, /* 1.1.1 */

++++++ 0001-util-Don-t-spawn-pkttyagent-when-stdin-is-not-a-tty.patch ++++++
>From 306f15c98fb5626f35f876b1f3fa39dee37e5810 Mon Sep 17 00:00:00 2001
From: Martin Kletzander <mklet...@redhat.com>
Date: Sat, 11 Dec 2021 14:23:11 +0100
Subject: [PATCH] util: Don't spawn pkttyagent when stdin is not a tty

My idea was that running pkttyagent unconditionally, modulo checks that
pkttyagent itself does to make sure it does not fail, is not going to be an
issue turned out to be wrong.  Adding back the original check for stdin being a
tty helps in some testing scenarios as reported by Jim Fehlig and does not
really cause any issues.  I originally wanted it in because it also made
pkttyagent auth work with redirected input into virsh (with a connection that
requires polkit authentication and without a session-wide polkit tty agent,
basically making pkttyagent necessary to succeed).  But anyone running virsh
like that is asking for problems already anyway =)

Signed-off-by: Martin Kletzander <mklet...@redhat.com>
---
 src/util/virpolkit.c | 3 +++
 1 file changed, 3 insertions(+)

Index: libvirt-7.10.0/src/util/virpolkit.c
===================================================================
--- libvirt-7.10.0.orig/src/util/virpolkit.c
+++ libvirt-7.10.0/src/util/virpolkit.c
@@ -237,6 +237,9 @@ virPolkitAgentAvailable(void)
     const char *termid = ctermid(NULL);
     VIR_AUTOCLOSE fd = -1;
 
+    if (!isatty(STDIN_FILENO))
+        return false;
+
     if (!virFileIsExecutable(PKTTYAGENT))
         return false;
 

++++++ cbae4eaa-libxl-add-domainGetMessages.patch ++++++
commit cbae4eaa19dd97da8b4330af80cf1e1f7cb21931
Author: Jim Fehlig <jfeh...@suse.com>
Date:   Mon Dec 13 16:59:55 2021 -0700

    libxl: Implement domainGetMessages API
    
    Since commit 46783e6307a, the 'virsh dominfo' command calls
    virDomainGetMessages to report any messages from the domain.
    Hypervisors not implementing the API now get the following
    libvirtd log message when clients invoke 'virsh dominfo'
    
    this function is not supported by the connection driver: 
virDomainGetMessages
    
    Although libxl currently does not support any tainting or
    deprecation messages, provide an implementation to squelch
    the previously unseen error message when collecting dominfo.
    
    Signed-off-by: Jim Fehlig <jfeh...@suse.com>
    Reviewed-by: Michal Privoznik <mpriv...@redhat.com>

Index: libvirt-7.10.0/src/libxl/libxl_driver.c
===================================================================
--- libvirt-7.10.0.orig/src/libxl/libxl_driver.c
+++ libvirt-7.10.0/src/libxl/libxl_driver.c
@@ -6406,6 +6406,29 @@ libxlDomainGetMetadata(virDomainPtr dom,
     return ret;
 }
 
+static int
+libxlDomainGetMessages(virDomainPtr dom,
+                      char ***msgs,
+                      unsigned int flags)
+{
+    virDomainObj *vm = NULL;
+    int ret = -1;
+
+    virCheckFlags(0, -1);
+
+    if (!(vm = libxlDomObjFromDomain(dom)))
+        return -1;
+
+    if (virDomainGetMessagesEnsureACL(dom->conn, vm->def) < 0)
+        goto cleanup;
+
+    ret = virDomainObjGetMessages(vm, msgs, flags);
+
+ cleanup:
+    virDomainObjEndAPI(&vm);
+    return ret;
+}
+
 static virHypervisorDriver libxlHypervisorDriver = {
     .name = LIBXL_DRIVER_EXTERNAL_NAME,
     .connectURIProbe = libxlConnectURIProbe,
@@ -6519,6 +6542,7 @@ static virHypervisorDriver libxlHypervis
     .connectBaselineCPU = libxlConnectBaselineCPU, /* 2.3.0 */
     .domainSetMetadata = libxlDomainSetMetadata, /* 5.7.0 */
     .domainGetMetadata = libxlDomainGetMetadata, /* 5.7.0 */
+    .domainGetMessages = libxlDomainGetMessages, /* 8.0.0 */
 
 };
 


++++++ libxl-dom-reset.patch ++++++
--- /var/tmp/diff_new_pack.WTlra4/_old  2021-12-16 21:19:19.902521683 +0100
+++ /var/tmp/diff_new_pack.WTlra4/_new  2021-12-16 21:19:19.906521684 +0100
@@ -76,7 +76,7 @@
  libxlDomainDestroyFlags(virDomainPtr dom,
                          unsigned int flags)
  {
-@@ -6430,6 +6487,7 @@ static virHypervisorDriver libxlHypervis
+@@ -6453,6 +6510,7 @@ static virHypervisorDriver libxlHypervis
      .domainShutdown = libxlDomainShutdown, /* 0.9.0 */
      .domainShutdownFlags = libxlDomainShutdownFlags, /* 0.9.10 */
      .domainReboot = libxlDomainReboot, /* 0.9.0 */

Reply via email to