aboutsummaryrefslogtreecommitdiffstats
path: root/community
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2019-05-03 09:59:30 +0300
committerTimo Teräs <timo.teras@iki.fi>2019-05-03 09:59:30 +0300
commita104b31a0d550835511f636123d709cefe4c2ee2 (patch)
tree0bd8e83f2499dad9ed43ed077ff05f0c7a0efc29 /community
parenta95608930429bba8be21a22f6d08dd930909c9d1 (diff)
community/perl-test-nginx: backport from edge
Diffstat (limited to 'community')
-rw-r--r--community/perl-test-nginx/APKBUILD44
-rw-r--r--community/perl-test-nginx/set-temp-paths.patch34
2 files changed, 78 insertions, 0 deletions
diff --git a/community/perl-test-nginx/APKBUILD b/community/perl-test-nginx/APKBUILD
new file mode 100644
index 00000000000..ed4b073c8f8
--- /dev/null
+++ b/community/perl-test-nginx/APKBUILD
@@ -0,0 +1,44 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+pkgname=perl-test-nginx
+_pkgreal=Test-Nginx
+pkgver=0.26
+pkgrel=0
+pkgdesc="Data-driven test scaffold for Nginx C module and Nginx/OpenResty-based libraries and applications"
+url="https://github.com/openresty/test-nginx"
+arch="noarch"
+license="BSD"
+depends="perl perl-list-moreutils perl-http-message perl-test-longstring
+ perl-text-diff perl-libwww perl-uri perl-test-base"
+makedepends="perl-dev"
+subpackages="$pkgname-doc"
+source="http://search.cpan.org/CPAN/authors/id/A/AG/AGENT/$_pkgreal-$pkgver.tar.gz
+ set-temp-paths.patch"
+builddir="$srcdir/$_pkgreal-$pkgver"
+
+prepare() {
+ default_prepare
+
+ cd "$builddir"
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
+}
+
+build() {
+ cd "$builddir"
+ make
+}
+
+check() {
+ cd "$builddir"
+ make test
+}
+
+package() {
+ cd "$builddir"
+
+ make DESTDIR="$pkgdir" install
+ find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
+}
+
+sha512sums="8f5f244d98a20e9a125b2fb56753e77eb3f4a3390f01d46e9e565ef4cb2667725421322cda7ac3933f1fcb6f7863477769c18797cbe7b3eb3f7398590593fd01 Test-Nginx-0.26.tar.gz
+028133884a4cba921ee9533fd0d53d1c65a0cbce93c9b81ffbe4004aaed6cdeb2a5327824d4b0cefe0902ba8c9e9f2a7efed65869db3f0733a36f9a4c56bbed9 set-temp-paths.patch"
diff --git a/community/perl-test-nginx/set-temp-paths.patch b/community/perl-test-nginx/set-temp-paths.patch
new file mode 100644
index 00000000000..ba64ab66b54
--- /dev/null
+++ b/community/perl-test-nginx/set-temp-paths.patch
@@ -0,0 +1,34 @@
+From 760e9acf54ad6f418a00d4224248d58772b3887a Mon Sep 17 00:00:00 2001
+From: Jakub Jirutka <jakub@jirutka.cz>
+Date: Thu, 27 Apr 2017 12:43:00 +0200
+Subject: [PATCH] Set *_temp_path location to $ServRoot/
+
+Linux distributions build nginx with options like
+`--http-client-body-temp-path=` to set default location of directories
+for temporary files under /var/tmp/nginx or /var/lib/nginx.
+The problem is, when running tests as part of the package build
+process, these directories are not writtable. Therefore it's needed to
+override location of these directories in the generated nginx.conf.
+
+Upstream-Issue: https://github.com/openresty/test-nginx/pull/63
+---
+ lib/Test/Nginx/Util.pm | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/lib/Test/Nginx/Util.pm b/lib/Test/Nginx/Util.pm
+index 6c2fab7..7f540c2 100644
+--- a/lib/Test/Nginx/Util.pm
++++ b/lib/Test/Nginx/Util.pm
+@@ -964,6 +964,12 @@
+ }
+
+ print $out <<_EOC_;
++
++ 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";
+ }
+
+ $post_main_config