summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/libosinfo
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-support/libosinfo')
-rw-r--r--meta-oe/recipes-support/libosinfo/libosinfo/0001-osinfo-Make-xmlError-struct-constant-in-propagate_li.patch32
-rw-r--r--meta-oe/recipes-support/libosinfo/libosinfo/0adf38535637ec668e658d43f04f60f11f51574f.patch86
-rw-r--r--meta-oe/recipes-support/libosinfo/libosinfo_1.12.0.bb (renamed from meta-oe/recipes-support/libosinfo/libosinfo_1.11.0.bb)7
-rw-r--r--meta-oe/recipes-support/libosinfo/osinfo-db-tools_1.12.0.bb20
-rw-r--r--meta-oe/recipes-support/libosinfo/osinfo-db_20250606.bb20
5 files changed, 129 insertions, 36 deletions
diff --git a/meta-oe/recipes-support/libosinfo/libosinfo/0001-osinfo-Make-xmlError-struct-constant-in-propagate_li.patch b/meta-oe/recipes-support/libosinfo/libosinfo/0001-osinfo-Make-xmlError-struct-constant-in-propagate_li.patch
deleted file mode 100644
index 467c6b4baf..0000000000
--- a/meta-oe/recipes-support/libosinfo/libosinfo/0001-osinfo-Make-xmlError-struct-constant-in-propagate_li.patch
+++ /dev/null
@@ -1,32 +0,0 @@
1From 5bbdd06503456784c5ffa22409e8bab50470d673 Mon Sep 17 00:00:00 2001
2From: Michal Privoznik <mprivozn@redhat.com>
3Date: Mon, 27 Nov 2023 15:11:45 +0100
4Subject: [PATCH] osinfo: Make xmlError struct constant in
5 propagate_libxml_error()
6
7In libxml2 commit v2.12.0~14 the API changed so that
8xmlGetLastError() returns pointer to a constant xmlError struct.
9Reflect this change in our code.
10
11Upstream-Status: Backport [https://gitlab.com/libosinfo/libosinfo/-/merge_requests/155]
12Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
13---
14 osinfo/osinfo_install_script.c | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17diff --git a/osinfo/osinfo_install_script.c b/osinfo/osinfo_install_script.c
18index 5800f37..303245a 100644
19--- a/osinfo/osinfo_install_script.c
20+++ b/osinfo/osinfo_install_script.c
21@@ -769,7 +769,7 @@ static void propagate_libxml_error(GError **error, const char *format, ...) G_GN
22
23 static void propagate_libxml_error(GError **error, const char *format, ...)
24 {
25- xmlErrorPtr err = xmlGetLastError();
26+ const xmlError *err = xmlGetLastError();
27 char *prefix;
28 va_list ap;
29
30--
312.44.0
32
diff --git a/meta-oe/recipes-support/libosinfo/libosinfo/0adf38535637ec668e658d43f04f60f11f51574f.patch b/meta-oe/recipes-support/libosinfo/libosinfo/0adf38535637ec668e658d43f04f60f11f51574f.patch
new file mode 100644
index 0000000000..f76aef8b25
--- /dev/null
+++ b/meta-oe/recipes-support/libosinfo/libosinfo/0adf38535637ec668e658d43f04f60f11f51574f.patch
@@ -0,0 +1,86 @@
1From 0adf38535637ec668e658d43f04f60f11f51574f Mon Sep 17 00:00:00 2001
2From: Roman Bogorodskiy <bogorodskiy@gmail.com>
3Date: Thu, 10 Apr 2025 13:54:02 +0200
4Subject: [PATCH] loader: don't use libxml2 deprecated APIs
5
6Address the following items:
7
8 - Deprecated direct access to buf's content
9 - Mismatching error function signature
10 - Deprecated direct access to ctxt's lastError
11
12Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
13Signed-off-by: Markus Volk <f_l_k@t-online.de>
14
15Upstream-Status: Backport [https://gitlab.com/libosinfo/libosinfo/-/commit/0adf38535637ec668e658d43f04f60f11f51574f.patch]
16---
17 osinfo/osinfo_loader.c | 42 +++++++++++++++++++++++-------------------
18 1 file changed, 23 insertions(+), 19 deletions(-)
19
20diff --git a/osinfo/osinfo_loader.c b/osinfo/osinfo_loader.c
21index 0a9004af..b3fd4535 100644
22--- a/osinfo/osinfo_loader.c
23+++ b/osinfo/osinfo_loader.c
24@@ -354,7 +354,7 @@ osinfo_loader_doc(const char *xpath,
25 xmlXPathFreeObject(obj);
26 OSINFO_LOADER_SET_ERROR(err, "Cannot format stylesheet");
27 }
28- ret = g_strdup((char *)buf->content);
29+ ret = g_strdup((char *)xmlBufferContent(buf));
30
31 xmlBufferFree(buf);
32 xmlXPathFreeObject(obj);
33@@ -1902,28 +1902,32 @@ static void osinfo_loader_root(OsinfoLoader *loader,
34 }
35
36 static void
37-catchXMLError(void *ctx, const char *msg ATTRIBUTE_UNUSED, ...)
38+catchXMLError(void *ctx, const char *msg, ...)
39 {
40 xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
41+ const xmlError *xmlErr = NULL;
42+ g_autofree gchar *xmlmsg = NULL;
43
44- if (ctxt && ctxt->_private) {
45- GError **err = ctxt->_private;
46- if (!error_is_set(err)) {
47- gchar *xmlmsg;
48- if (ctxt->lastError.file) {
49- xmlmsg = g_strdup_printf("%s:%d: %s",
50- ctxt->lastError.file,
51- ctxt->lastError.line,
52- ctxt->lastError.message);
53- } else {
54- xmlmsg = g_strdup_printf("at line %d: %s",
55- ctxt->lastError.line,
56- ctxt->lastError.message);
57- }
58- OSINFO_LOADER_SET_ERROR(ctxt->_private, xmlmsg);
59- g_free(xmlmsg);
60- }
61+ if (!ctxt || !ctxt->_private)
62+ return;
63+
64+ if (error_is_set(ctxt->_private))
65+ return;
66+
67+ if (!(xmlErr = xmlCtxtGetLastError(ctx)))
68+ return;
69+
70+ if (xmlErr->file) {
71+ xmlmsg = g_strdup_printf("%s:%d: %s",
72+ xmlErr->file,
73+ xmlErr->line,
74+ xmlErr->message);
75+ } else {
76+ xmlmsg = g_strdup_printf("at line %d: %s",
77+ xmlErr->line,
78+ xmlErr->message);
79 }
80+ OSINFO_LOADER_SET_ERROR(ctxt->_private, xmlmsg);
81 }
82
83 static void osinfo_loader_process_xml(OsinfoLoader *loader,
84--
85GitLab
86
diff --git a/meta-oe/recipes-support/libosinfo/libosinfo_1.11.0.bb b/meta-oe/recipes-support/libosinfo/libosinfo_1.12.0.bb
index 8ef7ac3df0..2462786aae 100644
--- a/meta-oe/recipes-support/libosinfo/libosinfo_1.11.0.bb
+++ b/meta-oe/recipes-support/libosinfo/libosinfo_1.12.0.bb
@@ -8,12 +8,11 @@ LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
8SRC_URI = " \ 8SRC_URI = " \
9 git://gitlab.com/libosinfo/libosinfo.git;branch=main;protocol=https \ 9 git://gitlab.com/libosinfo/libosinfo.git;branch=main;protocol=https \
10 file://0001-meson.build-allow-crosscompiling-gir.patch \ 10 file://0001-meson.build-allow-crosscompiling-gir.patch \
11 file://0001-osinfo-Make-xmlError-struct-constant-in-propagate_li.patch \ 11 file://0adf38535637ec668e658d43f04f60f11f51574f.patch \
12" 12"
13 13
14SRCREV = "ca9dd5b810dc04ea38048ae9be491654c8596ef9" 14SRCREV = "b505ef5161d2552102a743acd4ad83298d3d8f99"
15 15
16S = "${WORKDIR}/git"
17 16
18inherit meson pkgconfig gtk-doc gobject-introspection vala 17inherit meson pkgconfig gtk-doc gobject-introspection vala
19 18
@@ -32,4 +31,4 @@ EXTRA_OEMESON += " \
32 -Dwith-usb-ids-path=${datadir}/hwdata/usb.ids \ 31 -Dwith-usb-ids-path=${datadir}/hwdata/usb.ids \
33" 32"
34 33
35RDEPENDS:${PN} = "hwdata" 34RDEPENDS:${PN} = "hwdata osinfo-db"
diff --git a/meta-oe/recipes-support/libosinfo/osinfo-db-tools_1.12.0.bb b/meta-oe/recipes-support/libosinfo/osinfo-db-tools_1.12.0.bb
new file mode 100644
index 0000000000..ee75c39eee
--- /dev/null
+++ b/meta-oe/recipes-support/libosinfo/osinfo-db-tools_1.12.0.bb
@@ -0,0 +1,20 @@
1SUMMARY = "Tools for managing the libosinfo database files"
2HOMEPAGE = "https://libosinfo.org"
3
4LICENSE = "GPL-2.0-or-later"
5LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
6
7DEPENDS = "glib-2.0 json-glib libarchive libsoup"
8
9SRC_URI = "git://gitlab.com/libosinfo/osinfo-db-tools.git;branch=main;protocol=https \
10 "
11SRCREV = "e5564be303bfac49cc3490bd0fada342cd65566f"
12
13
14inherit meson pkgconfig
15
16do_configure:prepend () {
17 sed -i 's/-Werror//' ${S}/meson.build
18}
19
20BBCLASSEXTEND = "native"
diff --git a/meta-oe/recipes-support/libosinfo/osinfo-db_20250606.bb b/meta-oe/recipes-support/libosinfo/osinfo-db_20250606.bb
new file mode 100644
index 0000000000..33e17234ce
--- /dev/null
+++ b/meta-oe/recipes-support/libosinfo/osinfo-db_20250606.bb
@@ -0,0 +1,20 @@
1SUMMARY = "osinfo-db provides the database files for use with the libosinfo library"
2HOMEPAGE = "https://libosinfo.org"
3
4LICENSE = "GPL-2.0-or-later"
5LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
6
7DEPENDS = "osinfo-db-tools-native"
8
9SRC_URI = "git://gitlab.com/libosinfo/osinfo-db.git;branch=main;protocol=https"
10
11SRCREV = "62f8adceb8ee88e643a134f2cfaf04fc11b9fc51"
12
13
14inherit allarch autotools-brokensep
15
16EXTRA_OEMAKE = "OSINFO_DB_TARGET='--dir ${datadir}/osinfo'"
17
18do_configure[noexec] = "1"
19
20FILES:${PN} = "${datadir}/osinfo"