From 4c9ee1d6e8ad885e8460e50b92f23f135467dead Mon Sep 17 00:00:00 2001 From: Dongsu Park Date: Thu, 17 Sep 2020 13:41:21 +0200 Subject: [PATCH] app-misc/jq: update to 1.6-r3 Update app-misc/jq to 1.6-r3, to address security issue CVE-2015-8863. It is mainly to fix off-by-one error in the tokenadd function. It allows remote attackers to cause a denial of service (crash) via a long JSON-encoded number, which triggers a heap-based buffer overflow. --- .../portage-stable/app-misc/jq/ChangeLog | 132 ------------------ .../portage-stable/app-misc/jq/ChangeLog-2015 | 69 --------- .../portage-stable/app-misc/jq/Manifest | 14 +- .../jq/files/jq-1.4-dynamic-link.patch | 12 -- .../jq/files/jq-1.5-dynamic-link.patch | 13 -- ...1.5-heap_buffer_overflow_in_tokenadd.patch | 34 ----- ....5-remove-automagic-dep-on-oniguruma.patch | 58 -------- .../jq-1.6-r3-never-bundle-oniguruma.patch | 27 ++++ .../app-misc/jq/files/jq-1.6-runpath.patch | 17 +++ .../jq/files/jq-1.6-segfault-fix.patch | 22 +++ .../app-misc/jq/jq-1.4-r1.ebuild | 40 ------ .../portage-stable/app-misc/jq/jq-1.4.ebuild | 32 ----- .../app-misc/jq/jq-1.5-r1.ebuild | 53 ------- .../app-misc/jq/jq-1.5-r2.ebuild | 60 -------- .../app-misc/jq/jq-1.6-r3.ebuild | 78 +++++++++++ .../portage-stable/app-misc/jq/metadata.xml | 14 +- 16 files changed, 156 insertions(+), 519 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/app-misc/jq/ChangeLog delete mode 100644 sdk_container/src/third_party/portage-stable/app-misc/jq/ChangeLog-2015 delete mode 100644 sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.4-dynamic-link.patch delete mode 100644 sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.5-dynamic-link.patch delete mode 100644 sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.5-heap_buffer_overflow_in_tokenadd.patch delete mode 100644 sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.5-remove-automagic-dep-on-oniguruma.patch create mode 100644 sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.6-r3-never-bundle-oniguruma.patch create mode 100644 sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.6-runpath.patch create mode 100644 sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.6-segfault-fix.patch delete mode 100644 sdk_container/src/third_party/portage-stable/app-misc/jq/jq-1.4-r1.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/app-misc/jq/jq-1.4.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/app-misc/jq/jq-1.5-r1.ebuild delete mode 100644 sdk_container/src/third_party/portage-stable/app-misc/jq/jq-1.5-r2.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/app-misc/jq/jq-1.6-r3.ebuild diff --git a/sdk_container/src/third_party/portage-stable/app-misc/jq/ChangeLog b/sdk_container/src/third_party/portage-stable/app-misc/jq/ChangeLog deleted file mode 100644 index 2042df64ae..0000000000 --- a/sdk_container/src/third_party/portage-stable/app-misc/jq/ChangeLog +++ /dev/null @@ -1,132 +0,0 @@ -# ChangeLog for app-misc/jq -# Copyright 1999-2016 Gentoo Foundation; Distributed under the GPL v2 -# (auto-generated from git log) - -*jq-1.4-r1 (09 Aug 2015) -*jq-1.4 (09 Aug 2015) - - 09 Aug 2015; Robin H. Johnson - +files/jq-1.4-dynamic-link.patch, +jq-1.4.ebuild, +jq-1.4-r1.ebuild, - +metadata.xml: - proj/gentoo: Initial commit - - This commit represents a new era for Gentoo: - Storing the gentoo-x86 tree in Git, as converted from CVS. - - This commit is the start of the NEW history. - Any historical data is intended to be grafted onto this point. - - Creation process: - 1. Take final CVS checkout snapshot - 2. Remove ALL ChangeLog* files - 3. Transform all Manifests to thin - 4. Remove empty Manifests - 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ - 5.1. Do not touch files with -kb/-ko keyword flags. - - Signed-off-by: Robin H. Johnson - X-Thanks: Alec Warner - did the GSoC 2006 migration - tests - X-Thanks: Robin H. Johnson - infra guy, herding this - project - X-Thanks: Nguyen Thai Ngoc Duy - Former Gentoo - developer, wrote Git features for the migration - X-Thanks: Brian Harring - wrote much python to improve - cvs2svn - X-Thanks: Rich Freeman - validation scripts - X-Thanks: Patrick Lauer - Gentoo dev, running new 2014 - work in migration - X-Thanks: Michał Górny - scripts, QA, nagging - X-Thanks: All of other Gentoo developers - many ideas and lots of paint on - the bikeshed - - 24 Aug 2015; Justin Lecher metadata.xml: - Use https by default - - Convert all URLs for sites supporting encrypted connections from http to - https - - Signed-off-by: Justin Lecher - - 24 Aug 2015; Justin Lecher jq-1.4.ebuild, - jq-1.4-r1.ebuild: - Use https by default - - Convert all URLs for sites supporting encrypted connections from http to - https - - Signed-off-by: Justin Lecher - - 24 Aug 2015; Mike Gilbert metadata.xml: - Revert DOCTYPE SYSTEM https changes in metadata.xml - - repoman does not yet accept the https version. - This partially reverts eaaface92ee81f30a6ac66fe7acbcc42c00dc450. - - Bug: https://bugs.gentoo.org/552720 - - 22 Dec 2015; Fabian Groffen jq-1.4-r1.ebuild: - marked ~x64-macos - - Package-Manager: portage-2.2.20-prefix - -*jq-1.5 (09 Jan 2016) - - 09 Jan 2016; Patrick McLean - +files/jq-1.5-dynamic-link.patch, - +files/jq-1.5-remove-automagic-dep-on-oniguruma.patch, +jq-1.5.ebuild, - metadata.xml: - version bump to 1.5 - - This also fixes bugs 559334 and 566140, and adds a new "oniguruma" USE flag. - - Package-Manager: portage-2.2.26 - - 09 Jan 2016; Patrick McLean jq-1.4.ebuild, - jq-1.4-r1.ebuild: - Update SRC_URI in 1.4 and 1.4-r1 - - Gentoo-Bug: 566140 - Reported-by: Gaetan - - Package-Manager: portage-2.2.26 - - 24 Jan 2016; Michał Górny metadata.xml: - Unify quoting in metadata.xml files for machine processing - - Force unified quoting in all metadata.xml files since lxml does not - preserve original use of single and double quotes. Ensuring unified - quoting before the process allows distinguishing the GLEP 67-related - metadata.xml changes from unrelated quoting changes. - - 24 Jan 2016; Michał Górny metadata.xml: - Set appropriate maintainer types in metadata.xml (GLEP 67) - -*jq-1.5-r1 (01 Feb 2016) - - 01 Feb 2016; Patrick McLean +jq-1.5-r1.ebuild: - Revision bump, update bison dep to >=3.0 add rdep on oniguruma - - Gentoo-Bug: 573058 - - Package-Manager: portage-2.2.27 - - 01 Feb 2016; Patrick McLean -jq-1.5.ebuild: - Drop ebuild for 1.5 since -r1 fixes some depdency issues - - Package-Manager: portage-2.2.27 - -*jq-1.5-r2 (30 Apr 2016) - - 30 Apr 2016; Tim Harder - +files/jq-1.5-heap_buffer_overflow_in_tokenadd.patch, +jq-1.5-r2.ebuild: - fix buffer overflow (bug #580606) and other updates - - - add upstream metadata - - add arm architecture - - refactor econf args to an array - - move DOCS and PATCHES to their appropriate functions - - replace custom find with prune_libtool_files() - - Gentoo-Bug: 580606 - diff --git a/sdk_container/src/third_party/portage-stable/app-misc/jq/ChangeLog-2015 b/sdk_container/src/third_party/portage-stable/app-misc/jq/ChangeLog-2015 deleted file mode 100644 index 3e24ed8db3..0000000000 --- a/sdk_container/src/third_party/portage-stable/app-misc/jq/ChangeLog-2015 +++ /dev/null @@ -1,69 +0,0 @@ -# ChangeLog for app-misc/jq -# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-misc/jq/ChangeLog,v 1.16 2015/04/07 04:10:41 vapier Exp $ - -*jq-1.4-r1 (07 Apr 2015) - - 07 Apr 2015; Mike Frysinger - +files/jq-1.4-dynamic-link.patch, +jq-1.4-r1.ebuild: - Add USE=static-libs and fix linking of jq against the dynamic lib; fixes from - Chromium OS. - - 11 Dec 2014; Tim Harder -jq-1.3.ebuild, - -files/jq-1.3-automake-1.14.patch: - Remove old. - - 11 Dec 2014; Tim Harder jq-1.4.ebuild: - Stabilize for amd64 and x86. - -*jq-1.4 (11 Jul 2014) - - 11 Jul 2014; Patrick McLean +jq-1.4.ebuild: - Version bump (bug #516018). - - 10 Dec 2013; Tim Harder -jq-1.2.ebuild, - -files/jq-1.2-makefile.patch: - Remove old. - - 10 Dec 2013; Tim Harder jq-1.3.ebuild, - +files/jq-1.3-automake-1.14.patch: - Fix build with automake-1.14 (bug #493804). - - 04 Jul 2013; Agostino Sarubbo jq-1.3.ebuild: - Stable for x86, wrt bug #474936 - - 28 Jun 2013; Agostino Sarubbo jq-1.3.ebuild: - Stable for amd64, wrt bug #474936 - - 27 May 2013; Tim Harder jq-1.3.ebuild: - Don't try to rebuild docs (bug #471370). - -*jq-1.3 (23 May 2013) - - 23 May 2013; Tim Harder +jq-1.3.ebuild: - Version bump. - - 01 May 2013; Tim Harder -jq-1.1.ebuild, - -files/jq-1.1-makefile.patch: - Remove old. - - 01 May 2013; Agostino Sarubbo jq-1.2.ebuild: - Stable for x86, wrt bug #468074 - - 01 May 2013; Agostino Sarubbo jq-1.2.ebuild: - Stable for amd64, wrt bug #468074 - - 07 Feb 2013; Ulrich Müller jq-1.1.ebuild, jq-1.2.ebuild: - Move Creative Commons licenses to shorter names. - -*jq-1.2 (04 Jan 2013) - - 04 Jan 2013; Tim Harder +jq-1.2.ebuild, - +files/jq-1.2-makefile.patch: - Version bump. - -*jq-1.1 (23 Oct 2012) - - 23 Oct 2012; Tim Harder +jq-1.1.ebuild, - +files/jq-1.1-makefile.patch, +metadata.xml: - Initial import, ebuild by me. diff --git a/sdk_container/src/third_party/portage-stable/app-misc/jq/Manifest b/sdk_container/src/third_party/portage-stable/app-misc/jq/Manifest index 6174610155..a96abba550 100644 --- a/sdk_container/src/third_party/portage-stable/app-misc/jq/Manifest +++ b/sdk_container/src/third_party/portage-stable/app-misc/jq/Manifest @@ -1,13 +1 @@ -AUX jq-1.4-dynamic-link.patch 232 SHA256 dbc4f3a9f0e509e805a7a6966a37b53aaa00d0e0f06cc58d0a392b27a79e1a2b SHA512 d4c16d04a74ae9f119d6c513b4f401f90dbe88af0d03b0060ac29a57849c05a139eafc3ebfb7d815212858d8bfec981556874151351c0c56830cd0380679fc4f WHIRLPOOL fa7f215b94fa22010f55259379f069d68f2012d73477325ad2ceebe89b3ff81c19772aa5c248c2ecf3946d9200321deaf7fc43976355a9e4137a25e681527200 -AUX jq-1.5-dynamic-link.patch 292 SHA256 c4000f13ea2e0fe85e4d89470af17b7528cb87b2ca921fb990815bf6abcfad6d SHA512 1573ab7bdb9bd28db1ef7cbf834aada998b9651ffc1a9c67941faf23490ac3b145b6af6f1e41212b2c8c990d738b24bc7912a591db386f922c0b829a59e465ee WHIRLPOOL 29f3e6011c4f27d9339a0692685285ecee057aff58ba289146f6e36a31289c3146b1bc760948a1e55bdd5f6283338f2abbd3f5cbdab6e67479c5986c49e0f11a -AUX jq-1.5-heap_buffer_overflow_in_tokenadd.patch 1241 SHA256 5069a8e81ece30279e8d525b4a590f5757dfb3d05f8c0a9bf212f37e75905fcc SHA512 7c0e7268a8715f9354322b81e82971fd6e6810206024fb59f55fdf319c1053fdd17ab4d2a78c8edc9ed1638339671419f4ea92cbb0f8ffbb34e5b521efb35718 WHIRLPOOL 16d961d05c95d17c3d87543fc60b6166b968356b25568a8b1d2a5b2cb43bfed37435342ff7a3b530527222835da88ba6c4ccfbc60e542c22eb93431db0473ebd -AUX jq-1.5-remove-automagic-dep-on-oniguruma.patch 1879 SHA256 d5b55b63332899e9eff705fbb32fb1d790e2c637ff3be2659c47ecf8b17bc6c2 SHA512 3c7efccf85beda5f80c66432f6950b2d885c4587e6ed3cdc66447f60440dc0287da834cc5744ddd7af8ad36677254ebae6969bc498d36e457dfac69ca0da3f6d WHIRLPOOL 903ce507584d94ac49eaaa33c414e9fdca1a7f9ebbf185038ccb232b78ac6c04d7782458b97db0e983037ff4ab63e3e1cdd8d164191b7b22c020930d25baf913 -DIST jq-1.4.tar.gz 578317 SHA256 998c41babeb57b4304e65b4eb73094279b3ab1e63801b6b4bddd487ce009b39d SHA512 02e601b713a3249bcfe5373153dff38a63bf504895181ca3f691dbf033b407373a9c5880001bbd1954123cdf89f4fe75e2a5168e7a7cf13b3f7355dc18f92458 WHIRLPOOL 93c85a40d8aaf36d1f846ee9050aebe32a3a135e89a64647688b447af8733d210a4716d4ee62271a7d33f2e498e8aee7b2e88ed5373d0ec07e810215c1d288ab -DIST jq-1.5.tar.gz 739309 SHA256 c4d2bfec6436341113419debf479d833692cc5cdab7eb0326b5a4d4fbe9f493c SHA512 4a0bb069ae875f47731d7d84ae6b82240703dc7a694cfb0aee4c7e9639defe7ba9af575d17dc32bda4426b80c186cc8dcd4505f3a6bcbe16b39e9b13097da238 WHIRLPOOL ca45763fb43ba0bc4a97f1a6d34e3c5af0f25f2548d04646f76ac18e95792445eaa42869ce4a7a736b7d6bc09440225e277df79abacf23ef3c8f1b41170e2907 -EBUILD jq-1.4-r1.ebuild 852 SHA256 2cd732ef8eb9e415cfd72665f9e12184f2dcf2972a10154d25190ec44a382b2e SHA512 45a066036354a0ef24a7956537a59c5f4c0139a709228939e2fe966326dba5eb23309a18c2cb52e0edbec4b065de01f588d23ba5980ecea1ad3b45af1d681c15 WHIRLPOOL 670bdb2dfb974ce1882ae1802a5053427a7ce2c5bc09877399ca3991d610887e4cbb27643081e462362defd93c41defa30c78a8be3f597c4c7013f0aee44cd62 -EBUILD jq-1.4.ebuild 651 SHA256 43181180141fa4db04987979f289c505b73700e3e168c688ae1176902c1ab066 SHA512 4876194bc95a00060ad7d782ded2706c8e663f326a1189b81cf8f18d9f84921a233b3bf08b8ca1c17aa732a2a54d9358ca783a164050e617fc1a673d51b04184 WHIRLPOOL 239bafe801745cc496347025db5cec6950e73d6340433f93669fce2178a5e15e6a00d7887595b1e07984efb6374230a59af5a16596a78cf2c8effe54dbf5452a -EBUILD jq-1.5-r1.ebuild 1179 SHA256 b06ed59e186353dd2abf5d8b42d25ac412e50cf37b584ee3cdc16b27d8761713 SHA512 bb769a67a11413286d90e6ba36538d9e981b32e339b6af8a3c632cdc2ce5a0808180aeb5accde3e5057f9481b6a79e08e50d1daa679e661ba3e70b0ec71df5fd WHIRLPOOL 9fa21b8b5b09264b6bac82ccecbd34e2216617176f601c946581ae87959e2197b20db34a8acd841496fd775795886ee7f32b06c34457051ad768cb6d21d8d878 -EBUILD jq-1.5-r2.ebuild 1303 SHA256 92a68cac012346e195f58da19f26340449b9928f1da8122a294d0942658e5b82 SHA512 326323e3adf59bd9767010bfde22a9ead50e901a805b703e961651f15985dd8e1b1e4362c36540e00327e3cdc8866a1aaf80414f566c5d1e8ded5bf940e53406 WHIRLPOOL 6feba9512f13b6448c5976f3c8ead7ab8eca4d44a18ea45784afccd8f518633e873f3851aa242e5aa8fc0c1549c7e571e66767cdc3e017ed5d7415810b400cd9 -MISC ChangeLog 4369 SHA256 deec1974e3dcdfde4bde44455f9de1dafd176cbc46c352de75c3be4ff1812d6a SHA512 1b9a501fddc7ba3400fea9a09eecce8961a7ceb3e8b4eca33f9765f10d0b0f4a1c00643295435c7bb538532ac86add0c64cb8774264ee1e6ca9608553c622eb5 WHIRLPOOL a36a29d921ce4fd2c25fc02a725cd3014e58473b2a7ea2b731fd35c402c2653997146f6937f1c9bece0ee102e7c05813ddabcdde2571a3522f51c869ea7709d0 -MISC ChangeLog-2015 2176 SHA256 2e4f02d2f3bd0d54f9eb8e19deebb0bc43a8a7bd523dd65a0391817de5d9afeb SHA512 b407b35544a94c67504a90635083d816147c27791c8ee745e8252dcb0da67950fdf248eb791a25b3275a259ad70ef7a475a8b24d14711cdfb6e943da34493769 WHIRLPOOL ffef34e807b2ad4af67959abd78088316d73db4f520ceb062b0c2cd5c3149bbc31acbf251ab0dfbef2d74305702ad2d995bb92cb12a13c4e0820162c0e298e08 -MISC metadata.xml 347 SHA256 9ee404d621988a6d22c3726d75f9af3552a7e1d4675a78911e23b9910fa7696b SHA512 82b1311616fcfd74119bfe3e926bda3ac5f81cbbf5b6e81b277fc49edbf9e007cd625fa79d99dbd8e1ea31edadc5b5ccb80bcac9376730b37c0836c71d689e86 WHIRLPOOL 1ac47bc7ffd1f8c30a71ad364f0a7f4bb6dfd448526a876fba072e8cb6d213d1ec71b82d4a8955fa1f7f43334efceba07810255cc166bfe414b679b1300bda16 +DIST jq-1.6.tar.gz 1750584 BLAKE2B c9be1314e9d027247de63492ee362e996ef85faf45a47ee421cad95ebde9188bff8d3fc7db64e717ab922e1052f3b1c1500f5589fc5b2199ab66effb000e442d SHA512 5da71f53c325257f1f546a2520fe47828b495c953270df25ea0e37741463fdda72f0ba4d5b05b25114ec30f27a559344c2b024bacabf610759f4e3e9efadb480 diff --git a/sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.4-dynamic-link.patch b/sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.4-dynamic-link.patch deleted file mode 100644 index b958a15561..0000000000 --- a/sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.4-dynamic-link.patch +++ /dev/null @@ -1,12 +0,0 @@ -do not statically link libjq since we install it - ---- a/Makefile.am -+++ b/Makefile.am -@@ -53,7 +53,6 @@ - - bin_PROGRAMS = jq - jq_SOURCES = main.c --jq_LDFLAGS = -static-libtool-libs - jq_LDADD = libjq.la -lm - - ### Tests (make check) diff --git a/sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.5-dynamic-link.patch b/sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.5-dynamic-link.patch deleted file mode 100644 index dbc2f11acb..0000000000 --- a/sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.5-dynamic-link.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/Makefile.am b/Makefile.am -index c3a771f..274c01e 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -84,7 +84,7 @@ main.c: version.h - - bin_PROGRAMS = jq - jq_SOURCES = main.c version.h --jq_LDFLAGS = -static-libtool-libs -+jq_LDFLAGS = - jq_LDADD = libjq.la -lm - - if ENABLE_ALL_STATIC diff --git a/sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.5-heap_buffer_overflow_in_tokenadd.patch b/sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.5-heap_buffer_overflow_in_tokenadd.patch deleted file mode 100644 index edb07d8388..0000000000 --- a/sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.5-heap_buffer_overflow_in_tokenadd.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 8eb1367ca44e772963e704a700ef72ae2e12babd Mon Sep 17 00:00:00 2001 -From: Nicolas Williams -Date: Sat, 24 Oct 2015 17:24:57 -0500 -Subject: [PATCH] Heap buffer overflow in tokenadd() (fix #105) - -This was an off-by one: the NUL terminator byte was not allocated on -resize. This was triggered by JSON-encoded numbers longer than 256 -bytes. ---- - src/jv_parse.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/jv_parse.c b/src/jv_parse.c -index 3102ed4..84245b8 100644 ---- a/jv_parse.c -+++ b/jv_parse.c -@@ -383,7 +383,7 @@ static pfunc stream_token(struct jv_parser* p, char ch) { - - static void tokenadd(struct jv_parser* p, char c) { - assert(p->tokenpos <= p->tokenlen); -- if (p->tokenpos == p->tokenlen) { -+ if (p->tokenpos >= (p->tokenlen - 1)) { - p->tokenlen = p->tokenlen*2 + 256; - p->tokenbuf = jv_mem_realloc(p->tokenbuf, p->tokenlen); - } -@@ -485,7 +485,7 @@ static pfunc check_literal(struct jv_parser* p) { - TRY(value(p, v)); - } else { - // FIXME: better parser -- p->tokenbuf[p->tokenpos] = 0; // FIXME: invalid -+ p->tokenbuf[p->tokenpos] = 0; - char* end = 0; - double d = jvp_strtod(&p->dtoa, p->tokenbuf, &end); - if (end == 0 || *end != 0) diff --git a/sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.5-remove-automagic-dep-on-oniguruma.patch b/sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.5-remove-automagic-dep-on-oniguruma.patch deleted file mode 100644 index 95ba0e0580..0000000000 --- a/sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.5-remove-automagic-dep-on-oniguruma.patch +++ /dev/null @@ -1,58 +0,0 @@ -commit 18b4b18b41f5ed396d73449ce8d6ec408d95d6b2 -Author: David Tolnay -Date: Sat Nov 21 10:05:37 2015 -0800 - - Support --without-oniguruma - -diff --git a/configure.ac b/configure.ac -index 9e2c8cf..7f6be34 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -52,27 +52,26 @@ fi - AC_ARG_WITH([oniguruma], - [AS_HELP_STRING([--with-oniguruma=prefix], - [try this for a non-standard install prefix of the oniguruma library])], -- [ONIGURUMAPATHSET=1], -- [ONIGURUMAPATHSET=0]) -- --if test $ONIGURUMAPATHSET = 1; then -- CFLAGS="$CFLAGS -I${with_oniguruma}/include" -- LDFLAGS="$LDFLAGS -L${with_oniguruma}/lib" --fi -- --# check for ONIGURUMA library --HAVE_ONIGURUMA=0 --AC_CHECK_HEADER("oniguruma.h", -- AC_CHECK_LIB([onig],[onig_version],[LIBS="$LIBS -lonig"; HAVE_ONIGURUMA=1;])) -- --# handle check results --if test $HAVE_ONIGURUMA != 1; then -- AC_MSG_NOTICE([Oniguruma was not found.]) -- AC_MSG_NOTICE([ Try setting the location using '--with-oniguruma=PREFIX' ]) --else -- AC_DEFINE([HAVE_ONIGURUMA],1,[Define to 1 if Oniguruma is installed]) --fi -- -+ [], -+ [with_oniguruma=yes]) -+ -+AS_IF([test "x$with_oniguruma" != xno], [ -+ AS_IF([test "x$with_oniguruma" != xyes], [ -+ CFLAGS="$CFLAGS -I${with_oniguruma}/include" -+ LDFLAGS="$LDFLAGS -L${with_oniguruma}/lib" -+ ]) -+ # check for ONIGURUMA library -+ have_oniguruma=0 -+ AC_CHECK_HEADER("oniguruma.h", -+ AC_CHECK_LIB([onig],[onig_version],[LIBS="$LIBS -lonig"; have_oniguruma=1;])) -+ # handle check results -+ AS_IF([test $have_oniguruma = 1], [ -+ AC_DEFINE([HAVE_ONIGURUMA], 1, [Define to 1 if Oniguruma is installed]) -+ ], [ -+ AC_MSG_NOTICE([Oniguruma was not found.]) -+ AC_MSG_NOTICE([Try setting the location using '--with-oniguruma=PREFIX']) -+ ]) -+]) - - dnl Check for valgrind - AC_CHECK_PROGS(valgrind_cmd, valgrind) diff --git a/sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.6-r3-never-bundle-oniguruma.patch b/sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.6-r3-never-bundle-oniguruma.patch new file mode 100644 index 0000000000..75ab111f88 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.6-r3-never-bundle-oniguruma.patch @@ -0,0 +1,27 @@ +diff --git a/Makefile.am b/Makefile.am +index 6344b4e..86d968e 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -47,7 +47,7 @@ AM_YFLAGS = --warnings=all -d + + lib_LTLIBRARIES = libjq.la + libjq_la_SOURCES = ${LIBJQ_SRC} +-libjq_la_LIBADD = -lm ++libjq_la_LIBADD = -lm $(onig_LIBS) + libjq_la_LDFLAGS = $(onig_LDFLAGS) -export-symbols-regex '^j[qv]_' -version-info 1:4:0 + + if WIN32 +diff --git a/configure.ac b/configure.ac +index 280694c..d96026e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -249,6 +249,9 @@ AS_IF([test "x$with_oniguruma" != xno], [ + onig_CFLAGS="-I${with_oniguruma}/include" + onig_LDFLAGS="-L${with_oniguruma}/lib" + ]) ++ ], [ ++ # with_oniguruma == yes ++ PKG_CHECK_MODULES([onig], [oniguruma]) + ]) + AS_IF([test "x$build_oniguruma" = xno], [ + # check for ONIGURUMA library, either in /usr or where requested diff --git a/sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.6-runpath.patch b/sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.6-runpath.patch new file mode 100644 index 0000000000..40a2ed02f3 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.6-runpath.patch @@ -0,0 +1,17 @@ +diff --git a/configure.ac b/configure.ac +index 280694c..7227c9d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -280,4 +280,11 @@ AC_SUBST([BUNDLER], ["$bundle_cmd"]) + AC_CONFIG_MACRO_DIR([config/m4]) + AC_CONFIG_FILES([Makefile]) + AC_OUTPUT +- ++AC_ARG_ENABLE([rpathhack], ++ [AC_HELP_STRING([--enable-rpathhack], [patch libtool to remove RPATH])], ++ [ ++AC_MSG_RESULT([patching libtool to fix rpath]) ++sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool ++sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool ++ ], ++ []) diff --git a/sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.6-segfault-fix.patch b/sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.6-segfault-fix.patch new file mode 100644 index 0000000000..8eb7d456bc --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-misc/jq/files/jq-1.6-segfault-fix.patch @@ -0,0 +1,22 @@ +From a1f1231a73c221155d539a281181ef37f874869d Mon Sep 17 00:00:00 2001 +From: William Langford +Date: Tue, 20 Nov 2018 09:58:25 -0500 +Subject: [PATCH] Add missing jv_copy when printing with -ar + +--- + src/main.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/main.c b/src/main.c +index b154689e..61ae43f9 100644 +--- a/src/main.c ++++ b/src/main.c +@@ -168,7 +168,7 @@ static int process(jq_state *jq, jv value, int flags, int dumpopts) { + while (jv_is_valid(result = jq_next(jq))) { + if ((options & RAW_OUTPUT) && jv_get_kind(result) == JV_KIND_STRING) { + if (options & ASCII_OUTPUT) { +- jv_dumpf(result, stdout, JV_PRINT_ASCII); ++ jv_dumpf(jv_copy(result), stdout, JV_PRINT_ASCII); + } else { + fwrite(jv_string_value(result), 1, jv_string_length_bytes(jv_copy(result)), stdout); + } diff --git a/sdk_container/src/third_party/portage-stable/app-misc/jq/jq-1.4-r1.ebuild b/sdk_container/src/third_party/portage-stable/app-misc/jq/jq-1.4-r1.ebuild deleted file mode 100644 index 478241412c..0000000000 --- a/sdk_container/src/third_party/portage-stable/app-misc/jq/jq-1.4-r1.ebuild +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI=5 - -inherit autotools eutils - -DESCRIPTION="A lightweight and flexible command-line JSON processor" -HOMEPAGE="https://stedolan.github.com/jq/" -SRC_URI="https://github.com/stedolan/jq/releases/download/${P}/${P}.tar.gz" - -LICENSE="MIT CC-BY-3.0" -SLOT="0" -KEYWORDS="~amd64 ~x86 ~x64-macos" -IUSE="static-libs test" - -DEPEND="sys-devel/bison - sys-devel/flex - test? ( dev-util/valgrind )" - -DOCS=( AUTHORS README ) - -src_prepare() { - sed -i '/^dist_doc_DATA/d' Makefile.am || die - epatch "${FILESDIR}"/${PN}-1.4-dynamic-link.patch - eautoreconf -} - -src_configure() { - # don't try to rebuild docs - econf \ - --disable-docs \ - $(use_enable static-libs static) -} - -src_install() { - default - use static-libs || find "${ED}" -name libjq.la -delete -} diff --git a/sdk_container/src/third_party/portage-stable/app-misc/jq/jq-1.4.ebuild b/sdk_container/src/third_party/portage-stable/app-misc/jq/jq-1.4.ebuild deleted file mode 100644 index 34a272633f..0000000000 --- a/sdk_container/src/third_party/portage-stable/app-misc/jq/jq-1.4.ebuild +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI=5 - -inherit autotools eutils - -DESCRIPTION="A lightweight and flexible command-line JSON processor" -HOMEPAGE="https://stedolan.github.com/jq/" -SRC_URI="https://github.com/stedolan/jq/releases/download/${P}/${P}.tar.gz" - -LICENSE="MIT CC-BY-3.0" -SLOT="0" -KEYWORDS="amd64 x86" -IUSE="test" - -DEPEND="sys-devel/bison - sys-devel/flex - test? ( dev-util/valgrind )" - -DOCS=( AUTHORS README ) - -src_prepare() { - sed -i '/^dist_doc_DATA/d' Makefile.am || die - eautoreconf -} - -src_configure() { - # don't try to rebuild docs - econf --disable-docs -} diff --git a/sdk_container/src/third_party/portage-stable/app-misc/jq/jq-1.5-r1.ebuild b/sdk_container/src/third_party/portage-stable/app-misc/jq/jq-1.5-r1.ebuild deleted file mode 100644 index df24e2f78f..0000000000 --- a/sdk_container/src/third_party/portage-stable/app-misc/jq/jq-1.5-r1.ebuild +++ /dev/null @@ -1,53 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI=6 - -inherit autotools - -DESCRIPTION="A lightweight and flexible command-line JSON processor" -HOMEPAGE="https://stedolan.github.com/jq/" -SRC_URI="https://github.com/stedolan/jq/releases/download/${P}/${P}.tar.gz" - -LICENSE="MIT CC-BY-3.0" -SLOT="0" -KEYWORDS="~amd64 ~x86 ~x64-macos" -IUSE="oniguruma static-libs test" - -DEPEND=">=sys-devel/bison-3.0 - sys-devel/flex - oniguruma? ( dev-libs/oniguruma[static-libs?] ) - test? ( dev-util/valgrind )" -RDEPEND="!static-libs? ( - oniguruma? ( dev-libs/oniguruma[static-libs?] ) - )" - -DOCS=( AUTHORS README ) - -PATCHES=( - "${FILESDIR}"/${PN}-1.5-dynamic-link.patch - "${FILESDIR}"/${P}-remove-automagic-dep-on-oniguruma.patch -) - -src_prepare() { - sed -i '/^dist_doc_DATA/d' Makefile.am || die - sed -i -r "s:(m4_define\(\[jq_version\],) .+\):\1 \[${PV}\]):" \ - configure.ac || die - - default - eautoreconf -} - -src_configure() { - # don't try to rebuild docs - econf \ - --disable-docs \ - $(use_enable static-libs static) \ - $(use_with oniguruma) -} - -src_install() { - default - use static-libs || find "${ED}" -name libjq.la -delete -} diff --git a/sdk_container/src/third_party/portage-stable/app-misc/jq/jq-1.5-r2.ebuild b/sdk_container/src/third_party/portage-stable/app-misc/jq/jq-1.5-r2.ebuild deleted file mode 100644 index df58a521ae..0000000000 --- a/sdk_container/src/third_party/portage-stable/app-misc/jq/jq-1.5-r2.ebuild +++ /dev/null @@ -1,60 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI=6 - -inherit autotools eutils - -DESCRIPTION="A lightweight and flexible command-line JSON processor" -HOMEPAGE="https://stedolan.github.com/jq/" -SRC_URI="https://github.com/stedolan/jq/releases/download/${P}/${P}.tar.gz" - -LICENSE="MIT CC-BY-3.0" -SLOT="0" -KEYWORDS="~amd64 ~arm ~x86 ~x64-macos" -IUSE="oniguruma static-libs test" - -DEPEND=" - >=sys-devel/bison-3.0 - sys-devel/flex - oniguruma? ( dev-libs/oniguruma[static-libs?] ) - test? ( dev-util/valgrind ) -" -RDEPEND=" - !static-libs? ( - oniguruma? ( dev-libs/oniguruma[static-libs?] ) - ) -" - -src_prepare() { - local PATCHES=( - "${FILESDIR}"/${PN}-1.5-dynamic-link.patch - "${FILESDIR}"/${PN}-1.5-remove-automagic-dep-on-oniguruma.patch - "${FILESDIR}"/${PN}-1.5-heap_buffer_overflow_in_tokenadd.patch - ) - - sed -i '/^dist_doc_DATA/d' Makefile.am || die - sed -i -r "s:(m4_define\(\[jq_version\],) .+\):\1 \[${PV}\]):" \ - configure.ac || die - - default - eautoreconf -} - -src_configure() { - local econfargs=( - # don't try to rebuild docs - --disable-docs - $(use_enable static-libs static) - $(use_with oniguruma) - ) - econf "${econfargs[@]}" -} - -src_install() { - local DOCS=( AUTHORS README ) - default - - use static-libs || prune_libtool_files -} diff --git a/sdk_container/src/third_party/portage-stable/app-misc/jq/jq-1.6-r3.ebuild b/sdk_container/src/third_party/portage-stable/app-misc/jq/jq-1.6-r3.ebuild new file mode 100644 index 0000000000..f1172ab62a --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-misc/jq/jq-1.6-r3.ebuild @@ -0,0 +1,78 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools + +DESCRIPTION="A lightweight and flexible command-line JSON processor" +HOMEPAGE="https://stedolan.github.io/jq/" +SRC_URI="https://github.com/stedolan/jq/releases/download/${P}/${P}.tar.gz" + +LICENSE="MIT CC-BY-3.0" +SLOT="0" +KEYWORDS="~alpha amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 x86 ~amd64-linux ~x64-macos" +IUSE="oniguruma static-libs" + +ONIGURUMA_MINPV='>=dev-libs/oniguruma-6.1.3' # Keep this in sync with bundled modules/oniguruma/ +DEPEND=" + >=sys-devel/bison-3.0 + sys-devel/flex + oniguruma? ( ${ONIGURUMA_MINPV}:=[static-libs?] ) +" +RDEPEND=" + !static-libs? ( + oniguruma? ( ${ONIGURUMA_MINPV}[static-libs?] ) + ) +" + +src_prepare() { + local PATCHES=( + "${FILESDIR}"/jq-1.6-r3-never-bundle-oniguruma.patch + "${FILESDIR}"/jq-1.6-runpath.patch + "${FILESDIR}"/jq-1.6-segfault-fix.patch + ) + use oniguruma || { sed -i 's:tests/onigtest::' Makefile.am || die; } + sed -i '/^dist_doc_DATA/d' Makefile.am || die + sed -i -r "s:(m4_define\(\[jq_version\],) .+\):\1 \[${PV}\]):" \ + configure.ac || die + + # jq-1.6-r3-never-bundle-oniguruma makes sure we build with the system oniguruma, + # but the bundled copy of oniguruma still gets eautoreconf'd since it + # exists; save the cycles by nuking it. + sed -i -e '/modules\/oniguruma/d' Makefile.am || die + rm -rf "${S}"/modules/oniguruma || die + + default + eautoreconf +} + +src_configure() { + local econfargs=( + # don't try to rebuild docs + --disable-docs + --disable-valgrind + --disable-maintainer-mode + --enable-rpathhack + $(use_enable static-libs static) + $(use_with oniguruma oniguruma yes) + ) + econf "${econfargs[@]}" +} + +src_test() { + if ! emake check; then + if [[ -r test-suite.log ]]; then + eerror "Tests failed, outputting testsuite log" + cat test-suite.log + fi + die "Tests failed" + fi +} + +src_install() { + local DOCS=( AUTHORS README.md ) + default + + use static-libs || { find "${D}" -name '*.la' -delete || die; } +} diff --git a/sdk_container/src/third_party/portage-stable/app-misc/jq/metadata.xml b/sdk_container/src/third_party/portage-stable/app-misc/jq/metadata.xml index f57f842690..65a87c9344 100644 --- a/sdk_container/src/third_party/portage-stable/app-misc/jq/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/app-misc/jq/metadata.xml @@ -1,11 +1,19 @@ - + - radhermit@gentoo.org - Tim Harder + vpayno+gentoo@gmail.com + Victor Payno + + + chutzpah@gentoo.org + Patrick McLean Use dev-libs/oniguruma for regular expression support + + cpe:/a:jq_project:jq + stedolan/jq +