Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package apache2 for openSUSE:Factory checked in at 2021-02-04 20:23:43 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/apache2 (Old) and /work/SRC/openSUSE:Factory/.apache2.new.28504 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "apache2" Thu Feb 4 20:23:43 2021 rev:182 rq:867750 version:2.4.46 Changes: -------- --- /work/SRC/openSUSE:Factory/apache2/apache2.changes 2021-01-27 18:57:10.164334475 +0100 +++ /work/SRC/openSUSE:Factory/.apache2.new.28504/apache2.changes 2021-02-04 20:24:20.218850268 +0100 @@ -1,0 +2,5 @@ +Wed Jan 27 17:42:09 UTC 2021 - Callum Farmer <gm...@opensuse.org> + +- Add lua54.patch to fix building with lua54 + +------------------------------------------------------------------- New: ---- lua54.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ apache2.spec ++++++ --- /var/tmp/diff_new_pack.3uIqY3/_old 2021-02-04 20:24:22.538853800 +0100 +++ /var/tmp/diff_new_pack.3uIqY3/_new 2021-02-04 20:24:22.542853806 +0100 @@ -191,6 +191,8 @@ Patch4: apache2-HttpContentLengthHeadZero-HttpExpectStrict.patch # [bsc#1174052] picked upstream commit Patch5: apache2-mod_proxy_uwsgi-fix-crash.patch +# PATCH: https://svn.apache.org/viewvc?view=revision&revision=1880678 +Patch6: lua54.patch # PATCH: https://marc.info/?l=apache-httpd-users&m=147448312531134&w=2 Patch100: apache-test-application-xml-type.patch # PATCH: /test_ssl_var_lookup?SSL_SERVER_SAN_DNS_0 returns <build-host-name> @@ -328,6 +330,7 @@ %patch3 -p1 %patch4 -p1 %patch5 -p1 +%patch6 -p1 %patch100 -p1 %patch101 -p1 ++++++ lua54.patch ++++++ --- a/modules/lua/config.m4 +++ b/modules/lua/config.m4 @@ -34,7 +34,7 @@ fi ]) -dnl Check for Lua 5.3/5.2/5.1 Libraries +dnl Check for Lua Libraries dnl CHECK_LUA(ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]) dnl Sets: dnl LUA_CFLAGS @@ -44,7 +44,7 @@ AC_ARG_WITH( lua, - [AC_HELP_STRING([--with-lua=PATH],[Path to the Lua 5.3/5.2/5.1 prefix])], + [AC_HELP_STRING([--with-lua=PATH],[Path to the Lua installation prefix])], lua_path="$withval", :) @@ -65,6 +65,10 @@ AC_CHECK_LIB(m, pow, lib_m="-lm") AC_CHECK_LIB(m, sqrt, lib_m="-lm") for x in $test_paths ; do + CHECK_LUA_PATH([${x}], [include/lua-5.4], [lib/lua-5.4], [lua-5.4]) + CHECK_LUA_PATH([${x}], [include/lua5.4], [lib], [lua5.4]) + CHECK_LUA_PATH([${x}], [include/lua54], [lib/lua54], [lua]) + CHECK_LUA_PATH([${x}], [include/lua-5.3], [lib/lua-5.3], [lua-5.3]) CHECK_LUA_PATH([${x}], [include/lua5.3], [lib], [lua5.3]) CHECK_LUA_PATH([${x}], [include/lua53], [lib/lua53], [lua]) @@ -85,13 +89,13 @@ AC_SUBST(LUA_CFLAGS) if test -z "${LUA_LIBS}"; then - AC_MSG_WARN([*** Lua 5.3 5.2 or 5.1 library not found.]) + AC_MSG_WARN([*** Lua 5.4 5.3 5.2 or 5.1 library not found.]) ifelse([$2], , enable_lua="no" if test -z "${lua_path}"; then - AC_MSG_WARN([Lua 5.3 5.2 or 5.1 library is required]) + AC_MSG_WARN([Lua 5.4 5.3 5.2 or 5.1 library is required]) else - AC_MSG_ERROR([Lua 5.3 5.2 or 5.1 library is required]) + AC_MSG_ERROR([Lua 5.4 5.3 5.2 or 5.1 library is required]) fi, $2) else --- a/modules/lua/mod_lua.c +++ b/modules/lua/mod_lua.c @@ -342,7 +342,7 @@ { apr_pool_t *pool; ap_lua_vm_spec *spec; - int n, rc; + int n, rc, nres; lua_State *L; lua_filter_ctx *ctx; ap_lua_server_cfg *server_cfg = ap_get_module_config(r->server->module_config, @@ -410,7 +410,7 @@ /* If a Lua filter is interested in filtering a request, it must first do a yield, * otherwise we'll assume that it's not interested and pretend we didn't find it. */ - rc = lua_resume(L, 1); + rc = lua_resume(L, 1, &nres); if (rc == LUA_YIELD) { if (f->frec->providers == NULL) { /* Not wired by mod_filter */ @@ -432,7 +432,7 @@ static apr_status_t lua_output_filter_handle(ap_filter_t *f, apr_bucket_brigade *pbbIn) { request_rec *r = f->r; - int rc; + int rc, nres; lua_State *L; lua_filter_ctx* ctx; conn_rec *c = r->connection; @@ -492,7 +492,7 @@ lua_setglobal(L, "bucket"); /* If Lua yielded, it means we have something to pass on */ - if (lua_resume(L, 0) == LUA_YIELD) { + if (lua_resume(L, 0, &nres) == LUA_YIELD && nres == 1) { size_t olen; const char* output = lua_tolstring(L, 1, &olen); if (olen > 0) { @@ -524,7 +524,7 @@ apr_bucket *pbktEOS; lua_pushnil(L); lua_setglobal(L, "bucket"); - if (lua_resume(L, 0) == LUA_YIELD) { + if (lua_resume(L, 0, &nres) == LUA_YIELD && nres == 1) { apr_bucket *pbktOut; size_t olen; const char* output = lua_tolstring(L, 1, &olen); @@ -558,7 +558,7 @@ apr_off_t nBytes) { request_rec *r = f->r; - int rc, lastCall = 0; + int rc, lastCall = 0, nres; lua_State *L; lua_filter_ctx* ctx; conn_rec *c = r->connection; @@ -621,7 +621,7 @@ lua_setglobal(L, "bucket"); /* If Lua yielded, it means we have something to pass on */ - if (lua_resume(L, 0) == LUA_YIELD) { + if (lua_resume(L, 0, &nres) == LUA_YIELD && nres == 1) { size_t olen; const char* output = lua_tolstring(L, 1, &olen); pbktOut = apr_bucket_heap_create(output, olen, 0, c->bucket_alloc); @@ -643,7 +643,7 @@ apr_bucket *pbktEOS = apr_bucket_eos_create(c->bucket_alloc); lua_pushnil(L); lua_setglobal(L, "bucket"); - if (lua_resume(L, 0) == LUA_YIELD) { + if (lua_resume(L, 0, &nres) == LUA_YIELD && nres == 1) { apr_bucket *pbktOut; size_t olen; const char* output = lua_tolstring(L, 1, &olen); --- a/modules/lua/mod_lua.h +++ b/modules/lua/mod_lua.h @@ -48,7 +48,15 @@ #if LUA_VERSION_NUM > 501 /* Load mode for lua_load() */ #define lua_load(a,b,c,d) lua_load(a,b,c,d,NULL) -#define lua_resume(a,b) lua_resume(a, NULL, b) + +#if LUA_VERSION_NUM > 503 +#define lua_resume(a,b,c) lua_resume(a, NULL, b, c) +#else +/* ### For version < 5.4, assume that exactly one stack item is on the + * stack, which is what the code did before but seems dubious. */ +#define lua_resume(a,b,c) (*(c) = 1, lua_resume(a, NULL, b)) +#endif + #define luaL_setfuncs_compat(a,b) luaL_setfuncs(a,b,0) #else #define lua_rawlen(L,i) lua_objlen(L, (i))