diff options
author | Z. Liu <zhixu.liu@gmail.com> | 2024-08-30 17:19:56 +0800 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2024-09-02 03:54:28 +0100 |
commit | e98d8ef5572fae7d42e80acbb2464e70eb0ab5e7 (patch) | |
tree | 9ea0126b1f894ceaa3deb1109a8fbb096538b52a /www-servers | |
parent | sys-fs/xfsprogs: stabilize 6.8.0 for hppa (diff) | |
download | gentoo-e98d8ef5572fae7d42e80acbb2464e70eb0ab5e7.tar.gz gentoo-e98d8ef5572fae7d42e80acbb2464e70eb0ab5e7.tar.bz2 gentoo-e98d8ef5572fae7d42e80acbb2464e70eb0ab5e7.zip |
www-servers/nginx: add patch for http_security from upstream
see https://github.com/owasp-modsecurity/ModSecurity-nginx/commit/7d37ace7431ea9704faa98f29876bcd72ef4b1ff
Closes: https://bugs.gentoo.org/933598
Signed-off-by: Z. Liu <zhixu.liu@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/38343
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'www-servers')
-rw-r--r-- | www-servers/nginx/files/http_security-nginx-1.26.2.patch | 26 | ||||
-rw-r--r-- | www-servers/nginx/nginx-1.26.2-r2.ebuild (renamed from www-servers/nginx/nginx-1.26.2-r1.ebuild) | 6 | ||||
-rw-r--r-- | www-servers/nginx/nginx-1.27.1-r2.ebuild (renamed from www-servers/nginx/nginx-1.27.1-r1.ebuild) | 6 |
3 files changed, 38 insertions, 0 deletions
diff --git a/www-servers/nginx/files/http_security-nginx-1.26.2.patch b/www-servers/nginx/files/http_security-nginx-1.26.2.patch new file mode 100644 index 000000000000..26e3ea6046f0 --- /dev/null +++ b/www-servers/nginx/files/http_security-nginx-1.26.2.patch @@ -0,0 +1,26 @@ +From 7d37ace7431ea9704faa98f29876bcd72ef4b1ff Mon Sep 17 00:00:00 2001 +From: Ervin Hegedus <airween@gmail.com> +Date: Tue, 23 Apr 2024 21:42:02 +0200 +Subject: [PATCH] fix: Added missing header for conftest + +--- + config | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/config b/config +index c6e7467..3bf06a8 100644 +--- a/config ++++ b/config +@@ -10,7 +10,8 @@ + + ngx_feature_name= + ngx_feature_run=no +-ngx_feature_incs="#include <modsecurity/modsecurity.h>" ++ngx_feature_incs="#include <modsecurity/modsecurity.h> ++#include <stdio.h>" + ngx_feature_libs="-lmodsecurity" + ngx_feature_test='printf("hello");' + ngx_modsecurity_opt_I= +-- +2.26.2 + diff --git a/www-servers/nginx/nginx-1.26.2-r1.ebuild b/www-servers/nginx/nginx-1.26.2-r2.ebuild index 1971e684ca8a..fe6db3b44206 100644 --- a/www-servers/nginx/nginx-1.26.2-r1.ebuild +++ b/www-servers/nginx/nginx-1.26.2-r2.ebuild @@ -459,6 +459,12 @@ src_prepare() { cd "${S}" || die fi + if use nginx_modules_http_security ; then + cd "${HTTP_SECURITY_MODULE_WD}" || die + eapply "${FILESDIR}/http_security-nginx-1.26.2.patch" + cd "${S}" || die + fi + find auto/ -type f -print0 | xargs -0 sed -i 's:\&\& make:\&\& \\$(MAKE):' || die # We have config protection, don't rename etc files sed -i 's:.default::' auto/install || die diff --git a/www-servers/nginx/nginx-1.27.1-r1.ebuild b/www-servers/nginx/nginx-1.27.1-r2.ebuild index 34de22d938e8..bfc1a4a791b6 100644 --- a/www-servers/nginx/nginx-1.27.1-r1.ebuild +++ b/www-servers/nginx/nginx-1.27.1-r2.ebuild @@ -459,6 +459,12 @@ src_prepare() { cd "${S}" || die fi + if use nginx_modules_http_security ; then + cd "${HTTP_SECURITY_MODULE_WD}" || die + eapply "${FILESDIR}/http_security-nginx-1.26.2.patch" + cd "${S}" || die + fi + find auto/ -type f -print0 | xargs -0 sed -i 's:\&\& make:\&\& \\$(MAKE):' || die # We have config protection, don't rename etc files sed -i 's:.default::' auto/install || die |