summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-09-23 08:16:47 +0100
committerSam James <sam@gentoo.org>2022-09-23 08:16:54 +0100
commit1efb38b2ae71a0cf0dc13480491b3cba754ccc1c (patch)
treec6ba04e9e8baae82c8330b2f07a9c05d08faccf5 /net-proxy/squid
parentapp-text/xmlto: Stabilize 0.0.28-r9 x86, #872443 (diff)
downloadgentoo-1efb38b2ae71a0cf0dc13480491b3cba754ccc1c.tar.gz
gentoo-1efb38b2ae71a0cf0dc13480491b3cba754ccc1c.tar.bz2
gentoo-1efb38b2ae71a0cf0dc13480491b3cba754ccc1c.zip
net-proxy/squid: fix build w/ libxml2-2.10.0
Closes: https://bugs.gentoo.org/866518 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-proxy/squid')
-rw-r--r--net-proxy/squid/files/squid-4.17-fix-libxml2-2.10.0.patch30
-rw-r--r--net-proxy/squid/squid-4.17-r1.ebuild1
-rw-r--r--net-proxy/squid/squid-5.4.1-r2.ebuild1
3 files changed, 32 insertions, 0 deletions
diff --git a/net-proxy/squid/files/squid-4.17-fix-libxml2-2.10.0.patch b/net-proxy/squid/files/squid-4.17-fix-libxml2-2.10.0.patch
new file mode 100644
index 000000000000..ebc0cd698e14
--- /dev/null
+++ b/net-proxy/squid/files/squid-4.17-fix-libxml2-2.10.0.patch
@@ -0,0 +1,30 @@
+https://bugs.gentoo.org/866518
+https://github.com/squid-cache/squid/commit/c4e6b7c2a12fa218089fe839f769ffc8ae18dea4
+
+From c4e6b7c2a12fa218089fe839f769ffc8ae18dea4 Mon Sep 17 00:00:00 2001
+From: Nick Wellnhofer <wellnhofer@aevum.de>
+Date: Sun, 20 Feb 2022 19:42:40 +0000
+Subject: [PATCH] ESI: Drop incorrect and unnecessary xmlSetFeature() call
+ (#988)
+
+xmlSetFeature() has been deprecated for 10+ years and will eventually be
+removed from libxml2. Squid calls xmlSetFeature() with the wrong
+argument: a nil `value` pointer instead of a pointer to a zero value.
+When called with a nil `value`, the function does nothing but returning
+an error. Squid does not check whether xmlSetFeature() call is
+successful, and the bug went unnoticed since libxml2 support was added
+in commit 964b44c.
+
+Since libxml2 does not substitute entities by default, the call can be
+removed to achieve the intended effect.
+--- a/src/esi/Libxml2Parser.cc
++++ b/src/esi/Libxml2Parser.cc
+@@ -118,7 +118,6 @@ ESILibxml2Parser::ESILibxml2Parser(ESIParserClient *aClient) : theClient (aClien
+
+ /* TODO: grab the document encoding from the headers */
+ parser = xmlCreatePushParserCtxt(&sax, static_cast<void *>(this), NULL, 0, NULL);
+- xmlSetFeature(parser, "substitute entities", 0);
+
+ if (entity_doc == NULL)
+ entity_doc = htmlNewDoc(NULL, NULL);
+
diff --git a/net-proxy/squid/squid-4.17-r1.ebuild b/net-proxy/squid/squid-4.17-r1.ebuild
index 106d72f54d7e..32578aaf7326 100644
--- a/net-proxy/squid/squid-4.17-r1.ebuild
+++ b/net-proxy/squid/squid-4.17-r1.ebuild
@@ -80,6 +80,7 @@ pkg_pretend() {
src_prepare() {
eapply "${FILESDIR}/${PN}-4.3-gentoo.patch"
eapply "${FILESDIR}/${PN}-4.17-use-system-libltdl.patch"
+ eapply "${FILESDIR}/${PN}-4.17-fix-libxml2-2.10.0.patch"
sed -i -e 's:/usr/local/squid/etc:/etc/squid:' \
INSTALL QUICKSTART \
diff --git a/net-proxy/squid/squid-5.4.1-r2.ebuild b/net-proxy/squid/squid-5.4.1-r2.ebuild
index 94456703bd17..4a8f16e2cd05 100644
--- a/net-proxy/squid/squid-5.4.1-r2.ebuild
+++ b/net-proxy/squid/squid-5.4.1-r2.ebuild
@@ -82,6 +82,7 @@ pkg_pretend() {
src_prepare() {
eapply "${FILESDIR}/${PN}-5.3-gentoo.patch"
eapply "${FILESDIR}/${PN}-4.17-use-system-libltdl.patch"
+ eapply "${FILESDIR}/${PN}-4.17-fix-libxml2-2.10.0.patch"
sed -i -e 's:/usr/local/squid/etc:/etc/squid:' \
INSTALL QUICKSTART \