From nobody Wed Sep 27 14:34:51 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RwfJq3j1fz4vXTC; Wed, 27 Sep 2023 14:34:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RwfJq31Txz3Cmv; Wed, 27 Sep 2023 14:34:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695825291; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qOvhPWfGED/+/UFZdwZ7G07bC1ZYVCq1HWS21ImerUg=; b=PK+HPhsMebi/GeiXU6j/V50ZymoR+xq4wGWAItZsFPNFX9YfdHc8m09SWudhg1jn4gX5Ds WJ4+hnL33p6pjem3Vz3XQanKeaLFbxNNQVbMykB3DWJzJPMf+hoR4wM3vZs8XKhgWiARnv AqoPsY0XoesHtLazMf6HQFWAiuK4sTQBxuTc4/J3VSj3hoOzrXKTVP2i6D9F7YLGHzgYcd mj063FETPw/Kxb0EmPJRu6W/uVuovd1/0Rsb/rAWaXJVF3pmJ2fOX+o90agWTxW4rKOypf HzHMmH/xm1uSNCfEhYOIM8+0MVgmMkufk0dIkE+I7L86C3ANSoeP58nPmripUA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695825291; a=rsa-sha256; cv=none; b=wSqmGIT+Q5Mu12PI3YMizAzkh+9CtEhb7316ry3oMroBBvB+Yli9GyotYkL9nBIBuPnhvP TPYOsxXStbBgPcZI2Bc5mnd9u7YBUz1Ehl4PAhDbamXAwabyLxq42Tqsq4DhqNYh0U8M6/ 7CYrG0owIzLu40fJXSRcx8VhsDI6G5mq4N82SHwMLw+IR9ikAVyIpHwYPDtG7jPpQVKrFB StggMHd7gPB+O3VPAloKZvvxD4R8LLlMD0vb131D76r7pyXJomkLxODPNffZJthV9vFmo+ tQe7jdU0kl+MyI8rsAmi2pnBQ7SkUCCQNvNygpEN6LrPtyksEpUYsjBTTO3wOw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695825291; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qOvhPWfGED/+/UFZdwZ7G07bC1ZYVCq1HWS21ImerUg=; b=MplmRGMtmhtzKLXdr18RY7sZBIHs8Fx36d14qK+9RulbdkmQHQLoGtZdyiyBwghwnur0ki ytzzkMqw6eLd6MUbwdwI5hIrJeGll7qVrxCK9xmKkmBs0VBUelAdReVH3lAvHKrTTyrwpq OMTt7tA7AYM8wItbnOZiDFY9FX3rZLc75rzjDXd1cLIUj3E4auDTsnWNXrn88Ky/xJi7ii VqyX6+hdvJ1vFm0wxwVpRlWuPNOI5DQDp0t6Qg4edvNjlEKM4kUIJdCapSvmAP9EL8BJz3 ZbeJ/rZvTKnqwH8cmuqV/lCXqX8rCc1lFlZC19vn1c1hfPgDkDD//HFWaYPMTw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RwfJq278vzjVM; Wed, 27 Sep 2023 14:34:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38REYpHt091522; Wed, 27 Sep 2023 14:34:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38REYpJN091519; Wed, 27 Sep 2023 14:34:51 GMT (envelope-from git) Date: Wed, 27 Sep 2023 14:34:51 GMT Message-Id: <202309271434.38REYpJN091519@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: "Sergey A. Osokin" Subject: git: 44fdcb4c710f - main - www/nginx-devel: update third-party naxsi module to 1.5 (+) List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: osa X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 44fdcb4c710f8980f1df24cd426abd4fb8dcf59f Auto-Submitted: auto-generated The branch main has been updated by osa: URL: https://cgit.FreeBSD.org/ports/commit/?id=44fdcb4c710f8980f1df24cd426abd4fb8dcf59f commit 44fdcb4c710f8980f1df24cd426abd4fb8dcf59f Author: Sergey A. Osokin AuthorDate: 2023-09-27 14:30:56 +0000 Commit: Sergey A. Osokin CommitDate: 2023-09-27 14:34:40 +0000 www/nginx-devel: update third-party naxsi module to 1.5 (+) Change the distribution point to GH/wargio due to inactivity in GH/nbs-system. Update patches. Bump PORTREVISION. --- www/nginx-devel/Makefile | 8 +++++-- www/nginx-devel/Makefile.extmod | 8 ++++--- www/nginx-devel/distinfo | 8 ++++--- .../files/extra-patch-naxsi-libinjection__sqli_c | 13 +++++++++++ www/nginx-devel/files/extra-patch-naxsi_config | 26 ++++++++++++++++++++++ www/nginx-devel/files/extra-patch-naxsi_runtime.c | 23 ------------------- 6 files changed, 55 insertions(+), 31 deletions(-) diff --git a/www/nginx-devel/Makefile b/www/nginx-devel/Makefile index ca52cb1cc231..5533762cbcce 100644 --- a/www/nginx-devel/Makefile +++ b/www/nginx-devel/Makefile @@ -1,6 +1,6 @@ PORTNAME?= nginx PORTVERSION= 1.25.2 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= www MASTER_SITES= https://nginx.org/download/ \ LOCAL/osa @@ -265,6 +265,10 @@ pre-everything:: .endif @${ECHO_MSG} +post-extract-NAXSI-on: + @${RMDIR} ${WRKSRC_naxsi}/naxsi_src/libinjection + @${LN} -s ${WRKSRC_libinjection} ${WRKSRC_naxsi}/naxsi_src/libinjection + pre-patch-HTTPV3-on: @${MV} ${WRKSRC}/README ${WRKSRC}/README.1st @@ -355,7 +359,7 @@ do-install-LINK-on: do-install-NAXSI-on: ${INSTALL_DATA} \ - ${WRKDIR}/naxsi-${NAXSI_NGINX_VER}/naxsi_config/naxsi_core.rules \ + ${WRKDIR}/naxsi-${NAXSI_NGINX_VER}/naxsi_rules/naxsi_core.rules \ ${STAGEDIR}${ETCDIR} .endif diff --git a/www/nginx-devel/Makefile.extmod b/www/nginx-devel/Makefile.extmod index 3179ad66a4b1..201b688de894 100644 --- a/www/nginx-devel/Makefile.extmod +++ b/www/nginx-devel/Makefile.extmod @@ -231,10 +231,12 @@ MODSECURITY3_LIB_DEPENDS= libmodsecurity.so:security/modsecurity3 MODSECURITY3_GH_TUPLE= SpiderLabs:ModSecurity-nginx:v1.0.3:modsecurity3 MODSECURITY3_VARS= DSO_EXTMODS+=modsecurity3 -NAXSI_NGINX_VER= 29793dc -NAXSI_GH_TUPLE= nbs-system:naxsi:${NAXSI_NGINX_VER}:naxsi +NAXSI_NGINX_VER= 1.5 +NAXSI_GH_TUPLE= wargio:naxsi:${NAXSI_NGINX_VER}:naxsi \ + libinjection:libinjection:51f3a96:libinjection NAXSI_VARS= DSO_EXTMODS+=naxsi NAXSI_SUBDIR=/naxsi_src -NAXSI_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-naxsi_runtime.c +NAXSI_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-naxsi-libinjection__sqli_c \ + ${PATCHDIR}/extra-patch-naxsi_config NJS_GH_TUPLE= nginx:njs:0.8.1:njs NJS_VARS= DSO_EXTMODS+=njs NJS_SUBDIR=/nginx diff --git a/www/nginx-devel/distinfo b/www/nginx-devel/distinfo index 1f9bf0eafec8..901e2a898680 100644 --- a/www/nginx-devel/distinfo +++ b/www/nginx-devel/distinfo @@ -1,4 +1,4 @@ -TIMESTAMP = 1694980577 +TIMESTAMP = 1695822030 SHA256 (nginx-1.25.2.tar.gz) = 05dd6d9356d66a74e61035f2a42162f8c754c97cf1ba64e7a801ba158d6c0711 SIZE (nginx-1.25.2.tar.gz) = 1214903 SHA256 (nginx_mogilefs_module-1.0.4.tar.gz) = 7ac230d30907f013dff8d435a118619ea6168aa3714dba62c6962d350c6295ae @@ -103,8 +103,10 @@ SHA256 (openresty-memc-nginx-module-v0.19_GH0.tar.gz) = 8c2bdbe875e4f5225d0778bf SIZE (openresty-memc-nginx-module-v0.19_GH0.tar.gz) = 34654 SHA256 (SpiderLabs-ModSecurity-nginx-v1.0.3_GH0.tar.gz) = 32a42256616cc674dca24c8654397390adff15b888b77eb74e0687f023c8751b SIZE (SpiderLabs-ModSecurity-nginx-v1.0.3_GH0.tar.gz) = 34063 -SHA256 (nbs-system-naxsi-29793dc_GH0.tar.gz) = 579df0e50ff32464f7bb152df9d93ea18c05c4aa3966ec4d8c603b5dd629be08 -SIZE (nbs-system-naxsi-29793dc_GH0.tar.gz) = 236932 +SHA256 (wargio-naxsi-1.5_GH0.tar.gz) = 811980efb5c227b29763f0d4eb9b6af096c2ebf33519664dc50004ba0bd9ab50 +SIZE (wargio-naxsi-1.5_GH0.tar.gz) = 1115759 +SHA256 (libinjection-libinjection-51f3a96_GH0.tar.gz) = 617090d8afcf3220e9e4ee00a1c76d323ce1b3212f727fc32ee75634848fb014 +SIZE (libinjection-libinjection-51f3a96_GH0.tar.gz) = 2217537 SHA256 (nginx-njs-0.8.1_GH0.tar.gz) = 0450d9652d3cfe7dd9f802d6f790a3616e1612eef447195cd3daa5d43b395881 SIZE (nginx-njs-0.8.1_GH0.tar.gz) = 729780 SHA256 (opentracing-contrib-nginx-opentracing-v0.24.0_GH0.tar.gz) = 5328c5f37e0615b5252aed51b9cd40f3d14989d995ad54134076aeda4ab9b280 diff --git a/www/nginx-devel/files/extra-patch-naxsi-libinjection__sqli_c b/www/nginx-devel/files/extra-patch-naxsi-libinjection__sqli_c new file mode 100644 index 000000000000..9aeec390a0de --- /dev/null +++ b/www/nginx-devel/files/extra-patch-naxsi-libinjection__sqli_c @@ -0,0 +1,13 @@ +--- ../libinjection-51f3a96/src/libinjection_sqli.c.orig 2023-05-30 15:47:57.333208000 -0400 ++++ ../libinjection-51f3a96/src/libinjection_sqli.c 2023-05-30 15:49:52.273873000 -0400 +@@ -305,8 +303,8 @@ + static void st_assign(stoken_t * st, const char stype, + size_t pos, size_t len, const char* value) + { +- const size_t MSIZE = LIBINJECTION_SQLI_TOKEN_SIZE; +- size_t last = len < MSIZE ? len : (MSIZE - 1); ++ const size_t NAXSI_MSIZE = LIBINJECTION_SQLI_TOKEN_SIZE; ++ size_t last = len < NAXSI_MSIZE ? len : (NAXSI_MSIZE - 1); + st->type = (char) stype; + st->pos = pos; + st->len = last; diff --git a/www/nginx-devel/files/extra-patch-naxsi_config b/www/nginx-devel/files/extra-patch-naxsi_config new file mode 100644 index 000000000000..a73cf8f4e085 --- /dev/null +++ b/www/nginx-devel/files/extra-patch-naxsi_config @@ -0,0 +1,26 @@ +--- ../naxsi-1.5/naxsi_src/config.orig 2023-09-27 09:43:18.644606000 -0400 ++++ ../naxsi-1.5/naxsi_src/config 2023-09-27 09:44:37.585970000 -0400 +@@ -24,11 +24,6 @@ + " + + # try to use libinjection as system library +-LIBINJECTION_CFLAGS="$(pkg-config --cflags libinjection)" +-LIBINJECTION_LIBS="$(pkg-config --libs libinjection)" +-LIBINJECTION_FOUND="$?" +- +-if [ "$LIBINJECTION_FOUND" != "0" ]; then + if [ ! -d "$ngx_addon_dir/libinjection/src/" ]; then + echo "Cannot find 'libinjection' submodule." + exit 1; +@@ -43,11 +38,6 @@ + naxsi_sources="$naxsi_sources $ngx_addon_dir/libinjection_ngxbuild/$src_file" + done; + CFLAGS="$CFLAGS -DLIBINJECTION_VERSION=0 -I$ngx_addon_dir/libinjection_ngxbuild/" +-else +- echo "Using system libinjection" +- CFLAGS="$CFLAGS $LIBINJECTION_CFLAGS" +- ngx_feature_libs="$LIBINJECTION_LIBS" +-fi + + # NGINX module condfiguration. + ngx_addon_name=naxsi diff --git a/www/nginx-devel/files/extra-patch-naxsi_runtime.c b/www/nginx-devel/files/extra-patch-naxsi_runtime.c deleted file mode 100644 index c08dd1f92540..000000000000 --- a/www/nginx-devel/files/extra-patch-naxsi_runtime.c +++ /dev/null @@ -1,23 +0,0 @@ ---- ../naxsi-29793dc/naxsi_src/naxsi_runtime.c.orig 2022-07-10 18:11:39.685243000 -0400 -+++ ../naxsi-29793dc/naxsi_src/naxsi_runtime.c 2022-07-10 18:14:53.935554000 -0400 -@@ -9,6 +9,11 @@ - #include "naxsi_macros.h" - #include "naxsi_net.h" - -+#if (NGX_PCRE2) -+#include -+#else -+#include -+#endif - /* used to store locations during the configuration time. - then, accessed by the hashtable building feature during "init" time. */ - -@@ -181,7 +186,7 @@ - unsigned char* - ngx_utf8_check(ngx_str_t* str); - --#if defined nginx_version && (nginx_version >= 1021005) -+#if (NGX_PCRE2) - /* - * variables to use pcre2 - */