diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2012-03-22 08:15:23 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2012-03-22 08:16:46 +0000 |
commit | 9c3d51ed7510d8ba50ca2c96001499626dd8c6c2 (patch) | |
tree | d2aa399bf5f2a99b8cbee258881bfdbba28707e8 | |
parent | 1bf1f80aa2ce7ecb554caaaee64932bdd5022c73 (diff) | |
download | alpine_aports-9c3d51ed7510d8ba50ca2c96001499626dd8c6c2.tar.bz2 alpine_aports-9c3d51ed7510d8ba50ca2c96001499626dd8c6c2.tar.xz alpine_aports-9c3d51ed7510d8ba50ca2c96001499626dd8c6c2.zip |
main/squid: upgrade to 3.2.0.16
-rw-r--r-- | main/squid/APKBUILD | 10 | ||||
-rw-r--r-- | main/squid/squid-3.2.0.16-loggable-urlgroup.patch (renamed from main/squid/squid-3.2.0.12-loggable-urlgroup.patch) | 126 | ||||
-rw-r--r-- | main/squid/squid.post-install | 5 |
3 files changed, 68 insertions, 73 deletions
diff --git a/main/squid/APKBUILD b/main/squid/APKBUILD index 7ec326f9f1..e018f5db42 100644 --- a/main/squid/APKBUILD +++ b/main/squid/APKBUILD | |||
@@ -1,11 +1,11 @@ | |||
1 | # Contributor: Carlo Landmeter <clandmeter@gmail.com> | 1 | # Contributor: Carlo Landmeter <clandmeter@gmail.com> |
2 | # Maintainer: Natanael Copa <ncopa@alpinelinux.org> | 2 | # Maintainer: Natanael Copa <ncopa@alpinelinux.org> |
3 | pkgname=squid | 3 | pkgname=squid |
4 | pkgver=3.2.0.13 | 4 | pkgver=3.2.0.16 |
5 | pkgrel=0 | 5 | pkgrel=0 |
6 | pkgdesc="A full-featured Web proxy cache server." | 6 | pkgdesc="A full-featured Web proxy cache server." |
7 | url="http://www.squid-cache.org" | 7 | url="http://www.squid-cache.org" |
8 | install="squid.pre-install squid.pre-upgrade squid.post-install" | 8 | install="squid.pre-install squid.pre-upgrade" |
9 | pkgusers="squid" | 9 | pkgusers="squid" |
10 | pkggroups="squid" | 10 | pkggroups="squid" |
11 | arch="all" | 11 | arch="all" |
@@ -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 | |||
19 | langdir="/usr/share/squid/errors" | 19 | langdir="/usr/share/squid/errors" |
20 | 20 | ||
21 | source="http://www.squid-cache.org/Versions/v3/3.2/squid-$pkgver.tar.bz2 | 21 | source="http://www.squid-cache.org/Versions/v3/3.2/squid-$pkgver.tar.bz2 |
22 | squid-3.2.0.12-loggable-urlgroup.patch | 22 | squid-3.2.0.16-loggable-urlgroup.patch |
23 | cf_gen-pthread.patch | 23 | cf_gen-pthread.patch |
24 | squid.initd | 24 | squid.initd |
25 | squid.confd | 25 | squid.confd |
@@ -103,8 +103,8 @@ squid_kerb_auth() { | |||
103 | mv "$pkgdir"/usr/lib/squid/squid_kerb_auth "$subpkgdir"/usr/lib/squid/ | 103 | mv "$pkgdir"/usr/lib/squid/squid_kerb_auth "$subpkgdir"/usr/lib/squid/ |
104 | } | 104 | } |
105 | 105 | ||
106 | md5sums="cef6d63729b34404a3e463f0bd81b1e3 squid-3.2.0.13.tar.bz2 | 106 | md5sums="1e2c1297992e151a1cafd8512f6cac1c squid-3.2.0.16.tar.bz2 |
107 | 084f7b1af1ac0cb8fea35c7a0905a80e squid-3.2.0.12-loggable-urlgroup.patch | 107 | 16e3b38996d4c5858e1478f8eb650876 squid-3.2.0.16-loggable-urlgroup.patch |
108 | c60237de253c02937f272d3b189d7679 cf_gen-pthread.patch | 108 | c60237de253c02937f272d3b189d7679 cf_gen-pthread.patch |
109 | 905e57c6d41414f54a75a5c0f9f7fac7 squid.initd | 109 | 905e57c6d41414f54a75a5c0f9f7fac7 squid.initd |
110 | 2897c725c201be53d3c9a7db0101bdf0 squid.confd | 110 | 2897c725c201be53d3c9a7db0101bdf0 squid.confd |
diff --git a/main/squid/squid-3.2.0.12-loggable-urlgroup.patch b/main/squid/squid-3.2.0.16-loggable-urlgroup.patch index ee1646fe58..41193ba85f 100644 --- a/main/squid/squid-3.2.0.12-loggable-urlgroup.patch +++ b/main/squid/squid-3.2.0.16-loggable-urlgroup.patch | |||
@@ -1,37 +1,8 @@ | |||
1 | Index: squid-3.2.0.12/src/client_side_request.cc | 1 | diff --git a/src/HttpRequest.cc b/src/HttpRequest.cc |
2 | =================================================================== | 2 | index b464e65..0448078 100644 |
3 | --- squid-3.2.0.12.orig/src/client_side_request.cc 2011-10-07 20:29:10.000000000 +0300 | 3 | --- a/src/HttpRequest.cc |
4 | +++ squid-3.2.0.12/src/client_side_request.cc 2011-10-07 21:54:38.000000000 +0300 | 4 | +++ b/src/HttpRequest.cc |
5 | @@ -1165,6 +1165,15 @@ | 5 | @@ -107,6 +107,7 @@ HttpRequest::init() |
6 | redirect_state = REDIRECT_DONE; | ||
7 | |||
8 | if (result) { | ||
9 | + if (result[0] == '!') { | ||
10 | + char *t = strchr(result+1, '!'); | ||
11 | + if (t != NULL) { | ||
12 | + old_request->urlgroup.reset(NULL); | ||
13 | + old_request->urlgroup.append(result + 1, t - result - 1); | ||
14 | + result = t + 1; | ||
15 | + } | ||
16 | + } | ||
17 | + | ||
18 | http_status status = (http_status) atoi(result); | ||
19 | |||
20 | if (status == HTTP_MOVED_PERMANENTLY | ||
21 | @@ -1183,7 +1192,7 @@ | ||
22 | else | ||
23 | debugs(85, DBG_CRITICAL, "ERROR: URL-rewrite produces invalid 303 redirect Location: " << result); | ||
24 | } | ||
25 | - } else if (strcmp(result, http->uri)) { | ||
26 | + } else if (result[0] != 0 && strcmp(result, http->uri)) { | ||
27 | // XXX: validate the URL properly *without* generating a whole new request object right here. | ||
28 | // XXX: the clone() should be done only AFTER we know the new URL is valid. | ||
29 | HttpRequest *new_request = old_request->clone(); | ||
30 | Index: squid-3.2.0.12/src/HttpRequest.cc | ||
31 | =================================================================== | ||
32 | --- squid-3.2.0.12.orig/src/HttpRequest.cc 2011-10-07 21:02:45.000000000 +0300 | ||
33 | +++ squid-3.2.0.12/src/HttpRequest.cc 2011-10-07 21:03:45.000000000 +0300 | ||
34 | @@ -106,6 +106,7 @@ | ||
35 | peer_login = NULL; // not allocated/deallocated by this class | 6 | peer_login = NULL; // not allocated/deallocated by this class |
36 | peer_domain = NULL; // not allocated/deallocated by this class | 7 | peer_domain = NULL; // not allocated/deallocated by this class |
37 | vary_headers = NULL; | 8 | vary_headers = NULL; |
@@ -39,7 +10,7 @@ Index: squid-3.2.0.12/src/HttpRequest.cc | |||
39 | myportname = null_string; | 10 | myportname = null_string; |
40 | tag = null_string; | 11 | tag = null_string; |
41 | #if USE_AUTH | 12 | #if USE_AUTH |
42 | @@ -154,6 +155,7 @@ | 13 | @@ -155,6 +156,7 @@ HttpRequest::clean() |
43 | range = NULL; | 14 | range = NULL; |
44 | } | 15 | } |
45 | 16 | ||
@@ -47,7 +18,7 @@ Index: squid-3.2.0.12/src/HttpRequest.cc | |||
47 | myportname.clean(); | 18 | myportname.clean(); |
48 | 19 | ||
49 | tag.clean(); | 20 | tag.clean(); |
50 | @@ -213,6 +215,7 @@ | 21 | @@ -214,6 +216,7 @@ HttpRequest::clone() const |
51 | copy->vary_headers = vary_headers ? xstrdup(vary_headers) : NULL; | 22 | copy->vary_headers = vary_headers ? xstrdup(vary_headers) : NULL; |
52 | // XXX: what to do with copy->peer_domain? | 23 | // XXX: what to do with copy->peer_domain? |
53 | 24 | ||
@@ -55,11 +26,11 @@ Index: squid-3.2.0.12/src/HttpRequest.cc | |||
55 | copy->myportname = myportname; | 26 | copy->myportname = myportname; |
56 | copy->tag = tag; | 27 | copy->tag = tag; |
57 | #if USE_AUTH | 28 | #if USE_AUTH |
58 | Index: squid-3.2.0.12/src/HttpRequest.h | 29 | diff --git a/src/HttpRequest.h b/src/HttpRequest.h |
59 | =================================================================== | 30 | index dc44fea..989624d 100644 |
60 | --- squid-3.2.0.12.orig/src/HttpRequest.h 2011-10-07 21:02:45.000000000 +0300 | 31 | --- a/src/HttpRequest.h |
61 | +++ squid-3.2.0.12/src/HttpRequest.h 2011-10-07 21:02:55.000000000 +0300 | 32 | +++ b/src/HttpRequest.h |
62 | @@ -187,6 +187,8 @@ | 33 | @@ -187,6 +187,8 @@ public: |
63 | 34 | ||
64 | char *peer_domain; /* Configured peer forceddomain */ | 35 | char *peer_domain; /* Configured peer forceddomain */ |
65 | 36 | ||
@@ -68,11 +39,52 @@ Index: squid-3.2.0.12/src/HttpRequest.h | |||
68 | String myportname; // Internal tag name= value from port this requests arrived in. | 39 | String myportname; // Internal tag name= value from port this requests arrived in. |
69 | 40 | ||
70 | String tag; /* Internal tag for this request */ | 41 | String tag; /* Internal tag for this request */ |
71 | Index: squid-3.2.0.12/src/format/Format.cc | 42 | diff --git a/src/client_side_request.cc b/src/client_side_request.cc |
72 | =================================================================== | 43 | index 0c3113b..d1947e9 100644 |
73 | --- squid-3.2.0.12.orig/src/format/Format.cc 2011-10-07 21:33:38.000000000 +0300 | 44 | --- a/src/client_side_request.cc |
74 | +++ squid-3.2.0.12/src/format/Format.cc 2011-10-07 21:41:45.000000000 +0300 | 45 | +++ b/src/client_side_request.cc |
75 | @@ -895,6 +895,12 @@ | 46 | @@ -1180,6 +1180,15 @@ ClientRequestContext::clientRedirectDone(char *result) |
47 | redirect_state = REDIRECT_DONE; | ||
48 | |||
49 | if (result) { | ||
50 | + if (result[0] == '!') { | ||
51 | + char *t = strchr(result+1, '!'); | ||
52 | + if (t != NULL) { | ||
53 | + old_request->urlgroup.reset(NULL); | ||
54 | + old_request->urlgroup.append(result + 1, t - result - 1); | ||
55 | + result = t + 1; | ||
56 | + } | ||
57 | + } | ||
58 | + | ||
59 | http_status status = (http_status) atoi(result); | ||
60 | |||
61 | if (status == HTTP_MOVED_PERMANENTLY | ||
62 | @@ -1198,7 +1207,7 @@ ClientRequestContext::clientRedirectDone(char *result) | ||
63 | else | ||
64 | debugs(85, DBG_CRITICAL, "ERROR: URL-rewrite produces invalid 303 redirect Location: " << result); | ||
65 | } | ||
66 | - } else if (strcmp(result, http->uri)) { | ||
67 | + } else if (result[0] != 0 && strcmp(result, http->uri)) { | ||
68 | // XXX: validate the URL properly *without* generating a whole new request object right here. | ||
69 | // XXX: the clone() should be done only AFTER we know the new URL is valid. | ||
70 | HttpRequest *new_request = old_request->clone(); | ||
71 | diff --git a/src/format/ByteCode.h b/src/format/ByteCode.h | ||
72 | index 8e345df..ddb0f8f 100644 | ||
73 | --- a/src/format/ByteCode.h | ||
74 | +++ b/src/format/ByteCode.h | ||
75 | @@ -65,6 +65,7 @@ typedef enum { | ||
76 | /*LFT_REQUEST_QUERY, */ | ||
77 | LFT_REQUEST_VERSION_OLD_2X, | ||
78 | LFT_REQUEST_VERSION, | ||
79 | + LFT_REQUEST_URLGROUP, | ||
80 | |||
81 | /* request header details pre-adaptation */ | ||
82 | LFT_REQUEST_HEADER, | ||
83 | diff --git a/src/format/Format.cc b/src/format/Format.cc | ||
84 | index 18348e8..2e65886 100644 | ||
85 | --- a/src/format/Format.cc | ||
86 | +++ b/src/format/Format.cc | ||
87 | @@ -907,6 +907,12 @@ Format::Format::assemble(MemBuf &mb, AccessLogEntry *al, int logSequenceNumber) | ||
76 | out = tmp; | 88 | out = tmp; |
77 | break; | 89 | break; |
78 | 90 | ||
@@ -85,23 +97,11 @@ Index: squid-3.2.0.12/src/format/Format.cc | |||
85 | case LFT_SERVER_REQ_METHOD: | 97 | case LFT_SERVER_REQ_METHOD: |
86 | if (al->adapted_request) { | 98 | if (al->adapted_request) { |
87 | out = al->adapted_request->method.image(); | 99 | out = al->adapted_request->method.image(); |
88 | Index: squid-3.2.0.12/src/format/Tokens.h | 100 | diff --git a/src/format/Token.cc b/src/format/Token.cc |
89 | =================================================================== | 101 | index 6859e0a..8a8e5e7 100644 |
90 | --- squid-3.2.0.12.orig/src/format/Tokens.h 2011-10-07 21:34:25.000000000 +0300 | 102 | --- a/src/format/Token.cc |
91 | +++ squid-3.2.0.12/src/format/Tokens.h 2011-10-07 21:40:26.000000000 +0300 | 103 | +++ b/src/format/Token.cc |
92 | @@ -100,6 +100,7 @@ | 104 | @@ -116,6 +116,7 @@ static TokenTableEntry TokenTable2C[] = { |
93 | /*LFT_REQUEST_QUERY, */ | ||
94 | LFT_REQUEST_VERSION_OLD_2X, | ||
95 | LFT_REQUEST_VERSION, | ||
96 | + LFT_REQUEST_URLGROUP, | ||
97 | |||
98 | /* Request-Line details sent to the server/peer */ | ||
99 | LFT_SERVER_REQ_METHOD, | ||
100 | Index: squid-3.2.0.12/src/format/Tokens.cc | ||
101 | =================================================================== | ||
102 | --- squid-3.2.0.12.orig/src/format/Tokens.cc 2011-10-07 21:38:05.000000000 +0300 | ||
103 | +++ squid-3.2.0.12/src/format/Tokens.cc 2011-10-07 21:40:55.000000000 +0300 | ||
104 | @@ -114,6 +114,7 @@ | ||
105 | {"rp", LFT_REQUEST_URLPATH_OLD_31}, | 105 | {"rp", LFT_REQUEST_URLPATH_OLD_31}, |
106 | /* { "rq", LFT_REQUEST_QUERY }, * / / * the query-string, INCLUDING the leading ? */ | 106 | /* { "rq", LFT_REQUEST_QUERY }, * / / * the query-string, INCLUDING the leading ? */ |
107 | {"rv", LFT_REQUEST_VERSION}, | 107 | {"rv", LFT_REQUEST_VERSION}, |
diff --git a/main/squid/squid.post-install b/main/squid/squid.post-install deleted file mode 100644 index 88df6d26f9..0000000000 --- a/main/squid/squid.post-install +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | chown squid:squid /var/cache/squid /var/log/squid | ||
4 | exit 0 | ||
5 | |||