forked from pool/lua-cjson
Compare commits
1 Commits
Author | SHA256 | Date | |
---|---|---|---|
5f717a405d
|
4
.gitignore
vendored
4
.gitignore
vendored
@@ -1 +1,5 @@
|
||||
.osc
|
||||
_scmsync.obsinfo
|
||||
_buildconfig-*
|
||||
_buildinfo-*.xml
|
||||
lua*-cjson-*-build/
|
||||
|
BIN
2.1.0.14.tar.gz
(Stored with Git LFS)
Normal file
BIN
2.1.0.14.tar.gz
(Stored with Git 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,58 @@
|
||||
-------------------------------------------------------------------
|
||||
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.14
|
||||
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-cjson/archive/refs/tags/%{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
|
||||
@@ -73,7 +73,7 @@ install -m644 lua/cjson/util.lua %{buildroot}%{lua_noarchdir}/cjson/
|
||||
|
||||
%check
|
||||
rm -rf build
|
||||
export CFLAGS="%{optflags}" PREFIX="%{_prefix}" \
|
||||
export CFLAGS="%{optflags}" PREFIX="%{_prefix}" SKIP_CMAKE=1 \
|
||||
LUA_INCLUDE_DIR="%{lua_incdir}" LUA_CMODULE_DIR="%{lua_archdir}" LUA_MODULE_DIR="%{lua_noarchdir}"
|
||||
./runtests.sh
|
||||
|
||||
|
@@ -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