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 1fbfe6a..360d053 100644 --- a/jq.spec +++ b/jq.spec @@ -1,6 +1,6 @@ Name: jq Version: 1.6 -Release: 12%{?dist} +Release: 13%{?dist} Summary: Command-line JSON processor License: MIT and ASL 2.0 and CC-BY and GPLv3 @@ -8,6 +8,7 @@ URL: http://stedolan.github.io/jq/ Source0: https://github.com/stedolan/jq/releases/download/%{name}-%{version}/%{name}-%{version}.tar.gz # Backport of PR#1752 for RHBZ#2008979 Patch0: jq-decimal-literal-number.patch +Patch1: 0001-iterration-problem-for-non-decimal-string.patch BuildRequires: gcc BuildRequires: flex @@ -98,6 +99,10 @@ make check %changelog +* Fri Oct 21 2022 Tomas Halman - 1.6-13 +- jq try/catch stops iteration over items + Resolves: rhbz#2049594 + * Mon Nov 15 2021 Tomas Halman - Strip rpath from jq binary Related: rhbz#2008983