aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/nginx/APKBUILD21
-rw-r--r--main/nginx/njs~fix-test-exit-code.patch24
2 files changed, 41 insertions, 4 deletions
diff --git a/main/nginx/APKBUILD b/main/nginx/APKBUILD
index c7533e2dd8..76210bc9c0 100644
--- a/main/nginx/APKBUILD
+++ b/main/nginx/APKBUILD
@@ -12,6 +12,7 @@ pkgver=1.14.0
pkgrel=0
# Revision of nginx-tests to use for check().
_tests_hgrev=d6daf03478ad
+_njs_ver=0.2.0
pkgdesc="HTTP and reverse proxy server (stable version)"
url="http://www.nginx.org/en"
arch="all"
@@ -19,8 +20,8 @@ license="BSD-2-Clause"
depends=""
makedepends="linux-headers gd-dev geoip-dev libxml2-dev libxslt-dev
libressl-dev paxmark pcre-dev perl-dev pkgconf zlib-dev"
-checkdepends="perl perl-fcgi perl-io-socket-ssl perl-net-ssleay
- perl-protocol-websocket uwsgi-python"
+checkdepends="gd perl perl-fcgi perl-io-socket-ssl perl-net-ssleay
+ perl-protocol-websocket tzdata uwsgi-python"
pkgusers="nginx"
_grp_ngx="nginx"
_grp_www="www-data"
@@ -30,6 +31,8 @@ subpackages="$pkgname-doc $pkgname-vim::noarch"
replaces="$pkgname-common $pkgname-initscripts $pkgname-lua $pkgname-rtmp"
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
+ $pkgname-njs-$_njs_ver.tar.gz::https://hg.nginx.org/njs/archive/$_njs_ver.tar.gz
+ njs~fix-test-exit-code.patch
nginx.conf
default.conf
$pkgname.logrotate
@@ -38,6 +41,7 @@ source="http://nginx.org/download/$pkgname-$pkgver.tar.gz
builddir="$srcdir/$pkgname-$pkgver"
_modules_dir="usr/lib/$pkgname/modules"
+_stream_js_depends="$pkgname-mod-stream"
# luajit is not available for s390x and ppc64le
case "$CARCH" in
@@ -49,11 +53,13 @@ esac
for _mod in \
http-geoip \
http-image-filter \
+ http-js \
http-perl \
http-xslt-filter \
mail \
stream \
- stream-geoip
+ stream-geoip \
+ stream-js
do
subpackages="$subpackages $pkgname-mod-$_mod:_module"
done
@@ -182,15 +188,20 @@ build() {
--with-stream_geoip_module=dynamic \
--with-stream_ssl_preread_module \
\
+ --add-dynamic-module="$srcdir/njs-$_njs_ver/nginx" \
$_extra_flags
make
}
check() {
+ msg "Running nginx tests..."
cd "$srcdir"/nginx-tests-*
-
TEST_NGINX_BINARY="$builddir/objs/nginx" prove .
+
+ msg "Running njs tests..."
+ cd "$srcdir"/njs-*
+ make test
}
package() {
@@ -267,6 +278,8 @@ _module() {
sha512sums="40f086c9f741727e6f55802b6c3a66f081f7c49c38646dc1491aa3e3c35bae12b65ea6594386609fc849bcd99a60d7cd8ecb3f8d519e0e9ab8db01d653e930e9 nginx-1.14.0.tar.gz
775f8fcc55e0e670f7b509974cc9e9cfb56e4bd2a88d1c7716c96b63ad87c14fd6d07f293545639972e798fb20f81414ef6483451d00ae5a4eaa262ccf2cbc98 nginx-tests-d6daf03478ad.tar.gz
+be07e635f5e0e50a28366b28180344568b5cca9d67c79bc80d0c6758d8d4097ff9428393fb6951ed239c6e9c9e3f84b46f9c92a6e2c313f1f35e677b3662512f nginx-njs-0.2.0.tar.gz
+cd6983c164383100e0239be85dfeddc7879ab9c29589aecdd9bb4b6772d1f0a5d4cd70bf728d0fb5181765cbed77b7e4c99fd85c0ec59c55826c52e923510017 njs~fix-test-exit-code.patch
ac7e3153ab698b4cde077f0d5d7ac0a58897927eb36cf3b58cb01268ca0296f1d589c0a5b4f889b96b5b4a57bef05b17c59be59a9d7c4d7a3d3be58f101f7f41 nginx.conf
0907f69dc2d3dc1bad3a04fb6673f741f1a8be964e22b306ef9ae2f8e736e1f5733a8884bfe54f3553fff5132a0e5336716250f54272c3fec2177d6ba16986f3 default.conf
09b110693e3f4377349ccea3c43cb8199c8579ee351eae34283299be99fdf764b0c1bddd552e13e4d671b194501618b29c822e1ad53b34101a73a63954363dbb nginx.logrotate
diff --git a/main/nginx/njs~fix-test-exit-code.patch b/main/nginx/njs~fix-test-exit-code.patch
new file mode 100644
index 0000000000..f6edfc7698
--- /dev/null
+++ b/main/nginx/njs~fix-test-exit-code.patch
@@ -0,0 +1,24 @@
+# HG changeset patch
+# User Dmitry Volyntsev <xeioex@nginx.com>
+# Date 1524763304 -10800
+# Node ID 4e647f0bf155f0e858a8838c216e3ba1559ff870
+# Parent 1305b1701099541bcb47579ce1719550662e0d1c
+Fixed unit tests exit code.
+
+Previously, 0 was returned regardless of failures.
+
+Patch-Source: http://hg.nginx.org/njs/rev/4e647f0bf155
+
+diff -r 1305b1701099 -r 4e647f0bf155 njs/test/njs_unit_test.c
+--- a/njs/test/njs_unit_test.c Thu Apr 26 19:58:26 2018 +0300
++++ b/njs/test/njs_unit_test.c Thu Apr 26 20:21:44 2018 +0300
+@@ -9878,7 +9878,7 @@
+ printf("njs unit tests passed\n");
+ }
+
+- return NXT_OK;
++ return rc;
+ }
+
+
+