Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package virt-manager for openSUSE:Factory 
checked in at 2026-10-05 12:54:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/virt-manager (Old)
 and      /work/SRC/openSUSE:Factory/.virt-manager.new.3698736 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "virt-manager"

Mon Oct  5 12:54:31 2026 rev:296 rq:1382188 version:5.1.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/virt-manager/virt-manager.changes        
2026-09-28 10:38:38.508319855 +0200
+++ /work/SRC/openSUSE:Factory/.virt-manager.new.3698736/virt-manager.changes   
2026-10-05 12:54:32.678006640 +0200
@@ -1,0 +2,13 @@
+Fri Oct  2 11:58:05 UTC 2026 - Markéta Machová <[email protected]>
+
+- Add set of upstream patches enabling build with pytest 9.1:
+  * 103-pytest-7-pathlib.patch
+
+-------------------------------------------------------------------
+Mon Sep 28 13:24:27 MDT 2026 - [email protected]
+
+- bsc#1282618 - virt-xml --edit fails with "not well-formed" on
+  domains with a default-namespace metadata element
+  fix-serialization-of-default-unprefixed-XML-namespaces.patch
+
+-------------------------------------------------------------------

New:
----
  103-pytest-7-pathlib.patch
  fix-serialization-of-default-unprefixed-XML-namespaces.patch

----------(New B)----------
  New:- Add set of upstream patches enabling build with pytest 9.1:
  * 103-pytest-7-pathlib.patch
  New:  domains with a default-namespace metadata element
  fix-serialization-of-default-unprefixed-XML-namespaces.patch
----------(New E)----------

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

Other differences:
------------------
++++++ virt-manager.spec ++++++
--- /var/tmp/diff_new_pack.J0lpHr/_old  2026-10-05 12:54:37.178199573 +0200
+++ /var/tmp/diff_new_pack.J0lpHr/_new  2026-10-05 12:54:37.180199658 +0200
@@ -84,6 +84,9 @@
 Patch79:        079-domain-os-add-set_firmware_feature-helper.patch
 Patch80:        
080-cli-add--boot-firmware.enrolled-keys--firmware.secure-boot.patch
 Patch102:       102-virtinst-Set-is_onoff-True-for-iommufd.patch
+Patch103:       103-pytest-7-pathlib.patch
+# Upstream Pull Request https://github.com/virt-manager/virt-manager/pull/1122
+Patch130:       fix-serialization-of-default-unprefixed-XML-namespaces.patch
 # SUSE Only
 Patch150:       virtman-desktop.patch
 Patch151:       virtman-kvm.patch

++++++ 102-virtinst-Set-is_onoff-True-for-iommufd.patch ++++++
--- /var/tmp/diff_new_pack.J0lpHr/_old  2026-10-05 12:54:37.393208791 +0200
+++ /var/tmp/diff_new_pack.J0lpHr/_new  2026-10-05 12:54:37.397208962 +0200
@@ -9,11 +9,9 @@
 Fixes: 9ab2918face14 ("virtinst: add support for iommufd")
 Signed-off-by: Nathan Chen <[email protected]>
 
-diff --git a/virtinst/cli.py b/virtinst/cli.py
-index b5eef0ca7..db7279d02 100644
 --- a/virtinst/cli.py
 +++ b/virtinst/cli.py
-@@ -5312,7 +5312,7 @@ class ParserHostdev(VirtCLIParser):
+@@ -5306,7 +5306,7 @@ class ParserHostdev(VirtCLIParser):
          cls.add_arg("type", "type")
          cls.add_arg("name", None, cb=cls.set_name_cb, 
lookup_cb=cls.name_lookup_cb)
          cls.add_arg("driver.name", "driver_name")

++++++ 103-pytest-7-pathlib.patch ++++++
>From e9c33f08be0c6961a4e09b116281805e31eff29b Mon Sep 17 00:00:00 2001
From: Pino Toscano <[email protected]>
Date: Mon, 30 Jun 2025 14:10:16 +0200
Subject: [PATCH 1/3] tests: port pytest_ignore_collect() to pathlib

Create a pathlib version of the "path" argument of the
pytest_ignore_collect() hook; this will make it easier to the newer
version that uses pathlib directly.

This makes it possible to simplify the check for filenames to ignore:
since the filename is available, use it to do a quick lookup.

Signed-off-by: Pino Toscano <[email protected]>
---
 tests/conftest.py | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/tests/conftest.py b/tests/conftest.py
index 7ec7adf100..38cb09f1f5 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -2,6 +2,7 @@
 # See the COPYING file in the top-level directory.
 
 import os
+import pathlib
 
 import pytest
 
@@ -53,6 +54,7 @@ def pytest_addoption(parser):
 
 
 def pytest_ignore_collect(path, config):
+    collection_path = pathlib.Path(path)
     uitests_requested = config.getoption("--uitests")
 
     # Default --uitests to --verbosity=2
@@ -60,14 +62,14 @@ def pytest_ignore_collect(path, config):
         config.option.verbose = max(2, config.option.verbose)
 
     # Unless explicitly requested, ignore these tests
-    if "test_dist.py" in str(path):
-        return True
-    if "test_urls.py" in str(path):
-        return True
-    if "test_inject.py" in str(path):
+    if collection_path.name in (
+        "test_dist.py",
+        "test_urls.py",
+        "test_inject.py",
+    ):
         return True
 
-    uitest_file = "tests/uitests" in str(path)
+    uitest_file = "tests/uitests" in str(collection_path)
     if uitest_file and not uitests_requested:
         return True
     if not uitest_file and uitests_requested:

>From 9754da8f0dce4b93e007cb1f618302c2a3e12428 Mon Sep 17 00:00:00 2001
From: Pino Toscano <[email protected]>
Date: Mon, 30 Jun 2025 14:20:36 +0200
Subject: [PATCH 2/3] tests: handle "collection_path" and "path" for
 pytest_ignore_collect()

Starting from pytest 7, all the hooks that take a "path" (the legacy
path data type) as parameter (including pytest_ignore_collect()) now
take a "collection_path" (pathlib.Path), and the latter will be the
only option starting from pytest 9.

Since it looks like pluggy (the plugin/hook infrastructure used by
pytest underneath) does not support using "None" to accept extra
arguments in an hook, then the solution is to provide different hooks
according to the pytest version:
- the common implementation is switched to use pathlib.Path, looking
  like the new style of hook; once pytest 7 is assumed, this helper
  function can be switched back to be the actual hook
- declare pytest_ignore_collect() as supported by pytest, using
  "collection_path" as earlier as possible; pytest_ignore_collect()
  is either a no-op wrapper, or builds a pathlib.Path out of the legacy
  type
- pytest.version_tuple was added in pytest 7, so deal with its lack in
  older versions

All in all, there should be no behaviour change in the actual test
collection, and the deprecation warnings should be gone.

Signed-off-by: Pino Toscano <[email protected]>
---
 tests/conftest.py | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/tests/conftest.py b/tests/conftest.py
index 38cb09f1f5..3c07311381 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -53,8 +53,7 @@ def pytest_addoption(parser):
     )
 
 
-def pytest_ignore_collect(path, config):
-    collection_path = pathlib.Path(path)
+def _impl_pytest_ignore_collect(collection_path, config):
     uitests_requested = config.getoption("--uitests")
 
     # Default --uitests to --verbosity=2
@@ -76,6 +75,17 @@ def pytest_ignore_collect(path, config):
         return True
 
 
+if getattr(pytest, "version_tuple", (0,)) >= (7,):
+
+    def pytest_ignore_collect(collection_path, config):
+        return _impl_pytest_ignore_collect(collection_path, config)
+
+else:
+
+    def pytest_ignore_collect(path, config):
+        return _impl_pytest_ignore_collect(pathlib.Path(path), config)
+
+
 def pytest_collection_modifyitems(config, items):
     def find_items(basename):
         return [i for i in items if os.path.basename(i.fspath) == basename]

>From 932ec4f50ef627bc7942e69e695cf1f117aa2c65 Mon Sep 17 00:00:00 2001
From: Pino Toscano <[email protected]>
Date: Mon, 30 Jun 2025 14:56:08 +0200
Subject: [PATCH 3/3] tests: use Node.path when available

pytest 7 adds a "path" attribute to the Node class, which is the base of
the Item class used for items passed to pytest_collection_modifyitems().

Hence use it when available, using an helper function that tries to use
it and fallbacks on the old "fspath".

Signed-off-by: Pino Toscano <[email protected]>
---
 tests/conftest.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/tests/conftest.py b/tests/conftest.py
index 3c07311381..88a710fdd8 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -87,8 +87,14 @@ def pytest_ignore_collect(path, config):
 
 
 def pytest_collection_modifyitems(config, items):
+    def item_path_basename(item):
+        try:
+            return item.path.name
+        except AttributeError:
+            return os.path.basename(item.fspath)
+
     def find_items(basename):
-        return [i for i in items if os.path.basename(i.fspath) == basename]
+        return [i for i in items if item_path_basename(i) == basename]
 
     # Move test_cli cases to the end, because they are slow
     # Move test_checkprops to the very end, because it needs to run

++++++ fix-serialization-of-default-unprefixed-XML-namespaces.patch ++++++
>From b9d2facee1a08e7cf286a8f353af56d2a613f4b7 Mon Sep 17 00:00:00 2001
From: Ryan Ronnander <[email protected]>
Date: Thu, 16 Jul 2026 16:52:45 -0400
Subject: [PATCH] xmletree: fix serialization of default (unprefixed) XML
 namespaces

_convert_qname and the xmlns-writing loop in _serialize_node both
unconditionally prepend the prefix followed by a colon. When the
recorded prefix is empty, i.e. the original namespace was a default
xmlns rather than a prefixed one, this produces a bare colon
(":meta", "xmlns:=") instead of the correct default-namespace form.

That output is not well-formed XML and fails to re-parse, breaking
virt-xml --edit and virt-install --reinstall against any domain with
an inline default-namespace element under a non-root node, for
example <domain><metadata><meta xmlns="...">, a pattern used by
libvirt API consumers such as virter to store their own metadata.

This is specific to the xmletree.py backend, which is only used as
a fallback when the libxml2 Python bindings are unavailable. Verified
the libxml2-based backend (xmllibxml2.py) does not have this bug: it
delegates parsing and serialization to libxml2 directly, which
round-trips the same input correctly. At least one current distro
(openSUSE Tumbleweed) no longer packages those bindings, making the
xmletree.py fallback the only backend available there.

Guard both spots on whether the prefix is non-empty before emitting
the colon.

Signed-off-by: Ryan Ronnander <[email protected]>
---
 virtinst/xmletree.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/virtinst/xmletree.py b/virtinst/xmletree.py
index f1bdcf6b1e..a09fe829d5 100644
--- a/virtinst/xmletree.py
+++ b/virtinst/xmletree.py
@@ -97,7 +97,8 @@ def _convert_qname(tag, namespaces):
         uri, tag = tag[1:].rsplit("}", 1)
         for key, val in namespaces.items():
             if uri == val:
-                tag = key + ":" + tag
+                if key:
+                    tag = key + ":" + tag
                 break
     return tag
 
@@ -120,7 +121,10 @@ def _serialize_node(write, elem, namespaces):
         else:
             write("<" + tag)
             for nsprefix, nsuri in elem.virtinst_namespaces.items():
-                write(' xmlns:%s="%s"' % (nsprefix, nsuri))
+                if nsprefix:
+                    write(' xmlns:%s="%s"' % (nsprefix, nsuri))
+                else:
+                    write(' xmlns="%s"' % nsuri)
             for k, v in list(elem.items()):
                 k = _convert_qname(k, use_ns)
                 v = xmlutil.xml_escape(v)

Reply via email to