Dear Maintainer,
*** Reporter, please consider answering these questions, where appropriate ***
* What led up to the situation? running `jq --version` yielded an answer that does not correspond to `dpkg -l jq`
* What exactly did you do (or not do) that was effective (or
ineffective)?
I installed `jq:1.7.1-6` and ran `jq --version`
I had to download the source tarball and confirm that it was actually `1.7.1`.
Then I had to download the debian changes bit to find the patch that hard coded the version to `1.7`.
I also downloaded the upstream version of jq 1.7.1 and confirmed that when using `--verison` with it, it reports `1.7.1`.
* What was the outcome of this action?
I've determined that the packaged binary is approximately `1.7.1` but lies and claims it is 1.7.
I've determined that upstream provides a binary for `1.7.1` and reports it is `1.7.1`.
* What outcome did you expect instead?
Versions that correspond to `1.7.1` should claim to be `1.7.1` (and similarly for versions 1.x.1).
*** End of the template - remove these template lines ***
We believe that the bug you reported is fixed in the latest version of jq, which is due to be installed in the Debian FTP archive. A summary of the changes between this version and the previous one is attached. Thank you for reporting the bug, which will now be closed. If you have further comments please address them to 1108533@bugs.debian.org, and the maintainer will reopen the bug report if appropriate. Debian distribution maintenance software pp. ChangZhuo Chen (陳昌倬) <czchen@debian.org> (supplier of updated jq package) (This message was generated automatically at their request; if you believe that there is a problem with it please contact the archive administrators by mailing ftpmaster@ftp-master.debian.org) Format: 1.8 Date: Wed, 09 Jul 2025 21:30:59 +0800 Source: jq Architecture: source Version: 1.8.1-2 Distribution: unstable Urgency: medium Maintainer: ChangZhuo Chen (陳昌倬) <czchen@debian.org> Changed-By: ChangZhuo Chen (陳昌倬) <czchen@debian.org> Closes: 1108533 1108854 Changes: jq (1.8.1-2) unstable; urgency=medium . * Enable time64 abi to fix i386 unit test fails (Closes: #1108854) * Use dpkg-parsechangelog to get build version (Closes: #1108533) Checksums-Sha1: 5a85edb7ce90c52b0831c28ff1728bbb401a5231 2000 jq_1.8.1-2.dsc 1799253e29c7a58786bcbcb65bc1bbf701877e8b 14052 jq_1.8.1-2.debian.tar.xz 238e37a1ee087cbfc68c311a06ecf1d653c20b71 7542 jq_1.8.1-2_amd64.buildinfo Checksums-Sha256: 3b3671fffcbee1fe1c9549ca2ef57ff8ccf943c0e7f530bef2e64de515df8a6d 2000 jq_1.8.1-2.dsc d3349934828c1a2f21d01cb1e17b25327ce3131a57806df24eefec8e36390718 14052 jq_1.8.1-2.debian.tar.xz a6442a3890b45ceadc9904795c2db0c14a44bcbde77f87aaa1839113fadf37b2 7542 jq_1.8.1-2_amd64.buildinfo Files: 39a9c00a8e96db82aade638414877c14 2000 utils optional jq_1.8.1-2.dsc a8a77c03144d607c977ecc684099c050 14052 utils optional jq_1.8.1-2.debian.tar.xz c869bb830adb3bba46797f5c7c8aa5f4 7542 utils optional jq_1.8.1-2_amd64.buildinfo -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEugQ0bcLh/mPHkIeTzGWwzewnXVsFAmhucZEACgkQzGWwzewn XVsSmQ/8Dv+cBKXRvwOmm3SokkwwNBlg1lKvNKe4qos9f0tTmHfNwE0DaABjA1AG NDW2LGQTwHK3YQFDr5ubTc7B3FuS37xA0cOcx4HIDhsxQW3dpyhkYjoDPa693cm/ mf+XsyPCKdkTGNnG/Mj4N9tAbqqFI9oRX12RJoxqDGJKpiMrcRroF8ojtKNDhU4P WsvwmWIx+8/U5tgKfiFohUlBSao075ei71K+OvQukaxxUtegS/cIL+4eNQLU+ZMr ydNQKdpM0/oCbGHvyx0rlCKdnCw2qLE3oHOHiTv83iamVfD9jmtIzd/9+1ewkI7r P87Wtmen69/PZvWR5lB200vDdhmnJ1wMa3AWNxYIROYaO9r0VyPui1Vu6m4r6p4B LdLTumysMdykq8Qm0vWWkn8NJ1OyZGTqQBLSJB3WTiE732bpzSKh/ZTW+wVtMXUK VCAKVkFzzqQPgNoknq8kb3N/h6qi8g6uyQVQDcpORNL79s4Do07qhtP8GNNCCH8m vhCJYgT/rGGC284f+ZTj8ujnUXAA1ZZN0PreLNDixPDkTiHyRo2EAm4He3y2yMfX 9Gpwd7kRYLBx8CPjwzGFq8lJzTHbHNZ/7pgzKVFu+HbIaO3wEMHP8lrt8z6xPYrk cC4A8T2wbV6LEC69QYnis6PPeyYNEwC6dudvpUkk+4w+6uaV/sc= =2B4r -----END PGP SIGNATURE-----
Hi! To fetch the version, instead of using: dpkg-parsechangelog | grep --basic-regex '^Version: ' | cut --delimiter=' ' --field=2 | cut --delimiter='-' --field=1 You could use: dpkg-parsechangelog --show-field=Version | cut --delimiter='-' --field=1 But I guess even better would be if upstream fixed the build system so that it works also from a tarball release (not just from git), for example with something like this: https://gitlab.freedesktop.org/libbsd/libbsd/-/blob/main/get-version https://gitlab.freedesktop.org/libbsd/libbsd/-/blob/main/Makefile.am#L17 Thanks, Guillem