From deb0e0b6c98e9fa4fed20c48553763b35c659d3922fc4d4531dd12a853dcbf40 Mon Sep 17 00:00:00 2001 From: Petr Gajdos Date: Mon, 13 May 2024 09:19:16 +0000 Subject: [PATCH] Accepting request 1172451 from home:pgajdos - added patches fix fix build with gcc14 + apache2-mod_security2-gcc14.patch OBS-URL: https://build.opensuse.org/request/show/1172451 OBS-URL: https://build.opensuse.org/package/show/Apache:Modules/apache2-mod_security2?expand=0&rev=92 --- apache2-mod_security2-gcc14.patch | 35 +++++++++++++++++++++++++++++++ apache2-mod_security2.changes | 7 +++++++ apache2-mod_security2.spec | 5 ++++- 3 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 apache2-mod_security2-gcc14.patch diff --git a/apache2-mod_security2-gcc14.patch b/apache2-mod_security2-gcc14.patch new file mode 100644 index 0000000..00ec97a --- /dev/null +++ b/apache2-mod_security2-gcc14.patch @@ -0,0 +1,35 @@ +Index: modsecurity-2.9.7/tests/msc_test.c +=================================================================== +--- modsecurity-2.9.7.orig/tests/msc_test.c ++++ modsecurity-2.9.7/tests/msc_test.c +@@ -81,7 +81,7 @@ char DSOLOCAL *real_server_signature = N + int DSOLOCAL remote_rules_fail_action = REMOTE_RULES_ABORT_ON_FAIL; + char DSOLOCAL *remote_rules_fail_message = NULL; + module AP_MODULE_DECLARE_DATA security2_module = { +- NULL, ++ STANDARD20_MODULE_STUFF, + NULL, + NULL, + NULL, +Index: modsecurity-2.9.7/standalone/config.c +=================================================================== +--- modsecurity-2.9.7.orig/standalone/config.c ++++ modsecurity-2.9.7/standalone/config.c +@@ -989,7 +989,7 @@ AP_DECLARE(const char *) process_fnmatch + const char *rootpath, *filepath = fname; + + /* locate the start of the directories proper */ +- status = apr_filepath_root(&rootpath, &filepath, APR_FILEPATH_TRUENAME | APR_FILEPATH_NATIVE, ptemp); ++ status = apr_filepath_root((const char **) &rootpath, (const char **) &filepath, APR_FILEPATH_TRUENAME | APR_FILEPATH_NATIVE, ptemp); + + /* we allow APR_SUCCESS and APR_EINCOMPLETE */ + if (APR_ERELATIVE == status) { +@@ -1104,7 +1104,7 @@ ProcessInclude: + incpath = w; + + /* locate the start of the directories proper */ +- status = apr_filepath_root(&rootpath, &incpath, APR_FILEPATH_TRUENAME | APR_FILEPATH_NATIVE, ptemp); ++ status = apr_filepath_root((const char**) &rootpath, (const char **) &incpath, APR_FILEPATH_TRUENAME | APR_FILEPATH_NATIVE, ptemp); + + /* we allow APR_SUCCESS and APR_EINCOMPLETE */ + if (APR_ERELATIVE == status) { diff --git a/apache2-mod_security2.changes b/apache2-mod_security2.changes index 9953425..92bb3cf 100644 --- a/apache2-mod_security2.changes +++ b/apache2-mod_security2.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue May 7 13:16:44 UTC 2024 - pgajdos@suse.com + +- added patches + fix fix build with gcc14 + + apache2-mod_security2-gcc14.patch + ------------------------------------------------------------------- Tue Feb 20 11:02:36 UTC 2024 - Dominique Leuenberger diff --git a/apache2-mod_security2.spec b/apache2-mod_security2.spec index cfc7c53..e81f78a 100644 --- a/apache2-mod_security2.spec +++ b/apache2-mod_security2.spec @@ -1,7 +1,7 @@ # # spec file for package apache2-mod_security2 # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -36,6 +36,8 @@ 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 @@ -68,6 +70,7 @@ mv -v SpiderLabs* rules %patch -P 1 -p1 %patch -P 2 -p1 %patch -P 3 -p1 +%patch4 -p1 %build aclocal