Add a patch to fix build with Lua 5.4 until we completely switch to mod_sec3 as default
This commit is contained in:
		
							parent
							
								
									ca0ced0078
								
							
						
					
					
						commit
						6feb5eee2e
					
				| @ -10,13 +10,14 @@ | |||||||
| Summary: Security module for the Apache HTTP Server | Summary: Security module for the Apache HTTP Server | ||||||
| Name: mod_security | Name: mod_security | ||||||
| Version: 2.9.3 | Version: 2.9.3 | ||||||
| Release: 6%{?dist} | Release: 7%{?dist} | ||||||
| License: ASL 2.0 | License: ASL 2.0 | ||||||
| URL: http://www.modsecurity.org/ | URL: http://www.modsecurity.org/ | ||||||
| Source: https://github.com/SpiderLabs/ModSecurity/releases/download/v%{version}/modsecurity-%{version}.tar.gz | Source: https://github.com/SpiderLabs/ModSecurity/releases/download/v%{version}/modsecurity-%{version}.tar.gz | ||||||
| Source1: mod_security.conf | Source1: mod_security.conf | ||||||
| Source2: 10-mod_security.conf | Source2: 10-mod_security.conf | ||||||
| Source3: modsecurity_localrules.conf | Source3: modsecurity_localrules.conf | ||||||
|  | Patch0: modsecurity-2.9.3-lua-54.patch | ||||||
| Requires: httpd httpd-mmn = %{_httpd_mmn} | Requires: httpd httpd-mmn = %{_httpd_mmn} | ||||||
| %if 0%{?fedora} || 0%{?rhel} > 7 | %if 0%{?fedora} || 0%{?rhel} > 7 | ||||||
| # Ensure apache user exists for file ownership | # Ensure apache user exists for file ownership | ||||||
| @ -59,7 +60,7 @@ This package contains the ModSecurity Audit Log Collector. | |||||||
| %endif | %endif | ||||||
| 
 | 
 | ||||||
| %prep | %prep | ||||||
| %setup -q -n modsecurity-%{version} | %autosetup -p1 -n modsecurity-%{version} | ||||||
| 
 | 
 | ||||||
| %build | %build | ||||||
| %configure --enable-pcre-match-limit=1000000 \ | %configure --enable-pcre-match-limit=1000000 \ | ||||||
| @ -137,6 +138,9 @@ install -m0644 mlogc/mlogc-default.conf %{buildroot}%{_sysconfdir}/mlogc.conf | |||||||
| %endif | %endif | ||||||
| 
 | 
 | ||||||
| %changelog | %changelog | ||||||
|  | * Sat Aug 08 2020 Othman Madjoudj <athmane@fedoraproject.org> - 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 <releng@fedoraproject.org> - 2.9.3-6 | * Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.3-6 | ||||||
| - Second attempt - Rebuilt for | - Second attempt - Rebuilt for | ||||||
|   https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild |   https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild | ||||||
|  | |||||||
							
								
								
									
										31
									
								
								modsecurity-2.9.3-lua-54.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								modsecurity-2.9.3-lua-54.patch
									
									
									
									
									
										Normal file
									
								
							| @ -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"); | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user