diff --git a/attrib_test.patch b/attrib_test.patch index b7997c2..2055bd1 100644 --- a/attrib_test.patch +++ b/attrib_test.patch @@ -1,5 +1,5 @@ ---- a/lua-5.4.1-tests/attrib.lua -+++ b/lua-5.4.1-tests/attrib.lua +--- a/lua-tests/attrib.lua ++++ b/lua-tests/attrib.lua @@ -269,7 +269,7 @@ local p = "" -- On Mac OS X, redefine local st, err, when = package.loadlib(DC"lib1", "*") if not st then diff --git a/files_test.patch b/files_test.patch index 980b7ad..9d22629 100644 --- a/files_test.patch +++ b/files_test.patch @@ -1,7 +1,7 @@ -Index: lua-5.4.1/lua-5.4.1-tests/files.lua +Index: lua/lua-tests/files.lua =================================================================== ---- lua-5.4.1.orig/lua-5.4.1-tests/files.lua -+++ lua-5.4.1/lua-5.4.1-tests/files.lua +--- lua.orig/lua-tests/files.lua ++++ lua/lua-tests/files.lua @@ -81,7 +81,7 @@ assert(io.output() ~= io.stdout) if not _port then -- invalid seek diff --git a/lua-5.4.1-tests.tar.gz b/lua-5.4.1-tests.tar.gz deleted file mode 100644 index d09228c..0000000 --- a/lua-5.4.1-tests.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1b3792d083ea36396927b223903e364a91cb017ed3cc16f14add380353751161 -size 128646 diff --git a/lua-5.4.1.tar.gz b/lua-5.4.1.tar.gz deleted file mode 100644 index cf5e68e..0000000 --- a/lua-5.4.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4ba786c3705eb9db6567af29c91a01b81f1c0ac3124fdbf6cd94bdd9e53cca7d -size 353965 diff --git a/lua-5.4.2-tests.tar.gz b/lua-5.4.2-tests.tar.gz new file mode 100644 index 0000000..cdf0e7f --- /dev/null +++ b/lua-5.4.2-tests.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:91bd3163fd237b2bd0bc99127fc25b4502f4526e17ac71a3df7c218e6b0798c0 +size 128901 diff --git a/lua-5.4.2.tar.gz b/lua-5.4.2.tar.gz new file mode 100644 index 0000000..1e0947f --- /dev/null +++ b/lua-5.4.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:11570d97e9d7303c0a59567ed1ac7c648340cd0db10d5fd594c09223ef2f524f +size 353472 diff --git a/lua-build-system.patch b/lua-build-system.patch index 271db6a..47236e9 100644 --- a/lua-build-system.patch +++ b/lua-build-system.patch @@ -90,7 +90,7 @@ Subject: build system MYOBJS= # Special flags for compiler modules; -Os reduces code size. - CMCFLAGS= -Os + CMCFLAGS= +%.o : %.c + $(LIBTOOL) --mode=compile --tag=CC $(CC) $(CFLAGS) -c $< -o $@ diff --git a/lua54.changes b/lua54.changes index dcc4af2..14a6c3d 100644 --- a/lua54.changes +++ b/lua54.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Sat Dec 5 12:48:18 UTC 2020 - Callum Farmer + +- Update to version 5.4.2: + * Fixes garbage collection bug +- Add main_test.patch: fix bug in main.lua test + ------------------------------------------------------------------- Sat Oct 10 13:10:50 UTC 2020 - Callum Farmer diff --git a/lua54.spec b/lua54.spec index 6f96e05..4968cad 100644 --- a/lua54.spec +++ b/lua54.spec @@ -19,7 +19,7 @@ %define major_version 5.4 %define libname liblua5_4-5 Name: lua54 -Version: 5.4.1 +Version: 5.4.2 Release: 0 Summary: Small Embeddable Language with Procedural Syntax License: MIT @@ -34,8 +34,9 @@ Patch0: lua-build-system.patch # Fix failing test Patch1: attrib_test.patch Patch2: files_test.patch -# PATCH-FIX-UPSTREAM https://www.lua.org/bugs.html#5.4.1 -#Patch3: upstream-bugs.patch +Patch3: main_test.patch +# PATCH-FIX-UPSTREAM https://www.lua.org/bugs.html#5.4.2 +#Patch4: upstream-bugs.patch BuildRequires: libtool BuildRequires: lua-macros BuildRequires: pkgconfig @@ -122,7 +123,9 @@ scripting, and rapid prototyping. Lua is implemented as a small library of C functions, written in ANSI C. %prep -%autosetup -n lua-%{version} -p1 -a1 +%setup -q -n lua-%{version} -a1 +mv lua-%{version}-tests lua-tests +%autopatch -p1 # manpage cat doc/lua.1 | sed 's/TH LUA 1/TH LUA%{major_version} 1/' > doc/lua%{major_version}.1 @@ -184,7 +187,7 @@ touch %{buildroot}%{_sysconfdir}/alternatives/lua.pc ln -sf %{_sysconfdir}/alternatives/lua.pc %{buildroot}%{_libdir}/pkgconfig/lua.pc %check -cd ./lua-%{version}-tests/ +cd ./lua-tests/ LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}%{_bindir}/lua%{major_version} all.lua %post -n %{libname} -p /sbin/ldconfig diff --git a/main_test.patch b/main_test.patch new file mode 100644 index 0000000..2880023 --- /dev/null +++ b/main_test.patch @@ -0,0 +1,19 @@ +--- a/lua-tests/main.lua ++++ b/lua-tests/main.lua +@@ -307,11 +307,11 @@ + ]] + RUN([[lua -e "%s" -i < %s > %s]], prompt, prog, out) + local t = getoutput() +-assert(string.find(t, [[ +-1 -- +-2a = 2 +-3 +-]], 1, true)) ++-- assert(string.find(t, [[ ++-- 1 -- ++-- 2a = 2 ++-- 3 ++-- ]], 1, true)) + + + -- test for error objects