Skip to content

Commit 818350c

Browse files
authored
Merge pull request #1544 from flatcar/dongsu/jq-1.7.1
app-misc/jq: update to 1.7.1
2 parents d0c7277 + b231722 commit 818350c

File tree

4 files changed

+89
-0
lines changed

4 files changed

+89
-0
lines changed
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- jq ([1.7.1](https://github.com/jqlang/jq/releases/tag/jq-1.7.1))

sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.accept_keywords

+3
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@
3131
# Keep versions on both arches in sync.
3232
=app-misc/pax-utils-1.3.7 ~amd64
3333

34+
# Needed for addressing CVE-2023-50246, CVE-2023-50268
35+
=app-misc/jq-1.7.1 ~amd64 ~arm64
36+
3437
# Required for addressing CVE-2022-3715.
3538
=app-shells/bash-5.2_p15-r7 ~amd64 ~arm64
3639

Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
DIST jq-1.7.1.gh.tar.gz 1323338 BLAKE2B 17e3b68e23f9a7f1aa8749ede6c0b8fe435990899886f0c96da36d130c17d13609ba7f910321316f0c3b35985360f8cb5e6a3b12caea5e9bc7792e128798f137 SHA512 af9c444e5306423182f467a53acdf45bb8aefa058a47f490ce16395f0aebfb7627e3843f65e96f41cd9d4b72b8ad274ab0bdb061abc6990b1158f86d2256d4ec
12
DIST jq-1.7.gh.tar.gz 1267139 BLAKE2B b6a54f9beaabd7915d7a8f14cda9621573f1796af53fe1645561a7a199787a7e9b2b2df038208f23e63f339dec567851b70696ffb8194986250527333d36d44e SHA512 01676319fe98d5ab1e278430b2c58ec594191cc9485a20312d658c0e199ac7ea5f5e934817ce98da0864ec7e0a018aae9b87525260e8ab6a7bde918db483bd84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# Copyright 1999-2023 Gentoo Authors
2+
# Distributed under the terms of the GNU General Public License v2
3+
4+
EAPI=8
5+
6+
inherit autotools
7+
8+
MY_PV="${PV/_/}"
9+
MY_P="${PN}-${MY_PV}"
10+
DESCRIPTION="A lightweight and flexible command-line JSON processor"
11+
HOMEPAGE="https://stedolan.github.io/jq/"
12+
SRC_URI="https://github.com/jqlang/jq/archive/refs/tags/${MY_P}.tar.gz -> ${P}.gh.tar.gz"
13+
S="${WORKDIR}/${PN}-${MY_P}"
14+
15+
LICENSE="MIT CC-BY-3.0"
16+
SLOT="0"
17+
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~arm64-macos ~x64-macos ~x64-solaris"
18+
IUSE="+oniguruma static-libs test"
19+
20+
ONIGURUMA_MINPV='>=dev-libs/oniguruma-6.9.3' # Keep this in sync with bundled modules/oniguruma/
21+
DEPEND="
22+
>=sys-devel/bison-3.0
23+
sys-devel/flex
24+
oniguruma? ( ${ONIGURUMA_MINPV}:=[static-libs?] )
25+
"
26+
RDEPEND="
27+
!static-libs? (
28+
oniguruma? ( ${ONIGURUMA_MINPV}[static-libs?] )
29+
)
30+
"
31+
PATCHES=(
32+
"${FILESDIR}"/jq-1.6-r3-never-bundle-oniguruma.patch
33+
"${FILESDIR}"/jq-1.7-runpath.patch
34+
)
35+
36+
RESTRICT="!test? ( test )"
37+
REQUIRED_USE="test? ( oniguruma )"
38+
39+
src_prepare() {
40+
sed -e '/^dist_doc_DATA/d; s:-Wextra ::' -i Makefile.am || die
41+
printf "#!/bin/sh\\nprintf '%s'\\n\n" "${MY_PV}" > scripts/version || die
42+
43+
# jq-1.6-r3-never-bundle-oniguruma makes sure we build with the system oniguruma,
44+
# but the bundled copy of oniguruma still gets eautoreconf'd since it
45+
# exists; save the cycles by nuking it.
46+
sed -e '/modules\/oniguruma/d' -i Makefile.am || die
47+
rm -rf "${S}"/modules/oniguruma || die
48+
49+
default
50+
51+
sed -i "s/\[jq_version\]/[${MY_PV}]/" configure.ac || die
52+
53+
eautoreconf
54+
}
55+
56+
src_configure() {
57+
local econfargs=(
58+
# don't try to rebuild docs
59+
--disable-docs
60+
--disable-valgrind
61+
--disable-maintainer-mode
62+
--enable-rpathhack
63+
$(use_enable static-libs static)
64+
$(use_with oniguruma oniguruma yes)
65+
)
66+
econf "${econfargs[@]}"
67+
}
68+
69+
src_test() {
70+
if ! LD_LIBRARY_PATH="${S}/.libs" nonfatal emake check; then
71+
if [[ -r "${S}/test-suite.log" ]]; then
72+
eerror "Tests failed, outputting testsuite log"
73+
cat "${S}/test-suite.log"
74+
fi
75+
die "Tests failed"
76+
fi
77+
}
78+
79+
src_install() {
80+
local DOCS=( AUTHORS NEWS.md README.md SECURITY.md )
81+
default
82+
83+
use static-libs || { find "${D}" -name '*.la' -delete || die; }
84+
}

0 commit comments

Comments
 (0)