From 0105f94099937750fbbc03b5dc62f0cabdd2c619 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Wed, 26 Oct 2022 08:12:06 +0000 Subject: [PATCH] Auto sync2gitlab import of jq-1.6-5.el8.src.rpm --- ...ation-problem-for-non-decimal-string.patch | 25 +++++++++++++++++++ jq.spec | 16 +++++++++--- 2 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 0001-iterration-problem-for-non-decimal-string.patch diff --git a/0001-iterration-problem-for-non-decimal-string.patch b/0001-iterration-problem-for-non-decimal-string.patch new file mode 100644 index 0000000..cc37065 --- /dev/null +++ b/0001-iterration-problem-for-non-decimal-string.patch @@ -0,0 +1,25 @@ +diff -up jq-1.6/src/jv.c.iteration jq-1.6/src/jv.c +--- jq-1.6/src/jv.c.iteration 2022-10-21 14:17:26.977551386 +0200 ++++ jq-1.6/src/jv.c 2022-10-21 14:18:43.562430867 +0200 +@@ -308,6 +308,7 @@ static jv jvp_literal_number_new(const c + n->refcnt = JV_REFCNT_INIT; + n->literal_data = NULL; + decContext *ctx = DEC_CONTEXT(); ++ decContextClearStatus(ctx, DEC_Conversion_syntax); + decNumberFromString(&n->num_decimal, literal, ctx); + n->num_double = NAN; + +diff -up jq-1.6/tests/optional.test.iteration jq-1.6/tests/optional.test +--- jq-1.6/tests/optional.test.iteration 2022-10-21 14:22:04.191734821 +0200 ++++ jq-1.6/tests/optional.test 2022-10-21 14:23:45.820901911 +0200 +@@ -17,4 +17,9 @@ strftime("%A, %B %e, %Y") + 1435677542.822351 + "Tuesday, June 30, 2015" + +- ++# iteration must continue after hello ++.[]|tonumber? ++["1", "hello", "3", 4] ++1 ++3 ++4 diff --git a/jq.spec b/jq.spec index 37e43d8..7f664f1 100644 --- a/jq.spec +++ b/jq.spec @@ -1,12 +1,13 @@ Name: jq Version: 1.6 -Release: 3%{?dist} +Release: 5%{?dist} Summary: Command-line JSON processor License: MIT and ASL 2.0 and CC-BY and GPLv3 URL: http://stedolan.github.io/jq/ Source0: https://github.com/stedolan/jq/releases/download/%{name}-%{version}/%{name}-%{version}.tar.gz Patch0: 0000-jq-decimal-literal-number.patch +Patch1: 0001-iterration-problem-for-non-decimal-string.patch BuildRequires: flex BuildRequires: bison @@ -14,6 +15,7 @@ BuildRequires: oniguruma-devel BuildRequires: autoconf BuildRequires: automake BuildRequires: libtool +BuildRequires: chrpath %ifnarch s390x BuildRequires: valgrind @@ -45,8 +47,7 @@ Development files for %{name} %prep -%setup -qn %{name}-%{version} -%patch0 -p1 -b .bigint +%autosetup -n %{name}-%{version} -p1 %build autoreconf -fi @@ -69,6 +70,7 @@ make %{?_smp_mflags} %install make DESTDIR=%{buildroot} install find %{buildroot} -name '*.la' -exec rm -f {} ';' +chrpath --delete %{buildroot}/usr/bin/jq %check # Valgrind used, so restrict architectures for check @@ -94,6 +96,14 @@ make check %changelog +* Tue Oct 11 2022 Tomas Halman - 1.6-5 +- Remove rpath from jq binary +- Related: rhbz#2049601 + +* Tue Oct 11 2022 Tomas Halman - 1.6-4 +- Fix iterration problem for non decimal string +- Resolves: rhbz#2049601 + * Mon Oct 4 2021 Tomas Halman - Fix big integers issue - Resolves: bug#2008717