summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/libxml
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2025-11-07 13:31:53 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-11-07 13:31:53 +0000
commit8c22ff0d8b70d9b12f0487ef696a7e915b9e3173 (patch)
treeefdc32587159d0050a69009bdf2330a531727d95 /meta/recipes-core/libxml
parentd412d2747595c1cc4a5e3ca975e3adc31b2f7891 (diff)
downloadpoky-8c22ff0d8b70d9b12f0487ef696a7e915b9e3173.tar.gz
The poky repository master branch is no longer being updated.
You can either: a) switch to individual clones of bitbake, openembedded-core, meta-yocto and yocto-docs b) use the new bitbake-setup You can find information about either approach in our documentation: https://docs.yoctoproject.org/ Note that "poky" the distro setting is still available in meta-yocto as before and we continue to use and maintain that. Long live Poky! Some further information on the background of this change can be found in: https://lists.openembedded.org/g/openembedded-architecture/message/2179 Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/libxml')
-rw-r--r--meta/recipes-core/libxml/libxml2/0001-Revert-cmake-Fix-installation-directories-in-libxml2.patch81
-rw-r--r--meta/recipes-core/libxml/libxml2/CVE-2025-6021.patch31
-rw-r--r--meta/recipes-core/libxml/libxml2/install-tests.patch34
-rwxr-xr-xmeta/recipes-core/libxml/libxml2/run-ptest20
-rw-r--r--meta/recipes-core/libxml/libxml2_2.14.6.bb98
5 files changed, 0 insertions, 264 deletions
diff --git a/meta/recipes-core/libxml/libxml2/0001-Revert-cmake-Fix-installation-directories-in-libxml2.patch b/meta/recipes-core/libxml/libxml2/0001-Revert-cmake-Fix-installation-directories-in-libxml2.patch
deleted file mode 100644
index 627f8472c3..0000000000
--- a/meta/recipes-core/libxml/libxml2/0001-Revert-cmake-Fix-installation-directories-in-libxml2.patch
+++ /dev/null
@@ -1,81 +0,0 @@
1From 1a7e177a7315c856a2f0e3c2a17ee0fd9e297bc9 Mon Sep 17 00:00:00 2001
2From: Peter Marko <peter.marko@siemens.com>
3Date: Mon, 26 May 2025 21:11:14 +0200
4Subject: [PATCH] Revert "cmake: Fix installation directories in
5 libxml2-config.cmake"
6
7This reverts commit 75dde50b20215a2a3a445b62f36a67c8ed337cab.
8
9Upstream-Status: Inappropriate [upstream ticket https://gitlab.gnome.org/GNOME/libxml2/-/issues/898#note_2452864]
10Signed-off-by: Peter Marko <peter.marko@siemens.com>
11---
12 configure.ac | 11 -----------
13 libxml2-config.cmake.in | 11 +++++++----
14 meson.build | 3 ---
15 3 files changed, 7 insertions(+), 18 deletions(-)
16
17diff --git a/configure.ac b/configure.ac
18index aaa02e3..fb241bb 100644
19--- a/configure.ac
20+++ b/configure.ac
21@@ -1065,17 +1065,6 @@ AC_SUBST(XML_PRIVATE_LIBS)
22 AC_SUBST(XML_PRIVATE_CFLAGS)
23 AC_SUBST(XML_INCLUDEDIR)
24
25-# for libxml2-config.cmake.in
26-AX_RECURSIVE_EVAL(["$bindir"], [INSTALL_BINDIR])
27-AX_RECURSIVE_EVAL(["$includedir"], [INSTALL_INCLUDEDIR])
28-AX_RECURSIVE_EVAL(["$libdir"], [INSTALL_LIBDIR])
29-AC_SUBST(INSTALL_BINDIR)
30-AC_SUBST(INSTALL_INCLUDEDIR)
31-AC_SUBST(INSTALL_LIBDIR)
32-AM_SUBST_NOTMAKE(INSTALL_BINDIR)
33-AM_SUBST_NOTMAKE(INSTALL_INCLUDEDIR)
34-AM_SUBST_NOTMAKE(INSTALL_LIBDIR)
35-
36 AX_RECURSIVE_EVAL(["$sysconfdir"], [XML_SYSCONFDIR])
37 AC_DEFINE_UNQUOTED([XML_SYSCONFDIR], ["$XML_SYSCONFDIR"],
38 [System configuration directory (/etc)])
39diff --git a/libxml2-config.cmake.in b/libxml2-config.cmake.in
40index e040a75..dc0d6b8 100644
41--- a/libxml2-config.cmake.in
42+++ b/libxml2-config.cmake.in
43@@ -24,17 +24,20 @@
44 # LibXml2::LibXml2 - the LibXml2 library
45 # LibXml2::xmllint - the xmllint command-line executable
46
47+get_filename_component(_libxml2_rootdir ${CMAKE_CURRENT_LIST_DIR}/../../../ ABSOLUTE)
48+
49 set(LIBXML2_VERSION_MAJOR @LIBXML_MAJOR_VERSION@)
50 set(LIBXML2_VERSION_MINOR @LIBXML_MINOR_VERSION@)
51 set(LIBXML2_VERSION_MICRO @LIBXML_MICRO_VERSION@)
52 set(LIBXML2_VERSION_STRING "@VERSION@")
53 set(LIBXML2_DEFINITIONS "@XML_CFLAGS@")
54-set(LIBXML2_INCLUDE_DIR @INSTALL_INCLUDEDIR@/libxml2)
55-set(LIBXML2_LIBRARY_DIR @INSTALL_LIBDIR@)
56+set(LIBXML2_INSTALL_PREFIX ${_libxml2_rootdir})
57+set(LIBXML2_INCLUDE_DIR ${_libxml2_rootdir}/include/libxml2)
58+set(LIBXML2_LIBRARY_DIR ${_libxml2_rootdir}/lib)
59
60 find_library(LIBXML2_LIBRARY NAMES xml2 HINTS ${LIBXML2_LIBRARY_DIR} NO_DEFAULT_PATH)
61-find_program(LIBXML2_XMLCATALOG_EXECUTABLE NAMES xmlcatalog HINTS @INSTALL_BINDIR@ NO_DEFAULT_PATH)
62-find_program(LIBXML2_XMLLINT_EXECUTABLE NAMES xmllint HINTS @INSTALL_BINDIR@ NO_DEFAULT_PATH)
63+find_program(LIBXML2_XMLCATALOG_EXECUTABLE NAMES xmlcatalog HINTS ${_libxml2_rootdir}/bin NO_DEFAULT_PATH)
64+find_program(LIBXML2_XMLLINT_EXECUTABLE NAMES xmllint HINTS ${_libxml2_rootdir}/bin NO_DEFAULT_PATH)
65
66 set(LIBXML2_LIBRARIES ${LIBXML2_LIBRARY})
67 set(LIBXML2_INCLUDE_DIRS ${LIBXML2_INCLUDE_DIR})
68diff --git a/meson.build b/meson.build
69index 98bc6e3..3ef0bd0 100644
70--- a/meson.build
71+++ b/meson.build
72@@ -599,9 +599,6 @@ config_cmake = configuration_data()
73 config_cmake.set('LIBXML_MAJOR_VERSION', v_maj)
74 config_cmake.set('LIBXML_MINOR_VERSION', v_min)
75 config_cmake.set('LIBXML_MICRO_VERSION', v_mic)
76-config_cmake.set('INSTALL_BINDIR', dir_bin)
77-config_cmake.set('INSTALL_INCLUDEDIR', dir_include)
78-config_cmake.set('INSTALL_LIBDIR', dir_lib)
79 config_cmake.set('VERSION', meson.project_version())
80 config_cmake.set10('BUILD_SHARED_LIBS',
81 get_option('default_library') != 'static')
diff --git a/meta/recipes-core/libxml/libxml2/CVE-2025-6021.patch b/meta/recipes-core/libxml/libxml2/CVE-2025-6021.patch
deleted file mode 100644
index 0b73bceb24..0000000000
--- a/meta/recipes-core/libxml/libxml2/CVE-2025-6021.patch
+++ /dev/null
@@ -1,31 +0,0 @@
1From e546e423d69ec9b3c71167d3c3140fa1b9af93c7 Mon Sep 17 00:00:00 2001
2From: Nick Wellnhofer <wellnhofer@aevum.de>
3Date: Tue, 27 May 2025 12:53:17 +0200
4Subject: [PATCH] tree: Fix integer overflow in xmlBuildQName
5
6This issue affects memory safety and might receive a CVE ID later.
7
8Fixes #926.
9
10Signed-off-by: Nick Wellnhofer <wellnhofer@aevum.de>
11
12Add '#include <stdint.h>' to assure the definition of SIZE_MAX
13CVE: CVE-2025-6021
14Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libxml2/-/commit/acbbeef9f5dcdcc901c5f3fa14d583ef8cfd22f0]
15Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
16---
17 tree.c | 1 +
18 1 file changed, 1 insertion(+)
19
20diff --git a/tree.c b/tree.c
21index e14bc62..22ec11c 100644
22--- a/tree.c
23+++ b/tree.c
24@@ -23,6 +23,7 @@
25 #include <limits.h>
26 #include <ctype.h>
27 #include <stdlib.h>
28+#include <stdint.h>
29
30 #ifdef LIBXML_ZLIB_ENABLED
31 #include <zlib.h>
diff --git a/meta/recipes-core/libxml/libxml2/install-tests.patch b/meta/recipes-core/libxml/libxml2/install-tests.patch
deleted file mode 100644
index 4c1faa83cb..0000000000
--- a/meta/recipes-core/libxml/libxml2/install-tests.patch
+++ /dev/null
@@ -1,34 +0,0 @@
1From 7e99fef6eae0642a3f1e511e4d24abf7d6d28f50 Mon Sep 17 00:00:00 2001
2From: Ross Burton <ross.burton@arm.com>
3Date: Mon, 5 Dec 2022 17:02:32 +0000
4Subject: [PATCH] add yocto-specific install-ptest target
5
6Add a target to install the test suite.
7
8Upstream-Status: Inappropriate
9Signed-off-by: Ross Burton <ross.burton@arm.com>
10---
11 Makefile.am | 10 ++++++++++
12 1 file changed, 10 insertions(+)
13
14diff --git a/Makefile.am b/Makefile.am
15index 6f98144..ecb3b54 100644
16--- a/Makefile.am
17+++ b/Makefile.am
18@@ -26,6 +26,16 @@ check_PROGRAMS = \
19 testparser \
20 testrecurse
21
22+ptestdir=$(libexecdir)
23+install-test-data: $(check_PROGRAMS)
24+ install -d $(DESTDIR)$(ptestdir) $(DESTDIR)$(ptestdir)/python/
25+ for T in $(check_PROGRAMS); do \
26+ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$T $(DESTDIR)$(ptestdir) ;\
27+ done
28+ cp -r $(srcdir)/test $(DESTDIR)$(ptestdir)
29+ cp -r $(srcdir)/result $(DESTDIR)$(ptestdir)
30+ cp -r $(srcdir)/python/tests $(DESTDIR)$(ptestdir)/python
31+
32 bin_PROGRAMS = xmllint
33
34 bin_SCRIPTS = xml2-config
diff --git a/meta/recipes-core/libxml/libxml2/run-ptest b/meta/recipes-core/libxml/libxml2/run-ptest
deleted file mode 100755
index cbbdd5592f..0000000000
--- a/meta/recipes-core/libxml/libxml2/run-ptest
+++ /dev/null
@@ -1,20 +0,0 @@
1#!/bin/sh
2
3set -e
4
5export LC_ALL=en_US.UTF-8
6
7# testModule isn't that useful and hard-codes buildtree, so we don't run that
8TESTS="runtest runsuite testrecurse testchar testdict runxmlconf testapi testlimits testparser"
9
10for T in $TESTS; do
11 echo Running $T
12 ./$T && echo PASS: $T || echo FAIL: $T
13done
14
15if test -d python/tests; then
16 cd python/tests
17 for T in *.py; do
18 python3 ./$T && echo PASS: $T || echo FAIL: $T
19 done
20fi
diff --git a/meta/recipes-core/libxml/libxml2_2.14.6.bb b/meta/recipes-core/libxml/libxml2_2.14.6.bb
deleted file mode 100644
index 6ed8760f4c..0000000000
--- a/meta/recipes-core/libxml/libxml2_2.14.6.bb
+++ /dev/null
@@ -1,98 +0,0 @@
1SUMMARY = "XML C Parser Library and Toolkit"
2DESCRIPTION = "The XML Parser Library allows for manipulation of XML files. Libxml2 exports Push and Pull type parser interfaces for both XML and HTML. It can do DTD validation at parse time, on a parsed document instance or with an arbitrary DTD. Libxml2 includes complete XPath, XPointer and Xinclude implementations. It also has a SAX like interface, which is designed to be compatible with Expat."
3HOMEPAGE = "https://gitlab.gnome.org/GNOME/libxml2"
4BUGTRACKER = "http://bugzilla.gnome.org/buglist.cgi?product=libxml2"
5SECTION = "libs"
6LICENSE = "MIT"
7LIC_FILES_CHKSUM = "file://Copyright;md5=5873615e8a9ecbf5c8857c4312ee05d6 \
8 file://dict.c;beginline=6;endline=15;md5=2b4b7b827d2d8b080372433c4c9c85b6 \
9 file://list.c;beginline=4;endline=13;md5=b9c25b021ccaf287e50060602d20f3a7 \
10 "
11
12DEPENDS = "zlib virtual/libiconv"
13
14GNOMEBASEBUILDCLASS = "autotools"
15inherit gnomebase
16
17SRC_URI += "http://www.w3.org/XML/Test/xmlts20130923.tar;subdir=${BP};name=testtar \
18 file://run-ptest \
19 file://install-tests.patch \
20 file://0001-Revert-cmake-Fix-installation-directories-in-libxml2.patch \
21 file://CVE-2025-6021.patch \
22 "
23
24SRC_URI[archive.sha256sum] = "7ce458a0affeb83f0b55f1f4f9e0e55735dbfc1a9de124ee86fb4a66b597203a"
25SRC_URI[testtar.sha256sum] = "c6b2d42ee50b8b236e711a97d68e6c4b5c8d83e69a2be4722379f08702ea7273"
26
27CVE_STATUS[CVE-2025-6170] = "fixed-version: fixed in version 2.14.5"
28
29BINCONFIG = "${bindir}/xml2-config"
30
31PACKAGECONFIG ??= "python"
32PACKAGECONFIG[python] = "--with-python=${PYTHON},--without-python,python3"
33
34inherit autotools pkgconfig binconfig-disabled ptest
35
36inherit_defer ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3targetconfig', '', d)}
37
38LDFLAGS:append:riscv64 = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld ptest', ' -fuse-ld=bfd', '', d)}"
39
40RDEPENDS:${PN}-ptest += "bash make locale-base-en-us ${@bb.utils.contains('PACKAGECONFIG', 'python', 'libgcc python3-core python3-logging python3-shell python3-stringold python3-threading python3-unittest ${PN}-python', '', d)}"
41
42RDEPENDS:${PN}-python += "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3-core', '', d)}"
43
44RDEPENDS:${PN}-ptest:append:libc-musl = " musl-locales"
45RDEPENDS:${PN}-ptest:append:libc-glibc = " glibc-gconv-ebcdic-us \
46 glibc-gconv-ibm1141 \
47 glibc-gconv-iso8859-5 \
48 glibc-gconv-euc-jp \
49 "
50
51# WARNING: zlib is required for RPM use
52EXTRA_OECONF = "--without-debug --without-legacy --with-catalog --with-c14n --without-lzma"
53EXTRA_OECONF:class-native = "--without-legacy --with-c14n --without-lzma --with-zlib"
54EXTRA_OECONF:class-nativesdk = "--without-legacy --with-c14n --without-lzma --with-zlib"
55EXTRA_OECONF:linuxstdbase = "--with-debug --with-legacy --with-c14n --without-lzma --with-zlib"
56
57python populate_packages:prepend () {
58 # autonamer would call this libxml2-2, but we don't want that
59 if d.getVar('DEBIAN_NAMES'):
60 d.setVar('PKG:libxml2', '${MLPREFIX}libxml2')
61}
62
63PACKAGE_BEFORE_PN += "${PN}-utils"
64PACKAGES += "${PN}-python"
65
66FILES:${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a"
67FILES:${PN}-utils = "${bindir}/*"
68FILES:${PN}-python = "${PYTHON_SITEPACKAGES_DIR}"
69
70do_configure:prepend () {
71 # executables take longer to package: these should not be executable
72 find ${S}/xmlconf/ -type f -exec chmod -x {} \+
73}
74
75do_install_ptest () {
76 oe_runmake DESTDIR=${D} ptestdir=${PTEST_PATH} install-test-data
77
78 cp -r ${S}/xmlconf ${D}${PTEST_PATH}
79
80 if ! ${@bb.utils.contains('PACKAGECONFIG', 'python', 'true', 'false', d)}; then
81 rm -rf ${D}${PTEST_DIR}/python
82 fi
83}
84
85# with musl we need to enable icu support explicitly for these tests
86do_install_ptest:append:libc-musl () {
87 rm -rf ${D}/${PTEST_PATH}/test/icu_parse_test.xml
88}
89
90do_install:append:class-native () {
91 # Docs are not needed in the native case
92 rm ${D}${datadir}/gtk-doc -rf
93
94 create_wrapper ${D}${bindir}/xmllint 'XML_CATALOG_FILES=${XML_CATALOG_FILES:-${sysconfdir}/xml/catalog}'
95}
96do_install[vardepsexclude] += "XML_CATALOG_FILES:-${sysconfdir}/xml/catalog"
97
98BBCLASSEXTEND = "native nativesdk"