From a79675f24db7680a2bc2a940d524f9ad877ac7de Mon Sep 17 00:00:00 2001 From: Davide Cavalca Date: Tue, 8 Mar 2022 12:51:37 -0800 Subject: [PATCH] Backport PR#2400 to fix interation for non-decimal strings (rhbz#2045178) --- jq-fix-non-decimal-string.patch | 11 +++++++++++ jq.spec | 7 ++++++- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 jq-fix-non-decimal-string.patch diff --git a/jq-fix-non-decimal-string.patch b/jq-fix-non-decimal-string.patch new file mode 100644 index 0000000..37f2ec4 --- /dev/null +++ b/jq-fix-non-decimal-string.patch @@ -0,0 +1,11 @@ +diff -Naur a/src/jv.c b/src/jv.c +--- a/src/jv.c 2022-03-08 12:42:41.169813593 -0800 ++++ b/src/jv.c 2022-03-08 12:43:28.189080921 -0800 +@@ -308,6 +308,7 @@ + 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 --git a/jq.spec b/jq.spec index f103c0e..564b87d 100644 --- a/jq.spec +++ b/jq.spec @@ -1,6 +1,6 @@ Name: jq Version: 1.6 -Release: 11%{?dist} +Release: 12%{?dist} Summary: Command-line JSON processor License: MIT and ASL 2.0 and CC-BY and GPLv3 @@ -8,6 +8,8 @@ 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 +# Backport of PR#2400 for RHBZ#2017285 +Patch1: jq-fix-non-decimal-string.patch BuildRequires: gcc BuildRequires: flex @@ -101,6 +103,9 @@ make check %changelog +* Tue Mar 08 2022 Davide Cavalca - 1.6-12 +- Backport PR#2400 to fix iteration for non-decimal strings (rhbz#2017285) + * Thu Jan 20 2022 Fedora Release Engineering - 1.6-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild