| Message ID | 20260423124823.1983261-1-ankur.tyagi85@gmail.com |
|---|---|
| State | New |
| Headers | show |
| Series | [meta-oe,whinlatter,1/19] jq: Use Git to fetch the code | expand |
Hi Ankur, Thank you for sending these. I had already picked a lot of these in my branch for pull request I'd like to send today. I will take the rest in next and final series for whinlatter. On Thu, Apr 23, 2026 at 8:48 PM Ankur Tyagi via lists.openembedded.org <ankur.tyagi85=gmail.com@lists.openembedded.org> wrote: > > From: Peter Kjellerstedt <pkj@axis.com> > > 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> > Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com> > (cherry picked from commit ed33569f822a3a8d41f82f6980a046d17aca37d5) > Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com> > --- > ...-with-disable-maintainer-mode-and-so.patch | 44 +++++++++++++++++++ > meta-oe/recipes-devtools/jq/jq_1.8.1.bb | 14 +++--- > 2 files changed, 52 insertions(+), 6 deletions(-) > create mode 100644 meta-oe/recipes-devtools/jq/jq/0001-Support-building-with-disable-maintainer-mode-and-so.patch > > diff --git a/meta-oe/recipes-devtools/jq/jq/0001-Support-building-with-disable-maintainer-mode-and-so.patch b/meta-oe/recipes-devtools/jq/jq/0001-Support-building-with-disable-maintainer-mode-and-so.patch > new file mode 100644 > index 0000000000..12a64a75ed > --- /dev/null > +++ b/meta-oe/recipes-devtools/jq/jq/0001-Support-building-with-disable-maintainer-mode-and-so.patch > @@ -0,0 +1,44 @@ > +From 27f417f4812e688a59fc5186b7768cec004cd6e5 Mon Sep 17 00:00:00 2001 > +From: Peter Kjellerstedt <peter.kjellerstedt@gmail.com> > +Date: Wed, 8 Apr 2026 05:58:49 +0200 > +Subject: [PATCH] Support building with --disable-maintainer-mode and source != > + build dir (#3518) > + > +If --disable-maintainer-mode is enabled, then the rules for generating > +parser.[ch] and lexer.[ch] did nothing. This worked fine if the source > +and build directories are the same as the pre-generated parser.c and > +lexer.c files would suffice. However, if the build directory is not the > +same as the source directory, then the rest of the Make rules expect > +parser.[ch] and lexer.[ch] to have been created in the build directory > +if their source files (parser.y and lexer.l) are newer than the target > +files, which can happen in case the source is fetched using Git. > + > +Avoid the problem by copying the files to the build directory if needed. > + > +Co-authored-by: Peter Kjellerstedt <pkj@axis.com> > +Upstream-Status: Backport [https://github.com/jqlang/jq/commit/27f417f4812e688a59fc5186b7768cec004cd6e5] > +--- > + Makefile.am | 9 +++++++-- > + 1 file changed, 7 insertions(+), 2 deletions(-) > + > +diff --git a/Makefile.am b/Makefile.am > +index 96d6038..acb9443 100644 > +--- a/Makefile.am > ++++ b/Makefile.am > +@@ -41,9 +41,14 @@ src/lexer.h: src/lexer.c > + else > + BUILT_SOURCES = src/builtin.inc src/config_opts.inc src/version.h > + .y.c: > +- $(AM_V_YACC) echo "NOT building parser.c!" > ++ $(AM_V_YACC) [ "$(<D)" = "$(@D)" ] || cp $(<D)/$(@F) $@ > ++ $(AM_V_YACC) [ "$(<D)" = "$(@D)" ] || cp $(<D)/$(*F).h $*.h > ++ $(AM_V_YACC) touch $@ $*.h > ++ > + .l.c: > +- $(AM_V_LEX) echo "NOT building lexer.c!" > ++ $(AM_V_LEX) [ "$(<D)" = "$(@D)" ] || cp $(<D)/$(@F) $@ > ++ $(AM_V_LEX) [ "$(<D)" = "$(@D)" ] || cp $(<D)/$(*F).h $*.h > ++ $(AM_V_LEX) touch $@ $*.h > + endif > + > + # Tell YACC (Bison) autoconf macros that you want a header file created. > 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..6eaa2de6df 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,17 @@ 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" > + file://0001-Support-building-with-disable-maintainer-mode-and-so.patch \ > +" > > -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" > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#126577): https://lists.openembedded.org/g/openembedded-devel/message/126577 > Mute This Topic: https://lists.openembedded.org/mt/118970752/3616702 > Group Owner: openembedded-devel+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [anuj.mittal@oss.qualcomm.com] > -=-=-=-=-=-=-=-=-=-=-=- >
On Fri, Apr 24, 2026 at 1:45 PM Anuj Mittal <anuj.mittal@oss.qualcomm.com> wrote: > > Hi Ankur, > > Thank you for sending these. I had already picked a lot of these in my > branch for pull request I'd like to send today. I will take the rest > in next and final series for whinlatter. Sounds good. What's your plan for the final cut-off to accept patches for whinlatter? > > On Thu, Apr 23, 2026 at 8:48 PM Ankur Tyagi via lists.openembedded.org > <ankur.tyagi85=gmail.com@lists.openembedded.org> wrote: > > > > From: Peter Kjellerstedt <pkj@axis.com> > > > > 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> > > Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com> > > (cherry picked from commit ed33569f822a3a8d41f82f6980a046d17aca37d5) > > Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com> > > --- > > ...-with-disable-maintainer-mode-and-so.patch | 44 +++++++++++++++++++ > > meta-oe/recipes-devtools/jq/jq_1.8.1.bb | 14 +++--- > > 2 files changed, 52 insertions(+), 6 deletions(-) > > create mode 100644 meta-oe/recipes-devtools/jq/jq/0001-Support-building-with-disable-maintainer-mode-and-so.patch > > > > diff --git a/meta-oe/recipes-devtools/jq/jq/0001-Support-building-with-disable-maintainer-mode-and-so.patch b/meta-oe/recipes-devtools/jq/jq/0001-Support-building-with-disable-maintainer-mode-and-so.patch > > new file mode 100644 > > index 0000000000..12a64a75ed > > --- /dev/null > > +++ b/meta-oe/recipes-devtools/jq/jq/0001-Support-building-with-disable-maintainer-mode-and-so.patch > > @@ -0,0 +1,44 @@ > > +From 27f417f4812e688a59fc5186b7768cec004cd6e5 Mon Sep 17 00:00:00 2001 > > +From: Peter Kjellerstedt <peter.kjellerstedt@gmail.com> > > +Date: Wed, 8 Apr 2026 05:58:49 +0200 > > +Subject: [PATCH] Support building with --disable-maintainer-mode and source != > > + build dir (#3518) > > + > > +If --disable-maintainer-mode is enabled, then the rules for generating > > +parser.[ch] and lexer.[ch] did nothing. This worked fine if the source > > +and build directories are the same as the pre-generated parser.c and > > +lexer.c files would suffice. However, if the build directory is not the > > +same as the source directory, then the rest of the Make rules expect > > +parser.[ch] and lexer.[ch] to have been created in the build directory > > +if their source files (parser.y and lexer.l) are newer than the target > > +files, which can happen in case the source is fetched using Git. > > + > > +Avoid the problem by copying the files to the build directory if needed. > > + > > +Co-authored-by: Peter Kjellerstedt <pkj@axis.com> > > +Upstream-Status: Backport [https://github.com/jqlang/jq/commit/27f417f4812e688a59fc5186b7768cec004cd6e5] > > +--- > > + Makefile.am | 9 +++++++-- > > + 1 file changed, 7 insertions(+), 2 deletions(-) > > + > > +diff --git a/Makefile.am b/Makefile.am > > +index 96d6038..acb9443 100644 > > +--- a/Makefile.am > > ++++ b/Makefile.am > > +@@ -41,9 +41,14 @@ src/lexer.h: src/lexer.c > > + else > > + BUILT_SOURCES = src/builtin.inc src/config_opts.inc src/version.h > > + .y.c: > > +- $(AM_V_YACC) echo "NOT building parser.c!" > > ++ $(AM_V_YACC) [ "$(<D)" = "$(@D)" ] || cp $(<D)/$(@F) $@ > > ++ $(AM_V_YACC) [ "$(<D)" = "$(@D)" ] || cp $(<D)/$(*F).h $*.h > > ++ $(AM_V_YACC) touch $@ $*.h > > ++ > > + .l.c: > > +- $(AM_V_LEX) echo "NOT building lexer.c!" > > ++ $(AM_V_LEX) [ "$(<D)" = "$(@D)" ] || cp $(<D)/$(@F) $@ > > ++ $(AM_V_LEX) [ "$(<D)" = "$(@D)" ] || cp $(<D)/$(*F).h $*.h > > ++ $(AM_V_LEX) touch $@ $*.h > > + endif > > + > > + # Tell YACC (Bison) autoconf macros that you want a header file created. > > 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..6eaa2de6df 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,17 @@ 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" > > + file://0001-Support-building-with-disable-maintainer-mode-and-so.patch \ > > +" > > > > -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" > > > > > > -=-=-=-=-=-=-=-=-=-=-=- > > Links: You receive all messages sent to this group. > > View/Reply Online (#126577): https://lists.openembedded.org/g/openembedded-devel/message/126577 > > Mute This Topic: https://lists.openembedded.org/mt/118970752/3616702 > > Group Owner: openembedded-devel+owner@lists.openembedded.org > > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [anuj.mittal@oss.qualcomm.com] > > -=-=-=-=-=-=-=-=-=-=-=- > >
diff --git a/meta-oe/recipes-devtools/jq/jq/0001-Support-building-with-disable-maintainer-mode-and-so.patch b/meta-oe/recipes-devtools/jq/jq/0001-Support-building-with-disable-maintainer-mode-and-so.patch new file mode 100644 index 0000000000..12a64a75ed --- /dev/null +++ b/meta-oe/recipes-devtools/jq/jq/0001-Support-building-with-disable-maintainer-mode-and-so.patch @@ -0,0 +1,44 @@ +From 27f417f4812e688a59fc5186b7768cec004cd6e5 Mon Sep 17 00:00:00 2001 +From: Peter Kjellerstedt <peter.kjellerstedt@gmail.com> +Date: Wed, 8 Apr 2026 05:58:49 +0200 +Subject: [PATCH] Support building with --disable-maintainer-mode and source != + build dir (#3518) + +If --disable-maintainer-mode is enabled, then the rules for generating +parser.[ch] and lexer.[ch] did nothing. This worked fine if the source +and build directories are the same as the pre-generated parser.c and +lexer.c files would suffice. However, if the build directory is not the +same as the source directory, then the rest of the Make rules expect +parser.[ch] and lexer.[ch] to have been created in the build directory +if their source files (parser.y and lexer.l) are newer than the target +files, which can happen in case the source is fetched using Git. + +Avoid the problem by copying the files to the build directory if needed. + +Co-authored-by: Peter Kjellerstedt <pkj@axis.com> +Upstream-Status: Backport [https://github.com/jqlang/jq/commit/27f417f4812e688a59fc5186b7768cec004cd6e5] +--- + Makefile.am | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 96d6038..acb9443 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -41,9 +41,14 @@ src/lexer.h: src/lexer.c + else + BUILT_SOURCES = src/builtin.inc src/config_opts.inc src/version.h + .y.c: +- $(AM_V_YACC) echo "NOT building parser.c!" ++ $(AM_V_YACC) [ "$(<D)" = "$(@D)" ] || cp $(<D)/$(@F) $@ ++ $(AM_V_YACC) [ "$(<D)" = "$(@D)" ] || cp $(<D)/$(*F).h $*.h ++ $(AM_V_YACC) touch $@ $*.h ++ + .l.c: +- $(AM_V_LEX) echo "NOT building lexer.c!" ++ $(AM_V_LEX) [ "$(<D)" = "$(@D)" ] || cp $(<D)/$(@F) $@ ++ $(AM_V_LEX) [ "$(<D)" = "$(@D)" ] || cp $(<D)/$(*F).h $*.h ++ $(AM_V_LEX) touch $@ $*.h + endif + + # Tell YACC (Bison) autoconf macros that you want a header file created. 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..6eaa2de6df 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,17 @@ 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" + file://0001-Support-building-with-disable-maintainer-mode-and-so.patch \ +" -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"