From e07cb36eea8c4b86721919664ddd3aea71c82e6b05398b18e038b9cf061f2391 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Sat, 28 Dec 2024 00:29:24 +0000 Subject: [PATCH] - Update to 2.8: - Fix handling of decoding errors when Lua is compiled with LUA_NOCVTN2S. - Update to 2.7: - Enable working with newer versions of LPeg where the "version" field is no longer a function. - Fix error messages when an encoding error happens in an ordered dictionary. - Update to 2.6: - The decode function is no longer automatically replaced by the version implemented using LPeg, but an LPeg-enabled copy of the module has to be requested explicitly with the function use_lpeg. This was changed to improve the predictability of the code and make audits more reliable. - The LPeg-version of the decode function now reports unterminated strings, arrays and objects with the position where they started rather than where parsing failed which was usually at the end of the input string. This was already the behavior of the pure-Lua-implementation. - Fixed a bug where entries in a dictionary were not put in the desired order when their value was the boolean false. OBS-URL: https://build.opensuse.org/package/show/devel:languages:lua/lua-dkjson?expand=0&rev=13 --- .gitattributes | 23 +++++++++++++++ .gitignore | 1 + _multibuild | 5 ++++ dkjson-2.8.tar.gz | 3 ++ dkjson.tar.gz | 3 ++ lua-dkjson.changes | 50 +++++++++++++++++++++++++++++++++ lua-dkjson.spec | 70 ++++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 155 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _multibuild create mode 100644 dkjson-2.8.tar.gz create mode 100644 dkjson.tar.gz create mode 100644 lua-dkjson.changes create mode 100644 lua-dkjson.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..72d2b45 --- /dev/null +++ b/_multibuild @@ -0,0 +1,5 @@ + +lua51 +lua53 +lua54 + diff --git a/dkjson-2.8.tar.gz b/dkjson-2.8.tar.gz new file mode 100644 index 0000000..433f2a7 --- /dev/null +++ b/dkjson-2.8.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:24e8cd3beb91c1c861eb7bb3fbc9bd418bbff9ad4aa5d0471816258236a31532 +size 17442 diff --git a/dkjson.tar.gz b/dkjson.tar.gz new file mode 100644 index 0000000..01db22f --- /dev/null +++ b/dkjson.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:39e2aeec026d8f0e91a573174df7514be54bb3c1a922c944c896b18b46ad8ad0 +size 17154 diff --git a/lua-dkjson.changes b/lua-dkjson.changes new file mode 100644 index 0000000..3669aa0 --- /dev/null +++ b/lua-dkjson.changes @@ -0,0 +1,50 @@ +------------------------------------------------------------------- +Sat Dec 28 00:26:59 UTC 2024 - Matej Cepl + +- Update to 2.8: + - Fix handling of decoding errors when Lua is compiled with + LUA_NOCVTN2S. +- Update to 2.7: + - Enable working with newer versions of LPeg where the + "version" field is no longer a function. + - Fix error messages when an encoding error happens in an + ordered dictionary. +- Update to 2.6: + - The decode function is no longer automatically replaced by + the version implemented using LPeg, but an LPeg-enabled + copy of the module has to be requested explicitly with + the function use_lpeg. This was changed to improve the + predictability of the code and make audits more reliable. + - The LPeg-version of the decode function now reports + unterminated strings, arrays and objects with the position + where they started rather than where parsing failed which was + usually at the end of the input string. This was already the + behavior of the pure-Lua-implementation. + - Fixed a bug where entries in a dictionary were not put in the + desired order when their value was the boolean false. + +------------------------------------------------------------------- +Wed Nov 23 10:17:15 UTC 2022 - Michal Suchanek + +- Fix missing dependency on lua-macros (boo#1205612) + +------------------------------------------------------------------- +Mon Dec 27 08:42:20 UTC 2021 - Matej Cepl + +- What was I thinking? Description and Summary had nothing to di + with this package. + +------------------------------------------------------------------- +Thu Feb 18 15:50:02 UTC 2021 - Callum Farmer + +- Use %lua_provides macro for default lua versioning + +------------------------------------------------------------------- +Mon Jul 6 19:03:08 UTC 2020 - Matej Cepl + +- Add lua54 as new build target + +------------------------------------------------------------------- +Wed Apr 1 22:50:23 UTC 2020 - Matej Cepl + +- Initial packaging effort to package version 2.5 diff --git a/lua-dkjson.spec b/lua-dkjson.spec new file mode 100644 index 0000000..be40b64 --- /dev/null +++ b/lua-dkjson.spec @@ -0,0 +1,70 @@ +# +# spec file for package lua-dkjson +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%define flavor @BUILD_FLAVOR@ +%define mod_name dkjson +%define uptag 2.8 +Version: 2.8.0 +Release: 0 +Summary: David Kolf's JSON module for Lua +License: MIT +Group: Development/Libraries/Other +URL: http://dkjson.org/ +Source: http://dkolf.de/dkjson-lua/dkjson-%{uptag}.tar.gz +BuildRequires: %{flavor}-devel +BuildRequires: lua-macros +Requires: %{flavor} +Requires: %{flavor}-lpeg +BuildArch: noarch +%lua_provides +%if "%{flavor}" == "" +Name: lua-dkjson +ExclusiveArch: do_not_build +%else +Name: %{flavor}-dkjson +%endif + +%description +dkjson is a module for encoding and decoding JSON data. It +supports UTF-8. + +JSON (JavaScript Object Notation) is a format for serializing +data based on the syntax for JavaScript data structures. + +dkjson is written in Lua without any dependencies, but +when LPeg is available dkjson can use it to speed up decoding. + +%prep +%autosetup -p1 -n dkjson-%{uptag} + +%build +/bin/true + +%install +install -D -m 0644 -t %{buildroot}%{lua_noarchdir} -p dkjson.lua + +%check +lua%{lua_version} speedtest.lua dkjson +lua%{lua_version} jsontest.lua + +%files +# license is included in readme.txt file +%doc versions.txt readme.txt +%{lua_noarchdir}/%{mod_name}* + +%changelog