Skip to content

Commit 293fd84

Browse files
authored
Updated lua-json to version 1.3.4 (#11179)
1 parent 469ae7b commit 293fd84

5 files changed

Lines changed: 90 additions & 40 deletions

File tree

SPECS-EXTENDED/lua-json/48.patch

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
From 473d61d262a1c86a69ad9b4882352d122e42f3fa Mon Sep 17 00:00:00 2001
2+
From: Josh <jokajak@gmail.com>
3+
Date: Thu, 20 Jul 2023 15:49:33 -0400
4+
Subject: [PATCH] feat: support lpeg 1.1
5+
6+
This changeset adds support for lpeg 1.1 which updated the lpeg.version from a function to a string.
7+
8+
Therefore we have to check the type of the value.
9+
10+
Refs: #47
11+
---
12+
lua/json/decode/util.lua | 5 ++++-
13+
1 file changed, 4 insertions(+), 1 deletion(-)
14+
15+
diff --git a/lua/json/decode/util.lua b/lua/json/decode/util.lua
16+
index 2493bf3..8b23751 100644
17+
--- a/lua/json/decode/util.lua
18+
+++ b/lua/json/decode/util.lua
19+
@@ -17,6 +17,8 @@ local table_concat = require("table").concat
20+
21+
local merge = require("json.util").merge
22+
23+
+local type = type
24+
+
25+
local _ENV = nil
26+
27+
local function get_invalid_character_info(input, index)
28+
@@ -94,7 +96,8 @@ local unicode_ignored = (unicode_space + comment)^0
29+
30+
-- Parse the lpeg version skipping patch-values
31+
-- LPEG <= 0.7 have no version value... so 0.7 is value
32+
-local DecimalLpegVersion = lpeg.version and tonumber(lpeg.version():match("^(%d+%.%d+)")) or 0.7
33+
+-- LPEG >= 1.1 uses a string for the version instead of function
34+
+local DecimalLpegVersion = lpeg.version and tonumber((type(lpeg.version) == "string" and lpeg.version or lpeg.version()):match("^(%d+%.%d+)")) or 0.7
35+
36+
local function setObjectKeyForceNumber(t, key, value)
37+
key = tonumber(key) or key
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"Signatures": {
3-
"luajson-1.3.2-7a86bc2.tar.gz": "474e073d8842de1f92faf15a79b90341c03e6b140747453ce738554db6d46972"
3+
"luajson-1.3.4.tar.gz": "aff67d64027f747b4611646fd0421802eda60397da9076e3f7fb17227e542e99"
44
}
55
}

SPECS-EXTENDED/lua-json/lua-json.spec

Lines changed: 50 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,26 @@ Distribution: Azure Linux
66
%global shortcommit %(c=%{commit}; echo ${c:0:7})
77

88
Name: lua-json
9-
Version: 1.3.2
10-
Release: 16%{?dist}
9+
Version: 1.3.4
10+
Release: 9%{?dist}
1111
Summary: JSON Parser/Constructor for Lua
1212
License: MIT
1313
URL: https://github.com/harningt/luajson
14-
Source0: https://github.com/harningt/luajson/archive/%{commit}/luajson-%{version}-%{shortcommit}.tar.gz
15-
Patch0: luajson-lua-5.2.patch
14+
Source0: https://github.com/harningt/luajson/archive/%{version}/luajson-%{version}.tar.gz
15+
# Support for lpeg 1.1.0
16+
Patch0: https://github.com/harningt/luajson/pull/48.patch
1617
BuildRequires: lua >= %{luaver}, lua-lpeg >= 0.8.1
1718
# for checks
1819
BuildRequires: lua-filesystem >= 1.4.1, lua-lunit >= 0.4
20+
BuildRequires: make
1921
Requires: lua(abi) >= %{luaver}, lua-lpeg >= 0.8.1
2022
BuildArch: noarch
2123

2224
%description
2325
LuaJSON is a customizable JSON decoder/encoder, using LPEG for parsing.
2426

2527
%prep
26-
%setup -q -n luajson-%{commit}
27-
%patch 0 -p1 -b .lua-52
28+
%autosetup -p1 -n luajson-%{version}
2829

2930
%build
3031

@@ -39,17 +40,52 @@ make check-regression
3940
# grep -q "0 failed, 0 errors" testlog.txt
4041

4142
%files
42-
%license LICENSE
43-
%doc docs/LuaJSON.txt docs/ReleaseNotes-1.0.txt
43+
%doc LICENSE docs/LuaJSON.txt docs/ReleaseNotes-1.0.txt
4444
%{luapkgdir}/*
4545

4646
%changelog
47-
* Mon Feb 28 2022 Pawel Winogrodzki <pawelwi@microsoft.com> - 1.3.2-16
48-
- Fixing run-time dependencies.
49-
- License verified.
47+
* Tue Apr 08 2025 Aninda Pradhan <v-anipradhan@microsoft.com> - 1.3.4-9
48+
- Initial Azure Linux import from Fedora 41 (license: MIT)
49+
- License Verified
5050

51-
* Fri Oct 15 2021 Pawel Winogrodzki <pawelwi@microsoft.com> - 1.3.2-15
52-
- Initial CBL-Mariner import from Fedora 32 (license: MIT).
51+
* Thu Aug 01 2024 Orion Poplawski <orion@nwra.com> - 1.3.4-8
52+
- Add upstream patch to support lua lpeg 1.1.0 (bz#2302036)
53+
54+
* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.4-7
55+
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
56+
57+
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.4-6
58+
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
59+
60+
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.4-5
61+
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
62+
63+
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.4-4
64+
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
65+
66+
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.4-3
67+
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
68+
69+
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.4-2
70+
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
71+
72+
* Sat May 28 2022 Orion Poplawski <orion@nwra.com> - 1.3.4-1
73+
- Update to 1.3.4
74+
75+
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.2-19
76+
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
77+
78+
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.2-18
79+
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
80+
81+
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.2-17
82+
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
83+
84+
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.2-16
85+
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
86+
87+
* Tue Jun 30 2020 Miro Hrončok <mhroncok@redhat.com> - 1.3.2-15
88+
- Rebuilt for Lua 5.4
5389

5490
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.2-14
5591
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
@@ -110,3 +146,4 @@ make check-regression
110146

111147
* Thu Sep 10 2009 Michel Salim <salimma@fedoraproject.org> - 1.0-1
112148
- Initial package
149+

SPECS-EXTENDED/lua-json/luajson-lua-5.2.patch

Lines changed: 0 additions & 24 deletions
This file was deleted.

cgmanifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12551,8 +12551,8 @@
1255112551
"type": "other",
1255212552
"other": {
1255312553
"name": "lua-json",
12554-
"version": "1.3.2",
12555-
"downloadUrl": "https://github.com/harningt/luajson/archive/7a86bc22066858afeb23845a191a6ab680b46233/luajson-1.3.2-7a86bc2.tar.gz"
12554+
"version": "1.3.4",
12555+
"downloadUrl": "https://github.com/harningt/luajson/archive/1.3.4/luajson-1.3.4.tar.gz"
1255612556
}
1255712557
}
1255812558
},

0 commit comments

Comments
 (0)