Compare commits
6 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
|
0c58574e07
|
|||
|
7025bc35e1
|
|||
|
7e8b42a878
|
|||
|
42a528c2c2
|
|||
|
1ed081dbb9
|
|||
|
5f717a405d
|
4
.gitignore
vendored
4
.gitignore
vendored
@@ -1 +1,5 @@
|
||||
.osc
|
||||
_scmsync.obsinfo
|
||||
_buildconfig-*
|
||||
_buildinfo-*.xml
|
||||
lua*-cjson-*-build/
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<multibuild>
|
||||
<package>lua51</package>
|
||||
<package>luajit</package>
|
||||
<package>lua53</package>
|
||||
<package>lua54</package>
|
||||
<package>lua55</package>
|
||||
</multibuild>
|
||||
|
||||
BIN
lua-cjson-2.1.0.16.tar.gz
LFS
Normal file
BIN
lua-cjson-2.1.0.16.tar.gz
LFS
Normal file
Binary file not shown.
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:51bc69cd55931e0cba2ceae39e9efa2483f4292da3a88a1ed470eda829f6c778
|
||||
size 86024
|
||||
@@ -1,3 +1,82 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 28 14:03:05 UTC 2026 - Matej Cepl <mcepl@cepl.eu>
|
||||
|
||||
- Upgrade to 2.1.0.16:
|
||||
- bugfix: fix truncation of decoded numbers outside lua_Integer's range (#116)
|
||||
- Upgrade to 2.1.0.15:
|
||||
- gugfix: fixed Makefile.
|
||||
- Rewritten %check section
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 23 21:40:36 UTC 2026 - Matej Cepl <mcepl@cepl.eu>
|
||||
|
||||
- Enable lua55 build.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 24 14:47:18 UTC 2025 - Matej Cepl <mcepl@cepl.eu>
|
||||
|
||||
- Switch off building lua51 build of the package.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 20 18:33:16 UTC 2025 - Matej Cepl <mcepl@cepl.eu>
|
||||
|
||||
- Add luajit version to _multibuild
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 23 17:01:00 UTC 2025 - Matej Cepl <mcepl@cepl.eu>
|
||||
|
||||
- Switch upstream from the dead one
|
||||
(http://www.kyne.com.au/~mark/software/lua-cjson.php) to
|
||||
https://github.com/openresty/lua-cjson
|
||||
- Update 2.1.0.14:
|
||||
- doc: added doc for encode_skip_unsupported_value_types.
|
||||
- Update 2.1.0.13:
|
||||
- Bugfix: Lua cjson integer overflow issues (CVE-2022-24834)
|
||||
(#94)
|
||||
- Update 2.1.0.11:
|
||||
- add lua 5.4 to test suite
|
||||
- Update to 2.1.0.9:
|
||||
- Support for Lua 5.2+ Update test suite to GitHub Actions.
|
||||
- Matrix for Lua 5.1, 5.2, 5.3, luajit master and luajit
|
||||
openresty branch, clang and gcc
|
||||
- Update 2.1.0.8rc1:
|
||||
- feature: add option to disable forward slash escaping
|
||||
- Update 2.1.0.7rc1:
|
||||
- feature: ported to the ARM64 platform by masking off the
|
||||
bits higher than 47-bit in the lightud.
|
||||
- Update 2.1.0.6rc2:
|
||||
- bugfix: fixed the C compiler warning "SO C90 forbids mixed
|
||||
declarations and code" on older operating systems.
|
||||
- Update 2.1.0.6rc1:
|
||||
- feature: set cjson.array_mt on decoded
|
||||
JSON arrays; this can be turned on via
|
||||
cjson.decode_array_with_array_mt(true). off by default.
|
||||
- Update 2.1.0.5:
|
||||
- bugfix: conditionally build luaL_setfuncs() function as the
|
||||
latest LuaJIT v2.1 already includes it. fixes #21.
|
||||
- Update 2.1.0.4:
|
||||
- travis-ci: added valgrind testing mode as well.
|
||||
- Update 2.1.0.3rc2:
|
||||
- fixed the warning "inline function ‘fpconv_init’ declared
|
||||
but never defined" from gcc.
|
||||
- Update 2.1.0.3rc1:
|
||||
- Makefile: removed the slash (/) after $(DESTDIR) so as
|
||||
to support empty DESTDIR and relative path values in the
|
||||
following variable.
|
||||
- Update 2.1.0.3:
|
||||
- feature: now we allow up to 16 decimal places in JSON
|
||||
number encoding via cjson.encode_number_precision(); thanks
|
||||
lordnynex for the patch in #4.
|
||||
- Test cases for changing precision
|
||||
- Update 2.1.0.2:
|
||||
- bugfix: the Makefile had a bug that overwrites existing
|
||||
cjson.so file in place which could cause already running
|
||||
nginx workers to crash. thanks ywsample for the report.
|
||||
- Update 2.1.0.1:
|
||||
- feature: applied Jiale Zhi's patch to add the new config
|
||||
function encode_empty_table_as_object so that we can encode
|
||||
empty Lua tables into empty JSON arrays.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 26 09:07:56 UTC 2023 - Michal Suchanek <msuchanek@suse.de>
|
||||
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
|
||||
%define flavor @BUILD_FLAVOR@
|
||||
%define mod_name cjson
|
||||
Version: 2.1.0
|
||||
Version: 2.1.0.16
|
||||
Release: 0
|
||||
Summary: Lua JSON Encoding/Decoding
|
||||
License: MIT
|
||||
URL: https://www.kyne.com.au/~mark/software/lua-cjson.php
|
||||
Source0: http://www.kyne.com.au/~mark/software/download/lua-cjson-%{version}.tar.gz
|
||||
URL: https://github.com/openresty/lua-cjson
|
||||
Source: https://github.com/openresty/lua-%{mod_name}/archive/refs/tags/%{version}.tar.gz#/lua-%{mod_name}-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM test_environment.patch gh#mpx/lua-cjson#75 mcepl@suse.com
|
||||
# Make it possible for tests to be influenced by the variables
|
||||
Patch0: test_environment.patch
|
||||
@@ -34,6 +34,7 @@ BuildRequires: %{flavor}-luarocks
|
||||
BuildRequires: cmake
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: perl
|
||||
%lua_provides
|
||||
%if "%{flavor}" == ""
|
||||
Name: lua-%{mod_name}
|
||||
@@ -59,10 +60,7 @@ export CFLAGS="%{optflags}"
|
||||
-DLUA_INCLUDE_DIR:PATH="%{lua_incdir}"
|
||||
find ..
|
||||
|
||||
make %{?_make_output_sync} %{?_smp_mflags} \
|
||||
CC="gcc" \
|
||||
PREFIX="%{_prefix}" \
|
||||
LUA_INCLUDE_DIR=%{lua_incdir}
|
||||
%cmake_build
|
||||
|
||||
%install
|
||||
mkdir -p -m 755 \
|
||||
@@ -73,9 +71,17 @@ install -m644 lua/cjson/util.lua %{buildroot}%{lua_noarchdir}/cjson/
|
||||
|
||||
%check
|
||||
rm -rf build
|
||||
export CFLAGS="%{optflags}" PREFIX="%{_prefix}" \
|
||||
LUA_INCLUDE_DIR="%{lua_incdir}" LUA_CMODULE_DIR="%{lua_archdir}" LUA_MODULE_DIR="%{lua_noarchdir}"
|
||||
./runtests.sh
|
||||
export LUA_CPATH="%{buildroot}%{lua_archdir}/?.so;;"
|
||||
export LUA_PATH="%{buildroot}%{lua_noarchdir}/?.lua;%{buildroot}%{lua_noarchdir}/?/init.lua;;"
|
||||
# gh#openresty/lua-cjson#120
|
||||
export SKIP_TESTS="encode_keep_buffer"
|
||||
( cd tests
|
||||
perl ./genutf8.pl
|
||||
lua -e 'print("Testing Lua CJSON version " .. require("cjson")._VERSION)'
|
||||
# We have GNU/grep, so we don’t have to work around Solaris/grep limitations
|
||||
./test.lua 2>/dev/null | grep -Ev "$SKIP_TESTS" \
|
||||
| grep -E -A 3 'FAIL|Summary' | grep -v 'PASS' | cut -c -150
|
||||
)
|
||||
|
||||
%files
|
||||
%{lua_archdir}/cjson.so
|
||||
|
||||
@@ -3,58 +3,30 @@
|
||||
runtests.sh | 2 +-
|
||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/runtests.sh
|
||||
+++ b/runtests.sh
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
+set -x
|
||||
|
||||
PLATFORM="`uname -s`"
|
||||
[ "$1" ] && VERSION="$1" || VERSION="2.1.0"
|
||||
@@ -56,15 +57,15 @@ do_tests
|
||||
make clean
|
||||
rm -rf tests/cjson{,.so}
|
||||
|
||||
-echo "===== Testing Cmake build ====="
|
||||
-mkdir build
|
||||
-cd build
|
||||
-cmake ..
|
||||
-make
|
||||
-cd ..
|
||||
-cp -r lua/cjson build/cjson.so tests
|
||||
-do_tests
|
||||
-rm -rf build tests/cjson{,.so}
|
||||
+# echo "===== Testing Cmake build ====="
|
||||
+# mkdir build
|
||||
+# cd build
|
||||
+# cmake "$CMAKE_FLAGS" ..
|
||||
+# make
|
||||
+# cd ..
|
||||
+# cp -r lua/cjson build/cjson.so tests
|
||||
+# do_tests
|
||||
+# rm -rf build tests/cjson{,.so}
|
||||
|
||||
if [ "$PLATFORM" = "Linux" ]
|
||||
then
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -13,14 +13,14 @@
|
||||
Index: lua-cjson-2.1.0.9/Makefile
|
||||
===================================================================
|
||||
--- lua-cjson-2.1.0.9.orig/Makefile 2021-02-15 19:58:29.000000000 +0100
|
||||
+++ lua-cjson-2.1.0.9/Makefile 2025-07-23 18:57:44.293475352 +0200
|
||||
@@ -13,9 +13,9 @@
|
||||
##### Build defaults #####
|
||||
LUA_VERSION = 5.1
|
||||
TARGET = cjson.so
|
||||
-PREFIX = /usr/local
|
||||
+PREFIX ?= /usr/local
|
||||
#CFLAGS = -g -Wall -pedantic -fno-inline
|
||||
-CFLAGS = -O3 -Wall -pedantic -DNDEBUG
|
||||
+CFLAGS ?= -O3 -Wall -pedantic -DNDEBUG
|
||||
-CFLAGS = -O3 -Wall -pedantic -DNDEBUG -g
|
||||
+CFLAGS ?= -O3 -Wall -pedantic -DNDEBUG -g
|
||||
CJSON_CFLAGS = -fpic
|
||||
CJSON_LDFLAGS = -shared
|
||||
-LUA_INCLUDE_DIR = $(PREFIX)/include
|
||||
-LUA_CMODULE_DIR = $(PREFIX)/lib/lua/$(LUA_VERSION)
|
||||
-LUA_MODULE_DIR = $(PREFIX)/share/lua/$(LUA_VERSION)
|
||||
+LUA_INCLUDE_DIR ?= $(PREFIX)/include
|
||||
+LUA_CMODULE_DIR ?= $(PREFIX)/lib/lua/$(LUA_VERSION)
|
||||
+LUA_MODULE_DIR ?= $(PREFIX)/share/lua/$(LUA_VERSION)
|
||||
LUA_BIN_DIR = $(PREFIX)/bin
|
||||
LUA_INCLUDE_DIR ?= $(PREFIX)/include
|
||||
Index: lua-cjson-2.1.0.9/runtests.sh
|
||||
===================================================================
|
||||
--- lua-cjson-2.1.0.9.orig/runtests.sh 2021-02-15 19:58:29.000000000 +0100
|
||||
+++ lua-cjson-2.1.0.9/runtests.sh 2025-07-23 18:58:07.869374021 +0200
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
-set -eo pipefail
|
||||
+set -exo pipefail
|
||||
|
||||
##### Platform overrides #####
|
||||
PLATFORM="`uname -s`"
|
||||
[ "$1" ] && VERSION="$1" || VERSION="2.1devel"
|
||||
|
||||
Reference in New Issue
Block a user