aboutsummaryrefslogtreecommitdiffstats
path: root/main/varnish
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@alpinelinux.org>2017-11-10 09:37:18 +0000
committerCarlo Landmeter <clandmeter@alpinelinux.org>2017-11-10 09:37:18 +0000
commite023db2355003ad8373eba245ff1f92c31900f49 (patch)
tree4a376141167dc348379ac6514909b1a9c725e596 /main/varnish
parent9963654832948d456136dd6239863f5c692fde1a (diff)
downloadaports-e023db2355003ad8373eba245ff1f92c31900f49.tar.bz2
aports-e023db2355003ad8373eba245ff1f92c31900f49.tar.xz
main/varnish: upgrade to 5.2.0
Diffstat (limited to 'main/varnish')
-rw-r--r--main/varnish/APKBUILD18
-rw-r--r--main/varnish/fix-stack-overflow.patch9
-rw-r--r--main/varnish/musl-includes.patch30
-rw-r--r--main/varnish/python-version-fix.patch66
-rw-r--r--main/varnish/varnishd.initd3
-rw-r--r--main/varnish/varnishlog.initd3
-rw-r--r--main/varnish/varnishncsa.initd3
7 files changed, 115 insertions, 17 deletions
diff --git a/main/varnish/APKBUILD b/main/varnish/APKBUILD
index 0dda91468c..c6c489890c 100644
--- a/main/varnish/APKBUILD
+++ b/main/varnish/APKBUILD
@@ -2,7 +2,7 @@
# Contributor: V.Krishn <vkrishn4@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=varnish
-pkgver=5.1.3
+pkgver=5.2.0
pkgrel=0
pkgdesc="High-performance HTTP accelerator"
url="http://www.varnish-cache.org/"
@@ -16,9 +16,11 @@ install="varnish.pre-install"
subpackages="$pkgname-dbg $pkgname-dev $pkgname-doc $pkgname-libs $pkgname-geoip::noarch"
pkgusers="varnish"
pkggroups="varnish"
-source="http://repo.varnish-cache.org/source/varnish-$pkgver.tar.gz
+source="http://varnish-cache.org/_downloads/varnish-$pkgver.tgz
fix-stack-overflow.patch
musl-mode_t.patch
+ musl-includes.patch
+ python-version-fix.patch
varnishd.initd
varnishd.confd
@@ -84,14 +86,16 @@ geoip() {
"$subpkgdir"/usr/lib/varnish/plugins/maxminddb.vcl
}
-sha512sums="a10c317dc38ddff139ca8153f6388955df449c3abeb4d4f069b632ba2b32064a2827ab05fa8515994b251a68507fc3a7bf4e08eacc991fc03283ab234b9efd0a varnish-5.1.3.tar.gz
-a76dc31c95367defb2de00dd1c55f09a6217ef911056c0dc8807320f76549087453563f07dad22b6f19cb4a594a0352f414d8ad8c39bf3f8bb6fb3251f143e96 fix-stack-overflow.patch
+sha512sums="a962846492356efedaa9b2e5076b9f2423a88ed33dfd11fdeb7690d5622c3d73c782a48cbafdf919b7fca7d37b5b9f4f1243ac925e010ccbc086ae12e87c5627 varnish-5.2.0.tgz
+19d2ef52aaecadec42505b52a7bb683f52c9de1186180c0b02afc6a1044127a39c0468470563e7f248ed93b0e45d279adfebf35e78c49f4b79e1dfb5a15b0f46 fix-stack-overflow.patch
8758bef9039a2cca23b7302668bd49f1ea07f54835512a8a9558bb9ed5de1c0fca53f2085ccd298fe0c6579fc81c3b583a85f4f6b25b6ad85f89bf3be04afb70 musl-mode_t.patch
-5f9cd1da8a72e71d6317d9c9b625d4b2f4f46ff6c4f7aaf8fed5958ce141be572d7e4d2d207af51b1cf4201b19b9bc1574d3cfcf7616c043a309c04ce6ae949e varnishd.initd
+ccd5b1ebb1e98e4d6003de5c4713bed36f1af3f8ae0eb4b63d7da50831a320e4eb9a9e589b300db8b9177ce131c5d00964bb24bbe829ade6727e5d8965fe0757 musl-includes.patch
+bb64ddd0c15279b448a091b20aff4b36270b42b4d3e7389f98d0c9e54303d47d676eb90e1735e614bcede788466c291a8f809bdea733ddef8ad4f24bd645daf0 python-version-fix.patch
+5ac7867e85cbd721f903c524ed4b524423d9dada4acfeefb0e543214a208828df5cc4efe2f012991bea6b38c2b223c24b17d3890ec4ed2c57d2b441b8e5a6900 varnishd.initd
98c8901e53f3c6adb908b9eb01fd441ea53f3c54d4a79aecb1fb1eddfa2fc93de3d0de403a4464a9baff15873b3a20623837e3a37cb225e924a329e32b9e37d6 varnishd.confd
-31758d5b328700d31cf078efce64421ab7b6f00961733b990367efa8ce9aa406e72b46be1cf21fe2f8e11e3cc1803dc9158930ae7803131a88d71f7193d2d270 varnishlog.initd
+c67a7898f40849989edcbe74e1a418e196f48e178ca30126bc13db226e4f4c2c2ba74d9d0650ef68ed88732917fc06b80ef1f62c2d9d2c14a89f26fd25aed0f7 varnishlog.initd
88fe9b545a2b25d6e6e45f1cfecbeca5f503bc1fbe95856386e568edee41b487b162cddceba8cb152b0a37d8d96635a76c0715fc69d87d6c667ac403ebae0bb7 varnishlog.confd
-d620dd5ad8b81c561ff395fcf0307df9d4b49ef34b5d4322f461e570ffce58fea687365017b27cb6fde8c41b554750bb913fd1337764fdc16f1513429ee3d9fb varnishncsa.initd
+e0b7d67bbd710f0a17b77837c581f128e6b746eff2b12e81d03d1ad040037e95bb00fb8007d89bc6dab18cfa659456078f310ac268f104774ef85ad068efecca varnishncsa.initd
a5426ff66b89d2afb6273f05e4117b3eec5ce0162a624d52c92b418960f72e58bd01224165613221af76ec241bd98e1eb985b2ef7b83a5b615e9ece67234dcc8 varnishncsa.confd
51cc6d46ff7439de93977ab87dfb0af399458c1e446475696f73342ae7a0c1a8ca8fc6e79e593659f1af30716a5f8a1ee5e3b1f5e7b35df40b45d47e7b0f2ffd varnishd.logrotate
69f088819cff6d4441813be284f4117f232d08908515bd15d96bd5bb9d41ba7100657a52fd408d44c396d004366062ae22fbf08e2a983cd8023b554539ccf596 maxminddb.vcl"
diff --git a/main/varnish/fix-stack-overflow.patch b/main/varnish/fix-stack-overflow.patch
index f516fdd429..fe1edc4a30 100644
--- a/main/varnish/fix-stack-overflow.patch
+++ b/main/varnish/fix-stack-overflow.patch
@@ -1,6 +1,6 @@
--- ./bin/varnishd/waiter/cache_waiter_epoll.c.orig
+++ ./bin/varnishd/waiter/cache_waiter_epoll.c
-@@ -70,7 +70,7 @@
+@@ -68,7 +68,7 @@
static void *
vwe_thread(void *priv)
{
@@ -9,16 +9,17 @@
struct waited *wp;
struct waiter *w;
double now, then;
-@@ -82,6 +82,8 @@
+@@ -80,6 +80,9 @@
w = vwe->waiter;
CHECK_OBJ_NOTNULL(w, WAITER_MAGIC);
THR_SetName("cache-epoll");
+ ev = calloc(NEEV, sizeof(struct epoll_event));
+ assert(ev != NULL);
++
+ THR_Init();
now = VTIM_real();
- while (1) {
-@@ -149,6 +151,7 @@
+@@ -148,6 +151,7 @@
closefd(&vwe->pipe[0]);
closefd(&vwe->pipe[1]);
closefd(&vwe->epfd);
diff --git a/main/varnish/musl-includes.patch b/main/varnish/musl-includes.patch
new file mode 100644
index 0000000000..b414498fb8
--- /dev/null
+++ b/main/varnish/musl-includes.patch
@@ -0,0 +1,30 @@
+--- ./lib/libvarnishapi/vxp_lexer.c.orig
++++ ./lib/libvarnishapi/vxp_lexer.c
+@@ -33,6 +33,7 @@
+ #include <ctype.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <sys/types.h>
+
+ #include "vdef.h"
+ #include "vas.h"
+--- ./lib/libvarnishapi/vxp.c.orig
++++ ./lib/libvarnishapi/vxp.c
+@@ -33,6 +33,7 @@
+ #include <ctype.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <sys/types.h>
+
+ #include "vdef.h"
+ #include "vas.h"
+--- ./bin/varnishtest/vtc_barrier.c.orig
++++ ./bin/varnishtest/vtc_barrier.c
+@@ -35,6 +35,7 @@
+ #include <unistd.h>
+
+ #include <sys/socket.h>
++#include <sys/time.h>
+
+ #include "vtc.h"
+ #include "vtcp.h"
diff --git a/main/varnish/python-version-fix.patch b/main/varnish/python-version-fix.patch
new file mode 100644
index 0000000000..f83385a3f8
--- /dev/null
+++ b/main/varnish/python-version-fix.patch
@@ -0,0 +1,66 @@
+From 17c92e43fda114bf5341e51d752e882238b8fe8c Mon Sep 17 00:00:00 2001
+From: Nils Goroll <nils.goroll@uplex.de>
+Date: Thu, 5 Oct 2017 13:39:23 +0200
+Subject: [PATCH] hack up vsctool to work with python 2 and 3
+
+StringIO does not exist any more in python3, yet requiring 2.7 would
+not pave the path forward, so try to be compatible with both.
+
+Works for me on Python 2.7.9 and Python 3.4
+
+I would appreciate if someone more fluent in serpentinous programming
+language reviewed and/or rewrote this.
+---
+ lib/libvcc/vsctool.py | 24 ++++++++++++++++++++----
+ 1 file changed, 20 insertions(+), 4 deletions(-)
+
+diff --git a/lib/libvcc/vsctool.py b/lib/libvcc/vsctool.py
+index 854968e3b..829c6e518 100644
+--- a/lib/libvcc/vsctool.py
++++ b/lib/libvcc/vsctool.py
+@@ -37,7 +37,10 @@
+ import json
+ import sys
+ import gzip
+-import StringIO
++try:
++ import StringIO
++except ImportError:
++ import io
+ import collections
+ import struct
+
+@@ -54,9 +57,22 @@
+ "format": [ "integer", FORMATS],
+ }
+
++# http://python3porting.com/problems.html#bytes-strings-and-unicode
++if sys.version_info < (3,):
++ def b(x):
++ return x
++else:
++ import codecs
++ def b(x):
++ return codecs.latin_1_encode(x)[0]
++
+ def gzip_str(s):
+- out = StringIO.StringIO()
+- gzip.GzipFile(fileobj=out, mode="w").write(s)
++ try:
++ out = StringIO.StringIO()
++ except NameError:
++ out = io.BytesIO()
++
++ gzip.GzipFile(fileobj=out, mode="w").write(b(s))
+ out.seek(4)
+ out.write(struct.pack("<L", 0x12bfd58))
+ return out.getvalue()
+@@ -285,7 +301,7 @@ class rst_vsc(directive):
+ def __init__(self, s):
+ super(rst_vsc, self).__init__(s)
+
+- for i,v in PARAMS.iteritems():
++ for i,v in PARAMS.items():
+ if v is not True:
+ self.do_default(i, v[0], v[1])
+
diff --git a/main/varnish/varnishd.initd b/main/varnish/varnishd.initd
index b0ec918bb7..4bc5061d23 100644
--- a/main/varnish/varnishd.initd
+++ b/main/varnish/varnishd.initd
@@ -1,7 +1,6 @@
-#!/sbin/runscript
+#!/sbin/openrc-run
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Id$
VARNISHD_PID=${VARNISHD_PID:-/run/${SVCNAME}.pid}
CONFIGFILES="${CONFIGFILE:-/etc/varnish/default.vcl}"
diff --git a/main/varnish/varnishlog.initd b/main/varnish/varnishlog.initd
index fae8297743..ebbf52ec4d 100644
--- a/main/varnish/varnishlog.initd
+++ b/main/varnish/varnishlog.initd
@@ -1,7 +1,6 @@
-#!/sbin/runscript
+#!/sbin/openrc-run
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Id$
VARNISHLOG_PID=${VARNISHLOG_PID:-/run/${SVCNAME}.pid}
diff --git a/main/varnish/varnishncsa.initd b/main/varnish/varnishncsa.initd
index e06a5945af..8a584decc9 100644
--- a/main/varnish/varnishncsa.initd
+++ b/main/varnish/varnishncsa.initd
@@ -1,7 +1,6 @@
-#!/sbin/runscript
+#!/sbin/openrc-run
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Id$
VARNISHNCSA_PID=${VARNISHNCSA_PID:-/run/${SVCNAME}.pid}