commit: 846db368a357221e95395446ff9c1a4b684c82d9 Author: Zurab Kvachadze <zurabid2016 <AT> gmail <DOT> com> AuthorDate: Mon Sep 1 13:46:48 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sat Sep 6 14:23:57 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=846db368
www-nginx/ngx-cache-purge: new package, add 2.3 nginx_cache_purge[1] is an NGINX module which adds ability to purge content from FastCGI, proxy, SCGI and uWSGI caches. Included is a patch from a pull request upstream[2] adding support for building nginx_cache_purge as dynamic module. Additionally, tests are patched to not set proxy_temp_path, which conflicts with recent versions of dev-perl/Test-Nginx. [1]: https://github.com/FRiCKLE/ngx_cache_purge [2]: https://github.com/FRiCKLE/ngx_cache_purge/pull/78 Closes: https://bugs.gentoo.org/959673 Signed-off-by: Zurab Kvachadze <zurabid2016 <AT> gmail.com> Part-of: https://github.com/gentoo/gentoo/pull/43636 Closes: https://github.com/gentoo/gentoo/pull/43636 Signed-off-by: Sam James <sam <AT> gentoo.org> www-nginx/ngx-cache-purge/Manifest | 1 + ...ache-purge-2.3-add-dynamic-module-support.patch | 33 +++++++++++ ...ache-purge-2.3-do-not-set-proxy_temp_path.patch | 67 ++++++++++++++++++++++ www-nginx/ngx-cache-purge/metadata.xml | 16 ++++++ .../ngx-cache-purge/ngx-cache-purge-2.3.ebuild | 26 +++++++++ 5 files changed, 143 insertions(+) diff --git a/www-nginx/ngx-cache-purge/Manifest b/www-nginx/ngx-cache-purge/Manifest new file mode 100644 index 000000000000..71afb2b65932 --- /dev/null +++ b/www-nginx/ngx-cache-purge/Manifest @@ -0,0 +1 @@ +DIST ngx-cache-purge-2.3.tar.gz 11717 BLAKE2B d7747003cca852aceb3b382243c327e6ecd0f50a6e393c3aabfcdb38ce581f1301742d647be80a1d0ad9cebc3d6d9c50cee6242d46a545cbea87dc0c3dfee9fc SHA512 81929ca57ce5c2e1af6ec43882a54ff1da8dc77786bfb7505ff94fbcf970ae8870b419dc5c0bc7b80794d75a359e0100f360c1cf458a300f802b1d8bd7053811 diff --git a/www-nginx/ngx-cache-purge/files/ngx-cache-purge-2.3-add-dynamic-module-support.patch b/www-nginx/ngx-cache-purge/files/ngx-cache-purge-2.3-add-dynamic-module-support.patch new file mode 100644 index 000000000000..e953ee5413d8 --- /dev/null +++ b/www-nginx/ngx-cache-purge/files/ngx-cache-purge-2.3-add-dynamic-module-support.patch @@ -0,0 +1,33 @@ +From 3b65b8ac88d500d51bf5cb99f3ae5367756b3118 Mon Sep 17 00:00:00 2001 +From: Simone <[email protected]> +Date: Mon, 20 Feb 2023 08:30:04 +0100 +Subject: [PATCH] Dynamic module support + +--- + config | 14 ++++++++++++-- + 1 file changed, 12 insertions(+), 2 deletions(-) + +diff --git a/config b/config +index 34f42ec..b900680 100644 +--- a/config ++++ b/config +@@ -15,7 +15,17 @@ if [ "$HTTP_UWSGI" = "YES" ]; then + fi + + ngx_addon_name=ngx_http_cache_purge_module +-HTTP_MODULES="$HTTP_MODULES ngx_http_cache_purge_module" +-NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_cache_purge_module.c" ++CACHE_PURGE_SRCS="$ngx_addon_dir/ngx_cache_purge_module.c" ++ ++if [ -n "$ngx_module_link" ]; then ++ ngx_module_type=HTTP ++ ngx_module_name="$ngx_addon_name" ++ ngx_module_srcs="$CACHE_PURGE_SRCS" ++ ++ . auto/module ++else ++ HTTP_MODULES="$HTTP_MODULES $ngx_addon_name" ++ NGX_ADDON_SRCS="$NGX_ADDON_SRCS $CACHE_PURGE_SRCS" ++fi + + have=NGX_CACHE_PURGE_MODULE . auto/have diff --git a/www-nginx/ngx-cache-purge/files/ngx-cache-purge-2.3-do-not-set-proxy_temp_path.patch b/www-nginx/ngx-cache-purge/files/ngx-cache-purge-2.3-do-not-set-proxy_temp_path.patch new file mode 100644 index 000000000000..41b33d673eb6 --- /dev/null +++ b/www-nginx/ngx-cache-purge/files/ngx-cache-purge-2.3-do-not-set-proxy_temp_path.patch @@ -0,0 +1,67 @@ +From a89fc7f978cf0f5a49a92d23ccc063dad38b964f Mon Sep 17 00:00:00 2001 +From: Zurab Kvachadze <[email protected]> +Date: Mon, 1 Sep 2025 16:06:48 +0200 +Subject: [PATCH] tests: Do not set proxy_temp_path + +It is unnecessary for the testing and conflicts with proxy_temp_path +settings in Test::Nginx. + +Signed-off-by: Zurab Kvachadze <[email protected]> +--- + t/proxy1.t | 1 - + t/proxy1_vars.t | 1 - + t/proxy2.t | 1 - + t/proxy2_vars.t | 1 - + 4 files changed, 4 deletions(-) + +diff --git a/t/proxy1.t b/t/proxy1.t +index e5c0054..a9dcc7e 100644 +--- a/t/proxy1.t ++++ b/t/proxy1.t +@@ -9,7 +9,6 @@ plan tests => repeat_each() * (blocks() * 4 + 3 * 1); + + our $http_config = <<'_EOC_'; + proxy_cache_path /tmp/ngx_cache_purge_cache keys_zone=test_cache:10m; +- proxy_temp_path /tmp/ngx_cache_purge_temp 1 2; + _EOC_ + + our $config = <<'_EOC_'; +diff --git a/t/proxy1_vars.t b/t/proxy1_vars.t +index af3553d..7049463 100644 +--- a/t/proxy1_vars.t ++++ b/t/proxy1_vars.t +@@ -9,7 +9,6 @@ plan tests => repeat_each() * (blocks() * 4 + 3 * 1); + + our $http_config = <<'_EOC_'; + proxy_cache_path /tmp/ngx_cache_purge_cache keys_zone=test_cache:10m; +- proxy_temp_path /tmp/ngx_cache_purge_temp 1 2; + _EOC_ + + our $config = <<'_EOC_'; +diff --git a/t/proxy2.t b/t/proxy2.t +index c07b042..24e0744 100644 +--- a/t/proxy2.t ++++ b/t/proxy2.t +@@ -9,7 +9,6 @@ plan tests => repeat_each() * (blocks() * 4 + 6 * 1); + + our $http_config = <<'_EOC_'; + proxy_cache_path /tmp/ngx_cache_purge_cache keys_zone=test_cache:10m; +- proxy_temp_path /tmp/ngx_cache_purge_temp 1 2; + _EOC_ + + our $config = <<'_EOC_'; +diff --git a/t/proxy2_vars.t b/t/proxy2_vars.t +index d09c08e..d505390 100644 +--- a/t/proxy2_vars.t ++++ b/t/proxy2_vars.t +@@ -9,7 +9,6 @@ plan tests => repeat_each() * (blocks() * 4 + 6 * 1); + + our $http_config = <<'_EOC_'; + proxy_cache_path /tmp/ngx_cache_purge_cache keys_zone=test_cache:10m; +- proxy_temp_path /tmp/ngx_cache_purge_temp 1 2; + _EOC_ + + our $config = <<'_EOC_'; +-- +2.49.1 + diff --git a/www-nginx/ngx-cache-purge/metadata.xml b/www-nginx/ngx-cache-purge/metadata.xml new file mode 100644 index 000000000000..a9e5ea2805de --- /dev/null +++ b/www-nginx/ngx-cache-purge/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person" proxied="yes"> + <email>[email protected]</email> + <name>Zurab Kvachadze</name> + </maintainer> + <maintainer type="project" proxied="proxy"> + <email>[email protected]</email> + <name>Proxy Maintainers</name> + </maintainer> + <upstream> + <bugs-to>https://github.com/FRiCKLE/ngx_cache_purge/issues</bugs-to> + <remote-id type="github">FRiCKLE/ngx_cache_purge</remote-id> + </upstream> +</pkgmetadata> diff --git a/www-nginx/ngx-cache-purge/ngx-cache-purge-2.3.ebuild b/www-nginx/ngx-cache-purge/ngx-cache-purge-2.3.ebuild new file mode 100644 index 000000000000..1539c607c28b --- /dev/null +++ b/www-nginx/ngx-cache-purge/ngx-cache-purge-2.3.ebuild @@ -0,0 +1,26 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +MY_PN="ngx_cache_purge" +NGINX_MOD_S="${WORKDIR}/${MY_PN}-${PV}" + +NGINX_MOD_OPENRESTY_TESTS=1 +inherit nginx-module + +DESCRIPTION="NGINX module allowing to purge the FastCGI, proxy, SCGI and uWSGI caches" +HOMEPAGE="https://github.com/FRiCKLE/ngx_cache_purge" +SRC_URI=" + https://github.com/FRiCKLE/ngx_cache_purge/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz +" + +LICENSE="BSD-2" +SLOT="0" + +KEYWORDS="~amd64" + +PATCHES=( + "${FILESDIR}/${PN}-2.3-add-dynamic-module-support.patch" + "${FILESDIR}/${PN}-2.3-do-not-set-proxy_temp_path.patch" +)
