From phk at projects.linpro.no Fri Dec 7 12:03:59 2007 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Fri, 7 Dec 2007 13:03:59 +0100 (CET) Subject: r2286 - trunk/varnish-cache/bin/varnishd Message-ID: <20071207120359.474991EC2B4@projects.linpro.no> Author: phk Date: 2007-12-07 13:03:58 +0100 (Fri, 07 Dec 2007) New Revision: 2286 Modified: trunk/varnish-cache/bin/varnishd/mgt_cli.c trunk/varnish-cache/bin/varnishd/mgt_event.h Log: TCP connections don't quite behave like other fds, and we need to handle that for the managers CLI event-engine: React to POLLNVAL as we would to POLLHUP Modified: trunk/varnish-cache/bin/varnishd/mgt_cli.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_cli.c 2007-11-23 10:47:16 UTC (rev 2285) +++ trunk/varnish-cache/bin/varnishd/mgt_cli.c 2007-12-07 12:03:58 UTC (rev 2286) @@ -301,7 +301,7 @@ CAST_OBJ_NOTNULL(cp, e->priv, CLI_PORT_MAGIC); - if (what & (EV_ERR | EV_HUP)) + if (what & (EV_ERR | EV_HUP | EV_GONE)) goto cli_close; /* grow the buffer if it is full */ Modified: trunk/varnish-cache/bin/varnishd/mgt_event.h =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_event.h 2007-11-23 10:47:16 UTC (rev 2285) +++ trunk/varnish-cache/bin/varnishd/mgt_event.h 2007-12-07 12:03:58 UTC (rev 2286) @@ -50,6 +50,7 @@ #define EV_WR POLLOUT #define EV_ERR POLLERR #define EV_HUP POLLHUP +#define EV_GONE POLLNVAL #define EV_SIG -1 int sig; unsigned sig_flags; From phk at phk.freebsd.dk Fri Dec 7 12:06:36 2007 From: phk at phk.freebsd.dk (Poul-Henning Kamp) Date: Fri, 07 Dec 2007 12:06:36 +0000 Subject: r2286 - trunk/varnish-cache/bin/varnishd In-Reply-To: Your message of "Fri, 07 Dec 2007 13:03:59 +0100." <20071207120359.474991EC2B4@projects.linpro.no> Message-ID: <4679.1197029196@critter.freebsd.dk> This should fix Eivinds Telnet problem. Should go on the branch as well. May be the same ting as Anders Nordby saw about a week ago on the branch. Poul-Henning In message <20071207120359.474991EC2B4 at projects.linpro.no>, phk at projects.linpro .no writes: >Author: phk >Date: 2007-12-07 13:03:58 +0100 (Fri, 07 Dec 2007) >New Revision: 2286 > >Modified: > trunk/varnish-cache/bin/varnishd/mgt_cli.c > trunk/varnish-cache/bin/varnishd/mgt_event.h >Log: >TCP connections don't quite behave like other fds, and we need to handle >that for the managers CLI event-engine: > >React to POLLNVAL as we would to POLLHUP > > >Modified: trunk/varnish-cache/bin/varnishd/mgt_cli.c >=================================================================== >--- trunk/varnish-cache/bin/varnishd/mgt_cli.c 2007-11-23 10:47:16 UTC (rev 2285) >+++ trunk/varnish-cache/bin/varnishd/mgt_cli.c 2007-12-07 12:03:58 UTC (rev 2286) >@@ -301,7 +301,7 @@ > > CAST_OBJ_NOTNULL(cp, e->priv, CLI_PORT_MAGIC); > >- if (what & (EV_ERR | EV_HUP)) >+ if (what & (EV_ERR | EV_HUP | EV_GONE)) > goto cli_close; > > /* grow the buffer if it is full */ > >Modified: trunk/varnish-cache/bin/varnishd/mgt_event.h >=================================================================== >--- trunk/varnish-cache/bin/varnishd/mgt_event.h 2007-11-23 10:47:16 UTC (rev 2285) >+++ trunk/varnish-cache/bin/varnishd/mgt_event.h 2007-12-07 12:03:58 UTC (rev 2286) >@@ -50,6 +50,7 @@ > #define EV_WR POLLOUT > #define EV_ERR POLLERR > #define EV_HUP POLLHUP >+#define EV_GONE POLLNVAL > #define EV_SIG -1 > int sig; > unsigned sig_flags; > >_______________________________________________ >varnish-commit mailing list >varnish-commit at projects.linpro.no >http://projects.linpro.no/mailman/listinfo/varnish-commit > -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk at FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From phk at projects.linpro.no Mon Dec 10 08:55:18 2007 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Mon, 10 Dec 2007 09:55:18 +0100 (CET) Subject: r2287 - in trunk/varnish-cache: bin/varnishd bin/varnishlog bin/varnishtop include lib/libvarnishapi Message-ID: <20071210085518.7320A1EC417@projects.linpro.no> Author: phk Date: 2007-12-10 09:55:17 +0100 (Mon, 10 Dec 2007) New Revision: 2287 Modified: trunk/varnish-cache/bin/varnishd/shmlog.c trunk/varnish-cache/bin/varnishlog/varnishlog.c trunk/varnish-cache/bin/varnishtop/varnishtop.c trunk/varnish-cache/include/shmlog.h trunk/varnish-cache/lib/libvarnishapi/shmlog.c Log: Go over the shmlog header processing. Add a byte to the length field, but retain the 255 bytes restriction for now. Add symbolic names for the header fields and macros for multi-byte fields, and uses these throughout. This will make it easier next time. Modified: trunk/varnish-cache/bin/varnishd/shmlog.c =================================================================== --- trunk/varnish-cache/bin/varnishd/shmlog.c 2007-12-07 12:03:58 UTC (rev 2286) +++ trunk/varnish-cache/bin/varnishd/shmlog.c 2007-12-10 08:55:17 UTC (rev 2287) @@ -80,13 +80,14 @@ vsl_hdr(enum shmlogtag tag, unsigned char *p, unsigned len, int id) { - p[1] = len & 0xff; - p[2] = (id >> 8) & 0xff; - p[3] = id & 0xff; - p[4 + len] = '\0'; - p[5 + len] = SLT_ENDMARKER; + p[__SHMLOG_LEN_HIGH] = (len >> 8) & 0xff; + p[__SHMLOG_LEN_LOW] = len & 0xff; + p[__SHMLOG_ID_HIGH] = (id >> 8) & 0xff; + p[__SHMLOG_ID_LOW] = id & 0xff; + p[SHMLOG_DATA + len] = '\0'; + p[SHMLOG_NEXTTAG + len] = SLT_ENDMARKER; /* XXX: Write barrier here */ - p[0] = tag; + p[SHMLOG_TAG] = tag; } /*-------------------------------------------------------------------- @@ -116,14 +117,14 @@ assert(loghead->ptr < loghead->size); /* Wrap if necessary */ - if (loghead->ptr + 5 + l + 1 >= loghead->size) + if (loghead->ptr + SHMLOG_NEXTTAG + l + 1 >= loghead->size) vsl_wrap(); p = logstart + loghead->ptr; - loghead->ptr += 5 + l; + loghead->ptr += SHMLOG_NEXTTAG + l; assert(loghead->ptr < loghead->size); UNLOCKSHM(&vsl_mtx); - memcpy(p + 4, t.b, l); + memcpy(p + SHMLOG_DATA, t.b, l); vsl_hdr(tag, p, l, id); } @@ -151,22 +152,21 @@ assert(loghead->ptr < loghead->size); /* Wrap if we cannot fit a full size record */ - if (loghead->ptr + 5 + 255 + 1 >= loghead->size) + if (loghead->ptr + SHMLOG_NEXTTAG + 255 + 1 >= loghead->size) vsl_wrap(); p = logstart + loghead->ptr; - n = vsnprintf((char *)(p + 4), 256, fmt, ap); + n = vsnprintf((char *)(p + SHMLOG_DATA), 256, fmt, ap); if (n > 255) n = 255; /* we truncate long fields */ vsl_hdr(tag, p, n, id); - loghead->ptr += 5 + n; + loghead->ptr += SHMLOG_NEXTTAG + n; assert(loghead->ptr < loghead->size); UNLOCKSHM(&vsl_mtx); } va_end(ap); } - /*--------------------------------------------------------------------*/ void @@ -215,12 +215,12 @@ assert(w->wlp < w->wle); /* Wrap if necessary */ - if (w->wlp + 5 + l + 1 >= w->wle) + if (w->wlp + SHMLOG_NEXTTAG + l + 1 >= w->wle) WSL_Flush(w); p = w->wlp; - w->wlp += 5 + l; + w->wlp += SHMLOG_NEXTTAG + l; assert(w->wlp < w->wle); - memcpy(p + 4, t.b, l); + memcpy(p + SHMLOG_DATA, t.b, l); vsl_hdr(tag, p, l, id); w->wlr++; } @@ -246,15 +246,15 @@ assert(w->wlp < w->wle); /* Wrap if we cannot fit a full size record */ - if (w->wlp + 5 + 255 + 1 >= w->wle) + if (w->wlp + SHMLOG_NEXTTAG + 255 + 1 >= w->wle) WSL_Flush(w); p = w->wlp; - n = vsnprintf((char *)(p + 4), 256, fmt, ap); + n = vsnprintf((char *)(p + SHMLOG_DATA), 256, fmt, ap); if (n > 255) n = 255; /* we truncate long fields */ vsl_hdr(tag, p, n, id); - w->wlp += 5 + n; + w->wlp += SHMLOG_NEXTTAG + n; assert(w->wlp < w->wle); w->wlr++; } Modified: trunk/varnish-cache/bin/varnishlog/varnishlog.c =================================================================== --- trunk/varnish-cache/bin/varnishlog/varnishlog.c 2007-12-07 12:03:58 UTC (rev 2286) +++ trunk/varnish-cache/bin/varnishlog/varnishlog.c 2007-12-10 08:55:17 UTC (rev 2287) @@ -243,7 +243,7 @@ static void do_write(struct VSL_data *vd, const char *w_arg, int a_flag) { - int fd, i; + int fd, i, l; unsigned char *p; fd = open_log(w_arg, a_flag); @@ -253,7 +253,8 @@ if (i < 0) break; if (i > 0) { - i = write(fd, p, 5 + p[1]); + l = SHMLOG_LEN(p); + i = write(fd, p, SHMLOG_NEXTTAG + l); if (i < 0) { perror(w_arg); exit(1); Modified: trunk/varnish-cache/bin/varnishtop/varnishtop.c =================================================================== --- trunk/varnish-cache/bin/varnishtop/varnishtop.c 2007-12-07 12:03:58 UTC (rev 2286) +++ trunk/varnish-cache/bin/varnishtop/varnishtop.c 2007-12-10 08:55:17 UTC (rev 2287) @@ -74,14 +74,15 @@ { struct top *tp, *tp2; const unsigned char *q; - unsigned int u; + unsigned int u, l; int i; // fprintf(stderr, "%*.*s\n", p[1], p[1], p + 4); u = 0; - q = p + 4; - for (i = 0; i < p[1]; i++, q++) { + q = p + SHMLOG_DATA; + l = SHMLOG_LEN(p); + for (i = 0; i < l; i++, q++) { if (f_flag && (*q == ':' || isspace(*q))) break; u += *q; @@ -90,11 +91,12 @@ VTAILQ_FOREACH(tp, &top_head, list) { if (tp->hash != u) continue; - if (tp->rec[0] != p[0]) + if (tp->rec[SHMLOG_TAG] != p[SHMLOG_TAG]) continue; if (tp->clen != q - p) continue; - if (memcmp(p + 4, tp->rec + 4, q - (p + 4))) + if (memcmp(p + SHMLOG_DATA, tp->rec + SHMLOG_DATA, + q - (p + SHMLOG_DATA))) continue; tp->count += 1.0; break; @@ -108,7 +110,7 @@ tp->clen = q - p; VTAILQ_INSERT_TAIL(&top_head, tp, list); } - memcpy(tp->rec, p, 4 + p[1]); + memcpy(tp->rec, p, SHMLOG_DATA + l); while (1) { tp2 = VTAILQ_PREV(tp, tophead, list); if (tp2 == NULL || tp2->count >= tp->count) @@ -129,7 +131,7 @@ update(void) { struct top *tp, *tp2; - int l; + int l, len; double t = 0; static time_t last; time_t now; @@ -145,12 +147,12 @@ mvprintw(0, 0, "list length %u", ntop); VTAILQ_FOREACH_SAFE(tp, &top_head, list, tp2) { if (++l < LINES) { - int len = tp->rec[1]; + len = SHMLOG_LEN(tp->rec); if (len > COLS - 20) len = COLS - 20; mvprintw(l, 0, "%9.2f %-9.9s %*.*s\n", - tp->count, VSL_tags[tp->rec[0]], - len, len, tp->rec + 4); + tp->count, VSL_tags[tp->rec[SHMLOG_TAG]], + len, len, tp->rec + SHMLOG_DATA); t = tp->count; } tp->count *= .999; Modified: trunk/varnish-cache/include/shmlog.h =================================================================== --- trunk/varnish-cache/include/shmlog.h 2007-12-07 12:03:58 UTC (rev 2286) +++ trunk/varnish-cache/include/shmlog.h 2007-12-10 08:55:17 UTC (rev 2287) @@ -69,11 +69,22 @@ * Record format is as follows: * * 1 byte field type (enum shmlogtag) - * 1 byte length of contents - * 2 byte record identifier + * 2 bytes length of contents + * 2 bytes record identifier * n bytes field contents (isgraph(c) || isspace(c)) allowed. */ +#define SHMLOG_TAG 0 +#define __SHMLOG_LEN_HIGH 1 +#define __SHMLOG_LEN_LOW 2 +#define __SHMLOG_ID_HIGH 3 +#define __SHMLOG_ID_LOW 4 +#define SHMLOG_DATA 5 +#define SHMLOG_NEXTTAG 6 /* ... + len */ + +#define SHMLOG_LEN(p) (((p)[__SHMLOG_LEN_HIGH] << 8) | (p)[__SHMLOG_LEN_LOW]) +#define SHMLOG_ID(p) (((p)[__SHMLOG_ID_HIGH] << 8) | (p)[__SHMLOG_ID_LOW]) + /* * The identifiers in shmlogtag are "SLT_" + XML tag. A script may be run * on this file to extract the table rather than handcode it Modified: trunk/varnish-cache/lib/libvarnishapi/shmlog.c =================================================================== --- trunk/varnish-cache/lib/libvarnishapi/shmlog.c 2007-12-07 12:03:58 UTC (rev 2286) +++ trunk/varnish-cache/lib/libvarnishapi/shmlog.c 2007-12-10 08:55:17 UTC (rev 2287) @@ -63,7 +63,7 @@ /* for -r option */ FILE *fi; - unsigned char rbuf[5 + 255 + 1]; + unsigned char rbuf[SHMLOG_NEXTTAG + 255 + 1]; int b_opt; int c_opt; @@ -199,7 +199,7 @@ if (!vd->d_opt && vd->fi == NULL) { for (p = vd->ptr; *p != SLT_ENDMARKER; ) - p += p[1] + 5; + p += SHMLOG_LEN(p) + SHMLOG_NEXTTAG; vd->ptr = p; } return (0); @@ -222,15 +222,16 @@ vsl_nextlog(struct VSL_data *vd, unsigned char **pp) { unsigned char *p; - unsigned w; + unsigned w, l; int i; CHECK_OBJ_NOTNULL(vd, VSL_MAGIC); if (vd->fi != NULL) { - i = fread(vd->rbuf, 4, 1, vd->fi); + i = fread(vd->rbuf, SHMLOG_DATA, 1, vd->fi); if (i != 1) return (-1); - i = fread(vd->rbuf + 4, vd->rbuf[1] + 1, 1, vd->fi); + i = fread(vd->rbuf + SHMLOG_DATA, + SHMLOG_LEN(vd->rbuf) + 1, 1, vd->fi); if (i != 1) return (-1); *pp = vd->rbuf; @@ -250,7 +251,8 @@ usleep(SLEEP_USEC); continue; } - vd->ptr = p + p[1] + 5; + l = SHMLOG_LEN(p); + vd->ptr = p + l + SHMLOG_NEXTTAG; *pp = p; return (1); } @@ -263,7 +265,7 @@ { unsigned char *p; regmatch_t rm; - unsigned u; + unsigned u, l; int i; CHECK_OBJ_NOTNULL(vd, VSL_MAGIC); @@ -271,8 +273,9 @@ i = vsl_nextlog(vd, &p); if (i != 1) return (i); - u = (p[2] << 8) | p[3]; - switch(p[0]) { + u = SHMLOG_ID(p); + l = SHMLOG_LEN(p); + switch(p[SHMLOG_TAG]) { case SLT_SessionOpen: case SLT_ReqStart: vd->map[u] |= M_CLIENT; @@ -286,11 +289,11 @@ default: break; } - if (vd->map[p[0]] & M_SELECT) { + if (vd->map[p[SHMLOG_TAG]] & M_SELECT) { *pp = p; return (1); } - if (vd->map[p[0]] & M_SUPPRESS) + if (vd->map[p[SHMLOG_TAG]] & M_SUPPRESS) continue; if (vd->b_opt && !(vd->map[u] & M_BACKEND)) continue; @@ -298,15 +301,17 @@ continue; if (vd->regincl != NULL) { rm.rm_so = 0; - rm.rm_eo = p[1]; - i = regexec(vd->regincl, (char *)p + 4, 1, &rm, 0); + rm.rm_eo = l; + i = regexec(vd->regincl, + (char *)p + SHMLOG_DATA, 1, &rm, 0); if (i == REG_NOMATCH) continue; } if (vd->regexcl != NULL) { rm.rm_so = 0; - rm.rm_eo = p[1]; - i = regexec(vd->regexcl, (char *)p + 4, 1, &rm, 0); + rm.rm_eo = l; + i = regexec(vd->regexcl, + (char *)p + SHMLOG_DATA, 1, &rm, 0); if (i != REG_NOMATCH) continue; } @@ -321,7 +326,7 @@ VSL_Dispatch(struct VSL_data *vd, vsl_handler *func, void *priv) { int i; - unsigned u; + unsigned u, l; unsigned char *p; CHECK_OBJ_NOTNULL(vd, VSL_MAGIC); @@ -329,11 +334,12 @@ i = VSL_NextLog(vd, &p); if (i <= 0) return (i); - u = (p[2] << 8) | p[3]; + u = SHMLOG_ID(p); + l = SHMLOG_LEN(p); if (func(priv, - p[0], u, p[1], + p[SHMLOG_TAG], u, l, vd->map[u] & (VSL_S_CLIENT|VSL_S_BACKEND), - (char *)p + 4)) + (char *)p + SHMLOG_DATA)) return (1); } } From ssm at projects.linpro.no Tue Dec 11 05:46:44 2007 From: ssm at projects.linpro.no (ssm at projects.linpro.no) Date: Tue, 11 Dec 2007 06:46:44 +0100 (CET) Subject: r2288 - trunk/varnish-cache/debian Message-ID: <20071211054644.40C4C1EC223@projects.linpro.no> Author: ssm Date: 2007-12-11 06:46:43 +0100 (Tue, 11 Dec 2007) New Revision: 2288 Modified: trunk/varnish-cache/debian/varnish.default Log: In the debian /etc/default/varnish, remove unused configuration variable, and an erroneous use of -n from the configuration examples. Modified: trunk/varnish-cache/debian/varnish.default =================================================================== --- trunk/varnish-cache/debian/varnish.default 2007-12-10 08:55:17 UTC (rev 2287) +++ trunk/varnish-cache/debian/varnish.default 2007-12-11 05:46:43 UTC (rev 2288) @@ -34,7 +34,6 @@ # DAEMON_OPTS="-a :6081 \ # -T localhost:6082 \ # -f /etc/varnish/default.vcl \ -# -n /var/lib/varnish \ # -s file,/var/lib/varnish/$INSTANCE/varnish_storage.bin,1G" @@ -64,9 +63,6 @@ # # Idle timeout for worker threads # VARNISH_THREAD_TIMEOUT=120 # -# # Home dir for this varnish instance -# VARNISH_HOMEDIR=/var/lib/varnish -# # # Cache file location # VARNISH_STORAGE_FILE=/var/lib/varnish/$INSTANCE/varnish_storage.bin # From ssm at projects.linpro.no Tue Dec 11 06:10:47 2007 From: ssm at projects.linpro.no (ssm at projects.linpro.no) Date: Tue, 11 Dec 2007 07:10:47 +0100 (CET) Subject: r2289 - trunk/varnish-cache/debian Message-ID: <20071211061047.4B9AD1EC418@projects.linpro.no> Author: ssm Date: 2007-12-11 07:10:47 +0100 (Tue, 11 Dec 2007) New Revision: 2289 Modified: trunk/varnish-cache/debian/rules Log: Debian packaging: do not ignore all errors from make distclean Modified: trunk/varnish-cache/debian/rules =================================================================== --- trunk/varnish-cache/debian/rules 2007-12-11 05:46:43 UTC (rev 2288) +++ trunk/varnish-cache/debian/rules 2007-12-11 06:10:47 UTC (rev 2289) @@ -49,7 +49,7 @@ dh_testroot rm -f build-stamp - -$(MAKE) distclean + [ ! -f Makefile ] || $(MAKE) distclean ifneq "$(wildcard /usr/share/misc/config.sub)" "" cp -f /usr/share/misc/config.sub config.sub endif From ssm at projects.linpro.no Tue Dec 11 06:14:49 2007 From: ssm at projects.linpro.no (ssm at projects.linpro.no) Date: Tue, 11 Dec 2007 07:14:49 +0100 (CET) Subject: r2290 - trunk/varnish-cache/debian Message-ID: <20071211061449.700B41EC404@projects.linpro.no> Author: ssm Date: 2007-12-11 07:14:49 +0100 (Tue, 11 Dec 2007) New Revision: 2290 Modified: trunk/varnish-cache/debian/changelog trunk/varnish-cache/debian/control Log: Changes in the Debian packaging * Use native version for the debian package * Add headers to indicate location of varnish source * Add "xsltproc" to build dependencies Modified: trunk/varnish-cache/debian/changelog =================================================================== --- trunk/varnish-cache/debian/changelog 2007-12-11 06:10:47 UTC (rev 2289) +++ trunk/varnish-cache/debian/changelog 2007-12-11 06:14:49 UTC (rev 2290) @@ -1,4 +1,4 @@ -varnish (1.1.2-1) unstable; urgency=low +varnish (1.1.2) unstable; urgency=low * New upstream release * Renamed library and development packages to reflect sonames Modified: trunk/varnish-cache/debian/control =================================================================== --- trunk/varnish-cache/debian/control 2007-12-11 06:10:47 UTC (rev 2289) +++ trunk/varnish-cache/debian/control 2007-12-11 06:14:49 UTC (rev 2290) @@ -3,8 +3,10 @@ Priority: optional Maintainer: Stig Sandbeck Mathisen Uploaders: Lars Bahner -Build-Depends: debhelper (>= 5), autotools-dev, automake1.9, libtool, autoconf, libncurses-dev -Standards-Version: 3.7.2 +Build-Depends: debhelper (>= 5), autotools-dev, automake1.9, libtool, autoconf, libncurses-dev, xsltproc +XS-Vcs-Browser: http://varnish.projects.linpro.no/browser/trunk/varnish-cache +XS-Vcs-Svn: http://varnish.projects.linpro.no/svn/trunk/varnish-cache +Standards-Version: 3.7.3 Package: varnish Architecture: any From ssm at projects.linpro.no Tue Dec 11 07:02:24 2007 From: ssm at projects.linpro.no (ssm at projects.linpro.no) Date: Tue, 11 Dec 2007 08:02:24 +0100 (CET) Subject: r2291 - trunk/varnish-cache/debian Message-ID: <20071211070224.C02ED1EC223@projects.linpro.no> Author: ssm Date: 2007-12-11 08:02:24 +0100 (Tue, 11 Dec 2007) New Revision: 2291 Modified: trunk/varnish-cache/debian/varnish.postinst Log: Debian packaging: Remove extra debhelper section in main postinst file, this was included by the debhelper tag as well, which resulted in a double startup entry, and an error on package installation. Modified: trunk/varnish-cache/debian/varnish.postinst =================================================================== --- trunk/varnish-cache/debian/varnish.postinst 2007-12-11 06:14:49 UTC (rev 2290) +++ trunk/varnish-cache/debian/varnish.postinst 2007-12-11 07:02:24 UTC (rev 2291) @@ -13,13 +13,3 @@ varnish_create_storagedir #DEBHELPER# -# Automatically added by dh_installinit -if [ -x "/etc/init.d/varnish" ]; then - update-rc.d varnish defaults >/dev/null - if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then - invoke-rc.d varnish start || exit $? - else - /etc/init.d/varnish start || exit $? - fi -fi -# End automatically added section From phk at projects.linpro.no Tue Dec 11 09:02:29 2007 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Tue, 11 Dec 2007 10:02:29 +0100 (CET) Subject: r2292 - trunk/varnish-cache Message-ID: <20071211090229.8C47B1EC418@projects.linpro.no> Author: phk Date: 2007-12-11 10:02:29 +0100 (Tue, 11 Dec 2007) New Revision: 2292 Modified: trunk/varnish-cache/configure.ac Log: Check if our pthreads sports a pthread_set_name_np() function. Modified: trunk/varnish-cache/configure.ac =================================================================== --- trunk/varnish-cache/configure.ac 2007-12-11 07:02:24 UTC (rev 2291) +++ trunk/varnish-cache/configure.ac 2007-12-11 09:02:29 UTC (rev 2292) @@ -47,6 +47,8 @@ LIBS="" AC_SEARCH_LIBS(pthread_create, [thr pthread c_r]) PTHREAD_LIBS="${LIBS}" +# Check for thread naming function +AC_CHECK_FUNCS([pthread_set_name_np]) LIBS="${save_LIBS}" AC_SUBST(PTHREAD_LIBS) @@ -74,6 +76,7 @@ AC_CHECK_HEADERS([stdlib.h]) AC_CHECK_HEADERS([unistd.h]) AC_CHECK_HEADERS([vis.h]) +AC_CHECK_HEADERS([pthread_np.h]) # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST From phk at projects.linpro.no Tue Dec 11 09:03:51 2007 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Tue, 11 Dec 2007 10:03:51 +0100 (CET) Subject: r2293 - trunk/varnish-cache/bin/varnishd Message-ID: <20071211090351.6448E1EC404@projects.linpro.no> Author: phk Date: 2007-12-11 10:03:51 +0100 (Tue, 11 Dec 2007) New Revision: 2293 Modified: trunk/varnish-cache/bin/varnishd/cache.h trunk/varnish-cache/bin/varnishd/cache_acceptor.c trunk/varnish-cache/bin/varnishd/cache_acceptor_epoll.c trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c trunk/varnish-cache/bin/varnishd/cache_expire.c trunk/varnish-cache/bin/varnishd/cache_main.c trunk/varnish-cache/bin/varnishd/cache_pool.c Log: Attempt to name threads if possible. On FreeBSD this means that for instance "top -H" will show the varnish threads as "cache-foo" for various values of foo, hopefully giving us another debugging hint. Modified: trunk/varnish-cache/bin/varnishd/cache.h =================================================================== --- trunk/varnish-cache/bin/varnishd/cache.h 2007-12-11 09:02:29 UTC (rev 2292) +++ trunk/varnish-cache/bin/varnishd/cache.h 2007-12-11 09:03:51 UTC (rev 2293) @@ -506,6 +506,9 @@ #include "http_headers.h" #undef HTTPH +/* cache_main.c */ +void THR_Name(const char *name); + /* cache_pipe.c */ void PipeSession(struct sess *sp); Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_acceptor.c 2007-12-11 09:02:29 UTC (rev 2292) +++ trunk/varnish-cache/bin/varnishd/cache_acceptor.c 2007-12-11 09:03:51 UTC (rev 2293) @@ -154,6 +154,7 @@ unsigned u; double now; + THR_Name("cache-acceptor"); (void)arg; /* Set up the poll argument */ Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor_epoll.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_acceptor_epoll.c 2007-12-11 09:02:29 UTC (rev 2292) +++ trunk/varnish-cache/bin/varnishd/cache_acceptor_epoll.c 2007-12-11 09:03:51 UTC (rev 2293) @@ -73,6 +73,7 @@ struct sess *sp, *sp2; int i; + THR_Name("cache-epoll"); (void)arg; epfd = epoll_create(16); Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c 2007-12-11 09:02:29 UTC (rev 2292) +++ trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c 2007-12-11 09:03:51 UTC (rev 2293) @@ -233,6 +233,7 @@ double deadline; struct sess *sp; + THR_Name("cache-kqueue"); (void)arg; kq = kqueue(); Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c 2007-12-11 09:02:29 UTC (rev 2292) +++ trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c 2007-12-11 09:03:51 UTC (rev 2293) @@ -112,6 +112,7 @@ double deadline; int i, fd; + THR_Name("cache-poll"); (void)arg; vca_poll(vca_pipes[0]); Modified: trunk/varnish-cache/bin/varnishd/cache_expire.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_expire.c 2007-12-11 09:02:29 UTC (rev 2292) +++ trunk/varnish-cache/bin/varnishd/cache_expire.c 2007-12-11 09:03:51 UTC (rev 2293) @@ -114,6 +114,7 @@ struct object *o; double t; + THR_Name("cache-hangman"); (void)arg; t = TIM_real(); @@ -167,6 +168,7 @@ struct object *o2; unsigned char log[1024]; /* XXX size ? */ + THR_Name("cache-timeout"); (void)arg; sp = SES_New(NULL, 0); Modified: trunk/varnish-cache/bin/varnishd/cache_main.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_main.c 2007-12-11 09:02:29 UTC (rev 2292) +++ trunk/varnish-cache/bin/varnishd/cache_main.c 2007-12-11 09:03:51 UTC (rev 2293) @@ -40,6 +40,27 @@ #include "stevedore.h" /*-------------------------------------------------------------------- + * Name threads if our pthreads implementation supports it. + */ + +#ifdef HAVE_PTHREAD_NP_H +#include +#endif + +void +THR_Name(const char *name) +{ +#ifdef HAVE_PTHREAD_SET_NAME_NP + pthread_set_name_np(pthread_self(), name); +#else + /* + * XXX: we could stash it somewhere else (TLS ?) + */ + (void)name; +#endif +} + +/*-------------------------------------------------------------------- * XXX: Think more about which order we start things */ @@ -51,6 +72,8 @@ setbuf(stderr, NULL); printf("Child starts\n"); + THR_Name("cache-main"); + #define SZOF(foo) printf("sizeof(%s) = %zd\n", #foo, sizeof(foo)); SZOF(struct ws); SZOF(struct http); Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pool.c 2007-12-11 09:02:29 UTC (rev 2292) +++ trunk/varnish-cache/bin/varnishd/cache_pool.c 2007-12-11 09:03:51 UTC (rev 2293) @@ -205,6 +205,7 @@ char c; unsigned char wlog[8192]; /* XXX: size */ + THR_Name("cache-worker"); w = &ww; qp = priv; memset(w, 0, sizeof *w); From phk at projects.linpro.no Tue Dec 11 12:04:59 2007 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Tue, 11 Dec 2007 13:04:59 +0100 (CET) Subject: r2294 - trunk/varnish-cache/bin/varnishd Message-ID: <20071211120459.80B121EC223@projects.linpro.no> Author: phk Date: 2007-12-11 13:04:58 +0100 (Tue, 11 Dec 2007) New Revision: 2294 Modified: trunk/varnish-cache/bin/varnishd/cache_hash.c trunk/varnish-cache/bin/varnishd/heritage.h trunk/varnish-cache/bin/varnishd/mgt_param.c Log: When an object is being fetched from the backend, other requests for it are parked not holding a worker thread, until the fetching session lowers the busy bit on the object. At that point we would release all the parked requests into the thread pool to be serviced, causing instant congestion and calls for road-pricing if the backend were a bit slow on an oft-requested object. Change the restart policy to be paced exponential: When we clear the busy bits, we unpark "rush_exponent" requests into the thread pool to start the show. Whenever the object is dereferenced, in practice whenever a request has been serviced, another "rush_exponent" worth of requests are unparked into the tread pool. Set the parameter to a conservative 3 until we know more about the behaviour in practice. If it is a big object and/or the clients are on slow lines, 3 may be an order of magnitude to small. Attempts to fix: #188 Modified: trunk/varnish-cache/bin/varnishd/cache_hash.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_hash.c 2007-12-11 09:03:51 UTC (rev 2293) +++ trunk/varnish-cache/bin/varnishd/cache_hash.c 2007-12-11 12:04:58 UTC (rev 2294) @@ -244,11 +244,26 @@ return (o); } +static void +hsh_rush(struct object *o) +{ + unsigned u; + struct sess *sp; + + for (u = 0; u < params->rush_exponent; u++) { + sp = VTAILQ_FIRST(&o->waitinglist); + if (sp == NULL) + return; + VTAILQ_REMOVE(&o->waitinglist, sp, list); + VSL(SLT_Debug, sp->id, "of waiting list"); + WRK_QueueSession(sp); + } +} + void HSH_Unbusy(struct object *o) { struct objhead *oh; - struct sess *sp; CHECK_OBJ_NOTNULL(o, OBJECT_MAGIC); assert(o->busy); @@ -261,15 +276,9 @@ LOCK(&oh->mtx); } o->busy = 0; + hsh_rush(o); if (oh != NULL) UNLOCK(&oh->mtx); - while (1) { - sp = VTAILQ_FIRST(&o->waitinglist); - if (sp == NULL) - break; - VTAILQ_REMOVE(&o->waitinglist, sp, list); - WRK_QueueSession(sp); - } } void @@ -305,6 +314,7 @@ } assert(o->refcnt > 0); r = --o->refcnt; + hsh_rush(o); if (oh != NULL) { if (!r) VTAILQ_REMOVE(&oh->objects, o, list); Modified: trunk/varnish-cache/bin/varnishd/heritage.h =================================================================== --- trunk/varnish-cache/bin/varnishd/heritage.h 2007-12-11 09:03:51 UTC (rev 2293) +++ trunk/varnish-cache/bin/varnishd/heritage.h 2007-12-11 12:04:58 UTC (rev 2294) @@ -131,6 +131,8 @@ /* Maximum esi:include depth allowed */ unsigned max_esi_includes; + /* Rush exponent */ + unsigned rush_exponent; }; extern volatile struct params *params; Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_param.c 2007-12-11 09:03:51 UTC (rev 2293) +++ trunk/varnish-cache/bin/varnishd/mgt_param.c 2007-12-11 12:04:58 UTC (rev 2294) @@ -295,6 +295,17 @@ /*--------------------------------------------------------------------*/ static void +tweak_rush_exponent(struct cli *cli, struct parspec *par, const char *arg) +{ + + (void)par; + tweak_generic_uint(cli, &master.rush_exponent, arg, + 2, UINT_MAX); +} + +/*--------------------------------------------------------------------*/ + +static void tweak_http_workspace(struct cli *cli, struct parspec *par, const char *arg) { @@ -642,6 +653,14 @@ "thread_pool_max parameter.", EXPERIMENTAL, "100", "%" }, + { "rush_exponent", tweak_rush_exponent, + "How many parked request we start for each completed " + "request on the object.\n" + "NB: Even with the implict delay of delivery, " + "this parameter controls an exponential increase in " + "number of worker threads. ", + EXPERIMENTAL, + "3", "requests per request" }, { "http_workspace", tweak_http_workspace, "Bytes of HTTP protocol workspace allocated. " "This space must be big enough for the entire HTTP protocol " From des at linpro.no Wed Dec 12 11:14:16 2007 From: des at linpro.no (=?iso-8859-1?Q?Dag-Erling_Sm=F8rgrav?=) Date: Wed, 12 Dec 2007 12:14:16 +0100 Subject: r2287 - in trunk/varnish-cache: bin/varnishd bin/varnishlog bin/varnishtop include lib/libvarnishapi In-Reply-To: <20071210085518.7320A1EC417@projects.linpro.no> (phk@projects.linpro.no's message of "Mon, 10 Dec 2007 09:55:18 +0100 (CET)") References: <20071210085518.7320A1EC417@projects.linpro.no> Message-ID: phk at projects.linpro.no writes: > +#define SHMLOG_TAG 0 > +#define __SHMLOG_LEN_HIGH 1 > +#define __SHMLOG_LEN_LOW 2 > +#define __SHMLOG_ID_HIGH 3 > +#define __SHMLOG_ID_LOW 4 > +#define SHMLOG_DATA 5 > +#define SHMLOG_NEXTTAG 6 /* ... + len */ We should not use names that begin with underscores. DES -- Dag-Erling Sm?rgrav Senior Software Developer Linpro AS - www.linpro.no From phk at phk.freebsd.dk Wed Dec 12 18:36:38 2007 From: phk at phk.freebsd.dk (Poul-Henning Kamp) Date: Wed, 12 Dec 2007 18:36:38 +0000 Subject: r2287 - in trunk/varnish-cache: bin/varnishd bin/varnishlog bin/varnishtop include lib/libvarnishapi In-Reply-To: Your message of "Wed, 12 Dec 2007 12:14:16 +0100." Message-ID: <64175.1197484598@critter.freebsd.dk> In message , =?iso-8859-1?Q?Dag-Erling_Sm=F8rgrav?= writes: >phk at projects.linpro.no writes: >> +#define SHMLOG_TAG 0 >> +#define __SHMLOG_LEN_HIGH 1 >> +#define __SHMLOG_LEN_LOW 2 >> +#define __SHMLOG_ID_HIGH 3 >> +#define __SHMLOG_ID_LOW 4 >> +#define SHMLOG_DATA 5 >> +#define SHMLOG_NEXTTAG 6 /* ... + len */ > >We should not use names that begin with underscores. I used double underscores to indicate that these constants should not be used outside designated areas. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk at FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From des at linpro.no Thu Dec 13 20:06:34 2007 From: des at linpro.no (=?iso-8859-1?Q?Dag-Erling_Sm=C3=B8rgrav?=) Date: Thu, 13 Dec 2007 21:06:34 +0100 Subject: r2287 - in trunk/varnish-cache: bin/varnishd bin/varnishlog bin/varnishtop include lib/libvarnishapi In-Reply-To: <64175.1197484598@critter.freebsd.dk> (Poul-Henning Kamp's message of "Wed, 12 Dec 2007 18:36:38 +0000") References: <64175.1197484598@critter.freebsd.dk> Message-ID: "Poul-Henning Kamp" writes: > Dag-Erling Sm?rgrav writes: > > We should not use names that begin with underscores. > I used double underscores to indicate that these constants should > not be used outside designated areas. Let me rephrase that... Even though the toolchain does not enforce this (mainly because it's difficult for the toolchain to know which code is part of the language implementation and which is part of the application), we are not allowed to use names that begin with underscores. DES -- Dag-Erling Sm?rgrav Senior Software Developer Linpro AS - www.linpro.no From phk at phk.freebsd.dk Thu Dec 13 22:11:09 2007 From: phk at phk.freebsd.dk (Poul-Henning Kamp) Date: Thu, 13 Dec 2007 22:11:09 +0000 Subject: r2287 - in trunk/varnish-cache: bin/varnishd bin/varnishlog bin/varnishtop include lib/libvarnishapi In-Reply-To: Your message of "Thu, 13 Dec 2007 21:06:34 +0100." Message-ID: <69489.1197583869@critter.freebsd.dk> In message , =?iso-8859-1?Q?Dag-Erling_Sm=C3=B8rgrav?= writes: >"Poul-Henning Kamp" writes: >> Dag-Erling Sm=F8rgrav writes: >> > We should not use names that begin with underscores. >> I used double underscores to indicate that these constants should >> not be used outside designated areas. > >Let me rephrase that... > >Even though the toolchain does not enforce this (mainly because it's >difficult for the toolchain to know which code is part of the language >implementation and which is part of the application), we are not >allowed to use names that begin with underscores. As far as I know, that is only the case for names that start with a single underscore. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk at FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From des at linpro.no Fri Dec 14 10:51:00 2007 From: des at linpro.no (=?iso-8859-1?Q?Dag-Erling_Sm=C3=B8rgrav?=) Date: Fri, 14 Dec 2007 11:51:00 +0100 Subject: r2287 - in trunk/varnish-cache: bin/varnishd bin/varnishlog bin/varnishtop include lib/libvarnishapi In-Reply-To: <69489.1197583869@critter.freebsd.dk> (Poul-Henning Kamp's message of "Thu, 13 Dec 2007 22:11:09 +0000") References: <69489.1197583869@critter.freebsd.dk> Message-ID: "Poul-Henning Kamp" writes: > Dag-Erling Sm?rgrav writes: > > Even though the toolchain does not enforce this (mainly because it's > > difficult for the toolchain to know which code is part of the language > > implementation and which is part of the application), we are not > > allowed to use names that begin with underscores. > As far as I know, that is only the case for names that start with > a single underscore. -- All identifiers that begin with an underscore and either an uppercase letter or another underscore are always reserved for any use. -- All identifiers that begin with an underscore are always reserved for use as identifiers with file scope in both the ordinary and tag name spaces. DES -- Dag-Erling Sm?rgrav Senior Software Developer Linpro AS - www.linpro.no From phk at phk.freebsd.dk Fri Dec 14 10:56:05 2007 From: phk at phk.freebsd.dk (Poul-Henning Kamp) Date: Fri, 14 Dec 2007 10:56:05 +0000 Subject: r2287 - in trunk/varnish-cache: bin/varnishd bin/varnishlog bin/varnishtop include lib/libvarnishapi In-Reply-To: Your message of "Fri, 14 Dec 2007 11:51:00 +0100." Message-ID: <72368.1197629765@critter.freebsd.dk> In message , =?iso-8859-1?Q?Dag-Erling_Sm=C3=B8rgrav?= writes: >"Poul-Henning Kamp" writes: >> Dag-Erling Sm=F8rgrav writes: >> > Even though the toolchain does not enforce this (mainly because it's >> > difficult for the toolchain to know which code is part of the language >> > implementation and which is part of the application), we are not >> > allowed to use names that begin with underscores. >> As far as I know, that is only the case for names that start with >> a single underscore. > > -- All identifiers that begin with an underscore and > either an uppercase letter or another underscore are > always reserved for any use. Ok then, I'll use _v -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk at FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From des at linpro.no Fri Dec 14 12:23:07 2007 From: des at linpro.no (=?iso-8859-1?Q?Dag-Erling_Sm=C3=B8rgrav?=) Date: Fri, 14 Dec 2007 13:23:07 +0100 Subject: r2287 - in trunk/varnish-cache: bin/varnishd bin/varnishlog bin/varnishtop include lib/libvarnishapi In-Reply-To: <72368.1197629765@critter.freebsd.dk> (Poul-Henning Kamp's message of "Fri, 14 Dec 2007 10:56:05 +0000") References: <72368.1197629765@critter.freebsd.dk> Message-ID: "Poul-Henning Kamp" writes: > Dag-Erling Sm?rgrav writes: > > -- All identifiers that begin with an underscore and > > either an uppercase letter or another underscore are > > always reserved for any use. > Ok then, I'll use _v You didn't read the second paragraph... -- All identifiers that begin with an underscore are always reserved for use as identifiers with file scope in both the ordinary and tag name spaces. DES -- Dag-Erling Sm?rgrav Senior Software Developer Linpro AS - www.linpro.no From des at linpro.no Fri Dec 14 12:25:05 2007 From: des at linpro.no (=?iso-8859-1?Q?Dag-Erling_Sm=C3=B8rgrav?=) Date: Fri, 14 Dec 2007 13:25:05 +0100 Subject: r2287 - in trunk/varnish-cache: bin/varnishd bin/varnishlog bin/varnishtop include lib/libvarnishapi In-Reply-To: (Dag-Erling =?iso-8859-1?Q?Sm=C3=B8rgrav's?= message of "Fri, 14 Dec 2007 13:23:07 +0100") References: <72368.1197629765@critter.freebsd.dk> Message-ID: Bah, I'm turning into Bruce... Just ignore me, OK? :) DES -- Dag-Erling Sm?rgrav Senior Software Developer Linpro AS - www.linpro.no From ssm at projects.linpro.no Tue Dec 18 06:58:34 2007 From: ssm at projects.linpro.no (ssm at projects.linpro.no) Date: Tue, 18 Dec 2007 07:58:34 +0100 (CET) Subject: r2295 - trunk/varnish-cache/bin/varnishd Message-ID: <20071218065834.25DE21EC3FE@projects.linpro.no> Author: ssm Date: 2007-12-18 07:58:33 +0100 (Tue, 18 Dec 2007) New Revision: 2295 Modified: trunk/varnish-cache/bin/varnishd/varnishd.1 Log: Fixed a small typo in the varnishd man page Modified: trunk/varnish-cache/bin/varnishd/varnishd.1 =================================================================== --- trunk/varnish-cache/bin/varnishd/varnishd.1 2007-12-11 12:04:58 UTC (rev 2294) +++ trunk/varnish-cache/bin/varnishd/varnishd.1 2007-12-18 06:58:33 UTC (rev 2295) @@ -278,7 +278,7 @@ .El .Ss Management Interface If the -.Fl -T +.Fl T option was specified, .Nm will offer a command-line management interface on the specified From des at projects.linpro.no Tue Dec 18 16:13:37 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Tue, 18 Dec 2007 17:13:37 +0100 (CET) Subject: r2296 - in branches/1.1: . bin/varnishlog bin/varnishncsa Message-ID: <20071218161337.EDD211EC2B5@projects.linpro.no> Author: des Date: 2007-12-18 17:13:36 +0100 (Tue, 18 Dec 2007) New Revision: 2296 Modified: branches/1.1/ branches/1.1/bin/varnishlog/varnishlog.c branches/1.1/bin/varnishncsa/varnishncsa.c Log: Merged revisions 2270-2271 via svnmerge from svn+ssh://projects.linpro.no/svn/varnish/trunk/varnish-cache ........ r2270 | des | 2007-11-20 15:55:49 +0100 (Tue, 20 Nov 2007) | 7 lines Make SIGHUP work: VSL_Dispatch() will not return as long as it has data to feed to h_ncsa(), so it is up to h_ncsa() to interrupt it if reopen is non-zero. Also remove a superfluous call to VSL_Arg() as was previously done in varnishlog(1). ........ r2271 | des | 2007-11-20 15:56:21 +0100 (Tue, 20 Nov 2007) | 2 lines Fix some style issues, and harmonize with varnishncsa(1). ........ Property changes on: branches/1.1 ___________________________________________________________________ Name: svnmerge-integrated - /trunk/varnish-cache:1-1722,1727-1729,1733,1738,1743-1777,1779-1798,1800-1815,1817,1819,1823,1830-1838,1846,1853-1855,1857-1859,1862,1865-1868,1871-1880,1883-1884,1886,1888-1889,1896,1898,1902-1905,1907,1909,1912-1916,1920-1928,1935-1939,1941-1949,1955,1957-1958,1967-1968,1970-1974,1976-1977,1984,1986-1989,1991-1998,2026,2031-2033,2057,2077-2080,2086,2088,2097,2106-2107,2116,2133,2154,2173,2181,2206,2211-2212,2215-2220,2222-2232,2243 + /trunk/varnish-cache:1-1722,1727-1729,1733,1738,1743-1777,1779-1798,1800-1815,1817,1819,1823,1830-1838,1846,1853-1855,1857-1859,1862,1865-1868,1871-1880,1883-1884,1886,1888-1889,1896,1898,1902-1905,1907,1909,1912-1916,1920-1928,1935-1939,1941-1949,1955,1957-1958,1967-1968,1970-1974,1976-1977,1984,1986-1989,1991-1998,2026,2031-2033,2057,2077-2080,2086,2088,2097,2106-2107,2116,2133,2154,2173,2181,2206,2211-2212,2215-2220,2222-2232,2243,2270-2271 Modified: branches/1.1/bin/varnishlog/varnishlog.c =================================================================== --- branches/1.1/bin/varnishlog/varnishlog.c 2007-12-18 06:58:33 UTC (rev 2295) +++ branches/1.1/bin/varnishlog/varnishlog.c 2007-12-18 16:13:36 UTC (rev 2296) @@ -179,14 +179,14 @@ match_tag = name2tag(argv[0]); if (match_tag < 0) { fprintf(stderr, "Tag \"%s\" unknown\n", argv[0]); - exit (2); + exit(2); } i = regcomp(&match_re, argv[1], REG_EXTENDED | REG_NOSUB); if (i) { char buf[BUFSIZ]; regerror(i, &match_re, buf, sizeof buf); fprintf(stderr, "%s\n", buf); - exit (2); + exit(2); } } if (!b_flag) { @@ -235,7 +235,7 @@ fd = open(w_arg, flags, 0644); if (fd < 0) { perror(w_arg); - exit (1); + exit(1); } return (fd); } @@ -265,7 +265,7 @@ reopen = 0; } } - exit (0); + exit(0); } /*--------------------------------------------------------------------*/ @@ -281,7 +281,7 @@ int main(int argc, char **argv) { - int i, c; + int c; int a_flag = 0, D_flag = 0, o_flag = 0; const char *n_arg = NULL; const char *P_arg = NULL; @@ -358,12 +358,11 @@ if (o_flag) do_order(vd, argc - optind, argv + optind); - while (1) { - i = VSL_Dispatch(vd, VSL_H_Print, stdout); - if (i == 0) - fflush(stdout); - else if (i < 0) + while (VSL_Dispatch(vd, VSL_H_Print, stdout) >= 0) { + if (fflush(stdout) != 0) { + perror("stdout"); break; + } } if (pfh != NULL) Modified: branches/1.1/bin/varnishncsa/varnishncsa.c =================================================================== --- branches/1.1/bin/varnishncsa/varnishncsa.c 2007-12-18 06:58:33 UTC (rev 2295) +++ branches/1.1/bin/varnishncsa/varnishncsa.c 2007-12-18 16:13:36 UTC (rev 2296) @@ -80,6 +80,8 @@ #include "shmlog.h" #include "varnishapi.h" +static volatile sig_atomic_t reopen; + static struct logline { char *df_H; /* %H, Protocol version */ char *df_Host; /* %{Host}i */ @@ -187,7 +189,7 @@ end = ptr + len; if (!(spec & VSL_S_CLIENT || spec & VSL_S_BACKEND)) - return (0); + return (reopen); if (fd >= nll) { struct logline **newll = ll; @@ -315,11 +317,11 @@ } if ((spec & VSL_S_CLIENT) && tag != SLT_ReqEnd) - return (0); + return (reopen); if ((spec & VSL_S_BACKEND) && tag != SLT_BackendReuse && (tag != SLT_BackendClose || lp->df_Uq)) - return (0); + return (reopen); if (tag == SLT_ReqEnd) { if (sscanf(ptr, "%*u %*u.%*u %ld.", &l) != 1) @@ -407,13 +409,11 @@ #undef freez lp->bogus = 0; - return (0); + return (reopen); } /*--------------------------------------------------------------------*/ -static volatile sig_atomic_t reopen; - static void sighup(int sig) { @@ -447,7 +447,7 @@ int main(int argc, char *argv[]) { - int i, c; + int c; int a_flag = 0, D_flag = 0; const char *n_arg = NULL; const char *P_arg = NULL; @@ -459,11 +459,6 @@ vd = VSL_New(); while ((c = getopt(argc, argv, VSL_ARGS "aDn:P:Vw:")) != -1) { - i = VSL_Arg(vd, c, optarg); - if (i < 0) - exit (1); - if (i > 0) - continue; switch (c) { case 'a': a_flag = 1; @@ -516,7 +511,7 @@ of = stdout; } - while (VSL_Dispatch(vd, h_ncsa, of) == 0) { + while (VSL_Dispatch(vd, h_ncsa, of) >= 0) { if (fflush(of) != 0) { perror(w_arg); exit(1); From des at projects.linpro.no Tue Dec 18 16:47:44 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Tue, 18 Dec 2007 17:47:44 +0100 (CET) Subject: r2297 - in trunk/varnish-tools/regress/lib/Varnish/Test: . Case Report Message-ID: <20071218164745.03BFB1EC1F6@projects.linpro.no> Author: des Date: 2007-12-18 17:47:44 +0100 (Tue, 18 Dec 2007) New Revision: 2297 Modified: trunk/varnish-tools/regress/lib/Varnish/Test/Case.pm trunk/varnish-tools/regress/lib/Varnish/Test/Case/POST.pm trunk/varnish-tools/regress/lib/Varnish/Test/Case/Pipeline.pm trunk/varnish-tools/regress/lib/Varnish/Test/Report/report.html Log: Add $NOTES as a hack to document the fact that we know 1.1.2 fails some of the tests. This should be revisited later; ideally, the framework should know which tests are expected to pass and which are expected to fail, and flag any deviation (if a test is expected to fail but passes, it is probable that the test is broken) Modified: trunk/varnish-tools/regress/lib/Varnish/Test/Case/POST.pm =================================================================== --- trunk/varnish-tools/regress/lib/Varnish/Test/Case/POST.pm 2007-12-18 16:13:36 UTC (rev 2296) +++ trunk/varnish-tools/regress/lib/Varnish/Test/Case/POST.pm 2007-12-18 16:47:44 UTC (rev 2297) @@ -35,6 +35,7 @@ our $DESCR = "Tests Varnish's ability to correctly pass POST requests" . " to the backend, and their replies back to the client."; +our $NOTES = "1.1.2 is expected to fail one of three subtests."; our $VCL = < "The sky above the port was the color of television, tuned to a dead channel.", Modified: trunk/varnish-tools/regress/lib/Varnish/Test/Case.pm =================================================================== --- trunk/varnish-tools/regress/lib/Varnish/Test/Case.pm 2007-12-18 16:13:36 UTC (rev 2296) +++ trunk/varnish-tools/regress/lib/Varnish/Test/Case.pm 2007-12-18 16:47:44 UTC (rev 2297) @@ -232,9 +232,11 @@ no strict 'refs'; my $name = ${ref($self)."::NAME"} || (split('::', ref($self)))[-1]; my $descr = ${ref($self)."::DESCR"} || "N/A"; + my $notes = ${ref($self)."::NOTES"} || "N/A"; return { 'name' => $name, 'descr' => $descr, + 'notes' => $notes, 'count' => $self->{'count'}, 'pass' => $self->{'successful'}, 'fail' => $self->{'failed'}, Modified: trunk/varnish-tools/regress/lib/Varnish/Test/Report/report.html =================================================================== --- trunk/varnish-tools/regress/lib/Varnish/Test/Report/report.html 2007-12-18 16:13:36 UTC (rev 2296) +++ trunk/varnish-tools/regress/lib/Varnish/Test/Report/report.html 2007-12-18 16:47:44 UTC (rev 2297) @@ -16,7 +16,8 @@ .pass { width: 5%; } .fail { width: 5%; } .time { width: 5%; text-align: right; } -.descr { width: 70%; } +.descr { width: 50%; } +.notes { width: 20%; } @@ -31,6 +32,7 @@ Fail Time Description + Notes @@ -45,6 +47,7 @@ s + @@ -55,6 +58,7 @@ s   +   From des at projects.linpro.no Tue Dec 18 16:50:26 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Tue, 18 Dec 2007 17:50:26 +0100 (CET) Subject: r2298 - trunk/varnish-cache/doc Message-ID: <20071218165026.420DB1EC5D8@projects.linpro.no> Author: des Date: 2007-12-18 17:50:26 +0100 (Tue, 18 Dec 2007) New Revision: 2298 Modified: trunk/varnish-cache/doc/Makefile.am Log: Order change logs in reverse chronological order to make it easier to add new ones. Modified: trunk/varnish-cache/doc/Makefile.am =================================================================== --- trunk/varnish-cache/doc/Makefile.am 2007-12-18 16:47:44 UTC (rev 2297) +++ trunk/varnish-cache/doc/Makefile.am 2007-12-18 16:50:26 UTC (rev 2298) @@ -1,14 +1,14 @@ # $Id$ CHANGELOGS = \ - changes-1.0.4.html \ + changes-1.1.1.html \ changes-1.1.html \ - changes-1.1.1.html + changes-1.0.4.html XML = \ + changes-1.1-1.1.1.xml \ + changes-1.0.4-1.1.xml \ changes-1.0.3-1.0.4.xml \ - changes-1.0.4-1.1.xml \ - changes-1.1-1.1.1.xml \ ${CHANGELOGS:.html=.xml} all: ${CHANGELOGS} From des at projects.linpro.no Tue Dec 18 16:55:32 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Tue, 18 Dec 2007 17:55:32 +0100 (CET) Subject: r2299 - in branches/1.1: . bin/varnishd Message-ID: <20071218165532.8B4F61EC6A7@projects.linpro.no> Author: des Date: 2007-12-18 17:55:32 +0100 (Tue, 18 Dec 2007) New Revision: 2299 Modified: branches/1.1/ branches/1.1/bin/varnishd/cache_fetch.c Log: Merged revisions 2275 via svnmerge from svn+ssh://projects.linpro.no/svn/varnish/trunk/varnish-cache ........ r2275 | phk | 2007-11-20 18:20:47 +0100 (Tue, 20 Nov 2007) | 3 lines Reset the objects length to zero after we zapped all its component parts, otherwise we will get trouble (#167 ?) later. ........ Property changes on: branches/1.1 ___________________________________________________________________ Name: svnmerge-integrated - /trunk/varnish-cache:1-1722,1727-1729,1733,1738,1743-1777,1779-1798,1800-1815,1817,1819,1823,1830-1838,1846,1853-1855,1857-1859,1862,1865-1868,1871-1880,1883-1884,1886,1888-1889,1896,1898,1902-1905,1907,1909,1912-1916,1920-1928,1935-1939,1941-1949,1955,1957-1958,1967-1968,1970-1974,1976-1977,1984,1986-1989,1991-1998,2026,2031-2033,2057,2077-2080,2086,2088,2097,2106-2107,2116,2133,2154,2173,2181,2206,2211-2212,2215-2220,2222-2232,2243,2270-2271 + /trunk/varnish-cache:1-1722,1727-1729,1733,1738,1743-1777,1779-1798,1800-1815,1817,1819,1823,1830-1838,1846,1853-1855,1857-1859,1862,1865-1868,1871-1880,1883-1884,1886,1888-1889,1896,1898,1902-1905,1907,1909,1912-1916,1920-1928,1935-1939,1941-1949,1955,1957-1958,1967-1968,1970-1974,1976-1977,1984,1986-1989,1991-1998,2026,2031-2033,2057,2077-2080,2086,2088,2097,2106-2107,2116,2133,2154,2173,2181,2206,2211-2212,2215-2220,2222-2232,2243,2270-2271,2275 Modified: branches/1.1/bin/varnishd/cache_fetch.c =================================================================== --- branches/1.1/bin/varnishd/cache_fetch.c 2007-12-18 16:50:26 UTC (rev 2298) +++ branches/1.1/bin/varnishd/cache_fetch.c 2007-12-18 16:55:32 UTC (rev 2299) @@ -365,6 +365,7 @@ STV_free(st); } VBE_ClosedFd(sp->wrk, vc); + sp->obj->len = 0; return (-1); } From des at projects.linpro.no Tue Dec 18 17:00:19 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Tue, 18 Dec 2007 18:00:19 +0100 (CET) Subject: r2300 - trunk/varnish-cache/doc Message-ID: <20071218170019.B4DCC1EC2B5@projects.linpro.no> Author: des Date: 2007-12-18 18:00:19 +0100 (Tue, 18 Dec 2007) New Revision: 2300 Modified: trunk/varnish-cache/doc/changes-1.1.1-1.1.2.xml Log: Full change log for 1.1.2 (corresponding to branches/1.1 as of today). References to tickets have been included where I have been able to track down the ticket corresponding to a particular commit. Modified: trunk/varnish-cache/doc/changes-1.1.1-1.1.2.xml =================================================================== --- trunk/varnish-cache/doc/changes-1.1.1-1.1.2.xml 2007-12-18 16:55:32 UTC (rev 2299) +++ trunk/varnish-cache/doc/changes-1.1.1-1.1.2.xml 2007-12-18 17:00:19 UTC (rev 2300) @@ -37,17 +37,113 @@ A bug in the VCL compiler which would cause a double-free - when processing include directives has been + when processing include directives has been fixed. - + A resource leak in the worker thread management code has + been fixed. + + + When connecting to a backend, Varnish will usually get the + address from a cache. When the cache is refreshed, existing + connections may end up with a reference to an address structure + which no longer exists, resulting in a crash. This race + condition has been somewhat mitigated, but not entirely + eliminated (see .) + + + + Varnish will now pass the correct protocol version in pipe + mode: the backend will get what the client sent, and vice + versa. + + + + The core of the pipe mode code has been rewritten to + increase robustness and eliminate spurious error messages when + either end closes the connection in a manner Varnish did not + anticipate. + + + + A memory leak in the backend code has been plugged. + + + + When using the kqueue acceptor, if a client + shuts down the request side of the connection (as many clients + do after sending their final request), it was possible for the + acceptor code to receive the EOF event and recycle + the session while the last request was still being serviced, + resulting in a assertion failure and a crash when the worker + thread later tried to delete the session. This should no longer + happen (see .) + + + + A mismatch between the recorded length of a cached object + and the amount of data actually present in cache for that object + can occasionally occur (see .) This has been + partially fixed, but may still occur for error pages generated + by Varnish when a problem arises while retrieving an object from + the backend. + + varnishhist + + + Pressing 0 though 9 while + varnishhist is running will change the refresh + interval to the corresponding power of two, in seconds. + + + + + varnishncsa + + + The varnishncsa tool can now daemonize and + write a PID file like varnishlog, using the same + command-line options. It will also reopen its output upon receipt + of a SIGHUP if invoked with -w. + + + + + varnishstat + + + Pressing 0 though 9 while + varnishstat is running will change the refresh + interval to the corresponding power of two, in seconds. + + + + Build system + + Varnish's <queue.h> has been modified + to avoid conflicts with <sys/queue.h> on + platforms where the latter is included indirectly through system + headers. + + + + Several steps have been taken towards Solaris + support, but this is not yet complete. + + + + When configure was run without an explicit + prefix, Varnish's idea of the default state directory would be + garbage and a state directory would have to be specified + manually with -n. This has been corrected. + From des at projects.linpro.no Tue Dec 18 17:00:29 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Tue, 18 Dec 2007 18:00:29 +0100 (CET) Subject: r2301 - trunk/varnish-cache/doc Message-ID: <20071218170029.392CD1EC5D8@projects.linpro.no> Author: des Date: 2007-12-18 18:00:29 +0100 (Tue, 18 Dec 2007) New Revision: 2301 Modified: trunk/varnish-cache/doc/Makefile.am Log: Build the 1.1.2 change log. Modified: trunk/varnish-cache/doc/Makefile.am =================================================================== --- trunk/varnish-cache/doc/Makefile.am 2007-12-18 17:00:19 UTC (rev 2300) +++ trunk/varnish-cache/doc/Makefile.am 2007-12-18 17:00:29 UTC (rev 2301) @@ -1,11 +1,13 @@ # $Id$ CHANGELOGS = \ + changes-1.1.2.html \ changes-1.1.1.html \ changes-1.1.html \ changes-1.0.4.html XML = \ + changes-1.1.1-1.1.2.xml \ changes-1.1-1.1.1.xml \ changes-1.0.4-1.1.xml \ changes-1.0.3-1.0.4.xml \ From des at projects.linpro.no Tue Dec 18 17:02:05 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Tue, 18 Dec 2007 18:02:05 +0100 (CET) Subject: r2302 - trunk/varnish-cache/bin/varnishd Message-ID: <20071218170205.9C30A1EC2B5@projects.linpro.no> Author: des Date: 2007-12-18 18:02:05 +0100 (Tue, 18 Dec 2007) New Revision: 2302 Modified: trunk/varnish-cache/bin/varnishd/storage_file.c Log: Tweak a startup message. Modified: trunk/varnish-cache/bin/varnishd/storage_file.c =================================================================== --- trunk/varnish-cache/bin/varnishd/storage_file.c 2007-12-18 17:00:29 UTC (rev 2301) +++ trunk/varnish-cache/bin/varnishd/storage_file.c 2007-12-18 17:02:05 UTC (rev 2302) @@ -240,7 +240,7 @@ l -= (l % bs); } - printf("storage_file: filename: %s size %ju MegaBytes.\n", + printf("storage_file: filename: %s size %ju MB.\n", sc->filename, l / (1024 * 1024)); sc->filesize = l; From des at projects.linpro.no Tue Dec 18 17:02:39 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Tue, 18 Dec 2007 18:02:39 +0100 (CET) Subject: r2303 - trunk/varnish-cache/bin/varnishd Message-ID: <20071218170239.C17BC1EC5D8@projects.linpro.no> Author: des Date: 2007-12-18 18:02:39 +0100 (Tue, 18 Dec 2007) New Revision: 2303 Modified: trunk/varnish-cache/bin/varnishd/cache_panic.c Log: Tweak the panic string, and document how to extract it post-mortem. Modified: trunk/varnish-cache/bin/varnishd/cache_panic.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_panic.c 2007-12-18 17:02:05 UTC (rev 2302) +++ trunk/varnish-cache/bin/varnishd/cache_panic.c 2007-12-18 17:02:39 UTC (rev 2303) @@ -37,7 +37,12 @@ #ifndef WITHOUT_ASSERTS -/* panic string */ +/* + * The panic string is constructed in memory, then printed to stderr. It + * can be extracted post-mortem from a core dump using gdb: + * + * (gdb) printf "%s", panicstr + */ char panicstr[65536]; static char *pstr = panicstr; @@ -67,8 +72,9 @@ #define MAX_BYTES (4*16) #define show(ch) (((ch) > 31 && (ch) < 127) ? (ch) : '.') + fp(" %u {\n", st->len); for (i = 0; i < MAX_BYTES && i < st->len; i += 16) { - fp(" "); + fp(" "); for (j = 0; j < 16; ++j) { if (i + j < st->len) fp("%02x ", st->ptr[i + j]); @@ -82,7 +88,8 @@ fp("|\n"); } if (st->len > MAX_BYTES) - fp(" [%u more]\n", st->len - MAX_BYTES); + fp(" [%u more]\n", st->len - MAX_BYTES); + fp(" },\n"); #undef show #undef MAX_BYTES @@ -115,6 +122,7 @@ fp(" obj = %p {\n", o); fp(" refcnt = %u, xid = %u,\n", o->refcnt, o->xid); dump_http(o->http); + fp(" len = %u,\n", o->len); fp(" store = {\n"); VTAILQ_FOREACH(st, &o->store, list) { dump_storage(st); From des at projects.linpro.no Tue Dec 18 17:04:38 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Tue, 18 Dec 2007 18:04:38 +0100 (CET) Subject: r2304 - in branches/1.1: . doc Message-ID: <20071218170438.233591EC2B5@projects.linpro.no> Author: des Date: 2007-12-18 18:04:37 +0100 (Tue, 18 Dec 2007) New Revision: 2304 Modified: branches/1.1/ branches/1.1/doc/Makefile.am Log: Merged revisions 2298 via svnmerge from svn+ssh://projects.linpro.no/svn/varnish/trunk/varnish-cache ........ r2298 | des | 2007-12-18 17:50:26 +0100 (Tue, 18 Dec 2007) | 3 lines Order change logs in reverse chronological order to make it easier to add new ones. ........ Property changes on: branches/1.1 ___________________________________________________________________ Name: svnmerge-integrated - /trunk/varnish-cache:1-1722,1727-1729,1733,1738,1743-1777,1779-1798,1800-1815,1817,1819,1823,1830-1838,1846,1853-1855,1857-1859,1862,1865-1868,1871-1880,1883-1884,1886,1888-1889,1896,1898,1902-1905,1907,1909,1912-1916,1920-1928,1935-1939,1941-1949,1955,1957-1958,1967-1968,1970-1974,1976-1977,1984,1986-1989,1991-1998,2026,2031-2033,2057,2077-2080,2086,2088,2097,2106-2107,2116,2133,2154,2173,2181,2206,2211-2212,2215-2220,2222-2232,2243,2270-2271,2275 + /trunk/varnish-cache:1-1722,1727-1729,1733,1738,1743-1777,1779-1798,1800-1815,1817,1819,1823,1830-1838,1846,1853-1855,1857-1859,1862,1865-1868,1871-1880,1883-1884,1886,1888-1889,1896,1898,1902-1905,1907,1909,1912-1916,1920-1928,1935-1939,1941-1949,1955,1957-1958,1967-1968,1970-1974,1976-1977,1984,1986-1989,1991-1998,2026,2031-2033,2057,2077-2080,2086,2088,2097,2106-2107,2116,2133,2154,2173,2181,2206,2211-2212,2215-2220,2222-2232,2243,2270-2271,2275,2298 Modified: branches/1.1/doc/Makefile.am =================================================================== --- branches/1.1/doc/Makefile.am 2007-12-18 17:02:39 UTC (rev 2303) +++ branches/1.1/doc/Makefile.am 2007-12-18 17:04:37 UTC (rev 2304) @@ -1,14 +1,14 @@ # $Id$ CHANGELOGS = \ - changes-1.0.4.html \ + changes-1.1.1.html \ changes-1.1.html \ - changes-1.1.1.html + changes-1.0.4.html XML = \ + changes-1.1-1.1.1.xml \ + changes-1.0.4-1.1.xml \ changes-1.0.3-1.0.4.xml \ - changes-1.0.4-1.1.xml \ - changes-1.1-1.1.1.xml \ ${CHANGELOGS:.html=.xml} all: ${CHANGELOGS} From des at projects.linpro.no Tue Dec 18 17:05:06 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Tue, 18 Dec 2007 18:05:06 +0100 (CET) Subject: r2305 - in branches/1.1: . doc Message-ID: <20071218170506.026FD1EC1F6@projects.linpro.no> Author: des Date: 2007-12-18 18:05:05 +0100 (Tue, 18 Dec 2007) New Revision: 2305 Added: branches/1.1/doc/changes-1.1.1-1.1.2.xml branches/1.1/doc/changes-1.1.2.xml Modified: branches/1.1/ branches/1.1/doc/Makefile.am Log: Merged revisions 2207,2216-2219,2221,2233-2242,2244-2245,2256-2262,2296-2297,2299-2301 via svnmerge from svn+ssh://projects.linpro.no/svn/varnish/trunk/varnish-cache ........ r2207 | des | 2007-10-30 13:36:09 +0100 (Tue, 30 Oct 2007) | 2 lines Incomplete change log for 1.1.2 ........ r2300 | des | 2007-12-18 18:00:19 +0100 (Tue, 18 Dec 2007) | 4 lines Full change log for 1.1.2 (corresponding to branches/1.1 as of today). References to tickets have been included where I have been able to track down the ticket corresponding to a particular commit. ........ r2301 | des | 2007-12-18 18:00:29 +0100 (Tue, 18 Dec 2007) | 2 lines Build the 1.1.2 change log. ........ Property changes on: branches/1.1 ___________________________________________________________________ Name: svnmerge-integrated - /trunk/varnish-cache:1-1722,1727-1729,1733,1738,1743-1777,1779-1798,1800-1815,1817,1819,1823,1830-1838,1846,1853-1855,1857-1859,1862,1865-1868,1871-1880,1883-1884,1886,1888-1889,1896,1898,1902-1905,1907,1909,1912-1916,1920-1928,1935-1939,1941-1949,1955,1957-1958,1967-1968,1970-1974,1976-1977,1984,1986-1989,1991-1998,2026,2031-2033,2057,2077-2080,2086,2088,2097,2106-2107,2116,2133,2154,2173,2181,2206,2211-2212,2215-2220,2222-2232,2243,2270-2271,2275,2298 + /trunk/varnish-cache:1-1722,1727-1729,1733,1738,1743-1777,1779-1798,1800-1815,1817,1819,1823,1830-1838,1846,1853-1855,1857-1859,1862,1865-1868,1871-1880,1883-1884,1886,1888-1889,1896,1898,1902-1905,1907,1909,1912-1916,1920-1928,1935-1939,1941-1949,1955,1957-1958,1967-1968,1970-1974,1976-1977,1984,1986-1989,1991-1998,2026,2031-2033,2057,2077-2080,2086,2088,2097,2106-2107,2116,2133,2154,2173,2181,2206-2207,2211-2212,2215-2245,2256-2262,2270-2271,2275,2296-2301 Modified: branches/1.1/doc/Makefile.am =================================================================== --- branches/1.1/doc/Makefile.am 2007-12-18 17:04:37 UTC (rev 2304) +++ branches/1.1/doc/Makefile.am 2007-12-18 17:05:05 UTC (rev 2305) @@ -1,11 +1,13 @@ # $Id$ CHANGELOGS = \ + changes-1.1.2.html \ changes-1.1.1.html \ changes-1.1.html \ changes-1.0.4.html XML = \ + changes-1.1.1-1.1.2.xml \ changes-1.1-1.1.1.xml \ changes-1.0.4-1.1.xml \ changes-1.0.3-1.0.4.xml \ Copied: branches/1.1/doc/changes-1.1.1-1.1.2.xml (from rev 2207, trunk/varnish-cache/doc/changes-1.1.1-1.1.2.xml) =================================================================== --- branches/1.1/doc/changes-1.1.1-1.1.2.xml (rev 0) +++ branches/1.1/doc/changes-1.1.1-1.1.2.xml 2007-12-18 17:05:05 UTC (rev 2305) @@ -0,0 +1,149 @@ + + +]> + + + + varnishd + + + When switching to a new VCL configuration, a race + condition exists which may cause Varnish to reference a backend + which no longer exists (see ). This race + condition has not been entirely eliminated, but it should occur + less frequently. + + + + When dropping a TCP session before any requests were + processed, an assertion would be triggered due to an + uninitialized timestamp (see ). The + timestamp is now correctly initialized. + + + + Varnish will now correctly generate a Date: + header for every response instead of copying the one it got from + the backend (see ). + + + + Comparisons in VCL which involve a non-existent string + (usually a header which is not present in the request or object + being processed) would cause a NULL pointer dereference; now the + comparison will simply fail. + + + + A bug in the VCL compiler which would cause a double-free + when processing include directives has been + fixed. + + + + A resource leak in the worker thread management code has + been fixed. + + + + When connecting to a backend, Varnish will usually get the + address from a cache. When the cache is refreshed, existing + connections may end up with a reference to an address structure + which no longer exists, resulting in a crash. This race + condition has been somewhat mitigated, but not entirely + eliminated (see .) + + + + Varnish will now pass the correct protocol version in pipe + mode: the backend will get what the client sent, and vice + versa. + + + + The core of the pipe mode code has been rewritten to + increase robustness and eliminate spurious error messages when + either end closes the connection in a manner Varnish did not + anticipate. + + + + A memory leak in the backend code has been plugged. + + + + When using the kqueue acceptor, if a client + shuts down the request side of the connection (as many clients + do after sending their final request), it was possible for the + acceptor code to receive the EOF event and recycle + the session while the last request was still being serviced, + resulting in a assertion failure and a crash when the worker + thread later tried to delete the session. This should no longer + happen (see .) + + + + A mismatch between the recorded length of a cached object + and the amount of data actually present in cache for that object + can occasionally occur (see .) This has been + partially fixed, but may still occur for error pages generated + by Varnish when a problem arises while retrieving an object from + the backend. + + + + + varnishhist + + + Pressing 0 though 9 while + varnishhist is running will change the refresh + interval to the corresponding power of two, in seconds. + + + + + varnishncsa + + + The varnishncsa tool can now daemonize and + write a PID file like varnishlog, using the same + command-line options. It will also reopen its output upon receipt + of a SIGHUP if invoked with -w. + + + + + varnishstat + + + Pressing 0 though 9 while + varnishstat is running will change the refresh + interval to the corresponding power of two, in seconds. + + + + + Build system + + + Varnish's <queue.h> has been modified + to avoid conflicts with <sys/queue.h> on + platforms where the latter is included indirectly through system + headers. + + + + Several steps have been taken towards Solaris + support, but this is not yet complete. + + + + When configure was run without an explicit + prefix, Varnish's idea of the default state directory would be + garbage and a state directory would have to be specified + manually with -n. This has been corrected. + + + Copied: branches/1.1/doc/changes-1.1.2.xml (from rev 2207, trunk/varnish-cache/doc/changes-1.1.2.xml) =================================================================== --- branches/1.1/doc/changes-1.1.2.xml (rev 0) +++ branches/1.1/doc/changes-1.1.2.xml 2007-12-18 17:05:05 UTC (rev 2305) @@ -0,0 +1,12 @@ + + + +]> + + + Varnish + 1.1.2 + + + From des at projects.linpro.no Tue Dec 18 17:19:46 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Tue, 18 Dec 2007 18:19:46 +0100 (CET) Subject: r2306 - trunk/varnish-cache/doc Message-ID: <20071218171946.624651EC2B5@projects.linpro.no> Author: des Date: 2007-12-18 18:19:46 +0100 (Tue, 18 Dec 2007) New Revision: 2306 Modified: trunk/varnish-cache/doc/changes-1.1.1-1.1.2.xml Log: r2285 and r2286 have been merged. Modified: trunk/varnish-cache/doc/changes-1.1.1-1.1.2.xml =================================================================== --- trunk/varnish-cache/doc/changes-1.1.1-1.1.2.xml 2007-12-18 17:05:05 UTC (rev 2305) +++ trunk/varnish-cache/doc/changes-1.1.1-1.1.2.xml 2007-12-18 17:19:46 UTC (rev 2306) @@ -91,6 +91,14 @@ by Varnish when a problem arises while retrieving an object from the backend. + + + Some socket-related system calls may return unexpected + error codes when operating on a TCP connection that has been + shut down at the other end. These error codes would previously + cause assertion failures, but are now recognized as harmless + conditions. + From des at projects.linpro.no Tue Dec 18 17:20:00 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Tue, 18 Dec 2007 18:20:00 +0100 (CET) Subject: r2307 - in branches/1.1: . bin/varnishd Message-ID: <20071218172000.E61321EC1F6@projects.linpro.no> Author: des Date: 2007-12-18 18:20:00 +0100 (Tue, 18 Dec 2007) New Revision: 2307 Modified: branches/1.1/ branches/1.1/bin/varnishd/mgt_cli.c branches/1.1/bin/varnishd/mgt_event.h Log: Merged revisions 2285-2286 via svnmerge from svn+ssh://projects.linpro.no/svn/varnish/trunk/varnish-cache ........ r2285 | phk | 2007-11-23 11:47:16 +0100 (Fri, 23 Nov 2007) | 5 lines Also accept the undocumented ENOTCONN error return from close(2). See also http://www.version2.dk/artikel/5153 if you read danish. ........ r2286 | phk | 2007-12-07 13:03:58 +0100 (Fri, 07 Dec 2007) | 5 lines TCP connections don't quite behave like other fds, and we need to handle that for the managers CLI event-engine: React to POLLNVAL as we would to POLLHUP ........ Property changes on: branches/1.1 ___________________________________________________________________ Name: svnmerge-integrated - /trunk/varnish-cache:1-1722,1727-1729,1733,1738,1743-1777,1779-1798,1800-1815,1817,1819,1823,1830-1838,1846,1853-1855,1857-1859,1862,1865-1868,1871-1880,1883-1884,1886,1888-1889,1896,1898,1902-1905,1907,1909,1912-1916,1920-1928,1935-1939,1941-1949,1955,1957-1958,1967-1968,1970-1974,1976-1977,1984,1986-1989,1991-1998,2026,2031-2033,2057,2077-2080,2086,2088,2097,2106-2107,2116,2133,2154,2173,2181,2206-2207,2211-2212,2215-2245,2256-2262,2270-2271,2275,2296-2301 + /trunk/varnish-cache:1-1722,1727-1729,1733,1738,1743-1777,1779-1798,1800-1815,1817,1819,1823,1830-1838,1846,1853-1855,1857-1859,1862,1865-1868,1871-1880,1883-1884,1886,1888-1889,1896,1898,1902-1905,1907,1909,1912-1916,1920-1928,1935-1939,1941-1949,1955,1957-1958,1967-1968,1970-1974,1976-1977,1984,1986-1989,1991-1998,2026,2031-2033,2057,2077-2080,2086,2088,2097,2106-2107,2116,2133,2154,2173,2181,2206-2207,2211-2212,2215-2245,2256-2262,2270-2271,2275,2285-2286,2296-2301 Modified: branches/1.1/bin/varnishd/mgt_cli.c =================================================================== --- branches/1.1/bin/varnishd/mgt_cli.c 2007-12-18 17:19:46 UTC (rev 2306) +++ branches/1.1/bin/varnishd/mgt_cli.c 2007-12-18 17:20:00 UTC (rev 2307) @@ -299,7 +299,7 @@ CAST_OBJ_NOTNULL(cp, e->priv, CLI_PORT_MAGIC); - if (what & (EV_ERR | EV_HUP)) + if (what & (EV_ERR | EV_HUP | EV_GONE)) goto cli_close; /* grow the buffer if it is full */ Modified: branches/1.1/bin/varnishd/mgt_event.h =================================================================== --- branches/1.1/bin/varnishd/mgt_event.h 2007-12-18 17:19:46 UTC (rev 2306) +++ branches/1.1/bin/varnishd/mgt_event.h 2007-12-18 17:20:00 UTC (rev 2307) @@ -49,6 +49,7 @@ #define EV_WR POLLOUT #define EV_ERR POLLERR #define EV_HUP POLLHUP +#define EV_GONE POLLNVAL #define EV_SIG -1 int sig; unsigned sig_flags; From des at projects.linpro.no Tue Dec 18 17:20:08 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Tue, 18 Dec 2007 18:20:08 +0100 (CET) Subject: r2308 - in branches/1.1: . doc Message-ID: <20071218172008.5E9561EC2B5@projects.linpro.no> Author: des Date: 2007-12-18 18:20:08 +0100 (Tue, 18 Dec 2007) New Revision: 2308 Modified: branches/1.1/ branches/1.1/doc/changes-1.1.1-1.1.2.xml Log: Merged revisions 2306 via svnmerge from svn+ssh://projects.linpro.no/svn/varnish/trunk/varnish-cache ........ r2306 | des | 2007-12-18 18:19:46 +0100 (Tue, 18 Dec 2007) | 2 lines r2285 and r2286 have been merged. ........ Property changes on: branches/1.1 ___________________________________________________________________ Name: svnmerge-integrated - /trunk/varnish-cache:1-1722,1727-1729,1733,1738,1743-1777,1779-1798,1800-1815,1817,1819,1823,1830-1838,1846,1853-1855,1857-1859,1862,1865-1868,1871-1880,1883-1884,1886,1888-1889,1896,1898,1902-1905,1907,1909,1912-1916,1920-1928,1935-1939,1941-1949,1955,1957-1958,1967-1968,1970-1974,1976-1977,1984,1986-1989,1991-1998,2026,2031-2033,2057,2077-2080,2086,2088,2097,2106-2107,2116,2133,2154,2173,2181,2206-2207,2211-2212,2215-2245,2256-2262,2270-2271,2275,2285-2286,2296-2301 + /trunk/varnish-cache:1-1722,1727-1729,1733,1738,1743-1777,1779-1798,1800-1815,1817,1819,1823,1830-1838,1846,1853-1855,1857-1859,1862,1865-1868,1871-1880,1883-1884,1886,1888-1889,1896,1898,1902-1905,1907,1909,1912-1916,1920-1928,1935-1939,1941-1949,1955,1957-1958,1967-1968,1970-1974,1976-1977,1984,1986-1989,1991-1998,2026,2031-2033,2057,2077-2080,2086,2088,2097,2106-2107,2116,2133,2154,2173,2181,2206-2207,2211-2212,2215-2245,2256-2262,2270-2271,2275,2285-2286,2296-2301,2306 Modified: branches/1.1/doc/changes-1.1.1-1.1.2.xml =================================================================== --- branches/1.1/doc/changes-1.1.1-1.1.2.xml 2007-12-18 17:20:00 UTC (rev 2307) +++ branches/1.1/doc/changes-1.1.1-1.1.2.xml 2007-12-18 17:20:08 UTC (rev 2308) @@ -91,6 +91,14 @@ by Varnish when a problem arises while retrieving an object from the backend. + + + Some socket-related system calls may return unexpected + error codes when operating on a TCP connection that has been + shut down at the other end. These error codes would previously + cause assertion failures, but are now recognized as harmless + conditions. + From ssm at projects.linpro.no Tue Dec 18 18:38:37 2007 From: ssm at projects.linpro.no (ssm at projects.linpro.no) Date: Tue, 18 Dec 2007 19:38:37 +0100 (CET) Subject: r2309 - in branches/1.1: . bin/varnishd debian Message-ID: <20071218183837.61A4C1EC2B5@projects.linpro.no> Author: ssm Date: 2007-12-18 19:38:37 +0100 (Tue, 18 Dec 2007) New Revision: 2309 Modified: branches/1.1/ branches/1.1/bin/varnishd/varnishd.1 branches/1.1/debian/changelog branches/1.1/debian/control branches/1.1/debian/rules branches/1.1/debian/varnish.default branches/1.1/debian/varnish.postinst Log: Merged revisions 2288-2291,2295 via svnmerge from svn+ssh://projects.linpro.no/svn/varnish/trunk/varnish-cache ........ r2288 | ssm | 2007-12-11 06:46:43 +0100 (Tue, 11 Dec 2007) | 3 lines In the debian /etc/default/varnish, remove unused configuration variable, and an erroneous use of -n from the configuration examples. ........ r2289 | ssm | 2007-12-11 07:10:47 +0100 (Tue, 11 Dec 2007) | 1 line Debian packaging: do not ignore all errors from make distclean ........ r2290 | ssm | 2007-12-11 07:14:49 +0100 (Tue, 11 Dec 2007) | 7 lines Changes in the Debian packaging * Use native version for the debian package * Add headers to indicate location of varnish source * Add "xsltproc" to build dependencies ........ r2291 | ssm | 2007-12-11 08:02:24 +0100 (Tue, 11 Dec 2007) | 4 lines Debian packaging: Remove extra debhelper section in main postinst file, this was included by the debhelper tag as well, which resulted in a double startup entry, and an error on package installation. ........ r2295 | ssm | 2007-12-18 07:58:33 +0100 (Tue, 18 Dec 2007) | 1 line Fixed a small typo in the varnishd man page ........ Property changes on: branches/1.1 ___________________________________________________________________ Name: svnmerge-integrated - /trunk/varnish-cache:1-1722,1727-1729,1733,1738,1743-1777,1779-1798,1800-1815,1817,1819,1823,1830-1838,1846,1853-1855,1857-1859,1862,1865-1868,1871-1880,1883-1884,1886,1888-1889,1896,1898,1902-1905,1907,1909,1912-1916,1920-1928,1935-1939,1941-1949,1955,1957-1958,1967-1968,1970-1974,1976-1977,1984,1986-1989,1991-1998,2026,2031-2033,2057,2077-2080,2086,2088,2097,2106-2107,2116,2133,2154,2173,2181,2206-2207,2211-2212,2215-2245,2256-2262,2270-2271,2275,2285-2286,2296-2301,2306 + /trunk/varnish-cache:1-1722,1727-1729,1733,1738,1743-1777,1779-1798,1800-1815,1817,1819,1823,1830-1838,1846,1853-1855,1857-1859,1862,1865-1868,1871-1880,1883-1884,1886,1888-1889,1896,1898,1902-1905,1907,1909,1912-1916,1920-1928,1935-1939,1941-1949,1955,1957-1958,1967-1968,1970-1974,1976-1977,1984,1986-1989,1991-1998,2026,2031-2033,2057,2077-2080,2086,2088,2097,2106-2107,2116,2133,2154,2173,2181,2206-2207,2211-2212,2215-2245,2256-2262,2270-2271,2275,2285-2286,2288-2291,2295-2301,2306 Modified: branches/1.1/bin/varnishd/varnishd.1 =================================================================== --- branches/1.1/bin/varnishd/varnishd.1 2007-12-18 17:20:08 UTC (rev 2308) +++ branches/1.1/bin/varnishd/varnishd.1 2007-12-18 18:38:37 UTC (rev 2309) @@ -276,7 +276,7 @@ .El .Ss Management Interface If the -.Fl -T +.Fl T option was specified, .Nm will offer a command-line management interface on the specified Modified: branches/1.1/debian/changelog =================================================================== --- branches/1.1/debian/changelog 2007-12-18 17:20:08 UTC (rev 2308) +++ branches/1.1/debian/changelog 2007-12-18 18:38:37 UTC (rev 2309) @@ -1,4 +1,4 @@ -varnish (1.1.2-1) unstable; urgency=low +varnish (1.1.2) unstable; urgency=low * New upstream release * Renamed library and development packages to reflect sonames Modified: branches/1.1/debian/control =================================================================== --- branches/1.1/debian/control 2007-12-18 17:20:08 UTC (rev 2308) +++ branches/1.1/debian/control 2007-12-18 18:38:37 UTC (rev 2309) @@ -3,8 +3,10 @@ Priority: optional Maintainer: Stig Sandbeck Mathisen Uploaders: Lars Bahner -Build-Depends: debhelper (>= 5), autotools-dev, automake1.9, libtool, autoconf, libncurses-dev -Standards-Version: 3.7.2 +Build-Depends: debhelper (>= 5), autotools-dev, automake1.9, libtool, autoconf, libncurses-dev, xsltproc +XS-Vcs-Browser: http://varnish.projects.linpro.no/browser/trunk/varnish-cache +XS-Vcs-Svn: http://varnish.projects.linpro.no/svn/trunk/varnish-cache +Standards-Version: 3.7.3 Package: varnish Architecture: any Modified: branches/1.1/debian/rules =================================================================== --- branches/1.1/debian/rules 2007-12-18 17:20:08 UTC (rev 2308) +++ branches/1.1/debian/rules 2007-12-18 18:38:37 UTC (rev 2309) @@ -49,7 +49,7 @@ dh_testroot rm -f build-stamp - -$(MAKE) distclean + [ ! -f Makefile ] || $(MAKE) distclean ifneq "$(wildcard /usr/share/misc/config.sub)" "" cp -f /usr/share/misc/config.sub config.sub endif Modified: branches/1.1/debian/varnish.default =================================================================== --- branches/1.1/debian/varnish.default 2007-12-18 17:20:08 UTC (rev 2308) +++ branches/1.1/debian/varnish.default 2007-12-18 18:38:37 UTC (rev 2309) @@ -34,7 +34,6 @@ # DAEMON_OPTS="-a :6081 \ # -T localhost:6082 \ # -f /etc/varnish/default.vcl \ -# -n /var/lib/varnish \ # -s file,/var/lib/varnish/$INSTANCE/varnish_storage.bin,1G" @@ -64,9 +63,6 @@ # # Idle timeout for worker threads # VARNISH_THREAD_TIMEOUT=120 # -# # Home dir for this varnish instance -# VARNISH_HOMEDIR=/var/lib/varnish -# # # Cache file location # VARNISH_STORAGE_FILE=/var/lib/varnish/$INSTANCE/varnish_storage.bin # Modified: branches/1.1/debian/varnish.postinst =================================================================== --- branches/1.1/debian/varnish.postinst 2007-12-18 17:20:08 UTC (rev 2308) +++ branches/1.1/debian/varnish.postinst 2007-12-18 18:38:37 UTC (rev 2309) @@ -13,13 +13,3 @@ varnish_create_storagedir #DEBHELPER# -# Automatically added by dh_installinit -if [ -x "/etc/init.d/varnish" ]; then - update-rc.d varnish defaults >/dev/null - if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then - invoke-rc.d varnish start || exit $? - else - /etc/init.d/varnish start || exit $? - fi -fi -# End automatically added section From ingvar at projects.linpro.no Wed Dec 19 20:29:37 2007 From: ingvar at projects.linpro.no (ingvar at projects.linpro.no) Date: Wed, 19 Dec 2007 21:29:37 +0100 (CET) Subject: r2310 - trunk/varnish-cache/redhat Message-ID: <20071219202937.0D6A81EC1F6@projects.linpro.no> Author: ingvar Date: 2007-12-19 21:29:36 +0100 (Wed, 19 Dec 2007) New Revision: 2310 Modified: trunk/varnish-cache/redhat/README.redhat Log: Small changes to README.redhat Modified: trunk/varnish-cache/redhat/README.redhat =================================================================== --- trunk/varnish-cache/redhat/README.redhat 2007-12-18 18:38:37 UTC (rev 2309) +++ trunk/varnish-cache/redhat/README.redhat 2007-12-19 20:29:36 UTC (rev 2310) @@ -24,12 +24,14 @@ Builing a RPM package from SVN -=============================== +============================== You may build the package from a svn checkout. Follow the instructions at http://varnish.projects.linpro.no/wiki/Repository to get the source. Then enter the trunk directory and edit varnish-cache/redhat/varnish.spec. At least bump the version and/or -release numbers. Then use something like this to build the rpm package: +release numbers, and uncomment the autogen call. You need to install +the autoconf and automake packages. Then use something like this to +build the rpm package: #!/bin/bash VERSION=$( awk ' /^Version:/ { print $2 } ' varnish-cache/redhat/varnish.spec ) @@ -41,6 +43,10 @@ done ) -cvzf varnish-$VERSION.tar.gz varnish-$VERSION/* rm varnish-$VERSION -rpmbuild -tb varnish-$VERSION.tar.gz +rpmbuild -ts varnish-$VERSION.tar.gz +# End of script +This builds a source rpm. Then you can, for example on a RHEL4 system, +do something like this: +rpmbuild --define "dist el4" --rebuild /path/to/varnish-1.1.2.src.rpm From ssm at projects.linpro.no Thu Dec 20 06:48:22 2007 From: ssm at projects.linpro.no (ssm at projects.linpro.no) Date: Thu, 20 Dec 2007 07:48:22 +0100 (CET) Subject: r2311 - branches/1.1/redhat Message-ID: <20071220064822.E071D1EC2B5@projects.linpro.no> Author: ssm Date: 2007-12-20 07:48:21 +0100 (Thu, 20 Dec 2007) New Revision: 2311 Modified: branches/1.1/redhat/README.redhat Log: Merged revisions 2310 via svnmerge from svn+ssh://projects.linpro.no/svn/varnish/trunk/varnish-cache ........ r2310 | ingvar | 2007-12-19 21:29:36 +0100 (Wed, 19 Dec 2007) | 1 line Small changes to README.redhat ........ Modified: branches/1.1/redhat/README.redhat =================================================================== --- branches/1.1/redhat/README.redhat 2007-12-19 20:29:36 UTC (rev 2310) +++ branches/1.1/redhat/README.redhat 2007-12-20 06:48:21 UTC (rev 2311) @@ -24,12 +24,14 @@ Builing a RPM package from SVN -=============================== +============================== You may build the package from a svn checkout. Follow the instructions at http://varnish.projects.linpro.no/wiki/Repository to get the source. Then enter the trunk directory and edit varnish-cache/redhat/varnish.spec. At least bump the version and/or -release numbers. Then use something like this to build the rpm package: +release numbers, and uncomment the autogen call. You need to install +the autoconf and automake packages. Then use something like this to +build the rpm package: #!/bin/bash VERSION=$( awk ' /^Version:/ { print $2 } ' varnish-cache/redhat/varnish.spec ) @@ -41,6 +43,10 @@ done ) -cvzf varnish-$VERSION.tar.gz varnish-$VERSION/* rm varnish-$VERSION -rpmbuild -tb varnish-$VERSION.tar.gz +rpmbuild -ts varnish-$VERSION.tar.gz +# End of script +This builds a source rpm. Then you can, for example on a RHEL4 system, +do something like this: +rpmbuild --define "dist el4" --rebuild /path/to/varnish-1.1.2.src.rpm From ssm at projects.linpro.no Thu Dec 20 09:36:00 2007 From: ssm at projects.linpro.no (ssm at projects.linpro.no) Date: Thu, 20 Dec 2007 10:36:00 +0100 (CET) Subject: r2312 - branches/1.1 Message-ID: <20071220093600.F314B1EC1F6@projects.linpro.no> Author: ssm Date: 2007-12-20 10:36:00 +0100 (Thu, 20 Dec 2007) New Revision: 2312 Modified: branches/1.1/ Log: commit property changes from the merge in 2311 Property changes on: branches/1.1 ___________________________________________________________________ Name: svnmerge-integrated - /trunk/varnish-cache:1-1722,1727-1729,1733,1738,1743-1777,1779-1798,1800-1815,1817,1819,1823,1830-1838,1846,1853-1855,1857-1859,1862,1865-1868,1871-1880,1883-1884,1886,1888-1889,1896,1898,1902-1905,1907,1909,1912-1916,1920-1928,1935-1939,1941-1949,1955,1957-1958,1967-1968,1970-1974,1976-1977,1984,1986-1989,1991-1998,2026,2031-2033,2057,2077-2080,2086,2088,2097,2106-2107,2116,2133,2154,2173,2181,2206-2207,2211-2212,2215-2245,2256-2262,2270-2271,2275,2285-2286,2288-2291,2295-2301,2306 + /trunk/varnish-cache:1-1722,1727-1729,1733,1738,1743-1777,1779-1798,1800-1815,1817,1819,1823,1830-1838,1846,1853-1855,1857-1859,1862,1865-1868,1871-1880,1883-1884,1886,1888-1889,1896,1898,1902-1905,1907,1909,1912-1916,1920-1928,1935-1939,1941-1949,1955,1957-1958,1967-1968,1970-1974,1976-1977,1984,1986-1989,1991-1998,2026,2031-2033,2057,2077-2080,2086,2088,2097,2106-2107,2116,2133,2154,2173,2181,2206-2207,2211-2212,2215-2245,2256-2262,2270-2271,2275,2285-2286,2288-2291,2295-2301,2306,2310 From ssm at projects.linpro.no Thu Dec 20 09:43:37 2007 From: ssm at projects.linpro.no (ssm at projects.linpro.no) Date: Thu, 20 Dec 2007 10:43:37 +0100 (CET) Subject: r2313 - trunk/varnish-cache/redhat Message-ID: <20071220094337.66BBE1EC404@projects.linpro.no> Author: ssm Date: 2007-12-20 10:43:37 +0100 (Thu, 20 Dec 2007) New Revision: 2313 Modified: trunk/varnish-cache/redhat/varnish.spec Log: redhat packaging: add version number change perfomed in branches/1.1 to trunk as well Modified: trunk/varnish-cache/redhat/varnish.spec =================================================================== --- trunk/varnish-cache/redhat/varnish.spec 2007-12-20 09:36:00 UTC (rev 2312) +++ trunk/varnish-cache/redhat/varnish.spec 2007-12-20 09:43:37 UTC (rev 2313) @@ -1,6 +1,6 @@ Summary: Varnish is a high-performance HTTP accelerator Name: varnish -Version: 1.1.svn +Version: 1.1.1 Release: 200708142344%{?dist} License: BSD-like Group: System Environment/Daemons @@ -164,6 +164,8 @@ %postun libs -p /sbin/ldconfig %changelog +* Mon Aug 20 2007 Ingvar Hagelund - 1.1.1-1 +- Bumped the version number to 1.1.1. * Tue Aug 14 2007 Ingvar Hagelund - 1.1.svn - Update for 1.1 branch - Added the devel package for the header files and static library files From ssm at projects.linpro.no Thu Dec 20 09:50:07 2007 From: ssm at projects.linpro.no (ssm at projects.linpro.no) Date: Thu, 20 Dec 2007 10:50:07 +0100 (CET) Subject: r2314 - trunk/varnish-cache/redhat Message-ID: <20071220095007.B43F01EC1F6@projects.linpro.no> Author: ssm Date: 2007-12-20 10:50:07 +0100 (Thu, 20 Dec 2007) New Revision: 2314 Modified: trunk/varnish-cache/redhat/varnish.spec Log: Red hat packaging, updated spec file * Bumped version and release numbers * Added build dependency for libxslt, for xsltproc Modified: trunk/varnish-cache/redhat/varnish.spec =================================================================== --- trunk/varnish-cache/redhat/varnish.spec 2007-12-20 09:43:37 UTC (rev 2313) +++ trunk/varnish-cache/redhat/varnish.spec 2007-12-20 09:50:07 UTC (rev 2314) @@ -1,13 +1,13 @@ Summary: Varnish is a high-performance HTTP accelerator Name: varnish -Version: 1.1.1 -Release: 200708142344%{?dist} +Version: 1.1.2 +Release: 1 License: BSD-like Group: System Environment/Daemons URL: http://www.varnish-cache.org/ Source0: http://downloads.sourceforge.net/varnish/varnish-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: ncurses-devel automake autoconf libtool +BuildRequires: ncurses-devel automake autoconf libtool libxslt Requires: kernel >= 2.6.0 varnish-libs = %{version}-%{release} Requires: logrotate Requires(pre): shadow-utils @@ -164,8 +164,13 @@ %postun libs -p /sbin/ldconfig %changelog +* Thu Dec 20 2007 Stig Sandbeck Mathisen - 1.1.2-1 +- Bumped the version number to 1.1.2. +- Addeed build dependency on libxslt + * Mon Aug 20 2007 Ingvar Hagelund - 1.1.1-1 - Bumped the version number to 1.1.1. + * Tue Aug 14 2007 Ingvar Hagelund - 1.1.svn - Update for 1.1 branch - Added the devel package for the header files and static library files From ssm at projects.linpro.no Thu Dec 20 09:54:16 2007 From: ssm at projects.linpro.no (ssm at projects.linpro.no) Date: Thu, 20 Dec 2007 10:54:16 +0100 (CET) Subject: r2315 - in branches/1.1: . redhat Message-ID: <20071220095416.4FA2B1EC404@projects.linpro.no> Author: ssm Date: 2007-12-20 10:54:16 +0100 (Thu, 20 Dec 2007) New Revision: 2315 Modified: branches/1.1/ branches/1.1/redhat/varnish.spec Log: Merged revisions 2313-2314 via svnmerge from svn+ssh://projects.linpro.no/svn/varnish/trunk/varnish-cache ........ r2313 | ssm | 2007-12-20 10:43:37 +0100 (Thu, 20 Dec 2007) | 1 line redhat packaging: add version number change perfomed in branches/1.1 to trunk as well ........ r2314 | ssm | 2007-12-20 10:50:07 +0100 (Thu, 20 Dec 2007) | 4 lines Red hat packaging, updated spec file * Bumped version and release numbers * Added build dependency for libxslt, for xsltproc ........ Property changes on: branches/1.1 ___________________________________________________________________ Name: svnmerge-integrated - /trunk/varnish-cache:1-1722,1727-1729,1733,1738,1743-1777,1779-1798,1800-1815,1817,1819,1823,1830-1838,1846,1853-1855,1857-1859,1862,1865-1868,1871-1880,1883-1884,1886,1888-1889,1896,1898,1902-1905,1907,1909,1912-1916,1920-1928,1935-1939,1941-1949,1955,1957-1958,1967-1968,1970-1974,1976-1977,1984,1986-1989,1991-1998,2026,2031-2033,2057,2077-2080,2086,2088,2097,2106-2107,2116,2133,2154,2173,2181,2206-2207,2211-2212,2215-2245,2256-2262,2270-2271,2275,2285-2286,2288-2291,2295-2301,2306,2310 + /trunk/varnish-cache:1-1722,1727-1729,1733,1738,1743-1777,1779-1798,1800-1815,1817,1819,1823,1830-1838,1846,1853-1855,1857-1859,1862,1865-1868,1871-1880,1883-1884,1886,1888-1889,1896,1898,1902-1905,1907,1909,1912-1916,1920-1928,1935-1939,1941-1949,1955,1957-1958,1967-1968,1970-1974,1976-1977,1984,1986-1989,1991-1998,2026,2031-2033,2057,2077-2080,2086,2088,2097,2106-2107,2116,2133,2154,2173,2181,2206-2207,2211-2212,2215-2245,2256-2262,2270-2271,2275,2285-2286,2288-2291,2295-2301,2306,2310,2313-2314 Modified: branches/1.1/redhat/varnish.spec =================================================================== --- branches/1.1/redhat/varnish.spec 2007-12-20 09:50:07 UTC (rev 2314) +++ branches/1.1/redhat/varnish.spec 2007-12-20 09:54:16 UTC (rev 2315) @@ -1,13 +1,13 @@ Summary: Varnish is a high-performance HTTP accelerator Name: varnish -Version: 1.1.1 -Release: 1%{?dist} +Version: 1.1.2 +Release: 1 License: BSD-like Group: System Environment/Daemons URL: http://www.varnish-cache.org/ Source0: http://downloads.sourceforge.net/varnish/varnish-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: ncurses-devel +BuildRequires: ncurses-devel automake autoconf libtool libxslt Requires: kernel >= 2.6.0 varnish-libs = %{version}-%{release} Requires: logrotate Requires(pre): shadow-utils @@ -50,7 +50,7 @@ # The svn sources needs to generate a suitable configure script # Release tarballs would not need this -# ./autogen.sh +./autogen.sh %build @@ -121,7 +121,6 @@ %defattr(-,root,root,-) %{_libdir}/libvarnish.so %{_libdir}/libvarnishapi.so -%{_libdir}/libvarnishcompat.so %{_libdir}/libvcl.so %{_includedir}/varnish/shmlog.h %{_includedir}/varnish/shmlog_tags.h @@ -165,16 +164,18 @@ %postun libs -p /sbin/ldconfig %changelog +* Thu Dec 20 2007 Stig Sandbeck Mathisen - 1.1.2-1 +- Bumped the version number to 1.1.2. +- Addeed build dependency on libxslt + * Mon Aug 20 2007 Ingvar Hagelund - 1.1.1-1 - Bumped the version number to 1.1.1. + * Tue Aug 14 2007 Ingvar Hagelund - 1.1.svn - Update for 1.1 branch - Added the devel package for the header files and static library files - Added a varnish user, and fixed the init script accordingly -* Thu Jul 05 2007 Dag-Erling Sm?rgrav - 1.1-1 -- Bump Version and Release for 1.1 - * Mon May 28 2007 Ingvar Hagelund - 1.0.4-3 - Fixed initrc-script bug only visible on el4 (fixes #107) From ssm at projects.linpro.no Thu Dec 20 10:38:06 2007 From: ssm at projects.linpro.no (ssm at projects.linpro.no) Date: Thu, 20 Dec 2007 11:38:06 +0100 (CET) Subject: r2316 - trunk/varnish-cache/redhat Message-ID: <20071220103806.D37D81EC1F6@projects.linpro.no> Author: ssm Date: 2007-12-20 11:38:06 +0100 (Thu, 20 Dec 2007) New Revision: 2316 Modified: trunk/varnish-cache/redhat/varnish.spec Log: comment out autogen.sh invocation Modified: trunk/varnish-cache/redhat/varnish.spec =================================================================== --- trunk/varnish-cache/redhat/varnish.spec 2007-12-20 09:54:16 UTC (rev 2315) +++ trunk/varnish-cache/redhat/varnish.spec 2007-12-20 10:38:06 UTC (rev 2316) @@ -50,7 +50,7 @@ # The svn sources needs to generate a suitable configure script # Release tarballs would not need this -./autogen.sh +# ./autogen.sh %build From ssm at projects.linpro.no Thu Dec 20 10:38:58 2007 From: ssm at projects.linpro.no (ssm at projects.linpro.no) Date: Thu, 20 Dec 2007 11:38:58 +0100 (CET) Subject: r2317 - in branches/1.1: . redhat Message-ID: <20071220103858.5576C1EC2B5@projects.linpro.no> Author: ssm Date: 2007-12-20 11:38:57 +0100 (Thu, 20 Dec 2007) New Revision: 2317 Modified: branches/1.1/ branches/1.1/redhat/varnish.spec Log: Merged revisions 2316 via svnmerge from svn+ssh://projects.linpro.no/svn/varnish/trunk/varnish-cache ........ r2316 | ssm | 2007-12-20 11:38:06 +0100 (Thu, 20 Dec 2007) | 1 line comment out autogen.sh invocation ........ Property changes on: branches/1.1 ___________________________________________________________________ Name: svnmerge-integrated - /trunk/varnish-cache:1-1722,1727-1729,1733,1738,1743-1777,1779-1798,1800-1815,1817,1819,1823,1830-1838,1846,1853-1855,1857-1859,1862,1865-1868,1871-1880,1883-1884,1886,1888-1889,1896,1898,1902-1905,1907,1909,1912-1916,1920-1928,1935-1939,1941-1949,1955,1957-1958,1967-1968,1970-1974,1976-1977,1984,1986-1989,1991-1998,2026,2031-2033,2057,2077-2080,2086,2088,2097,2106-2107,2116,2133,2154,2173,2181,2206-2207,2211-2212,2215-2245,2256-2262,2270-2271,2275,2285-2286,2288-2291,2295-2301,2306,2310,2313-2314 + /trunk/varnish-cache:1-1722,1727-1729,1733,1738,1743-1777,1779-1798,1800-1815,1817,1819,1823,1830-1838,1846,1853-1855,1857-1859,1862,1865-1868,1871-1880,1883-1884,1886,1888-1889,1896,1898,1902-1905,1907,1909,1912-1916,1920-1928,1935-1939,1941-1949,1955,1957-1958,1967-1968,1970-1974,1976-1977,1984,1986-1989,1991-1998,2026,2031-2033,2057,2077-2080,2086,2088,2097,2106-2107,2116,2133,2154,2173,2181,2206-2207,2211-2212,2215-2245,2256-2262,2270-2271,2275,2285-2286,2288-2291,2295-2301,2306,2310,2313-2314,2316 Modified: branches/1.1/redhat/varnish.spec =================================================================== --- branches/1.1/redhat/varnish.spec 2007-12-20 10:38:06 UTC (rev 2316) +++ branches/1.1/redhat/varnish.spec 2007-12-20 10:38:57 UTC (rev 2317) @@ -50,7 +50,7 @@ # The svn sources needs to generate a suitable configure script # Release tarballs would not need this -./autogen.sh +# ./autogen.sh %build From ssm at projects.linpro.no Thu Dec 20 11:03:58 2007 From: ssm at projects.linpro.no (ssm at projects.linpro.no) Date: Thu, 20 Dec 2007 12:03:58 +0100 (CET) Subject: r2318 - trunk/varnish-cache/debian Message-ID: <20071220110358.67F6A1EC1F6@projects.linpro.no> Author: ssm Date: 2007-12-20 12:03:58 +0100 (Thu, 20 Dec 2007) New Revision: 2318 Modified: trunk/varnish-cache/debian/control Log: Add another uploader for the debian package Modified: trunk/varnish-cache/debian/control =================================================================== --- trunk/varnish-cache/debian/control 2007-12-20 10:38:57 UTC (rev 2317) +++ trunk/varnish-cache/debian/control 2007-12-20 11:03:58 UTC (rev 2318) @@ -2,7 +2,7 @@ Section: web Priority: optional Maintainer: Stig Sandbeck Mathisen -Uploaders: Lars Bahner +Uploaders: Lars Bahner , Fabio Tranchitella Build-Depends: debhelper (>= 5), autotools-dev, automake1.9, libtool, autoconf, libncurses-dev, xsltproc XS-Vcs-Browser: http://varnish.projects.linpro.no/browser/trunk/varnish-cache XS-Vcs-Svn: http://varnish.projects.linpro.no/svn/trunk/varnish-cache From ssm at projects.linpro.no Thu Dec 20 11:04:47 2007 From: ssm at projects.linpro.no (ssm at projects.linpro.no) Date: Thu, 20 Dec 2007 12:04:47 +0100 (CET) Subject: r2319 - in branches/1.1: . debian Message-ID: <20071220110447.6E05D1EC2B5@projects.linpro.no> Author: ssm Date: 2007-12-20 12:04:47 +0100 (Thu, 20 Dec 2007) New Revision: 2319 Modified: branches/1.1/ branches/1.1/debian/control Log: Merged revisions 2318 via svnmerge from svn+ssh://projects.linpro.no/svn/varnish/trunk/varnish-cache ........ r2318 | ssm | 2007-12-20 12:03:58 +0100 (Thu, 20 Dec 2007) | 2 lines Add another uploader for the debian package ........ Property changes on: branches/1.1 ___________________________________________________________________ Name: svnmerge-integrated - /trunk/varnish-cache:1-1722,1727-1729,1733,1738,1743-1777,1779-1798,1800-1815,1817,1819,1823,1830-1838,1846,1853-1855,1857-1859,1862,1865-1868,1871-1880,1883-1884,1886,1888-1889,1896,1898,1902-1905,1907,1909,1912-1916,1920-1928,1935-1939,1941-1949,1955,1957-1958,1967-1968,1970-1974,1976-1977,1984,1986-1989,1991-1998,2026,2031-2033,2057,2077-2080,2086,2088,2097,2106-2107,2116,2133,2154,2173,2181,2206-2207,2211-2212,2215-2245,2256-2262,2270-2271,2275,2285-2286,2288-2291,2295-2301,2306,2310,2313-2314,2316 + /trunk/varnish-cache:1-1722,1727-1729,1733,1738,1743-1777,1779-1798,1800-1815,1817,1819,1823,1830-1838,1846,1853-1855,1857-1859,1862,1865-1868,1871-1880,1883-1884,1886,1888-1889,1896,1898,1902-1905,1907,1909,1912-1916,1920-1928,1935-1939,1941-1949,1955,1957-1958,1967-1968,1970-1974,1976-1977,1984,1986-1989,1991-1998,2026,2031-2033,2057,2077-2080,2086,2088,2097,2106-2107,2116,2133,2154,2173,2181,2206-2207,2211-2212,2215-2245,2256-2262,2270-2271,2275,2285-2286,2288-2291,2295-2301,2306,2310,2313-2314,2316,2318 Modified: branches/1.1/debian/control =================================================================== --- branches/1.1/debian/control 2007-12-20 11:03:58 UTC (rev 2318) +++ branches/1.1/debian/control 2007-12-20 11:04:47 UTC (rev 2319) @@ -2,7 +2,7 @@ Section: web Priority: optional Maintainer: Stig Sandbeck Mathisen -Uploaders: Lars Bahner +Uploaders: Lars Bahner , Fabio Tranchitella Build-Depends: debhelper (>= 5), autotools-dev, automake1.9, libtool, autoconf, libncurses-dev, xsltproc XS-Vcs-Browser: http://varnish.projects.linpro.no/browser/trunk/varnish-cache XS-Vcs-Svn: http://varnish.projects.linpro.no/svn/trunk/varnish-cache From ssm at projects.linpro.no Thu Dec 20 11:18:21 2007 From: ssm at projects.linpro.no (ssm at projects.linpro.no) Date: Thu, 20 Dec 2007 12:18:21 +0100 (CET) Subject: r2320 - trunk/varnish-cache/redhat Message-ID: <20071220111821.ECCEB1EC1F6@projects.linpro.no> Author: ssm Date: 2007-12-20 12:18:21 +0100 (Thu, 20 Dec 2007) New Revision: 2320 Modified: trunk/varnish-cache/redhat/varnish.spec Log: Change spec file to work with fedora as well. Modified: trunk/varnish-cache/redhat/varnish.spec =================================================================== --- trunk/varnish-cache/redhat/varnish.spec 2007-12-20 11:04:47 UTC (rev 2319) +++ trunk/varnish-cache/redhat/varnish.spec 2007-12-20 11:18:21 UTC (rev 2320) @@ -1,13 +1,16 @@ Summary: Varnish is a high-performance HTTP accelerator Name: varnish Version: 1.1.2 -Release: 1 +Release: 1%{?dist} License: BSD-like Group: System Environment/Daemons URL: http://www.varnish-cache.org/ Source0: http://downloads.sourceforge.net/varnish/varnish-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: ncurses-devel automake autoconf libtool libxslt +# The svn sources needs autoconf, automake and libtoolto generate a suitable +# configure script. Release tarballs would not need this +# BuildRequires: ncurses-devel automake autoconf libtool libxslt +BuildRequires: ncurses-devel libxslt Requires: kernel >= 2.6.0 varnish-libs = %{version}-%{release} Requires: logrotate Requires(pre): shadow-utils @@ -121,6 +124,7 @@ %defattr(-,root,root,-) %{_libdir}/libvarnish.so %{_libdir}/libvarnishapi.so +%{_libdir}/libvarnishcompat.so %{_libdir}/libvcl.so %{_includedir}/varnish/shmlog.h %{_includedir}/varnish/shmlog_tags.h From ssm at projects.linpro.no Thu Dec 20 11:19:38 2007 From: ssm at projects.linpro.no (ssm at projects.linpro.no) Date: Thu, 20 Dec 2007 12:19:38 +0100 (CET) Subject: r2321 - in branches/1.1: . redhat Message-ID: <20071220111938.85D811EC2B5@projects.linpro.no> Author: ssm Date: 2007-12-20 12:19:38 +0100 (Thu, 20 Dec 2007) New Revision: 2321 Modified: branches/1.1/ branches/1.1/redhat/varnish.spec Log: Merged revisions 2320 via svnmerge from svn+ssh://projects.linpro.no/svn/varnish/trunk/varnish-cache ........ r2320 | ssm | 2007-12-20 12:18:21 +0100 (Thu, 20 Dec 2007) | 2 lines Change spec file to work with fedora as well. ........ Property changes on: branches/1.1 ___________________________________________________________________ Name: svnmerge-integrated - /trunk/varnish-cache:1-1722,1727-1729,1733,1738,1743-1777,1779-1798,1800-1815,1817,1819,1823,1830-1838,1846,1853-1855,1857-1859,1862,1865-1868,1871-1880,1883-1884,1886,1888-1889,1896,1898,1902-1905,1907,1909,1912-1916,1920-1928,1935-1939,1941-1949,1955,1957-1958,1967-1968,1970-1974,1976-1977,1984,1986-1989,1991-1998,2026,2031-2033,2057,2077-2080,2086,2088,2097,2106-2107,2116,2133,2154,2173,2181,2206-2207,2211-2212,2215-2245,2256-2262,2270-2271,2275,2285-2286,2288-2291,2295-2301,2306,2310,2313-2314,2316,2318 + /trunk/varnish-cache:1-1722,1727-1729,1733,1738,1743-1777,1779-1798,1800-1815,1817,1819,1823,1830-1838,1846,1853-1855,1857-1859,1862,1865-1868,1871-1880,1883-1884,1886,1888-1889,1896,1898,1902-1905,1907,1909,1912-1916,1920-1928,1935-1939,1941-1949,1955,1957-1958,1967-1968,1970-1974,1976-1977,1984,1986-1989,1991-1998,2026,2031-2033,2057,2077-2080,2086,2088,2097,2106-2107,2116,2133,2154,2173,2181,2206-2207,2211-2212,2215-2245,2256-2262,2270-2271,2275,2285-2286,2288-2291,2295-2301,2306,2310,2313-2314,2316,2318,2320 Modified: branches/1.1/redhat/varnish.spec =================================================================== --- branches/1.1/redhat/varnish.spec 2007-12-20 11:18:21 UTC (rev 2320) +++ branches/1.1/redhat/varnish.spec 2007-12-20 11:19:38 UTC (rev 2321) @@ -1,13 +1,16 @@ Summary: Varnish is a high-performance HTTP accelerator Name: varnish Version: 1.1.2 -Release: 1 +Release: 1%{?dist} License: BSD-like Group: System Environment/Daemons URL: http://www.varnish-cache.org/ Source0: http://downloads.sourceforge.net/varnish/varnish-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: ncurses-devel automake autoconf libtool libxslt +# The svn sources needs autoconf, automake and libtoolto generate a suitable +# configure script. Release tarballs would not need this +# BuildRequires: ncurses-devel automake autoconf libtool libxslt +BuildRequires: ncurses-devel libxslt Requires: kernel >= 2.6.0 varnish-libs = %{version}-%{release} Requires: logrotate Requires(pre): shadow-utils @@ -121,6 +124,7 @@ %defattr(-,root,root,-) %{_libdir}/libvarnish.so %{_libdir}/libvarnishapi.so +%{_libdir}/libvarnishcompat.so %{_libdir}/libvcl.so %{_includedir}/varnish/shmlog.h %{_includedir}/varnish/shmlog_tags.h From des at projects.linpro.no Thu Dec 20 13:35:33 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Thu, 20 Dec 2007 14:35:33 +0100 (CET) Subject: r2322 - trunk/varnish-cache Message-ID: <20071220133533.64A421EC1F6@projects.linpro.no> Author: des Date: 2007-12-20 14:35:33 +0100 (Thu, 20 Dec 2007) New Revision: 2322 Modified: trunk/varnish-cache/configure.ac Log: Only look for sendfile() on platforms where we know how to use it. Modified: trunk/varnish-cache/configure.ac =================================================================== --- trunk/varnish-cache/configure.ac 2007-12-20 11:19:38 UTC (rev 2321) +++ trunk/varnish-cache/configure.ac 2007-12-20 13:35:33 UTC (rev 2322) @@ -95,9 +95,18 @@ AC_FUNC_STRERROR_R AC_CHECK_FUNCS([socket]) AC_CHECK_FUNCS([strptime]) -AC_CHECK_FUNCS([sendfile]) AC_CHECK_FUNCS([fmtcheck]) +# This one is tricky, there are multiple versions +case $host in +*-*-freebsd*|*-*-linux*) + AC_CHECK_FUNCS([sendfile]) + ;; +*) + AC_MSG_WARN([won't look for sendfile() on $host]) + ;; +esac + # These functions are provided by libcompat on platforms where they # are not available AC_CHECK_FUNCS([asprintf vasprintf]) From des at projects.linpro.no Thu Dec 20 13:35:42 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Thu, 20 Dec 2007 14:35:42 +0100 (CET) Subject: r2323 - branches/1.1 Message-ID: <20071220133542.EF9161EC404@projects.linpro.no> Author: des Date: 2007-12-20 14:35:42 +0100 (Thu, 20 Dec 2007) New Revision: 2323 Modified: branches/1.1/ branches/1.1/configure.ac Log: Merged revisions 2322 via svnmerge from svn+ssh://projects.linpro.no/svn/varnish/trunk/varnish-cache ........ r2322 | des | 2007-12-20 14:35:33 +0100 (Thu, 20 Dec 2007) | 2 lines Only look for sendfile() on platforms where we know how to use it. ........ Property changes on: branches/1.1 ___________________________________________________________________ Name: svnmerge-integrated - /trunk/varnish-cache:1-1722,1727-1729,1733,1738,1743-1777,1779-1798,1800-1815,1817,1819,1823,1830-1838,1846,1853-1855,1857-1859,1862,1865-1868,1871-1880,1883-1884,1886,1888-1889,1896,1898,1902-1905,1907,1909,1912-1916,1920-1928,1935-1939,1941-1949,1955,1957-1958,1967-1968,1970-1974,1976-1977,1984,1986-1989,1991-1998,2026,2031-2033,2057,2077-2080,2086,2088,2097,2106-2107,2116,2133,2154,2173,2181,2206-2207,2211-2212,2215-2245,2256-2262,2270-2271,2275,2285-2286,2288-2291,2295-2301,2306,2310,2313-2314,2316,2318,2320 + /trunk/varnish-cache:1-1722,1727-1729,1733,1738,1743-1777,1779-1798,1800-1815,1817,1819,1823,1830-1838,1846,1853-1855,1857-1859,1862,1865-1868,1871-1880,1883-1884,1886,1888-1889,1896,1898,1902-1905,1907,1909,1912-1916,1920-1928,1935-1939,1941-1949,1955,1957-1958,1967-1968,1970-1974,1976-1977,1984,1986-1989,1991-1998,2026,2031-2033,2057,2077-2080,2086,2088,2097,2106-2107,2116,2133,2154,2173,2181,2206-2207,2211-2212,2215-2245,2256-2262,2270-2271,2275,2285-2286,2288-2291,2295-2301,2306,2310,2313-2314,2316,2318,2320,2322 Modified: branches/1.1/configure.ac =================================================================== --- branches/1.1/configure.ac 2007-12-20 13:35:33 UTC (rev 2322) +++ branches/1.1/configure.ac 2007-12-20 13:35:42 UTC (rev 2323) @@ -92,8 +92,17 @@ AC_FUNC_STRERROR_R AC_CHECK_FUNCS([socket]) AC_CHECK_FUNCS([strptime]) -AC_CHECK_FUNCS([sendfile]) +# This one is tricky, there are multiple versions +case $host in +*-*-freebsd*|*-*-linux*) + AC_CHECK_FUNCS([sendfile]) + ;; +*) + AC_MSG_WARN([won't look for sendfile() on $host]) + ;; +esac + # These functions are provided by libcompat on platforms where they # are not available AC_CHECK_FUNCS([asprintf vasprintf]) From phk at phk.freebsd.dk Thu Dec 20 13:47:02 2007 From: phk at phk.freebsd.dk (Poul-Henning Kamp) Date: Thu, 20 Dec 2007 13:47:02 +0000 Subject: r2322 - trunk/varnish-cache In-Reply-To: Your message of "Thu, 20 Dec 2007 14:35:33 +0100." <20071220133533.64A421EC1F6@projects.linpro.no> Message-ID: <13664.1198158422@critter.freebsd.dk> In message <20071220133533.64A421EC1F6 at projects.linpro.no>, des at projects.linpro .no writes: >Author: des >Date: 2007-12-20 14:35:33 +0100 (Thu, 20 Dec 2007) >New Revision: 2322 > >Modified: > trunk/varnish-cache/configure.ac >Log: >Only look for sendfile() on platforms where we know how to use it. Given that it is broken on all platforms, to my knowledge, we should probably not look for it, until explicitly told so with a --enable-broken-sendfile-support option ? -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk at FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From des at projects.linpro.no Thu Dec 20 13:57:31 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Thu, 20 Dec 2007 14:57:31 +0100 (CET) Subject: r2324 - trunk/varnish-cache/bin/varnishncsa Message-ID: <20071220135731.53D8B1EC420@projects.linpro.no> Author: des Date: 2007-12-20 14:57:31 +0100 (Thu, 20 Dec 2007) New Revision: 2324 Modified: trunk/varnish-cache/bin/varnishncsa/varnishncsa.c Log: When writing to a file, fflush() after every line so tail -F will work. Modified: trunk/varnish-cache/bin/varnishncsa/varnishncsa.c =================================================================== --- trunk/varnish-cache/bin/varnishncsa/varnishncsa.c 2007-12-20 13:35:42 UTC (rev 2323) +++ trunk/varnish-cache/bin/varnishncsa/varnishncsa.c 2007-12-20 13:57:31 UTC (rev 2324) @@ -392,6 +392,10 @@ /* %{User-agent}i */ fprintf(fo, "\"%s\"\n", lp->df_User_agent ? lp->df_User_agent : "-"); + + /* hack: flush after every line if writing to file */ + if (fo != stdout) + fflush(fo); } /* clean up */ From des at projects.linpro.no Thu Dec 20 13:57:45 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Thu, 20 Dec 2007 14:57:45 +0100 (CET) Subject: r2325 - in branches/1.1: . bin/varnishncsa Message-ID: <20071220135745.229F41ED0A8@projects.linpro.no> Author: des Date: 2007-12-20 14:57:44 +0100 (Thu, 20 Dec 2007) New Revision: 2325 Modified: branches/1.1/ branches/1.1/bin/varnishncsa/varnishncsa.c Log: Merged revisions 2324 via svnmerge from svn+ssh://projects.linpro.no/svn/varnish/trunk/varnish-cache ........ r2324 | des | 2007-12-20 14:57:31 +0100 (Thu, 20 Dec 2007) | 2 lines When writing to a file, fflush() after every line so tail -F will work. ........ Property changes on: branches/1.1 ___________________________________________________________________ Name: svnmerge-integrated - /trunk/varnish-cache:1-1722,1727-1729,1733,1738,1743-1777,1779-1798,1800-1815,1817,1819,1823,1830-1838,1846,1853-1855,1857-1859,1862,1865-1868,1871-1880,1883-1884,1886,1888-1889,1896,1898,1902-1905,1907,1909,1912-1916,1920-1928,1935-1939,1941-1949,1955,1957-1958,1967-1968,1970-1974,1976-1977,1984,1986-1989,1991-1998,2026,2031-2033,2057,2077-2080,2086,2088,2097,2106-2107,2116,2133,2154,2173,2181,2206-2207,2211-2212,2215-2245,2256-2262,2270-2271,2275,2285-2286,2288-2291,2295-2301,2306,2310,2313-2314,2316,2318,2320,2322 + /trunk/varnish-cache:1-1722,1727-1729,1733,1738,1743-1777,1779-1798,1800-1815,1817,1819,1823,1830-1838,1846,1853-1855,1857-1859,1862,1865-1868,1871-1880,1883-1884,1886,1888-1889,1896,1898,1902-1905,1907,1909,1912-1916,1920-1928,1935-1939,1941-1949,1955,1957-1958,1967-1968,1970-1974,1976-1977,1984,1986-1989,1991-1998,2026,2031-2033,2057,2077-2080,2086,2088,2097,2106-2107,2116,2133,2154,2173,2181,2206-2207,2211-2212,2215-2245,2256-2262,2270-2271,2275,2285-2286,2288-2291,2295-2301,2306,2310,2313-2314,2316,2318,2320,2322,2324 Modified: branches/1.1/bin/varnishncsa/varnishncsa.c =================================================================== --- branches/1.1/bin/varnishncsa/varnishncsa.c 2007-12-20 13:57:31 UTC (rev 2324) +++ branches/1.1/bin/varnishncsa/varnishncsa.c 2007-12-20 13:57:44 UTC (rev 2325) @@ -392,6 +392,10 @@ /* %{User-agent}i */ fprintf(fo, "\"%s\"\n", lp->df_User_agent ? lp->df_User_agent : "-"); + + /* hack: flush after every line if writing to file */ + if (fo != stdout) + fflush(fo); } /* clean up */ From des at projects.linpro.no Thu Dec 20 14:04:31 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Thu, 20 Dec 2007 15:04:31 +0100 (CET) Subject: r2326 - branches/1.1 Message-ID: <20071220140431.D8F7E1EC2B5@projects.linpro.no> Author: des Date: 2007-12-20 15:04:31 +0100 (Thu, 20 Dec 2007) New Revision: 2326 Modified: branches/1.1/ChangeLog Log: regen Modified: branches/1.1/ChangeLog =================================================================== --- branches/1.1/ChangeLog 2007-12-20 13:57:44 UTC (rev 2325) +++ branches/1.1/ChangeLog 2007-12-20 14:04:31 UTC (rev 2326) @@ -1,77 +1,84 @@ -Change log for Varnish 1.1.1 +Change log for Varnish 1.1.2 -Changes between 1.1 and 1.1.1 +Changes between 1.1.1 and 1.1.2 varnishd - ? The code required to allow VCL to read obj.status, which had accidentally - been left out, has now been added. + ? When switching to a new VCL configuration, a race condition exists which + may cause Varnish to reference a backend which no longer exists (see ticket + #144). This race condition has not been entirely eliminated, but it should + occur less frequently. - ? Varnish will now always include a Connection: header in its reply to the - client, to avoid possible misunderstandings. + ? When dropping a TCP session before any requests were processed, an + assertion would be triggered due to an uninitialized timestamp (see ticket + #132). The timestamp is now correctly initialized. - ? A bug that triggered an assertion failure when generating synthetic error - documents has been corrected. + ? Varnish will now correctly generate a Date: header for every response + instead of copying the one it got from the backend (see ticket #157). - ? A new VCL function, purge_url, provides the same functionality as the - url.purge management command. + ? Comparisons in VCL which involve a non-existent string (usually a header + which is not present in the request or object being processed) would cause + a NULL pointer dereference; now the comparison will simply fail. - ? Previously, Varnish assumed that the response body should be sent only if - the request method was GET. This was a problem for custom request methods - (such as PURGE), so the logic has been changed to always send the response - body except in the specific case of a HEAD request. + ? A bug in the VCL compiler which would cause a double-free when processing + include directives has been fixed. - ? Changes to run-time parameters are now correctly propagated to the child - process. + ? A resource leak in the worker thread management code has been fixed. - ? Due to the way run-time parameters are initialized at startup, varnishd - previously required the nobody user and the nogroup group to exist even if - a different user and group were specified on the command line. This has - been corrected. + ? When connecting to a backend, Varnish will usually get the address from a + cache. When the cache is refreshed, existing connections may end up with a + reference to an address structure which no longer exists, resulting in a + crash. This race condition has been somewhat mitigated, but not entirely + eliminated (see ticket #144.) - ? Under certain conditions, the VCL compiler would carry on after a syntax - error instead of exiting after reporting the error. This has been - corrected. + ? Varnish will now pass the correct protocol version in pipe mode: the + backend will get what the client sent, and vice versa. - ? The manner in which the hash string is assembled has been modified to - reduce memory usage and memory-to-memory copying. + ? The core of the pipe mode code has been rewritten to increase robustness + and eliminate spurious error messages when either end closes the connection + in a manner Varnish did not anticipate. - ? Before calling vcl_miss, Varnish assembles a tentative request object for - the backend request which will usually follow. This object would be leaked - if vcl_miss returned anything else than fetch. This has been corrected. + ? A memory leak in the backend code has been plugged. - ? The code necessary to handle an error return from vcl_fetch and vcl_deliver - had inadvertantly been left out. This has been corrected. + ? When using the kqueue acceptor, if a client shuts down the request side of + the connection (as many clients do after sending their final request), it + was possible for the acceptor code to receive the EOF event and recycle the + session while the last request was still being serviced, resulting in a + assertion failure and a crash when the worker thread later tried to delete + the session. This should no longer happen (see ticket #162.) - ? Varnish no longer prints a spurious "child died" message (the result of - reaping the compiler process) after compiling a new VCL configuration. + ? A mismatch between the recorded length of a cached object and the amount of + data actually present in cache for that object can occasionally occur (see + ticket #167.) This has been partially fixed, but may still occur for error + pages generated by Varnish when a problem arises while retrieving an object + from the backend. - ? Under some circumstances, due to an error in the workspace management code, - Varnish would lose the "tail" of a request, i.e. the part of the request - that has been received from the client but not yet processed. The most - obvious symptom of this was that POST requests would work with some - browsers but not others, depending on details of the browser's HTTP - implementation. This has been corrected. +varnishhist - ? On some platforms, due to incorrect assumptions in the CLI code, the - management process would crash while processing commands received over the - management port. This has been corrected. + ? Pressing 0 though 9 while varnishhist is running will change the refresh + interval to the corresponding power of two, in seconds. -Build system +varnishncsa - ? The top-level Makefile will now honor $DESTDIR when creating the state - directory. + ? The varnishncsa tool can now daemonize and write a PID file like + varnishlog, using the same command-line options. It will also reopen its + output upon receipt of a SIGHUP if invoked with -w. - ? The Debian and RedHat packages are now split into three (main / lib / - devel) as is customary. +varnishstat - ? A number of compile-time and run-time portability issues have been - addressed. + ? Pressing 0 though 9 while varnishstat is running will change the refresh + interval to the corresponding power of two, in seconds. - ? The autogen.sh script had workarounds for problems with the GNU autotools - on FreeBSD; these are no longer needed and have been removed. +Build system - ? The libcompat library has been renamed to libvarnishcompat and is now - dynamic rather than static. This simplifies the build process and resolves - an issue with the Mac OS X linker. + ? Varnish's has been modified to avoid conflicts with + on platforms where the latter is included indirectly through system + headers. + ? Several steps have been taken towards Solaris support, but this is not yet + complete. + + ? When configure was run without an explicit prefix, Varnish's idea of the + default state directory would be garbage and a state directory would have + to be specified manually with -n. This has been corrected. + From des at linpro.no Fri Dec 21 10:40:28 2007 From: des at linpro.no (=?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?=) Date: Fri, 21 Dec 2007 11:40:28 +0100 Subject: r2322 - trunk/varnish-cache In-Reply-To: <13664.1198158422@critter.freebsd.dk> (Poul-Henning Kamp's message of "Thu, 20 Dec 2007 13:47:02 +0000") References: <13664.1198158422@critter.freebsd.dk> Message-ID: "Poul-Henning Kamp" writes: > Dag-Erling Sm?rgrav writes: > > Log: > > Only look for sendfile() on platforms where we know how to use it. > Given that it is broken on all platforms, to my knowledge, we should > probably not look for it, until explicitly told so with a > --enable-broken-sendfile-support > option ? I thought about that, and probably will before the next release. DES -- Dag-Erling Sm?rgrav Senior Software Developer Linpro AS - www.linpro.no From des at projects.linpro.no Fri Dec 21 10:43:40 2007 From: des at projects.linpro.no (des at projects.linpro.no) Date: Fri, 21 Dec 2007 11:43:40 +0100 (CET) Subject: r2327 - tags Message-ID: <20071221104340.A8FE21EC1F6@projects.linpro.no> Author: des Date: 2007-12-21 11:43:40 +0100 (Fri, 21 Dec 2007) New Revision: 2327 Added: tags/varnish-1.1.2/ Log: No release is complete without at least one procedural mistake. In this case, I forgot to tag the release, and rolled the tarball from the branch instead of the (nonexistent) tag. Oh well, better luck next time... Thanks to ssm@ for pointing it out. Copied: tags/varnish-1.1.2 (from rev 2326, branches/1.1) From michael.lee at zerustech.com Fri Dec 21 10:57:55 2007 From: michael.lee at zerustech.com (Michael Lee) Date: Fri, 21 Dec 2007 18:57:55 +0800 Subject: Apache keepalive In-Reply-To: References: <13664.1198158422@critter.freebsd.dk> Message-ID: <476B9C33.2030508@zerustech.com> We noticed that when apache keepalive is "on", varnish does not cache dynamic contents even we set the cache-control, pragram and expires headers. But it's working when keepalive is set to "off" Has anyone met the same problem? -- Michael Lee / Managing Director / ZerusTech Ltd Tel: +86 (21) 6428 3803 Fax: +86 (21) 6428 3805 Mobile: +86 139 1663 5259 Skype: zerustech Gmail: zerustech at gmail.com www.zerustech.com Suite 819-820 807 Zhaojiabang Road Shanghai P.R.China 200030 From phk at phk.freebsd.dk Fri Dec 21 11:03:04 2007 From: phk at phk.freebsd.dk (Poul-Henning Kamp) Date: Fri, 21 Dec 2007 11:03:04 +0000 Subject: Apache keepalive In-Reply-To: Your message of "Fri, 21 Dec 2007 18:57:55 +0800." <476B9C33.2030508@zerustech.com> Message-ID: <20558.1198234984@critter.freebsd.dk> In message <476B9C33.2030508 at zerustech.com>, Michael Lee writes: >We noticed that when apache keepalive is "on", varnish does not >cache dynamic contents even we set the cache-control, pragram and >expires headers. > >But it's working when keepalive is set to "off" Check your varnishlog, if your transactions run into "pipe" handling, that would explain it. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk at FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From michael.lee at zerustech.com Fri Dec 21 11:14:33 2007 From: michael.lee at zerustech.com (Michael Lee) Date: Fri, 21 Dec 2007 19:14:33 +0800 Subject: Varnish caches objects per session for www.vg.no ? In-Reply-To: <20071221104340.A8FE21EC1F6@projects.linpro.no> References: <20071221104340.A8FE21EC1F6@projects.linpro.no> Message-ID: <476BA019.5010107@zerustech.com> Hi Guys, I noticed a possible issue on www.vg.no today, I guess the varnish cache on this site was configured to cache objects per user session. Which means, cached objects can't be re-used across different users. I tried the following test cases: 1. clean up cookies and temporary internet files from my browser (I'm using Mandriva linux 2007 and Firefox 2.0.0.11) 2. Access http://www.vg.no 3. Check the http response header and got a "HTTP/1.x 200 OK" response. (cache miss) 4. Reload page and got a "HTTP/1.x 304 Not Modified " response. (cache hit) Does it mean that the first time when I accessed www.vg.no, the cache was missed? So varnish re-fetched the contents for me. And the 2nd time, cache was hit. I know that specifying "cookie" as part of the object hash in vcl_hash() may force varnish to cache objects per user session. But is www.vg.no using the same approach? Besides, does it make sense to cache objects per user session for www.vg.no? Is there anyone can help investigate? Many thanks in advance, Michael -- Michael Lee / Managing Director / ZerusTech Ltd Tel: +86 (21) 6428 3803 Fax: +86 (21) 6428 3805 Mobile: +86 139 1663 5259 Skype: zerustech Gmail: zerustech at gmail.com www.zerustech.com Suite 819-820 807 Zhaojiabang Road Shanghai P.R.China 200030 From michael.lee at zerustech.com Fri Dec 21 11:52:59 2007 From: michael.lee at zerustech.com (Michael Lee) Date: Fri, 21 Dec 2007 19:52:59 +0800 Subject: Apache keepalive In-Reply-To: <20558.1198234984@critter.freebsd.dk> References: <20558.1198234984@critter.freebsd.dk> Message-ID: <476BA91B.90808@zerustech.com> Hi Poul, I checked my varnishlog and here is the varnish log: > 16 RxRequest c GET > 16 RxURL c / > 16 RxProtocol c HTTP/1.1 > ... > 16 VCL_call c recv > 16 VCL_return c lookup > 16 VCL_call c hash > 16 VCL_return c hash > 16 HitPass c 1264349866 > 16 VCL_call c pass > 16 VCL_return c pass I noticed there is a "HitPass" in this transaction, could you please help on this? BTW, I have customized the sub vcl_hash() as the following: sub vcl_hash { set req.hash += req.url; set req.hash += req.http.host; hash; } I don't know if it has any impacts on keeponlive. Many thanks in advance, Michael Poul-Henning Kamp wrote: > In message <476B9C33.2030508 at zerustech.com>, Michael Lee writes: > >> We noticed that when apache keepalive is "on", varnish does not >> cache dynamic contents even we set the cache-control, pragram and >> expires headers. >> >> But it's working when keepalive is set to "off" > > Check your varnishlog, if your transactions run into "pipe" handling, > that would explain it. > -- Michael Lee / Managing Director / ZerusTech Ltd Tel: +86 (21) 6428 3803 Fax: +86 (21) 6428 3805 Mobile: +86 139 1663 5259 Skype: zerustech Gmail: zerustech at gmail.com www.zerustech.com Suite 819-820 807 Zhaojiabang Road Shanghai P.R.China 200030 From phk at phk.freebsd.dk Sat Dec 22 08:39:22 2007 From: phk at phk.freebsd.dk (Poul-Henning Kamp) Date: Sat, 22 Dec 2007 08:39:22 +0000 Subject: Varnish caches objects per session for www.vg.no ? In-Reply-To: Your message of "Fri, 21 Dec 2007 19:14:33 +0800." <476BA019.5010107@zerustech.com> Message-ID: <25980.1198312762@critter.freebsd.dk> In message <476BA019.5010107 at zerustech.com>, Michael Lee writes: >2. Access http://www.vg.no >3. Check the http response header and got a "HTTP/1.x 200 OK" response. (cache miss) >4. Reload page and got a "HTTP/1.x 304 Not Modified >" response. (cache hit) > >Does it mean that the first time when I accessed www.vg.no, the cache was missed? So varnish re-fetched the contents for me. And the 2nd time, cache was hit. No, it means that your browser asked to not have the object sent if it wasn't changed since the last one it got. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk at FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From ingvar at projects.linpro.no Sat Dec 29 21:11:21 2007 From: ingvar at projects.linpro.no (ingvar at projects.linpro.no) Date: Sat, 29 Dec 2007 22:11:21 +0100 (CET) Subject: r2328 - trunk/varnish-cache/redhat Message-ID: <20071229211121.3595C1EC0B7@projects.linpro.no> Author: ingvar Date: 2007-12-29 22:11:20 +0100 (Sat, 29 Dec 2007) New Revision: 2328 Modified: trunk/varnish-cache/redhat/varnish.spec Log: updates from fedora build Modified: trunk/varnish-cache/redhat/varnish.spec =================================================================== --- trunk/varnish-cache/redhat/varnish.spec 2007-12-21 10:43:40 UTC (rev 2327) +++ trunk/varnish-cache/redhat/varnish.spec 2007-12-29 21:11:20 UTC (rev 2328) @@ -1,15 +1,15 @@ Summary: Varnish is a high-performance HTTP accelerator Name: varnish Version: 1.1.2 -Release: 1%{?dist} -License: BSD-like +Release: 5%{?dist} +License: BSD Group: System Environment/Daemons URL: http://www.varnish-cache.org/ Source0: http://downloads.sourceforge.net/varnish/varnish-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # The svn sources needs autoconf, automake and libtoolto generate a suitable # configure script. Release tarballs would not need this -# BuildRequires: ncurses-devel automake autoconf libtool libxslt +#BuildRequires: automake autoconf libtool BuildRequires: ncurses-devel libxslt Requires: kernel >= 2.6.0 varnish-libs = %{version}-%{release} Requires: logrotate @@ -55,6 +55,9 @@ # Release tarballs would not need this # ./autogen.sh +mkdir examples +cp etc/default.vcl etc/zope-plone.vcl examples + %build # Remove "--disable static" if you want to build static libraries @@ -107,7 +110,8 @@ %{_var}/log/varnish %{_mandir}/man1/*.1* %{_mandir}/man7/*.7* -%doc INSTALL LICENSE README redhat/README.redhat redhat/default.vcl ChangeLog +%doc INSTALL LICENSE README redhat/README.redhat ChangeLog +%doc examples %dir %{_sysconfdir}/varnish/ %config(noreplace) %{_sysconfdir}/varnish/default.vcl %config(noreplace) %{_sysconfdir}/sysconfig/varnish @@ -168,10 +172,27 @@ %postun libs -p /sbin/ldconfig %changelog +* Sat Dec 29 2007 Ingvar Hagelund - 1.1.2-5 +- Added missing configuration examples +- Corrected the license to "BSD" + +* Fri Dec 28 2007 Ingvar Hagelund - 1.1.2-4 +- Build for fedora update + +* Fri Dec 28 2007 Ingvar Hagelund - 1.1.2-2 +- Added missing changelog items + * Thu Dec 20 2007 Stig Sandbeck Mathisen - 1.1.2-1 - Bumped the version number to 1.1.2. - Addeed build dependency on libxslt +* Wed Sep 08 2007 Ingvar Hagelund - 1.1.1-3 +- Added a patch, changeset 1913 from svn trunk. This makes varnish + more stable under specific loads. + +* Tue Sep 06 2007 Ingvar Hagelund - 1.1.1-2 +- Removed autogen call (only diff from relase tarball) + * Mon Aug 20 2007 Ingvar Hagelund - 1.1.1-1 - Bumped the version number to 1.1.1. @@ -180,6 +201,9 @@ - Added the devel package for the header files and static library files - Added a varnish user, and fixed the init script accordingly +* Thu Jul 05 2007 Dag-Erling Sm?rgrav - 1.1-1 +- Bump Version and Release for 1.1 + * Mon May 28 2007 Ingvar Hagelund - 1.0.4-3 - Fixed initrc-script bug only visible on el4 (fixes #107)