From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 3817C158093 for ; Sat, 2 Jul 2022 14:55:45 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7581CE09E5; Sat, 2 Jul 2022 14:55:44 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 467CCE09E5 for ; Sat, 2 Jul 2022 14:55:44 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id DCB58341BFD for ; Sat, 2 Jul 2022 14:55:42 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 376B7501 for ; Sat, 2 Jul 2022 14:55:41 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1656773733.881481e001d00a730884606bfb07eebd5b130dde.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/redis/, dev-db/redis/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-db/redis/files/redis-5.0-luajit-2.1-fix.patch dev-db/redis/redis-5.0.14.ebuild dev-db/redis/redis-6.0.16.ebuild dev-db/redis/redis-6.2.6.ebuild X-VCS-Directories: dev-db/redis/files/ dev-db/redis/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 881481e001d00a730884606bfb07eebd5b130dde X-VCS-Branch: master Date: Sat, 2 Jul 2022 14:55:41 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: b724fd8d-bb63-4eee-9eba-a5b9a5cc3d13 X-Archives-Hash: 5bda65608087358c762be1f280d38edc commit: 881481e001d00a730884606bfb07eebd5b130dde Author: Petr Vaněk atlas cz> AuthorDate: Fri Jul 1 13:23:28 2022 +0000 Commit: Sam James gentoo org> CommitDate: Sat Jul 2 14:55:33 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=881481e0 dev-db/redis: build fix for luajit-2.1 luajit-2.1 integrated few extensions from lua5.2 [1] luaL_setfuncs being one of them. The same function is implemented in bundled lua-cjson for lua5.1 but is not properly guarded for luajit-2.1. This change backports the fix [2,3] from https://github.com/openresty/lua-cjson. [1] https://github.com/LuaJIT/LuaJIT/commit/de97b9d52bbc42effeaf1180764053a912526873 [2] https://github.com/openresty/lua-cjson/commit/638ac2741a7f274979ac3fe2e1ea5fd6487702fe [3] https://github.com/openresty/lua-cjson/pull/32 Closes: https://bugs.gentoo.org/842444 Signed-off-by: Petr Vaněk atlas.cz> Signed-off-by: Sam James gentoo.org> dev-db/redis/files/redis-5.0-luajit-2.1-fix.patch | 47 +++++++++++++++++++++++ dev-db/redis/redis-5.0.14.ebuild | 1 + dev-db/redis/redis-6.0.16.ebuild | 1 + dev-db/redis/redis-6.2.6.ebuild | 1 + 4 files changed, 50 insertions(+) diff --git a/dev-db/redis/files/redis-5.0-luajit-2.1-fix.patch b/dev-db/redis/files/redis-5.0-luajit-2.1-fix.patch new file mode 100644 index 000000000000..968fc865da86 --- /dev/null +++ b/dev-db/redis/files/redis-5.0-luajit-2.1-fix.patch @@ -0,0 +1,47 @@ +Backported from https://github.com/openresty/lua-cjson + +Upstream-commit: 638ac2741a7f ("optimize: improved forward-compatibility with older versions of Lua/LuaJIT.") +Link: https://github.com/openresty/lua-cjson/commit/638ac2741a7f274979ac3fe2e1ea5fd6487702fe +Upstream-PR: https://github.com/openresty/lua-cjson/pull/32 +See-also: https://www.freelists.org/post/luajit/ANN-LuaJIT210beta3,3 + +diff --git a/deps/lua/src/lua_cjson.c b/deps/lua/src/lua_cjson.c +index c26c0d7b8..af9e4ca54 100644 +--- a/deps/lua/src/lua_cjson.c ++++ b/deps/lua/src/lua_cjson.c +@@ -1293,11 +1293,13 @@ static int json_decode(lua_State *l) + /* ===== INITIALISATION ===== */ + + #if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 502 +-/* Compatibility for Lua 5.1. ++/* Compatibility for Lua 5.1 and older LuaJIT. + * +- * luaL_setfuncs() is used to create a module table where the functions have +- * json_config_t as their first upvalue. Code borrowed from Lua 5.2 source. */ +-static void luaL_setfuncs (lua_State *l, const luaL_Reg *reg, int nup) ++ * compat_luaL_setfuncs() is used to create a module table where the functions ++ * have json_config_t as their first upvalue. Code borrowed from Lua 5.2 ++ * source's luaL_setfuncs(). ++ */ ++static void compat_luaL_setfuncs(lua_State *l, const luaL_Reg *reg, int nup) + { + int i; + +@@ -1310,6 +1312,8 @@ static void luaL_setfuncs (lua_State *l, const luaL_Reg *reg, int nup) + } + lua_pop(l, nup); /* remove upvalues */ + } ++#else ++#define compat_luaL_setfuncs(L, reg, nup) luaL_setfuncs(L, reg, nup) + #endif + + /* Call target function in protected mode with all supplied args. +@@ -1365,7 +1369,7 @@ static int lua_cjson_new(lua_State *l) + + /* Register functions with config data as upvalue */ + json_create_config(l); +- luaL_setfuncs(l, reg, 1); ++ compat_luaL_setfuncs(l, reg, 1); + + /* Set cjson.null */ + lua_pushlightuserdata(l, NULL); diff --git a/dev-db/redis/redis-5.0.14.ebuild b/dev-db/redis/redis-5.0.14.ebuild index b12534f6948d..5064cb59f2ec 100644 --- a/dev-db/redis/redis-5.0.14.ebuild +++ b/dev-db/redis/redis-5.0.14.ebuild @@ -45,6 +45,7 @@ PATCHES=( "${FILESDIR}"/${PN}-5.0-sharedlua.patch "${FILESDIR}"/${PN}-5.0.8-ppc-atomic.patch "${FILESDIR}"/${PN}-sentinel-5.0-config.patch + "${FILESDIR}"/${PN}-5.0-luajit-2.1-fix.patch ) src_prepare() { diff --git a/dev-db/redis/redis-6.0.16.ebuild b/dev-db/redis/redis-6.0.16.ebuild index 45e59b644a37..9c1f2e88c2da 100644 --- a/dev-db/redis/redis-6.0.16.ebuild +++ b/dev-db/redis/redis-6.0.16.ebuild @@ -60,6 +60,7 @@ PATCHES=( "${FILESDIR}"/${PN}-6.0.12-sharedlua.patch "${FILESDIR}"/${PN}-5.0.8-ppc-atomic.patch "${FILESDIR}"/${PN}-sentinel-5.0-config.patch + "${FILESDIR}"/${PN}-5.0-luajit-2.1-fix.patch ) src_prepare() { diff --git a/dev-db/redis/redis-6.2.6.ebuild b/dev-db/redis/redis-6.2.6.ebuild index 5f9d87086347..364e49a7adb2 100644 --- a/dev-db/redis/redis-6.2.6.ebuild +++ b/dev-db/redis/redis-6.2.6.ebuild @@ -60,6 +60,7 @@ PATCHES=( "${FILESDIR}"/${PN}-6.2.1-sharedlua.patch "${FILESDIR}"/${PN}-6.2.3-ppc-atomic.patch "${FILESDIR}"/${PN}-sentinel-5.0-config.patch + "${FILESDIR}"/${PN}-5.0-luajit-2.1-fix.patch ) src_prepare() {