diff --git a/lua-5.4.2-tests.tar.gz b/lua-5.4.2-tests.tar.gz deleted file mode 100644 index cdf0e7f..0000000 --- a/lua-5.4.2-tests.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -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 deleted file mode 100644 index 1e0947f..0000000 --- a/lua-5.4.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:11570d97e9d7303c0a59567ed1ac7c648340cd0db10d5fd594c09223ef2f524f -size 353472 diff --git a/lua-5.4.3-tests.tar.gz b/lua-5.4.3-tests.tar.gz new file mode 100644 index 0000000..29b3038 --- /dev/null +++ b/lua-5.4.3-tests.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d29c3022897a8290f280ebe1c6853248dfa35a668e1fc02ba9c8cde4e7bf110 +size 131911 diff --git a/lua-5.4.3.tar.gz b/lua-5.4.3.tar.gz new file mode 100644 index 0000000..3f44452 --- /dev/null +++ b/lua-5.4.3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f8612276169e3bfcbcfb8f226195bfc6e466fe13042f1076cbde92b7ec96bbfb +size 358216 diff --git a/lua-build-system.patch b/lua-build-system.patch index 47236e9..deb19a6 100644 --- a/lua-build-system.patch +++ b/lua-build-system.patch @@ -132,23 +132,23 @@ Subject: build system $(LUA_A): $(BASE_O) - $(AR) $@ $(BASE_O) - $(RANLIB) $@ -+ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -lm -ldl $(BASE_O:.o=.lo) -rpath /usr/lib -version-info 9:0:4 -o liblua$(V).la ++ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -lm -ldl $(BASE_O:.o=.lo) -rpath /usr/lib -version-info 9:0:4 -o $(LUA_A) $(LUA_T): $(LUA_O) $(LUA_A) - $(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS) -+ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) $(LIBS) -static liblua$(V).la -Wl,-E lua.lo -o $@ ++ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) $(LIBS) -static $(LUA_A) -Wl,-E lua.lo -o $@ $(LUAC_T): $(LUAC_O) $(LUA_A) - $(CC) -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS) -+ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -static liblua$(V).la luac.lo -o $@ ++ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -static $(LUA_A) luac.lo -o $@ test: -- ./lua -v -+ $(LIBTOOL) --mode=execute -dlopen ./liblua$(V).la ./lua$(V) -v +- ./$(LUA_T) -v ++ $(LIBTOOL) --mode=execute -dlopen ./$(LUA_A) ./$(LUA_T) -v clean: $(RM) $(ALL_T) $(ALL_O) -@@ -142,14 +157,6 @@ +@@ -144,14 +159,6 @@ .PHONY: all $(PLATS) help test clean default o a depend echo # Compiler modules may use special flags. @@ -166,7 +166,7 @@ Subject: build system --- a/src/luaconf.h +++ b/src/luaconf.h -@@ -227,7 +227,7 @@ +@@ -217,7 +217,7 @@ #else /* }{ */ diff --git a/lua54.changes b/lua54.changes index fa5f034..cb46bf5 100644 --- a/lua54.changes +++ b/lua54.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Mar 29 17:04:47 UTC 2021 - Callum Farmer + +- Update to version 5.4.3 +- Removed upstream-bugs.patch: new release (no bugs found yet) +- Removed upstream-bugs-test.patch: new release (no bugs found yet) + ------------------------------------------------------------------- Thu Mar 11 17:10:14 UTC 2021 - Callum Farmer diff --git a/lua54.spec b/lua54.spec index 52cf710..30f0556 100644 --- a/lua54.spec +++ b/lua54.spec @@ -25,7 +25,7 @@ %define major_version 5.4 %define libname liblua5_4-5 Name: lua54%{name_ext} -Version: 5.4.2 +Version: 5.4.3 Release: 0 Summary: Small Embeddable Language with Procedural Syntax License: MIT @@ -41,9 +41,9 @@ Patch0: lua-build-system.patch Patch1: attrib_test.patch Patch2: files_test.patch Patch3: main_test.patch -# PATCH-FIX-UPSTREAM https://www.lua.org/bugs.html#5.4.2 -Patch4: upstream-bugs.patch -Patch5: upstream-bugs-test.patch +# PATCH-FIX-UPSTREAM https://www.lua.org/bugs.html#5.4.3 +#Patch4: upstream-bugs.patch +#Patch5: upstream-bugs-test.patch %if "%{flavor}" == "test" BuildRequires: lua54 %else @@ -139,11 +139,11 @@ of C functions, written in ANSI C. %patch1 -p1 %patch2 -p1 %patch3 -p1 -%patch5 -p1 +#%patch5 -p1 %else %setup -q -n lua-%{version} %patch0 -p1 -%patch4 -p1 +#%patch4 -p1 %endif # manpage diff --git a/upstream-bugs-test.patch b/upstream-bugs-test.patch deleted file mode 100644 index d656c9f..0000000 --- a/upstream-bugs-test.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- a/db.lua -+++ b/db.lua -@@ -31,6 +31,7 @@ end - - do - assert(not pcall(debug.getinfo, print, "X")) -- invalid option -+ assert(not pcall(debug.getinfo, 0, ">")) -- invalid option - assert(not debug.getinfo(1000)) -- out of range level - assert(not debug.getinfo(-1)) -- out of range level - local a = debug.getinfo(print) ---- a/strings.lua -+++ b/strings.lua -@@ -361,6 +361,9 @@ assert(load("return 1\n--comment without ending EOL")() == 1) - - - checkerror("table expected", table.concat, 3) -+checkerror("at index " .. maxi, table.concat, {}, " ", maxi, maxi) -+-- '%' escapes following minus signal -+checkerror("at index %" .. mini, table.concat, {}, " ", mini, mini) - assert(table.concat{} == "") - assert(table.concat({}, 'x') == "") - assert(table.concat({'\0', '\0\1', '\0\1\2'}, '.\0.') == "\0.\0.\0\1.\0.\0\1\2") ---- a/errors.lua -+++ b/errors.lua -@@ -191,6 +191,13 @@ checkmessage("a = 24 // 0", "divide by zero") - checkmessage("a = 1 % 0", "'n%0'") - - -+-- type error for an object which is neither in an upvalue nor a register. -+-- The following code will try to index the value 10 that is stored in -+-- the metatable, without moving it to a register. -+checkmessage("local a = setmetatable({}, {__index = 10}).x", -+ "attempt to index a number value") -+ -+ - -- numeric for loops - checkmessage("for i = {}, 10 do end", "table") - checkmessage("for i = io.stdin, 10 do end", "FILE") diff --git a/upstream-bugs.patch b/upstream-bugs.patch deleted file mode 100644 index aa1cb29..0000000 --- a/upstream-bugs.patch +++ /dev/null @@ -1,46 +0,0 @@ ---- a/src/ldblib.c -+++ b/src/ldblib.c -@@ -152,6 +152,7 @@ static int db_getinfo (lua_State *L) { - lua_State *L1 = getthread(L, &arg); - const char *options = luaL_optstring(L, arg+2, "flnSrtu"); - checkstack(L, L1, 3); -+ luaL_argcheck(L, options[0] != '>', arg + 2, "invalid option '>'"); - if (lua_isfunction(L, arg + 1)) { /* info about a function? */ - options = lua_pushfstring(L, ">%s", options); /* add '>' to 'options' */ - lua_pushvalue(L, arg + 1); /* move function to 'L1' stack */ ---- a/src/ltablib.c -+++ b/src/ltablib.c -@@ -146,7 +146,7 @@ static int tmove (lua_State *L) { - static void addfield (lua_State *L, luaL_Buffer *b, lua_Integer i) { - lua_geti(L, 1, i); - if (!lua_isstring(L, -1)) -- luaL_error(L, "invalid value (%s) at index %d in table for 'concat'", -+ luaL_error(L, "invalid value (%s) at index %I in table for 'concat'", - luaL_typename(L, -1), i); - luaL_addvalue(b); - } ---- a/src/ldebug.c -+++ b/src/ldebug.c -@@ -638,14 +638,18 @@ static const char *funcnamefromcode (lua_State *L, CallInfo *ci, - - - /* --** The subtraction of two potentially unrelated pointers is --** not ISO C, but it should not crash a program; the subsequent --** checks are ISO C and ensure a correct result. -+** Check whether pointer 'o' points to some value in the stack -+** frame of the current function. Because 'o' may not point to a -+** value in this stack, we cannot compare it with the region -+** boundaries (undefined behaviour in ISO C). - */ - static int isinstack (CallInfo *ci, const TValue *o) { -- StkId base = ci->func + 1; -- ptrdiff_t i = cast(StkId, o) - base; -- return (0 <= i && i < (ci->top - base) && s2v(base + i) == o); -+ StkId pos; -+ for (pos = ci->func + 1; pos < ci->top; pos++) { -+ if (o == s2v(pos)) -+ return 1; -+ } -+ return 0; /* not found */ - }