[MacPorts] #68923: jq version is reporting as `jq-`, not `jq-1.7` or `jq-1.7.1`
MacPorts
noreply at macports.org
Sun Dec 17 03:28:01 UTC 2023
#68923: jq version is reporting as `jq-`, not `jq-1.7` or `jq-1.7.1`
------------------------+--------------------
Reporter: halostatue | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version:
Keywords: | Port: jq
------------------------+--------------------
This happens on the buildbot versions or build from source.
{{{#!sh
$ sudo port uninstall jq && sudo port install -s jq
---> Deactivating jq @1.7.1_0
---> Cleaning jq
---> Uninstalling jq @1.7.1_0
---> Cleaning jq
---> Computing dependencies for jq
---> Verifying checksums for jq
---> Extracting jq
---> Configuring jq
---> Building jq
---> Staging jq into destroot
---> Installing jq @1.7.1_0
---> Activating jq @1.7.1_0
---> Cleaning jq
---> Scanning binaries for linking errors
---> No broken files found.
---> No broken ports found.
$ jq --version
jq-
}}}
Getting the same distfile (`port fetch jq`), extracting it, and then
configuring and building it creates a version which contains the version,
*unless* `autoreconf` is run:
{{{#!sh
$ port fetch jq
…
$ cp /opt/local/var/macports/distfiles/jq/jq-1.7.1.tar.gz .
$ tar xfz jq-1.7.1.tar.gz
$ cd jq-1.7.1
$ ./configure --disable-docs --disable-silent-urle --with-
oniguruma=/opt/local --disable-maintainer-mode && make && ./jq --version
# lots of output
jq-1.7.1
$ autoreconf && $ ./configure --disable-docs --disable-silent-urle --with-
oniguruma=/opt/local --disable-maintainer-mode && make && ./jq --version
# lots of output
jq-
}}}
The problem appears to be that `scripts/version` expects to be run from
the git repository and exits out if there is no `.git` directory (and it
would require `tags` in any case).
I have a possible PR (https://github.com/macports/macports-
ports/compare/master...halostatue:macports-ports:fix-jq-version), but I
don't particularly like this approach since the `releases` tarball is
already properly configured by the jq project (this may differ from
previous versions). The simpler fix would be:
{{{#!diff
diff --git i/sysutils/jq/Portfile w/sysutils/jq/Portfile
index f1c4d3bcc65e..04335e284aa8 100644
--- i/sysutils/jq/Portfile
+++ w/sysutils/jq/Portfile
@@ -41,8 +41,6 @@ configure.args --disable-docs \
--with-oniguruma=${prefix} \
--disable-maintainer-mode
-use_autoreconf yes
-
livecheck.type regex
livecheck.regex ${name}-(\\d+(\.\\d+)+)\.tar
}}}
--
Ticket URL: <https://trac.macports.org/ticket/68923>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list