diff mbox series

[meta-oe] jq: Use Git to fetch the code

Message ID 20260313232357.1729272-1-pkj@axis.com
State New
Headers show
Series [meta-oe] jq: Use Git to fetch the code | expand

Commit Message

Peter Kjellerstedt March 13, 2026, 11:23 p.m. UTC
There is a bug (see https://github.com/jqlang/jq/issues/434), which
results in an empty version being used if autoreconf is run on the jq
sources when using a release tar ball. The incorrect assumption is that
autoreconf is only used when fetching the code using Git.

The empty version results in an incorrect libjq.pc file being created
where the version is not set, which results in, e.g.,
`pkgconf --libs 'libjq > 1.6'` failing even if version 1.8.1 of jq is
actually installed.

Switch to fetching the code using Git to workaround the bug.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
 meta-oe/recipes-devtools/jq/jq_1.8.1.bb | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/meta-oe/recipes-devtools/jq/jq_1.8.1.bb b/meta-oe/recipes-devtools/jq/jq_1.8.1.bb
index b9383c76f7..f2e90f72f5 100644
--- a/meta-oe/recipes-devtools/jq/jq_1.8.1.bb
+++ b/meta-oe/recipes-devtools/jq/jq_1.8.1.bb
@@ -8,15 +8,16 @@  SECTION = "utils"
 LICENSE = "MIT & BSD-2-Clause"
 LIC_FILES_CHKSUM = "file://COPYING;md5=cf7fcb0a1def4a7ad62c028f7d0dca47"
 
-GITHUB_BASE_URI = "https://github.com/jqlang/${BPN}/releases/"
-SRC_URI = "${GITHUB_BASE_URI}/download/${BPN}-${PV}/${BPN}-${PV}.tar.gz \
+SRCREV = "4467af7068b1bcd7f882defff6e7ea674c5357f4"
+
+SRC_URI = " \
+    git://github.com/jqlang/jq.git;protocol=https;branch=master;tag=jq-${PV} \
     file://run-ptest \
-    "
-SRC_URI[sha256sum] = "2be64e7129cecb11d5906290eba10af694fb9e3e7f9fc208a311dc33ca837eb0"
+"
 
-inherit autotools github-releases ptest
+inherit autotools ptest
 
-UPSTREAM_CHECK_REGEX = "releases/tag/${BPN}-(?P<pver>\d+(\.\d+)+)"
+UPSTREAM_CHECK_GITTAGREGEX = "${BPN}-(?P<pver>\d+(\.\d+)+)"
 
 PACKAGECONFIG ?= "oniguruma"