Skip to contentSkip to conversation

package/squid: fix build with libxml2-2.12

PATCH Applied Bernd Kuhls 2 participants 6 messages Dec 4, 2023 – Dec 23, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 package/squid: fix build with libxml2-2.12

---
 ...0001-ESI-Fix-build-with-libxml2-2.12.patch | 36 +++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 package/squid/0001-ESI-Fix-build-with-libxml2-2.12.patch
package/squid/0001-ESI-Fix-build-with-libxml2-2.12.patch new file +36 -0
new file mode 100644
index 0000000000..c369651aba
@@ -0,0 +1,36 @@
+From c50e5fd11744eb2cdfb90fb7e8180880160927c3 Mon Sep 17 00:00:00 2001
+From: Bernd Kuhls <[email protected]>
+Date: Sat, 25 Nov 2023 13:44:49 +0100
+Subject: [PATCH] ESI: Fix build with libxml2-2.12
+
+libxml2 recently made it a const return.
+
+Fixes build error
+
+Libxml2Parser.cc:147:40: error: invalid conversion from 'const xmlError*'
+ {aka 'const _xmlError*'} to 'xmlErrorPtr' {aka '_xmlError*'}
+ [-fpermissive]
+
+Upstream: https://github.com/squid-cache/squid/pull/1600
+
+Signed-off-by: Bernd Kuhls <[email protected]>
+---
+ src/esi/Libxml2Parser.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/esi/Libxml2Parser.cc b/src/esi/Libxml2Parser.cc
+index f03752885..73def2dbf 100644
+--- a/src/esi/Libxml2Parser.cc
++++ b/src/esi/Libxml2Parser.cc
+@@ -144,7 +144,7 @@ ESILibxml2Parser::lineNumber() const
+ char const *
+ ESILibxml2Parser::errorString() const
+ {
+-    xmlErrorPtr error = xmlGetLastError();
++    const xmlError *error = xmlGetLastError();
+ 
+     if (error == nullptr)
+         return nullptr;
+-- 
+2.39.2
+
Signature · 6 lines
2.39.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

PATCH 2/3 package/xmlstarlet: Fix build with libxml2-2.12

---
 .../0001-Fix-build-with-libxml2-2.12.patch    | 33 +++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 package/xmlstarlet/0001-Fix-build-with-libxml2-2.12.patch
package/xmlstarlet/0001-Fix-build-with-libxml2-2.12.patch new file +33 -0
new file mode 100644
index 0000000000..9f32020d7d
@@ -0,0 +1,33 @@
+From 59395730bc66d97c154f727543e501d6f3c061af Mon Sep 17 00:00:00 2001
+From: Bernd Kuhls <[email protected]>
+Date: Sat, 25 Nov 2023 14:03:45 +0100
+Subject: [PATCH] Fix build with libxml2-2.12
+
+Upstream reorganized header includes:
+https://github.com/GNOME/libxml2/blob/master/NEWS
+
+"Several cyclic dependencies in public header files were fixed. As a
+ result, certain headers won't include other headers as before."
+
+Upstream: https://sourceforge.net/p/xmlstar/patches/22/
+
+Signed-off-by: Bernd Kuhls <[email protected]>
+---
+ src/xmlstar.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/xmlstar.h b/src/xmlstar.h
+index 3e1eed3..1a12da1 100644
+--- a/src/xmlstar.h
++++ b/src/xmlstar.h
+@@ -15,6 +15,7 @@
+ #include <libxml/xpath.h>
+ #include <libxml/xpathInternals.h>
+ #include <libxml/xmlreader.h>
++#include <libxml/xmlsave.h>
+ 
+ typedef enum { /* EXIT_SUCCESS = 0, EXIT_FAILURE = 1, */
+     EXIT_BAD_ARGS = EXIT_FAILURE+1, EXIT_BAD_FILE,
+-- 
+2.39.2
+
Signature · 6 lines
2.39.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

Re: [Buildroot] [PATCH 2/3] package/xmlstarlet: Fix build with libxml2-2.12

Quoted 5 lines · On Mon, 4 Dec 2023 22:16:21 +0100 Bernd Kuhls <[email protected]> wrote:
---
 .../0001-Fix-build-with-libxml2-2.12.patch    | 33 +++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 package/xmlstarlet/0001-Fix-build-with-libxml2-2.12.patch

Applied to master, but after taking the improved patch proposed by upstream on the Sourceforge issue. Note that since you did not convey this patch yourself, I made myself the Author + SoB of the patch added in package/xmlstarlet/, but crediting you within the commit log. Thanks a lot!

Thomas

Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#3 lore raw

PATCH 3/3 package/libxml2: bump version to 2.12.1

In reply to Bernd Kuhls

Updated license hash due to upstream commit
https://github.com/GNOME/libxml2/commit/4a513d5667d7690998f01b9048c56c4f1f50f6a5

---
 package/libxml2/libxml2.hash | 6 +++---
 package/libxml2/libxml2.mk   | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)
package/libxml2/libxml2.hash +3 -3
index 78c1ddc6a2..a3b2230b8a 100644
@@ -1,4 +1,4 @@
-# From https://download.gnome.org/sources/libxml2/2.11/libxml2-2.11.6.sha256sum
-sha256  c90eee7506764abbe07bb616b82da452529609815aefef423d66ef080eb0c300  libxml2-2.11.6.tar.xz
+# From https://download.gnome.org/sources/libxml2/2.12/libxml2-2.12.1.sha256sum
+sha256  8982b9ccdf7f456e30d8f7012d50858c6623e495333b6191def455c7e95427eb  libxml2-2.12.1.tar.xz
 # License files, locally calculated
-sha256  c5c63674f8a83c4d2e385d96d1c670a03cb871ba2927755467017317878574bd  Copyright
+sha256  7fb0a66f3989f9bd5c7e5438a3de02cd4a7a47dde0aea2f7ea2ba2ff454ee6a4  Copyright
package/libxml2/libxml2.mk +2 -2
index c93a4aacc5..5606532b62 100644
@@ -4,8 +4,8 @@
 #
 ################################################################################
 
-LIBXML2_VERSION_MAJOR = 2.11
-LIBXML2_VERSION = $(LIBXML2_VERSION_MAJOR).6
+LIBXML2_VERSION_MAJOR = 2.12
+LIBXML2_VERSION = $(LIBXML2_VERSION_MAJOR).1
 LIBXML2_SOURCE = libxml2-$(LIBXML2_VERSION).tar.xz
 LIBXML2_SITE = \
 	https://download.gnome.org/sources/libxml2/$(LIBXML2_VERSION_MAJOR)
Signature · 6 lines
2.39.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#4 lore raw

Re: [Buildroot] [PATCH 3/3] package/libxml2: bump version to 2.12.1

Quoted 8 lines · On Mon, 4 Dec 2023 22:16:22 +0100 Bernd Kuhls <[email protected]> wrote:

Updated license hash due to upstream commit
https://github.com/GNOME/libxml2/commit/4a513d5667d7690998f01b9048c56c4f1f50f6a5

---
 package/libxml2/libxml2.hash | 6 +++---
 package/libxml2/libxml2.mk   | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

Applied to master, thanks.

I see you fixed both squid and xmlstarlet before this bump, but obviously a concern is whether other packages will be affected. How much build testing did you do after this version bump? There are indeed a myriad of packages using libxml2.

Of course, the autobuilders will tell us, but I was wondering how much breakage we might be seeing. If you could keep an eye on the autobuilders in the next few days for possible issues related to this version bump, it would be nice!

Thanks a lot,

Thomas

Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#5 lore raw
In reply to Bernd Kuhls
Quoted 5 lines · On Mon, 4 Dec 2023 22:16:20 +0100 Bernd Kuhls <[email protected]> wrote:
---
 ...0001-ESI-Fix-build-with-libxml2-2.12.patch | 36 +++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 package/squid/0001-ESI-Fix-build-with-libxml2-2.12.patch

Applied to master after changing the patch to use the patch that was applied by upstream (it is mostly the same, just with a slightly improved commit log). I also changed the Upstream: tag to point to the commit accepted upstream. Thanks!

Thomas

Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot