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 <gm...@opensuse.org>
+
+- 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 <bjorn....@gmail.com>
+
+- 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 <robe...@inf.puc-rio.br>
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 name, assume interpreter's name as base.
+** (If there is no interpreter's name either, 'script' is -1, so
+** table sizes are zero.)
 */
 static void createargtable (lua_State *L, char **argv, int argc, int script) {
   int i, narg;
-  if (script == argc) script = 0;  /* no script name? */
   narg = argc - (script + 1);  /* number of positive indices */
   lua_createtable(L, narg, script + 1);
   for (i = 0; i < argc; i++) {
@@ -268,14 +269,23 @@ static int handle_script (lua_State *L, char **argv) {
 
 /*
 ** Traverses all arguments from 'argv', returning a mask with those
-** needed before running any Lua code (or an error code if it finds
-** any invalid argument). 'first' returns the first not-handled argument
-** (either the script name or a bad argument in case of error).
+** needed before running any Lua code or an error code if it finds any
+** invalid argument. In case of error, 'first' is the index of the bad
+** argument.  Otherwise, 'first' is -1 if there is no program name,
+** 0 if there is no script name, or the index of the script name.
 */
 static int collectargs (char **argv, int *first) {
   int args = 0;
   int i;
-  for (i = 1; argv[i] != NULL; i++) {
+  if (argv[0] != NULL) {  /* is there a program name? */
+    if (argv[0][0])  /* not empty? */
+      progname = argv[0];  /* save it */
+  }
+  else {  /* no program name */
+    *first = -1;
+    return 0;
+  }
+  for (i = 1; argv[i] != NULL; i++) {  /* handle arguments */
     *first = i;
     if (argv[i][0] != '-')  /* not an option? */
         return args;  /* stop handling options */
@@ -316,7 +326,7 @@ static int collectargs (char **argv, int *first) {
         return has_error;
     }
   }
-  *first = i;  /* no script name */
+  *first = 0;  /* no script name */
   return args;
 }
 
@@ -609,8 +619,8 @@ static int pmain (lua_State *L) {
   char **argv = (char **)lua_touserdata(L, 2);
   int script;
   int args = collectargs(argv, &script);
+  int optlim = (script > 0) ? script : argc; /* first argv not an option */
   luaL_checkversion(L);  /* check that interpreter has correct version */
-  if (argv[0] && argv[0][0]) progname = argv[0];
   if (args == has_error) {  /* bad arg? */
     print_usage(argv[script]);  /* 'script' has index of bad arg. */
     return 0;
@@ -628,14 +638,15 @@ static int pmain (lua_State *L) {
     if (handle_luainit(L) != LUA_OK)  /* run LUA_INIT */
       return 0;  /* error running LUA_INIT */
   }
-  if (!runargs(L, argv, script))  /* execute arguments -e and -l */
+  if (!runargs(L, argv, optlim))  /* execute arguments -e and -l */
     return 0;  /* something failed */
-  if (script < argc &&  /* execute main script (if there is one) */
-      handle_script(L, argv + script) != LUA_OK)
-    return 0;
+  if (script > 0) {  /* execute main script (if there is one) */
+    if (handle_script(L, argv + script) != LUA_OK)
+      return 0;  /* interrupt in case of error */
+  }
   if (args & has_i)  /* -i option? */
     doREPL(L);  /* do read-eval-print loop */
-  else if (script == argc && !(args & (has_e | has_v))) {  /* no arguments? */
+  else if (script < 1 && !(args & (has_e | has_v))) { /* no active option? */
     if (lua_stdin_is_tty()) {  /* running in interactive mode? */
       print_version();
       doREPL(L);  /* do read-eval-print loop */

++++++ luabugs2.patch ++++++
>From 1f3c6f4534c6411313361697d98d1145a1f030fa Mon Sep 17 00:00:00 2001
From: Roberto Ierusalimschy <robe...@inf.puc-rio.br>
Date: Tue, 15 Feb 2022 12:28:46 -0300
Subject: [PATCH] Bug: Lua can generate wrong code when _ENV is <const>

---
 lparser.c         |  1 +
 testes/attrib.lua | 10 ++++++++++
 2 files changed, 11 insertions(+)

diff --git a/lparser.c b/lparser.c
index 3abe3d751..a5cd55257 100644
--- a/src/lparser.c
+++ b/src/lparser.c
@@ -468,6 +468,7 @@ static void singlevar (LexState *ls, expdesc *var) {
     expdesc key;
     singlevaraux(fs, ls->envn, var, 1);  /* get environment variable */
     lua_assert(var->k != VVOID);  /* this one must exist */
+    luaK_exp2anyregup(fs, var);  /* but could be a constant */
     codestring(&key, varname);  /* key is variable name */
     luaK_indexed(fs, var, &key);  /* env[varname] */
   }
diff --git a/testes/attrib.lua b/testes/attrib.lua
index b1076c768..83821c069 100644
--- a/testes/attrib.lua
+++ b/testes/attrib.lua
@@ -434,6 +434,16 @@ 
a.aVeryLongName012345678901234567890123456789012345678901234567890123456789 ==
 10)
 
 
+do
+  -- _ENV constant
+  local function foo ()
+    local _ENV <const> = 11
+    X = "hi"
+  end
+  local st, msg = pcall(foo)
+  assert(not st and string.find(msg, "number"))
+end
+
 
 -- test of large float/integer indices 
 

++++++ main_test.patch ++++++
--- /var/tmp/diff_new_pack.CKb5uS/_old  2022-03-11 21:39:44.638004535 +0100
+++ /var/tmp/diff_new_pack.CKb5uS/_new  2022-03-11 21:39:44.642004538 +0100
@@ -1,5 +1,5 @@
---- a/main.lua
-+++ b/main.lua
+--- a/testes/main.lua
++++ b/testes/main.lua
 @@ -47,7 +47,7 @@
    assert(string.sub(s, -1) == "\n")
    local t = getoutput()

Reply via email to