Update to 3.0.2.

This commit is contained in:
Anders Nordby 2011-11-03 14:48:08 +00:00
parent 8940a5474c
commit 1e3b828ac6
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=284984
5 changed files with 6 additions and 105 deletions

View File

@ -6,8 +6,7 @@
#
PORTNAME= varnish
PORTVERSION= 3.0.1
PORTREVISION= 2
PORTVERSION= 3.0.2
CATEGORIES= www
MASTER_SITES= http://repo.varnish-cache.org/source/
@ -36,7 +35,7 @@ MAN1= varnishadm.1 varnishd.1 varnishhist.1 varnishlog.1 \
varnishncsa.1 varnishreplay.1 varnishsizes.1 \
varnishstat.1 varnishtest.1 varnishtop.1
MAN3= vmod_std.3
MAN7= vcl.7 varnish-cli.7
MAN7= vcl.7 varnish-cli.7 varnish-counters.7
USE_RC_SUBR= varnishd varnishlog varnishncsa
SUB_FILES= pkg-message
@ -53,7 +52,7 @@ post-patch:
post-install:
@${MKDIR} ${PREFIX}/share/varnish
@${INSTALL_SCRIPT} ${WRKSRC}/lib/libvmod_std/vmod.py ${PREFIX}/share/varnish
.for f in cache.h heritage.h steps.h common.h acct_fields.h locks.h
.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

View File

@ -1,4 +1,2 @@
SHA256 (varnish-3.0.1.tar.gz) = 385807737777a392520c5334bb114f9fc0e5f8dbf5cc48b420baf5b0478eb279
SIZE (varnish-3.0.1.tar.gz) = 2123838
SHA256 (patch-varnishncsa-3.0.0.diff) = d0794683e9fb11693384a6aca50f7b9a68c8b3276ae0d70b4fd93674fcd899d3
SIZE (patch-varnishncsa-3.0.0.diff) = 487
SHA256 (varnish-3.0.2.tar.gz) = 973f60625e9690e0989e1bbc73c37ea53fc6291b8f7b03d617b76f8084a4a243
SIZE (varnish-3.0.2.tar.gz) = 1977852

View File

@ -1,86 +0,0 @@
--- bin/varnishd/cache.h.orig 2011-08-30 09:17:01.000000000 +0200
+++ bin/varnishd/cache.h 2011-09-01 12:16:24.000000000 +0200
@@ -898,6 +898,7 @@
/* cache_vary.c */
struct vsb *VRY_Create(const struct sess *sp, const struct http *hp);
int VRY_Match(struct sess *sp, const uint8_t *vary);
+void VRY_Validate(const uint8_t *vary);
/* cache_vcl.c */
void VCL_Init(void);
--- bin/varnishd/cache_vary.c.orig 2011-08-30 09:17:01.000000000 +0200
+++ bin/varnishd/cache_vary.c 2011-09-01 12:16:24.000000000 +0200
@@ -247,3 +247,13 @@
sp->vary_l = vsp + 3;
return (retval);
}
+
+void
+VRY_Validate(const uint8_t *vary)
+{
+
+ while (vary[2] != 0) {
+ assert(strlen((const char*)vary+3) == vary[2]);
+ vary += vry_len(vary);
+ }
+}
--- bin/varnishd/cache_hash.c.orig 2011-08-29 10:45:24.000000000 +0200
+++ bin/varnishd/cache_hash.c 2011-09-01 12:16:24.000000000 +0200
@@ -461,7 +461,12 @@
AN(oc->flags & OC_F_BUSY);
oc->refcnt = 1;
- w->nbusyobj->vary = sp->vary_b;
+ /* XXX: clear w->nbusyobj before use */
+ VRY_Validate(sp->vary_b);
+ if (sp->vary_l != NULL)
+ w->nbusyobj->vary = sp->vary_b;
+ else
+ w->nbusyobj->vary = NULL;
oc->busyobj = w->nbusyobj;
w->nbusyobj = NULL;
--- bin/varnishd/cache_center.c.orig 2011-09-01 12:17:18.000000000 +0200
+++ bin/varnishd/cache_center.c 2011-09-01 12:16:24.000000000 +0200
@@ -802,6 +802,7 @@
(void *)WS_Alloc(sp->obj->http->ws, varyl);
AN(sp->obj->vary);
memcpy(sp->obj->vary, VSB_data(vary), varyl);
+ VRY_Validate(sp->obj->vary);
VSB_delete(vary);
}
@@ -1080,10 +1081,12 @@
AZ(sp->vary_l);
AZ(sp->vary_e);
(void)WS_Reserve(sp->ws, 0);
- sp->vary_b = (void*)sp->ws->f;
- sp->vary_e = (void*)sp->ws->r;
- sp->vary_b[2] = '\0';
+ } else {
+ AN(sp->ws->r);
}
+ sp->vary_b = (void*)sp->ws->f;
+ sp->vary_e = (void*)sp->ws->r;
+ sp->vary_b[2] = '\0';
oc = HSH_Lookup(sp, &oh);
@@ -1105,10 +1108,14 @@
if (oc->flags & OC_F_BUSY) {
sp->wrk->stats.cache_miss++;
- if (sp->vary_l != NULL)
+ if (sp->vary_l != NULL) {
+ assert(oc->busyobj->vary == sp->vary_b);
+ VRY_Validate(oc->busyobj->vary);
WS_ReleaseP(sp->ws, (void*)sp->vary_l);
- else
- WS_Release(sp->ws, 0);
+ } else {
+ AZ(oc->busyobj->vary);
+ WS_Release(sp->ws, 0);
+ }
sp->vary_b = NULL;
sp->vary_l = NULL;
sp->vary_e = NULL;

View File

@ -1,11 +0,0 @@
--- bin/varnishd/mgt_param.c.orig 2011-09-21 14:30:03.000000000 +0200
+++ bin/varnishd/mgt_param.c 2011-09-21 14:30:15.000000000 +0200
@@ -622,7 +622,7 @@
"Maximum number of objects we attempt to nuke in order"
"to make space for a object body.",
EXPERIMENTAL,
- "10", "allocations" },
+ "50", "allocations" },
{ "fetch_chunksize",
tweak_uint, &master.fetch_chunksize, 4, UINT_MAX / 1024.,
"The default chunksize used by fetcher. "

View File

@ -9,6 +9,7 @@ bin/varnishtest
bin/varnishtop
etc/varnish/default.vcl
include/varnish/acct_fields.h
include/varnish/body_status.h
include/varnish/cache.h
include/varnish/common.h
include/varnish/heritage.h