From 404e95423a021cffd552f89252ef2aca8dadf87fc04cb9f4e148ec4f9d6bf014 Mon Sep 17 00:00:00 2001 From: Petr Gajdos Date: Wed, 29 Jul 2015 07:02:10 +0000 Subject: [PATCH] Accepting request 319200 from home:pgajdos:apache2 - fix build for lua 5.3 OBS-URL: https://build.opensuse.org/request/show/319200 OBS-URL: https://build.opensuse.org/package/show/Apache:Modules/apache2-mod_security2?expand=0&rev=67 --- apache2-mod_security2-lua-5.3.patch | 26 ++++++++++++++++++++++++++ apache2-mod_security2.changes | 5 +++++ apache2-mod_security2.spec | 3 +++ 3 files changed, 34 insertions(+) create mode 100644 apache2-mod_security2-lua-5.3.patch diff --git a/apache2-mod_security2-lua-5.3.patch b/apache2-mod_security2-lua-5.3.patch new file mode 100644 index 0000000..7951453 --- /dev/null +++ b/apache2-mod_security2-lua-5.3.patch @@ -0,0 +1,26 @@ +From 422e22141b9f6cdd0496919093fcf51b02732b84 Mon Sep 17 00:00:00 2001 +From: Athmane Madjoudj +Date: Fri, 13 Feb 2015 13:24:50 +0100 +Subject: [PATCH] Fix build issue with Lua >= 5.3 + +--- + apache2/msc_lua.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/apache2/msc_lua.c b/apache2/msc_lua.c +index f4482ae..58206a7 100644 +--- a/apache2/msc_lua.c ++++ b/apache2/msc_lua.c +@@ -111,8 +111,11 @@ char *lua_compile(msc_script **script, const char *filename, apr_pool_t *pool) { + dump.pool = pool; + dump.parts = apr_array_make(pool, 128, sizeof(msc_script_part *)); + ++#if LUA_VERSION_NUM >= 503 ++ lua_dump(L, dump_writer, &dump, 1); ++#else + lua_dump(L, dump_writer, &dump); +- ++#endif + (*script) = apr_pcalloc(pool, sizeof(msc_script)); + (*script)->name = filename; + (*script)->parts = dump.parts; diff --git a/apache2-mod_security2.changes b/apache2-mod_security2.changes index 17819f6..de90577 100644 --- a/apache2-mod_security2.changes +++ b/apache2-mod_security2.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Jul 29 06:42:19 UTC 2015 - pgajdos@suse.com + +- fix build for lua 5.3 + ------------------------------------------------------------------- Thu Jul 16 07:22:02 UTC 2015 - pgajdos@suse.com diff --git a/apache2-mod_security2.spec b/apache2-mod_security2.spec index 25eb6ae..f263e09 100644 --- a/apache2-mod_security2.spec +++ b/apache2-mod_security2.spec @@ -38,6 +38,8 @@ Source6: README-SUSE-mod_security2.txt Source7: empty.conf Patch0: apache2-mod_security2-no_rpath.diff Patch1: modsecurity-fixes.patch +# https://github.com/SpiderLabs/ModSecurity/pull/837 +Patch2: apache2-mod_security2-lua-5.3.patch BuildRequires: apache-rpm-macros BuildRequires: apache2-devel BuildRequires: apache2-prefork @@ -73,6 +75,7 @@ bzip2 -dc %{SOURCE3} > %{_sourcedir}/%{refman} && touch -r %{SOURCE3} %{_sourced bzip2 -dc %{SOURCE4} > %{_sourcedir}/%{faq} && touch -r %{SOURCE4} %{_sourcedir}/%{faq} %patch0 %patch1 -p1 +%patch2 -p1 %build # aclocal only works with never distributions,