aboutsummaryrefslogtreecommitdiffstats
path: root/main/squid
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2010-11-18 16:41:55 +0200
committerTimo Teräs <timo.teras@iki.fi>2010-11-18 16:41:55 +0200
commit982cbbced0983bf870e2ad60d1b530e2f55bfb99 (patch)
tree830d0bec351935e87267f71dad7325abd13d6f19 /main/squid
parent46d92312741bc36327d010dcf74c16d0dbe69b90 (diff)
downloadaports-982cbbced0983bf870e2ad60d1b530e2f55bfb99.tar.bz2
aports-982cbbced0983bf870e2ad60d1b530e2f55bfb99.tar.xz
main/squid: add a patch to enable logging of request urlgroup
The urlgroup is a data entry which can be returned from a redirector and is useful if it can be logged (ref #447). Squark will use this to return classification data back to squid.
Diffstat (limited to 'main/squid')
-rw-r--r--main/squid/APKBUILD11
-rw-r--r--main/squid/squid-2.7-loggable-urlgroup.patch33
2 files changed, 40 insertions, 4 deletions
diff --git a/main/squid/APKBUILD b/main/squid/APKBUILD
index fb80b5f366..2f5ba9a65a 100644
--- a/main/squid/APKBUILD
+++ b/main/squid/APKBUILD
@@ -3,7 +3,7 @@
pkgname=squid
pkgver=2.7.9
_ver=2.7.STABLE9
-pkgrel=1
+pkgrel=2
pkgdesc="A full-featured Web proxy cache server."
url="http://www.squid-cache.org"
install="squid.pre-install squid.pre-upgrade squid.post-install"
@@ -55,6 +55,7 @@ source="http://www.squid-cache.org/Versions/v2/2.7/${pkgname}-${_ver}.tar.bz2
squid-2.7-gentoo.patch
squid-2-heimdal.patch
squid-2.7-ims-content-type.patch
+ squid-2.7-loggable-urlgroup.patch
$pkgname.logrotate
"
pkgusers="squid"
@@ -63,9 +64,10 @@ pkggroups="squid"
build() {
cd "$srcdir/$pkgname-$_ver"
- patch -p1 -i "$srcdir"/squid-2.7-gentoo.patch || return 1
- patch -p1 -i "$srcdir"/squid-2.7-ims-content-type.patch || return 1
- patch -p1 -i "$srcdir"/squid-2-heimdal.patch || return 1
+ for i in "$srcdir"/*.patch; do
+ msg "Applying $i..."
+ patch -p1 -i $i || return 1
+ done
touch NEWS AUTHORS
aclocal && autoconf && automake -a || return 1
@@ -297,4 +299,5 @@ md5sums="3c6642c85470b1079207d43bba25a819 squid-2.7.STABLE9.tar.bz2
3827f71d940b47eb385a1a1d92a51d66 squid-2.7-gentoo.patch
614b97126ad9eecf728095f2de63d33d squid-2-heimdal.patch
549377b5a6b673bf19ea6c34003d122c squid-2.7-ims-content-type.patch
+d4efa24094b011e77bc7bf45291c0ee9 squid-2.7-loggable-urlgroup.patch
58823e0b86bc2dc71d270208b7b284b4 squid.logrotate"
diff --git a/main/squid/squid-2.7-loggable-urlgroup.patch b/main/squid/squid-2.7-loggable-urlgroup.patch
new file mode 100644
index 0000000000..c2bc9e6d64
--- /dev/null
+++ b/main/squid/squid-2.7-loggable-urlgroup.patch
@@ -0,0 +1,33 @@
+Index: squid-2.7.STABLE9/src/access_log.c
+===================================================================
+--- squid-2.7.STABLE9.orig/src/access_log.c 2010-11-18 15:02:26.000000000 +0200
++++ squid-2.7.STABLE9/src/access_log.c 2010-11-18 15:07:34.000000000 +0200
+@@ -301,6 +301,7 @@
+ LFT_REQUEST_URLPATH,
+ /*LFT_REQUEST_QUERY, * // * this is not needed. see strip_query_terms */
+ LFT_REQUEST_VERSION,
++ LFT_REQUEST_URLGROUP,
+
+ LFT_REQUEST_SIZE_TOTAL,
+ /*LFT_REQUEST_SIZE_LINE, */
+@@ -411,6 +412,7 @@
+ /* { "rq", LFT_REQUEST_QUERY }, * / / * the query-string, INCLUDING the leading ? */
+ {">v", LFT_REQUEST_VERSION},
+ {"rv", LFT_REQUEST_VERSION},
++ {"rG", LFT_REQUEST_URLGROUP},
+
+ {">st", LFT_REQUEST_SIZE_TOTAL},
+ /*{ ">sl", LFT_REQUEST_SIZE_LINE }, * / / * the request line "GET ... " */
+@@ -544,6 +546,12 @@
+ quote = 1;
+ break;
+
++ case LFT_REQUEST_URLGROUP:
++ if (al->request)
++ out = al->request->urlgroup;
++ quote = 1;
++ break;
++
+ case LFT_REPLY_HEADER:
+ if (al->reply)
+ sb = httpHeaderGetByName(&al->reply->header, fmt->data.header.header);