[Pkg-libvirt-commits] [Git][libvirt-team/libosinfo][debian/sid] 2 commits: Cherry-pick patch to fix build failure with libxml 2.14
Jeremy Bícha (@jbicha)
gitlab at salsa.debian.org
Sat Aug 16 13:48:16 BST 2025
Jeremy Bícha pushed to branch debian/sid at Libvirt Packaging Team / libosinfo
Commits:
658deaad by Jeremy Bícha at 2025-08-16T08:47:04-04:00
Cherry-pick patch to fix build failure with libxml 2.14
Closes: #1106230
- - - - -
35bcf24b by Jeremy Bícha at 2025-08-16T08:48:00-04:00
releasing package libosinfo version 1.12.0-3
- - - - -
3 changed files:
- debian/changelog
- + debian/patches/loader-don-t-use-libxml2-deprecated-APIs.patch
- + debian/patches/series
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+libosinfo (1.12.0-3) unstable; urgency=medium
+
+ * Team upload
+ * Cherry-pick patch to fix build failure with libxml 2.14 (Closes: #1106230)
+
+ -- Jeremy Bícha <jbicha at ubuntu.com> Sat, 16 Aug 2025 08:47:09 -0400
+
libosinfo (1.12.0-2) unstable; urgency=medium
* d/rules: run meson test with --timeout-multiplier 3
=====================================
debian/patches/loader-don-t-use-libxml2-deprecated-APIs.patch
=====================================
@@ -0,0 +1,82 @@
+From: Roman Bogorodskiy <bogorodskiy at gmail.com>
+Date: Thu, 10 Apr 2025 13:54:02 +0200
+Subject: loader: don't use libxml2 deprecated APIs
+
+Address the following items:
+
+ - Deprecated direct access to buf's content
+ - Mismatching error function signature
+ - Deprecated direct access to ctxt's lastError
+
+Signed-off-by: Roman Bogorodskiy <bogorodskiy at gmail.com>
+(cherry picked from commit 0adf38535637ec668e658d43f04f60f11f51574f)
+
+Origin: upstream, after 1.12.0
+---
+ osinfo/osinfo_loader.c | 42 +++++++++++++++++++++++-------------------
+ 1 file changed, 23 insertions(+), 19 deletions(-)
+
+diff --git a/osinfo/osinfo_loader.c b/osinfo/osinfo_loader.c
+index 0a9004a..b3fd453 100644
+--- a/osinfo/osinfo_loader.c
++++ b/osinfo/osinfo_loader.c
+@@ -354,7 +354,7 @@ osinfo_loader_doc(const char *xpath,
+ xmlXPathFreeObject(obj);
+ OSINFO_LOADER_SET_ERROR(err, "Cannot format stylesheet");
+ }
+- ret = g_strdup((char *)buf->content);
++ ret = g_strdup((char *)xmlBufferContent(buf));
+
+ xmlBufferFree(buf);
+ xmlXPathFreeObject(obj);
+@@ -1902,28 +1902,32 @@ static void osinfo_loader_root(OsinfoLoader *loader,
+ }
+
+ static void
+-catchXMLError(void *ctx, const char *msg ATTRIBUTE_UNUSED, ...)
++catchXMLError(void *ctx, const char *msg, ...)
+ {
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
++ const xmlError *xmlErr = NULL;
++ g_autofree gchar *xmlmsg = NULL;
+
+- if (ctxt && ctxt->_private) {
+- GError **err = ctxt->_private;
+- if (!error_is_set(err)) {
+- gchar *xmlmsg;
+- if (ctxt->lastError.file) {
+- xmlmsg = g_strdup_printf("%s:%d: %s",
+- ctxt->lastError.file,
+- ctxt->lastError.line,
+- ctxt->lastError.message);
+- } else {
+- xmlmsg = g_strdup_printf("at line %d: %s",
+- ctxt->lastError.line,
+- ctxt->lastError.message);
+- }
+- OSINFO_LOADER_SET_ERROR(ctxt->_private, xmlmsg);
+- g_free(xmlmsg);
+- }
++ if (!ctxt || !ctxt->_private)
++ return;
++
++ if (error_is_set(ctxt->_private))
++ return;
++
++ if (!(xmlErr = xmlCtxtGetLastError(ctx)))
++ return;
++
++ if (xmlErr->file) {
++ xmlmsg = g_strdup_printf("%s:%d: %s",
++ xmlErr->file,
++ xmlErr->line,
++ xmlErr->message);
++ } else {
++ xmlmsg = g_strdup_printf("at line %d: %s",
++ xmlErr->line,
++ xmlErr->message);
+ }
++ OSINFO_LOADER_SET_ERROR(ctxt->_private, xmlmsg);
+ }
+
+ static void osinfo_loader_process_xml(OsinfoLoader *loader,
=====================================
debian/patches/series
=====================================
@@ -0,0 +1 @@
+loader-don-t-use-libxml2-deprecated-APIs.patch
View it on GitLab: https://salsa.debian.org/libvirt-team/libosinfo/-/compare/e1300f8c7410b8bd82337d1ccbb039fc608098d9...35bcf24b6abd9529651a5b775f4ac8e863d7eaae
--
View it on GitLab: https://salsa.debian.org/libvirt-team/libosinfo/-/compare/e1300f8c7410b8bd82337d1ccbb039fc608098d9...35bcf24b6abd9529651a5b775f4ac8e863d7eaae
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-libvirt-commits/attachments/20250816/4996e8f2/attachment-0001.htm>
More information about the Pkg-libvirt-commits
mailing list