summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGyorgy Sarvari <skandigraun@gmail.com>2025-10-21 20:32:04 +0200
committerGyorgy Sarvari <skandigraun@gmail.com>2025-10-27 11:17:33 +0100
commit88be6af76b58bc6535fc8ccad3e8090aa61a91dd (patch)
tree27bef037cbb9ea1025c88c8c2afad47aed67b4fd
parentefbc247121f48084cfdc74fc5f35edeb6ddb981d (diff)
downloadmeta-openembedded-88be6af76b58bc6535fc8ccad3e8090aa61a91dd.tar.gz
squid: fix esi PACKAGECONFIG
libxml has derecated the "xmlSetFeature" call, and hid is behind a special config flag (--with-legacy), which is not used by default in oe-core. This makes compilation fail, when "esi" PACKAGECONFIG is enabled: Libxml2Parser.cc:94:5: error: 'xmlSetFeature' was not declared in this scope; did you mean 'xmlHasFeature'? This backported patch fixes this. Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
-rw-r--r--meta-networking/recipes-daemons/squid/files/0001-ESI-Drop-incorrect-and-unnecessary-xmlSetFeature-cal.patch35
-rw-r--r--meta-networking/recipes-daemons/squid/squid_4.15.bb1
2 files changed, 36 insertions, 0 deletions
diff --git a/meta-networking/recipes-daemons/squid/files/0001-ESI-Drop-incorrect-and-unnecessary-xmlSetFeature-cal.patch b/meta-networking/recipes-daemons/squid/files/0001-ESI-Drop-incorrect-and-unnecessary-xmlSetFeature-cal.patch
new file mode 100644
index 0000000000..6f467258b9
--- /dev/null
+++ b/meta-networking/recipes-daemons/squid/files/0001-ESI-Drop-incorrect-and-unnecessary-xmlSetFeature-cal.patch
@@ -0,0 +1,35 @@
1From c312f7fa80371cc6db583590258381ebc7cd18f6 Mon Sep 17 00:00:00 2001
2From: Nick Wellnhofer <wellnhofer@aevum.de>
3Date: Sun, 20 Feb 2022 19:42:40 +0000
4Subject: [PATCH] ESI: Drop incorrect and unnecessary xmlSetFeature() call
5 (#988)
6
7xmlSetFeature() has been deprecated for 10+ years and will eventually be
8removed from libxml2. Squid calls xmlSetFeature() with the wrong
9argument: a nil `value` pointer instead of a pointer to a zero value.
10When called with a nil `value`, the function does nothing but returning
11an error. Squid does not check whether xmlSetFeature() call is
12successful, and the bug went unnoticed since libxml2 support was added
13in commit 964b44c.
14
15Since libxml2 does not substitute entities by default, the call can be
16removed to achieve the intended effect.
17
18Upstream-Status: Backport [https://github.com/squid-cache/squid/commit/5db4df2c6f83b5c26357f4439d28b92ef7071cd5]
19Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
20---
21 src/esi/Libxml2Parser.cc | 1 -
22 1 file changed, 1 deletion(-)
23
24diff --git a/src/esi/Libxml2Parser.cc b/src/esi/Libxml2Parser.cc
25index 2b9ba0a..0301b77 100644
26--- a/src/esi/Libxml2Parser.cc
27+++ b/src/esi/Libxml2Parser.cc
28@@ -91,7 +91,6 @@ ESILibxml2Parser::ESILibxml2Parser(ESIParserClient *aClient) : theClient (aClien
29
30 /* TODO: grab the document encoding from the headers */
31 parser = xmlCreatePushParserCtxt(&sax, static_cast<void *>(this), NULL, 0, NULL);
32- xmlSetFeature(parser, "substitute entities", 0);
33
34 if (entity_doc == NULL)
35 entity_doc = htmlNewDoc(NULL, NULL);
diff --git a/meta-networking/recipes-daemons/squid/squid_4.15.bb b/meta-networking/recipes-daemons/squid/squid_4.15.bb
index ae3b66c7af..575ad76ad3 100644
--- a/meta-networking/recipes-daemons/squid/squid_4.15.bb
+++ b/meta-networking/recipes-daemons/squid/squid_4.15.bb
@@ -38,6 +38,7 @@ SRC_URI = "http://www.squid-cache.org/Versions/v${MAJ_VER}/${BPN}-${PV}.tar.bz2
38 file://CVE-2022-41318.patch \ 38 file://CVE-2022-41318.patch \
39 file://CVE-2023-46724.patch \ 39 file://CVE-2023-46724.patch \
40 file://CVE-2025-59362.patch \ 40 file://CVE-2025-59362.patch \
41 file://0001-ESI-Drop-incorrect-and-unnecessary-xmlSetFeature-cal.patch \
41 " 42 "
42 43
43SRC_URI:remove:toolchain-clang = "file://0001-configure-Check-for-Wno-error-format-truncation-comp.patch" 44SRC_URI:remove:toolchain-clang = "file://0001-configure-Check-for-Wno-error-format-truncation-comp.patch"