aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-04-27 12:59:50 +0200
committerJakub Jirutka <jakub@jirutka.cz>2017-04-28 00:45:03 +0200
commit75d31bd6b84a999942609f7c93ac6957685fb7da (patch)
tree8156db5c6e5c0d2fb1093eacb1850a32b391f543
parent5115c24f94eab7d3be8ad11e59c82494c05ce3a2 (diff)
downloadaports-75d31bd6b84a999942609f7c93ac6957685fb7da.tar.bz2
aports-75d31bd6b84a999942609f7c93ac6957685fb7da.tar.xz
testing/perl-test-nginx: new aport
https://github.com/openresty/test-nginx Data-driven test scaffold for Nginx C module and Nginx/OpenResty-based libraries and applications
-rw-r--r--main/nginx/APKBUILD12
-rw-r--r--testing/perl-test-nginx/APKBUILD44
-rw-r--r--testing/perl-test-nginx/set-temp-paths.patch34
3 files changed, 84 insertions, 6 deletions
diff --git a/main/nginx/APKBUILD b/main/nginx/APKBUILD
index 596a1d60d5..f6c86dda58 100644
--- a/main/nginx/APKBUILD
+++ b/main/nginx/APKBUILD
@@ -79,15 +79,15 @@ source="http://nginx.org/download/$pkgname-$pkgver.tar.gz
$pkgname-tests-$_tests_hgrev.tar.gz::http://hg.nginx.org/nginx-tests/archive/$_tests_hgrev.tar.gz
$_devel_kit_name-$_devel_kit_ver.tar.gz::$_devel_kit_url/archive/v$_devel_kit_ver.tar.gz
$_http_echo_name-$_http_echo_ver.tar.gz::$_http_echo_url/archive/v$_http_echo_ver.tar.gz
- $_http_echo_name~fix-nginx-1.12.patch
$_http_fancyindex_name-$_http_fancyindex_ver.tar.gz::$_http_fancyindex_url/archive/v$_http_fancyindex_ver.tar.gz
$_http_headers_more_name-$_http_headers_more_ver.tar.gz::$_http_headers_more_url/archive/v$_http_headers_more_ver.tar.gz
$_http_lua_name-$_http_lua_ver.tar.gz::$_http_lua_url/archive/v$_http_lua_ver.tar.gz
- $_http_lua_name~fix-nginx-1.12.patch
- $_http_lua_name~fix-libressl.patch
$_http_nchan_name-$_http_nchan_ver.tar.gz::$_http_nchan_url/archive/v$_http_nchan_ver.tar.gz
$_http_upload_progress_name-$_http_upload_progress_ver.tar.gz::$_http_upload_progress_url/archive/v$_http_upload_progress_ver.tar.gz
$_rtmp_name-$_rtmp_ver.tar.gz::$_rtmp_url/archive/v$_rtmp_ver.tar.gz
+ $_http_echo_name~fix-nginx-1.12.patch
+ $_http_lua_name~fix-nginx-1.12.patch
+ $_http_lua_name~fix-libressl.patch
nginx.conf
default.conf
$pkgname.logrotate
@@ -287,15 +287,15 @@ sha512sums="e2e930b61491d91090090d4716740895fc7812e8e266c427ac2b40c5a70493150e5c
ca8be839aef71c537d6d3a79e2894f38790834d6310c6d15ad06900c7c2d7cf71a113847ab96ef9be0fbdfff3b7808e74dea427502b275cfd6c909550f9ba9ab nginx-tests-cdd44ff602db.tar.gz
558764c9be913a4f61d0e277d07bf3c272e1ce086b3fadb85b693a7e92805cd9fca4da7a8d29c96e53fc0d23b331327d3b2561ff61f19d2330e7d5d35ac7d614 ngx_devel_kit-0.3.0.tar.gz
c455bee73cebd0752449472452d15614b9587ddd199263d366484ede890c4d108eacbbeaef31adc9dc7732b56ef2bfc73c0fef3366366db03a8ec3fdc27a985c echo-nginx-module-0.60.tar.gz
-401f57ed73941619cdd41061bd92fffc00730e34cc647ea3c9345225723e9c7ebd72d9d15a703cffd93b0a99d458a05fe5efa7373ae24f41b35279285b5ca0fa echo-nginx-module~fix-nginx-1.12.patch
ce0043ad4a2b638c5d99244d6caaa65ad142cea78884084a9aeca5a9593c68dbe508c9e4dd85dc5722eb63ef386612bffc48d4b6fc1487df244fbcb7a73bffe1 ngx-fancyindex-0.4.1.tar.gz
e42582b45c3111de3940bbeb67ce161aca2d55adcfb00c61c12256fa0e36221d38723013f36edbcf6d1b520f8dfb49d4657df8a956e66d36e68425afad382bd1 headers-more-nginx-module-0.32.tar.gz
ad621cec178eb37109f16ebc30dbab7b1ea344ac4b523ff1e6ad62364b8cf437488a89c593ca44b446b729a1c578e3a97685851847b4b16a147ac9eca8f23a2a lua-nginx-module-0.10.8.tar.gz
-04f7d75ce15eba99be99a76d266903c17e48742ab4bf237b988bf84f00cdbf6510c3d4eee88a24620e56dc426220192df39f4736af157fdc4e4c50b4f1d794f2 lua-nginx-module~fix-nginx-1.12.patch
-fd8bce0e7d69552267b8e405b07fc9323e25e06cceb8912a2d143952447a4299756e6a9a8a40f4eabe8b00fed475fd87ee4a982f5ad7449d59783e872c682451 lua-nginx-module~fix-libressl.patch
458bddfb27b8aa8a99a6324a600620531b2c71f035c10304868a1acb523a288ee6f90746dbe43cd8c476ed55ad01649a225a5ea73eedf3a199387fe2049c529e nchan-1.1.4.tar.gz
c31c46344d49704389722325a041b9cd170fa290acefe92cfc572c07f711cd3039de78f28df48ca7dcb79b2e4bbe442580aaaf4d92883fd3a14bf41d66dd9d8c nginx-upload-progress-module-0.9.2.tar.gz
e7c897265d1e93b06f7e46a653b113e24d2451e2112a7a6da415f130928437444a0346832fd9c10042397fea6120e4e44acc2bccf649ec30ca5bffbf985672e2 nginx-rtmp-module-1.1.11.tar.gz
+401f57ed73941619cdd41061bd92fffc00730e34cc647ea3c9345225723e9c7ebd72d9d15a703cffd93b0a99d458a05fe5efa7373ae24f41b35279285b5ca0fa echo-nginx-module~fix-nginx-1.12.patch
+04f7d75ce15eba99be99a76d266903c17e48742ab4bf237b988bf84f00cdbf6510c3d4eee88a24620e56dc426220192df39f4736af157fdc4e4c50b4f1d794f2 lua-nginx-module~fix-nginx-1.12.patch
+fd8bce0e7d69552267b8e405b07fc9323e25e06cceb8912a2d143952447a4299756e6a9a8a40f4eabe8b00fed475fd87ee4a982f5ad7449d59783e872c682451 lua-nginx-module~fix-libressl.patch
ac7e3153ab698b4cde077f0d5d7ac0a58897927eb36cf3b58cb01268ca0296f1d589c0a5b4f889b96b5b4a57bef05b17c59be59a9d7c4d7a3d3be58f101f7f41 nginx.conf
0907f69dc2d3dc1bad3a04fb6673f741f1a8be964e22b306ef9ae2f8e736e1f5733a8884bfe54f3553fff5132a0e5336716250f54272c3fec2177d6ba16986f3 default.conf
09b110693e3f4377349ccea3c43cb8199c8579ee351eae34283299be99fdf764b0c1bddd552e13e4d671b194501618b29c822e1ad53b34101a73a63954363dbb nginx.logrotate
diff --git a/testing/perl-test-nginx/APKBUILD b/testing/perl-test-nginx/APKBUILD
new file mode 100644
index 0000000000..ed4b073c8f
--- /dev/null
+++ b/testing/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/testing/perl-test-nginx/set-temp-paths.patch b/testing/perl-test-nginx/set-temp-paths.patch
new file mode 100644
index 0000000000..ba64ab66b5
--- /dev/null
+++ b/testing/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