amazonlinux / amazon-linux-2023

Amazon Linux 2023
https://aws.amazon.com/linux/amazon-linux-2023/
Other
535 stars 40 forks source link

[Package Request] - jq 1.7 #464

Closed danfuzz closed 6 months ago

danfuzz commented 1 year ago

What package is missing from Amazon Linux 2023? Please describe and include package name.

jq version 1.7.

Is this an update to existing package or new package request?

Update.

Is this package available in Amazon Linux 2? If it is available via external sources such as EPEL, please specify.

Not in Amazon Linux 2. Was only released within the last couple weeks or so.

You can find a bunch of ways it's currently packaged here: https://jqlang.github.io/jq/download/

Any additional information you'd like to include. (use-cases, etc)

Notably, it had been several years since jq was updated before this (the original author and maintainer handed it off to a motivated new crew of developers), and 1.7 fixes a lot of long-standing issues.

stewartsmith commented 6 months ago

As per https://docs.aws.amazon.com/linux/al2023/release-notes/vercmp-AL2023.3-AL2023.4.html jq 1.7 is available as of AL2023.4

danfuzz commented 6 months ago

Hi! Thanks for the update. Unfortunately, it looks like there's something wonky in its configuration, in that it doesn't actually report that it is v1.7. Instead, the version number is blank:

$ jq -V
jq-
$ jq --build-configuration
'--build=aarch64-amazon-linux-gnu' '--host=aarch64-amazon-linux-gnu' '--program-prefix='
'--disable-dependency-tracking' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin'
'--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64'
'--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' 
'--infodir=/usr/share/info' '--disable-static' 'build_alias=aarch64-amazon-linux-gnu' 
'host_alias=aarch64-amazon-linux-gnu' 'CC=gcc' 'CFLAGS=-O2 -ftree-vectorize -flto=auto -ffat-lto-objects 
-fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 
-Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong 
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -march=armv8.2-a+crypto -mtune=neoverse-n1 
-mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection' 
'LDFLAGS=-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld 
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -Wl,--build-id=sha1 
-Wl,-dT,/builddir/build/BUILD/jq-jq-1.7.1/.package_note-jq-1.7.1-48.amzn2023.0.1.aarch64.ld' 
'LT_SYS_LIBRARY_PATH=/usr/lib64:'
$
danfuzz commented 6 months ago

FWIW, my current workaround to check the jq version:

$ (jq -V; jq --build-configuration) | awk '/jq-[0-9]/ { match($0, /jq-[0-9.]+/); print substr($0, RSTART, RLENGTH); exit; }'
jq-1.7.1
$
stewartsmith commented 6 months ago

Huh... (I'm on my phone right now, otherwise I'd try myself) but any idea if this is also the case in Fedora?

If I get to a computer before you do, I'll check in a Fedora Rawhide container to check. I'm wanting to know if this is an upstream problem as well.

danfuzz commented 6 months ago

any idea if this is also the case in Fedora?

No clue, sorry. The only Fedora-ish distro I use is Amazon Linux.

daniejstriata commented 6 months ago

Fedora 40's package is correctly showing the version: image They have a patch that adds the version because they are building from the tarball and not git: https://src.fedoraproject.org/rpms/jq/blob/rawhide/f/fix-version-output.patch and in the SPEC:

# https://github.com/jqlang/jq/pull/3099
# fixes jq --version
Patch:          fix-version-output.patch