Petr Gajdos
7312016b17
- version update to 2.9.8 (changed upstream: Trustwave -> OWASP) * Fixed ap_log_perror() usage * Memory leaks + enhanced logging * CI improvement: First check syntax & always display error/audit logs * Fixed assert() usage * Removed useless code * feat: Check if the MP header contains invalid character * Use standard httpd logging format in error log * fix msc_regexec() != PCRE_ERROR_NOMATCH strict check * Move xmlFree() call to the right place * Add collection size in log in case of writing error * Passing address of lock instead of lock in acquire_global_lock() * Invalid pointer access in case rule id == NOT_SET_P * Show error.log after httpd start in CI * chore: add pull request template * chore: add gitignore file * Possible double free * Set 'jit' variable's initial value * Missing null byte + optimization * fix: remove usage of insecure tmpname * docs: update copyright * Enhanced logging [Issue #3107] * Check for null pointer dereference (almost) everywhere * Fix possible segfault in collection_unpack * fix: Replace obsolete macros * chore: update bug-report-for-version-2-x.md * feat: Add more steps: install built module and restart the server * Add new flag: --without-lua * Initial release of CI worklow OBS-URL: https://build.opensuse.org/package/show/Apache:Modules/apache2-mod_security2?expand=0&rev=97
96 lines
3.4 KiB
RPMSpec
96 lines
3.4 KiB
RPMSpec
#
|
|
# spec file for package apache2-mod_security2
|
|
#
|
|
# Copyright (c) 2025 SUSE LLC
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
Name: apache2-mod_security2
|
|
Version: 2.9.8
|
|
Release: 0
|
|
Summary: Web Application Firewall for Apache httpd
|
|
License: Apache-2.0
|
|
Group: Productivity/Networking/Web/Servers
|
|
URL: https://www.modsecurity.org/
|
|
Source0: https://github.com/owasp-modsecurity/ModSecurity/releases/download/v%{version}/modsecurity-v%{version}.tar.gz
|
|
Source1: https://github.com/owasp-modsecurity/ModSecurity/releases/download/v%{version}/modsecurity-v%{version}.tar.gz.asc
|
|
Source2: apache2-mod_security2.keyring
|
|
Source3: mod_security2.conf
|
|
Source4: README_SUSE
|
|
Patch0: apache2-mod_security2-no_rpath.diff
|
|
Patch1: modsecurity-fixes.patch
|
|
Patch2: apache2-mod_security2_tests_conf.patch
|
|
# https://github.com/SpiderLabs/ModSecurity/issues/2514
|
|
Patch3: modsecurity-2.9.3-input_filtering_errors.patch
|
|
# fix build with gcc14
|
|
Patch4: apache2-mod_security2-gcc14.patch
|
|
BuildRequires: apache-rpm-macros
|
|
BuildRequires: apache2-devel
|
|
BuildRequires: apache2-prefork
|
|
BuildRequires: autoconf
|
|
BuildRequires: automake
|
|
BuildRequires: c++_compiler
|
|
BuildRequires: libcurl-devel
|
|
BuildRequires: libtool
|
|
BuildRequires: libxml2-devel
|
|
BuildRequires: lua53-devel
|
|
BuildRequires: pcre-devel
|
|
BuildRequires: perl-libwww-perl
|
|
BuildRequires: pkgconfig
|
|
Requires: %{apache_mmn}
|
|
Requires: %{apache_suse_maintenance_mmn}
|
|
Requires: apache2
|
|
Recommends: owasp-modsecurity-crs-apache2
|
|
|
|
%description
|
|
ModSecurity is an intrusion detection and prevention
|
|
engine for web applications (or a web application firewall). Operating
|
|
as an Apache Web server module or standalone, the purpose of
|
|
ModSecurity is to increase web application security, protecting web
|
|
applications from known and unknown attacks.
|
|
|
|
%prep
|
|
%autosetup -p1 -n modsecurity-v%{version}
|
|
cp %{SOURCE4} .
|
|
|
|
%build
|
|
aclocal
|
|
automake
|
|
%configure --with-apxs=%{apache_apxs} --enable-request-early --enable-htaccess-config --disable-mlogc
|
|
CFLAGS="%{optflags}" make %{?_smp_mflags}
|
|
|
|
%install
|
|
pushd apache2
|
|
install -d -m 0755 %{buildroot}%{apache_libexecdir}
|
|
install .libs/mod_security2.so %{buildroot}%{apache_libexecdir}/mod_security2.so
|
|
popd
|
|
mkdir -p %{buildroot}%{apache_sysconfdir}/mod_security2.d
|
|
mkdir -p %{buildroot}%{apache_sysconfdir}/mod_security2.d/rules
|
|
mkdir -p %{buildroot}%{apache_sysconfdir}/conf.d/
|
|
cp -a %{SOURCE3} %{buildroot}%{apache_sysconfdir}/conf.d/
|
|
|
|
%check
|
|
make test
|
|
|
|
%files
|
|
%{apache_libexecdir}/mod_security2.so
|
|
%license LICENSE
|
|
%dir %{apache_sysconfdir}/mod_security2.d
|
|
%dir %{apache_sysconfdir}/mod_security2.d/rules
|
|
%dir %{apache_sysconfdir}/conf.d/
|
|
%config(noreplace) %{apache_sysconfdir}/conf.d/mod_security2.conf
|
|
%doc README.md CHANGES NOTICE authors.txt README_SUSE
|
|
|
|
%changelog
|