diff options
Diffstat (limited to 'main/squid')
-rw-r--r-- | main/squid/APKBUILD | 29 | ||||
-rw-r--r-- | main/squid/squid-3.3.9-loggable-urlgroup.patch | 111 | ||||
-rw-r--r-- | main/squid/urlgroup.patch | 134 |
3 files changed, 148 insertions, 126 deletions
diff --git a/main/squid/APKBUILD b/main/squid/APKBUILD index 05a395ad7b..564ab96ce5 100644 --- a/main/squid/APKBUILD +++ b/main/squid/APKBUILD @@ -1,8 +1,8 @@ # Contributor: Carlo Landmeter <clandmeter@gmail.com> # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=squid -pkgver=3.3.11 -pkgrel=1 +pkgver=3.4.5 +pkgrel=0 pkgdesc="A full-featured Web proxy cache server." url="http://www.squid-cache.org" install="squid.pre-install squid.pre-upgrade" @@ -19,7 +19,7 @@ linguas="af ar az bg ca cs da de el es et fa fi fr he hu hy id it ja ko lt langdir="/usr/share/squid/errors" source="ftp://ftp.squid-cache.org/pub/squid/squid-$pkgver.tar.bz2 - squid-3.3.9-loggable-urlgroup.patch + urlgroup.patch cf_gen-pthread.patch bug-3679.patch squid.initd @@ -39,7 +39,6 @@ prepare() { esac done find -name config.sub | xargs chmod u+w - update_config_sub || return 1 } build() { @@ -56,12 +55,12 @@ build() { --with-logdir=/var/log/squid \ --disable-strict-error-checking \ --enable-removal-policies="lru,heap" \ - --enable-digest-auth-helpers="password" \ - --enable-basic-auth-helpers="getpwnam,NCSA,SMB,MSNT,multi-domain-NTLM,squid_radius_auth" \ + --enable-auth-digest \ + --enable-auth-basic="getpwnam,NCSA,SMB,MSNT,RADIUS" \ --enable-epoll \ - --enable-external-acl-helpers="ip_user,unix_group,wbinfo_group" \ - --enable-ntlm-auth-helpers="fakeauth,no_check,smb_lm" \ - --enable-negotiate-auth-helpers="squid_kerb_auth" \ + --enable-external-acl-helpers="file_userip,unix_group,wbinfo_group" \ + --enable-auth-ntlm="SSPI,fake,smb_lm" \ + --enable-auth-negotiate="SSPI,kerberos,wrapper" \ --disable-mit \ --enable-heimdal \ --enable-delay-pools \ @@ -108,22 +107,22 @@ squid_kerb_auth() { mv "$pkgdir"/usr/lib/squid/squid_kerb_auth "$subpkgdir"/usr/lib/squid/ } -md5sums="abf2b0fe128f73f5dc157e7e917949e0 squid-3.3.11.tar.bz2 -31b771f75d155f3d0bee76a246040894 squid-3.3.9-loggable-urlgroup.patch +md5sums="b6bee84755c9bd08a119a386c26c9189 squid-3.4.5.tar.bz2 +aaa90395f61377c5d0efc6c662cbd643 urlgroup.patch 473f8f6dabaec2bd73134d8288deea3d cf_gen-pthread.patch 9e71076799d334faba6f4954594e7b4a bug-3679.patch 947b668332a205626c854d0aece0f3e0 squid.initd 73db59e6c1c242dbc748feeb116650e0 squid.confd 58823e0b86bc2dc71d270208b7b284b4 squid.logrotate" -sha256sums="6b314cd706693522f01d5ab1930f3aa7a9b03a913bc0e699def16cca8d15ea54 squid-3.3.11.tar.bz2 -0a4192ab1df22db309f35d4dcd80414bede84a591776ba7ef775e9e443663c1e squid-3.3.9-loggable-urlgroup.patch +sha256sums="b9ae8083b745607350a9e41cf20e6668a8897cf687a293dbb6bd7dbd8ea027b4 squid-3.4.5.tar.bz2 +c08ffe0bba9b9964540bdc9bbfa2eca233dbb78a55a21537cb257d25070d8a21 urlgroup.patch 3b05ebd2d4baeb0e01437de768c8fbe76ff446f126d107b73fad6bd0d1968f0c cf_gen-pthread.patch 6b08cd129ea5fef019c78f1818c628e1070fe767e362da14844396b671f5a18d bug-3679.patch 29eb267e6ebf9b409836b35ba37f263924f40c30cd0c24b91b1ddce380f2163b squid.initd 4012fc97d7ab653c8a73c4dac09751de80c847a90ee2483ddd41a04168cdeb2b squid.confd b6efdb3261c2e4b5074ef49160af8b96e65f934c7fd64b8954df48aa41cd9b67 squid.logrotate" -sha512sums="bb29681e323cd0e3ed19641850c5a1829ab4a80b935a15de259d02f0f753ab209acf5c8f2f1186c70a30b659c6ef48a1154c9b261a3ebc2f00189b74e48c11b4 squid-3.3.11.tar.bz2 -80360600275cb1b9c484c41c169dedc841c92fa519e9f146bb66fdb947b2dc897a72d49509180f88c4d9fb373457c9117838599ad41e272ecb2972738e905b7f squid-3.3.9-loggable-urlgroup.patch +sha512sums="c5665c6d376fcf5d3e0ae5bc69ad2dd93f9679173b5d52274791843cd010f104348d21e69b3de2a9c5179e9f749231b7a61e62c730ddf89160698a0784f2c86e squid-3.4.5.tar.bz2 +88004f016431f2d73b308f925c90914f49ad5c2e2f20e8ae1578ed174ebf9f6e74e75c4398db2137fb3f3941c0edac6a78e2b1b9fbc603b3b242ff4601295042 urlgroup.patch c5a230fe1f4dda8a3ab064f07c2b93a6f6e3ebdf290cb45da262300d06ac28aa4470a80c8f14db5c9ff4dcc478933d9882bef638a566fe8ad66aec1f96f80be3 cf_gen-pthread.patch b477397f205ba207502a42aae674c85cad85eec831158ea0834361d98ef09a0f103d7a847e101bdd0ece73bbdda9b545960edd5385042bd593733810977e292a bug-3679.patch 3da7673cde48aac9d7f45b0c0208c2608dd66b3fa70f897b83cb3d0a4f9ba88f3e3706cbab65eb811e77a52643d8616350c84ab599d8e617212f934cb44ffc99 squid.initd diff --git a/main/squid/squid-3.3.9-loggable-urlgroup.patch b/main/squid/squid-3.3.9-loggable-urlgroup.patch deleted file mode 100644 index a39411a9b1..0000000000 --- a/main/squid/squid-3.3.9-loggable-urlgroup.patch +++ /dev/null @@ -1,111 +0,0 @@ -diff --git a/src/HttpRequest.cc b/src/HttpRequest.cc -index 5e817ed..7d02411 100644 ---- a/src/HttpRequest.cc -+++ b/src/HttpRequest.cc -@@ -113,6 +113,7 @@ HttpRequest::init() - peer_login = NULL; // not allocated/deallocated by this class - peer_domain = NULL; // not allocated/deallocated by this class - vary_headers = NULL; -+ urlgroup = null_string; - myportname = null_string; - tag = null_string; - #if USE_AUTH -@@ -161,6 +162,7 @@ HttpRequest::clean() - range = NULL; - } - -+ urlgroup.clean(); - myportname.clean(); - - tag.clean(); -@@ -223,6 +225,7 @@ HttpRequest::clone() const - copy->vary_headers = vary_headers ? xstrdup(vary_headers) : NULL; - // XXX: what to do with copy->peer_domain? - -+ copy->urlgroup = urlgroup; - copy->tag = tag; - copy->extacl_log = extacl_log; - copy->extacl_message = extacl_message; -diff --git a/src/HttpRequest.h b/src/HttpRequest.h -index 8b89110..75ae8e6 100644 ---- a/src/HttpRequest.h -+++ b/src/HttpRequest.h -@@ -195,6 +195,8 @@ public: - - char *peer_domain; /* Configured peer forceddomain */ - -+ String urlgroup; -+ - String myportname; // Internal tag name= value from port this requests arrived in. - - String tag; /* Internal tag for this request */ -diff --git a/src/client_side_request.cc b/src/client_side_request.cc -index 1c467d9..00c5bbd 100644 ---- a/src/client_side_request.cc -+++ b/src/client_side_request.cc -@@ -1208,6 +1208,15 @@ ClientRequestContext::clientRedirectDone(char *result) - redirect_state = REDIRECT_DONE; - - if (result) { -+ if (result[0] == '!') { -+ char *t = strchr(result+1, '!'); -+ if (t != NULL) { -+ old_request->urlgroup.reset(NULL); -+ old_request->urlgroup.append(result + 1, t - result - 1); -+ result = t + 1; -+ } -+ } -+ - http_status status = (http_status) atoi(result); - - if (status == HTTP_MOVED_PERMANENTLY -@@ -1224,7 +1233,7 @@ ClientRequestContext::clientRedirectDone(char *result) - } else { - debugs(85, DBG_CRITICAL, "ERROR: URL-rewrite produces invalid " << status << " redirect Location: " << result); - } -- } else if (strcmp(result, http->uri)) { -+ } else if (result[0] != 0 && strcmp(result, http->uri)) { - // XXX: validate the URL properly *without* generating a whole new request object right here. - // XXX: the clone() should be done only AFTER we know the new URL is valid. - HttpRequest *new_request = old_request->clone(); -diff --git a/src/format/ByteCode.h b/src/format/ByteCode.h -index ef25149..557f35e 100644 ---- a/src/format/ByteCode.h -+++ b/src/format/ByteCode.h -@@ -65,6 +65,7 @@ typedef enum { - /*LFT_REQUEST_QUERY, */ - LFT_REQUEST_VERSION_OLD_2X, - LFT_REQUEST_VERSION, -+ LFT_REQUEST_URLGROUP, - - /* request header details pre-adaptation */ - LFT_REQUEST_HEADER, -diff --git a/src/format/Format.cc b/src/format/Format.cc -index 1717360..91ca16d 100644 ---- a/src/format/Format.cc -+++ b/src/format/Format.cc -@@ -923,6 +923,12 @@ Format::Format::assemble(MemBuf &mb, const AccessLogEntry::Pointer &al, int logS - out = tmp; - break; - -+ case LFT_REQUEST_URLGROUP: -+ if (al->request) -+ out = al->request->urlgroup.termedBuf(); -+ quote = 1; -+ break; -+ - case LFT_SERVER_REQ_METHOD: - if (al->adapted_request) { - out = al->adapted_request->method.image(); -diff --git a/src/format/Token.cc b/src/format/Token.cc -index 099dcbe..01fef74 100644 ---- a/src/format/Token.cc -+++ b/src/format/Token.cc -@@ -116,6 +116,7 @@ static TokenTableEntry TokenTable2C[] = { - {"rp", LFT_REQUEST_URLPATH_OLD_31}, - /* { "rq", LFT_REQUEST_QUERY }, * / / * the query-string, INCLUDING the leading ? */ - {"rv", LFT_REQUEST_VERSION}, -+ {"rG", LFT_REQUEST_URLGROUP}, - - {"<rm", LFT_SERVER_REQ_METHOD}, - {"<ru", LFT_SERVER_REQ_URI}, diff --git a/main/squid/urlgroup.patch b/main/squid/urlgroup.patch new file mode 100644 index 0000000000..0a3dd30493 --- /dev/null +++ b/main/squid/urlgroup.patch @@ -0,0 +1,134 @@ +diff -ru squid-3.4.5.orig/src/HttpRequest.cc squid-3.4.5/src/HttpRequest.cc +--- squid-3.4.5.orig/src/HttpRequest.cc 2014-05-02 15:09:05.000000000 -0300 ++++ squid-3.4.5/src/HttpRequest.cc 2014-05-07 10:38:04.849927660 -0300 +@@ -116,6 +116,7 @@ + peer_domain = NULL; // not allocated/deallocated by this class + peer_host = NULL; + vary_headers = NULL; ++ urlgroup = null_string; + myportname = null_string; + tag = null_string; + #if USE_AUTH +@@ -164,6 +165,7 @@ + range = NULL; + } + ++ urlgroup.clean(); + myportname.clean(); + + notes = NULL; +@@ -228,6 +230,7 @@ + copy->vary_headers = vary_headers ? xstrdup(vary_headers) : NULL; + // XXX: what to do with copy->peer_domain? + ++ copy->urlgroup = urlgroup; + copy->tag = tag; + copy->extacl_log = extacl_log; + copy->extacl_message = extacl_message; +diff -ru squid-3.4.5.orig/src/HttpRequest.h squid-3.4.5/src/HttpRequest.h +--- squid-3.4.5.orig/src/HttpRequest.h 2014-05-02 15:09:05.000000000 -0300 ++++ squid-3.4.5/src/HttpRequest.h 2014-05-07 10:38:04.853260996 -0300 +@@ -201,6 +201,8 @@ + + char *peer_domain; /* Configured peer forceddomain */ + ++ String urlgroup; ++ + String myportname; // Internal tag name= value from port this requests arrived in. + + NotePairs::Pointer notes; ///< annotations added by the note directive and helpers +diff -ru squid-3.4.5.orig/src/client_side_request.cc squid-3.4.5/src/client_side_request.cc +--- squid-3.4.5.orig/src/client_side_request.cc 2014-05-02 15:09:05.000000000 -0300 ++++ squid-3.4.5/src/client_side_request.cc 2014-05-07 11:34:39.291538415 -0300 +@@ -1265,6 +1265,10 @@ + // #2: redirect with a default status code OK url="..." + // #3: re-write the URL OK rewrite-url="..." + ++ const char *urlgroupNote = reply.notes.findFirst("urlgroup"); ++ if (urlgroupNote != NULL) ++ old_request->urlgroup.reset(urlgroupNote); ++ + const char *statusNote = reply.notes.findFirst("status"); + const char *urlNote = reply.notes.findFirst("url"); + +diff -ru squid-3.4.5.orig/src/format/ByteCode.h squid-3.4.5/src/format/ByteCode.h +--- squid-3.4.5.orig/src/format/ByteCode.h 2014-05-02 15:09:05.000000000 -0300 ++++ squid-3.4.5/src/format/ByteCode.h 2014-05-07 10:38:04.853260996 -0300 +@@ -69,6 +69,7 @@ + /*LFT_REQUEST_QUERY, */ + LFT_REQUEST_VERSION_OLD_2X, + LFT_REQUEST_VERSION, ++ LFT_REQUEST_URLGROUP, + + /* request header details pre-adaptation */ + LFT_REQUEST_HEADER, +diff -ru squid-3.4.5.orig/src/format/Format.cc squid-3.4.5/src/format/Format.cc +--- squid-3.4.5.orig/src/format/Format.cc 2014-05-02 15:09:05.000000000 -0300 ++++ squid-3.4.5/src/format/Format.cc 2014-05-07 10:38:04.853260996 -0300 +@@ -951,6 +951,12 @@ + out = tmp; + break; + ++ case LFT_REQUEST_URLGROUP: ++ if (al->request) ++ out = al->request->urlgroup.termedBuf(); ++ quote = 1; ++ break; ++ + case LFT_SERVER_REQ_METHOD: + if (al->adapted_request) { + out = al->adapted_request->method.image(); +diff -ru squid-3.4.5.orig/src/format/Token.cc squid-3.4.5/src/format/Token.cc +--- squid-3.4.5.orig/src/format/Token.cc 2014-05-02 15:09:05.000000000 -0300 ++++ squid-3.4.5/src/format/Token.cc 2014-05-07 10:38:04.853260996 -0300 +@@ -89,6 +89,7 @@ + {"rp", LFT_REQUEST_URLPATH_OLD_31}, + /* { "rq", LFT_REQUEST_QUERY }, * / / * the query-string, INCLUDING the leading ? */ + {"rv", LFT_REQUEST_VERSION}, ++ {"rG", LFT_REQUEST_URLGROUP}, + + {"<rm", LFT_SERVER_REQ_METHOD}, + {"<ru", LFT_SERVER_REQ_URI}, +diff -ru squid-3.4.5.orig/src/redirect.cc squid-3.4.5/src/redirect.cc +--- squid-3.4.5.orig/src/redirect.cc 2014-05-02 15:09:05.000000000 -0300 ++++ squid-3.4.5/src/redirect.cc 2014-05-07 13:09:56.813897270 -0300 +@@ -112,8 +112,7 @@ + * At this point altering the helper buffer in that way is not harmful, but annoying. + * When Bug 1961 is resolved and urlParse has a const API, this needs to die. + */ +- const char * result = reply.other().content(); +- const Http::StatusCode status = static_cast<Http::StatusCode>(atoi(result)); ++ char * result = reply.modifiableOther().content(); + + HelperReply newReply; + // BACKWARD COMPATIBILITY 2012-06-15: +@@ -123,6 +122,18 @@ + newReply.result = HelperReply::Okay; + newReply.notes.append(&reply.notes); + ++ // check and parse for urlgroup= ++ if (*result == '!') { ++ char *t = strchr(result+1, '!'); ++ if (t != NULL) { ++ *t = 0; ++ newReply.notes.add("urlgroup", result+1); ++ result = t + 1; ++ } ++ } ++ ++ const Http::StatusCode status = static_cast<Http::StatusCode>(atoi(result)); ++ + if (status == Http::scMovedPermanently + || status == Http::scFound + || status == Http::scSeeOther +@@ -143,7 +154,8 @@ + // status code is not a redirect code (or does not exist) + // treat as a re-write URL request + // TODO: validate the URL produced here is RFC 2616 compliant URI +- newReply.notes.add("rewrite-url", reply.other().content()); ++ if (*result) ++ newReply.notes.add("rewrite-url", result); + } + + void *cbdata; + |