commit: 86a103a4104e7d21928be05ff88251e76b55e6dc Author: Zurab Kvachadze <zurabid2016 <AT> gmail <DOT> com> AuthorDate: Tue Feb 18 14:53:07 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sat Jul 5 07:27:03 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=86a103a4
www-nginx/ngx-xss: new package, add 0.06 ngx-xss[1] is an NGINX module that adds support for "native cross-site scripting". [1]: https://github.com/openresty/xss-nginx-module Signed-off-by: Zurab Kvachadze <zurabid2016 <AT> gmail.com> Part-of: https://github.com/gentoo/gentoo/pull/37590 Signed-off-by: Sam James <sam <AT> gentoo.org> www-nginx/ngx-xss/Manifest | 1 + .../ngx-xss-0.06-add-dynamic-build-support.patch | 34 ++++++++++++++++++++++ www-nginx/ngx-xss/metadata.xml | 21 +++++++++++++ www-nginx/ngx-xss/ngx-xss-0.06.ebuild | 24 +++++++++++++++ 4 files changed, 80 insertions(+) diff --git a/www-nginx/ngx-xss/Manifest b/www-nginx/ngx-xss/Manifest new file mode 100644 index 000000000000..ec20887f1122 --- /dev/null +++ b/www-nginx/ngx-xss/Manifest @@ -0,0 +1 @@ +DIST ngx-xss-0.06.tar.gz 12448 BLAKE2B 58cb1f23699e173c6fe3ac1c03ddef184238b1c3dc0471569e11b9a8f40b93250a9fa60c0bcc71222daf22769698835d1fe5515c0b55e385141c10451f347005 SHA512 b417ba5199d7147c348cd897f6294c49270f700d565b841086a5b1ecbfcea4005b6c01aac4e0e0e86cfafdc1d578107783dda718da2b9a1fd3b89676ec7b1ff4 diff --git a/www-nginx/ngx-xss/files/ngx-xss-0.06-add-dynamic-build-support.patch b/www-nginx/ngx-xss/files/ngx-xss-0.06-add-dynamic-build-support.patch new file mode 100644 index 000000000000..5cfd8715e569 --- /dev/null +++ b/www-nginx/ngx-xss/files/ngx-xss-0.06-add-dynamic-build-support.patch @@ -0,0 +1,34 @@ +From a45c0c645841795d124acd43ea8a5c8297754a6f Mon Sep 17 00:00:00 2001 +From: Su Yang <[email protected]> +Date: Mon, 14 Jun 2021 11:47:03 +0800 +Subject: [PATCH 1/2] support dynamic build + +--- + config | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +diff --git a/config b/config +index 42ebe33..4ca7d3d 100644 +--- a/config ++++ b/config +@@ -1,5 +1,20 @@ + ngx_addon_name=ngx_http_xss_filter_module ++ + HTTP_AUX_FILTER_MODULES="$HTTP_AUX_FILTER_MODULES ngx_http_xss_filter_module" + NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/src/ngx_http_xss_filter_module.c $ngx_addon_dir/src/ngx_http_xss_util.c" + NGX_ADDON_DEPS="$NGX_ADDON_DEPS $ngx_addon_dir/src/ddebug.h $ngx_addon_dir/src/ngx_http_xss_filter_module.h $ngx_addon_dir/src/ngx_http_xss_util.h" + ++if test -n "$ngx_module_link"; then ++ ngx_module_type=HTTP_AUX_FILTER ++ ngx_module_name=$ngx_addon_name ++ ngx_module_incs= ++ ngx_module_deps="$NGX_ADDON_DEPS" ++ ngx_module_srcs="$NGX_ADDON_SRCS" ++ ngx_module_libs= ++ ++ . auto/module ++else ++ HTTP_AUX_FILTER_MODULES="$HTTP_AUX_FILTER_MODULES $ngx_addon_name" ++ NGX_ADDON_SRCS="$NGX_ADDON_SRCS" ++ NGX_ADDON_DEPS="$NGX_ADDON_DEPS" ++fi diff --git a/www-nginx/ngx-xss/metadata.xml b/www-nginx/ngx-xss/metadata.xml new file mode 100644 index 000000000000..005843751b17 --- /dev/null +++ b/www-nginx/ngx-xss/metadata.xml @@ -0,0 +1,21 @@ +<?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> + <longdescription> + ngx-xss adds native cross-site scripting support to NGINX. This module adds cross-site AJAX + support to nginx. Currently only cross-site GET is supported. The cross-site GET is + implemented as JSONP (or "JSON with padding"). + </longdescription> + <upstream> + <bugs-to>https://github.com/openresty/xss-nginx-module/issues</bugs-to> + <remote-id type="github">openresty/xss-nginx-module</remote-id> + </upstream> +</pkgmetadata> diff --git a/www-nginx/ngx-xss/ngx-xss-0.06.ebuild b/www-nginx/ngx-xss/ngx-xss-0.06.ebuild new file mode 100644 index 000000000000..b190db7280f6 --- /dev/null +++ b/www-nginx/ngx-xss/ngx-xss-0.06.ebuild @@ -0,0 +1,24 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +MY_PN="xss-nginx-module" +NGINX_MOD_S="${WORKDIR}/${MY_PN}-${PV}" + +inherit nginx-module + +DESCRIPTION="Native support for cross-site scripting (XSS) in NGINX" +HOMEPAGE="https://github.com/openresty/xss-nginx-module" +SRC_URI=" + https://github.com/openresty/xss-nginx-module/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz +" + +LICENSE="BSD-2" +SLOT="0" + +RESTRICT="test" + +PATCHES=( + "${FILESDIR}/${PN}-0.06-add-dynamic-build-support.patch" +)
