Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/xmlstarlet: bump version to 1.7.0
@ 2026-09-07 12:02 Bernd Kuhls
  2026-09-18 20:47 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 2+ messages in thread
From: Bernd Kuhls @ 2026-09-07 12:02 UTC (permalink / raw)
  To: buildroot

Upstream site switched to Github:
https://sourceforge.net/p/xmlstar/feature-requests/50/

Release notes:
https://github.com/xmlstarlet/xmlstarlet/releases/tag/1.7.0

Removed patches which are included in this release.
Instead of patch 0002 a different fix was committed upstream:
https://github.com/xmlstarlet/xmlstarlet/commit/f300cd048d22ed5291f885346c62779b92c4aca4

Switched to pkgconf to detect libxml2/libxslt expect for static builds:
https://github.com/xmlstarlet/xmlstarlet/commit/27063aa63c96541fe6db335aa36e5fa29bc5f0e9

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
Gitlab pipelines passed:
https://gitlab.com/bkuhls/buildroot/-/commits/78c6ce3cd8518fbe0bae82c93e757200bd522f89

 ...1-Fix-build-issues-with-libxml2-2.12.patch | 97 -------------------
 ...0002-xml_pyx-remove-ATTRIBUTE_UNUSED.patch | 49 ----------
 package/xmlstarlet/Config.in                  |  2 +-
 package/xmlstarlet/xmlstarlet.hash            |  5 +-
 package/xmlstarlet/xmlstarlet.mk              | 18 ++--
 5 files changed, 9 insertions(+), 162 deletions(-)
 delete mode 100644 package/xmlstarlet/0001-Fix-build-issues-with-libxml2-2.12.patch
 delete mode 100644 package/xmlstarlet/0002-xml_pyx-remove-ATTRIBUTE_UNUSED.patch

diff --git a/package/xmlstarlet/0001-Fix-build-issues-with-libxml2-2.12.patch b/package/xmlstarlet/0001-Fix-build-issues-with-libxml2-2.12.patch
deleted file mode 100644
index 74034dad53..0000000000
--- a/package/xmlstarlet/0001-Fix-build-issues-with-libxml2-2.12.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-From 702988467d67c3a33255de4c543f56767c64c72e Mon Sep 17 00:00:00 2001
-From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
-Date: Sat, 23 Dec 2023 21:30:30 +0100
-Subject: [PATCH] Fix build issues with libxml2 2.12
-
-Based on initial work from Bernd Kuhls <bernd@kuhls.net>, improved by
-Yaakov Selkowitz.
-
-Upstream: https://sourceforge.net/p/xmlstar/patches/22/
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
----
- src/trans.h      | 1 +
- src/xml.c        | 2 +-
- src/xml_edit.c   | 1 +
- src/xml_elem.c   | 2 +-
- src/xml_format.c | 1 +
- src/xmlstar.h    | 2 +-
- 6 files changed, 6 insertions(+), 3 deletions(-)
-
-diff --git a/src/trans.h b/src/trans.h
-index 016304e..395462c 100644
---- a/src/trans.h
-+++ b/src/trans.h
-@@ -36,6 +36,7 @@ THE SOFTWARE.
- #include <libxml/xinclude.h>
- #include <libxml/parserInternals.h>
- #include <libxml/uri.h>
-+#include <libxml/globals.h>
- 
- #include <libxslt/xslt.h>
- #include <libxslt/xsltInternals.h>
-diff --git a/src/xml.c b/src/xml.c
-index cf47cc2..e6f19c1 100644
---- a/src/xml.c
-+++ b/src/xml.c
-@@ -104,7 +104,7 @@ void reportGenericError(void* ctx, const char * msg, ...) {
- /* by default all errors are reported */
- static ErrorInfo errorInfo = { NULL, NULL, VERBOSE, CONTINUE };
- 
--void reportError(void *ptr, xmlErrorPtr error)
-+void reportError(void *ptr, const xmlError *error)
- {
-     ErrorInfo *errorInfo = (ErrorInfo*) ptr;
-     assert(errorInfo);
-diff --git a/src/xml_edit.c b/src/xml_edit.c
-index e199178..b3da8a4 100644
---- a/src/xml_edit.c
-+++ b/src/xml_edit.c
-@@ -42,6 +42,7 @@ THE SOFTWARE.
- #include <libxml/xpointer.h>
- #include <libxml/parserInternals.h>
- #include <libxml/uri.h>
-+#include <libxml/globals.h>
- #include <libexslt/exslt.h>
- 
- #include "xmlstar.h"
-diff --git a/src/xml_elem.c b/src/xml_elem.c
-index 024e62a..a73038a 100644
---- a/src/xml_elem.c
-+++ b/src/xml_elem.c
-@@ -186,7 +186,7 @@ typedef struct {
-  * put @name into @data->array[@data->offset]
-  */
- static void
--hash_key_put(void *payload, void *data, xmlChar *name)
-+hash_key_put(void *payload, void *data, const xmlChar *name)
- {
-     ArrayDest *dest = data;
-     dest->array[dest->offset++] = name;
-diff --git a/src/xml_format.c b/src/xml_format.c
-index e9da4df..ddd6614 100644
---- a/src/xml_format.c
-+++ b/src/xml_format.c
-@@ -42,6 +42,7 @@ THE SOFTWARE.
- #include <libxml/xpointer.h>
- #include <libxml/parserInternals.h>
- #include <libxml/uri.h>
-+#include <libxml/globals.h>
- 
- #include "xmlstar.h"
- 
-diff --git a/src/xmlstar.h b/src/xmlstar.h
-index 3e1eed3..e8d7177 100644
---- a/src/xmlstar.h
-+++ b/src/xmlstar.h
-@@ -32,7 +32,7 @@ typedef struct _errorInfo {
-     ErrorStop stop;
- } ErrorInfo;
- 
--void reportError(void *ptr, xmlErrorPtr error);
-+void reportError(void *ptr, const xmlError *error);
- void suppressErrors(void);
- 
- typedef struct _gOptions {
--- 
-2.43.0
-
diff --git a/package/xmlstarlet/0002-xml_pyx-remove-ATTRIBUTE_UNUSED.patch b/package/xmlstarlet/0002-xml_pyx-remove-ATTRIBUTE_UNUSED.patch
deleted file mode 100644
index dd7472301e..0000000000
--- a/package/xmlstarlet/0002-xml_pyx-remove-ATTRIBUTE_UNUSED.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 6b3ca3549abb998947088bdf264d65a0a86684cd Mon Sep 17 00:00:00 2001
-From: Bernd Kuhls <bernd@kuhls.net>
-Date: Sun, 12 Oct 2025 18:38:54 +0200
-Subject: [PATCH] xml_pyx: remove ATTRIBUTE_UNUSED
-
-This define was removed in libxml2 2.14.0:
-https://gitlab.gnome.org/GNOME/libxml2/-/commit/208f27f9641a59863ce1f7d4992df77f7eb0ea9d
-
-Upstream: https://sourceforge.net/p/xmlstar/patches/23/
-
-Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
----
- src/xml_pyx.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/src/xml_pyx.c b/src/xml_pyx.c
-index ab295f1..8adc028 100644
---- a/src/xml_pyx.c
-+++ b/src/xml_pyx.c
-@@ -200,7 +200,7 @@ pyxExternalEntityReferenceHandler(void* userData,
- }
- 
- static void
--pyxExternalSubsetHandler(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name,
-+pyxExternalSubsetHandler(void *ctx, const xmlChar *name,
-                          const xmlChar *ExternalID, const xmlChar *SystemID)
- {
-     fprintf(stdout, "D %s PUBLIC", name); /* TODO: re-check */
-@@ -215,7 +215,7 @@ pyxExternalSubsetHandler(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name,
- }
- 
- static void
--pyxCommentHandler(void *ctx ATTRIBUTE_UNUSED, const xmlChar *value)
-+pyxCommentHandler(void *ctx, const xmlChar *value)
- {
-     fprintf(stdout,"C");
-     SanitizeData(value, xmlStrlen(value));
-@@ -223,7 +223,7 @@ pyxCommentHandler(void *ctx ATTRIBUTE_UNUSED, const xmlChar *value)
- }
- 
- static void
--pyxCdataBlockHandler(void *ctx ATTRIBUTE_UNUSED, const xmlChar *value, int len)
-+pyxCdataBlockHandler(void *ctx, const xmlChar *value, int len)
- {
-     fprintf(stdout,"[");
-     SanitizeData(value, len);
--- 
-2.47.3
-
diff --git a/package/xmlstarlet/Config.in b/package/xmlstarlet/Config.in
index 99762b8761..b88c80801a 100644
--- a/package/xmlstarlet/Config.in
+++ b/package/xmlstarlet/Config.in
@@ -6,4 +6,4 @@ config BR2_PACKAGE_XMLSTARLET
 	help
 	  Command Line XML Toolkit
 
-	  http://xmlstar.sourceforge.net/
+	  https://xmlstarlet.github.io
diff --git a/package/xmlstarlet/xmlstarlet.hash b/package/xmlstarlet/xmlstarlet.hash
index 4b696bb2a4..f1191857ae 100644
--- a/package/xmlstarlet/xmlstarlet.hash
+++ b/package/xmlstarlet/xmlstarlet.hash
@@ -1,5 +1,4 @@
-# From https://sourceforge.net/projects/xmlstar/files/xmlstarlet/1.6.1/
-sha1  87bb104f546caca71b9540807c5b2738944cb219  xmlstarlet-1.6.1.tar.gz
-md5  f3c5dfa3b1a2ee06cd57c255cc8b70a0  xmlstarlet-1.6.1.tar.gz
+# From https://github.com/xmlstarlet/xmlstarlet/releases/download/1.7.0/xmlstarlet-1.7.0.tar.gz.sha256
+sha256  df4c93458fc6b2ad144d65dccf3ef251349871e0578c5bc59edbfeecf9bf3454  xmlstarlet-1.7.0.tar.gz
 # Locally computed
 sha256  6641cc5b00c1651fa22175f34efd01695e64a348b1ba07048538276f44866862  COPYING
diff --git a/package/xmlstarlet/xmlstarlet.mk b/package/xmlstarlet/xmlstarlet.mk
index b79c3f566d..2a38ae206d 100644
--- a/package/xmlstarlet/xmlstarlet.mk
+++ b/package/xmlstarlet/xmlstarlet.mk
@@ -4,31 +4,25 @@
 #
 ################################################################################
 
-XMLSTARLET_VERSION = 1.6.1
-XMLSTARLET_SITE = http://downloads.sourceforge.net/project/xmlstar/xmlstarlet/$(XMLSTARLET_VERSION)
+XMLSTARLET_VERSION = 1.7.0
+XMLSTARLET_SITE = https://github.com/xmlstarlet/xmlstarlet/releases/download/$(XMLSTARLET_VERSION)
 XMLSTARLET_LICENSE = MIT
 XMLSTARLET_LICENSE_FILES = COPYING
 
-XMLSTARLET_DEPENDENCIES += libxml2 libxslt \
+XMLSTARLET_DEPENDENCIES += host-pkgconf libxml2 libxslt \
 	$(if $(BR2_PACKAGE_LIBICONV),libiconv)
 
+ifeq ($(BR2_STATIC_LIBS),y)
 XMLSTARLET_CONF_OPTS += \
+	--enable-static-libs \
 	--with-libxml-prefix=$(STAGING_DIR)/usr \
 	--with-libxslt-prefix=$(STAGING_DIR)/usr \
 	--with-libiconv-prefix=$(STAGING_DIR)/usr
-
-ifeq ($(BR2_STATIC_LIBS),y)
-XMLSTARLET_CONF_OPTS += --enable-static-libs
-XMLSTARLET_CONF_ENV = LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs libxml-2.0 libexslt`"
 else
 XMLSTARLET_CONF_OPTS += --disable-static-libs
 endif
 
-HOST_XMLSTARLET_DEPENDENCIES += host-libxml2 host-libxslt
-
-HOST_XMLSTARLET_CONF_OPTS += \
-	--with-libxml-prefix=$(HOST_DIR) \
-	--with-libxslt-prefix=$(HOST_DIR)
+HOST_XMLSTARLET_DEPENDENCIES += host-libxml2 host-libxslt host-pkgconf
 
 $(eval $(autotools-package))
 $(eval $(host-autotools-package))
-- 
2.47.3

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/xmlstarlet: bump version to 1.7.0
  2026-09-07 12:02 [Buildroot] [PATCH 1/1] package/xmlstarlet: bump version to 1.7.0 Bernd Kuhls
@ 2026-09-18 20:47 ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-09-18 20:47 UTC (permalink / raw)
  To: Bernd Kuhls; +Cc: buildroot

On Mon, Sep 07, 2026 at 02:02:57PM +0200, Bernd Kuhls wrote:
> Upstream site switched to Github:
> https://sourceforge.net/p/xmlstar/feature-requests/50/
> 
> Release notes:
> https://github.com/xmlstarlet/xmlstarlet/releases/tag/1.7.0
> 
> Removed patches which are included in this release.
> Instead of patch 0002 a different fix was committed upstream:
> https://github.com/xmlstarlet/xmlstarlet/commit/f300cd048d22ed5291f885346c62779b92c4aca4
> 
> Switched to pkgconf to detect libxml2/libxslt expect for static builds:
> https://github.com/xmlstarlet/xmlstarlet/commit/27063aa63c96541fe6db335aa36e5fa29bc5f0e9

Not your fault, but this makes absolutely no sense. There is no reason
to handle static linking without pkg-config...

> -XMLSTARLET_DEPENDENCIES += libxml2 libxslt \
> +XMLSTARLET_DEPENDENCIES += host-pkgconf libxml2 libxslt \
>  	$(if $(BR2_PACKAGE_LIBICONV),libiconv)

[...]

> +HOST_XMLSTARLET_DEPENDENCIES += host-libxml2 host-libxslt host-pkgconf

Not related to your change, so I've done a separate commit replacing
those += by = signs.

Thanks for the patch, applied to master!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-09-18 20:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-07 12:02 [Buildroot] [PATCH 1/1] package/xmlstarlet: bump version to 1.7.0 Bernd Kuhls
2026-09-18 20:47 ` Thomas Petazzoni via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox