Sync from SUSE:ALP:Source:Standard:1.0 lua54 revision 0d2683c92a163ae679d1fe8f728975d8

This commit is contained in:
Adrian Schröter 2023-11-24 16:10:42 +01:00
commit 7d16250423
13 changed files with 1398 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

3
_multibuild Normal file
View File

@ -0,0 +1,3 @@
<multibuild>
<package>test</package>
</multibuild>

15
attrib_test.patch Normal file
View File

@ -0,0 +1,15 @@
---
testes/attrib.lua | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- 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
local f, err, when = package.loadlib("donotexist", p.."xuxu")
- assert(not f and type(err) == "string" and when == "absent")
+ assert(not f and type(err) == "string" and when == "open")
;(Message or print)('\n >>> cannot load dynamic library <<<\n')
print(err, when)
else

1
baselibs.conf Normal file
View File

@ -0,0 +1 @@
liblua5_4-5

53
files_test.patch Normal file
View File

@ -0,0 +1,53 @@
---
testes/files.lua | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
--- a/testes/files.lua
+++ b/testes/files.lua
@@ -81,7 +81,7 @@ assert(io.output() ~= io.stdout)
if not _port then -- invalid seek
local status, msg, code = io.stdin:seek("set", 1000)
- assert(not status and type(msg) == "string" and type(code) == "number")
+ -- assert(not status and type(msg) == "string" and type(code) == "number")
end
assert(io.output():seek() == 0)
@@ -746,7 +746,7 @@ if not _port then
{"exit 129", "exit", 129},
{"kill -s HUP $$", "signal", 1},
{"kill -s KILL $$", "signal", 9},
- {"sh -c 'kill -s HUP $$'", "exit"},
+ -- {"sh -c 'kill -s HUP $$'", "exit"},
{progname .. ' -e " "', "ok"},
{progname .. ' -e "os.exit(0, true)"', "ok"},
{progname .. ' -e "os.exit(20, true)"', "exit", 20},
@@ -759,6 +759,9 @@ if not _port then
if v[2] == "ok" then
assert(x and y == 'exit' and z == 0)
else
+ print('y = ' .. y)
+ print('v[1] = ' .. v[1])
+ print('v[2] = ' .. v[2])
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)
@@ -793,6 +796,7 @@ assert(os.date(string.rep("%d", 1000), t
assert(os.date(string.rep("%", 200)) == string.rep("%", 100))
local function checkDateTable (t)
+ print('t = ' .. t)
_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
@@ -808,7 +812,9 @@ if not _port then
checkDateTable(1)
checkDateTable(1000)
checkDateTable(0x7fffffff)
- checkDateTable(0x80000000)
+ if not testerr("out-of-bound", os.date, "*t", 0x80000000) then
+ checkDateTable(0x80000000)
+ end
end
checkerr("invalid conversion specifier", os.date, "%")

BIN
lua-5.4.6-tests.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

BIN
lua-5.4.6.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

175
lua-build-system.patch Normal file
View File

@ -0,0 +1,175 @@
From: Enrico Tassi <gareuselesinge@debian.org>, Sergei Golovan <sgolovan@debian.org>
Date: Wed, 06 May 2020 10:31:53 +0300
Subject: build system
---
Makefile | 22 +++++++++++-----------
src/Makefile | 43 +++++++++++++++++++++++++------------------
src/luaconf.h | 2 +-
3 files changed, 37 insertions(+), 30 deletions(-)
--- a/Makefile
+++ b/Makefile
@@ -10,18 +10,18 @@ PLAT= guess
# 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
# LUA_ROOT, LUA_LDIR, and LUA_CDIR in luaconf.h.
-INSTALL_TOP= /usr/local
+INSTALL_TOP= /usr
INSTALL_BIN= $(INSTALL_TOP)/bin
-INSTALL_INC= $(INSTALL_TOP)/include
-INSTALL_LIB= $(INSTALL_TOP)/lib
-INSTALL_MAN= $(INSTALL_TOP)/man/man1
+INSTALL_INC= $(INSTALL_TOP)/include/lua$(V)/
+INSTALL_LIB= $(INSTALL_TOP)/lib/
+INSTALL_MAN= $(INSTALL_TOP)/share/man/man1
INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$V
-INSTALL_CMOD= $(INSTALL_TOP)/lib/lua/$V
+INSTALL_CMOD= $(INSTALL_LIB)/lua/$V
# 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= $(LIBTOOL) --mode=install install -m 0755
INSTALL_DATA= $(INSTALL) -m 0644
#
# If you don't have "install" you can use "cp" instead.
@@ -39,10 +39,10 @@ RM= rm -f
PLATS= guess aix bsd c89 freebsd generic ios linux linux-readline macosx mingw posix solaris
# What to install.
-TO_BIN= lua luac
+TO_BIN= lua$(V) luac$(V)
TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp
-TO_LIB= liblua.a
-TO_MAN= lua.1 luac.1
+TO_LIB= liblua$(V).la
+TO_MAN= lua$(V).1 luac$(V).1
# Lua version and release.
V= 5.4
@@ -52,13 +52,13 @@ R= $V.6
all: $(PLAT)
$(PLATS) help test clean:
- @cd src && $(MAKE) $@
+ @cd src && $(MAKE) $@ V=$(V)
install: dummy
cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD)
+ cd src && $(INSTALL_EXEC) $(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 doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN)
uninstall:
--- a/src/Makefile
+++ b/src/Makefile
@@ -7,7 +7,7 @@
PLAT= guess
CC= gcc -std=gnu99
-CFLAGS= -O2 -Wall -Wextra -DLUA_COMPAT_5_3 $(SYSCFLAGS) $(MYCFLAGS)
+CFLAGS= -Wall -Wextra -DLUA_COMPAT_5_3 $(SYSCFLAGS) $(MYCFLAGS)
LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS)
LIBS= -lm $(SYSLIBS) $(MYLIBS)
@@ -19,28 +19,44 @@ UNAME= uname
SYSCFLAGS=
SYSLDFLAGS=
SYSLIBS=
+LIBDIR=/usr/lib
MYCFLAGS=
MYLDFLAGS=
-MYLIBS=
+MYLIBS=-ldl
MYOBJS=
# Special flags for compiler modules; -Os reduces code size.
CMCFLAGS=
+%.o : %.c
+ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(CFLAGS) -c $< -o $@
+
+# Build the compiler code with -Os to make the binaries as small as possible
+# (see https://github.com/lua/lua/commit/6a10f03ff81606e567c6891a90d70066a03c686e)
+
+llex.o: llex.c
+ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(CFLAGS) -Os -c $< -o $@
+
+lparser.o: lparser.c
+ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(CFLAGS) -Os -c $< -o $@
+
+lcode.o: lcode.c
+ $(LIBTOOL) --mode=compile --tag=CC $(CC) $(CFLAGS) -Os -c $< -o $@
+
# == END OF USER SETTINGS -- NO NEED TO CHANGE ANYTHING BELOW THIS LINE =======
PLATS= guess aix bsd c89 freebsd generic ios linux linux-readline macosx mingw posix solaris
-LUA_A= liblua.a
+LUA_A= liblua$(V).la
CORE_O= lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o lundump.o lvm.o lzio.o
LIB_O= lauxlib.o lbaselib.o lcorolib.o ldblib.o liolib.o lmathlib.o loadlib.o loslib.o lstrlib.o ltablib.o lutf8lib.o linit.o
BASE_O= $(CORE_O) $(LIB_O) $(MYOBJS)
-LUA_T= lua
+LUA_T= lua$(V)
LUA_O= lua.o
-LUAC_T= luac
+LUAC_T= luac$(V)
LUAC_O= luac.o
ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O)
@@ -57,17 +73,16 @@ o: $(ALL_O)
a: $(ALL_A)
$(LUA_A): $(BASE_O)
- $(AR) $@ $(BASE_O)
- $(RANLIB) $@
+ $(LIBTOOL) --mode=link --tag=CC $(CC) $(LDFLAGS) -lm -ldl $(BASE_O:.o=.lo) -shared -rpath $(LIBDIR) -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) $(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) $(LUA_A) luac.lo -o $@
test:
- ./$(LUA_T) -v
+ $(LIBTOOL) --mode=execute -dlopen ./$(LUA_A) ./$(LUA_T) -v
clean:
$(RM) $(ALL_T) $(ALL_O)
@@ -147,14 +162,6 @@ SunOS solaris:
.PHONY: all $(PLATS) help test clean default o a depend echo
# Compiler modules may use special flags.
-llex.o:
- $(CC) $(CFLAGS) $(CMCFLAGS) -c llex.c
-
-lparser.o:
- $(CC) $(CFLAGS) $(CMCFLAGS) -c lparser.c
-
-lcode.o:
- $(CC) $(CFLAGS) $(CMCFLAGS) -c lcode.c
# DO NOT DELETE
--- a/src/luaconf.h
+++ b/src/luaconf.h
@@ -223,7 +223,7 @@
#else /* }{ */
-#define LUA_ROOT "/usr/local/"
+#define LUA_ROOT "/usr/"
#define LUA_LDIR LUA_ROOT "share/lua/" LUA_VDIR "/"
#define LUA_CDIR LUA_ROOT "lib/lua/" LUA_VDIR "/"

741
lua54.changes Normal file
View File

@ -0,0 +1,741 @@
-------------------------------------------------------------------
Tue Nov 14 15:10:19 UTC 2023 - Matej Cepl <mcepl@suse.com>
- Add skip-tests_big-endian.patch to skip little-endian-only
tests (bsc#1216930).
-------------------------------------------------------------------
Mon May 29 16:23:16 UTC 2023 - Callum Farmer <gmbr3@opensuse.org>
- Library is always liblua5_4-5: due to SOVERSION leading digit
being 5
-------------------------------------------------------------------
Mon May 22 09:39:52 UTC 2023 - Matej Cepl <mcepl@suse.com>
- Final release of 5.4.6. No change in the changelog.
-------------------------------------------------------------------
Tue May 9 12:43:31 UTC 2023 - Matej Cepl <mcepl@suse.com>
- 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 <mcepl@suse.com>
- 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
-------------------------------------------------------------------
Tue Apr 4 11:58:56 UTC 2023 - Callum Farmer <gmbr3@opensuse.org>
- Added more numbered patches from upstream:
* luabugs11.patch
-------------------------------------------------------------------
Sat Mar 18 12:11:40 UTC 2023 - Callum Farmer <gmbr3@opensuse.org>
- Added more numbered patches from upstream:
* luabugs10.patch
-------------------------------------------------------------------
Tue Jan 24 10:53:04 UTC 2023 - Michal Suchanek <msuchanek@suse.com>
- Do not use complex dependencies on SLE12
-------------------------------------------------------------------
Sun Dec 18 17:55:21 UTC 2022 - Callum Farmer <gmbr3@opensuse.org>
- Added more numbered patches from upstream:
* luabugs8.patch
* luabugs9.patch
-------------------------------------------------------------------
Tue Aug 30 16:40:09 UTC 2022 - Callum Farmer <gmbr3@opensuse.org>
- Add more upstream patches:
* luabugs6.patch
* luabugs7.patch
-------------------------------------------------------------------
Sat Jun 4 13:49:42 UTC 2022 - Callum Farmer <gmbr3@opensuse.org>
- Added more numbered patches from upstream:
* luabugs3.patch
* luabugs4.patch (bsc#1201146, CVE-2022-33099)
* luabugs5.patch
-------------------------------------------------------------------
Wed Mar 9 10:12:55 UTC 2022 - Callum Farmer <gmbr3@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.lie@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.
-------------------------------------------------------------------
Wed Jan 26 19:15:13 UTC 2022 - Callum Farmer <gmbr3@opensuse.org>
- Ensure shared library is installed with executable bit set
-------------------------------------------------------------------
Wed Jan 26 18:35:13 UTC 2022 - Callum Farmer <gmbr3@opensuse.org>
- 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)
-------------------------------------------------------------------
Thu Dec 30 18:34:01 UTC 2021 - Callum Farmer <gmbr3@opensuse.org>
- 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 <gmbr3@opensuse.org>
- 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. (bsc#1194575,CVE-2021-44647)
-------------------------------------------------------------------
Sat Nov 27 16:54:20 UTC 2021 - Callum Farmer <gmbr3@opensuse.org>
- Update upstream-bugs.patch and upstream-bugs-test.patch to fix
bugs 7,8 for build and tests respectively. (bsc#1192613,CVE-2021-43519)
-------------------------------------------------------------------
Thu Jul 29 16:31:23 UTC 2021 - Callum Farmer <gmbr3@opensuse.org>
- Update upstream-bugs.patch and upstream-bugs-test.patch to fix
bugs 4,5,6 for build and tests respectively.
-------------------------------------------------------------------
Sat May 22 12:58:16 UTC 2021 - Callum Farmer <gmbr3@opensuse.org>
- Fix doc location (boo#1186233)
-------------------------------------------------------------------
Mon May 10 08:54:04 UTC 2021 - Callum Farmer <gmbr3@opensuse.org>
- Add shared_link.patch: fix dynamic linking executable
- Stop building static library
-------------------------------------------------------------------
Mon Apr 19 09:15:40 UTC 2021 - Callum Farmer <gmbr3@opensuse.org>
- 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 <gmbr3@opensuse.org>
- 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)
-------------------------------------------------------------------
Thu Mar 11 17:10:14 UTC 2021 - Callum Farmer <gmbr3@opensuse.org>
- Add upstream-bugs.patch and upstream-bugs-test.patch to fix
bugs 2,3,4 for build and tests respectively.
-------------------------------------------------------------------
Fri Jan 22 12:38:04 UTC 2021 - Callum Farmer <gmbr3@opensuse.org>
- Move tests to separate build
-------------------------------------------------------------------
Sat Dec 5 12:48:18 UTC 2020 - Callum Farmer <gmbr3@opensuse.org>
- Update to version 5.4.2:
* Fixes garbage collection bug
- Add main_test.patch: fix bug in main.lua test
-------------------------------------------------------------------
Sat Oct 10 13:10:50 UTC 2020 - Callum Farmer <callumjfarmer13@gmail.com>
- Update to version 5.4.1:
* Fixes bugs found in Lua 5.4.0
- Removed upstream-bugs.patch: new release (no bugs found yet)
-------------------------------------------------------------------
Fri Aug 21 18:24:02 UTC 2020 - Callum Farmer <callumjfarmer13@gmail.com>
- Add final part of patch for CVE-2020-15888, boo#1174367
- Add upstream patch 13
-------------------------------------------------------------------
Tue Aug 18 14:49:56 UTC 2020 - Callum Farmer <callumjfarmer13@gmail.com>
- Add patch for CVE-2020-15945, boo#1174540 (un-numbered)
-------------------------------------------------------------------
Mon Aug 17 10:00:04 UTC 2020 - Callum Farmer <callumjfarmer13@gmail.com>
- Add upstream patches 9,10,11,12
* Patch 9: CVE-2020-24342, boo#1175339
* Patch 10: CVE-2020-24371, boo#1175449
* Patch 11: CVE-2020-24370, boo#1175448
* Patch 12: CVE-2020-24369, boo#1175447
-------------------------------------------------------------------
Mon Jul 20 11:00:56 UTC 2020 - Callum Farmer <callumjfarmer13@gmail.com>
- Add upstream patches 7 & 8
-------------------------------------------------------------------
Sat Jul 18 09:51:00 UTC 2020 - Callum Farmer <callumjfarmer13@gmail.com>
- Add upstream-bugs.patch, upstream fixes from https://www.lua.org/bugs.html
-------------------------------------------------------------------
Sat Jul 18 08:59:50 UTC 2020 - Andreas Schwab <schwab@suse.de>
- files_test.patch: use proper check for 64-bit time_t
- Amend list of 64bit architectures
-------------------------------------------------------------------
Mon Jul 6 21:20:00 UTC 2020 - Matej Cepl <mcepl@suse.com>
- Don't use %make_build macro, which doesn't work on SLE-12
-------------------------------------------------------------------
Mon Jul 6 15:51:45 UTC 2020 - Matej Cepl <mcepl@suse.com>
- Add attrib_test.patch and files_test.patch which fix
failing tests (https://is.gd/6DYPgG). With these two patches
full test suite passes.
-------------------------------------------------------------------
Tue Jun 2 12:03:06 UTC 2020 - Callum Farmer <callumjfarmer13@gmail.com>
- Update to 5.4.0
* Changes from http://www.lua.org/manual/5.4/readme.html#changes
* new generational mode for garbage collection
* to-be-closed variables
* const variables
* userdata can have multiple user values
* new implementation for math.random
* warning system
* debug information about function arguments and returns
* new semantics for the integer 'for' loop
* optional 'init' argument to 'string.gmatch'
* new functions 'lua_resetthread' and 'coroutine.close'
* string-to-number coercions moved to the string library
* allocation function allowed to fail when shrinking a memory block
* new format '%p' in 'string.format'
* utf8 library accepts codepoints up to 2^31
- Changes copied from request by Matthias G. Eckermann <mge@suse.com>
- Updated spec file for lua 5.4: copied from lua53
- lua-build-system.patch: updated from Debian
- added tests
-------------------------------------------------------------------
Fri Aug 2 08:13:02 UTC 2019 - Martin Liška <mliska@suse.cz>
- Use FAT LTO objects in order to provide proper static library.
-------------------------------------------------------------------
Tue Mar 12 12:04:26 UTC 2019 - Matej Cepl <mcepl@suse.com>
- Update to 5.3.5:
(it is really problematic to find ANY documentation of changes
between minor versions; the best we have is
https://www.lua.org/bugs.html)
- Long brackets with a huge number of '=' overflow some
internal buffer arithmetic.
- Small build tweaks.
-------------------------------------------------------------------
Tue Jul 25 10:04:01 UTC 2017 - tchvatal@suse.com
- Provide symbol for pkgconfig
-------------------------------------------------------------------
Mon Jul 24 12:08:05 UTC 2017 - dimstar@opensuse.org
- Add INSTALL_LMOD and INSTALL_CMOD variables to lua53.pc: this is
queried for example by rrdtool's buildsystem.
-------------------------------------------------------------------
Thu Jul 20 12:36:41 UTC 2017 - tchvatal@suse.com
- Properly set includedir in the .pc file
-------------------------------------------------------------------
Mon Jul 10 11:32:37 UTC 2017 - tchvatal@suse.com
- Require lua macros rather than bundling them with lua itself
-------------------------------------------------------------------
Fri Jul 7 13:31:06 UTC 2017 - tchvatal@suse.com
- Add patch lua-build-system.patch for all the builsystem changes
- Drop patches merged to the above:
* lua-5.3.3-prefix.patch
* lua-5.3.3-shared.patch
- Drop not really needed lua-5.3.3-visible.patch
- Version update to lua 5.3.4 containing various bugfixes
- Rename to lua53
-------------------------------------------------------------------
Tue Jun 13 21:30:38 UTC 2017 - jengelh@inai.de
- Let package description adhere to guidelines: trim redundant
or biased wording and strip future goals.
-------------------------------------------------------------------
Thu Jun 16 09:32:46 UTC 2016 - i@marguerite.su
- update version 5.3.3
* bugfix release
- changes in 5.3.2
* metatable may access its own deallocated field when it has a
self reference in __newindex
* label between local definitions can mix-up their initializations
* gmatch iterator fails when called from a coroutine different
from the one that created it
- split lua-suse.diff to 3 reasonable patches
* add lua-5.3.3-prefix.patch
* add lua-5.3.3-shared.patch
* add lua-5.3.3-visible.patch
-------------------------------------------------------------------
Fri Jul 31 18:12:35 UTC 2015 - jengelh@inai.de
- Update RPM group classification
-------------------------------------------------------------------
Thu Jul 30 11:52:14 UTC 2015 - dimstar@opensuse.org
- Provide Lua(API) = 5.3, so that packages installing files to
/usr/share/lua/5.3 can properly depend on the right lua branch.
- Provide Lua(devel) = 5.3 by lua-devel and conflict with other
packages providing Lua(devel) (e.g lua51-devel, lua52-devel...).
-------------------------------------------------------------------
Mon Jul 13 16:33:31 UTC 2015 - i@marguerite.su
- macros.lua installs to lua-devel
- build with LUA_COMPAT_MODULE to compatible w/ old module system
-------------------------------------------------------------------
Fri Jul 10 09:52:48 UTC 2015 - i@marguerite.su
- update version 5.3.1
* integers (64-bit by default)
* official support for 32-bit numbers
* bitwise operators
* basic utf-8 support
* functions for packing and unpacking values
* see http://www.lua.org/manual/5.3/readme.html#changes
-------------------------------------------------------------------
Sun Mar 15 00:19:08 UTC 2015 - mpluskal@suse.com
- Update to 5.2.4
* Compiler can optimize away overflow check in table.unpack.
* Ephemeron table can wrongly collect entry with strong key.
* Chunk with too many lines may crash Lua.
-------------------------------------------------------------------
Wed Sep 17 15:04:25 UTC 2014 - i@marguerite.su
- the %dir is still needed.
-------------------------------------------------------------------
Fri Sep 12 09:19:07 UTC 2014 - pgajdos@suse.com
- fix update-alternatives
-------------------------------------------------------------------
Wed Sep 10 10:21:23 UTC 2014 - pgajdos@suse.com
- fix /etc/rpm/macros.lua perms
-------------------------------------------------------------------
Mon Mar 31 11:05:05 UTC 2014 - pgajdos@suse.com
- updated to 5.2.3:
* yieldable pcall and metamethods
* new lexical scheme for globals
* ephemeron tables
* new library for bitwise operations
* light C functions
* emergency garbage collector
* <CODE>goto</CODE> statement
* finalizers for tables
-------------------------------------------------------------------
Mon Sep 9 11:12:20 UTC 2013 - pgajdos@suse.com
- updated to 5.2.2: bugfix release, fixed:
* Stack overflow in vararg functions with many fixed parameters
called with few arguments.
* Garbage collector can trigger too many times in recursive loops.
* Wrong assert when reporting concatenation errors (manifests only
when Lua is compiled in debug mode).
* Wrong error message in some short-cut expressions.
* luac listings choke on long strings.
* see http://www.lua.org/bugs.html for details
-------------------------------------------------------------------
Tue Feb 19 11:30:57 UTC 2013 - pgajdos@suse.com
- fix visibility of global variables [bnc#803791]
* modified lua-suse.diff
- added LUA_SO target as dependency to LUAC_T and LUA_T to fix
parallel build
* modified lua-suse.diff
- added regresion check for this error into %check
-------------------------------------------------------------------
Tue Feb 5 14:18:18 UTC 2013 - coolo@suse.com
- update alternatives need to be %ghosts
-------------------------------------------------------------------
Thu Nov 15 15:11:34 UTC 2012 - pgajdos@suse.com
- export luaU_dump in order to fix linking of luac binary
-------------------------------------------------------------------
Tue Oct 9 14:55:31 UTC 2012 - crrodriguez@opensuse.org
- Tweak lua-suse.diff again:
* LUA_IFUNC must be defined as upstream but without "extern",
revert the previous mod.
* LUA_API must be defined as visibility default
-------------------------------------------------------------------
Thu Aug 16 00:34:57 UTC 2012 - crrodriguez@opensuse.org
- Even after the previous update, third party modules/libraries
would not work because LUA_CDIR constant is wrong in x86_64
-------------------------------------------------------------------
Wed Aug 15 22:34:12 UTC 2012 - crrodriguez@opensuse.org
- devel package must require libluaver = %{version}
-------------------------------------------------------------------
Wed Aug 15 22:24:01 UTC 2012 - crrodriguez@opensuse.org
- Broken lua-suse patch breaks loading third party modules
or scripts
-------------------------------------------------------------------
Mon Jun 18 09:09:13 UTC 2012 - pgajdos@suse.com
- updated to 5.2.1:
* main thread predefined in the registry
* bugfixes
-------------------------------------------------------------------
Thu Mar 29 19:29:57 UTC 2012 - joop.boonen@opensuse.org
- Correction in Provides and Obsolete for lua-libs
- Passed the spec file through spec-cleaner
-------------------------------------------------------------------
Wed Jan 18 22:03:20 UTC 2012 - dimstar@opensuse.org
- Require liblua5_2 from the -devel package: Otherwise the .so file
is a dangling symlink and apps will use the static lib.
- Update baselibs.conf to reference liblua5_2 instead of liblua5_1.
-------------------------------------------------------------------
Fri Jan 6 18:17:22 CET 2012 - dmueller@suse.de
- readd lua.pc for building rpm
-------------------------------------------------------------------
Wed Dec 21 15:11:08 UTC 2011 - pgajdos@suse.com
- raise update-alternatives priority to 15 (lua51 have 10, lua50
have 5)
-------------------------------------------------------------------
Wed Dec 21 13:58:22 UTC 2011 - pgajdos@suse.com
- updated to 5.2.0:
* Main changes
yieldable pcall and metamethods
new lexical scheme for globals
ephemeron tables
new library for bitwise operations
light C functions
emergency garbage collector
[goto] statement
finalizers for tables
* Language
no more fenv for threads or functions
tables honor the [__len] metamethod
hex and [\z] escapes in strings
support for hexadecimal floats
order metamethods work for different types
no more verification of opcode consistency
hook event "tail return" replaced by "tail call"
empty statement
[break] statement may appear in the middle of a block
* Libraries
arguments for function called through [xpcall]
optional 'mode' argument to load and loadfile (to control binary x text)
optional 'env' argument to load and loadfile (environment for loaded chunk)
[loadlib] may load libraries with global names (RTLD_GLOBAL)
new function [package.searchpath]
modules receive their paths when loaded
optional base in [math.log]
optional separator in [string.rep]
[file:write] returns <CODE>file</CODE>
closing a pipe returns exit status
[os.exit] may close state
new metamethods [__pairs] and <CODE>__ipairs</CODE>
new option 'isrunning' for [collectgarbage] and <CODE>lua_gc</CODE>
frontier patterns
[\0] in patterns
new option [*L] for <CODE>io.read</CODE>
options for [io.lines]
[debug.getlocal] can access function varargs
* C API
new functions: lua_absindex, lua_arith, lua_compare, lua_copy, lua_len,
lua_rawgetp, lua_rawsetp, lua_upvalueid, lua_upvaluejoin,
lua_version, luaL_checkversion, luaL_setmetatable,
luaL_testudata, luaL_tolstring
[lua_pushstring] and <CODE>pushlstring</CODE> return string
[nparams] and <CODE>isvararg</CODE> available in debug API
new lua_Unsigned
* Implementation
max constants per function raised to 2^26
generational mode for garbage collection (experimental)
NaN trick (experimental)
internal (immutable) version of ctypes
simpler implementation for string buffers
parser uses much less C-stack space (no more auto arrays)
* Lua standalone interpreter
new [-E] option to avoid environment variables
handling of non-string error messages
-------------------------------------------------------------------
Tue Oct 4 11:44:08 UTC 2011 - uli@suse.com
- cross-build fix: use %__cc macro
-------------------------------------------------------------------
Mon Jun 28 06:38:35 UTC 2010 - jengelh@medozas.de
- use %_smp_mflags
-------------------------------------------------------------------
Mon Jun 14 15:55:32 CEST 2010 - pgajdos@suse.cz
- removed -L/usr/lib from Libs: in etc/lua.pc [bnc#613497]
- used upstream bugfix patch from http://www.lua.org/download.html
-------------------------------------------------------------------
Sat Apr 24 11:38:23 UTC 2010 - coolo@novell.com
- buildrequire pkg-config to fix provides
-------------------------------------------------------------------
Tue Mar 23 11:16:23 CET 2010 - pgajdos@suse.cz
- modified LUA_PATH_DEFAULT [bnc#589441]: search modules under
/usr/%{_lib}/lua/%{major_version} too
-------------------------------------------------------------------
Sat Dec 12 18:28:44 CET 2009 - jengelh@medozas.de
- add baselibs.conf as a source
- package documentation as noarch
-------------------------------------------------------------------
Sun Dec 6 16:02:17 CET 2009 - jengelh@medozas.de
- enable parallel building
-------------------------------------------------------------------
Tue Nov 3 19:09:29 UTC 2009 - coolo@novell.com
- updated patches to apply with fuzz=0
-------------------------------------------------------------------
Wed Sep 16 23:25:13 CEST 2009 - dmueller@suse.de
- add baselibs.conf
-------------------------------------------------------------------
Mon Jun 8 15:57:11 CEST 2009 - pgajdos@suse.cz
- package owns /usr/{lib,share}/lua directories from now
- emoved unneeded root.patch
-------------------------------------------------------------------
Thu Sep 11 16:00:41 CEST 2008 - pgajdos@suse.cz
- updated to 5.1.4: bugfix release
-------------------------------------------------------------------
Wed Jun 11 10:56:51 ADT 2008 - jfunk@funktronics.ca
- Set LUA_ROOT to /usr and fix INSTALL_CMOD for lib64
- Add RPM macros file
- Allows for lua-<modulename> packages like python, perl, and ruby
-------------------------------------------------------------------
Fri Mar 28 07:57:37 CET 2008 - coolo@suse.de
- hint the solver about the package rename
-------------------------------------------------------------------
Wed Mar 26 21:29:35 CET 2008 - coolo@suse.de
- do not package/provide the shared lib twice / follow shared lib
policy
-------------------------------------------------------------------
Tue Feb 19 10:37:22 CET 2008 - pgajdos@suse.cz
- created -doc package
- updated to version 5.1.3, bug fix release. Fixed bugs:
* wrong error message in some concatenations
* too many variables in an assignment may cause a C stack
overflow
* an error in a module loaded through the '-l' option shows no
traceback
* gsub may go wild when wrongly called without its third
argument and with a large subject
* table.remove removes last element of a table when given
an out-of-bound index
* lua_setfenv may crash if called over an invalid object
* stand-alone interpreter shows incorrect error message when
the "message" is a coroutine.
* debug.sethook/gethook may overflow the thread's stack
-------------------------------------------------------------------
Tue Jul 24 14:31:30 CEST 2007 - pgajdos@suse.cz
- using /sbin/ldconfig in specfile
- updated to version 5.1.2, fixes some bugs:
* count hook may be called without being set
* code generated for "-nil", "-true", and "-false" is wrong
* recursive coroutines may overflow C stack
* wrong error message in some concatenations
* very small numbers all collide in the hash function
-------------------------------------------------------------------
Mon Nov 27 17:42:31 CET 2006 - mrueckert@suse.de
- package liblua.so as symlink.
-------------------------------------------------------------------
Thu Nov 16 21:29:32 CET 2006 - mrueckert@suse.de
- the core package now uses update alternatives to allow installation
of 5.0.x and 5.1.x
- devel packages will conflict now
-------------------------------------------------------------------
Tue Nov 14 21:29:31 CET 2006 - mrueckert@suse.de
- ARGH dont copy and paste!:
lua-libs should not depend on lua. another run on (#217875)
-------------------------------------------------------------------
Tue Nov 14 11:42:44 CET 2006 - mrueckert@suse.de
- really fix the file pattern (#217875)
-------------------------------------------------------------------
Thu Nov 9 15:08:50 CET 2006 - mrueckert@suse.de
- splitted out lua-libs so we can install at least both libs
in parallel. (#217875)
-------------------------------------------------------------------
Thu Oct 19 22:44:09 CEST 2006 - dmueller@suse.de
- fix wrong prefix in lua.pc
- link liblua with -lm to satisfy unresolved symbols
-------------------------------------------------------------------
Thu Oct 19 16:44:39 CEST 2006 - mjancar@suse.cz
- include lua.pc
-------------------------------------------------------------------
Wed Oct 18 19:17:00 CEST 2006 - mjancar@suse.cz
- update to 5.1.1
Language:
* new module system.
* new semantics for control variables of fors.
* new semantics for setn/getn.
* new syntax/semantics for varargs.
* new long strings and comments.
* new `mod' operator (`%')
* new length operator #t
* metatables for all types
API:
* new functions: lua_createtable, lua_get(set)field, lua_push(to)integer.
* user supplies memory allocator (lua_open becomes lua_newstate).
* luaopen_* functionst must be called through Lua.
Implementation:
* new configuration scheme via luaconf.h.
* incremental garbage collection.
* better handling of end-of-line in the lexer.
* fully reentrant parser (new Lua function `load')
* better support for 64-bit machines.
* native loadlib support for Mac OS X.
* standard distribution in only one library (lualib.a merged into lua.a)
-------------------------------------------------------------------
Wed Jan 25 21:38:05 CET 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
-------------------------------------------------------------------
Sat Jan 14 01:36:17 CET 2006 - schwab@suse.de
- Don't strip binaries.
- Fix shared library linking.
-------------------------------------------------------------------
Thu Sep 8 15:17:49 CEST 2005 - anicka@suse.cz
- enable dynamic loading capability (#106845)
-------------------------------------------------------------------
Fri Apr 23 16:17:31 CEST 2004 - mcihar@suse.cz
- initial packaging

283
lua54.spec Normal file
View File

@ -0,0 +1,283 @@
#
# spec file
#
# 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
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# 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_ext}
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: 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
# PATCH-FIX-UPSTREAM attrib_test.patch https://is.gd/6DYPgG mcepl@suse.com
# Fix failing test
Patch1: attrib_test.patch
Patch2: files_test.patch
Patch3: main_test.patch
Patch6: shared_link.patch
# PATCH-FIX-UPSTREAM skip-tests_big-endian.patch bsc#1216930 mcepl@suse.com
# patch out little-endian-only test
Patch7: skip-tests_big-endian.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
BuildRequires: libtool
BuildRequires: lua-macros
BuildRequires: pkgconfig
BuildRequires: readline-devel
%endif
%description
Lua is a programming language originally designed for extending
applications, but is also frequently used as a general-purpose,
stand-alone language.
Lua combines procedural syntax (similar to Pascal) with
data description constructs based on associative arrays and extensible
semantics. Lua is dynamically typed, interpreted from byte codes, and
has automatic memory management, making it suitable for configuration,
scripting, and rapid prototyping. Lua is implemented as a small library
of C functions, written in ANSI C.
%package devel
Summary: Development files for lua
License: MIT
Group: Development/Libraries/C and C++
Requires: %{libname} = %{version}
Requires: %{name} = %{version}
Requires: lua-macros
Requires(post): update-alternatives
Requires(postun):update-alternatives
Provides: lua-devel = %{version}
Provides: Lua(devel) = %{major_version}
Provides: pkgconfig(lua) = %{version}
%description devel
Lua is a programming language originally designed for extending
applications, but is also frequently used as a general-purpose,
stand-alone language.
This package contains files needed for embedding lua into your
application.
%package -n %{libname}
Summary: The Lua integration library
License: MIT
Group: System/Libraries
Provides: liblua5_4 = %{version}-%{release}
Obsoletes: liblua5_4 < %{version}-%{release}
Provides: %{name}-libs = %{version}
Obsoletes: %{name}-libs < %{version}
# Compat as libtool changes the soname
%ifarch aarch64 x86_64 ppc64 ppc64le s390x riscv64
Provides: liblua.so.5.4()(64bit)
%else
Provides: liblua.so.5.4
%endif
%description -n %{libname}
Lua is a programming language originally designed for extending
applications, but is also frequently used as a general-purpose,
stand-alone language.
Lua combines procedural syntax (similar to Pascal) with
data description constructs based on associative arrays and extensible
semantics. Lua is dynamically typed, interpreted from byte codes, and
has automatic memory management, making it suitable for configuration,
scripting, and rapid prototyping. Lua is implemented as a small library
of C functions, written in ANSI C.
%package doc
Summary: Documentation for Lua, a small embeddable language
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
applications, but is also frequently used as a general-purpose,
stand-alone language.
Lua combines procedural syntax (similar to Pascal) with
data description constructs based on associative arrays and extensible
semantics. Lua is dynamically typed, interpreted from byte codes, and
has automatic memory management, making it suitable for configuration,
scripting, and rapid prototyping. Lua is implemented as a small library
of C functions, written in ANSI C.
%prep
%setup -q -n lua-%{version} -a1
mv lua-%{version}-tests testes
%autopatch -p1
# 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
%build
sed -i -e "s@lib/lua/@%{_lib}/lua/@g" src/luaconf.h
%make_build linux-readline -C src \
CC="cc" LIBDIR="%{_libdir}" \
MYCFLAGS="%{optflags} -std=gnu99 -D_GNU_SOURCE -fPIC -DLUA_COMPAT_MODULE" \
V=%{major_version} \
LIBTOOL="libtool --quiet"
%install
%make_install \
LIBTOOL="libtool --quiet" \
INSTALL_TOP="%{buildroot}%{_prefix}" \
INSTALL_LIB="%{buildroot}%{_libdir}" \
INSTALL_MAN="%{buildroot}%{_mandir}/man1"
find %{buildroot} -type f -name "*.la" -delete -print
# create pkg-config file
cat > lua%{major_version}.pc <<-EOF
prefix=%{_prefix}
exec_prefix=%{_prefix}
libdir=%{_libdir}
includedir=%{_includedir}/lua%{major_version}
INSTALL_LMOD=%{_datadir}/lua/%{major_version}
INSTALL_CMOD=%{_libdir}/lua/%{major_version}
Name: Lua %{major_version}
Description: An Extensible Extension Language
Version: %{version}
Libs: -llua%{major_version} -lm
Cflags: -I\${includedir}
EOF
install -D -m 644 lua%{major_version}.pc %{buildroot}%{_libdir}/pkgconfig/lua%{major_version}.pc
# update-alternatives
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
for file in lua luac ; do
touch "%{buildroot}%{_sysconfdir}/alternatives/${file}"
ln -sf "%{_sysconfdir}/alternatives/${file}" "%{buildroot}%{_bindir}/${file}"
touch "%{buildroot}%{_sysconfdir}/alternatives/${file}.1%{ext_man}"
ln -sf "%{_sysconfdir}/alternatives/${file}.1%{ext_man}" "%{buildroot}%{_mandir}/man1/${file}.1%{ext_man}"
done
# Compat link with older unprefixed library and with soname 0 from deb/etc
ln -s %{_libdir}/liblua%{major_version}.so.%{major_version}.0 %{buildroot}%{_libdir}/liblua%{major_version}.so.%{major_version}
ln -s %{_libdir}/liblua%{major_version}.so.%{major_version}.0 %{buildroot}%{_libdir}/liblua%{major_version}.so.0
ln -s %{_libdir}/liblua%{major_version}.so.%{major_version}.0 %{buildroot}%{_libdir}/liblua.so.%{major_version}
# Library devel alternatives
touch %{buildroot}%{_sysconfdir}/alternatives/liblua.so
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 testes
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
%post
%{_sbindir}/update-alternatives --install \
%{_bindir}/lua lua %{_bindir}/lua%{major_version} 54 \
--slave %{_bindir}/luac luac %{_bindir}/luac%{major_version} \
--slave %{_mandir}/man1/lua.1%{ext_man} lua.1%{ext_man} %{_mandir}/man1/lua%{major_version}.1%{ext_man} \
--slave %{_mandir}/man1/luac.1%{ext_man} luac.1%{ext_man} %{_mandir}/man1/luac%{major_version}.1%{ext_man}
%postun
if [ "$1" = 0 ] ; then
%{_sbindir}/update-alternatives --remove lua %{_bindir}/lua%{major_version}
fi
%post devel
%{_sbindir}/update-alternatives --install \
%{_libdir}/liblua.so liblua.so %{_libdir}/liblua%{major_version}.so 54 \
--slave %{_libdir}/pkgconfig/lua.pc lua.pc %{_libdir}/pkgconfig/lua%{major_version}.pc
%postun devel
if [ "$1" = 0 ] ; then
%{_sbindir}/update-alternatives --remove liblua.so %{_libdir}/liblua%{major_version}.so
fi
%files
%dir %{_libdir}/lua
%dir %{_libdir}/lua/%{major_version}
%dir %{_datadir}/lua
%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}
# alternatives
%{_bindir}/lua
%{_bindir}/luac
%{_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}
%ghost %{_sysconfdir}/alternatives/luac.1%{ext_man}
%files -n %{libname}
%{_libdir}/liblua%{major_version}.so.*
%{_libdir}/liblua.so.*
%files devel
%dir %{_includedir}/lua%{major_version}
%{_includedir}/lua%{major_version}/lauxlib.h
%{_includedir}/lua%{major_version}/lua.h
%{_includedir}/lua%{major_version}/lua.hpp
%{_includedir}/lua%{major_version}/luaconf.h
%{_includedir}/lua%{major_version}/lualib.h
%{_libdir}/liblua%{major_version}.so
%{_libdir}/pkgconfig/lua%{major_version}.pc
# alternatives
%{_libdir}/liblua.so
%{_libdir}/pkgconfig/lua.pc
%ghost %{_sysconfdir}/alternatives/liblua.so
%ghost %{_sysconfdir}/alternatives/lua.pc
%files doc
%doc doc/*
%endif
%changelog

32
main_test.patch Normal file
View File

@ -0,0 +1,32 @@
---
testes/main.lua | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
--- a/testes/main.lua
+++ b/testes/main.lua
@@ -47,7 +47,7 @@ local function checkprogout (s)
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
@@ -367,11 +367,11 @@ a = 2
]]
RUN([[lua -e "%s" -i < %s > %s]], prompt, prog, out)
local t = getoutput()
-assert(string.find(t, [[
-1 --
-2a = 2
-3
-]], 1, true))
+-- assert(string.find(t, [[
+-- 1 --
+-- 2a = 2
+-- 3
+-- ]], 1, true))
-- test for error objects

39
shared_link.patch Normal file
View File

@ -0,0 +1,39 @@
---
src/ldebug.h | 2 +-
src/lmem.h | 2 +-
src/lundump.h | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
--- a/src/ldebug.h
+++ b/src/ldebug.h
@@ -36,7 +36,7 @@
#endif
-LUAI_FUNC int luaG_getfuncline (const Proto *f, int pc);
+LUA_API int luaG_getfuncline (const Proto *f, int pc);
LUAI_FUNC const char *luaG_findlocal (lua_State *L, CallInfo *ci, int n,
StkId *pos);
LUAI_FUNC l_noret luaG_typeerror (lua_State *L, const TValue *o,
--- a/src/lmem.h
+++ b/src/lmem.h
@@ -81,7 +81,7 @@ LUAI_FUNC void *luaM_realloc_ (lua_State
size_t size);
LUAI_FUNC void *luaM_saferealloc_ (lua_State *L, void *block, size_t oldsize,
size_t size);
-LUAI_FUNC void luaM_free_ (lua_State *L, void *block, size_t osize);
+LUA_API void luaM_free_ (lua_State *L, void *block, size_t osize);
LUAI_FUNC void *luaM_growaux_ (lua_State *L, void *block, int nelems,
int *size, int size_elem, int limit,
const char *what);
--- a/src/lundump.h
+++ b/src/lundump.h
@@ -30,7 +30,7 @@
LUAI_FUNC LClosure* luaU_undump (lua_State* L, ZIO* Z, const char* name);
/* dump one chunk; from ldump.c */
-LUAI_FUNC int luaU_dump (lua_State* L, const Proto* f, lua_Writer w,
+LUA_API int luaU_dump (lua_State* L, const Proto* f, lua_Writer w,
void* data, int strip);
#endif

View File

@ -0,0 +1,27 @@
---
testes/calls.lua | 14 --------------
1 file changed, 14 deletions(-)
--- a/testes/calls.lua
+++ b/testes/calls.lua
@@ -342,20 +342,6 @@ 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)