Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Oct 2012 15:34:47 +0000 (UTC)
From:      Mikhail Teterin <mi@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r306315 - in head/www/varnish: . files
Message-ID:  <201210231534.q9NFYlgP099241@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mi
Date: Tue Oct 23 15:34:47 2012
New Revision: 306315
URL: http://svn.freebsd.org/changeset/ports/306315

Log:
  Add the test-target for running vendor's self-tests and attempt to
  make sure, the tests complete.
  
  Add one more header to the installation list -- this is required in 3.0.3
  for 3rd-party modules to build.
  
  Approved by:	maintainer
  Feature safe:	yes

Added:
  head/www/varnish/files/bug-1201.patch   (contents, props changed)
  head/www/varnish/files/no-inet6.patch   (contents, props changed)
  head/www/varnish/files/patch-bug-1202   (contents, props changed)
  head/www/varnish/files/patch-digest   (contents, props changed)
Modified:
  head/www/varnish/Makefile   (contents, props changed)
  head/www/varnish/pkg-plist   (contents, props changed)

Modified: head/www/varnish/Makefile
==============================================================================
--- head/www/varnish/Makefile	Tue Oct 23 14:26:48 2012	(r306314)
+++ head/www/varnish/Makefile	Tue Oct 23 15:34:47 2012	(r306315)
@@ -2,6 +2,7 @@
 
 PORTNAME=	varnish
 PORTVERSION=	3.0.3
+PORTREVISION=	1
 CATEGORIES=	www
 MASTER_SITES=	http://repo.varnish-cache.org/source/
 
@@ -10,20 +11,20 @@ COMMENT=	The Varnish high-performance HT
 
 LICENSE=	BSD
 
-LIB_DEPENDS=	pcre.1:${PORTSDIR}/devel/pcre
+LIB_DEPENDS=	pcre:${PORTSDIR}/devel/pcre
 
 CONFLICTS=	varnish-2.*
 
 GNU_CONFIGURE=	yes
 USE_GMAKE=	yes
 USE_PYTHON_BUILD=	yes
-CONFIGURE_ARGS=	--localstatedir=${PREFIX}
+CONFIGURE_ARGS=	--localstatedir=${PREFIX} --enable-tests
 CONFIGURE_ENV=	RST2MAN=true
 USE_LDCONFIG=	yes
 USE_GNOME=	pkgconfig
 USE_AUTOTOOLS=  aclocal libtool libtoolize automake autoconf
 ACLOCAL_ARGS=	-I m4
-LIBTOOLFLAGS=	--copy --force
+LIBTOOLFLAGS=	--copy --force --disable-static
 AUTOMAKE_ARGS=	--add-missing --copy --foreign
 
 MAN1=		varnishadm.1 varnishd.1 varnishhist.1 varnishlog.1 \
@@ -33,10 +34,31 @@ MAN3=		vmod_std.3
 MAN7=		vcl.7 varnish-cli.7 varnish-counters.7
 USE_RC_SUBR=	varnishd varnishlog varnishncsa
 SUB_FILES=	pkg-message
+.if defined(NO_INET6) || defined(WITHOUT_INET6)
+BAD_TESTS+=	r00832
+EXTRA_PATCHES+=	${FILESDIR}/no-inet6.patch
+.endif
+MAKE_JOBS_SAFE=	yes
 
 post-patch:
 	@${REINPLACE_CMD} -e 's|\$$(libdir)/pkgconfig|\$$(prefix)/libdata/pkgconfig|' \
 		${WRKSRC}/Makefile.am
+.if defined(BAD_TESTS)
+	${RM} -f ${BAD_TESTS:C|.+|${WRKSRC}/bin/varnishtest/tests/\0.vtc|}
+.endif
+
+regression-test check test: build
+	${GMAKE} TESTS_PARALLELISM=1 -C ${WRKSRC} check
+
+post-build:
+	#
+	# It is highly recommended, that you verify the build's
+	# correctness by performing:
+	#
+	#	make check
+	#
+	# now...
+	#
 
 post-install:
 	@${MKDIR} ${PREFIX}/share/varnish
@@ -44,13 +66,17 @@ post-install:
 .for f in cache.h heritage.h steps.h common.h acct_fields.h locks.h body_status.h
 	@${INSTALL_DATA} ${WRKSRC}/bin/varnishd/${f} ${PREFIX}/include/varnish
 .endfor
-.for f in vct.h vmod_abi.h vrt.h vqueue.h vsb.h libvarnish.h miniobj.h vas.h vav.h http_headers.h vcl_returns.h
+.for f in vct.h vmod_abi.h vre.h vrt.h vqueue.h vsb.h libvarnish.h miniobj.h vas.h vav.h http_headers.h vcl_returns.h
 	@${INSTALL_DATA} ${WRKSRC}/include/${f} ${PREFIX}/include/varnish
 .endfor
 	@${CAT} ${PKGMESSAGE}
+	@${RM} -f ${PREFIX}/lib/libvarnishapi.*a ${PREFIX}/lib/varnish/lib*a ${PREFIX}/lib/varnish/vmods/lib*a
 
 .include <bsd.port.pre.mk>
 
+.if ${ARCH} == "i386"
+EXTRA_PATCHES+=	${FILESDIR}/bug-1201.patch
+.endif
 .if ${ARCH} == "arm"
 BROKEN=		Does not configure on arm
 .endif

Added: head/www/varnish/files/bug-1201.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/varnish/files/bug-1201.patch	Tue Oct 23 15:34:47 2012	(r306315)
@@ -0,0 +1,15 @@
+Use larger stack-size for the r01109 test. See:
+
+	https://www.varnish-cache.org/trac/ticket/1201
+
+for details.
+
+--- bin/varnishtest/tests/r01109.vtc	2012-08-20 05:20:39.000000000 -0400
++++ bin/varnishtest/tests/r01109.vtc	2012-10-10 09:06:29.000000000 -0400
+@@ -22,5 +22,5 @@
+ } -start
+ 
+-varnish v1 -arg "-pfetch_chunksize=4k" -arg "-pgzip_level=0" -vcl+backend {
++varnish v1 -arg "-pfetch_chunksize=4k" -arg "-pgzip_level=0" -arg "-pthread_pool_stack=131072" -vcl+backend {
+ 	sub vcl_fetch {
+ 		if (req.url ~ "/test") {

Added: head/www/varnish/files/no-inet6.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/varnish/files/no-inet6.patch	Tue Oct 23 15:34:47 2012	(r306315)
@@ -0,0 +1,8 @@
+--- bin/varnishtest/tests/c00005.vtc	2012-08-20 05:20:39.000000000 -0400
++++ bin/varnishtest/tests/c00005.vtc	2012-09-26 12:09:59.000000000 -0400
+@@ -32,5 +32,4 @@
+ 		! "localhost";
+ 		"0.0.0.0" / 0;
+-		"::" / 0;
+ 	}
+ 

Added: head/www/varnish/files/patch-bug-1202
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/varnish/files/patch-bug-1202	Tue Oct 23 15:34:47 2012	(r306315)
@@ -0,0 +1,12 @@
+See:
+	https://www.varnish-cache.org/trac/ticket/1202
+
+--- bin/varnishtest/vtc_log.c	2012-08-20 05:20:40.000000000 -0400
++++ bin/varnishtest/vtc_log.c	2012-10-01 12:35:45.000000000 -0400
+@@ -138,5 +138,5 @@
+ 	AZ(pthread_mutex_lock(&vl->mtx));
+ 	vl->act = 1;
+-	assert(lvl < NLEAD);
++	assert(lvl < (int)NLEAD);
+ 	VSB_clear(vl->vsb);
+ 	VSB_printf(vl->vsb, "%s %-4s %4.1f ",

Added: head/www/varnish/files/patch-digest
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/varnish/files/patch-digest	Tue Oct 23 15:34:47 2012	(r306315)
@@ -0,0 +1,72 @@
+This arranges for using SHA256 found in -lmd, instead of
+the copy bundled with Varnish sources.
+
+	-mi
+
+P.S. OpenSSL has the same SHA256 API and could also be used
+for the same purpose.
+--- include/vsha256.h	2012-08-20 05:20:40.000000000 -0400
++++ include/vsha256.h	2012-09-26 14:28:29.000000000 -0400
+@@ -28,20 +28,8 @@
+ 
+ #ifndef _SHA256_H_
+-#define _SHA256_H_
+ 
+-#include <stdint.h>
++#include <sha256.h>
+ 
+ #define SHA256_LEN		32
+ 
+-typedef struct SHA256Context {
+-	uint32_t state[8];
+-	uint64_t count;
+-	unsigned char buf[64];
+-} SHA256_CTX;
+-
+-void	SHA256_Init(SHA256_CTX *);
+-void	SHA256_Update(SHA256_CTX *, const void *, size_t);
+-void	SHA256_Final(unsigned char [SHA256_LEN], SHA256_CTX *);
+-void	SHA256_Test(void);
+-
+ #endif /* !_SHA256_H_ */
+--- lib/libvarnish/Makefile.am	2012-08-20 05:20:40.000000000 -0400
++++ lib/libvarnish/Makefile.am	2012-09-26 14:28:35.000000000 -0400
+@@ -26,10 +26,10 @@
+ 	vre.c \
+ 	vsb.c \
+-	vsha256.c \
+ 	vss.c \
+ 	vtmpfile.c
+ 
+ libvarnish_la_CFLAGS = -DVARNISH_STATE_DIR='"${VARNISH_STATE_DIR}"'
+ libvarnish_la_LIBADD = ${RT_LIBS} ${NET_LIBS} ${LIBM} @PCRE_LIBS@
++libvarnish_la_LIBADD+= -lmd
+ 
+ if ENABLE_TESTS
+--- lib/libvarnishapi/Makefile.am	2012-08-20 05:20:40.000000000 -0400
++++ lib/libvarnishapi/Makefile.am	2012-09-26 14:36:57.000000000 -0400
+@@ -21,5 +21,4 @@
+ 	../libvarnish/vre.c \
+ 	../libvarnish/vsb.c \
+-	../libvarnish/vsha256.c \
+ 	vsm.c \
+ 	vsl_arg.c \
+@@ -31,5 +30,5 @@
+ 	-DVARNISH_STATE_DIR='"${VARNISH_STATE_DIR}"'
+ 
+-libvarnishapi_la_LIBADD = @PCRE_LIBS@
++libvarnishapi_la_LIBADD = @PCRE_LIBS@ -lmd
+ 
+ if HAVE_LD_VERSION_SCRIPT
+--- bin/varnishd/varnishd.c	2012-08-20 05:20:40.000000000 -0400
++++ bin/varnishd/varnishd.c	2012-09-26 14:50:04.000000000 -0400
+@@ -391,9 +391,4 @@
+ 	assert(TIM_parse("Sun Nov  6 08:49:37 1994") == 784111777);
+ 
+-	/*
+-	 * Check that our SHA256 works
+-	 */
+-	SHA256_Test();
+-
+ 	memset(cli, 0, sizeof cli);
+ 	cli[0].sb = VSB_new_auto();

Modified: head/www/varnish/pkg-plist
==============================================================================
--- head/www/varnish/pkg-plist	Tue Oct 23 14:26:48 2012	(r306314)
+++ head/www/varnish/pkg-plist	Tue Oct 23 15:34:47 2012	(r306315)
@@ -26,6 +26,7 @@ include/varnish/vcli.h
 include/varnish/vct.h
 include/varnish/vmod_abi.h
 include/varnish/vqueue.h
+include/varnish/vre.h
 include/varnish/vrt.h
 include/varnish/vsb.h
 include/varnish/vsc.h
@@ -35,24 +36,12 @@ include/varnish/vsl.h
 include/varnish/vsl_tags.h
 include/varnish/vsm.h
 lib/varnish/libvarnish.so
-lib/varnish/libvarnish.la
-lib/varnish/libvarnish.a
 lib/varnish/libvarnishcompat.so
-lib/varnish/libvarnishcompat.la
-lib/varnish/libvarnishcompat.a
 lib/varnish/libvcl.so
-lib/varnish/libvcl.la
-lib/varnish/libvcl.a
 lib/varnish/libvgz.so
-lib/varnish/libvgz.la
-lib/varnish/libvgz.a
 lib/varnish/vmods/libvmod_std.so
-lib/varnish/vmods/libvmod_std.la
-lib/varnish/vmods/libvmod_std.a
 lib/libvarnishapi.so.1
 lib/libvarnishapi.so
-lib/libvarnishapi.la
-lib/libvarnishapi.a
 libdata/pkgconfig/varnishapi.pc
 sbin/varnishd
 share/varnish/vmod.py



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210231534.q9NFYlgP099241>