summaryrefslogtreecommitdiffstats
path: root/meta-oe
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2021-10-11 20:41:17 +0200
committerKhem Raj <raj.khem@gmail.com>2021-10-14 07:16:58 -0700
commit939322d9523ce5964bc9deac2eb3919297d62572 (patch)
tree79a47e006d6bd62a1873470fa6b89fff66085da9 /meta-oe
parent1e12d64f70cce8bc16594a85d33dbb883f6c76ee (diff)
downloadmeta-openembedded-939322d9523ce5964bc9deac2eb3919297d62572.tar.gz
lua: remove recipe as it is now in oe-core
Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe')
-rw-r--r--meta-oe/recipes-devtools/lua/lua/0001-Allow-building-lua-without-readline-on-Linux.patch59
-rw-r--r--meta-oe/recipes-devtools/lua/lua/0001-Fixed-bug-barriers-cannot-be-active-during-sweep.patch90
-rw-r--r--meta-oe/recipes-devtools/lua/lua/CVE-2020-15888.patch45
-rw-r--r--meta-oe/recipes-devtools/lua/lua/lua.pc.in10
-rw-r--r--meta-oe/recipes-devtools/lua/lua/run-ptest19
-rw-r--r--meta-oe/recipes-devtools/lua/lua_5.3.6.bb66
6 files changed, 0 insertions, 289 deletions
diff --git a/meta-oe/recipes-devtools/lua/lua/0001-Allow-building-lua-without-readline-on-Linux.patch b/meta-oe/recipes-devtools/lua/lua/0001-Allow-building-lua-without-readline-on-Linux.patch
deleted file mode 100644
index e767900864..0000000000
--- a/meta-oe/recipes-devtools/lua/lua/0001-Allow-building-lua-without-readline-on-Linux.patch
+++ /dev/null
@@ -1,59 +0,0 @@
1From 601ef636fc4dfb2af3e7fda88d8ea1c1d92affe4 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Wed, 2 Oct 2019 17:54:15 +0200
4Subject: [PATCH] Allow building lua without readline on Linux
5
6Upstream-Status: Pending
7Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
8---
9 Makefile | 2 +-
10 src/Makefile | 3 +++
11 src/luaconf.h | 5 +++++
12 3 files changed, 9 insertions(+), 1 deletion(-)
13
14diff --git a/Makefile b/Makefile
15index 119110d..9f6df45 100644
16--- a/Makefile
17+++ b/Makefile
18@@ -36,7 +36,7 @@ RM= rm -f
19 # == END OF USER SETTINGS -- NO NEED TO CHANGE ANYTHING BELOW THIS LINE =======
20
21 # Convenience platforms targets.
22-PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris
23+PLATS= aix bsd c89 freebsd generic linux linux-no-readline macosx mingw posix solaris
24
25 # What to install.
26 TO_BIN= lua luac
27diff --git a/src/Makefile b/src/Makefile
28index 64c78f7..5c0428a 100644
29--- a/src/Makefile
30+++ b/src/Makefile
31@@ -109,6 +109,9 @@ generic: $(ALL)
32 linux:
33 $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline"
34
35+linux-no-readline:
36+ $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX_NO_READLINE" SYSLIBS="-Wl,-E -ldl"
37+
38 macosx:
39 $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX" SYSLIBS="-lreadline"
40
41diff --git a/src/luaconf.h b/src/luaconf.h
42index 9eeeea6..d71ca25 100644
43--- a/src/luaconf.h
44+++ b/src/luaconf.h
45@@ -64,6 +64,11 @@
46 #define LUA_USE_READLINE /* needs some extra libraries */
47 #endif
48
49+#if defined(LUA_USE_LINUX_NO_READLINE)
50+#define LUA_USE_POSIX
51+#define LUA_USE_DLOPEN /* needs an extra library: -ldl */
52+#endif
53+
54
55 #if defined(LUA_USE_MACOSX)
56 #define LUA_USE_POSIX
57--
582.17.1
59
diff --git a/meta-oe/recipes-devtools/lua/lua/0001-Fixed-bug-barriers-cannot-be-active-during-sweep.patch b/meta-oe/recipes-devtools/lua/lua/0001-Fixed-bug-barriers-cannot-be-active-during-sweep.patch
deleted file mode 100644
index a302874d76..0000000000
--- a/meta-oe/recipes-devtools/lua/lua/0001-Fixed-bug-barriers-cannot-be-active-during-sweep.patch
+++ /dev/null
@@ -1,90 +0,0 @@
1From 1e6df25ac28dcd89f0324177bb55019422404b44 Mon Sep 17 00:00:00 2001
2From: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
3Date: Thu, 3 Sep 2020 15:32:17 +0800
4Subject: [PATCH] Fixed bug: barriers cannot be active during sweep
5
6Barriers cannot be active during sweep, even in generational mode.
7(Although gen. mode is not incremental, it can hit a barrier when
8deleting a thread and closing its upvalues.) The colors of objects are
9being changed during sweep and, therefore, cannot be trusted.
10
11Upstream-Status: Backport [https://github.com/lua/lua/commit/a6da1472c0c5e05ff249325f979531ad51533110]
12CVE: CVE-2020-24371
13
14[Adjust code KGC_INC -> KGC_NORMAL, refer 69371c4b84becac09c445aae01d005b49658ef82]
15Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com>
16---
17 src/lgc.c | 33 ++++++++++++++++++++++++---------
18 1 file changed, 24 insertions(+), 9 deletions(-)
19
20diff --git a/src/lgc.c b/src/lgc.c
21index 973c269..7af23d5 100644
22--- a/src/lgc.c
23+++ b/src/lgc.c
24@@ -142,10 +142,17 @@ static int iscleared (global_State *g, const TValue *o) {
25
26
27 /*
28-** barrier that moves collector forward, that is, mark the white object
29-** being pointed by a black object. (If in sweep phase, clear the black
30-** object to white [sweep it] to avoid other barrier calls for this
31-** same object.)
32+** Barrier that moves collector forward, that is, marks the white object
33+** 'v' being pointed by the black object 'o'. In the generational
34+** mode, 'v' must also become old, if 'o' is old; however, it cannot
35+** be changed directly to OLD, because it may still point to non-old
36+** objects. So, it is marked as OLD0. In the next cycle it will become
37+** OLD1, and in the next it will finally become OLD (regular old). By
38+** then, any object it points to will also be old. If called in the
39+** incremental sweep phase, it clears the black object to white (sweep
40+** it) to avoid other barrier calls for this same object. (That cannot
41+** be done is generational mode, as its sweep does not distinguish
42+** whites from deads.)
43 */
44 void luaC_barrier_ (lua_State *L, GCObject *o, GCObject *v) {
45 global_State *g = G(L);
46@@ -154,7 +161,8 @@ void luaC_barrier_ (lua_State *L, GCObject *o, GCObject *v) {
47 reallymarkobject(g, v); /* restore invariant */
48 else { /* sweep phase */
49 lua_assert(issweepphase(g));
50- makewhite(g, o); /* mark main obj. as white to avoid other barriers */
51+ if (g->gckind == KGC_NORMAL) /* incremental mode? */
52+ makewhite(g, o); /* mark 'o' as white to avoid other barriers */
53 }
54 }
55
56@@ -299,10 +307,15 @@ static void markbeingfnz (global_State *g) {
57
58
59 /*
60-** Mark all values stored in marked open upvalues from non-marked threads.
61-** (Values from marked threads were already marked when traversing the
62-** thread.) Remove from the list threads that no longer have upvalues and
63-** not-marked threads.
64+** For each non-marked thread, simulates a barrier between each open
65+** upvalue and its value. (If the thread is collected, the value will be
66+** assigned to the upvalue, but then it can be too late for the barrier
67+** to act. The "barrier" does not need to check colors: A non-marked
68+** thread must be young; upvalues cannot be older than their threads; so
69+** any visited upvalue must be young too.) Also removes the thread from
70+** the list, as it was already visited. Removes also threads with no
71+** upvalues, as they have nothing to be checked. (If the thread gets an
72+** upvalue later, it will be linked in the list again.)
73 */
74 static void remarkupvals (global_State *g) {
75 lua_State *thread;
76@@ -313,9 +326,11 @@ static void remarkupvals (global_State *g) {
77 p = &thread->twups; /* keep marked thread with upvalues in the list */
78 else { /* thread is not marked or without upvalues */
79 UpVal *uv;
80+ lua_assert(!isold(thread) || thread->openupval == NULL);
81 *p = thread->twups; /* remove thread from the list */
82 thread->twups = thread; /* mark that it is out of list */
83 for (uv = thread->openupval; uv != NULL; uv = uv->u.open.next) {
84+ lua_assert(getage(uv) <= getage(thread));
85 if (uv->u.open.touched) {
86 markvalue(g, uv->v); /* remark upvalue's value */
87 uv->u.open.touched = 0;
88--
891.9.1
90
diff --git a/meta-oe/recipes-devtools/lua/lua/CVE-2020-15888.patch b/meta-oe/recipes-devtools/lua/lua/CVE-2020-15888.patch
deleted file mode 100644
index 60a4125971..0000000000
--- a/meta-oe/recipes-devtools/lua/lua/CVE-2020-15888.patch
+++ /dev/null
@@ -1,45 +0,0 @@
1From 6298903e35217ab69c279056f925fb72900ce0b7 Mon Sep 17 00:00:00 2001
2From: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
3Date: Mon, 6 Jul 2020 12:11:54 -0300
4Subject: [PATCH] Keep minimum size when shrinking a stack
5
6When shrinking a stack (during GC), do not make it smaller than the
7initial stack size.
8---
9 ldo.c | 5 ++---
10 1 file changed, 2 insertions(+), 3 deletions(-)
11==== end of original header ====
12
13CVE: CVE-2020-15888
14
15Upstream-Status: backport [https://github.com/lua/lua.git]
16
17Signed-off-by: Joe Slater <joe.slater@windriver.com>
18
19====
20diff --git a/ldo.c b/ldo.c
21index c563b1d9..a89ac010 100644
22--- a/src/ldo.c
23+++ b/src/ldo.c
24@@ -220,7 +220,7 @@ static int stackinuse (lua_State *L) {
25
26 void luaD_shrinkstack (lua_State *L) {
27 int inuse = stackinuse(L);
28- int goodsize = inuse + (inuse / 8) + 2*EXTRA_STACK;
29+ int goodsize = inuse + BASIC_STACK_SIZE;
30 if (goodsize > LUAI_MAXSTACK)
31 goodsize = LUAI_MAXSTACK; /* respect stack limit */
32 if (L->stacksize > LUAI_MAXSTACK) /* had been handling stack overflow? */
33@@ -229,8 +229,7 @@ void luaD_shrinkstack (lua_State *L) {
34 luaE_shrinkCI(L); /* shrink list */
35 /* if thread is currently not handling a stack overflow and its
36 good size is smaller than current size, shrink its stack */
37- if (inuse <= (LUAI_MAXSTACK - EXTRA_STACK) &&
38- goodsize < L->stacksize)
39+ if (inuse <= (LUAI_MAXSTACK - EXTRA_STACK) && goodsize < L->stacksize)
40 luaD_reallocstack(L, goodsize);
41 else /* don't change stack */
42 condmovestack(L,{},{}); /* (change only for debugging) */
43--
442.17.1
45
diff --git a/meta-oe/recipes-devtools/lua/lua/lua.pc.in b/meta-oe/recipes-devtools/lua/lua/lua.pc.in
deleted file mode 100644
index c27e86e85d..0000000000
--- a/meta-oe/recipes-devtools/lua/lua/lua.pc.in
+++ /dev/null
@@ -1,10 +0,0 @@
1prefix=/usr
2libdir=${prefix}/lib
3includedir=${prefix}/include
4
5Name: Lua
6Description: Lua language engine
7Version: @VERSION@
8Requires:
9Libs: -L${libdir} -llua -lm -ldl
10Cflags: -I${includedir}
diff --git a/meta-oe/recipes-devtools/lua/lua/run-ptest b/meta-oe/recipes-devtools/lua/lua/run-ptest
deleted file mode 100644
index 8e085e1af9..0000000000
--- a/meta-oe/recipes-devtools/lua/lua/run-ptest
+++ /dev/null
@@ -1,19 +0,0 @@
1#!/bin/sh
2
3cd test
4lua -e"_U=true" all.lua > lua-test.tmp
5
6echo "--- test output ---"
7cat lua-test.tmp
8echo ""
9echo ""
10echo "--- ptest result ---"
11
12grep "final OK \!\!\!" lua-test.tmp > /dev/null
13if [ $? -eq 0 ]; then
14 echo "PASS: lua"
15else
16 echo "FAIL: lua"
17fi
18
19rm -f lua-test.tmp
diff --git a/meta-oe/recipes-devtools/lua/lua_5.3.6.bb b/meta-oe/recipes-devtools/lua/lua_5.3.6.bb
deleted file mode 100644
index af3054dcbc..0000000000
--- a/meta-oe/recipes-devtools/lua/lua_5.3.6.bb
+++ /dev/null
@@ -1,66 +0,0 @@
1DESCRIPTION = "Lua is a powerful light-weight programming language designed \
2for extending applications."
3LICENSE = "MIT"
4LIC_FILES_CHKSUM = "file://doc/readme.html;beginline=318;endline=352;md5=f43d8ee6bc4df18ef8b276439cc4a153"
5HOMEPAGE = "http://www.lua.org/"
6
7SRC_URI = "http://www.lua.org/ftp/lua-${PV}.tar.gz;name=tarballsrc \
8 file://lua.pc.in \
9 file://0001-Allow-building-lua-without-readline-on-Linux.patch \
10 file://CVE-2020-15888.patch \
11 file://0001-Fixed-bug-barriers-cannot-be-active-during-sweep.patch \
12 "
13
14# if no test suite matches PV release of Lua exactly, download the suite for the closest Lua release.
15PV_testsuites = "5.3.4"
16
17SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', \
18 'http://www.lua.org/tests/lua-${PV_testsuites}-tests.tar.gz;name=tarballtest \
19 file://run-ptest \
20 ', '', d)}"
21
22SRC_URI[tarballsrc.md5sum] = "83f23dbd5230140a3770d5f54076948d"
23SRC_URI[tarballsrc.sha256sum] = "fc5fd69bb8736323f026672b1b7235da613d7177e72558893a0bdcd320466d60"
24SRC_URI[tarballtest.md5sum] = "b14fe3748c1cb2d74e3acd1943629ba3"
25SRC_URI[tarballtest.sha256sum] = "b80771238271c72565e5a1183292ef31bd7166414cd0d43a8eb79845fa7f599f"
26
27inherit pkgconfig binconfig ptest
28
29PACKAGECONFIG ??= "readline"
30PACKAGECONFIG[readline] = ",,readline"
31
32TARGET_CC_ARCH += " -fPIC ${LDFLAGS}"
33EXTRA_OEMAKE = "'CC=${CC} -fPIC' 'MYCFLAGS=${CFLAGS} -fPIC' MYLDFLAGS='${LDFLAGS}'"
34
35do_configure:prepend() {
36 sed -i -e s:/usr/local:${prefix}:g src/luaconf.h
37 sed -i -e s:lib/lua/:${baselib}/lua/:g src/luaconf.h
38}
39
40do_compile () {
41 oe_runmake ${@bb.utils.contains('PACKAGECONFIG', 'readline', 'linux', 'linux-no-readline', d)}
42}
43
44do_install () {
45 oe_runmake \
46 'INSTALL_TOP=${D}${prefix}' \
47 'INSTALL_BIN=${D}${bindir}' \
48 'INSTALL_INC=${D}${includedir}/' \
49 'INSTALL_MAN=${D}${mandir}/man1' \
50 'INSTALL_SHARE=${D}${datadir}/lua' \
51 'INSTALL_LIB=${D}${libdir}' \
52 'INSTALL_CMOD=${D}${libdir}/lua/5.3' \
53 install
54 install -d ${D}${libdir}/pkgconfig
55
56 sed -e s/@VERSION@/${PV}/ ${WORKDIR}/lua.pc.in > ${WORKDIR}/lua.pc
57 install -m 0644 ${WORKDIR}/lua.pc ${D}${libdir}/pkgconfig/
58 rmdir ${D}${datadir}/lua/5.3
59 rmdir ${D}${datadir}/lua
60}
61
62do_install_ptest () {
63 cp -R --no-dereference --preserve=mode,links -v ${WORKDIR}/lua-${PV_testsuites}-tests ${D}${PTEST_PATH}/test
64}
65
66BBCLASSEXTEND = "native nativesdk"