Gentoo Archives: gentoo-commits

From: "Alin Nastac (mrness)" <mrness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-proxy/squid/files: squid-3.0.6-gentoo.patch squid-3.0.6-adapted-zph.patch squid-2.7.2-gentoo.patch squid-2.6.18-ToS_Hit_ToS_Preserve.patch squid-3.0.4-gentoo.patch squid-2.6.18-gentoo.patch squid-2.6.18-qos.patch
Date: Sun, 22 Jun 2008 11:52:17
Message-Id: E1KAO78-0001Ul-52@stork.gentoo.org
1 mrness 08/06/22 11:52:10
2
3 Modified: squid-3.0.6-gentoo.patch
4 Added: squid-3.0.6-adapted-zph.patch
5 squid-2.7.2-gentoo.patch
6 Removed: squid-2.6.18-ToS_Hit_ToS_Preserve.patch
7 squid-3.0.4-gentoo.patch squid-2.6.18-gentoo.patch
8 squid-2.6.18-qos.patch
9 Log:
10 Remove obsolete versions. 2.7 version bump without qos and zero-penalty-hit support (#224733).
11 Add zero-penalty-hit patch to the 3.0 branch.
12 (Portage version: 2.1.4.4)
13
14 Revision Changes Path
15 1.2 net-proxy/squid/files/squid-3.0.6-gentoo.patch
16
17 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-proxy/squid/files/squid-3.0.6-gentoo.patch?rev=1.2&view=markup
18 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-proxy/squid/files/squid-3.0.6-gentoo.patch?rev=1.2&content-type=text/plain
19 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-proxy/squid/files/squid-3.0.6-gentoo.patch?r1=1.1&r2=1.2
20
21 Index: squid-3.0.6-gentoo.patch
22 ===================================================================
23 RCS file: /var/cvsroot/gentoo-x86/net-proxy/squid/files/squid-3.0.6-gentoo.patch,v
24 retrieving revision 1.1
25 retrieving revision 1.2
26 diff -u -r1.1 -r1.2
27 --- squid-3.0.6-gentoo.patch 25 May 2008 20:46:50 -0000 1.1
28 +++ squid-3.0.6-gentoo.patch 22 Jun 2008 11:52:09 -0000 1.2
29 @@ -1,6 +1,22 @@
30 +diff -Nru squid-3.0.STABLE6.orig/configure.in squid-3.0.STABLE6/configure.in
31 +--- squid-3.0.STABLE6.orig/configure.in 2008-05-20 17:01:16.000000000 +0200
32 ++++ squid-3.0.STABLE6/configure.in 2008-06-22 13:20:41.000000000 +0200
33 +@@ -19,9 +19,9 @@
34 + PRESET_LDFLAGS="$LDFLAGS"
35 +
36 + dnl Set default LDFLAGS
37 +-if test -z "$LDFLAGS"; then
38 +- LDFLAGS="-g"
39 +-fi
40 ++dnl if test -z "$LDFLAGS"; then
41 ++dnl LDFLAGS="-g"
42 ++dnl fi
43 +
44 + dnl Check for GNU cc
45 + AC_PROG_CC
46 diff -Nru squid-3.0.STABLE6.orig/helpers/basic_auth/MSNT/confload.c squid-3.0.STABLE6/helpers/basic_auth/MSNT/confload.c
47 ---- squid-3.0.STABLE6.orig/helpers/basic_auth/MSNT/confload.c 2008-05-20 18:01:10.000000000 +0300
48 -+++ squid-3.0.STABLE6/helpers/basic_auth/MSNT/confload.c 2008-05-25 23:26:04.000000000 +0300
49 +--- squid-3.0.STABLE6.orig/helpers/basic_auth/MSNT/confload.c 2008-05-20 17:01:10.000000000 +0200
50 ++++ squid-3.0.STABLE6/helpers/basic_auth/MSNT/confload.c 2008-06-22 13:20:06.000000000 +0200
51 @@ -24,7 +24,7 @@
52
53 /* Path to configuration file */
54 @@ -11,8 +27,8 @@
55 #define CONFIGFILE SYSCONFDIR "/msntauth.conf"
56
57 diff -Nru squid-3.0.STABLE6.orig/helpers/basic_auth/MSNT/msntauth.conf.default squid-3.0.STABLE6/helpers/basic_auth/MSNT/msntauth.conf.default
58 ---- squid-3.0.STABLE6.orig/helpers/basic_auth/MSNT/msntauth.conf.default 2008-05-20 18:01:10.000000000 +0300
59 -+++ squid-3.0.STABLE6/helpers/basic_auth/MSNT/msntauth.conf.default 2008-05-25 23:26:04.000000000 +0300
60 +--- squid-3.0.STABLE6.orig/helpers/basic_auth/MSNT/msntauth.conf.default 2008-05-20 17:01:10.000000000 +0200
61 ++++ squid-3.0.STABLE6/helpers/basic_auth/MSNT/msntauth.conf.default 2008-06-22 13:20:06.000000000 +0200
62 @@ -8,6 +8,6 @@
63 server other_PDC other_BDC otherdomain
64
65 @@ -23,8 +39,8 @@
66 +#allowusers /etc/squid/msntauth.allowusers
67
68 diff -Nru squid-3.0.STABLE6.orig/helpers/basic_auth/SMB/Makefile.am squid-3.0.STABLE6/helpers/basic_auth/SMB/Makefile.am
69 ---- squid-3.0.STABLE6.orig/helpers/basic_auth/SMB/Makefile.am 2008-05-20 18:01:11.000000000 +0300
70 -+++ squid-3.0.STABLE6/helpers/basic_auth/SMB/Makefile.am 2008-05-25 23:26:04.000000000 +0300
71 +--- squid-3.0.STABLE6.orig/helpers/basic_auth/SMB/Makefile.am 2008-05-20 17:01:11.000000000 +0200
72 ++++ squid-3.0.STABLE6/helpers/basic_auth/SMB/Makefile.am 2008-06-22 13:20:06.000000000 +0200
73 @@ -14,7 +14,7 @@
74 ## FIXME: autoconf should test for the samba path.
75
76 @@ -35,8 +51,8 @@
77
78 libexec_SCRIPTS = $(SMB_AUTH_HELPER)
79 diff -Nru squid-3.0.STABLE6.orig/helpers/basic_auth/SMB/smb_auth.sh squid-3.0.STABLE6/helpers/basic_auth/SMB/smb_auth.sh
80 ---- squid-3.0.STABLE6.orig/helpers/basic_auth/SMB/smb_auth.sh 2008-05-20 18:01:11.000000000 +0300
81 -+++ squid-3.0.STABLE6/helpers/basic_auth/SMB/smb_auth.sh 2008-05-25 23:26:04.000000000 +0300
82 +--- squid-3.0.STABLE6.orig/helpers/basic_auth/SMB/smb_auth.sh 2008-05-20 17:01:11.000000000 +0200
83 ++++ squid-3.0.STABLE6/helpers/basic_auth/SMB/smb_auth.sh 2008-06-22 13:20:06.000000000 +0200
84 @@ -24,7 +24,7 @@
85 read AUTHSHARE
86 read AUTHFILE
87 @@ -56,8 +72,8 @@
88 [ -n "$dcip" ] || exit 1
89
90 diff -Nru squid-3.0.STABLE6.orig/helpers/external_acl/session/squid_session.8 squid-3.0.STABLE6/helpers/external_acl/session/squid_session.8
91 ---- squid-3.0.STABLE6.orig/helpers/external_acl/session/squid_session.8 2008-05-20 18:01:11.000000000 +0300
92 -+++ squid-3.0.STABLE6/helpers/external_acl/session/squid_session.8 2008-05-25 23:26:04.000000000 +0300
93 +--- squid-3.0.STABLE6.orig/helpers/external_acl/session/squid_session.8 2008-05-20 17:01:11.000000000 +0200
94 ++++ squid-3.0.STABLE6/helpers/external_acl/session/squid_session.8 2008-06-22 13:20:06.000000000 +0200
95 @@ -35,7 +35,7 @@
96 .P
97 Configuration example using the default automatic mode
98 @@ -68,8 +84,8 @@
99 acl session external session
100 .IP
101 diff -Nru squid-3.0.STABLE6.orig/helpers/external_acl/unix_group/squid_unix_group.8 squid-3.0.STABLE6/helpers/external_acl/unix_group/squid_unix_group.8
102 ---- squid-3.0.STABLE6.orig/helpers/external_acl/unix_group/squid_unix_group.8 2008-05-20 18:01:11.000000000 +0300
103 -+++ squid-3.0.STABLE6/helpers/external_acl/unix_group/squid_unix_group.8 2008-05-25 23:26:04.000000000 +0300
104 +--- squid-3.0.STABLE6.orig/helpers/external_acl/unix_group/squid_unix_group.8 2008-05-20 17:01:11.000000000 +0200
105 ++++ squid-3.0.STABLE6/helpers/external_acl/unix_group/squid_unix_group.8 2008-06-22 13:20:06.000000000 +0200
106 @@ -27,7 +27,7 @@
107 This squid.conf example defines two Squid acls. usergroup1 matches users in group1, and usergroup2
108 matches users in group2 or group3
109 @@ -80,8 +96,8 @@
110 acl usergroup1 external unix_group group1
111 .IP
112 diff -Nru squid-3.0.STABLE6.orig/src/cf.data.pre squid-3.0.STABLE6/src/cf.data.pre
113 ---- squid-3.0.STABLE6.orig/src/cf.data.pre 2008-05-20 18:01:14.000000000 +0300
114 -+++ squid-3.0.STABLE6/src/cf.data.pre 2008-05-25 23:26:04.000000000 +0300
115 +--- squid-3.0.STABLE6.orig/src/cf.data.pre 2008-05-20 17:01:14.000000000 +0200
116 ++++ squid-3.0.STABLE6/src/cf.data.pre 2008-06-22 13:20:06.000000000 +0200
117 @@ -638,6 +638,8 @@
118 acl Safe_ports port 488 # gss-http
119 acl Safe_ports port 591 # filemaker
120 @@ -136,8 +152,8 @@
121
122 NAME: cachemgr_passwd
123 diff -Nru squid-3.0.STABLE6.orig/src/debug.cc squid-3.0.STABLE6/src/debug.cc
124 ---- squid-3.0.STABLE6.orig/src/debug.cc 2008-05-20 18:01:15.000000000 +0300
125 -+++ squid-3.0.STABLE6/src/debug.cc 2008-05-25 23:26:04.000000000 +0300
126 +--- squid-3.0.STABLE6.orig/src/debug.cc 2008-05-20 17:01:15.000000000 +0200
127 ++++ squid-3.0.STABLE6/src/debug.cc 2008-06-22 13:20:06.000000000 +0200
128 @@ -465,7 +465,7 @@
129 #if HAVE_SYSLOG && defined(LOG_LOCAL4)
130
131 @@ -148,8 +164,8 @@
132 #endif /* HAVE_SYSLOG */
133
134 diff -Nru squid-3.0.STABLE6.orig/src/defines.h squid-3.0.STABLE6/src/defines.h
135 ---- squid-3.0.STABLE6.orig/src/defines.h 2008-05-20 18:01:15.000000000 +0300
136 -+++ squid-3.0.STABLE6/src/defines.h 2008-05-25 23:26:04.000000000 +0300
137 +--- squid-3.0.STABLE6.orig/src/defines.h 2008-05-20 17:01:15.000000000 +0200
138 ++++ squid-3.0.STABLE6/src/defines.h 2008-06-22 13:20:06.000000000 +0200
139 @@ -219,7 +219,7 @@
140
141 /* were to look for errors if config path fails */
142 @@ -160,8 +176,8 @@
143
144 /* handy to determine the #elements in a static array */
145 diff -Nru squid-3.0.STABLE6.orig/src/main.cc squid-3.0.STABLE6/src/main.cc
146 ---- squid-3.0.STABLE6.orig/src/main.cc 2008-05-20 18:01:15.000000000 +0300
147 -+++ squid-3.0.STABLE6/src/main.cc 2008-05-25 23:26:04.000000000 +0300
148 +--- squid-3.0.STABLE6.orig/src/main.cc 2008-05-20 17:01:15.000000000 +0200
149 ++++ squid-3.0.STABLE6/src/main.cc 2008-06-22 13:20:06.000000000 +0200
150 @@ -1482,7 +1482,7 @@
151 if (*(argv[0]) == '(')
152 return;
153 @@ -190,8 +206,8 @@
154 syslog(LOG_NOTICE, "Squid Parent: child process %d started", pid);
155
156 diff -Nru squid-3.0.STABLE6.orig/src/Makefile.am squid-3.0.STABLE6/src/Makefile.am
157 ---- squid-3.0.STABLE6.orig/src/Makefile.am 2008-05-20 18:01:14.000000000 +0300
158 -+++ squid-3.0.STABLE6/src/Makefile.am 2008-05-25 23:26:04.000000000 +0300
159 +--- squid-3.0.STABLE6.orig/src/Makefile.am 2008-05-20 17:01:14.000000000 +0200
160 ++++ squid-3.0.STABLE6/src/Makefile.am 2008-06-22 13:20:06.000000000 +0200
161 @@ -988,12 +988,12 @@
162 DEFAULT_CONFIG_FILE = $(sysconfdir)/squid.conf
163 DEFAULT_MIME_TABLE = $(sysconfdir)/mime.conf
164
165
166
167 1.1 net-proxy/squid/files/squid-3.0.6-adapted-zph.patch
168
169 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-proxy/squid/files/squid-3.0.6-adapted-zph.patch?rev=1.1&view=markup
170 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-proxy/squid/files/squid-3.0.6-adapted-zph.patch?rev=1.1&content-type=text/plain
171
172 Index: squid-3.0.6-adapted-zph.patch
173 ===================================================================
174 diff -Nru squid-3.0.STABLE6.orig/src/cf.data.pre squid-3.0.STABLE6/src/cf.data.pre
175 --- squid-3.0.STABLE6.orig/src/cf.data.pre 2008-06-21 12:26:11.000000000 +0200
176 +++ squid-3.0.STABLE6/src/cf.data.pre 2008-06-21 12:33:04.000000000 +0200
177 @@ -1111,6 +1111,60 @@
178 making the request.
179 DOC_END
180
181 +NAME: zph_tos_local
182 +TYPE: int
183 +DEFAULT: 0
184 +LOC: Config.zph_tos_local
185 +DOC_START
186 + Allows you to select a TOS/Diffserv value to mark local hits. Read above
187 + (tcp_outgoing_tos) for details/requirements about TOS.
188 + Default: 0 (disabled).
189 +DOC_END
190 +
191 +NAME: zph_tos_peer
192 +TYPE: int
193 +DEFAULT: 0
194 +LOC: Config.zph_tos_peer
195 +DOC_START
196 + Allows you to select a TOS/Diffserv value to mark peer hits. Read above
197 + (tcp_outgoing_tos) for details/requirements about TOS.
198 + Default: 0 (disabled).
199 +DOC_END
200 +
201 +NAME: zph_tos_parent
202 +COMMENT: on|off
203 +TYPE: onoff
204 +LOC: Config.onoff.zph_tos_parent
205 +DEFAULT: on
206 +DOC_START
207 + Set this to off if you want only sibling hits to be marked.
208 + If set to on (default), parent hits are being marked too.
209 +DOC_END
210 +
211 +NAME: zph_preserve_miss_tos
212 +COMMENT: on|off
213 +TYPE: onoff
214 +LOC: Config.onoff.zph_preserve_miss_tos
215 +DEFAULT: on
216 +DOC_START
217 + If set to on (default), any HTTP response towards clients will
218 + have the TOS value of the response comming from the remote
219 + server masked with the value of zph_preserve_miss_tos_mask.
220 + For this to work correctly, you will need to patch your linux
221 + kernel with the TOS preserving ZPH patch.
222 +DOC_END
223 +
224 +NAME: zph_preserve_miss_tos_mask
225 +TYPE: int
226 +DEFAULT: 255
227 +LOC: Config.zph_preserve_miss_tos_mask
228 +DOC_START
229 + Allows you to mask certain bits in the TOS received from the
230 + remote server, before copying the value to the TOS send towards
231 + clients.
232 + Default: 255 (TOS from server is not changed).
233 +DOC_END
234 +
235 NAME: tcp_outgoing_address
236 TYPE: acl_address
237 DEFAULT: none
238 diff -Nru squid-3.0.STABLE6.orig/src/client_side_reply.cc squid-3.0.STABLE6/src/client_side_reply.cc
239 --- squid-3.0.STABLE6.orig/src/client_side_reply.cc 2008-05-20 17:01:14.000000000 +0200
240 +++ squid-3.0.STABLE6/src/client_side_reply.cc 2008-06-22 11:57:14.000000000 +0200
241 @@ -48,6 +48,7 @@
242 #include "ESI.h"
243 #endif
244 #include "MemObject.h"
245 +#include "fde.h"
246 #include "ACLChecklist.h"
247 #include "ACL.h"
248 #if DELAY_POOLS
249 @@ -1548,6 +1549,58 @@
250 /* guarantee nothing has been sent yet! */
251 assert(http->out.size == 0);
252 assert(http->out.offset == 0);
253 +
254 + if (Config.zph_tos_local ||
255 + Config.zph_tos_peer ||
256 + Config.onoff.zph_preserve_miss_tos && Config.zph_preserve_miss_tos_mask)
257 + {
258 + int need_change = 0;
259 + int hit = 0;
260 + int tos = 0;
261 + int tos_old = 0;
262 + int tos_len = sizeof(tos_old);
263 + int res;
264 +
265 + if (Config.zph_tos_local)
266 + {
267 + /* local hit */
268 + hit = 1;
269 + tos = Config.zph_tos_local;
270 + }
271 + else if (Config.zph_tos_peer &&
272 + (http->request->hier.code==SIBLING_HIT ||
273 + Config.onoff.zph_tos_parent&&http->request->hier.code==PARENT_HIT))
274 + {
275 + /* sibling or parent hit */
276 + hit = 1;
277 + tos = Config.zph_tos_peer;
278 + }
279 +
280 + if (http->request->flags.proxy_keepalive)
281 + {
282 + res = getsockopt(http->getConn()->fd, IPPROTO_IP, IP_TOS, &tos_old, (socklen_t*)&tos_len);
283 + if (res < 0)
284 + {
285 + debugs(33, 1, "ZPH: error in getsockopt(IP_TOS) on keepalived FD "<< http->getConn()->fd << " " << xstrerror());
286 + }
287 + else if (hit && tos_old != tos)
288 + {
289 + /* HIT: 1-st request, or previous was MISS,
290 + * or local/parent hit change.
291 + */
292 + need_change = 1;
293 + }
294 + }
295 + else if (hit)
296 + {
297 + /* no keepalive */
298 + need_change = 1;
299 + }
300 + if (need_change) {
301 + comm_set_tos(http->getConn()->fd,tos);
302 + }
303 + }
304 +
305 tempBuffer.offset = reqofs;
306 tempBuffer.length = getNextNode()->readBuffer.length;
307 tempBuffer.data = getNextNode()->readBuffer.data;
308 @@ -1828,6 +1881,14 @@
309
310 char *body_buf = buf;
311
312 + if (reqofs==0 && !logTypeIsATcpHit(http->logType) &&
313 + Config.onoff.zph_preserve_miss_tos &&
314 + Config.zph_preserve_miss_tos_mask)
315 + {
316 + int tos = fd_table[fd].upstreamTOS & Config.zph_preserve_miss_tos_mask;
317 + comm_set_tos(fd,tos);
318 + }
319 +
320 if (buf != result.data) {
321 /* we've got to copy some data */
322 assert(result.length <= next()->readBuffer.length);
323 diff -Nru squid-3.0.STABLE6.orig/src/fde.h squid-3.0.STABLE6/src/fde.h
324 --- squid-3.0.STABLE6.orig/src/fde.h 2008-05-20 17:01:15.000000000 +0200
325 +++ squid-3.0.STABLE6/src/fde.h 2008-06-21 12:33:04.000000000 +0200
326 @@ -106,7 +106,7 @@
327 long handle;
328 } win32;
329 #endif
330 -
331 + unsigned char upstreamTOS; /* see FwdState::dispatch() */
332 };
333
334 #endif /* SQUID_FDE_H */
335 diff -Nru squid-3.0.STABLE6.orig/src/forward.cc squid-3.0.STABLE6/src/forward.cc
336 --- squid-3.0.STABLE6.orig/src/forward.cc 2008-05-20 17:01:15.000000000 +0200
337 +++ squid-3.0.STABLE6/src/forward.cc 2008-06-21 12:33:04.000000000 +0200
338 @@ -964,6 +964,52 @@
339
340 netdbPingSite(request->host);
341
342 + /* Retrieves remote server TOS value, and stores it as part of the
343 + * original client request FD object. It is later used to forward
344 + * remote server's TOS in the response to the client in case of a MISS.
345 + */
346 + fde * clientFde = &fd_table[client_fd];
347 + if (clientFde)
348 + {
349 + int tos = 1;
350 + int tos_len = sizeof(tos);
351 + clientFde->upstreamTOS = 0;
352 + if (setsockopt(server_fd,SOL_IP,IP_RECVTOS,&tos,tos_len)==0)
353 + {
354 + unsigned char buf[512];
355 + int len = 512;
356 + if (getsockopt(server_fd,SOL_IP,IP_PKTOPTIONS,buf,(socklen_t*)&len) == 0)
357 + {
358 + /* Parse the PKTOPTIONS structure to locate the TOS data message
359 + * prepared in the kernel by the ZPH incoming TCP TOS preserving
360 + * patch.
361 + */
362 + unsigned char * p = buf;
363 + while (p-buf < len)
364 + {
365 + struct cmsghdr *o = (struct cmsghdr*)p;
366 + if (o->cmsg_len<=0)
367 + break;
368 +
369 + if (o->cmsg_level == SOL_IP && o->cmsg_type == IP_TOS)
370 + {
371 + clientFde->upstreamTOS = (unsigned char)(*(int*)CMSG_DATA(o));
372 + break;
373 + }
374 + p += CMSG_LEN(o->cmsg_len);
375 + }
376 + }
377 + else
378 + {
379 + debugs(33, 1, "ZPH: error in getsockopt(IP_PKTOPTIONS) on FD "<<server_fd<<" "<<xstrerror());
380 + }
381 + }
382 + else
383 + {
384 + debugs(33, 1, "ZPH: error in setsockopt(IP_RECVTOS) on FD "<<server_fd<<" "<<xstrerror());
385 + }
386 + }
387 +
388 if (servers && (p = servers->_peer)) {
389 p->stats.fetches++;
390 request->peer_login = p->login;
391 diff -Nru squid-3.0.STABLE6.orig/src/structs.h squid-3.0.STABLE6/src/structs.h
392 --- squid-3.0.STABLE6.orig/src/structs.h 2008-05-20 17:01:16.000000000 +0200
393 +++ squid-3.0.STABLE6/src/structs.h 2008-06-21 12:33:04.000000000 +0200
394 @@ -553,6 +553,8 @@
395 int emailErrData;
396 int httpd_suppress_version_string;
397 int global_internal_static;
398 + int zph_tos_parent;
399 + int zph_preserve_miss_tos;
400 int debug_override_X;
401 }
402
403 @@ -720,6 +722,9 @@
404 int sleep_after_fork; /* microseconds */
405 time_t minimum_expiry_time; /* seconds */
406 external_acl *externalAclHelperList;
407 + int zph_tos_local;
408 + int zph_tos_peer;
409 + int zph_preserve_miss_tos_mask;
410 #if USE_SSL
411
412 struct
413
414
415
416 1.1 net-proxy/squid/files/squid-2.7.2-gentoo.patch
417
418 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-proxy/squid/files/squid-2.7.2-gentoo.patch?rev=1.1&view=markup
419 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-proxy/squid/files/squid-2.7.2-gentoo.patch?rev=1.1&content-type=text/plain
420
421 Index: squid-2.7.2-gentoo.patch
422 ===================================================================
423 diff -Nru squid-2.7.STABLE2.orig/configure.in squid-2.7.STABLE2/configure.in
424 --- squid-2.7.STABLE2.orig/configure.in 2008-05-31 23:25:30.000000000 +0200
425 +++ squid-2.7.STABLE2/configure.in 2008-06-22 13:12:38.000000000 +0200
426 @@ -18,9 +18,9 @@
427 PRESET_LDFLAGS="$LDFLAGS"
428
429 dnl Set default LDFLAGS
430 -if test -z "$LDFLAGS"; then
431 - LDFLAGS="-g"
432 -fi
433 +dnl if test -z "$LDFLAGS"; then
434 +dnl LDFLAGS="-g"
435 +dnl fi
436
437 dnl Check for GNU cc
438 AC_PROG_CC
439 diff -Nru squid-2.7.STABLE2.orig/helpers/basic_auth/MSNT/confload.c squid-2.7.STABLE2/helpers/basic_auth/MSNT/confload.c
440 --- squid-2.7.STABLE2.orig/helpers/basic_auth/MSNT/confload.c 2002-06-26 21:09:48.000000000 +0200
441 +++ squid-2.7.STABLE2/helpers/basic_auth/MSNT/confload.c 2008-06-22 13:13:09.000000000 +0200
442 @@ -24,7 +24,7 @@
443
444 /* Path to configuration file */
445 #ifndef SYSCONFDIR
446 -#define SYSCONFDIR "/usr/local/squid/etc"
447 +#define SYSCONFDIR "/etc/squid"
448 #endif
449 #define CONFIGFILE SYSCONFDIR "/msntauth.conf"
450
451 diff -Nru squid-2.7.STABLE2.orig/helpers/basic_auth/MSNT/msntauth.conf.default squid-2.7.STABLE2/helpers/basic_auth/MSNT/msntauth.conf.default
452 --- squid-2.7.STABLE2.orig/helpers/basic_auth/MSNT/msntauth.conf.default 2002-06-26 20:44:28.000000000 +0200
453 +++ squid-2.7.STABLE2/helpers/basic_auth/MSNT/msntauth.conf.default 2008-06-22 13:13:09.000000000 +0200
454 @@ -8,6 +8,6 @@
455 server other_PDC other_BDC otherdomain
456
457 # Denied and allowed users. Comment these if not needed.
458 -#denyusers /usr/local/squid/etc/msntauth.denyusers
459 -#allowusers /usr/local/squid/etc/msntauth.allowusers
460 +#denyusers /etc/squid/msntauth.denyusers
461 +#allowusers /etc/squid/msntauth.allowusers
462
463 diff -Nru squid-2.7.STABLE2.orig/helpers/basic_auth/SMB/Makefile.am squid-2.7.STABLE2/helpers/basic_auth/SMB/Makefile.am
464 --- squid-2.7.STABLE2.orig/helpers/basic_auth/SMB/Makefile.am 2005-05-17 18:56:26.000000000 +0200
465 +++ squid-2.7.STABLE2/helpers/basic_auth/SMB/Makefile.am 2008-06-22 13:13:09.000000000 +0200
466 @@ -14,7 +14,7 @@
467 ## FIXME: autoconf should test for the samba path.
468
469 SMB_AUTH_HELPER = smb_auth.sh
470 -SAMBAPREFIX=/usr/local/samba
471 +SAMBAPREFIX=/usr
472 SMB_AUTH_HELPER_PATH = $(libexecdir)/$(SMB_AUTH_HELPER)
473
474 libexec_SCRIPTS = $(SMB_AUTH_HELPER)
475 diff -Nru squid-2.7.STABLE2.orig/helpers/basic_auth/SMB/smb_auth.sh squid-2.7.STABLE2/helpers/basic_auth/SMB/smb_auth.sh
476 --- squid-2.7.STABLE2.orig/helpers/basic_auth/SMB/smb_auth.sh 2001-01-08 00:36:46.000000000 +0100
477 +++ squid-2.7.STABLE2/helpers/basic_auth/SMB/smb_auth.sh 2008-06-22 13:13:09.000000000 +0200
478 @@ -24,7 +24,7 @@
479 read AUTHSHARE
480 read AUTHFILE
481 read SMBUSER
482 -read SMBPASS
483 +read -r SMBPASS
484
485 # Find domain controller
486 echo "Domain name: $DOMAINNAME"
487 @@ -47,7 +47,7 @@
488 addropt=""
489 fi
490 echo "Query address options: $addropt"
491 -dcip=`$SAMBAPREFIX/bin/nmblookup $addropt "$PASSTHROUGH#1c" | awk '/^[0-9.]+ / { print $1 ; exit }'`
492 +dcip=`$SAMBAPREFIX/bin/nmblookup $addropt "$PASSTHROUGH#1c" | awk '/^[0-9.]+\..+ / { print $1 ; exit }'`
493 echo "Domain controller IP address: $dcip"
494 [ -n "$dcip" ] || exit 1
495
496 diff -Nru squid-2.7.STABLE2.orig/helpers/external_acl/session/squid_session.8 squid-2.7.STABLE2/helpers/external_acl/session/squid_session.8
497 --- squid-2.7.STABLE2.orig/helpers/external_acl/session/squid_session.8 2007-01-06 18:28:35.000000000 +0100
498 +++ squid-2.7.STABLE2/helpers/external_acl/session/squid_session.8 2008-06-22 13:13:09.000000000 +0200
499 @@ -35,7 +35,7 @@
500 .P
501 Configuration example using the default automatic mode
502 .IP
503 -external_acl_type session ttl=300 negative_ttl=0 children=1 concurrency=200 %LOGIN /usr/local/squid/libexec/squid_session
504 +external_acl_type session ttl=300 negative_ttl=0 children=1 concurrency=200 %LOGIN /usr/libexec/squid/squid_session
505 .IP
506 acl session external session
507 .IP
508 diff -Nru squid-2.7.STABLE2.orig/helpers/external_acl/unix_group/squid_unix_group.8 squid-2.7.STABLE2/helpers/external_acl/unix_group/squid_unix_group.8
509 --- squid-2.7.STABLE2.orig/helpers/external_acl/unix_group/squid_unix_group.8 2006-05-14 17:07:24.000000000 +0200
510 +++ squid-2.7.STABLE2/helpers/external_acl/unix_group/squid_unix_group.8 2008-06-22 13:13:09.000000000 +0200
511 @@ -27,7 +27,7 @@
512 This squid.conf example defines two Squid acls. usergroup1 matches users in group1, and usergroup2
513 matches users in group2 or group3
514 .IP
515 -external_acl_type unix_group %LOGIN /usr/local/squid/libexec/squid_unix_group -p
516 +external_acl_type unix_group %LOGIN /usr/libexec/squid/squid_unix_group -p
517 .IP
518 acl usergroup1 external unix_group group1
519 .IP
520 diff -Nru squid-2.7.STABLE2.orig/src/access_log.c squid-2.7.STABLE2/src/access_log.c
521 --- squid-2.7.STABLE2.orig/src/access_log.c 2008-03-18 03:48:43.000000000 +0100
522 +++ squid-2.7.STABLE2/src/access_log.c 2008-06-22 13:13:09.000000000 +0200
523 @@ -1261,7 +1261,7 @@
524 LogfileStatus = LOG_ENABLE;
525 }
526 #if HEADERS_LOG
527 - headerslog = logfileOpen("/usr/local/squid/logs/headers.log", MAX_URL << 1, 0);
528 + headerslog = logfileOpen("/var/log/squid/headers.log", MAX_URL << 1, 0);
529 assert(NULL != headerslog);
530 #endif
531 #if FORW_VIA_DB
532 diff -Nru squid-2.7.STABLE2.orig/src/cf.data.pre squid-2.7.STABLE2/src/cf.data.pre
533 --- squid-2.7.STABLE2.orig/src/cf.data.pre 2008-05-31 22:49:45.000000000 +0200
534 +++ squid-2.7.STABLE2/src/cf.data.pre 2008-06-22 13:13:09.000000000 +0200
535 @@ -674,6 +674,8 @@
536 acl Safe_ports port 488 # gss-http
537 acl Safe_ports port 591 # filemaker
538 acl Safe_ports port 777 # multiling http
539 +acl Safe_ports port 901 # SWAT
540 +acl purge method PURGE
541 acl CONNECT method CONNECT
542 NOCOMMENT_END
543 DOC_END
544 @@ -707,6 +709,9 @@
545 # Only allow cachemgr access from localhost
546 http_access allow manager localhost
547 http_access deny manager
548 +# Only allow purge requests from localhost
549 +http_access allow purge localhost
550 +http_access deny purge
551 # Deny requests to unknown ports
552 http_access deny !Safe_ports
553 # Deny CONNECT to other than SSL ports
554 @@ -724,6 +729,9 @@
555 # from where browsing should be allowed
556 http_access allow localnet
557
558 +# Allow the localhost to have access by default
559 +http_access allow localhost
560 +
561 # And finally deny all other access to this proxy
562 http_access deny all
563 NOCOMMENT_END
564 @@ -3716,11 +3724,11 @@
565
566 NAME: cache_mgr
567 TYPE: string
568 -DEFAULT: webmaster
569 +DEFAULT: root
570 LOC: Config.adminEmail
571 DOC_START
572 Email-address of local cache manager who will receive
573 - mail if the cache dies. The default is "webmaster".
574 + mail if the cache dies. The default is "root".
575 DOC_END
576
577 NAME: mail_from
578 @@ -3749,12 +3757,12 @@
579
580 NAME: cache_effective_user
581 TYPE: string
582 -DEFAULT: nobody
583 +DEFAULT: squid
584 LOC: Config.effectiveUser
585 DOC_START
586 If you start Squid as root, it will change its effective/real
587 UID/GID to the user specified below. The default is to change
588 - to UID to nobody. If you define cache_effective_user, but not
589 + to UID to squid. If you define cache_effective_user, but not
590 cache_effective_group, Squid sets the GID to the effective
591 user's default group ID (taken from the password file) and
592 supplementary group list from the from groups membership of
593 @@ -4391,12 +4399,12 @@
594 NAME: snmp_port
595 TYPE: ushort
596 LOC: Config.Port.snmp
597 -DEFAULT: 3401
598 +DEFAULT: 0
599 IFDEF: SQUID_SNMP
600 DOC_START
601 Squid can now serve statistics and status information via SNMP.
602 - By default it listens to port 3401 on the machine. If you don't
603 - wish to use SNMP, set this to "0".
604 + By default snmp_port is disabled. If you wish to use SNMP,
605 + set this to "3401" (or any other number you like).
606 DOC_END
607
608 NAME: snmp_access
609 @@ -4467,12 +4475,12 @@
610 NAME: htcp_port
611 IFDEF: USE_HTCP
612 TYPE: ushort
613 -DEFAULT: 4827
614 +DEFAULT: 0
615 LOC: Config.Port.htcp
616 DOC_START
617 The port number where Squid sends and receives HTCP queries to
618 - and from neighbor caches. Default is 4827. To disable use
619 - "0".
620 + and from neighbor caches. To turn it on you want to set it to
621 + 4827. By default it is set to "0" (disabled).
622 DOC_END
623
624 NAME: log_icp_queries
625 @@ -5369,6 +5377,9 @@
626 If you disable this, it will appear as
627
628 X-Forwarded-For: unknown
629 +NOCOMMENT_START
630 +forwarded_for off
631 +NOCOMMENT_END
632 DOC_END
633
634 NAME: cachemgr_passwd
635 diff -Nru squid-2.7.STABLE2.orig/src/client_side.c squid-2.7.STABLE2/src/client_side.c
636 --- squid-2.7.STABLE2.orig/src/client_side.c 2008-05-27 14:49:39.000000000 +0200
637 +++ squid-2.7.STABLE2/src/client_side.c 2008-06-22 13:13:09.000000000 +0200
638 @@ -4661,14 +4661,7 @@
639 debug(83, 2) ("clientNegotiateSSL: Session %p reused on FD %d (%s:%d)\n", SSL_get_session(ssl), fd, fd_table[fd].ipaddr, (int) fd_table[fd].remote_port);
640 } else {
641 if (do_debug(83, 4)) {
642 - /* Write out the SSL session details.. actually the call below, but
643 - * OpenSSL headers do strange typecasts confusing GCC.. */
644 - /* PEM_write_SSL_SESSION(debug_log, SSL_get_session(ssl)); */
645 -#if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x00908000L
646 - PEM_ASN1_write((i2d_of_void *) i2d_SSL_SESSION, PEM_STRING_SSL_SESSION, debug_log, (char *) SSL_get_session(ssl), NULL, NULL, 0, NULL, NULL);
647 -#else
648 PEM_ASN1_write(i2d_SSL_SESSION, PEM_STRING_SSL_SESSION, debug_log, (char *) SSL_get_session(ssl), NULL, NULL, 0, NULL, NULL);
649 -#endif
650 /* Note: This does not automatically fflush the log file.. */
651 }
652 debug(83, 2) ("clientNegotiateSSL: New session %p on FD %d (%s:%d)\n", SSL_get_session(ssl), fd, fd_table[fd].ipaddr, (int) fd_table[fd].remote_port);
653 diff -Nru squid-2.7.STABLE2.orig/src/defines.h squid-2.7.STABLE2/src/defines.h
654 --- squid-2.7.STABLE2.orig/src/defines.h 2007-09-24 15:31:19.000000000 +0200
655 +++ squid-2.7.STABLE2/src/defines.h 2008-06-22 13:13:09.000000000 +0200
656 @@ -259,7 +259,7 @@
657
658 /* were to look for errors if config path fails */
659 #ifndef DEFAULT_SQUID_ERROR_DIR
660 -#define DEFAULT_SQUID_ERROR_DIR "/usr/local/squid/etc/errors"
661 +#define DEFAULT_SQUID_ERROR_DIR "/usr/share/squid/errors/English"
662 #endif
663
664 /* gb_type operations */
665 diff -Nru squid-2.7.STABLE2.orig/src/main.c squid-2.7.STABLE2/src/main.c
666 --- squid-2.7.STABLE2.orig/src/main.c 2008-05-27 01:14:30.000000000 +0200
667 +++ squid-2.7.STABLE2/src/main.c 2008-06-22 13:13:09.000000000 +0200
668 @@ -376,6 +376,22 @@
669 asnFreeMemory();
670 }
671
672 +#if USE_UNLINKD
673 +static int
674 +needUnlinkd(void)
675 +{
676 + int i;
677 + int r = 0;
678 + for (i = 0; i < Config.cacheSwap.n_configured; i++) {
679 + if (strcmp(Config.cacheSwap.swapDirs[i].type, "ufs") == 0 ||
680 + strcmp(Config.cacheSwap.swapDirs[i].type, "aufs") == 0 ||
681 + strcmp(Config.cacheSwap.swapDirs[i].type, "diskd") == 0)
682 + r++;
683 + }
684 + return r;
685 +}
686 +#endif
687 +
688 static void
689 mainReconfigure(void)
690 {
691 @@ -613,7 +629,7 @@
692
693 if (!configured_once) {
694 #if USE_UNLINKD
695 - unlinkdInit();
696 + if (needUnlinkd()) unlinkdInit();
697 #endif
698 urlInitialize();
699 cachemgrInit();
700 @@ -636,6 +652,9 @@
701 #if USE_WCCPv2
702 wccp2Init();
703 #endif
704 +#if USE_UNLINKD
705 + if (needUnlinkd()) unlinkdInit();
706 +#endif
707 serverConnectionsOpen();
708 neighbors_init();
709 if (Config.chroot_dir)
710 diff -Nru squid-2.7.STABLE2.orig/src/Makefile.am squid-2.7.STABLE2/src/Makefile.am
711 --- squid-2.7.STABLE2.orig/src/Makefile.am 2008-01-02 16:50:39.000000000 +0100
712 +++ squid-2.7.STABLE2/src/Makefile.am 2008-06-22 13:13:51.000000000 +0200
713 @@ -340,13 +340,13 @@
714 DEFAULT_CONFIG_FILE = $(sysconfdir)/squid.conf
715 DEFAULT_MIME_TABLE = $(sysconfdir)/mime.conf
716 DEFAULT_DNSSERVER = $(libexecdir)/`echo dnsserver | sed '$(transform);s/$$/$(EXEEXT)/'`
717 -DEFAULT_LOG_PREFIX = $(localstatedir)/logs
718 +DEFAULT_LOG_PREFIX = $(localstatedir)/log/squid
719 DEFAULT_CACHE_LOG = $(DEFAULT_LOG_PREFIX)/cache.log
720 DEFAULT_ACCESS_LOG = $(DEFAULT_LOG_PREFIX)/access.log
721 DEFAULT_STORE_LOG = $(DEFAULT_LOG_PREFIX)/store.log
722 -DEFAULT_PID_FILE = $(DEFAULT_LOG_PREFIX)/squid.pid
723 +DEFAULT_PID_FILE = $(localstatedir)/run/squid.pid
724 DEFAULT_NETDB_FILE = $(DEFAULT_LOG_PREFIX)/netdb.state
725 -DEFAULT_SWAP_DIR = $(localstatedir)/cache
726 +DEFAULT_SWAP_DIR = $(localstatedir)/cache/squid
727 DEFAULT_PINGER = $(libexecdir)/`echo pinger | sed '$(transform);s/$$/$(EXEEXT)/'`
728 DEFAULT_UNLINKD = $(libexecdir)/`echo unlinkd | sed '$(transform);s/$$/$(EXEEXT)/'`
729 DEFAULT_DISKD = $(libexecdir)/`echo diskd-daemon | sed '$(transform);s/$$/$(EXEEXT)/'`
730
731
732
733 --
734 gentoo-commits@l.g.o mailing list