summaryrefslogtreecommitdiff
path: root/www/varnish
diff options
context:
space:
mode:
authormspo <mspo>2011-11-12 20:40:16 +0000
committermspo <mspo>2011-11-12 20:40:16 +0000
commit6ae1ff5c363a7e10842b0f9691ed27233d93fac7 (patch)
tree1a00685a11d85c777d5e066ee9392739dcce78bd /www/varnish
parent8a625ce6dc7a031daafa4b77b67c0a7b14772732 (diff)
downloadpkgsrc-6ae1ff5c363a7e10842b0f9691ed27233d93fac7.tar.gz
Update to varnish 3.0.2
There are VCL-incompatible changes between 2.x and 3.x. Some release highlights (https://www.varnish-cache.org/): Introduction of VMODs Add streaming on pass and miss. This is controlled by the beresp.do_stream boolean. This includes support for compression/uncompression. Add support for ESI and gzip. Handle objects larger than 2G. HTTP Range support is now enabled by default The ban lurker is enabled by default if there is a backend or director with the name default, use that as the default backend, otherwise use the first one listed. Add many more stats counters. Amongst those, add per storage backend stats and per-backend statistics. Syslog the platform we are running on The -l (shared memory log file) argument has been changed, please see the varnishd manual for the new syntax. The -S and -T arguments are now stored in the shmlog Make it possible to name storage backends. The names have to be unique. The max_esi_includes parameter has been renamed to max_esi_depth. The err_ttl parameter has been removed and is replaced by a setting in default.vcl. Add panic.show and panic.clear CLI commands. VCL now has vcl_init and vcl_fini functions that are called when a given VCL has been loaded and unloaded. Varnish is now stricter in enforcing no duplication of probes, backends and ACLs. The ABI of vmods are now checked. This will require a rebuild of all vmods against the new version of Varnish.
Diffstat (limited to 'www/varnish')
-rw-r--r--www/varnish/Makefile15
-rw-r--r--www/varnish/PLIST28
-rw-r--r--www/varnish/distinfo14
-rw-r--r--www/varnish/patches/patch-aa21
-rw-r--r--www/varnish/patches/patch-ab13
-rw-r--r--www/varnish/patches/patch-bin__varnishd__cache_dir_random.c50
-rw-r--r--www/varnish/patches/patch-bin__varnishd__mgt_child.c14
-rw-r--r--www/varnish/patches/patch-configure.ac15
-rw-r--r--www/varnish/patches/patch-etc__Makefile.in15
9 files changed, 114 insertions, 71 deletions
diff --git a/www/varnish/Makefile b/www/varnish/Makefile
index 82d5c5188db..b37efc89c38 100644
--- a/www/varnish/Makefile
+++ b/www/varnish/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.11 2011/08/31 21:12:17 shattered Exp $
+# $NetBSD: Makefile,v 1.12 2011/11/12 20:40:16 mspo Exp $
#
-DISTNAME= varnish-2.1.5
-PKGREVISION= 2
+DISTNAME= varnish-3.0.2
+PKGREVISION= 1
CATEGORIES= www
MASTER_SITES= http://repo.varnish-cache.org/source/
@@ -19,7 +19,6 @@ USE_TOOLS+= autoconf pkg-config gmake
BUILD_DEFS+= VARBASE
EGDIR= ${PREFIX}/share/examples/varnish
-PKG_SYSCONFSUBDIR= varnish
CONF_FILES= ${EGDIR}/default.vcl ${PKG_SYSCONFDIR}/default.vcl
VRNUSER?= varnish
@@ -38,10 +37,14 @@ PKG_HOME.${VRNUSER}= ${VRNDIR}
PKG_SHELL.${VRNUSER}= ${SH}
PKG_GECOS.${VRNUSER}= Varnish daemon user
-RCD_SCRIPTS= varnishd varnishlog varnishncsa
+RCD_SCRIPTS= varnishd varnishlog varnishncsa
+PYTHON_FOR_BUILD_ONLY= yes
+
+REPLACE_PYTHON+= lib/libvcl/generate.py
+REPLACE_PYTHON+= lib/libvmod_std/vmod.py
.include "../../lang/python/pyversion.mk"
-BUILD_DEPENDS+= ${PYPKGPREFIX}-docutils>=0.5:../../textproc/py-docutils
+BUILD_DEPENDS+= ${PYPKGPREFIX}-docutils>=0.5:../../textproc/py-docutils
.include "../../devel/pcre/buildlink3.mk"
.include "../../mk/bsd.prefs.mk"
diff --git a/www/varnish/PLIST b/www/varnish/PLIST
index e213ddd47e9..52a45295b46 100644
--- a/www/varnish/PLIST
+++ b/www/varnish/PLIST
@@ -1,23 +1,28 @@
-@comment $NetBSD: PLIST,v 1.6 2011/04/01 18:59:41 zafer Exp $
+@comment $NetBSD: PLIST,v 1.7 2011/11/12 20:40:16 mspo Exp $
bin/varnishadm
bin/varnishhist
bin/varnishlog
bin/varnishncsa
bin/varnishreplay
+bin/varnishsizes
bin/varnishstat
bin/varnishtest
bin/varnishtop
-bin/varnishsizes
-include/varnish/shmlog.h
-include/varnish/shmlog_tags.h
-include/varnish/stat_field.h
-include/varnish/stats.h
include/varnish/varnishapi.h
-lib/libvarnish.la
+include/varnish/vcli.h
+include/varnish/vsc.h
+include/varnish/vsc_all.h
+include/varnish/vsc_fields.h
+include/varnish/vsl.h
+include/varnish/vsl_tags.h
+include/varnish/vsm.h
lib/libvarnishapi.la
-lib/libvarnishcompat.la
-lib/libvcl.la
lib/pkgconfig/varnishapi.pc
+lib/varnish/libvarnish.la
+lib/varnish/libvarnishcompat.la
+lib/varnish/libvcl.la
+lib/varnish/libvgz.la
+lib/varnish/vmods/libvmod_std.la
man/man1/varnishadm.1
man/man1/varnishd.1
man/man1/varnishhist.1
@@ -28,9 +33,12 @@ man/man1/varnishsizes.1
man/man1/varnishstat.1
man/man1/varnishtest.1
man/man1/varnishtop.1
+man/man3/vmod_std.3
+man/man7/varnish-cli.7
man/man7/vcl.7
+man/man7/varnish-counters.7
sbin/varnishd
-share/examples/varnish/default.vcl
share/examples/rc.d/varnishd
share/examples/rc.d/varnishlog
share/examples/rc.d/varnishncsa
+share/examples/varnish/default.vcl
diff --git a/www/varnish/distinfo b/www/varnish/distinfo
index 4867f13abbc..d3ca3608cae 100644
--- a/www/varnish/distinfo
+++ b/www/varnish/distinfo
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.8 2011/05/09 11:11:11 fhajny Exp $
+$NetBSD: distinfo,v 1.9 2011/11/12 20:40:16 mspo Exp $
-SHA1 (varnish-2.1.5.tar.gz) = 5c413ee7c4267d9fd4713fbff059d1be5fbba60f
-RMD160 (varnish-2.1.5.tar.gz) = 4619d4be920504388325f06afdbea9b40f5a806a
-Size (varnish-2.1.5.tar.gz) = 1530856 bytes
-SHA1 (patch-aa) = d0bce82fc6bc0bb7e078f61461a21172bb658d4a
-SHA1 (patch-ab) = 30a64ce77354df3f2e0e830f60f4c6d98ef3099c
-SHA1 (patch-bin__varnishd__mgt_child.c) = f715b65a945147794b71c427c6067b6218392eb3
+SHA1 (varnish-3.0.2.tar.gz) = 906f1536cb7e728d18d9425677907ae723943df7
+RMD160 (varnish-3.0.2.tar.gz) = 6093839815ba72107fa2b52f0a198167a3a6b79b
+Size (varnish-3.0.2.tar.gz) = 1977852 bytes
+SHA1 (patch-bin__varnishd__cache_dir_random.c) = 1f197db3c543d202b2444192dee4c1095cd0ac2f
+SHA1 (patch-configure.ac) = 5614b7a0f5d016884e1b6dcb43c42f59af3611db
+SHA1 (patch-etc__Makefile.in) = 86424950049721ef224facdfbe4cb630a2c46532
diff --git a/www/varnish/patches/patch-aa b/www/varnish/patches/patch-aa
deleted file mode 100644
index 51fc14ebd53..00000000000
--- a/www/varnish/patches/patch-aa
+++ /dev/null
@@ -1,21 +0,0 @@
-$NetBSD: patch-aa,v 1.4 2011/04/01 18:59:42 zafer Exp $
-
---- configure.ac.orig 2011-01-25 06:48:58.000000000 -0500
-+++ configure.ac 2011-02-04 18:38:25.000000000 -0500
-@@ -66,6 +66,7 @@
- save_LIBS="${LIBS}"
- LIBS=""
- AC_SEARCH_LIBS(pthread_create, [thr pthread c_r])
-+LIBS="${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}"
- PTHREAD_LIBS="${LIBS}"
- LIBS="${save_LIBS}"
- AC_SUBST(PTHREAD_LIBS)
-@@ -257,7 +258,7 @@
-
- if test "$enable_kqueue" = yes; then
- case $target in
-- *-*-freebsd* | *-*-darwin9* )
-+ *-*-freebsd* | *-*-darwin9* | *-*-netbsd* )
- AC_CHECK_FUNCS([kqueue])
- ;;
- *-*-bsd*)
diff --git a/www/varnish/patches/patch-ab b/www/varnish/patches/patch-ab
deleted file mode 100644
index ca2d2a8b983..00000000000
--- a/www/varnish/patches/patch-ab
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ab,v 1.4 2011/04/01 18:59:42 zafer Exp $
-
---- etc/Makefile.in.orig 2011-02-05 13:57:36.000000000 +0000
-+++ etc/Makefile.in
-@@ -197,7 +197,7 @@ target_alias = @target_alias@
- target_cpu = @target_cpu@
- target_os = @target_os@
- target_vendor = @target_vendor@
--varnishconfdir = @varnishconfdir@
-+varnishconfdir = @prefix@/share/examples/@PACKAGE@
- EXTRA_DIST = zope-plone.vcl
- DISTCLEANFILES = default.vcl
- dist_varnishconf_DATA = default.vcl
diff --git a/www/varnish/patches/patch-bin__varnishd__cache_dir_random.c b/www/varnish/patches/patch-bin__varnishd__cache_dir_random.c
new file mode 100644
index 00000000000..d89965c5406
--- /dev/null
+++ b/www/varnish/patches/patch-bin__varnishd__cache_dir_random.c
@@ -0,0 +1,50 @@
+$NetBSD: patch-bin__varnishd__cache_dir_random.c,v 1.1 2011/11/12 20:40:16 mspo Exp $
+
+deal with missing exp2
+
+--- bin/varnishd/cache_dir_random.c.orig 2011-10-24 07:25:09.000000000 +0000
++++ bin/varnishd/cache_dir_random.c
+@@ -62,6 +62,11 @@
+ #include "vsha256.h"
+ #include "vend.h"
+
++#ifndef HAVE_EXP2
++ #define EXP2_32 4294967296
++ #define EXP2_31 2147483648
++#endif
++
+ /*--------------------------------------------------------------------*/
+
+ struct vdi_random_host {
+@@ -97,7 +102,11 @@ vdi_random_sha(const char *input, ssize_
+ SHA256_Init(&ctx);
+ SHA256_Update(&ctx, input, len);
+ SHA256_Final(sign, &ctx);
++#ifndef HAVE_EXP2
++ return (vle32dec(sign) / EXP2_32);
++#else
+ return (vle32dec(sign) / exp2(32));
++#endif
+ }
+
+ /*
+@@ -119,11 +128,19 @@ vdi_random_init_seed(const struct vdi_ra
+ break;
+ case c_hash:
+ AN(sp->digest);
++#ifndef HAVE_EXP2
++ retval = vle32dec(sp->digest) / EXP2_32;
++#else
+ retval = vle32dec(sp->digest) / exp2(32);
++#endif
+ break;
+ case c_random:
+ default:
++#ifndef HAVE_EXP2
++ retval = random() / EXP2_31;
++#else
+ retval = random() / exp2(31);
++#endif
+ break;
+ }
+ return (retval);
diff --git a/www/varnish/patches/patch-bin__varnishd__mgt_child.c b/www/varnish/patches/patch-bin__varnishd__mgt_child.c
deleted file mode 100644
index 6750e4bf6da..00000000000
--- a/www/varnish/patches/patch-bin__varnishd__mgt_child.c
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD: patch-bin__varnishd__mgt_child.c,v 1.1 2011/05/09 11:11:11 fhajny Exp $
-
-Patch varnishd to run on recent (snv_140+) versions of OpenSolaris.
-See http://www.varnish-cache.org/trac/ticket/912
---- bin/varnishd/mgt_child.c.orig 2010-10-21 08:57:22.000000000 +0000
-+++ bin/varnishd/mgt_child.c
-@@ -298,6 +298,7 @@ waive_privileges(void)
-
- /* new privilege, silently ignore any errors if it doesn't exist */
- priv_addset(minimal, "net_access");
-+ priv_addset(minimal, "file_read");
-
- #define SETPPRIV(which, set) \
- if (setppriv(PRIV_SET, which, set)) \
diff --git a/www/varnish/patches/patch-configure.ac b/www/varnish/patches/patch-configure.ac
new file mode 100644
index 00000000000..38fefe7d20d
--- /dev/null
+++ b/www/varnish/patches/patch-configure.ac
@@ -0,0 +1,15 @@
+$NetBSD: patch-configure.ac,v 1.1 2011/11/12 20:40:16 mspo Exp $
+
+deal with missing exp2
+
+--- configure.ac.orig 2011-10-30 12:53:05.000000000 +0000
++++ configure.ac
+@@ -380,6 +380,8 @@ else
+ ac_cv_func_port_create=no
+ fi
+
++AC_CHECK_FUNCS([exp2])
++
+ AM_MISSING_HAS_RUN
+ AC_CHECK_PROGS(PYTHON, [python3 python3.1 python3.2 python2.7 python2.6 python2.5 python2 python], [AC_MSG_ERROR([Python is needed to build Varnish, please install python.])])
+
diff --git a/www/varnish/patches/patch-etc__Makefile.in b/www/varnish/patches/patch-etc__Makefile.in
new file mode 100644
index 00000000000..125e614c626
--- /dev/null
+++ b/www/varnish/patches/patch-etc__Makefile.in
@@ -0,0 +1,15 @@
+$NetBSD: patch-etc__Makefile.in,v 1.1 2011/11/12 20:40:16 mspo Exp $
+
+Put config file in examples
+
+--- etc/Makefile.in.orig 2011-07-02 21:50:03.000000000 +0000
++++ etc/Makefile.in
+@@ -220,7 +220,7 @@ target_vendor = @target_vendor@
+ top_build_prefix = @top_build_prefix@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+-varnishconfdir = @varnishconfdir@
++varnishconfdir = @prefix@/share/examples/@PACKAGE@
+ EXTRA_DIST = zope-plone.vcl
+ DISTCLEANFILES = default.vcl
+ dist_varnishconf_DATA = default.vcl