Compare commits

...

No commits in common. 'c9' and 'c8' have entirely different histories.
c9 ... c8

4
.gitignore vendored

@ -1,2 +1,2 @@
SOURCES/lua-5.4.4-tests.tar.gz
SOURCES/lua-5.4.4.tar.gz
SOURCES/lua-5.3.4-tests.tar.gz
SOURCES/lua-5.3.4.tar.gz

@ -1,2 +1,2 @@
062af7753cd387eea23052fbcad26616a48acadc SOURCES/lua-5.4.4-tests.tar.gz
03c27684b9d5d9783fb79a7c836ba1cdc5f309cd SOURCES/lua-5.4.4.tar.gz
d0d59cfb0d2eac18a3134917c08246c854af67c5 SOURCES/lua-5.3.4-tests.tar.gz
79790cfd40e09ba796b01a571d4d63b52b1cd950 SOURCES/lua-5.3.4.tar.gz

@ -0,0 +1,11 @@
--- lua-5.3.4/src/lapi.c.orig 2019-06-03 17:29:46.376205064 +0200
+++ lua-5.3.4/src/lapi.c 2019-06-03 17:31:08.869905663 +0200
@@ -1289,6 +1289,8 @@
LClosure *f1;
UpVal **up1 = getupvalref(L, fidx1, n1, &f1);
UpVal **up2 = getupvalref(L, fidx2, n2, NULL);
+ if (*up1 == *up2)
+ return;
luaC_upvdeccount(L, *up1);
*up1 = *up2;
(*up1)->refcount++;

@ -1,10 +1,10 @@
diff -up lua-5.4.0-beta/configure.ac.autoxxx lua-5.4.0-beta/configure.ac
--- lua-5.4.0-beta/configure.ac.autoxxx 2019-10-23 15:03:13.296916443 -0400
+++ lua-5.4.0-beta/configure.ac 2019-10-23 15:03:13.296916443 -0400
diff -up lua-5.3.0/configure.ac.autoxxx lua-5.3.0/configure.ac
--- lua-5.3.0/configure.ac.autoxxx 2015-01-15 10:20:03.826889574 -0500
+++ lua-5.3.0/configure.ac 2015-01-15 10:20:03.826889574 -0500
@@ -0,0 +1,69 @@
+AC_PREREQ(2.59)
+AC_INIT([lua], [5.4.0], [https://bugzilla.redhat.com/], [lua-at], [http://www.lua.org])
+AC_SUBST([MAJOR_VERSION], [5.4])
+AC_INIT([lua], [5.3.0], [https://bugzilla.redhat.com/], [lua-at], [http://www.lua.org])
+AC_SUBST([MAJOR_VERSION], [5.3])
+
+AC_CONFIG_HEADERS([config.h])
+AC_CONFIG_SRCDIR([src/lapi.c])
@ -71,33 +71,33 @@ diff -up lua-5.4.0-beta/configure.ac.autoxxx lua-5.4.0-beta/configure.ac
+ doc/Makefile
+])
+AC_OUTPUT
diff -up lua-5.4.0-beta/doc/Makefile.am.autoxxx lua-5.4.0-beta/doc/Makefile.am
--- lua-5.4.0-beta/doc/Makefile.am.autoxxx 2019-10-23 15:03:13.296916443 -0400
+++ lua-5.4.0-beta/doc/Makefile.am 2019-10-23 15:03:13.296916443 -0400
diff -up lua-5.3.0/doc/Makefile.am.autoxxx lua-5.3.0/doc/Makefile.am
--- lua-5.3.0/doc/Makefile.am.autoxxx 2015-01-15 10:20:03.826889574 -0500
+++ lua-5.3.0/doc/Makefile.am 2015-01-15 10:20:03.826889574 -0500
@@ -0,0 +1,4 @@
+man1_MANS = lua.1 luac.1
+
+EXTRA_DIST = \
+ contents.html logo.gif lua.1 luac.1 lua.css manual.css manual.html osi-certified-72x60.png readme.html
diff -up lua-5.4.0-beta/Makefile.am.autoxxx lua-5.4.0-beta/Makefile.am
--- lua-5.4.0-beta/Makefile.am.autoxxx 2019-10-23 15:03:13.296916443 -0400
+++ lua-5.4.0-beta/Makefile.am 2019-10-23 15:03:13.296916443 -0400
diff -up lua-5.3.0/Makefile.am.autoxxx lua-5.3.0/Makefile.am
--- lua-5.3.0/Makefile.am.autoxxx 2015-01-15 10:20:03.826889574 -0500
+++ lua-5.3.0/Makefile.am 2015-01-15 10:20:03.826889574 -0500
@@ -0,0 +1,3 @@
+SUBDIRS = src doc
+
+EXTRA_DIST = README
diff -up lua-5.4.0-beta/src/.gitignore.autoxxx lua-5.4.0-beta/src/.gitignore
--- lua-5.4.0-beta/src/.gitignore.autoxxx 2019-10-23 15:03:13.297916423 -0400
+++ lua-5.4.0-beta/src/.gitignore 2019-10-23 15:03:13.296916443 -0400
diff -up lua-5.3.0/src/.gitignore.autoxxx lua-5.3.0/src/.gitignore
--- lua-5.3.0/src/.gitignore.autoxxx 2015-01-15 10:20:03.826889574 -0500
+++ lua-5.3.0/src/.gitignore 2015-01-15 10:20:03.826889574 -0500
@@ -0,0 +1,5 @@
+lua
+lua.pc
+luac
+luaconf.h
+luaconf.h.template
diff -up lua-5.4.0-beta/src/luaconf.h.template.in.autoxxx lua-5.4.0-beta/src/luaconf.h.template.in
--- lua-5.4.0-beta/src/luaconf.h.template.in.autoxxx 2019-09-30 19:52:16.000000000 -0400
+++ lua-5.4.0-beta/src/luaconf.h.template.in 2019-10-23 15:05:45.139817627 -0400
diff -up lua-5.3.0/src/luaconf.h.template.in.autoxxx lua-5.3.0/src/luaconf.h.template.in
--- lua-5.3.0/src/luaconf.h.template.in.autoxxx 2015-01-15 10:20:03.828889562 -0500
+++ lua-5.3.0/src/luaconf.h.template.in 2015-01-15 10:22:37.420027778 -0500
@@ -11,6 +11,11 @@
#include <limits.h>
#include <stddef.h>
@ -110,7 +110,7 @@ diff -up lua-5.4.0-beta/src/luaconf.h.template.in.autoxxx lua-5.4.0-beta/src/lua
/*
** ===================================================================
@@ -227,9 +232,9 @@
@@ -175,9 +180,9 @@
#else /* }{ */
@ -120,12 +120,12 @@ diff -up lua-5.4.0-beta/src/luaconf.h.template.in.autoxxx lua-5.4.0-beta/src/lua
+#define LUA_ROOT "@prefix@/"
+#define LUA_LDIR "@pkgdatadir@/lua/" LUA_VDIR "/"
+#define LUA_CDIR "@libdir@/lua/" LUA_VDIR "/"
#if !defined(LUA_PATH_DEFAULT)
#define LUA_PATH_DEFAULT \
diff -up lua-5.4.0-beta/src/lua.pc.in.autoxxx lua-5.4.0-beta/src/lua.pc.in
--- lua-5.4.0-beta/src/lua.pc.in.autoxxx 2019-10-23 15:03:13.297916423 -0400
+++ lua-5.4.0-beta/src/lua.pc.in 2019-10-23 15:03:13.297916423 -0400
LUA_LDIR"?.lua;" LUA_LDIR"?/init.lua;" \
LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua;" \
diff -up lua-5.3.0/src/lua.pc.in.autoxxx lua-5.3.0/src/lua.pc.in
--- lua-5.3.0/src/lua.pc.in.autoxxx 2015-01-15 10:20:03.827889568 -0500
+++ lua-5.3.0/src/lua.pc.in 2015-01-15 10:20:03.827889568 -0500
@@ -0,0 +1,13 @@
+V= @MAJOR_VERSION@
+R= @VERSION@
@ -140,9 +140,9 @@ diff -up lua-5.4.0-beta/src/lua.pc.in.autoxxx lua-5.4.0-beta/src/lua.pc.in
+Requires:
+Libs: -llua @LUA_LIBS@
+Cflags: -I${includedir}
diff -up lua-5.4.0-beta/src/Makefile.am.autoxxx lua-5.4.0-beta/src/Makefile.am
--- lua-5.4.0-beta/src/Makefile.am.autoxxx 2019-10-23 15:03:13.297916423 -0400
+++ lua-5.4.0-beta/src/Makefile.am 2019-10-23 15:03:13.297916423 -0400
diff -up lua-5.3.0/src/Makefile.am.autoxxx lua-5.3.0/src/Makefile.am
--- lua-5.3.0/src/Makefile.am.autoxxx 2015-01-15 10:20:03.826889574 -0500
+++ lua-5.3.0/src/Makefile.am 2015-01-15 10:20:03.826889574 -0500
@@ -0,0 +1,46 @@
+AM_CFLAGS = -Wall
+
@ -153,7 +153,7 @@ diff -up lua-5.4.0-beta/src/Makefile.am.autoxxx lua-5.4.0-beta/src/Makefile.am
+lib_LTLIBRARIES = liblua.la
+liblua_la_LDFLAGS = -release @MAJOR_VERSION@
+liblua_la_SOURCES = \
+ lapi.c lauxlib.c lbaselib.c lcode.c lcorolib.c lctype.c ldblib.c \
+ lapi.c lauxlib.c lbaselib.c lbitlib.c lcode.c lcorolib.c lctype.c ldblib.c \
+ ldebug.c ldo.c ldump.c lfunc.c lgc.c linit.c liolib.c llex.c lmathlib.c lmem.c \
+ loadlib.c lobject.c lopcodes.c loslib.c lparser.c lstate.c lstring.c lstrlib.c \
+ ltable.c ltablib.c ltm.c lundump.c lutf8lib.c lvm.c lzio.c \

@ -0,0 +1,12 @@
diff -up lua-5.3.4/src/lparser.c.bug1 lua-5.3.4/src/lparser.c
--- lua-5.3.4/src/lparser.c.bug1 2017-08-02 16:03:43.730247916 -0400
+++ lua-5.3.4/src/lparser.c 2017-08-02 16:03:56.507957260 -0400
@@ -1392,7 +1392,7 @@ static void test_then_block (LexState *l
luaK_goiffalse(ls->fs, &v); /* will jump to label if condition is true */
enterblock(fs, &bl, 0); /* must enter block before 'goto' */
gotostat(ls, v.t); /* handle goto/break */
- skipnoopstat(ls); /* skip other no-op statements */
+ while (testnext(ls, ';')) {} /* skip colons */
if (block_follow(ls, 0)) { /* 'goto' is the entire block? */
leaveblock(fs);
return; /* and that is it */

@ -0,0 +1,11 @@
diff -up lua-5.3.4/src/ldebug.c.bug4 lua-5.3.4/src/ldebug.c
--- lua-5.3.4/src/ldebug.c.bug4 2017-08-02 16:05:36.985671687 -0400
+++ lua-5.3.4/src/ldebug.c 2017-08-02 16:05:55.257256062 -0400
@@ -653,6 +653,7 @@ l_noret luaG_runerror (lua_State *L, con
CallInfo *ci = L->ci;
const char *msg;
va_list argp;
+ luaC_checkGC(L); /* error message uses memory */
va_start(argp, fmt);
msg = luaO_pushvfstring(L, fmt, argp); /* format message */
va_end(argp);

@ -0,0 +1,14 @@
diff -up lua-5.3.4/src/lgc.c.bug5 lua-5.3.4/src/lgc.c
--- lua-5.3.4/src/lgc.c.bug5 2017-10-29 20:30:18.824283152 -0400
+++ lua-5.3.4/src/lgc.c 2017-10-29 20:31:12.133021523 -0400
@@ -643,8 +643,9 @@ static void clearkeys (global_State *g,
for (n = gnode(h, 0); n < limit; n++) {
if (!ttisnil(gval(n)) && (iscleared(g, gkey(n)))) {
setnilvalue(gval(n)); /* remove value ... */
- removeentry(n); /* and remove entry from table */
}
+ if (ttisnil(gval(n))) /* is entry empty? */
+ removeentry(n); /* remove entry from table */
}
}
}

@ -0,0 +1,23 @@
diff -up lua-5.3.4/src/lapi.c.bug6 lua-5.3.4/src/lapi.c
--- lua-5.3.4/src/lapi.c.bug6 2018-02-13 10:18:59.386451581 -0500
+++ lua-5.3.4/src/lapi.c 2018-02-13 10:19:42.700575448 -0500
@@ -533,6 +533,7 @@ LUA_API void lua_pushcclosure (lua_State
lua_lock(L);
if (n == 0) {
setfvalue(L->top, fn);
+ api_incr_top(L);
}
else {
CClosure *cl;
@@ -546,9 +547,9 @@ LUA_API void lua_pushcclosure (lua_State
/* does not need barrier because closure is white */
}
setclCvalue(L, L->top, cl);
+ api_incr_top(L);
+ luaC_checkGC(L);
}
- api_incr_top(L);
- luaC_checkGC(L);
lua_unlock(L);
}

@ -1,26 +0,0 @@
diff -up lua-5.3.5/src/ldebug.c.CVE-2020-24370 lua-5.3.5/src/ldebug.c
--- lua-5.3.5/src/ldebug.c.CVE-2020-24370 2020-08-19 13:37:17.075859557 -0400
+++ lua-5.3.5/src/ldebug.c 2020-08-19 13:38:53.117779244 -0400
@@ -133,10 +133,11 @@ static const char *upvalname (Proto *p,
static const char *findvararg (CallInfo *ci, int n, StkId *pos) {
int nparams = clLvalue(ci->func)->p->numparams;
- if (n >= cast_int(ci->u.l.base - ci->func) - nparams)
+ int nvararg = cast_int(ci->u.l.base - ci->func) - nparams;
+ if (n <= -nvararg)
return NULL; /* no such vararg */
else {
- *pos = ci->func + nparams + n;
+ *pos = ci->func + nparams - n;
return "(*vararg)"; /* generic name for any vararg */
}
}
@@ -148,7 +149,7 @@ static const char *findlocal (lua_State
StkId base;
if (isLua(ci)) {
if (n < 0) /* access to vararg values? */
- return findvararg(ci, -n, pos);
+ return findvararg(ci, n, pos);
else {
base = ci->u.l.base;
name = luaF_getlocalname(ci_func(ci)->p, n, currentpc(ci));

@ -1,22 +0,0 @@
From 1f3c6f4534c6411313361697d98d1145a1f030fa Mon Sep 17 00:00:00 2001
From: Roberto Ierusalimschy <roberto@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] */
}

@ -0,0 +1,30 @@
From a585eae6e7ada1ca9271607a4f48dfb17868ab7b Mon Sep 17 00:00:00 2001
From: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Mon, 27 Jul 2020 12:01:38 -0300
Subject: [PATCH] Fixed bug: Negation overflow in getlocal/setlocal
Adjusted for 5.3
---
diff --git a/src/ldebug.c b/src/ldebug.c
index f1835890..a44e5439 100644
--- a/src/ldebug.c
+++ b/src/ldebug.c
@@ -133,7 +133,7 @@ static const char *upvalname (Proto *p, int uv) {
static const char *findvararg (CallInfo *ci, int n, StkId *pos) {
int nparams = clLvalue(ci->func)->p->numparams;
- if (n >= cast_int(ci->u.l.base - ci->func) - nparams)
+ if (n < cast_int(ci->u.l.base - ci->func) - nparams) /* 'n' is negative */
return NULL; /* no such vararg */
else {
*pos = ci->func + nparams + n;
@@ -148,7 +148,7 @@ static const char *findlocal (lua_State *L, CallInfo *ci, int n,
StkId base;
if (isLua(ci)) {
if (n < 0) /* access to vararg values? */
- return findvararg(ci, -n, pos);
+ return findvararg(ci, n, pos);
else {
base = ci->u.l.base;
name = luaF_getlocalname(ci_func(ci)->p, n, currentpc(ci));

@ -1,51 +0,0 @@
diff -up lua-5.4.2/src/ldebug.c.orig lua-5.4.2/src/ldebug.c
--- lua-5.4.2/src/ldebug.c.orig 2020-11-13 16:32:00.000000000 +0100
+++ lua-5.4.2/src/ldebug.c 2022-10-21 14:35:02.200941813 +0200
@@ -772,8 +772,11 @@ l_noret luaG_runerror (lua_State *L, con
va_start(argp, fmt);
msg = luaO_pushvfstring(L, fmt, argp); /* format message */
va_end(argp);
- if (isLua(ci)) /* if Lua function, add source:line information */
+ if (isLua(ci)) { /* if Lua function, add source:line information */
luaG_addinfo(L, msg, ci_func(ci)->p->source, getcurrentline(ci));
+ setobjs2s(L, L->top - 2, L->top - 1); /* remove 'msg' from the stack */
+ L->top--;
+ }
luaG_errormsg(L);
}
diff -up lua-5.4.2/src/lvm.c.orig lua-5.4.2/src/lvm.c
--- lua-5.4.2/src/lvm.c.orig 2020-11-13 16:32:02.000000000 +0100
+++ lua-5.4.2/src/lvm.c 2022-10-21 14:35:31.713755890 +0200
@@ -641,7 +641,7 @@ void luaV_concat (lua_State *L, int tota
int n = 2; /* number of elements handled in this pass (at least 2) */
if (!(ttisstring(s2v(top - 2)) || cvt2str(s2v(top - 2))) ||
!tostring(L, s2v(top - 1)))
- luaT_tryconcatTM(L);
+ luaT_tryconcatTM(L); /* may invalidate 'top' */
else if (isemptystr(s2v(top - 1))) /* second operand is empty? */
cast_void(tostring(L, s2v(top - 2))); /* result is first operand */
else if (isemptystr(s2v(top - 2))) { /* first operand is empty string? */
@@ -654,8 +654,10 @@ void luaV_concat (lua_State *L, int tota
/* collect total length and number of strings */
for (n = 1; n < total && tostring(L, s2v(top - n - 1)); n++) {
size_t l = vslen(s2v(top - n - 1));
- if (l_unlikely(l >= (MAX_SIZE/sizeof(char)) - tl))
+ if (l_unlikely(l >= (MAX_SIZE/sizeof(char)) - tl)) {
+ L->top = top - total; /* pop strings to avoid wasting stack */
luaG_runerror(L, "string length overflow");
+ }
tl += l;
}
if (tl <= LUAI_MAXSHORTLEN) { /* is result a short string? */
@@ -669,8 +671,8 @@ void luaV_concat (lua_State *L, int tota
}
setsvalue2s(L, top - n, ts); /* create result */
}
- total -= n-1; /* got 'n' strings to create 1 new */
- L->top -= n-1; /* popped 'n' strings and pushed one */
+ total -= n - 1; /* got 'n' strings to create one new */
+ L->top -= n - 1; /* popped 'n' strings and pushed one */
} while (total > 1); /* repeat until only 1 result left */
}

@ -0,0 +1,13 @@
%lua_version %{lua: print(string.sub(_VERSION, 5))}
%lua_libdir %{_libdir}/lua/%{lua_version}
%lua_pkgdir %{_datadir}/lua/%{lua_version}
%lua_requires \
%if 0%{?fedora} >= 16 || 0%{?rhel} >= 7 \
Requires: lua(abi) = %{lua_version} \
%else \
Requires: lua >= %{lua_version} \
Requires: lua < %{lua: os.setlocale('C'); print(string.sub(_VERSION, 5) + 0.1)} \
%endif \
%{nil}

@ -1,12 +1,10 @@
%global major_version 5.4
# Normally, this is the same as version, but... not always.
%global test_version 5.4.4
%global major_version 5.3
# If you are incrementing major_version, enable bootstrapping and adjust accordingly.
# Version should be the latest prior build. If you don't do this, RPM will break and
# everything will grind to a halt.
%global bootstrap 0
%global bootstrap_major_version 5.3
%global bootstrap_version %{bootstrap_major_version}.5
%global bootstrap_major_version 5.2
%global bootstrap_version %{bootstrap_major_version}.3
# Place rpm-macros into proper location.
%global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)
@ -14,8 +12,9 @@
Name: lua
Version: %{major_version}.4
Release: 4%{?dist}
Release: 12%{?dist}
Summary: Powerful light-weight programming language
Group: Development/Languages
License: MIT
URL: http://www.lua.org/
Source0: http://www.lua.org/ftp/lua-%{version}.tar.gz
@ -24,25 +23,31 @@ Source1: mit.txt
%if 0%{?bootstrap}
Source2: http://www.lua.org/ftp/lua-%{bootstrap_version}.tar.gz
%endif
Source3: http://www.lua.org/tests/lua-%{test_version}-tests.tar.gz
Source3: http://www.lua.org/tests/lua-%{version}-tests.tar.gz
# multilib
Source4: luaconf.h
Patch0: %{name}-5.4.0-beta-autotoolize.patch
# rpm-macro
Source1000: macros.lua
Patch0: %{name}-5.3.0-autotoolize.patch
Patch1: %{name}-5.3.0-idsize.patch
#Patch2: %%{name}-5.3.0-luac-shared-link-fix.patch
Patch3: %{name}-5.2.2-configure-linux.patch
Patch4: %{name}-5.3.0-configure-compat-module.patch
%if 0%{?bootstrap}
Patch5: %{name}-5.3.0-autotoolize.patch
Patch6: %{name}-5.3.5-luac-shared-link-fix.patch
Patch5: %{name}-5.2.3-autotoolize.patch
Patch6: %{name}-5.2.2-idsize.patch
Patch7: %{name}-5.2.2-luac-shared-link-fix.patch
Patch8: %{name}-5.2.2-configure-compat-module.patch
%endif
# https://www.lua.org/bugs.html
Patch18: %{name}-5.3.5-CVE-2020-24370.patch
Patch19: %{name}-5.4.2-CVE-2022-33099.patch
Patch20: %{name}-5.4-CVE-2022-28805.patch
Patch9: lua-5.3.4-bug1.patch
Patch10: lua-5.3.4-bug4.patch
Patch11: lua-5.3.4-bug5.patch
Patch12: lua-5.3.4-bug6.patch
Patch13: lua-5-3.4-upvaluejoin.patch
Patch14: lua-5.4.1-bug11.patch
BuildRequires: automake autoconf libtool readline-devel ncurses-devel
BuildRequires: make
Requires: lua-libs = %{version}-%{release}
%description
@ -57,10 +62,8 @@ configuration, scripting, and rapid prototyping.
%package devel
Summary: Development files for %{name}
Group: System Environment/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
# The RPM related dependencies bring nothing to a non-RPM Lua developer
# But we want them when packages BuildRequire lua-devel
Requires: (lua-rpm-macros if rpm-build)
Requires: pkgconfig
%description devel
@ -75,6 +78,7 @@ This package contains the shared libraries for %{name}.
%package static
Summary: Static library for %{name}
Group: System Environment/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
%description static
@ -83,7 +87,7 @@ This package contains the static version of liblua for %{name}.
%prep
%if 0%{?bootstrap}
%setup -q -a 2 -a 3 -n %{name}-%{version}
%setup -q -a 2 -a 3
%else
%setup -q -a 3
%endif
@ -94,8 +98,12 @@ mv src/luaconf.h src/luaconf.h.template.in
#%% patch2 -p1 -z .luac-shared
%patch3 -p1 -z .configure-linux
%patch4 -p1 -z .configure-compat-all
%patch19 -p1 -b .CVE-2022-33099
%patch20 -p1 -b .CVE-2022-28805
%patch9 -p1 -b .bug1
%patch10 -p1 -b .bug4
%patch11 -p1 -b .bug5
%patch12 -p1 -b .bug6
%patch13 -p1 -b .upvaluejoin
%patch14 -p1 -b .bug11
# Put proper version in configure.ac, patch0 hardcodes 5.3.0
sed -i 's|5.3.0|%{version}|g' configure.ac
autoreconf -ifv
@ -104,11 +112,10 @@ autoreconf -ifv
cd lua-%{bootstrap_version}/
mv src/luaconf.h src/luaconf.h.template.in
%patch5 -p1 -b .autoxxx
%patch1 -p1 -b .idsize
%patch6 -p1 -b .idsize
%patch7 -p1 -b .luac-shared
%patch3 -p1 -z .configure-linux
%patch4 -p1 -z .configure-compat-all
%patch6 -p1 -b .luac-shared-link-fix
%patch18 -p1 -b .CVE-2020-24370
%patch8 -p1 -z .configure-compat-all
autoreconf -i
cd ..
%endif
@ -141,7 +148,7 @@ popd
%endif
%check
cd ./lua-%{test_version}-tests/
cd ./lua-%{version}-tests/
# Dont skip the fully portable or ram-hungry tests:
# sed -i.orig -e '
@ -181,6 +188,9 @@ rm -rf $RPM_BUILD_ROOT/installdir
popd
%endif
# Install rpm-macro
install -Dpm 0644 %{SOURCE1000} $RPM_BUILD_ROOT/%{macrosdir}/macros.lua
%files
%{!?_licensedir:%global license %%doc}
%license mit.txt
@ -188,19 +198,20 @@ popd
%doc README doc/*.html doc/*.css doc/*.gif doc/*.png
%{_bindir}/lua
%{_bindir}/luac
%if 0%{?bootstrap}
%dir %{_libdir}/lua/%{bootstrap_major_version}
%dir %{_datadir}/lua/%{bootstrap_major_version}
%endif
%{_mandir}/man1/lua*.1*
%files libs
%dir %{_libdir}/lua
%dir %{_libdir}/lua/%{major_version}
%{_libdir}/liblua-%{major_version}.so
%dir %{_datadir}/lua
%dir %{_datadir}/lua/%{major_version}
%files libs
%{_libdir}/liblua-%{major_version}.so
%if 0%{?bootstrap}
%dir %{_libdir}/lua/%{bootstrap_major_version}
%{_libdir}/liblua-%{bootstrap_major_version}.so
%dir %{_datadir}/lua/%{bootstrap_major_version}
%endif
%files devel
@ -208,95 +219,18 @@ popd
%{_includedir}/l*.hpp
%{_libdir}/liblua.so
%{_libdir}/pkgconfig/*.pc
%{macrosdir}/macros.lua
%files static
%{_libdir}/*.a
%changelog
* Mon Apr 17 2023 Florian Festi <ffesti@redhat.com> - 5.4.4-4
- Disable bootstrap mode forgotten on 5.4 rebase (#2135419)
* Fri Feb 03 2023 Florian Festi <ffesti@redhat.com> - 5.4.4-3
- Apply upstream patch for CVE-2022-28805
* Fri Feb 03 2023 Florian Festi <ffesti@redhat.com> - 5.4.4-2
- Resolves CVE-2021-43519
* Tue Jan 24 2023 Florian Festi <ffesti@redhat.com> - 5.4.4-1
- Rebase to lua 5.4.4
- Resolves CVE-2021-44964
* Tue Oct 25 2022 Michal Domonkos <mdomonko@redhat.com> - 5.4.2-7
- Fix up CVE-2022-33099 patch
* Mon Oct 17 2022 Michal Domonkos <mdomonko@redhat.com> - 5.4.2-6
- Enable gating
* Mon Oct 17 2022 Michal Domonkos <mdomonko@redhat.com> - 5.4.2-5
- apply upstream fix for CVE-2022-33099
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 5.4.2-4
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 5.4.2-3
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5.4.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Thu Dec 3 2020 Tom Callaway <spot@fedoraproject.org> - 5.4.2-1
- update to 5.4.2
* Mon Oct 12 2020 Tom Callaway <spot@fedoraproject.org> - 5.4.1-1
- update to 5.4.1
* Wed Sep 2 2020 Tom Callaway <spot@fedoraproject.org> - 5.4.0-8
- apply upstream fix for CVE-2020-24342
* Mon Aug 31 2020 Michel Alexandre Salim <salimma@fedoraproject.org> - 5.4.0-7
- Refactor macros into lua-rpm-macros
* Wed Aug 19 2020 Tom Callaway <spot@fedoraproject.org> - 5.4.0-6
- apply upstream fix for CVE-2020-24370, CVE-2020-24371
* Wed Aug 19 2020 Tom Callaway <spot@fedoraproject.org> - 5.4.0-5
- apply upstream fix for CVE-2020-24369
* Fri Jul 31 2020 Tom Callaway <spot@fedoraproject.org> - 5.4.0-4
- apply upstream fix for CVE-2020-15889
- apply upstream fix for CVE-2020-15945
- apply upstream fixes for "known bugs"
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 5.4.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jun 30 2020 Miro Hrončok <mhroncok@redhat.com> - 5.4.0-2
- Add lua(abi) requirements generator (requires RPM 4.16+)
* Mon Jun 29 2020 Tom Callaway <spot@fedoraproject.org> - 5.4.0-1
- update to 5.4.0
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 5.3.5-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.3.5-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sun Feb 17 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 5.3.5-5
- Rebuild for readline 8.0
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.3.5-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Mon Jan 28 2019 Tom Callaway <spot@fedoraproject.org> - 5.3.5-3
- apply fix for CVE-2019-6706 (bz1670020)
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 5.3.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
%changelog
* Mon Aug 02 2019 Florian Festi <ffesti@redhat.com> - 5.3.4-12
- Fix segfault in getlocal and setlocal (#1880445)
* Tue Jul 10 2018 Tom Callaway <spot@fedoraproject.org> - 5.3.5-1
- update to 5.3.5
* Mon Jun 03 2019 Florian Festi <ffesti@redhat.com> - 5.3.4-11
- Fix use after free in lua_upvaluejoin (#1670167)
* Tue Feb 13 2018 Tom Callaway <spot@fedoraproject.org> - 5.3.4-10
- move lua(abi) provide to -libs

Loading…
Cancel
Save