summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenedikt Boehm <hollow@gentoo.org>2009-06-11 09:50:42 +0000
committerBenedikt Boehm <hollow@gentoo.org>2009-06-11 09:50:42 +0000
commit927eadd9558c3ec834704f8f6629242a866431a9 (patch)
tree48247e6f6a2056a718a1f91513c1dec602d5d8ef /www-servers/varnish
parentUpdate homepage and src_uri per bug #273548. (diff)
downloadgentoo-2-927eadd9558c3ec834704f8f6629242a866431a9.tar.gz
gentoo-2-927eadd9558c3ec834704f8f6629242a866431a9.tar.bz2
gentoo-2-927eadd9558c3ec834704f8f6629242a866431a9.zip
support virtual host log format in varnishncsa (upstream #485)
(Portage version: 2.2_rc33/cvs/Linux i686)
Diffstat (limited to 'www-servers/varnish')
-rw-r--r--www-servers/varnish/ChangeLog6
-rw-r--r--www-servers/varnish/files/varnish-2.0.4-virtual-ncsa.patch57
-rw-r--r--www-servers/varnish/varnish-2.0.4.ebuild3
3 files changed, 64 insertions, 2 deletions
diff --git a/www-servers/varnish/ChangeLog b/www-servers/varnish/ChangeLog
index a7f36f4481d7..2c97d13e8eb7 100644
--- a/www-servers/varnish/ChangeLog
+++ b/www-servers/varnish/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for www-servers/varnish
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/www-servers/varnish/ChangeLog,v 1.23 2009/04/18 20:20:58 bangert Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-servers/varnish/ChangeLog,v 1.24 2009/06/11 09:50:42 hollow Exp $
+
+ 11 Jun 2009; Benedikt Böhm <hollow@gentoo.org>
+ +files/varnish-2.0.4-virtual-ncsa.patch, varnish-2.0.4.ebuild:
+ support virtual host log format in varnishncsa (upstream #485)
18 Apr 2009; Thilo Bangert <bangert@gentoo.org> -varnish-2.0.2.ebuild,
-varnish-2.0.3.ebuild:
diff --git a/www-servers/varnish/files/varnish-2.0.4-virtual-ncsa.patch b/www-servers/varnish/files/varnish-2.0.4-virtual-ncsa.patch
new file mode 100644
index 000000000000..7626bcad9ded
--- /dev/null
+++ b/www-servers/varnish/files/varnish-2.0.4-virtual-ncsa.patch
@@ -0,0 +1,57 @@
+diff -NurpP varnish-2.0.4.orig/bin/varnishncsa/varnishncsa.c varnish-2.0.4/bin/varnishncsa/varnishncsa.c
+--- varnish-2.0.4.orig/bin/varnishncsa/varnishncsa.c 2009-04-01 15:35:14.000000000 +0200
++++ varnish-2.0.4/bin/varnishncsa/varnishncsa.c 2009-06-11 11:45:44.084537099 +0200
+@@ -102,6 +102,7 @@ static struct logline {
+
+ static size_t nll;
+ static int prefer_x_forwarded_for = 0;
++static int virtual_host_style_logging = 0;
+
+ static int
+ isprefix(const char *str, const char *prefix, const char *end,
+@@ -399,6 +400,11 @@ h_ncsa(void *priv, enum shmlogtag tag, u
+ if (!lp->bogus) {
+ fo = priv;
+
++ /* the -v option */
++ if (virtual_host_style_logging) {
++ fprintf(fo, "%s ", lp->df_Host);
++ }
++
+ /* %h */
+ if (!lp->df_h && spec & VSL_S_BACKEND)
+ fprintf(fo, "127.0.0.1 ");
+@@ -438,7 +444,7 @@ h_ncsa(void *priv, enum shmlogtag tag, u
+ * normalized the request URL.
+ */
+ fprintf(fo, "\"%s ", lp->df_m);
+- if (lp->df_Host) {
++ if (!virtual_host_style_logging && lp->df_Host) {
+ if (strncmp(lp->df_Host, "http://", 7) != 0)
+ fprintf(fo, "http://");
+ fprintf(fo, "%s", lp->df_Host);
+@@ -512,7 +518,7 @@ usage(void)
+ {
+
+ fprintf(stderr,
+- "usage: varnishncsa %s [-aDV] [-n varnish_name] "
++ "usage: varnishncsa %s [-avDV] [-n varnish_name] "
+ "[-P file] [-w file]\n", VSL_USAGE);
+ exit(1);
+ }
+@@ -531,11 +537,14 @@ main(int argc, char *argv[])
+
+ vd = VSL_New();
+
+- while ((c = getopt(argc, argv, VSL_ARGS "aDn:P:Vw:f")) != -1) {
++ while ((c = getopt(argc, argv, VSL_ARGS "avDn:P:Vw:f")) != -1) {
+ switch (c) {
+ case 'a':
+ a_flag = 1;
+ break;
++ case 'v':
++ virtual_host_style_logging = 1;
++ break;
+ case 'f':
+ prefer_x_forwarded_for = 1;
+ break;
diff --git a/www-servers/varnish/varnish-2.0.4.ebuild b/www-servers/varnish/varnish-2.0.4.ebuild
index c9827da2b091..9bcb8e0d54d6 100644
--- a/www-servers/varnish/varnish-2.0.4.ebuild
+++ b/www-servers/varnish/varnish-2.0.4.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/www-servers/varnish/varnish-2.0.4.ebuild,v 1.1 2009/04/13 09:54:47 bangert Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-servers/varnish/varnish-2.0.4.ebuild,v 1.2 2009/06/11 09:50:42 hollow Exp $
EAPI="2"
@@ -19,6 +19,7 @@ RDEPEND="sys-devel/gcc"
src_prepare() {
epatch "${FILESDIR}"/${P}-link-order.patch
+ epatch "${FILESDIR}"/${P}-virtual-ncsa.patch
eautoreconf
}