diff --git a/mod_security.spec b/mod_security.spec index 5e2d55e..cd51a5a 100644 --- a/mod_security.spec +++ b/mod_security.spec @@ -8,15 +8,16 @@ %bcond_without mlogc Summary: Security module for the Apache HTTP Server -Name: mod_security +Name: mod_security Version: 2.9.3 -Release: 6%{?dist} +Release: 7%{?dist} License: ASL 2.0 URL: http://www.modsecurity.org/ Source: https://github.com/SpiderLabs/ModSecurity/releases/download/v%{version}/modsecurity-%{version}.tar.gz Source1: mod_security.conf Source2: 10-mod_security.conf Source3: modsecurity_localrules.conf +Patch0: modsecurity-2.9.3-lua-54.patch Requires: httpd httpd-mmn = %{_httpd_mmn} %if 0%{?fedora} || 0%{?rhel} > 7 # Ensure apache user exists for file ownership @@ -36,7 +37,7 @@ BuildRequires: pkgconfig(lua) %if 0%{?el6} BuildRequires: yajl-devel %else -BuildRequires: pkgconfig(yajl) +BuildRequires: pkgconfig(yajl) %endif @@ -59,7 +60,7 @@ This package contains the ModSecurity Audit Log Collector. %endif %prep -%setup -q -n modsecurity-%{version} +%autosetup -p1 -n modsecurity-%{version} %build %configure --enable-pcre-match-limit=1000000 \ @@ -137,6 +138,9 @@ install -m0644 mlogc/mlogc-default.conf %{buildroot}%{_sysconfdir}/mlogc.conf %endif %changelog +* Sat Aug 08 2020 Othman Madjoudj - 2.9.3-7 +- Add a patch to fix build with Lua 5.4 until we completely switch to mod_sec3 as default + * Sat Aug 01 2020 Fedora Release Engineering - 2.9.3-6 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild diff --git a/modsecurity-2.9.3-lua-54.patch b/modsecurity-2.9.3-lua-54.patch new file mode 100644 index 0000000..ca6e560 --- /dev/null +++ b/modsecurity-2.9.3-lua-54.patch @@ -0,0 +1,31 @@ +diff -ru modsecurity-2.9.3/apache2/msc_lua.c modsecurity-2.9.3-lua-patch/apache2/msc_lua.c +--- modsecurity-2.9.3/apache2/msc_lua.c 2018-12-04 18:49:37.000000000 +0000 ++++ modsecurity-2.9.3-lua-patch/apache2/msc_lua.c 2020-08-08 16:55:14.936045777 +0000 +@@ -429,12 +429,12 @@ + #else + + /* Create new state. */ +-#if LUA_VERSION_NUM == 502 || LUA_VERSION_NUM == 503 || LUA_VERSION_NUM == 501 ++#if LUA_VERSION_NUM == 502 || LUA_VERSION_NUM == 503 || LUA_VERSION_NUM == 501 || LUA_VERSION_NUM == 504 + L = luaL_newstate(); + #elif LUA_VERSION_NUM == 500 + L = lua_open(); + #else +-#error We are only tested under Lua 5.0, 5.1, 5.2, or 5.3. ++#error We are only tested under Lua 5.0, 5.1, 5.2, 5.3 or 5.4. + #endif + luaL_openlibs(L); + +@@ -459,10 +459,10 @@ + /* Register functions. */ + #if LUA_VERSION_NUM == 500 || LUA_VERSION_NUM == 501 + luaL_register(L, "m", mylib); +-#elif LUA_VERSION_NUM == 502 || LUA_VERSION_NUM == 503 ++#elif LUA_VERSION_NUM == 502 || LUA_VERSION_NUM == 503 || LUA_VERSION_NUM == 504 + luaL_setfuncs(L, mylib, 0); + #else +-#error We are only tested under Lua 5.0, 5.1, 5.2, or 5.3. ++#error We are only tested under Lua 5.0, 5.1, 5.2, 5.3 or 5.4. + #endif + + lua_setglobal(L, "m");