commit lua54 for openSUSE:Factory

2023-06-01 Thread Source-Sync
Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package lua54 for openSUSE:Factory checked 
in at 2023-06-01 17:18:41

Comparing /work/SRC/openSUSE:Factory/lua54 (Old)
 and  /work/SRC/openSUSE:Factory/.lua54.new.2531 (New)


Package is "lua54"

Thu Jun  1 17:18:41 2023 rev:25 rq:1089611 version:5.4.6

Changes:

--- /work/SRC/openSUSE:Factory/lua54/lua54.changes  2023-04-06 
15:55:17.620076197 +0200
+++ /work/SRC/openSUSE:Factory/.lua54.new.2531/lua54.changes2023-06-01 
17:18:45.001886387 +0200
@@ -1,0 +2,37 @@
+Mon May 29 16:23:16 UTC 2023 - Callum Farmer 
+
+- Library is always liblua5_4-5: due to SOVERSION leading digit
+  being 5
+
+---
+Mon May 22 09:39:52 UTC 2023 - Matej Cepl 
+
+- Final release of 5.4.6. No change in the changelog.
+
+---
+Tue May  9 12:43:31 UTC 2023 - Matej Cepl 
+
+- Experimenting with lua 5.4.6-rc1 (release 5.4.5 has been
+  effectively withdrawn).
+
+---
+Sun Apr 30 12:22:03 UTC 2023 - Matej Cepl 
+
+- Update to 5.4.5:
+  - this is a bug-fix release.
+  - Lua 5.4.5 also contains several internal improvements and
+includes a revised reference manual
+- Remove upstreamed patches:
+  - luabugs1.patch
+  - luabugs10.patch
+  - luabugs11.patch
+  - luabugs2.patch
+  - luabugs3.patch
+  - luabugs4.patch
+  - luabugs5.patch
+  - luabugs6.patch
+  - luabugs7.patch
+  - luabugs8.patch
+  - luabugs9.patch
+
+---

Old:

  lua-5.4.4-tests.tar.gz
  lua-5.4.4.tar.gz
  luabugs1.patch
  luabugs10.patch
  luabugs11.patch
  luabugs2.patch
  luabugs3.patch
  luabugs4.patch
  luabugs5.patch
  luabugs6.patch
  luabugs7.patch
  luabugs8.patch
  luabugs9.patch

New:

  lua-5.4.6-tests.tar.gz
  lua-5.4.6.tar.gz



Other differences:
--
++ lua54.spec ++
--- /var/tmp/diff_new_pack.QQNUdh/_old  2023-06-01 17:18:45.773890963 +0200
+++ /var/tmp/diff_new_pack.QQNUdh/_new  2023-06-01 17:18:45.781891011 +0200
@@ -1,5 +1,5 @@
 #
-# spec file for package lua54
+# spec file
 #
 # Copyright (c) 2023 SUSE LLC
 #
@@ -15,6 +15,7 @@
 # Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
+
 %global flavor @BUILD_FLAVOR@%{nil}
 %if "%{flavor}" == "test"
 %define name_ext -test
@@ -24,16 +25,15 @@
 %endif
 %define major_version 5.4
 %define libname liblua5_4-5
-
 Name:   lua54%{name_ext}
-Version:5.4.4
+Version:5.4.6
 Release:0
 Summary:Small Embeddable Language with Procedural Syntax
 License:GPL-3.0-or-later
 Group:  Development/Languages/Other
 URL:https://www.lua.org
-Source: http://www.lua.org/ftp/lua-%{version}.tar.gz
-Source1:http://www.lua.org/tests/lua-%{version}-tests.tar.gz
+Source: https://www.lua.org/ftp/lua-%{version}.tar.gz
+Source1:https://www.lua.org/tests/lua-%{version}-tests.tar.gz
 Source99:   baselibs.conf
 # PATCH-FIX-SUSE tweak the buildsystem to produce what is needed for SUSE
 Patch0: lua-build-system.patch
@@ -43,19 +43,11 @@
 Patch2: files_test.patch
 Patch3: main_test.patch
 Patch6: shared_link.patch
-# PATCH-FIX-UPSTREAM luabugsX.patch https://www.lua.org/bugs.html#5.4.4-X
-Patch7: luabugs1.patch
-Patch8: luabugs2.patch
-Patch9: luabugs3.patch
-Patch10:luabugs4.patch
-Patch11:luabugs5.patch
-Patch12:luabugs6.patch
-Patch13:luabugs7.patch
-Patch14:luabugs8.patch
-Patch15:luabugs9.patch
-Patch16:luabugs10.patch
-Patch17:luabugs11.patch
-#
+Requires(post): update-alternatives
+Requires(postun):update-alternatives
+Provides:   lua = %{version}
+Obsoletes:  lua < %{version}
+Provides:   Lua(API) = %{major_version}
 %if "%{flavor}" == "test"
 BuildRequires:  lua54
 %else
@@ -64,11 +56,6 @@
 BuildRequires:  pkgconfig
 BuildRequires:  readline-devel
 %endif
-Requires(post): update-alternatives
-Requires(postun): update-alternatives
-Provides:   lua = %{version}
-Obsoletes:  lua < %{version}
-Provides:   Lua(API) = %{major_version}
 
 %description
 Lua is a programming language originally designed for extending
@@ -90,7 +77,7 @@
 Requires:   %{name} = %{version}
 Requires:   lua-macros
 Requires(post): update-alternatives
-Requires(postun): update-alternatives
+Requires(postun):update-alternatives
 Provides:   lua-devel = %{version}
 Provides:   Lua(devel) = %{major_version}
 Provides:   pkgconfig(lua) = %{version}
@@ -107,16 +94,16 @@
 Summary:The Lu

commit lua54 for openSUSE:Factory

2023-04-06 Thread Source-Sync
Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package lua54 for openSUSE:Factory checked 
in at 2023-04-06 15:55:16

Comparing /work/SRC/openSUSE:Factory/lua54 (Old)
 and  /work/SRC/openSUSE:Factory/.lua54.new.19717 (New)


Package is "lua54"

Thu Apr  6 15:55:16 2023 rev:24 rq:1077316 version:5.4.4

Changes:

--- /work/SRC/openSUSE:Factory/lua54/lua54.changes  2023-03-22 
22:28:36.589579687 +0100
+++ /work/SRC/openSUSE:Factory/.lua54.new.19717/lua54.changes   2023-04-06 
15:55:17.620076197 +0200
@@ -1,0 +2,6 @@
+Tue Apr  4 11:58:56 UTC 2023 - Callum Farmer 
+
+- Added more numbered patches from upstream:
+  * luabugs11.patch
+
+---

New:

  luabugs11.patch



Other differences:
--
++ lua54.spec ++
--- /var/tmp/diff_new_pack.MScRjW/_old  2023-04-06 15:55:18.436080805 +0200
+++ /var/tmp/diff_new_pack.MScRjW/_new  2023-04-06 15:55:18.440080828 +0200
@@ -54,6 +54,7 @@
 Patch14:luabugs8.patch
 Patch15:luabugs9.patch
 Patch16:luabugs10.patch
+Patch17:luabugs11.patch
 #
 %if "%{flavor}" == "test"
 BuildRequires:  lua54

++ luabugs11.patch ++
>From ab859fe59b464a038a45552921cb2b23892343af Mon Sep 17 00:00:00 2001
From: Roberto Ierusalimschy 
Date: Fri, 17 Mar 2023 15:52:09 -0300
Subject: [PATCH] Bug: Loading a corrupted binary file can segfault

The size of the list of upvalue names are stored separated from the
size of the list of upvalues, but they share the same array.
---
 ldump.c  |  8 ++--
 lundump.c|  2 ++
 testes/calls.lua | 14 ++
 3 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/ldump.c b/ldump.c
index f848b669c..f231691b7 100644
--- a/src/ldump.c
+++ b/src/ldump.c
@@ -10,6 +10,7 @@
 #include "lprefix.h"
 
 
+#include 
 #include 
 
 #include "lua.h"
@@ -55,8 +56,11 @@ static void dumpByte (DumpState *D, int y) {
 }
 
 
-/* dumpInt Buff Size */
-#define DIBS((sizeof(size_t) * 8 / 7) + 1)
+/*
+** 'dumpSize' buffer size: each byte can store up to 7 bits. (The "+6"
+** rounds up the division.)
+*/
+#define DIBS((sizeof(size_t) * CHAR_BIT + 6) / 7)
 
 static void dumpSize (DumpState *D, size_t x) {
   lu_byte buff[DIBS];
diff --git a/lundump.c b/lundump.c
index aba93f828..02aed64fb 100644
--- a/src/lundump.c
+++ b/src/lundump.c
@@ -248,6 +248,8 @@ static void loadDebug (LoadState *S, Proto *f) {
 f->locvars[i].endpc = loadInt(S);
   }
   n = loadInt(S);
+  if (n != 0)  /* does it have debug information? */
+n = f->sizeupvalues;  /* must be this many */
   for (i = 0; i < n; i++)
 f->upvalues[i].name = loadStringN(S, f);
 }
diff --git a/testes/calls.lua b/testes/calls.lua
index a19385843..2d562a24a 100644
--- a/testes/calls.lua
+++ b/testes/calls.lua
@@ -342,6 +342,20 @@ do   -- another bug (in 5.4.0)
 end
 
 
+do   -- another bug (since 5.2)
+  -- corrupted binary dump: list of upvalue names is larger than number
+  -- of upvalues, overflowing the array of upvalues.
+  local code =
+   "\x1b\x4c\x75\x61\x54\x00\x19\x93\x0d\x0a\x1a\x0a\x04\x08\x08\x78\x56\z
+\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x28\x77\x40\x00\x86\x40\z
+\x74\x65\x6d\x70\x81\x81\x01\x00\x02\x82\x48\x00\x02\x00\xc7\x00\x01\z
+\x00\x80\x80\x80\x82\x00\x00\x80\x81\x82\x78\x80\x82\x81\x86\x40\x74\z
+\x65\x6d\x70"
+
+  assert(load(code))   -- segfaults in previous versions
+end
+
+
 x = string.dump(load("x = 1; return x"))
 a = assert(load(read1(x), nil, "b"))
 assert(a() == 1 and _G.x == 1)


commit lua54 for openSUSE:Factory

2023-03-22 Thread Source-Sync
Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package lua54 for openSUSE:Factory checked 
in at 2023-03-22 22:28:35

Comparing /work/SRC/openSUSE:Factory/lua54 (Old)
 and  /work/SRC/openSUSE:Factory/.lua54.new.31432 (New)


Package is "lua54"

Wed Mar 22 22:28:35 2023 rev:23 rq:1072836 version:5.4.4

Changes:

--- /work/SRC/openSUSE:Factory/lua54/lua54.changes  2023-01-27 
10:16:34.899734712 +0100
+++ /work/SRC/openSUSE:Factory/.lua54.new.31432/lua54.changes   2023-03-22 
22:28:36.589579687 +0100
@@ -1,0 +2,6 @@
+Sat Mar 18 12:11:40 UTC 2023 - Callum Farmer 
+
+- Added more numbered patches from upstream:
+  * luabugs10.patch
+
+---

New:

  luabugs10.patch



Other differences:
--
++ lua54.spec ++
--- /var/tmp/diff_new_pack.iRpywl/_old  2023-03-22 22:28:37.489584215 +0100
+++ /var/tmp/diff_new_pack.iRpywl/_new  2023-03-22 22:28:37.497584256 +0100
@@ -53,6 +53,7 @@
 Patch13:luabugs7.patch
 Patch14:luabugs8.patch
 Patch15:luabugs9.patch
+Patch16:luabugs10.patch
 #
 %if "%{flavor}" == "test"
 BuildRequires:  lua54

++ luabugs10.patch ++
>From 02bab9fc258fe1cbc6088b1bd61193499d058eff Mon Sep 17 00:00:00 2001
From: Roberto Ierusalimschy 
Date: Wed, 8 Feb 2023 14:15:41 -0300
Subject: [PATCH] Bug: Wrong line in error message for arith. errors

It also causes 'L->top' to be wrong when the error happens,
triggering an 'assert'.
---
 lvm.c | 4 
 testes/errors.lua | 8 
 2 files changed, 12 insertions(+)

diff --git a/lvm.c b/lvm.c
index 2e84dc63c..8493a770c 100644
--- a/src/lvm.c
+++ b/src/lvm.c
@@ -1410,6 +1410,7 @@ void luaV_execute (lua_State *L, CallInfo *ci) {
 vmbreak;
   }
   vmcase(OP_MODK) {
+savestate(L, ci);  /* in case of division by 0 */
 op_arithK(L, luaV_mod, luaV_modf);
 vmbreak;
   }
@@ -1422,6 +1423,7 @@ void luaV_execute (lua_State *L, CallInfo *ci) {
 vmbreak;
   }
   vmcase(OP_IDIVK) {
+savestate(L, ci);  /* in case of division by 0 */
 op_arithK(L, luaV_idiv, luai_numidiv);
 vmbreak;
   }
@@ -1470,6 +1472,7 @@ void luaV_execute (lua_State *L, CallInfo *ci) {
 vmbreak;
   }
   vmcase(OP_MOD) {
+savestate(L, ci);  /* in case of division by 0 */
 op_arith(L, luaV_mod, luaV_modf);
 vmbreak;
   }
@@ -1482,6 +1485,7 @@ void luaV_execute (lua_State *L, CallInfo *ci) {
 vmbreak;
   }
   vmcase(OP_IDIV) {  /* floor division */
+savestate(L, ci);  /* in case of division by 0 */
 op_arith(L, luaV_idiv, luai_numidiv);
 vmbreak;
   }
diff --git a/testes/errors.lua b/testes/errors.lua
index cf0ab5265..bf6f389d2 100644
--- a/testes/errors.lua
+++ b/testes/errors.lua
@@ -444,6 +444,14 @@ if not b then
   end
 end]], 5)
 
+
+-- bug in 5.4.0
+lineerror([[
+  local a = 0
+  local b = 1
+  local c = b % a
+]], 3)
+
 do
   -- Force a negative estimate for base line. Error in instruction 2
   -- (after VARARGPREP, GETGLOBAL), with first absolute line information


commit lua54 for openSUSE:Factory

2023-01-27 Thread Source-Sync
Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package lua54 for openSUSE:Factory checked 
in at 2023-01-27 10:15:12

Comparing /work/SRC/openSUSE:Factory/lua54 (Old)
 and  /work/SRC/openSUSE:Factory/.lua54.new.32243 (New)


Package is "lua54"

Fri Jan 27 10:15:12 2023 rev:22 rq:1060891 version:5.4.4

Changes:

--- /work/SRC/openSUSE:Factory/lua54/lua54.changes  2022-12-20 
20:19:41.813618401 +0100
+++ /work/SRC/openSUSE:Factory/.lua54.new.32243/lua54.changes   2023-01-27 
10:16:34.899734712 +0100
@@ -1,0 +2,5 @@
+Tue Jan 24 10:53:04 UTC 2023 - Michal Suchanek 
+
+- Do not use complex dependencies on SLE12
+
+---



Other differences:
--
++ lua54.spec ++
--- /var/tmp/diff_new_pack.1E2s7Z/_old  2023-01-27 10:16:35.419737591 +0100
+++ /var/tmp/diff_new_pack.1E2s7Z/_new  2023-01-27 10:16:35.427737635 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package lua54
 #
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -31,7 +31,7 @@
 Summary:Small Embeddable Language with Procedural Syntax
 License:GPL-3.0-or-later
 Group:  Development/Languages/Other
-URL:http://www.lua.org
+URL:https://www.lua.org
 Source: http://www.lua.org/ftp/lua-%{version}.tar.gz
 Source1:http://www.lua.org/tests/lua-%{version}-tests.tar.gz
 Source99:   baselibs.conf
@@ -133,7 +133,9 @@
 License:MIT
 Group:  Documentation/HTML
 BuildArch:  noarch
+%if 0%{?suse_version} > 1315
 Supplements:(lua54 and patterns-base-documentation)
+%endif
 
 %description doc
 Lua is a programming language originally designed for extending
@@ -178,7 +180,7 @@
 prefix=%{_prefix}
 exec_prefix=%{_prefix}
 libdir=%{_libdir}
-includedir=%{_prefix}/include/lua%{major_version}
+includedir=%{_includedir}/lua%{major_version}
 INSTALL_LMOD=%{_datadir}/lua/%{major_version}
 INSTALL_CMOD=%{_libdir}/lua/%{major_version}
 
@@ -247,13 +249,13 @@
 %dir %{_datadir}/lua/%{major_version}
 %{_bindir}/lua%{major_version}
 %{_bindir}/luac%{major_version}
-%{_mandir}/man1/lua%{major_version}.1%{ext_man}
-%{_mandir}/man1/luac%{major_version}.1%{ext_man}
+%{_mandir}/man1/lua%{major_version}.1%{?ext_man}
+%{_mandir}/man1/luac%{major_version}.1%{?ext_man}
 # alternatives
 %{_bindir}/lua
 %{_bindir}/luac
-%{_mandir}/man1/lua.1%{ext_man}
-%{_mandir}/man1/luac.1%{ext_man}
+%{_mandir}/man1/lua.1%{?ext_man}
+%{_mandir}/man1/luac.1%{?ext_man}
 %ghost %{_sysconfdir}/alternatives/lua
 %ghost %{_sysconfdir}/alternatives/luac
 %ghost %{_sysconfdir}/alternatives/lua.1%{ext_man}


commit lua54 for openSUSE:Factory

2022-12-20 Thread Source-Sync
Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package lua54 for openSUSE:Factory checked 
in at 2022-12-20 20:19:40

Comparing /work/SRC/openSUSE:Factory/lua54 (Old)
 and  /work/SRC/openSUSE:Factory/.lua54.new.1835 (New)


Package is "lua54"

Tue Dec 20 20:19:40 2022 rev:21 rq:1043640 version:5.4.4

Changes:

--- /work/SRC/openSUSE:Factory/lua54/lua54.changes  2022-09-01 
22:09:25.875958683 +0200
+++ /work/SRC/openSUSE:Factory/.lua54.new.1835/lua54.changes2022-12-20 
20:19:41.813618401 +0100
@@ -1,0 +2,7 @@
+Sun Dec 18 17:55:21 UTC 2022 - Callum Farmer 
+
+- Added more numbered patches from upstream:
+  * luabugs8.patch
+  * luabugs9.patch
+
+---

New:

  luabugs8.patch
  luabugs9.patch



Other differences:
--
++ lua54.spec ++
--- /var/tmp/diff_new_pack.SqFinT/_old  2022-12-20 20:19:43.269626382 +0100
+++ /var/tmp/diff_new_pack.SqFinT/_new  2022-12-20 20:19:43.277626426 +0100
@@ -51,6 +51,8 @@
 Patch11:luabugs5.patch
 Patch12:luabugs6.patch
 Patch13:luabugs7.patch
+Patch14:luabugs8.patch
+Patch15:luabugs9.patch
 #
 %if "%{flavor}" == "test"
 BuildRequires:  lua54

++ luabugs8.patch ++
>From a1089b415a3f5c753aa1b40758ffdaf28d5701b0 Mon Sep 17 00:00:00 2001
From: Roberto Ierusalimschy 
Date: Fri, 23 Sep 2022 10:41:16 -0300
Subject: [PATCH] Bug: 'utf8.codes' accepts spurious continuation bytes

---
 lutf8lib.c  | 27 ---
 testes/utf8.lua | 12 +++-
 2 files changed, 27 insertions(+), 12 deletions(-)

diff --git a/lutf8lib.c b/lutf8lib.c
index e7bf098f6..3a5b9bc38 100644
--- a/src/lutf8lib.c
+++ b/src/lutf8lib.c
@@ -25,6 +25,9 @@
 
 #define MAXUTF 0x7FFFu
 
+
+#define MSGInvalid "invalid UTF-8 code"
+
 /*
 ** Integer type for decoded UTF-8 values; MAXUTF needs 31 bits.
 */
@@ -35,7 +38,8 @@ typedef unsigned long utfint;
 #endif
 
 
-#define iscont(p)  ((*(p) & 0xC0) == 0x80)
+#define iscont(c)  (((c) & 0xC0) == 0x80)
+#define iscontp(p) iscont(*(p))
 
 
 /* from strlib */
@@ -65,7 +69,7 @@ static const char *utf8_decode (const char *s, utfint *val, 
int strict) {
 int count = 0;  /* to count number of continuation bytes */
 for (; c & 0x40; c <<= 1) {  /* while it needs continuation bytes... */
   unsigned int cc = (unsigned char)s[++count];  /* read next byte */
-  if ((cc & 0xC0) != 0x80)  /* not a continuation byte? */
+  if (!iscont(cc))  /* not a continuation byte? */
 return NULL;  /* invalid byte sequence */
   res = (res << 6) | (cc & 0x3F);  /* add lower 6 bits from cont. byte */
 }
@@ -140,7 +144,7 @@ static int codepoint (lua_State *L) {
 utfint code;
 s = utf8_decode(s, &code, !lax);
 if (s == NULL)
-  return luaL_error(L, "invalid UTF-8 code");
+  return luaL_error(L, MSGInvalid);
 lua_pushinteger(L, code);
 n++;
   }
@@ -190,16 +194,16 @@ static int byteoffset (lua_State *L) {
"position out of bounds");
   if (n == 0) {
 /* find beginning of current byte sequence */
-while (posi > 0 && iscont(s + posi)) posi--;
+while (posi > 0 && iscontp(s + posi)) posi--;
   }
   else {
-if (iscont(s + posi))
+if (iscontp(s + posi))
   return luaL_error(L, "initial position is a continuation byte");
 if (n < 0) {
while (n < 0 && posi > 0) {  /* move back */
  do {  /* find beginning of previous character */
posi--;
- } while (posi > 0 && iscont(s + posi));
+ } while (posi > 0 && iscontp(s + posi));
  n++;
}
  }
@@ -208,7 +212,7 @@ static int byteoffset (lua_State *L) {
while (n > 0 && posi < (lua_Integer)len) {
  do {  /* find beginning of next character */
posi++;
- } while (iscont(s + posi));  /* (cannot pass final '\0') */
+ } while (iscontp(s + posi));  /* (cannot pass final '\0') */
  n--;
}
  }
@@ -226,15 +230,15 @@ static int iter_aux (lua_State *L, int strict) {
   const char *s = luaL_checklstring(L, 1, &len);
   lua_Unsigned n = (lua_Unsigned)lua_tointeger(L, 2);
   if (n < len) {
-while (iscont(s + n)) n++;  /* skip continuation bytes */
+while (iscontp(s + n)) n++;  /* go to next character */
   }
   if (n >= len)  /* (also handles original 'n' being negative) */
 return 0;  /* no more codepoints */
   else {
 utfint code;
 const char *next = utf8_decode(s + n, &code, strict);
-if (next == NULL)
-  return luaL_error(L, "invalid UTF-8 code");
+if (next == NULL || iscontp(next))
+  return luaL_error(L, MSGInvalid);
 lua_pushinteger(L, n + 1);
 lua_

commit lua54 for openSUSE:Factory

2022-09-01 Thread Source-Sync
Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package lua54 for openSUSE:Factory checked 
in at 2022-09-01 22:09:23

Comparing /work/SRC/openSUSE:Factory/lua54 (Old)
 and  /work/SRC/openSUSE:Factory/.lua54.new.2083 (New)


Package is "lua54"

Thu Sep  1 22:09:23 2022 rev:20 rq:1000323 version:5.4.4

Changes:

--- /work/SRC/openSUSE:Factory/lua54/lua54.changes  2022-07-04 
13:38:13.968570697 +0200
+++ /work/SRC/openSUSE:Factory/.lua54.new.2083/lua54.changes2022-09-01 
22:09:25.875958683 +0200
@@ -1,0 +2,7 @@
+Tue Aug 30 16:40:09 UTC 2022 - Callum Farmer 
+
+- Add more upstream patches:
+  * luabugs6.patch
+  * luabugs7.patch
+
+---

New:

  luabugs6.patch
  luabugs7.patch



Other differences:
--
++ lua54.spec ++
--- /var/tmp/diff_new_pack.axYBFj/_old  2022-09-01 22:09:26.479960335 +0200
+++ /var/tmp/diff_new_pack.axYBFj/_new  2022-09-01 22:09:26.483960346 +0200
@@ -49,6 +49,8 @@
 Patch9: luabugs3.patch
 Patch10:luabugs4.patch
 Patch11:luabugs5.patch
+Patch12:luabugs6.patch
+Patch13:luabugs7.patch
 #
 %if "%{flavor}" == "test"
 BuildRequires:  lua54

++ luabugs6.patch ++
>From 997f11f54322883c3181225f29d101a597f31730 Mon Sep 17 00:00:00 2001
From: Roberto Ierusalimschy 
Date: Wed, 24 Aug 2022 17:36:47 -0300
Subject: [PATCH] Bug: 'break' may not properly close variable in a 'for' loop

Function 'leaveblock' was generating "break" label before removing
variables from the closing block. If 'createlabel' created a 'close'
instruction (which it did when matching a goto/break that exited
the scope of an upvalue), that instruction would use the wrong level.
---
 lparser.c | 16 
 testes/locals.lua | 20 
 2 files changed, 28 insertions(+), 8 deletions(-)

diff --git a/lparser.c b/lparser.c
index a5cd55257..fe693b571 100644
--- a/src/lparser.c
+++ b/src/lparser.c
@@ -674,19 +674,19 @@ static void leaveblock (FuncState *fs) {
   LexState *ls = fs->ls;
   int hasclose = 0;
   int stklevel = reglevel(fs, bl->nactvar);  /* level outside the block */
-  if (bl->isloop)  /* fix pending breaks? */
+  removevars(fs, bl->nactvar);  /* remove block locals */
+  lua_assert(bl->nactvar == fs->nactvar);  /* back to level on entry */
+  if (bl->isloop)  /* has to fix pending breaks? */
 hasclose = createlabel(ls, luaS_newliteral(ls->L, "break"), 0, 0);
-  if (!hasclose && bl->previous && bl->upval)
+  if (!hasclose && bl->previous && bl->upval)  /* still need a 'close'? */
 luaK_codeABC(fs, OP_CLOSE, stklevel, 0, 0);
-  fs->bl = bl->previous;
-  removevars(fs, bl->nactvar);
-  lua_assert(bl->nactvar == fs->nactvar);
   fs->freereg = stklevel;  /* free registers */
   ls->dyd->label.n = bl->firstlabel;  /* remove local labels */
-  if (bl->previous)  /* inner block? */
-movegotosout(fs, bl);  /* update pending gotos to outer block */
+  fs->bl = bl->previous;  /* current block now is previous one */
+  if (bl->previous)  /* was it a nested block? */
+movegotosout(fs, bl);  /* update pending gotos to enclosing block */
   else {
-if (bl->firstgoto < ls->dyd->gt.n)  /* pending gotos in outer block? */
+if (bl->firstgoto < ls->dyd->gt.n)  /* still pending gotos? */
   undefgoto(ls, &ls->dyd->gt.arr[bl->firstgoto]);  /* error */
   }
 }
diff --git a/testes/locals.lua b/testes/locals.lua
index ddb75054f..d50beaa52 100644
--- a/testes/locals.lua
+++ b/testes/locals.lua
@@ -360,6 +360,26 @@ do
 end
 
 
+do
+  -- bug in 5.4.4: 'break' may generate wrong 'close' instruction when
+  -- leaving a loop block.
+
+  local closed = false
+
+  local o1 = setmetatable({}, {__close=function() closed = true end})
+
+  local function test()
+for k, v in next, {}, nil, o1 do
+  local function f() return k end   -- create an upvalue
+  break
+end
+assert(closed)
+  end
+
+  test()
+end
+
+
 do print("testing errors in __close")
 
   -- original error is in __close

++ luabugs7.patch ++
>From a1f77a234a053da46b06d5d4be00ffb30d3eb45b Mon Sep 17 00:00:00 2001
From: Roberto Ierusalimschy 
Date: Tue, 23 Aug 2022 16:06:23 -0300
Subject: [PATCH] Bug: set correct pause when (re)entering gen. collection.

---
 lgc.c | 63 +--
 1 file changed, 31 insertions(+), 32 deletions(-)

diff --git a/lgc.c b/lgc.c
index 42a73d813..317ea4508 100644
--- a/src/lgc.c
+++ b/src/lgc.c
@@ -1041,7 +1041,25 @@ void luaC_checkfinalizer (lua_State *L, GCObject *o, 
Table *mt) {
 ** ===
 */
 
-static void setpause (global_State *g);
+
+/*
+** Set the "time" to wait bef

commit lua54 for openSUSE:Factory

2022-07-04 Thread Source-Sync
Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package lua54 for openSUSE:Factory checked 
in at 2022-07-04 13:38:12

Comparing /work/SRC/openSUSE:Factory/lua54 (Old)
 and  /work/SRC/openSUSE:Factory/.lua54.new.1548 (New)


Package is "lua54"

Mon Jul  4 13:38:12 2022 rev:19 rq:986624 version:5.4.4

Changes:

--- /work/SRC/openSUSE:Factory/lua54/lua54.changes  2022-06-25 
10:24:26.858689638 +0200
+++ /work/SRC/openSUSE:Factory/.lua54.new.1548/lua54.changes2022-07-04 
13:38:13.968570697 +0200
@@ -6 +6 @@
-  * luabugs4.patch
+  * luabugs4.patch (bsc#1201146, CVE-2022-33099)



Other differences:
--


commit lua54 for openSUSE:Factory

2022-06-25 Thread Source-Sync
Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package lua54 for openSUSE:Factory checked 
in at 2022-06-25 10:24:14

Comparing /work/SRC/openSUSE:Factory/lua54 (Old)
 and  /work/SRC/openSUSE:Factory/.lua54.new.1548 (New)


Package is "lua54"

Sat Jun 25 10:24:14 2022 rev:18 rq:984874 version:5.4.4

Changes:

--- /work/SRC/openSUSE:Factory/lua54/lua54.changes  2022-06-06 
11:10:22.475294776 +0200
+++ /work/SRC/openSUSE:Factory/.lua54.new.1548/lua54.changes2022-06-25 
10:24:26.858689638 +0200
@@ -52 +52 @@
-  interface of luaD_pretailcall.
+  interface of luaD_pretailcall. (bsc#1194575,CVE-2021-44647)
@@ -58 +58 @@
-  bugs 7,8 for build and tests respectively.
+  bugs 7,8 for build and tests respectively. (bsc#1192613,CVE-2021-43519)



Other differences:
--


commit lua54 for openSUSE:Factory

2022-06-06 Thread Source-Sync
Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package lua54 for openSUSE:Factory checked 
in at 2022-06-06 11:10:13

Comparing /work/SRC/openSUSE:Factory/lua54 (Old)
 and  /work/SRC/openSUSE:Factory/.lua54.new.1548 (New)


Package is "lua54"

Mon Jun  6 11:10:13 2022 rev:17 rq:980769 version:5.4.4

Changes:

--- /work/SRC/openSUSE:Factory/lua54/lua54.changes  2022-03-11 
21:39:43.670003846 +0100
+++ /work/SRC/openSUSE:Factory/.lua54.new.1548/lua54.changes2022-06-06 
11:10:22.475294776 +0200
@@ -1,0 +2,8 @@
+Sat Jun  4 13:49:42 UTC 2022 - Callum Farmer 
+
+- Added more numbered patches from upstream:
+  * luabugs3.patch
+  * luabugs4.patch
+  * luabugs5.patch
+
+---

New:

  luabugs3.patch
  luabugs4.patch
  luabugs5.patch



Other differences:
--
++ lua54.spec ++
--- /var/tmp/diff_new_pack.JI151t/_old  2022-06-06 11:10:24.155297208 +0200
+++ /var/tmp/diff_new_pack.JI151t/_new  2022-06-06 11:10:24.159297213 +0200
@@ -46,6 +46,9 @@
 # PATCH-FIX-UPSTREAM luabugsX.patch https://www.lua.org/bugs.html#5.4.4-X
 Patch7: luabugs1.patch
 Patch8: luabugs2.patch
+Patch9: luabugs3.patch
+Patch10:luabugs4.patch
+Patch11:luabugs5.patch
 #
 %if "%{flavor}" == "test"
 BuildRequires:  lua54

++ luabugs3.patch ++
>From c764ca71a639f5585b5f466bea25dc42b855a4b0 Mon Sep 17 00:00:00 2001
From: Roberto Ierusalimschy 
Date: Mon, 25 Apr 2022 14:42:51 -0300
Subject: [PATCH] Bug: Wrong code generation in bitwise operations

---
 lcode.c   | 16 ++--
 ltests.h  |  7 +++
 testes/constructs.lua | 25 +
 3 files changed, 42 insertions(+), 6 deletions(-)

diff --git a/lcode.c b/lcode.c
index 06425a1db..cb724a090 100644
--- a/src/lcode.c
+++ b/src/lcode.c
@@ -1391,7 +1391,10 @@ static void finishbinexpval (FuncState *fs, expdesc *e1, 
expdesc *e2,
 */
 static void codebinexpval (FuncState *fs, OpCode op,
expdesc *e1, expdesc *e2, int line) {
-  int v2 = luaK_exp2anyreg(fs, e2);  /* both operands are in registers */
+  int v2 = luaK_exp2anyreg(fs, e2);  /* make sure 'e2' is in a register */
+  /* 'e1' must be already in a register or it is a constant */
+  lua_assert((VNIL <= e1->k && e1->k <= VKSTR) ||
+ e1->k == VNONRELOC || e1->k == VRELOC);
   lua_assert(OP_ADD <= op && op <= OP_SHR);
   finishbinexpval(fs, e1, e2, op, v2, 0, line, OP_MMBIN,
   cast(TMS, (op - OP_ADD) + TM_ADD));
@@ -1478,7 +1481,7 @@ static void codecommutative (FuncState *fs, BinOpr op,
 
 
 /*
-** Code bitwise operations; they are all associative, so the function
+** Code bitwise operations; they are all commutative, so the function
 ** tries to put an integer constant as the 2nd operand (a K operand).
 */
 static void codebitwise (FuncState *fs, BinOpr opr,
@@ -1486,11 +1489,11 @@ static void codebitwise (FuncState *fs, BinOpr opr,
   int flip = 0;
   int v2;
   OpCode op;
-  if (e1->k == VKINT && luaK_exp2RK(fs, e1)) {
+  if (e1->k == VKINT && luaK_exp2K(fs, e1)) {
 swapexps(e1, e2);  /* 'e2' will be the constant operand */
 flip = 1;
   }
-  else if (!(e2->k == VKINT && luaK_exp2RK(fs, e2))) {  /* no constants? */
+  else if (!(e2->k == VKINT && luaK_exp2K(fs, e2))) {  /* no constants? */
 op = cast(OpCode, opr + OP_ADD);
 codebinexpval(fs, op, e1, e2, line);  /* all-register opcodes */
 return;
@@ -1551,7 +1554,7 @@ static void codeeq (FuncState *fs, BinOpr opr, expdesc 
*e1, expdesc *e2) {
 op = OP_EQI;
 r2 = im;  /* immediate operand */
   }
-  else if (luaK_exp2RK(fs, e2)) {  /* 1st expression is constant? */
+  else if (luaK_exp2RK(fs, e2)) {  /* 2nd expression is constant? */
 op = OP_EQK;
 r2 = e2->u.info;  /* constant index */
   }
@@ -1611,7 +1614,8 @@ void luaK_infix (FuncState *fs, BinOpr op, expdesc *v) {
 case OPR_SHL: case OPR_SHR: {
   if (!tonumeral(v, NULL))
 luaK_exp2anyreg(fs, v);
-  /* else keep numeral, which may be folded with 2nd operand */
+  /* else keep numeral, which may be folded or used as an immediate
+ operand */
   break;
 }
 case OPR_EQ: case OPR_NE: {
diff --git a/ltests.h b/ltests.h
index cb3a0b480..ec520498b 100644
--- a/testes/ltests/ltests.h
+++ b/testes/ltests/ltests.h
@@ -125,6 +125,13 @@ LUA_API void *debug_realloc (void *ud, void *block,
 #define LUAI_USER_ALIGNMENT_T   union { char b[sizeof(void*) * 8]; }
 
 
+/*
+** This one is not compatible with tests for opcode optimizations,
+** as it blocks some optimizations
+#define MAXINDEXRK 0
+*/
+
+
 /* make stack-overflow tests run faster */
 #undef LUAI_MAXSTACK
 

commit lua54 for openSUSE:Factory

2022-03-11 Thread Source-Sync
Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package lua54 for openSUSE:Factory checked 
in at 2022-03-11 21:39:42

Comparing /work/SRC/openSUSE:Factory/lua54 (Old)
 and  /work/SRC/openSUSE:Factory/.lua54.new.25692 (New)


Package is "lua54"

Fri Mar 11 21:39:42 2022 rev:16 rq:960439 version:5.4.4

Changes:

--- /work/SRC/openSUSE:Factory/lua54/lua54.changes  2022-02-05 
23:23:07.683947319 +0100
+++ /work/SRC/openSUSE:Factory/.lua54.new.25692/lua54.changes   2022-03-11 
21:39:43.670003846 +0100
@@ -1,0 +2,16 @@
+Wed Mar  9 10:12:55 UTC 2022 - Callum Farmer 
+
+- Added patches from upstream:
+  * luabugs1.patch
+  * luabugs2.patch
+- Adjust buildsystem so that it matches upstream git (testes??)
+
+---
+Mon Mar  7 10:19:17 UTC 2022 - Bj??rn Lie 
+
+- Drop the lua_docdir define, package docs in the standard
+  location. Instead just silently drop packaging the README with
+  the path that does not makes sense for a rpm package, but for a
+  source tarball install. Simpler solution to boo#1186233.
+
+---

New:

  luabugs1.patch
  luabugs2.patch



Other differences:
--
++ lua54.spec ++
--- /var/tmp/diff_new_pack.CKb5uS/_old  2022-03-11 21:39:44.482004424 +0100
+++ /var/tmp/diff_new_pack.CKb5uS/_new  2022-03-11 21:39:44.486004426 +0100
@@ -24,7 +24,7 @@
 %endif
 %define major_version 5.4
 %define libname liblua5_4-5
-%define lua_docdir %{_datadir}/doc/lua%{major_version}
+
 Name:   lua54%{name_ext}
 Version:5.4.4
 Release:0
@@ -43,6 +43,10 @@
 Patch2: files_test.patch
 Patch3: main_test.patch
 Patch6: shared_link.patch
+# PATCH-FIX-UPSTREAM luabugsX.patch https://www.lua.org/bugs.html#5.4.4-X
+Patch7: luabugs1.patch
+Patch8: luabugs2.patch
+#
 %if "%{flavor}" == "test"
 BuildRequires:  lua54
 %else
@@ -137,16 +141,9 @@
 of C functions, written in ANSI C.
 
 %prep
-%if "%{flavor}" == "test"
-%setup -T -q -b1 -n lua-%{version}-tests
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
-%else
-%setup -q -n lua-%{version}
-%patch0 -p1
-%patch6 -p1
-%endif
+%setup -q -n lua-%{version} -a1
+mv lua-%{version}-tests testes
+%autopatch -p1
 
 # manpage
 %if "%{flavor}" != "test"
@@ -204,13 +201,9 @@
 ln -sf %{_sysconfdir}/alternatives/liblua.so %{buildroot}%{_libdir}/liblua.so
 touch %{buildroot}%{_sysconfdir}/alternatives/lua.pc
 ln -sf %{_sysconfdir}/alternatives/lua.pc 
%{buildroot}%{_libdir}/pkgconfig/lua.pc
-# doc
-mkdir -p %{buildroot}%{lua_docdir}/doc
-install -Dm644 README %{buildroot}%{lua_docdir}
-install -Dm644 doc/* %{buildroot}%{lua_docdir}/doc
-rm %{buildroot}%{lua_docdir}/doc/*.1
 %else
 %check
+cd testes
 LD_LIBRARY_PATH=%{_libdir} %{_bindir}/lua%{major_version} all.lua
 %endif
 
@@ -241,8 +234,6 @@
 fi
 
 %files
-%dir %{lua_docdir}
-%doc %{lua_docdir}/README
 %dir %{_libdir}/lua
 %dir %{_libdir}/lua/%{major_version}
 %dir %{_datadir}/lua
@@ -281,8 +272,7 @@
 %ghost %{_sysconfdir}/alternatives/lua.pc
 
 %files doc
-%dir %{lua_docdir}/doc
-%doc %{lua_docdir}/doc/*
+%doc doc/*
 
 %endif
 %changelog

++ attrib_test.patch ++
--- /var/tmp/diff_new_pack.CKb5uS/_old  2022-03-11 21:39:44.566004484 +0100
+++ /var/tmp/diff_new_pack.CKb5uS/_new  2022-03-11 21:39:44.570004487 +0100
@@ -1,5 +1,5 @@
 a/attrib.lua
-+++ b/attrib.lua
+--- a/testes/attrib.lua
 b/testes/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

++ files_test.patch ++
--- /var/tmp/diff_new_pack.CKb5uS/_old  2022-03-11 21:39:44.594004504 +0100
+++ /var/tmp/diff_new_pack.CKb5uS/_new  2022-03-11 21:39:44.598004507 +0100
@@ -1,7 +1,7 @@
 Index: lua/files.lua
 ===
 lua.orig/files.lua
-+++ lua/files.lua
+--- lua.orig/testes/files.lua
 lua/testes/files.lua
 @@ -81,7 +81,7 @@ assert(io.output() ~= io.stdout)
  
  if not _port then   -- invalid seek

++ luabugs1.patch ++
>From 25b143dd34fb587d1e35290c4b25bc08954800e2 Mon Sep 17 00:00:00 2001
From: Roberto Ierusalimschy 
Date: Mon, 7 Feb 2022 10:16:35 -0300
Subject: [PATCH] Bug: lua.c assumes that argv has at least one element

---
 lua.c | 35 +++
 1 file changed, 23 insertions(+), 12 deletions(-)

diff --git a/lua.c b/lua.c
index 0f1900444..7f7dc2b22 100644
--- a/src/lua.c
+++ b/src/lua.c
@@ -177,10 +177,11 @@ static void print_version (void) {
 ** to the script (everything after 'script') go to positive indices;
 ** other arguments (before the script name) go to negative indices.
 ** If there is no script 

commit lua54 for openSUSE:Factory

2022-02-05 Thread Source-Sync
Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package lua54 for openSUSE:Factory checked 
in at 2022-02-05 23:22:58

Comparing /work/SRC/openSUSE:Factory/lua54 (Old)
 and  /work/SRC/openSUSE:Factory/.lua54.new.1898 (New)


Package is "lua54"

Sat Feb  5 23:22:58 2022 rev:15 rq:949765 version:5.4.4

Changes:

--- /work/SRC/openSUSE:Factory/lua54/lua54.changes  2022-01-03 
10:49:07.819573805 +0100
+++ /work/SRC/openSUSE:Factory/.lua54.new.1898/lua54.changes2022-02-05 
23:23:07.683947319 +0100
@@ -1,0 +2,13 @@
+Wed Jan 26 19:15:13 UTC 2022 - Callum Farmer 
+
+- Ensure shared library is installed with executable bit set
+
+---
+Wed Jan 26 18:35:13 UTC 2022 - Callum Farmer 
+
+- Update to Lua 5.4.4:
+  * fixes all bugs found in Lua 5.4.3
+- Removed upstream-bugs.patch: new release (no bugs found yet)
+- Removed upstream-bugs-test.patch: new release (no bugs found yet)
+
+---

Old:

  lua-5.4.3-tests.tar.gz
  lua-5.4.3.tar.gz
  upstream-bugs-test.patch
  upstream-bugs.patch

New:

  lua-5.4.4-tests.tar.gz
  lua-5.4.4.tar.gz



Other differences:
--
++ lua54.spec ++
--- /var/tmp/diff_new_pack.BcONhA/_old  2022-02-05 23:23:08.371942614 +0100
+++ /var/tmp/diff_new_pack.BcONhA/_new  2022-02-05 23:23:08.375942587 +0100
@@ -26,7 +26,7 @@
 %define libname liblua5_4-5
 %define lua_docdir %{_datadir}/doc/lua%{major_version}
 Name:   lua54%{name_ext}
-Version:5.4.3
+Version:5.4.4
 Release:0
 Summary:Small Embeddable Language with Procedural Syntax
 License:GPL-3.0-or-later
@@ -42,9 +42,6 @@
 Patch1: attrib_test.patch
 Patch2: files_test.patch
 Patch3: main_test.patch
-# PATCH-FIX-UPSTREAM https://www.lua.org/bugs.html#5.4.3
-Patch4: upstream-bugs.patch
-Patch5: upstream-bugs-test.patch
 Patch6: shared_link.patch
 %if "%{flavor}" == "test"
 BuildRequires:  lua54
@@ -145,11 +142,9 @@
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
-%patch5 -p1
 %else
 %setup -q -n lua-%{version}
 %patch0 -p1
-%patch4 -p1
 %patch6 -p1
 %endif
 

++ lua-5.4.3-tests.tar.gz -> lua-5.4.4-tests.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lua-5.4.3-tests/api.lua new/lua-5.4.4-tests/api.lua
--- old/lua-5.4.3-tests/api.lua 2021-03-15 14:32:52.0 +0100
+++ new/lua-5.4.4-tests/api.lua 2022-01-13 12:24:44.0 +0100
@@ -804,15 +804,14 @@
   d = nil
   assert(debug.getmetatable(x).__gc == F)
   assert(load("table.insert({}, {})"))()   -- create more garbage
-  collectgarbage()   -- force a GC during GC
-  assert(debug.getmetatable(x).__gc == F)  -- previous GC did not mess this?
+  assert(not collectgarbage())-- GC during GC (no op)
   local dummy = {}-- create more garbage during GC
   if A ~= nil then
 assert(type(A) == "userdata")
 assert(T.udataval(A) == B)
 debug.getmetatable(A)-- just access it
   end
-  A = x   -- ressucita userdata
+  A = x   -- ressurect userdata
   B = udval
   return 1,2,3
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lua-5.4.3-tests/bitwise.lua 
new/lua-5.4.4-tests/bitwise.lua
--- old/lua-5.4.3-tests/bitwise.lua 2021-03-15 14:32:52.0 +0100
+++ new/lua-5.4.4-tests/bitwise.lua 2022-01-13 12:24:44.0 +0100
@@ -45,6 +45,11 @@
-1 << numbits == 0 and
-1 << -numbits == 0)
 
+assert(1 >> math.mininteger == 0)
+assert(1 >> math.maxinteger == 0)
+assert(1 << math.mininteger == 0)
+assert(1 << math.maxinteger == 0)
+
 assert((2^30 - 1) << 2^30 == 0)
 assert((2^30 - 1) >> 2^30 == 0)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lua-5.4.3-tests/code.lua new/lua-5.4.4-tests/code.lua
--- old/lua-5.4.3-tests/code.lua2021-03-15 14:32:53.0 +0100
+++ new/lua-5.4.4-tests/code.lua2022-01-13 12:24:44.0 +0100
@@ -69,6 +69,20 @@
 checkKlist(foo, {10, 10.0, -10, -10.0})
 
 
+-- floats x integers
+foo = function (t, a)
+  t[a] = 1; t[a] = 1.0
+  t[a] = 1; t[a] = 1.0
+  t[a] = 2; t[a] = 2.0
+  t[a] = 0; t[a] = 0.0
+  t[a] = 1; t[a] = 1.0
+  t[a] = 2; t[a] = 2.0
+  t[a] = 0; t[a] = 0.0
+end
+
+checkKlist(foo, {1, 1.0, 2, 2.0, 0, 0.0})
+
+
 -- testing opcodes
 
 -- check that 'f' opcodes match '...'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lua-5.4.3-tests/coroutine.lua 
new/lua-5.4.4-tests/coroutine.lua
--- old/lua-5.4.3-tests/coroutine.lua   2021-03-15 14:32:53.0 +0100
+++ new/lua-5.4.4

commit lua54 for openSUSE:Factory

2022-01-03 Thread Source-Sync
Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package lua54 for openSUSE:Factory checked 
in at 2022-01-03 10:48:58

Comparing /work/SRC/openSUSE:Factory/lua54 (Old)
 and  /work/SRC/openSUSE:Factory/.lua54.new.1896 (New)


Package is "lua54"

Mon Jan  3 10:48:58 2022 rev:14 rq:943308 version:5.4.3

Changes:

--- /work/SRC/openSUSE:Factory/lua54/lua54.changes  2021-12-02 
22:30:39.490574534 +0100
+++ /work/SRC/openSUSE:Factory/.lua54.new.1896/lua54.changes2022-01-03 
10:49:07.819573805 +0100
@@ -1,0 +2,16 @@
+Thu Dec 30 18:34:01 UTC 2021 - Callum Farmer 
+
+- Re-enable readline support in Lua, the way to do this changed
+  in Lua 5.4
+- Because we are linking with readline add GPLv3+ only to the
+  main package
+- Subsequently, update main_test.patch to ignore another test
+
+---
+Thu Dec 30 13:41:04 UTC 2021 - Callum Farmer 
+
+- Update upstream-bugs.patch and upstream-bugs-test.patch to fix
+  bugs 9,10,12 for build and tests respectively. Bug 11 changes
+  interface of luaD_pretailcall.
+
+---



Other differences:
--
++ lua54.spec ++
--- /var/tmp/diff_new_pack.pqMiSY/_old  2022-01-03 10:49:08.539574081 +0100
+++ /var/tmp/diff_new_pack.pqMiSY/_new  2022-01-03 10:49:08.543574082 +0100
@@ -29,7 +29,7 @@
 Version:5.4.3
 Release:0
 Summary:Small Embeddable Language with Procedural Syntax
-License:MIT
+License:GPL-3.0-or-later
 Group:  Development/Languages/Other
 URL:http://www.lua.org
 Source: http://www.lua.org/ftp/lua-%{version}.tar.gz
@@ -74,6 +74,7 @@
 
 %package devel
 Summary:Development files for lua
+License:MIT
 Group:  Development/Libraries/C and C++
 Requires:   %{libname} = %{version}
 Requires:   %{name} = %{version}
@@ -94,6 +95,7 @@
 
 %package -n %{libname}
 Summary:The Lua integration library
+License:MIT
 Group:  System/Libraries
 # Compat as libtool changes the soname
 %ifarch aarch64 x86_64 ppc64 ppc64le s390x riscv64
@@ -120,6 +122,7 @@
 
 %package doc
 Summary:Documentation for Lua, a small embeddable language
+License:MIT
 Group:  Documentation/HTML
 BuildArch:  noarch
 Supplements:(lua54 and patterns-base-documentation)
@@ -157,17 +160,14 @@
 
 %build
 sed -i -e "s@lib/lua/@%{_lib}/lua/@g" src/luaconf.h
-make %{_smp_mflags} VERBOSE=1 -C src \
+make linux-readline %{_smp_mflags} VERBOSE=1 -C src \
 CC="cc" \
-MYCFLAGS="%{optflags} -std=gnu99 -D_GNU_SOURCE -fPIC -DLUA_USE_LINUX 
-DLUA_COMPAT_MODULE" \
-MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses" \
+MYCFLAGS="%{optflags} -std=gnu99 -D_GNU_SOURCE -fPIC -DLUA_COMPAT_MODULE" \
 V=%{major_version} \
-LIBTOOL="libtool --quiet" \
-all
+LIBTOOL="libtool --quiet"
 
 %install
 %make_install \
-V=%{major_version} \
 LIBTOOL="libtool --quiet" \
 INSTALL_TOP="%{buildroot}%{_prefix}" \
 INSTALL_LIB="%{buildroot}%{_libdir}"

++ main_test.patch ++
--- /var/tmp/diff_new_pack.pqMiSY/_old  2022-01-03 10:49:08.627574115 +0100
+++ /var/tmp/diff_new_pack.pqMiSY/_new  2022-01-03 10:49:08.631574116 +0100
@@ -1,5 +1,14 @@
 --- a/main.lua
 +++ b/main.lua
+@@ -47,7 +47,7 @@
+   assert(string.sub(s, -1) == "\n")
+   local t = getoutput()
+   for line in string.gmatch(s, ".-\n") do
+-assert(string.find(t, line, 1, true))
++-- assert(string.find(t, line, 1, true))
+   end
+ end
+
 @@ -307,11 +307,11 @@
  ]]
  RUN([[lua -e "%s" -i < %s > %s]], prompt, prog, out)

++ upstream-bugs-test.patch ++
--- /var/tmp/diff_new_pack.pqMiSY/_old  2022-01-03 10:49:08.643574120 +0100
+++ /var/tmp/diff_new_pack.pqMiSY/_new  2022-01-03 10:49:08.647574122 +0100
@@ -287,4 +287,85 @@
  -- attempt to resume 'normal' coroutine
  local co1, co2
  co1 = coroutine.create(function () return co2() end)
+diff --git a/testes/api.lua b/testes/api.lua
+index c1bcb4b7b..bd85a923c 100644
+--- a/api.lua
 b/api.lua
+@@ -804,15 +804,14 @@ F = function (x)
+   d = nil
+   assert(debug.getmetatable(x).__gc == F)
+   assert(load("table.insert({}, {})"))()   -- create more garbage
+-  collectgarbage()   -- force a GC during GC
+-  assert(debug.getmetatable(x).__gc == F)  -- previous GC did not mess this?
++  assert(not collectgarbage())-- GC during GC (no op)
+   local dummy = {}-- create more garbage during GC
+   if A ~= nil then
+ assert(type(A) == "userdata")
+ assert(T.udataval(A) == B)
+ debug.getmetatable(A)-- just access it
+   end
+-  A = x   -- ressucita userdata
++  A = x   -- ressurect userdata
+   B = udval
+ 

commit lua54 for openSUSE:Factory

2021-12-02 Thread Source-Sync
Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package lua54 for openSUSE:Factory checked 
in at 2021-12-02 22:30:01

Comparing /work/SRC/openSUSE:Factory/lua54 (Old)
 and  /work/SRC/openSUSE:Factory/.lua54.new.31177 (New)


Package is "lua54"

Thu Dec  2 22:30:01 2021 rev:13 rq:934303 version:5.4.3

Changes:

--- /work/SRC/openSUSE:Factory/lua54/lua54.changes  2021-08-02 
12:04:23.145664763 +0200
+++ /work/SRC/openSUSE:Factory/.lua54.new.31177/lua54.changes   2021-12-02 
22:30:39.490574534 +0100
@@ -1,0 +2,6 @@
+Sat Nov 27 16:54:20 UTC 2021 - Callum Farmer 
+
+- Update upstream-bugs.patch and upstream-bugs-test.patch to fix
+  bugs 7,8 for build and tests respectively.
+
+---



Other differences:
--
++ upstream-bugs-test.patch ++
--- /var/tmp/diff_new_pack.JVzMMr/_old  2021-12-02 22:30:40.266571677 +0100
+++ /var/tmp/diff_new_pack.JVzMMr/_new  2021-12-02 22:30:40.270571662 +0100
@@ -172,3 +172,118 @@
  else if EQ("type") {
lua_pushstring(L1, luaL_typename(L1, getnum));
  }
+diff --git a/testes/cstack.lua b/testes/cstack.lua
+index 213d15d47..ca76c8729 100644
+--- a/cstack.lua
 b/cstack.lua
+@@ -103,6 +103,20 @@ do
+ end
+ 
+ 
++do-- bug in 5.4.2
++  print("nesting coroutines running after recoverable errors")
++  local count = 0
++  local function foo()
++count = count + 1
++pcall(1)   -- create an error
++-- running now inside 'precover' ("protected recover")
++coroutine.wrap(foo)()   -- call another coroutine
++  end
++  checkerror("C stack overflow", foo)
++  print("final count: ", count)
++end
++
++
+ if T then
+   print("testing stack recovery")
+   local N = 0  -- trace number of calls
+diff --git a/testes/coroutine.lua b/testes/coroutine.lua
+index 461e03770..76c9d6e63 100644
+--- a/coroutine.lua
 b/coroutine.lua
+@@ -136,6 +136,10 @@ do
+   assert(coroutine.status(co) == "dead")
+   local st, msg = coroutine.close(co)
+   assert(st and msg == nil)
++  -- also ok to close it again
++  st, msg = coroutine.close(co)
++  assert(st and msg == nil)
++
+ 
+   -- cannot close the running coroutine
+   local st, msg = pcall(coroutine.close, coroutine.running())
+@@ -149,6 +153,22 @@ do
+ assert(not st and string.find(msg, "normal"))
+   end))()
+ 
++  -- cannot close a coroutine while closing it
++  do
++local co
++co = coroutine.create(
++  function()
++local x  = func2close(function()
++coroutine.close(co)   -- try to close it again
++ end)
++coroutine.yield(20)
++  end)
++local st, msg = coroutine.resume(co)
++assert(st and msg == 20)
++st, msg = coroutine.close(co)
++assert(not st and string.find(msg, "running coroutine"))
++  end
++
+   -- to-be-closed variables in coroutines
+   local X
+ 
+@@ -158,6 +178,9 @@ do
+   assert(not st and msg == 100)
+   st, msg = coroutine.close(co)
+   assert(not st and msg == 100)
++  -- after closing, no more errors
++  st, msg = coroutine.close(co)
++  assert(st and msg == nil)
+ 
+   co = coroutine.create(function ()
+ local x  = func2close(function (self, err)
+@@ -189,6 +212,9 @@ do
+   local st, msg = coroutine.close(co)
+   assert(st == false and coroutine.status(co) == "dead" and msg == 200)
+   assert(x == 200)
++  -- after closing, no more errors
++  st, msg = coroutine.close(co)
++  assert(st and msg == nil)
+ end
+ 
+ do
+@@ -419,7 +445,7 @@ do
+ 
+   local X = false
+   A = coroutine.wrap(function()
+-local _  = setmetatable({}, {__close = function () X = true end})
++local _  = func2close(function () X = true end)
+ return pcall(A, 1)
+   end)
+   st, res = A()
+@@ -427,6 +453,22 @@ do
+ end
+ 
+ 
++-- bug in 5.4.1
++do
++  -- coroutine ran close metamethods with invalid status during a
++  -- reset.
++  local co
++  co = coroutine.wrap(function()
++local x  = func2close(function() return pcall(co) end)
++error(111)
++  end)
++  local st, errobj = pcall(co)
++  assert(not st and errobj == 111)
++  st, errobj = pcall(co)
++  assert(not st and string.find(errobj, "dead coroutine"))
++end
++
++
+ -- attempt to resume 'normal' coroutine
+ local co1, co2
+ co1 = coroutine.create(function () return co2() end)

++ upstream-bugs.patch ++
--- /var/tmp/diff_new_pack.JVzMMr/_old  2021-12-02 22:30:40.278571632 +0100
+++ /var/tmp/diff_new_pack.JVzMMr/_new  2021-12-02 22:30:40.282571617 +0100
@@ -218,3 +218,110 @@
if (luaL_callmeta(L, idx, "__tostring")) {  /* metafield? */
  if (!lua_isstring(L, -1))
luaL_error(L, "'__tostring' must return a string");
+From 74d99057a5146755e737c479850f87fd0e3b6868 Mon Sep 17 00:00:00 2001
+From: Roberto Ierusal

commit lua54 for openSUSE:Factory

2021-08-02 Thread Source-Sync
Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package lua54 for openSUSE:Factory checked 
in at 2021-08-02 12:04:16

Comparing /work/SRC/openSUSE:Factory/lua54 (Old)
 and  /work/SRC/openSUSE:Factory/.lua54.new.1899 (New)


Package is "lua54"

Mon Aug  2 12:04:16 2021 rev:12 rq:909226 version:5.4.3

Changes:

--- /work/SRC/openSUSE:Factory/lua54/lua54.changes  2021-06-01 
10:34:07.988473023 +0200
+++ /work/SRC/openSUSE:Factory/.lua54.new.1899/lua54.changes2021-08-02 
12:04:23.145664763 +0200
@@ -1,0 +2,6 @@
+Thu Jul 29 16:31:23 UTC 2021 - Callum Farmer 
+
+- Update upstream-bugs.patch and upstream-bugs-test.patch to fix
+  bugs 4,5,6 for build and tests respectively.
+
+---



Other differences:
--
++ lua54.spec ++
--- /var/tmp/diff_new_pack.KAl3rC/_old  2021-08-02 12:04:24.181664543 +0200
+++ /var/tmp/diff_new_pack.KAl3rC/_new  2021-08-02 12:04:24.185664542 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package lua54
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed

++ upstream-bugs-test.patch ++
--- /var/tmp/diff_new_pack.KAl3rC/_old  2021-08-02 12:04:24.233664531 +0200
+++ /var/tmp/diff_new_pack.KAl3rC/_new  2021-08-02 12:04:24.237664531 +0200
@@ -102,3 +102,73 @@
  do
-- yielding inside closing metamethods after an error
  
+diff --git a/testes/locals.lua b/testes/locals.lua
+index 6151f64d0..62a88df57 100644
+--- a/locals.lua
 b/locals.lua
+@@ -187,6 +187,8 @@ do   -- constants
+   checkro("y", "local x, y , z = 10, 20, 30; x = 11; y = 12")
+   checkro("x", "local x , y, z  = 10, 20, 30; x = 11")
+   checkro("z", "local x , y, z  = 10, 20, 30; y = 10; z = 11")
++  checkro("foo", "local foo  = 10; function foo() end")
++  checkro("foo", "local foo  = {}; function foo() end")
+ 
+   checkro("z", [[
+ local a, z , b = 10;
+diff --git a/testes/bitwise.lua b/testes/bitwise.lua
+index 59781f5df..9509f7f04 100644
+--- a/bitwise.lua
 b/bitwise.lua
+@@ -45,6 +45,11 @@ assert(-1 >> numbits == 0 and
+-1 << numbits == 0 and
+-1 << -numbits == 0)
+ 
++assert(1 >> math.mininteger == 0)
++assert(1 >> math.maxinteger == 0)
++assert(1 << math.mininteger == 0)
++assert(1 << math.maxinteger == 0)
++
+ assert((2^30 - 1) << 2^30 == 0)
+ assert((2^30 - 1) >> 2^30 == 0)
+ 
+diff --git a/testes/errors.lua b/testes/errors.lua
+index 825f37c29..a7dc479a2 100644
+--- a/errors.lua
 b/errors.lua
+@@ -228,6 +228,22 @@ do   -- named objects (field '__name')
+   checkmessage("return {} < XX", "table with My Type")
+   checkmessage("return XX < io.stdin", "My Type with FILE*")
+   _G.XX = nil
++
++  if T then   -- extra tests for 'luaL_tolstring'
++-- bug in 5.4.3; 'luaL_tolstring' with negative indices
++local x = setmetatable({}, {__name="TABLE"})
++assert(T.testC("Ltolstring -1; return 1", x) == tostring(x))
++
++local a, b = T.testC("pushint 10; Ltolstring -2; return 2", x)
++assert(a == 10 and b == tostring(x))
++
++setmetatable(x, {__tostring=function (o)
++  assert(o == x)
++  return "ABC"
++end})
++a, b, c = T.testC("pushint 10; Ltolstring -2; return 3", x)
++assert(a == x and b == 10 and c == "ABC")
++  end
+ end
+ 
+ -- global functions
+diff --git a/ltests.c b/ltests.c
+index a50f78304..97834e380 100644
+--- a/ltests/ltests.c
 b/ltests/ltests.c
+@@ -1743,6 +1743,9 @@ static struct X { int x; } x;
+   (void)s1;  /* to avoid warnings */
+   lua_longassert((s == NULL && s1 == NULL) || strcmp(s, s1) == 0);
+ }
++else if EQ("Ltolstring") {
++  luaL_tolstring(L1, getindex, NULL);
++}
+ else if EQ("type") {
+   lua_pushstring(L1, luaL_typename(L1, getnum));
+ }

++ upstream-bugs.patch ++
--- /var/tmp/diff_new_pack.KAl3rC/_old  2021-08-02 12:04:24.241664530 +0200
+++ /var/tmp/diff_new_pack.KAl3rC/_new  2021-08-02 12:04:24.245664529 +0200
@@ -147,3 +147,74 @@
if (L->top < ci->top)
  L->top = ci->top;
luaF_close(L, base, CLOSEKTOP, 1);
+From 6a0dace25a4b5b77f0fa6911de2ba26ef0fdff2c Mon Sep 17 00:00:00 2001
+From: Roberto Ierusalimschy 
+Date: Sun, 20 Jun 2021 15:36:36 -0300
+Subject: [PATCH] Bug: 'local function' can assign to '' variables
+
+---
+ lparser.c | 1 +
+ testes/locals.lua | 2 ++
+ 2 files changed, 3 insertions(+)
+
+diff --git a/lparser.c b/lparser.c
+index df9473c27..3abe3d751 100644
+--- a/src/lparser.c
 b/src/lparser.c
+@@ -1785,6 +1785,7 @@ static void funcstat (LexState *ls, int line) {
+   luaX_next(ls);  /* skip

commit lua54 for openSUSE:Factory

2021-06-01 Thread Source-Sync
Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package lua54 for openSUSE:Factory checked 
in at 2021-06-01 10:33:50

Comparing /work/SRC/openSUSE:Factory/lua54 (Old)
 and  /work/SRC/openSUSE:Factory/.lua54.new.1898 (New)


Package is "lua54"

Tue Jun  1 10:33:50 2021 rev:11 rq:895306 version:5.4.3

Changes:

--- /work/SRC/openSUSE:Factory/lua54/lua54.changes  2021-05-17 
18:44:50.952742103 +0200
+++ /work/SRC/openSUSE:Factory/.lua54.new.1898/lua54.changes2021-06-01 
10:34:07.988473023 +0200
@@ -1,0 +2,5 @@
+Sat May 22 12:58:16 UTC 2021 - Callum Farmer 
+
+- Fix doc location (boo#1186233)
+
+---



Other differences:
--
++ lua54.spec ++
--- /var/tmp/diff_new_pack.CQMxpN/_old  2021-06-01 10:34:08.688474214 +0200
+++ /var/tmp/diff_new_pack.CQMxpN/_new  2021-06-01 10:34:08.692474222 +0200
@@ -24,6 +24,7 @@
 %endif
 %define major_version 5.4
 %define libname liblua5_4-5
+%define lua_docdir %{_datadir}/doc/lua%{major_version}
 Name:   lua54%{name_ext}
 Version:5.4.3
 Release:0
@@ -121,6 +122,7 @@
 Summary:Documentation for Lua, a small embeddable language
 Group:  Documentation/HTML
 BuildArch:  noarch
+Supplements:(lua54 and patterns-base-documentation)
 
 %description doc
 Lua is a programming language originally designed for extending
@@ -207,6 +209,11 @@
 ln -sf %{_sysconfdir}/alternatives/liblua.so %{buildroot}%{_libdir}/liblua.so
 touch %{buildroot}%{_sysconfdir}/alternatives/lua.pc
 ln -sf %{_sysconfdir}/alternatives/lua.pc 
%{buildroot}%{_libdir}/pkgconfig/lua.pc
+# doc
+mkdir -p %{buildroot}%{lua_docdir}/doc
+install -Dm644 README %{buildroot}%{lua_docdir}
+install -Dm644 doc/* %{buildroot}%{lua_docdir}/doc
+rm %{buildroot}%{lua_docdir}/doc/*.1
 %else
 %check
 LD_LIBRARY_PATH=%{_libdir} %{_bindir}/lua%{major_version} all.lua
@@ -239,7 +246,8 @@
 fi
 
 %files
-%doc README
+%dir %{lua_docdir}
+%doc %{lua_docdir}/README
 %dir %{_libdir}/lua
 %dir %{_libdir}/lua/%{major_version}
 %dir %{_datadir}/lua
@@ -278,7 +286,8 @@
 %ghost %{_sysconfdir}/alternatives/lua.pc
 
 %files doc
-%doc doc/*
+%dir %{lua_docdir}/doc
+%doc %{lua_docdir}/doc/*
 
 %endif
 %changelog


commit lua54 for openSUSE:Factory

2021-05-17 Thread Source-Sync
Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package lua54 for openSUSE:Factory checked 
in at 2021-05-17 18:44:47

Comparing /work/SRC/openSUSE:Factory/lua54 (Old)
 and  /work/SRC/openSUSE:Factory/.lua54.new.2988 (New)


Package is "lua54"

Mon May 17 18:44:47 2021 rev:10 rq:891995 version:5.4.3

Changes:

--- /work/SRC/openSUSE:Factory/lua54/lua54.changes  2021-04-21 
20:58:09.074083384 +0200
+++ /work/SRC/openSUSE:Factory/.lua54.new.2988/lua54.changes2021-05-17 
18:44:50.952742103 +0200
@@ -1,0 +2,6 @@
+Mon May 10 08:54:04 UTC 2021 - Callum Farmer 
+
+- Add shared_link.patch: fix dynamic linking executable
+- Stop building static library
+
+---

New:

  shared_link.patch



Other differences:
--
++ lua54.spec ++
--- /var/tmp/diff_new_pack.zGaUXV/_old  2021-05-17 18:44:51.520739693 +0200
+++ /var/tmp/diff_new_pack.zGaUXV/_new  2021-05-17 18:44:51.524739676 +0200
@@ -44,6 +44,7 @@
 # PATCH-FIX-UPSTREAM https://www.lua.org/bugs.html#5.4.3
 Patch4: upstream-bugs.patch
 Patch5: upstream-bugs-test.patch
+Patch6: shared_link.patch
 %if "%{flavor}" == "test"
 BuildRequires:  lua54
 %else
@@ -144,6 +145,7 @@
 %setup -q -n lua-%{version}
 %patch0 -p1
 %patch4 -p1
+%patch6 -p1
 %endif
 
 # manpage
@@ -152,19 +154,19 @@
 cat doc/luac.1 | sed 's/TH LUAC 1/TH LUAC%{major_version} 1/' > 
doc/luac%{major_version}.1
 
 %build
-%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
 sed -i -e "s@lib/lua/@%{_lib}/lua/@g" src/luaconf.h
-export LIBTOOL="libtool --quiet"
-make -O -j3 V=1 VERBOSE=1 -C src \
+make %{_smp_mflags} VERBOSE=1 -C src \
 CC="cc" \
 MYCFLAGS="%{optflags} -std=gnu99 -D_GNU_SOURCE -fPIC -DLUA_USE_LINUX 
-DLUA_COMPAT_MODULE" \
 MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses" \
 V=%{major_version} \
+LIBTOOL="libtool --quiet" \
 all
 
 %install
 %make_install \
 V=%{major_version} \
+LIBTOOL="libtool --quiet" \
 INSTALL_TOP="%{buildroot}%{_prefix}" \
 INSTALL_LIB="%{buildroot}%{_libdir}"
 
@@ -267,7 +269,6 @@
 %{_includedir}/lua%{major_version}/lua.hpp
 %{_includedir}/lua%{major_version}/luaconf.h
 %{_includedir}/lua%{major_version}/lualib.h
-%{_libdir}/liblua%{major_version}.a
 %{_libdir}/liblua%{major_version}.so
 %{_libdir}/pkgconfig/lua%{major_version}.pc
 # alternatives

++ lua-build-system.patch ++
--- /var/tmp/diff_new_pack.zGaUXV/_old  2021-05-17 18:44:51.576739455 +0200
+++ /var/tmp/diff_new_pack.zGaUXV/_new  2021-05-17 18:44:51.576739455 +0200
@@ -4,15 +4,6 @@
 
 --- a/Makefile
 +++ b/Makefile
-@@ -1,6 +1,8 @@ # 
- # Makefile for installing Lua
- # See doc/readme.html for installation and customization instructions.
-
-+export LIBTOOL=libtool --quiet
-+
- # == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT 
===
-
- # Your platform. See PLATS for possible values.
 @@ -10,19 +12,20 @@
  # so take care if INSTALL_TOP is not an absolute path. See the local target.
  # You may want to make INSTALL_LMOD and INSTALL_CMOD consistent with
@@ -33,7 +24,8 @@
  # How to install. If your install program does not support "-p", then
  # you may have to run ranlib on the installed liblua.a.
  INSTALL= install -p
- INSTALL_EXEC= $(INSTALL) -m 0755
+-INSTALL_EXEC= $(INSTALL) -m 0755
++INSTALL_EXEC= $(LIBTOOL) --mode=install install -m 0755
  INSTALL_DATA= $(INSTALL) -m 0644
 +INSTALL_LIBTOOL= $(LIBTOOL) --mode=install install -m 0644
  #
@@ -62,10 +54,10 @@
 
  install: dummy
cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) 
$(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD)
++  cd src && $(INSTALL_LIBTOOL) $(TO_LIB) $(INSTALL_LIB)
cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN)
cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC)
 -  cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB)
-+  cd src && $(INSTALL_LIBTOOL) $(TO_LIB) $(INSTALL_LIB)
cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN)
 
  uninstall:
@@ -132,15 +124,15 @@
  $(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 $(LUA_A)
++  $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -lm -ldl 
$(BASE_O:.o=.lo) -shared -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 
$(LUA_A) -Wl,-E lua.lo -o $@
++  $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) $(LIBS) $(LUA_A) 
-Wl,-E lua.lo -o $@
 
  $(LUAC_T): $(LUAC_O) $(LUA_A)
 -  $(CC) -o

commit lua54 for openSUSE:Factory

2021-04-21 Thread Source-Sync
Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package lua54 for openSUSE:Factory checked 
in at 2021-04-21 20:58:07

Comparing /work/SRC/openSUSE:Factory/lua54 (Old)
 and  /work/SRC/openSUSE:Factory/.lua54.new.12324 (New)


Package is "lua54"

Wed Apr 21 20:58:07 2021 rev:9 rq:886619 version:5.4.3

Changes:

--- /work/SRC/openSUSE:Factory/lua54/lua54.changes  2021-03-15 
10:53:32.125092064 +0100
+++ /work/SRC/openSUSE:Factory/.lua54.new.12324/lua54.changes   2021-04-21 
20:58:09.074083384 +0200
@@ -1,0 +2,14 @@
+Mon Apr 19 09:15:40 UTC 2021 - Callum Farmer 
+
+- Add upstream-bugs.patch and upstream-bugs-test.patch to fix
+  bugs 1,2,3 for build and tests respectively.
+
+---
+Mon Mar 29 17:04:47 UTC 2021 - Callum Farmer 
+
+- Update to version 5.4.3:
+  * Fixes bugs found in Lua 5.4.2
+- Removed upstream-bugs.patch: new release (no bugs found yet)
+- Removed upstream-bugs-test.patch: new release (no bugs found yet)
+
+---

Old:

  lua-5.4.2-tests.tar.gz
  lua-5.4.2.tar.gz

New:

  lua-5.4.3-tests.tar.gz
  lua-5.4.3.tar.gz



Other differences:
--
++ lua54.spec ++
--- /var/tmp/diff_new_pack.vvGCJZ/_old  2021-04-21 20:58:09.894084676 +0200
+++ /var/tmp/diff_new_pack.vvGCJZ/_new  2021-04-21 20:58:09.898084682 +0200
@@ -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,7 +41,7 @@
 Patch1: attrib_test.patch
 Patch2: files_test.patch
 Patch3: main_test.patch
-# PATCH-FIX-UPSTREAM https://www.lua.org/bugs.html#5.4.2
+# PATCH-FIX-UPSTREAM https://www.lua.org/bugs.html#5.4.3
 Patch4: upstream-bugs.patch
 Patch5: upstream-bugs-test.patch
 %if "%{flavor}" == "test"

++ files_test.patch ++
--- /var/tmp/diff_new_pack.vvGCJZ/_old  2021-04-21 20:58:09.966084790 +0200
+++ /var/tmp/diff_new_pack.vvGCJZ/_new  2021-04-21 20:58:09.966084790 +0200
@@ -11,7 +11,7 @@
  end
  
  assert(io.output():seek() == 0)
-@@ -729,7 +729,7 @@ if not _port then
+@@ -744,7 +744,7 @@ if not _port then
  {"exit 129", "exit", 129},
  {"kill -s HUP $$", "signal", 1},
  {"kill -s KILL $$", "signal", 9},
@@ -20,7 +20,7 @@
  {progname .. ' -e " "', "ok"},
  {progname .. ' -e "os.exit(0, true)"', "ok"},
  {progname .. ' -e "os.exit(20, true)"', "exit", 20},
-@@ -742,6 +742,9 @@ if not _port then
+@@ -757,6 +757,9 @@ if not _port then
  if v[2] == "ok" then
assert(x and y == 'exit' and z == 0)
  else
@@ -30,7 +30,7 @@
assert(not x and y == v[2])   -- correct status and 'what'
-- correct code if known (but always different from 0)
assert((v[3] == nil and z > 0) or v[3] == z)
-@@ -776,6 +779,7 @@ assert(os.date(string.rep("%d", 1000), t
+@@ -791,6 +791,7 @@ assert(os.date(string.rep("%d", 1000), t
  assert(os.date(string.rep("%", 200)) == string.rep("%", 100))
  
  local function checkDateTable (t)
@@ -38,7 +38,7 @@
_G.D = os.date("*t", t)
assert(os.time(D) == t)
load(os.date([[assert(D.year==%Y and D.month==%m and D.day==%d and
-@@ -791,7 +795,9 @@ if not _port then
+@@ -806,7 +806,9 @@ if not _port then
checkDateTable(1)
checkDateTable(1000)
checkDateTable(0x7fff)

++ lua-5.4.2-tests.tar.gz -> lua-5.4.3-tests.tar.gz ++
 1602 lines of diff (skipped)

++ lua-5.4.2-tests.tar.gz -> lua-5.4.3.tar.gz ++
 61270 lines of diff (skipped)

++ lua-build-system.patch ++
--- /var/tmp/diff_new_pack.vvGCJZ/_old  2021-04-21 20:58:10.198085155 +0200
+++ /var/tmp/diff_new_pack.vvGCJZ/_new  2021-04-21 20:58:10.202085161 +0200
@@ -132,23 +132,23 @@
  $(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 $@
++  $

commit lua54 for openSUSE:Factory

2021-03-15 Thread Source-Sync
Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package lua54 for openSUSE:Factory checked 
in at 2021-03-15 10:53:30

Comparing /work/SRC/openSUSE:Factory/lua54 (Old)
 and  /work/SRC/openSUSE:Factory/.lua54.new.2401 (New)


Package is "lua54"

Mon Mar 15 10:53:30 2021 rev:8 rq:878379 version:5.4.2

Changes:

--- /work/SRC/openSUSE:Factory/lua54/lua54.changes  2021-02-04 
20:24:14.726841907 +0100
+++ /work/SRC/openSUSE:Factory/.lua54.new.2401/lua54.changes2021-03-15 
10:53:32.125092064 +0100
@@ -1,0 +2,6 @@
+Thu Mar 11 17:10:14 UTC 2021 - Callum Farmer 
+
+- Add upstream-bugs.patch and upstream-bugs-test.patch to fix
+  bugs 2,3,4 for build and tests respectively. 
+
+---

New:

  upstream-bugs-test.patch
  upstream-bugs.patch



Other differences:
--
++ lua54.spec ++
--- /var/tmp/diff_new_pack.EMrIEj/_old  2021-03-15 10:53:33.085093538 +0100
+++ /var/tmp/diff_new_pack.EMrIEj/_new  2021-03-15 10:53:33.089093544 +0100
@@ -42,7 +42,8 @@
 Patch2: files_test.patch
 Patch3: main_test.patch
 # PATCH-FIX-UPSTREAM https://www.lua.org/bugs.html#5.4.2
-#Patch4: upstream-bugs.patch
+Patch4: upstream-bugs.patch
+Patch5: upstream-bugs-test.patch
 %if "%{flavor}" == "test"
 BuildRequires:  lua54
 %else
@@ -138,9 +139,11 @@
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch5 -p1
 %else
 %setup -q -n lua-%{version}
 %patch0 -p1
+%patch4 -p1
 %endif
 
 # manpage

++ upstream-bugs-test.patch ++
--- 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")
++ upstream-bugs.patch ++
--- 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-

commit lua54 for openSUSE:Factory

2021-02-04 Thread Source-Sync
Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package lua54 for openSUSE:Factory checked 
in at 2021-02-04 20:23:33

Comparing /work/SRC/openSUSE:Factory/lua54 (Old)
 and  /work/SRC/openSUSE:Factory/.lua54.new.28504 (New)


Package is "lua54"

Thu Feb  4 20:23:33 2021 rev:7 rq:865991 version:5.4.2

Changes:

--- /work/SRC/openSUSE:Factory/lua54/lua54.changes  2020-12-08 
13:25:19.526662244 +0100
+++ /work/SRC/openSUSE:Factory/.lua54.new.28504/lua54.changes   2021-02-04 
20:24:14.726841907 +0100
@@ -1,0 +2,5 @@
+Fri Jan 22 12:38:04 UTC 2021 - Callum Farmer 
+
+- Move tests to separate build
+
+---

New:

  _multibuild



Other differences:
--
++ lua54.spec ++
--- /var/tmp/diff_new_pack.QX8YMf/_old  2021-02-04 20:24:15.430842978 +0100
+++ /var/tmp/diff_new_pack.QX8YMf/_new  2021-02-04 20:24:15.434842984 +0100
@@ -15,10 +15,16 @@
 # Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
-
+%global flavor @BUILD_FLAVOR@%{nil}
+%if "%{flavor}" == "test"
+%define name_ext -test
+%define debug_package %{nil}
+%else
+%define name_ext %{nil}
+%endif
 %define major_version 5.4
 %define libname liblua5_4-5
-Name:   lua54
+Name:   lua54%{name_ext}
 Version:5.4.2
 Release:0
 Summary:Small Embeddable Language with Procedural Syntax
@@ -37,10 +43,14 @@
 Patch3: main_test.patch
 # PATCH-FIX-UPSTREAM https://www.lua.org/bugs.html#5.4.2
 #Patch4: upstream-bugs.patch
+%if "%{flavor}" == "test"
+BuildRequires:  lua54
+%else
 BuildRequires:  libtool
 BuildRequires:  lua-macros
 BuildRequires:  pkgconfig
 BuildRequires:  readline-devel
+%endif
 Requires(post): update-alternatives
 Requires(postun): update-alternatives
 Provides:   lua = %{version}
@@ -123,11 +133,18 @@
 of C functions, written in ANSI C.
 
 %prep
-%setup -q -n lua-%{version} -a1
-mv lua-%{version}-tests lua-tests
-%autopatch -p1
+%if "%{flavor}" == "test"
+%setup -T -q -b1 -n lua-%{version}-tests
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%else
+%setup -q -n lua-%{version}
+%patch0 -p1
+%endif
 
 # manpage
+%if "%{flavor}" != "test"
 cat doc/lua.1  | sed 's/TH LUA 1/TH LUA%{major_version} 1/' > 
doc/lua%{major_version}.1
 cat doc/luac.1 | sed 's/TH LUAC 1/TH LUAC%{major_version} 1/' > 
doc/luac%{major_version}.1
 
@@ -185,11 +202,12 @@
 ln -sf %{_sysconfdir}/alternatives/liblua.so %{buildroot}%{_libdir}/liblua.so
 touch %{buildroot}%{_sysconfdir}/alternatives/lua.pc
 ln -sf %{_sysconfdir}/alternatives/lua.pc 
%{buildroot}%{_libdir}/pkgconfig/lua.pc
-
+%else
 %check
-cd ./lua-tests/
-LD_LIBRARY_PATH=%{buildroot}%{_libdir} 
%{buildroot}%{_bindir}/lua%{major_version} all.lua
+LD_LIBRARY_PATH=%{_libdir} %{_bindir}/lua%{major_version} all.lua
+%endif
 
+%if "%{flavor}" != "test"
 %post -n %{libname} -p /sbin/ldconfig
 %postun -n %{libname} -p /sbin/ldconfig
 
@@ -258,4 +276,5 @@
 %files doc
 %doc doc/*
 
+%endif
 %changelog

++ _multibuild ++

  test

++ attrib_test.patch ++
--- /var/tmp/diff_new_pack.QX8YMf/_old  2021-02-04 20:24:15.474843045 +0100
+++ /var/tmp/diff_new_pack.QX8YMf/_new  2021-02-04 20:24:15.474843045 +0100
@@ -1,5 +1,5 @@
 a/lua-tests/attrib.lua
-+++ b/lua-tests/attrib.lua
+--- a/attrib.lua
 b/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

++ files_test.patch ++
--- /var/tmp/diff_new_pack.QX8YMf/_old  2021-02-04 20:24:15.494843075 +0100
+++ /var/tmp/diff_new_pack.QX8YMf/_new  2021-02-04 20:24:15.498843082 +0100
@@ -1,7 +1,7 @@
-Index: lua/lua-tests/files.lua
+Index: lua/files.lua
 ===
 lua.orig/lua-tests/files.lua
-+++ lua/lua-tests/files.lua
+--- lua.orig/files.lua
 lua/files.lua
 @@ -81,7 +81,7 @@ assert(io.output() ~= io.stdout)
  
  if not _port then   -- invalid seek

++ main_test.patch ++
--- /var/tmp/diff_new_pack.QX8YMf/_old  2021-02-04 20:24:15.514843106 +0100
+++ /var/tmp/diff_new_pack.QX8YMf/_new  2021-02-04 20:24:15.514843106 +0100
@@ -1,5 +1,5 @@
 a/lua-tests/main.lua
-+++ b/lua-tests/main.lua
+--- a/main.lua
 b/main.lua
 @@ -307,11 +307,11 @@
  ]]
  RUN([[lua -e "%s" -i < %s > %s]], prompt, prog, out)


commit lua54 for openSUSE:Factory

2020-12-08 Thread User for buildservice source handling
Hello community,

here is the log from the commit of package lua54 for openSUSE:Factory checked 
in at 2020-12-08 13:23:40

Comparing /work/SRC/openSUSE:Factory/lua54 (Old)
 and  /work/SRC/openSUSE:Factory/.lua54.new.5913 (New)


Package is "lua54"

Tue Dec  8 13:23:40 2020 rev:6 rq:853274 version:5.4.2

Changes:

--- /work/SRC/openSUSE:Factory/lua54/lua54.changes  2020-10-12 
13:46:52.197910487 +0200
+++ /work/SRC/openSUSE:Factory/.lua54.new.5913/lua54.changes2020-12-08 
13:25:19.526662244 +0100
@@ -1,0 +2,7 @@
+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
+
+---

Old:

  lua-5.4.1-tests.tar.gz
  lua-5.4.1.tar.gz

New:

  lua-5.4.2-tests.tar.gz
  lua-5.4.2.tar.gz
  main_test.patch



Other differences:
--
++ lua54.spec ++
--- /var/tmp/diff_new_pack.IEJY3j/_old  2020-12-08 13:25:20.298664446 +0100
+++ /var/tmp/diff_new_pack.IEJY3j/_new  2020-12-08 13:25:20.302664458 +0100
@@ -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 @@
 # 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 @@
 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 @@
 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

++ attrib_test.patch ++
--- /var/tmp/diff_new_pack.IEJY3j/_old  2020-12-08 13:25:20.330664538 +0100
+++ /var/tmp/diff_new_pack.IEJY3j/_new  2020-12-08 13:25:20.334664549 +0100
@@ -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

++ files_test.patch ++
--- /var/tmp/diff_new_pack.IEJY3j/_old  2020-12-08 13:25:20.354664606 +0100
+++ /var/tmp/diff_new_pack.IEJY3j/_new  2020-12-08 13:25:20.354664606 +0100
@@ -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

++ lua-5.4.1-tests.tar.gz -> lua-5.4.2-tests.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lua-5.4.1-tests/all.lua new/lua-5.4.2-tests/all.lua
--- old/lua-5.4.1-tests/all.lua 2020-09-30 11:36:52.0 +0200
+++ new/lua-5.4.2-tests/all.lua 2020-11-13 16:32:02.0 +0100
@@ -127,8 +127,8 @@
   end
 
   Cstacklevel = function ()
-local _, _, ncalls, nci = T.stacklevel()
-return ncalls  + nci   -- number of free slots in the C stack
+local _, _, ncalls = T.stacklevel()
+return ncalls-- number of C calls
   end
 end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lua-5.4.1-tests/closure.lua 
new/lua-5.4.2-tests/closure.lua
--- old/lua-5.4.1-tests/closure.lua 2020-09-30 11:36:53.0 +0200
+++ new/lua-5.4.2-tests/closure.lua 2020-11-13 16:32:03.0 +0100
@@ -242,7 +242,7 @@
 
 assert(debug.upvalueid(foo1, 1))
 assert(debug.upvalueid(foo1, 2))
-assert(not pcall(debug.upvalueid, foo1, 3))
+assert(not debug.upvalueid(foo1, 3))
 assert(debug.upvalueid(foo1, 1) == debug.upvalueid(foo2, 2))
 assert(debug.upvalueid(foo1, 2) == debug.upvalueid(foo2, 1))
 assert(debug.upvalueid(foo3, 1))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lua-5.4.1-tests/code.lua new/lua