Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package gerbera for openSUSE:Factory checked 
in at 2026-09-10 15:40:05
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gerbera (Old)
 and      /work/SRC/openSUSE:Factory/.gerbera.new.1265 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "gerbera"

Thu Sep 10 15:40:05 2026 rev:30 rq:1376867 version:3.2.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/gerbera/gerbera.changes  2026-03-23 
17:16:48.794271155 +0100
+++ /work/SRC/openSUSE:Factory/.gerbera.new.1265/gerbera.changes        
2026-09-10 15:40:06.778794709 +0200
@@ -1,0 +2,7 @@
+Thu Sep 10 08:32:59 UTC 2026 - Paolo Stivanin <[email protected]>
+
+- Add gerbera-pugixml-1.16-tests.patch to fix ExampleConfigGeneratorTest
+  with pugixml >= 1.16, which prints empty elements as <node /> instead
+  of <node></node> (gh#gerbera/gerbera#3890).
+
+-------------------------------------------------------------------

New:
----
  gerbera-pugixml-1.16-tests.patch

----------(New B)----------
  New:
- Add gerbera-pugixml-1.16-tests.patch to fix ExampleConfigGeneratorTest
  with pugixml >= 1.16, which prints empty elements as <node /> instead
----------(New E)----------

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

Other differences:
------------------
++++++ gerbera.spec ++++++
--- /var/tmp/diff_new_pack.NySR2q/_old  2026-09-10 15:40:07.558827437 +0200
+++ /var/tmp/diff_new_pack.NySR2q/_new  2026-09-10 15:40:07.560827521 +0200
@@ -36,6 +36,8 @@
 Patch0:         harden_gerbera.service.patch
 # PATCH-FIX-OPENSUSE - build executables as PIE
 Patch1:         gerbera-cmake-pie.patch
+# PATCH-FIX-UPSTREAM gh#gerbera/gerbera#3890 - fix config generator tests with 
pugixml >= 1.16
+Patch2:         gerbera-pugixml-1.16-tests.patch
 BuildRequires:  apache-rpm-macros
 BuildRequires:  ccache
 BuildRequires:  cmake >= 3.25

++++++ gerbera-pugixml-1.16-tests.patch ++++++
From: Paolo Stivanin
Subject: Fix ExampleConfigGeneratorTest with pugixml >= 1.16
References: https://github.com/gerbera/gerbera/pull/3890

pugixml 1.16 prints elements whose only child is an empty PCDATA node as
empty element tags (<node />) instead of <node></node>, which makes the
generated example config differ from the checked in fixtures.

Normalize both the fixture and the generated output before comparing them,
so the tests pass with pugixml before and after 1.16.

Taken from upstream commit 173e74e3802b28e5369ce887196b65bd2b1352b4.

--- a/test/config/test_configgenerator.cc
+++ b/test/config/test_configgenerator.cc
@@ -335,6 +335,8 @@
     ExampleConfigGeneratorTest() = default;
     ~ExampleConfigGeneratorTest() override = default;
 
+    static std::vector<std::string> pugixml116;
+
     void SetUp() override
     {
         std::shared_ptr<ConfigDefinition> definition = 
std::make_shared<ConfigDefinition>();
@@ -359,6 +361,20 @@
         return str;
     }
 
+    static std::string fixXML(const std::string& input)
+    {
+        // remove UUID, for simple compare...TODO: mock UUID?
+        std::regex 
reg("<udn>uuid:[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}</udn>");
+        auto result = std::regex_replace(input, reg, "<udn/>");
+
+        // pugixml 1.16 prints empty sections in short version
+        for (auto sec : pugixml116) {
+            std::regex reSec(fmt::format("\\>\\</{}\\>", sec), 
std::regex_constants::ECMAScript);
+            result = std::regex_replace(result, reSec, " />");
+        }
+        return result;
+    }
+
     ConfigGenerator* subject;
     std::string homePath;
     std::string configDir;
@@ -366,6 +382,30 @@
     std::string magicFile;
 };
 
+std::vector<std::string> ExampleConfigGeneratorTest::pugixml116 = {
+    "source-docs-link",
+    "ip",
+    "interface",
+    "modelURL",
+    "presentationURL",
+    "virtualURL",
+    "externalURL",
+    "socket",
+    "password",
+    "cache-dir",
+    "genre-map",
+    "auxdata",
+    "metadata",
+    "comment",
+    "visible-directories",
+    "order",
+    "metafile",
+    "resource",
+    "container",
+    "layout",
+    "directories",
+};
+
 #if defined(HAVE_FFMPEG) && defined(HAVE_FFMPEGTHUMBNAILER) && 
defined(HAVE_MYSQL) && defined(HAVE_MAGIC) && defined(HAVE_JS) && 
defined(HAVE_EXIV2) && defined(HAVE_PGSQL) && !defined(HAVE_LASTFM)
 TEST_F(ExampleConfigGeneratorTest, 
GeneratesFullConfigXmlWithExiv2AllDefinitions)
 {
@@ -379,9 +419,8 @@
     replaceAllString(mockXml, "https://docs.gerbera.io/en/latest/";, 
"https://docs.gerbera.io/en/stable/";);
 #endif
 
-    // remove UUID, for simple compare...TODO: mock UUID?
-    std::regex 
reg("<udn>uuid:[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}</udn>");
-    result = std::regex_replace(result, reg, "<udn/>");
+    mockXml = fixXML(mockXml);
+    result = fixXML(result);
 
     EXPECT_STREQ(mockXml.c_str(), result.c_str());
 }
@@ -400,9 +439,8 @@
     replaceAllString(mockXml, "https://docs.gerbera.io/en/latest/";, 
"https://docs.gerbera.io/en/stable/";);
 #endif
 
-    // remove UUID, for simple compare...TODO: mock UUID?
-    std::regex 
reg("<udn>uuid:[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}</udn>");
-    result = std::regex_replace(result, reg, "<udn/>");
+    mockXml = fixXML(mockXml);
+    result = fixXML(result);
 
     EXPECT_STREQ(mockXml.c_str(), result.c_str());
 }
@@ -421,9 +459,8 @@
 #endif
     std::string result = subject->generate(homePath, configDir, prefixDir, 
magicFile);
 
-    // remove UUID, for simple compare...TODO: mock UUID?
-    std::regex 
reg("<udn>uuid:[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}</udn>");
-    result = std::regex_replace(result, reg, "<udn/>");
+    mockXml = fixXML(mockXml);
+    result = fixXML(result);
 
     EXPECT_STREQ(mockXml.c_str(), result.c_str());
 }
@@ -439,9 +476,9 @@
 
     std::string result = subject->generate(homePath, configDir, prefixDir, 
magicFile);
 
-    // remove UUID, for simple compare...TODO: mock UUID?
-    std::regex 
reg("<udn>uuid:[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}</udn>");
-    result = std::regex_replace(result, reg, "<udn/>");
+    mockXml = fixXML(mockXml);
+    result = fixXML(result);
+
     EXPECT_STREQ(mockXml.c_str(), result.c_str());
 }
 #endif

Reply via email to