From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6EBF11582EF for ; Fri, 21 Feb 2025 16:10:44 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 3D24834332D for ; Fri, 21 Feb 2025 16:10:39 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id C8B7C110486; Fri, 21 Feb 2025 16:08:54 +0000 (UTC) Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) (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) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id 08AF011047B for ; Fri, 21 Feb 2025 16:08:54 +0000 (UTC) Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-5dee1626093so6179880a12.1 for ; Fri, 21 Feb 2025 08:08:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1740154132; x=1740758932; darn=lists.gentoo.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jjhOWPY7nV3NYU8Ipsvg3O/e4d240xKaZblZlxLrmnU=; b=KNhE/F0mrbaMyu0QY9lXUGOLkRYKe2LE/Dl5QZbAvU9fHIQWMsm/N+g59FxVaaOHO3 3+FYymcJwo2+aB0Tf7+2F/vJn8jruLGjXYvFWoR//ABBg/XSBYW6jF5XTEKdqPXcQyYe P7HsT9qPjOu9rpH+kibwizJDCT+ILYfdXPC4W275mhq39yDNQjSXnAgAHoAEgOUsKIhn uvqxqyjVqUabYZVnNkWwVv6f7vgpV2fNIfeba8S3QQXHRGYuJIgSw2qw1iJMFzfv9N2a mIVe62U0JRxJMP5XBh57WtoFt0jDG+MOcaeBsfmCdNOIFIlEAotjI7gqI9Pp7cydnbkR ye0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740154132; x=1740758932; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jjhOWPY7nV3NYU8Ipsvg3O/e4d240xKaZblZlxLrmnU=; b=D2co7HEHvtgQKMBJBBQjum9600wMyHz+56IHudKDKP/hl/lOmScpNPPZo1L7aXFSsX mpbHWAgLP3MSpmVC1PIDSOT+VYIGw6ZXwsXNwfxWExnA5ah6C2qGv+QB5WTg4h2l8GXy 7o6IlPk0syRYg91KYVh4LcYmyy8F1+CbzL9pysN++o3mM+jQZqxQgrIW46txlAU/rcv3 06r+OS49Mlx1UEJ/OGPM6+1ALeZ99aqNzRipZ5vxmM+flf+Zv0v+Gmd0FW4gwjMc77VW fJpuRHpThz1bPTqmlrKsfRFSHiAnrW350sYWD8MtrwitgsLEwzCQ3rSolNNZCDcqg12u UFsw== X-Gm-Message-State: AOJu0YyPbe0MxBfXSG9Is3avkyYHIRz0wV1eGdt5tZXXuTm1kkiAAcai k0pjOAC7T6UUrE43PAmYp9RCiSblCXYLsBGVFoQ2HyeWm8iQ+VGl7Ap3jT/P X-Gm-Gg: ASbGnct0T+iZpt1xdQE9/+LIIIq9ajq0EmNYqL30fW8qdY931pKYFAuWaxxoGR3NMrs 5mwBM0SG+vVKAsWjYu6hTkbUFCpPoYnrYg3Y6r4sGnz02EyF2U+eeKLjcNrZWXxnvozFUf4/Co4 WGmMnKoTDRe3y1Mi2BeApKlQZE7m5g+C7HtIqi2b9EqgvyzDEFYsDqM4rF2DuTbXm6anmGZF37/ XGAeufK6qft0b8WeTrVhVqC0JJqYjrmtUrnsMhKbBU5N1y7c0ZJBM9broMIPGBtAdB8iZK0kWYp Aql3pvuoN6fFOwn0VeCljB98QYmn7U68A6rkGD4UkdDON5zVrzPO73up82cOpdJQdoMEIx+sZrE = X-Google-Smtp-Source: AGHT+IFJOmETaCzilfy0Y2jvtzScHG/dMT5gtA6QVJ1KuXorcQYGUnMb2F/ETM63AA7Wcjejo5RSzw== X-Received: by 2002:a17:907:c296:b0:abb:ccac:d2cd with SMTP id a640c23a62f3a-abbeddd6ddamr712259666b.14.1740154131989; Fri, 21 Feb 2025 08:08:51 -0800 (PST) Received: from localhost.localdomain (92-70-146-242.biz.kpn.net. [92.70.146.242]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-abbac781b78sm862154466b.60.2025.02.21.08.08.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Feb 2025 08:08:51 -0800 (PST) From: Zurab Kvachadze To: gentoo-dev@lists.gentoo.org Cc: Zurab Kvachadze Subject: [gentoo-dev] [PATCH v3 02/40] dev-perl/Test-Nginx: new package, add 0.30 Date: Fri, 21 Feb 2025 17:07:59 +0100 Message-ID: <20250221160839.29308-3-zurabid2016@gmail.com> X-Mailer: git-send-email 2.45.3 In-Reply-To: <20250221160839.29308-1-zurabid2016@gmail.com> References: <20250221160839.29308-1-zurabid2016@gmail.com> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Archives-Salt: e8e2cff8-129a-4303-bb81-e39a7a1399cf X-Archives-Hash: 04edfbb3503e38ffd614261791026410 The Test::Nginx Perl module is a testing framework utilised by various third party NGINX modules, mainly developed by OpenResty. Signed-off-by: Zurab Kvachadze --- dev-perl/Test-Nginx/Manifest | 1 + dev-perl/Test-Nginx/Test-Nginx-0.30.ebuild | 36 ++++++++++++++ ...inx-0.30-preset-temp_path-directives.patch | 38 +++++++++++++++ ...est-Nginx-0.30-set-default-error-log.patch | 48 +++++++++++++++++++ .../Test-Nginx}/metadata.xml | 4 +- 5 files changed, 126 insertions(+), 1 deletion(-) create mode 100644 dev-perl/Test-Nginx/Manifest create mode 100644 dev-perl/Test-Nginx/Test-Nginx-0.30.ebuild create mode 100644 dev-perl/Test-Nginx/files/Test-Nginx-0.30-preset-temp_path-directives.patch create mode 100644 dev-perl/Test-Nginx/files/Test-Nginx-0.30-set-default-error-log.patch copy {app-pda/usbmuxd => dev-perl/Test-Nginx}/metadata.xml (72%) diff --git a/dev-perl/Test-Nginx/Manifest b/dev-perl/Test-Nginx/Manifest new file mode 100644 index 000000000000..6c3ed06f65c2 --- /dev/null +++ b/dev-perl/Test-Nginx/Manifest @@ -0,0 +1 @@ +DIST Test-Nginx-0.30.tar.gz 131437 BLAKE2B 3f1ac14124059ba45d6bbb0f921d2b0c58790a1150f33c23a7dbfaf8ae14118fc7fc42df249362e566c9862ea3a84a58ae75066a041f6e65d36f78a951ecd222 SHA512 3a6727e567a213872f2ec6b0d782f40d867714787811911bf1637e76abcb3511c446b87e8a93106cf1473f2e49ebe375a2382658b8600a65cb8c3940cc0fa178 diff --git a/dev-perl/Test-Nginx/Test-Nginx-0.30.ebuild b/dev-perl/Test-Nginx/Test-Nginx-0.30.ebuild new file mode 100644 index 000000000000..a8f136f809e6 --- /dev/null +++ b/dev-perl/Test-Nginx/Test-Nginx-0.30.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DIST_AUTHOR=AGENT +inherit perl-module + +DESCRIPTION="Data-driven test scaffold for NGINX and OpenResty" + +LICENSE="BSD" + +SLOT="0" + +# The following packages in the dev-perl category provide the required Perl +# modules that Test-Nginx depends on: +# (1) libwww-perl provides LWP::UserAgent, +# (2) HTTP-Message provides HTTP::Response, +# (3) URI provides URI::Escape. +RDEPEND=" + dev-perl/HTTP-Message + dev-perl/IPC-Run + dev-perl/List-MoreUtils + dev-perl/Test-Base + dev-perl/Test-LongString + dev-perl/Text-Diff + dev-perl/libwww-perl + virtual/perl-ExtUtils-MakeMaker + virtual/perl-File-Temp + virtual/perl-Time-HiRes +" + +PATCHES=( + "${FILESDIR}/${PN}-0.30-preset-temp_path-directives.patch" + "${FILESDIR}/${PN}-0.30-set-default-error-log.patch" +) diff --git a/dev-perl/Test-Nginx/files/Test-Nginx-0.30-preset-temp_path-directives.patch b/dev-perl/Test-Nginx/files/Test-Nginx-0.30-preset-temp_path-directives.patch new file mode 100644 index 000000000000..a8a66bb48d67 --- /dev/null +++ b/dev-perl/Test-Nginx/files/Test-Nginx-0.30-preset-temp_path-directives.patch @@ -0,0 +1,38 @@ +From 2ab64d371acfed9189656b3fd099c2747209c98f Mon Sep 17 00:00:00 2001 +From: Zurab Kvachadze +Date: Wed, 12 Feb 2025 13:38:44 +0100 +Subject: [PATCH] Util.pm: preset *temp_path directives to subdirectoroes of + servroot + +This avoids errors when NGINX, launched as non-root, tries writing +various temporary files into default compiled-in directoroes that is +only writable by root. + +This commit sets the directives that control where the temp files are +saved, to point to a subdirectory of the temporary testing server root, +which is writable by the user executing NGINX. + +Signed-off-by: Zurab Kvachadze +--- + lib/Test/Nginx/Util.pm | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/lib/Test/Nginx/Util.pm b/lib/Test/Nginx/Util.pm +index 1d4aa38..1af9277 100644 +--- a/lib/Test/Nginx/Util.pm ++++ b/lib/Test/Nginx/Util.pm +@@ -1168,6 +1168,11 @@ _EOC_ + $main_config + + http { ++ client_body_temp_path $ServRoot/client_body_temp; ++ proxy_temp_path $ServRoot/proxy_temp; ++ fastcgi_temp_path $ServRoot/fastcgi_temp; ++ scgi_temp_path $ServRoot/scgi_temp; ++ uwsgi_temp_path $ServRoot/uwsgi_temp; + access_log $AccLogFile; + #access_log off; + +-- +2.45.3 + diff --git a/dev-perl/Test-Nginx/files/Test-Nginx-0.30-set-default-error-log.patch b/dev-perl/Test-Nginx/files/Test-Nginx-0.30-set-default-error-log.patch new file mode 100644 index 000000000000..192ee59b4123 --- /dev/null +++ b/dev-perl/Test-Nginx/files/Test-Nginx-0.30-set-default-error-log.patch @@ -0,0 +1,48 @@ +From a105fc2a543d1136c6c747c1c2d1fd905ab9389f Mon Sep 17 00:00:00 2001 +From: Zurab Kvachadze +Date: Thu, 13 Feb 2025 02:29:05 +0100 +Subject: [PATCH] Util.pm: specify error log on command line + +When no error log is specified on the command line, NGINX logs errors to +the compiled-in error log (irrespective of whether the error log is +specified in the configuration file), which is most often writable only +by root. When tests are run as unprivileged user, NGINX can not write +the log file and, therefore, fails to start. + +This commit makes Test::Nginx set the error log to standard error no +configuration file is specified, or to $ServRoot/logs/error.log when the +configuration file is specified, thus overriding the default path. + +Signed-off-by: Zurab Kvachadze +--- + lib/Test/Nginx/Util.pm | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/lib/Test/Nginx/Util.pm b/lib/Test/Nginx/Util.pm +index 1af9277..41c6061 100644 +--- a/lib/Test/Nginx/Util.pm ++++ b/lib/Test/Nginx/Util.pm +@@ -1292,7 +1292,7 @@ sub get_canon_version_for_OpenSSL (@) { + } + + sub get_nginx_version () { +- my $out = `$NginxBinary -V 2>&1`; ++ my $out = `$NginxBinary -e stderr -V 2>&1`; + if (!defined $out || $? != 0) { + $out //= ""; + bail_out("Failed to get the version of the Nginx in PATH: $out"); +@@ -2049,9 +2049,9 @@ start_nginx: + my $cmd; + + if ($NginxVersion >= 0.007053) { +- $cmd = "$NginxBinary -p $ServRoot/ -c $ConfFile > /dev/null"; ++ $cmd = "$NginxBinary -e $ServRoot/logs/error.log -p $ServRoot/ -c $ConfFile > /dev/null"; + } else { +- $cmd = "$NginxBinary -c $ConfFile > /dev/null"; ++ $cmd = "$NginxBinary -e $ServRoot/logs/error.log -c $ConfFile > /dev/null"; + } + + if (defined $block->suppress_stderr) { +-- +2.45.3 + diff --git a/app-pda/usbmuxd/metadata.xml b/dev-perl/Test-Nginx/metadata.xml similarity index 72% copy from app-pda/usbmuxd/metadata.xml copy to dev-perl/Test-Nginx/metadata.xml index d8e789b30263..6ca2fdd412ec 100644 --- a/app-pda/usbmuxd/metadata.xml +++ b/dev-perl/Test-Nginx/metadata.xml @@ -10,6 +10,8 @@ Proxy Maintainers - libimobiledevice/usbmuxd + openresty/test-nginx + Test-Nginx + Test::Nginx -- 2.45.3