mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH v2 0/3] jq: license update and version bump
@ 2025-06-03  9:08 Alexander Dahl via ptxdist
  2025-06-03  9:08 ` [ptxdist] [PATCH v2 1/3] libonig: Add new package Alexander Dahl via ptxdist
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Alexander Dahl via ptxdist @ 2025-06-03  9:08 UTC (permalink / raw)
  To: ptxdist; +Cc: Alexander Dahl, Andreas Helmcke

Hello,

after feedback from Andreas this is v2 of the jq version bump containing
the actual version bump.  Previously jq had the oniguruma library as a
vendored submodule which broke the build of jq 1.8.0.

This is basically a completely different patch series, but I named it v2
so it's clear v1 should be dropped in favor of this.

Tested that jq builds and runs fine with and without the new option set.
Saves ~500k for libonig on target if jq is built without regex support.

Greets
Alex

v2:
- dropped license fix patch
- added three new patches

v1:
- Link: https://lore.ptxdist.org/ptxdist/20250602103057.299742-1-ada@thorsis.com/

Alexander Dahl (3):
  libonig: Add new package
  jq: Make regex support optional
  jq: version bump 1.7.1 -> 1.8.0

 rules/jq.in        | 16 ++++++++++++--
 rules/jq.make      |  9 ++++----
 rules/libonig.in   | 11 ++++++++++
 rules/libonig.make | 52 ++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 81 insertions(+), 7 deletions(-)
 create mode 100644 rules/libonig.in
 create mode 100644 rules/libonig.make


base-commit: 31866e0b9c1215fa5e8b4dc8573adc8feb7428aa
-- 
2.39.5




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

* [ptxdist] [PATCH v2 1/3] libonig: Add new package
  2025-06-03  9:08 [ptxdist] [PATCH v2 0/3] jq: license update and version bump Alexander Dahl via ptxdist
@ 2025-06-03  9:08 ` Alexander Dahl via ptxdist
  2025-06-03  9:09 ` [ptxdist] [PATCH v2 2/3] jq: Make regex support optional Alexander Dahl via ptxdist
  2025-06-03  9:09 ` [ptxdist] [PATCH v2 3/3] jq: version bump 1.7.1 -> 1.8.0 Alexander Dahl via ptxdist
  2 siblings, 0 replies; 4+ messages in thread
From: Alexander Dahl via ptxdist @ 2025-06-03  9:08 UTC (permalink / raw)
  To: ptxdist; +Cc: Alexander Dahl, Andreas Helmcke

The jq package has this as optional dependency and shipped it as vendor
code in a submodule, which might break the build, and makes specifying
license unnecessarily difficult.  Split into separate package.

Note, the upstream project is EOL, but so would be the jq submodule.

Link: https://lore.ptxdist.org/ptxdist/1302b7b6-e272-48c1-8daf-e7519389c670@ela-soft.com/
Signed-off-by: Alexander Dahl <ada@thorsis.com>
---
 rules/libonig.in   | 11 ++++++++++
 rules/libonig.make | 52 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 63 insertions(+)
 create mode 100644 rules/libonig.in
 create mode 100644 rules/libonig.make

diff --git a/rules/libonig.in b/rules/libonig.in
new file mode 100644
index 000000000..fa909fcb6
--- /dev/null
+++ b/rules/libonig.in
@@ -0,0 +1,11 @@
+## SECTION=system_libraries
+
+config LIBONIG
+	tristate
+	prompt "libonig"
+	help
+	  Oniguruma is a modern and flexible regular expressions library.
+	  It encompasses features from different regular expression
+	  implementations that traditionally exist in different languages.
+
+# vim: ft=kconfig noet ts=8 sw=8
diff --git a/rules/libonig.make b/rules/libonig.make
new file mode 100644
index 000000000..3397f553f
--- /dev/null
+++ b/rules/libonig.make
@@ -0,0 +1,52 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2025 by Alexander Dahl <ada@thorsis.com>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_LIBONIG) += libonig
+
+#
+# Paths and names
+#
+LIBONIG_VERSION		:= 6.9.10
+LIBONIG_MD5		:= 46c48d072eafe29a0dd0489df7f6f212
+LIBONIG			:= onig-$(LIBONIG_VERSION)
+LIBONIG_SUFFIX		:= tar.gz
+LIBONIG_URL		:= https://github.com/kkos/oniguruma/releases/download/v$(LIBONIG_VERSION)/$(LIBONIG).$(LIBONIG_SUFFIX)
+LIBONIG_SOURCE		:= $(SRCDIR)/$(LIBONIG).$(LIBONIG_SUFFIX)
+LIBONIG_DIR		:= $(BUILDDIR)/$(LIBONIG)
+LIBONIG_LICENSE		:= BSD-2-Clause
+LIBONIG_LICENSE_FILES	:= file://COPYING;md5=e6365c225bb5cc4321d0913f0baffa04
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+LIBONIG_CONF_TOOL	:= autoconf
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/libonig.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, libonig)
+	@$(call install_fixup, libonig,PRIORITY,optional)
+	@$(call install_fixup, libonig,SECTION,base)
+	@$(call install_fixup, libonig,AUTHOR,"Alexander Dahl <ada@thorsis.com>")
+	@$(call install_fixup, libonig,DESCRIPTION,missing)
+
+	@$(call install_lib, libonig, 0, 0, 0644, libonig)
+
+	@$(call install_finish, libonig)
+
+	@$(call touch)
+
+# vim: ft=make noet ts=8 sw=8
-- 
2.39.5




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

* [ptxdist] [PATCH v2 2/3] jq: Make regex support optional
  2025-06-03  9:08 [ptxdist] [PATCH v2 0/3] jq: license update and version bump Alexander Dahl via ptxdist
  2025-06-03  9:08 ` [ptxdist] [PATCH v2 1/3] libonig: Add new package Alexander Dahl via ptxdist
@ 2025-06-03  9:09 ` Alexander Dahl via ptxdist
  2025-06-03  9:09 ` [ptxdist] [PATCH v2 3/3] jq: version bump 1.7.1 -> 1.8.0 Alexander Dahl via ptxdist
  2 siblings, 0 replies; 4+ messages in thread
From: Alexander Dahl via ptxdist @ 2025-06-03  9:09 UTC (permalink / raw)
  To: ptxdist; +Cc: Alexander Dahl, Andreas Helmcke

Initially the jq package had this turned off, it was turned on later.
Make it optional now to simplify license handling with libonig and fix
the build with the upcoming version bump to jq 1.8.0.

Signed-off-by: Alexander Dahl <ada@thorsis.com>
---
 rules/jq.in   | 16 ++++++++++++++--
 rules/jq.make |  3 +--
 2 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/rules/jq.in b/rules/jq.in
index 03354642b..0e30fbceb 100644
--- a/rules/jq.in
+++ b/rules/jq.in
@@ -1,9 +1,21 @@
 ## SECTION=shell_and_console
 
-config JQ
+menuconfig JQ
 	tristate
-	prompt "jq"
+	prompt "jq                            "
+	select LIBONIG if JQ_REGEX
 	help
 	  lightweight and flexible command-line JSON processor
 
+if JQ
+
+config JQ_REGEX
+	bool
+	prompt "regular expression support"
+	default y
+	help
+	  Optional support for match/test/sub and related functions.
+
+endif
+
 # vim: ft=kconfig noet tw=72
diff --git a/rules/jq.make b/rules/jq.make
index 4f7ca95ad..f1f7fc6f8 100644
--- a/rules/jq.make
+++ b/rules/jq.make
@@ -43,7 +43,7 @@ JQ_CONF_OPT	:= \
 	--disable-error-injection \
 	--disable-all-static \
 	--disable-decnum \
-	--with-oniguruma=prefix
+	--$(call ptx/wwo, PTXCONF_JQ_REGEX)-oniguruma
 
 # ----------------------------------------------------------------------------
 # Target-Install
@@ -59,7 +59,6 @@ $(STATEDIR)/jq.targetinstall:
 	@$(call install_fixup, jq,DESCRIPTION,missing)
 
 	@$(call install_lib, jq, 0, 0, 0644, libjq)
-	@$(call install_lib, jq, 0, 0, 0644, libonig)
 	@$(call install_copy, jq, 0, 0, 0755, -, /usr/bin/jq)
 
 	@$(call install_finish, jq)
-- 
2.39.5




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

* [ptxdist] [PATCH v2 3/3] jq: version bump 1.7.1 -> 1.8.0
  2025-06-03  9:08 [ptxdist] [PATCH v2 0/3] jq: license update and version bump Alexander Dahl via ptxdist
  2025-06-03  9:08 ` [ptxdist] [PATCH v2 1/3] libonig: Add new package Alexander Dahl via ptxdist
  2025-06-03  9:09 ` [ptxdist] [PATCH v2 2/3] jq: Make regex support optional Alexander Dahl via ptxdist
@ 2025-06-03  9:09 ` Alexander Dahl via ptxdist
  2 siblings, 0 replies; 4+ messages in thread
From: Alexander Dahl via ptxdist @ 2025-06-03  9:09 UTC (permalink / raw)
  To: ptxdist; +Cc: Alexander Dahl, Andreas Helmcke

Multiple security fixes, bug fixes, CLI changes, some new functions,
changes to existing functions, language changes, build improvements
(amongst others for GCC 15), and test improvements.

License file got two more lines from a components license, just a fix.

Link: https://github.com/jqlang/jq/releases/tag/jq-1.8.0
Signed-off-by: Alexander Dahl <ada@thorsis.com>
---
 rules/jq.make | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/rules/jq.make b/rules/jq.make
index f1f7fc6f8..473c47ead 100644
--- a/rules/jq.make
+++ b/rules/jq.make
@@ -14,15 +14,15 @@ PACKAGES-$(PTXCONF_JQ) += jq
 #
 # Paths and names
 #
-JQ_VERSION	:= 1.7.1
-JQ_MD5		:= 974a340105ecb43add8c55601525f9fc
+JQ_VERSION	:= 1.8.0
+JQ_MD5		:= 46856841b9fd765b852023b881cd2e8b
 JQ		:= jq-$(JQ_VERSION)
 JQ_SUFFIX	:= tar.gz
 JQ_URL		:= https://github.com/jqlang/jq/releases/download/$(JQ)/$(JQ).$(JQ_SUFFIX)
 JQ_SOURCE	:= $(SRCDIR)/$(JQ).$(JQ_SUFFIX)
 JQ_DIR		:= $(BUILDDIR)/$(JQ)
 JQ_LICENSE	:= MIT AND CC-BY-3.0 AND ICU
-JQ_LICENSE_FILES := file://COPYING;md5=488f4e0b04c0456337fb70d1ac1758ba
+JQ_LICENSE_FILES := file://COPYING;md5=08ffb5ac7e7e6bfc66968b89f01f512a
 
 # ----------------------------------------------------------------------------
 # Prepare
-- 
2.39.5




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

end of thread, other threads:[~2025-06-03  9:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-06-03  9:08 [ptxdist] [PATCH v2 0/3] jq: license update and version bump Alexander Dahl via ptxdist
2025-06-03  9:08 ` [ptxdist] [PATCH v2 1/3] libonig: Add new package Alexander Dahl via ptxdist
2025-06-03  9:09 ` [ptxdist] [PATCH v2 2/3] jq: Make regex support optional Alexander Dahl via ptxdist
2025-06-03  9:09 ` [ptxdist] [PATCH v2 3/3] jq: version bump 1.7.1 -> 1.8.0 Alexander Dahl via ptxdist

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