aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2014-08-18 14:09:56 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2014-08-18 14:09:56 +0000
commit066f0c09ce2c12886a65c0224e5f2dd91ed6a5b3 (patch)
treec38b444a714580d22029677e1c290f7f36879ecf /testing
parent7c1831bb34eba36856d3d5cdf3c6a7f687d7906e (diff)
downloadaports-066f0c09ce2c12886a65c0224e5f2dd91ed6a5b3.tar.bz2
aports-066f0c09ce2c12886a65c0224e5f2dd91ed6a5b3.tar.xz
testing/tengine: upgrade to 2.0.3
Diffstat (limited to 'testing')
-rw-r--r--testing/tengine/APKBUILD29
-rw-r--r--testing/tengine/ipv6.patch42
-rw-r--r--testing/tengine/musl-crypt-fix.patch13
-rw-r--r--testing/tengine/musl-headers.patch10
4 files changed, 90 insertions, 4 deletions
diff --git a/testing/tengine/APKBUILD b/testing/tengine/APKBUILD
index c5d2e479ab..a6ae05d03d 100644
--- a/testing/tengine/APKBUILD
+++ b/testing/tengine/APKBUILD
@@ -3,7 +3,7 @@
# Contributor: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
pkgname=tengine
-pkgver=1.3.0
+pkgver=2.0.3
pkgrel=0
pkgdesc="lightweight HTTP and reverse proxy server"
url="http://tengine.taobao.org/"
@@ -11,11 +11,23 @@ arch="all"
license="Custom"
makedepends="pcre-dev openssl-dev zlib-dev"
source="http://tengine.taobao.org/download/tengine-$pkgver.tar.gz
+ ipv6.patch
+ musl-crypt-fix.patch
+ musl-headers.patch
+
tengine.initd
tengine.logrotate
"
_builddir="$srcdir"/$pkgname-$pkgver
+prepare() {
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
build() {
cd "$_builddir"
@@ -47,12 +59,21 @@ package() {
install -m644 -D LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
-md5sums="80a73253d8d45da27774fe918ee31c45 tengine-1.3.0.tar.gz
+md5sums="8c891d51d5a066bca0d03c184c4287a7 tengine-2.0.3.tar.gz
+801a87f7f9d27f8ad85b41a78b4c4461 ipv6.patch
+3aeb488921109e60d02ed64d36790aeb musl-crypt-fix.patch
+be29516153528967cbd64eb9fedeac9e musl-headers.patch
4faf8dff6ff1490edae1688baf1b2abb tengine.initd
8823274a834332d3db4f62bf7dd1fb7d tengine.logrotate"
-sha256sums="c0ae1c9a22c90d9c2370d43d5f888a60500d309289de381d2edf4d1709a56a9f tengine-1.3.0.tar.gz
+sha256sums="ed024b6040e8f03df575fe7d7a9d274159e2543cd6854d89e173935e930fdfdb tengine-2.0.3.tar.gz
+a24ef5843ae0afa538b00c37eb7da7870f9d7f146f52a9668678f7296cf71d9b ipv6.patch
+8c398640bd379c1c6a2fafcd2b3848a72902e47924e8e2490b312c141eec5d70 musl-crypt-fix.patch
+9ce768e10e3adab166b8d851060962bb2ef6e579be70cb75366e6b6ab0c1a738 musl-headers.patch
34e9b1dbb9f5fe4d71f7469ded3eb98fac02f57ecfbfd04ba623099766b4709c tengine.initd
cea0c6f8de55a4c3a3eccc57910de1c3116634082c8e5b660630fb927a29f38d tengine.logrotate"
-sha512sums="69cecc888e80b9cd56d6f112772e893d0fc2e38ce3494f1c702b38ce986871f210f10eac182286bcdf68b5674806f857b5bb29825a5a8d4a9f1114ff48d46515 tengine-1.3.0.tar.gz
+sha512sums="34f03452bccd050a8680e3b21ae5e07ee16c477b68733318dc9026d67aac61783a32635ad036bb91b059951fdcfcccfe56374b650e3006700c67b299853e87a5 tengine-2.0.3.tar.gz
+68d64a84568ec2df0366925ab282a05ebe21a85044b6c7844a47573cfd8cc8ed119cc772358bc3fff36e2d4fdf583a730592825f5f98632993ca86d1f8438d5f ipv6.patch
+21114c775e4bdd1f7b8b9abc143284945e96ed1d8c49904ddf918abad87b16253f918ba47976cd2df32f0fdb8a7dad399d4200e879db2da6cf93a28aab236a75 musl-crypt-fix.patch
+d31b02ae2158c9176bedb114820d4fdcf3ee17eaaeb31f8db8d99cef6881609edc2e4aeb5034ecdb774e720247219fa3f1ae39ca255e9803cc46398f673e06fe musl-headers.patch
e153ff131ca5a62f01744c45e97421db0776be518a84a8d09896955a996e5a0133c03cdfa7ac6b03bad75b5cbb839f49dcccbb210843010da42445706f239a12 tengine.initd
01b77cff16f6e8bfd7fa1d4d20f625bbcddd08f0509173452d060c342c93dc315a7b0560f4734323a5d29ea294de0491f2e3f32e5337574e1a28ebc005eceea8 tengine.logrotate"
diff --git a/testing/tengine/ipv6.patch b/testing/tengine/ipv6.patch
new file mode 100644
index 0000000000..9b05f8ff83
--- /dev/null
+++ b/testing/tengine/ipv6.patch
@@ -0,0 +1,42 @@
+--- a/src/http/ngx_http_core_module.c
++++ b/src/http/ngx_http_core_module.c
+@@ -2442,7 +2442,11 @@
+ ngx_uint_t i;
+ ngx_conf_t pcf;
+ ngx_http_module_t *module;
++#if (NGX_HAVE_INET6)
++ struct sockaddr_in6 *sin6;
++#else
+ struct sockaddr_in *sin;
++#endif
+ ngx_http_conf_ctx_t *ctx, *http_ctx;
+ ngx_http_listen_opt_t lsopt;
+ ngx_http_core_srv_conf_t *cscf, **cscfp;
+@@ -2526,6 +2530,19 @@
+ if (rv == NGX_CONF_OK && !cscf->listen) {
+ ngx_memzero(&lsopt, sizeof(ngx_http_listen_opt_t));
+
++#if (NGX_HAVE_INET6)
++ sin6 = &lsopt.u.sockaddr_in6;
++
++ sin6->sin6_family = AF_INET6;
++#if (NGX_WIN32)
++ sin6->sin6_port = htons(80);
++#else
++ sin6->sin6_port = htons((getuid() == 0) ? 80 : 8000);
++#endif
++ sin6->sin6_addr = in6addr_any;
++
++ lsopt.socklen = sizeof(struct sockaddr_in6);
++#else
+ sin = &lsopt.u.sockaddr_in;
+
+ sin->sin_family = AF_INET;
+@@ -2537,6 +2554,7 @@
+ sin->sin_addr.s_addr = INADDR_ANY;
+
+ lsopt.socklen = sizeof(struct sockaddr_in);
++#endif
+
+ lsopt.backlog = NGX_LISTEN_BACKLOG;
+ lsopt.rcvbuf = -1;
diff --git a/testing/tengine/musl-crypt-fix.patch b/testing/tengine/musl-crypt-fix.patch
new file mode 100644
index 0000000000..2f11fe2e9d
--- /dev/null
+++ b/testing/tengine/musl-crypt-fix.patch
@@ -0,0 +1,13 @@
+--- nginx-1.4.4/src/os/unix/ngx_user.c.orig
++++ nginx-1.4.4/src/os/unix/ngx_user.c
+@@ -31,8 +31,10 @@
+ struct crypt_data cd;
+
+ cd.initialized = 0;
++#ifdef __GLIBC__
+ /* work around the glibc bug */
+ cd.current_salt[0] = ~salt[0];
++#endif
+
+ value = crypt_r((char *) key, (char *) salt, &cd);
+
diff --git a/testing/tengine/musl-headers.patch b/testing/tengine/musl-headers.patch
new file mode 100644
index 0000000000..9ec9f7b136
--- /dev/null
+++ b/testing/tengine/musl-headers.patch
@@ -0,0 +1,10 @@
+--- ./src/os/unix/ngx_linux_config.h.orig
++++ ./src/os/unix/ngx_linux_config.h
+@@ -51,7 +51,6 @@
+ #include <malloc.h> /* memalign() */
+ #include <limits.h> /* IOV_MAX */
+ #include <sys/ioctl.h>
+-#include <sys/sysctl.h>
+ #include <crypt.h>
+ #include <sys/utsname.h> /* uname() */
+