]> git.pld-linux.org Git - packages/squid.git/blob - squid.spec
- patch13 to address CAN-2005-0241
[packages/squid.git] / squid.spec
1 #
2 # Conditional build:
3 %bcond_with     combined_log    # enables apache-like combined log format
4 #
5 Summary:        SQUID Internet Object Cache
6 Summary(es):    proxy/cache para WWW/FTP/gopher
7 Summary(pl):    Uniwersalny serwer proxy-cache
8 Summary(pt_BR): Cache Squid de objetos Internet
9 Summary(ru):    Squid - ËÜÛ ÏÂßÅËÔÏ× Internet
10 Summary(uk):    Squid - ËÅÛ ÏÂ'¤ËԦנInternet
11 Summary(zh_CN): SQUID ¸ßËÙ»º³å´úÀí·þÎñÆ÷
12 Name:           squid
13 Version:        2.5.STABLE7
14 Release:        12
15 Epoch:          7
16 License:        GPL v2
17 Group:          Networking/Daemons
18 Source0:        http://www.squid-cache.org/Versions/v2/2.5/%{name}-%{version}.tar.bz2
19 # Source0-md5:  bf63e34906c68d716896eec0351108dc
20 # http://www.squid-cache.org/Doc/FAQ/FAQ.tar.gz
21 Source1:        %{name}-FAQ.tar.gz
22 # Source1-md5:  cb9a955f8cda9cc166e086fccd412a43
23 Source2:        %{name}.init
24 Source3:        %{name}.sysconfig
25 # http://squid-docs.sourceforge.net/latest/zip-files/book-full-html.zip
26 Source4:        %{name}-book-full-html.zip
27 # Source4-md5:  4f3b6dab1de9cbb847df89d8b417378a
28 Source5:        %{name}.conf.patch
29 Source6:        %{name}.logrotate
30 Source7:        %{name}.pamd
31 # Bug fixes from Squid home page:
32 Patch0:         http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE7-half_closed_POST.patch
33 Patch1:         http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE7_req_resp_header.patch
34 Patch2:         http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE7-non_blocking_disk.patch
35 Patch3:         http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE7-blank_response.patch
36 Patch4:         http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE7-cachemgr_vmobjects.patch
37 Patch5:         http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE7-dothost.patch
38 Patch6:         http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE7-empty_acls.patch
39 Patch7:         http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE7-header_parsing.patch
40 Patch8:         http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE7-gopher_html_parsing.patch
41 Patch9:         http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE7-wccp_denial_of_service.patch
42 Patch10:        http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE7-ldap_spaces.patch
43 Patch11:        http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE7-response_splitting.patch
44 Patch12:        http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE7-wccp_buffer_overflow.patch
45 Patch13:        http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE7-oversize_reply_headers.patch
46 # Other patches:
47 Patch100:       http://www.sed.pl/~mrk/qos/%{name}_hit_miss_mark.patch
48 Patch101:       %{name}-fhs.patch
49 Patch102:       %{name}-location.patch
50 Patch103:       %{name}-domainmatch.patch
51 Patch104:       %{name}-libnsl_fixes.patch
52 Patch105:       %{name}-ac_fix.patch
53 Patch106:       %{name}-crash-on-ENOSPC.patch
54 Patch107:       %{name}-newssl.patch
55 Patch108:       %{name}-nolibs.patch
56 Patch109:       http://piorun.ds.pg.gda.pl/~blues/patches/%{name}-more_FD-new.patch
57 Patch110:       %{name}-empty-referer.patch
58 Patch111:       %{name}-2.5.STABLE4-apache-like-combined-log.patch
59 URL:            http://www.squid-cache.org/
60 BuildRequires:  autoconf
61 BuildRequires:  automake
62 BuildRequires:  cyrus-sasl-devel >= 2.1.0
63 BuildRequires:  openldap-devel
64 BuildRequires:  openssl-devel >= 0.9.7d
65 BuildRequires:  pam-devel
66 BuildRequires:  perl-base
67 BuildRequires:  rpmbuild(macros) >= 1.166
68 BuildRequires:  unzip
69 PreReq:         rc-scripts >= 0.2.0
70 PreReq:         setup >= 2.4.6
71 Requires(pre):  /bin/id
72 Requires(pre):  /usr/bin/getgid
73 Requires(pre):  /usr/lib/rpm/user_group.sh
74 Requires(pre):  /usr/sbin/groupadd
75 Requires(pre):  /usr/sbin/useradd
76 Requires(post,preun):   /sbin/chkconfig
77 Requires(post): fileutils
78 Requires(post): findutils
79 Requires(post): grep
80 Requires(post): /bin/hostname
81 Requires(postun):       /usr/sbin/groupdel
82 Requires(postun):       /usr/sbin/userdel
83 Provides:       group(squid)
84 Provides:       user(squid)
85 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
86
87 %define         _libexecdir     %{_libdir}/%{name}
88 %define         _sysconfdir     /etc/%{name}
89 %define         _cgidir         /home/services/httpd/cgi-bin
90
91 %description
92 Squid is a high-performance proxy caching server for web clients,
93 supporting FTP, gopher, and HTTP data objects. Unlike traditional
94 caching software, Squid handles all requests in a single,
95 non-blocking, I/O-driven process. Squid keeps meta data and especially
96 hot objects cached in RAM, caches DNS lookups, supports non-blocking
97 DNS lookups, and implements negative caching of failed requests. If
98 you are tight on memory, check out the NOVM version of this package.
99 Squid supports SSL, extensive access controls, and full request
100 logging. By using the lightweight Internet Cache Protocol, Squid
101 caches can be arranged in a hierarchy or mesh for additional bandwidth
102 savings. Squid consists of a main server program squid, a Domain Name
103 System lookup program dnsserver, a program for retrieving FTP data
104 ftpget, and some management and client tools. When squid starts up, it
105 spawns a configurable number of dnsserver processes, each of which can
106 perform a single, blocking Domain Name System (DNS) lookup. This
107 reduces the amount of time the cache waits for DNS lookups. Squid is
108 derived from the ARPA-funded Harvest project.
109
110 %description -l es
111 Squid es un servidor proxy con caché de alto desempeño para clientes
112 web, soportando FTP, gopher y HTTP. Diferentemente de softwares
113 tradicionales de caché squid manipula todas las requisiciones en un
114 único proceso sin bloqueos, direccionado a E/S. Mantienen metadatos y
115 objetos frecuentemente pedidos en uno caché en memoria RAM. Hace caché
116 de resoluciones DNS, soporta resoluciones DNS sin bloqueo y implementa
117 un caché negativo de requisiciones que fallen. Si tiene poca memoria
118 da un vistazo en la versión NOVM de este paquete. También soporta SSL,
119 controles extensivos de acceso y registro (log) completo de las
120 requisiciones. Usando el ligero Protocolo de Caches Internet (ICP)
121 puede ser usado en una jerarquía de servidores para mayor ahorro de la
122 banda de comunicación. Está compuesto del programa squid (servidor
123 principal), del programa dnsserver (para resolución DNS), del programa
124 ftpget (para transmisiones ftp) y otras herramientas clientes y para
125 administración. Cuando squid se inicia, dispara un número configurable
126 de procesos dnsserver, cada uno pudiendo ejecutar solamente una
127 resolución DNS con poder de bloquear. Esto reduce el tiempo que el
128 caché espera por resoluciones DNS. Fue derivado del proyecto Harvest,
129 financiado por la ARPA.
130
131 %description -l pl
132 Squid jest wysoce wydajnym serwerem proxy-cache dla przegl±darek WWW,
133 klientów FTP i gopher. Squid przechowuje najczê¶ciej pobierane dane w
134 pamiêci RAM i zapamiêtuje odwo³ania do DNS. Squid oferuje wsparcie dla
135 SSL, rozbudowan± kontrolê dostêpu oraz pe³ne rejestrowanie pobieranych
136 danych. Dziêki u¿yciu protoko³u ICP (Internet Cache Protocol), serwer
137 squid mo¿na ³±czyæ w hierarchiê, zwiêkszaj±c ich efektywno¶æ. Pakiet
138 squid obejmuje: g³ówny program serwera squid, program dostarczaj±cy
139 informacji z DNS dnsserver, program odbieraj±cy dane FTP ftpget, oraz
140 pomocnicze programy do zarz±dzania. Squid wywodzi siê ze
141 sponsorowanego przez ARPA projektu Harvest.
142
143 %description -l pt_BR
144 O Squid é um servidor proxy com cache de alta performance para
145 clientes web, suportando FTP, gopher e HTTP. Diferentemente de
146 softwares tradicionais de cache o squid manipula todas as requisições
147 em um único processo sem bloqueios, direcionado a E/S.
148
149 Mantém meta dados e objetos freqüentemente pedidos num cache em
150 memória RAM. Faz cache de resoluções DNS, suporta resoluções DNS sem
151 bloqueio e implementa um cache negativo de requisições que falharem.
152 Se você tem pouca memória dê uma olhada na versão NOVM deste pacote.
153
154 Também suporta SSL, controles extensivos de acesso e registro (log)
155 completo das requisições. Usando o leve Protocolo de Caches Internet
156 (ICP) ele pode ser usado em uma hierarquia de servidores para maior
157 economia de banda de comunicação.
158
159 Ele consiste do programa squid (servidor principal), do programa
160 dnsserver (para resolução DNS), do programa ftpget (para transmissões
161 ftp) e outras ferramentas clientes e para gerenciamento. Quando o
162 squid é inicializado ele dispara um número configurável de processos
163 dnsserver, cada um podendo executar somente uma resolução DNS
164 bloqueante. Isto reduz o tempo que o cache espera por resoluções DNS.
165
166 Foi derivado do projeto Harvest, financiado pela ARPA.
167
168 %description -l ru
169 Squid - ÜÔÏ ×ÙÓÏËÏÐÒÏÉÚ×ÏÄÉÔÅÌØÎÙÊ ËÜÛÉÒÕÀÝÉÊ ÐÒÏËÓÉ-ÓÅÒ×ÅÒ ÄÌÑ
170 ËÌÉÅÎÔÏ× web, ÐÏÄÄÅÒÖÉ×ÁÀÝÉÊ ÏÂßÅËÔÙ ÄÁÎÎÙÈ ÔÉÐÁ FTP, gopher É HTTP. ÷
171 ÏÔÌÉÞÉÅ ÏÔ ÔÒÁÄÉÃÉÏÎÎÙÈ ËÜÛÉÒÕÀÝÉÈ ÐÒÏÇÒÁÍÍ, Squid ÏÂÒÁÂÁÔÙ×ÁÅÔ ×ÓÅ
172 ÚÁÐÒÏÓÙ ÐÒÉ ÐÏÍÏÝÉ ÏÄÎÏÇÏ ÎÅÂÌÏËÉÒÕÀÝÅÇÏÓÑ, ÕÐÒÁ×ÌÑÅÍÏÇÏ
173 ××ÏÄÏÍ-×Ù×ÏÄÏÍ ÐÒÏÃÅÓÓÁ.
174
175 üÔÏÔ ÐÁËÅÔ ÉÍÅÅÔ ×ÓÔÒÏÅÎÎÕÀ ÐÏÄÄÅÒÖËÕ ÂÁÚÙ ÄÁÎÎÙÈ ÓÅÔÅ×ÙÈ ICMP-ÐÒÏÂ
176 (Netdb).
177
178 %description -l uk
179 Squid - ÃÅ ËÅÛÕÀÞÉÊ ÐÒÏËÓ¦-ÓÅÒ×ÅÒ ÄÌÑ web-Ë̦¤ÎÔ¦×, ÝϠЦÄÔÒÉÍÕ¤
180 ÏÂ'¤ËÔÉ ÄÁÎÉÈ ÔÉÐÕ FTP, gopher ÔÁ HTTP. îÁ ×¦ÄͦÎՠצĠÔÒÁÄÉæÊÎÉÈ
181 ËÅÛÕÀÞÉÈ ÐÒÏÇÒÁÍ, Squid ÏÂÒÏÂÌѤ ×Ó¦ ÚÁÐÉÔÉ ÚÁ ÄÏÐÏÍÏÇÏÀ ÏÄÎÏÇÏ
182 ÎÅÂÌÏËÕÀÞÏÇÏ, ËÅÒÏ×ÁÎÏÇÏ ××ÏÄÏÍ-×É×ÏÄÏÍ ÐÒÏÃÅÓÕ.
183
184 ãÅÊ ÐÁËÅÔ ÍÁ¤ ×ÂÕÄÏ×ÁÎՠЦÄÔÒÉÍËÕ ÂÁÚÉ ÄÁÎÉÈ ÍÅÒÅÖÅ×ÉÈ ICMP-ÐÒÏÂ
185 (Netdb).
186
187 %package cachemgr
188 Summary:        CGI script for Squid management
189 Summary(pl):    Skrypt CGI do zarz±dzania Squidem przez WWW
190 Group:          Networking/Admin
191 Requires:       %{name} = %{epoch}:%{version}-%{release}
192 Requires:       httpd
193
194 %description cachemgr
195 Cachemgr.cgi is a CGI script that allows administrator to chceck
196 various informations about Squid via WWW.
197
198 %description cachemgr -l pl
199 Cachemgr.cgi jest skryptem CGI, który pozwala administratorowi
200 zapoznaæ siê z informacjami o pracy Squida poprzez WWW.
201
202 %package ldap_auth
203 Summary:        LDAP authentication helper for Squid
204 Summary(pl):    Obs³uga uwierzytelniania LDAP dla squida
205 Group:          Networking/Admin
206 Requires:       %{name} = %{epoch}:%{version}-%{release}
207
208 %description ldap_auth
209 This Squid helper allows authentication against LDAP directories using
210 the "simple authentication" (plain-text).
211
212 %description ldap_auth -l pl
213 Pakiet ten pozwala na uwierzytelnianie przez LDAP za pomoc± prostego
214 uwierzytelniania (otwartym tekstem).
215
216 %package pam_auth
217 Summary:        PAM authentication helper for Squid
218 Summary(pl):    Obs³uga uwierzytelniania PAM dla squida
219 Group:          Networking/Admin
220 Requires:       %{name} = %{epoch}:%{version}-%{release}
221 Requires:       pam >= 0.77.3
222
223 %description pam_auth
224 This program authenticates users against a PAM configured
225 authentication service "squid". This allows you to authenticate Squid
226 users to any authentication source for which you have a PAM module.
227
228 %description pam_auth -l pl
229 Program ten pozwala na uwierzytelnianie u¿ytkowników squida w dowolnym
230 ¼ródle posiadaj±cym modu³ PAM.
231
232 %package smb_auth
233 Summary:        SMB authentication helper for Squid
234 Summary(pl):    Obs³uga uwierzytelniania SMB dla squida
235 Group:          Networking/Admin
236 Requires:       %{name} = %{epoch}:%{version}-%{release}
237
238 %description smb_auth
239 This is a proxy authentication module. With smb_auth you can
240 authenticate proxy users against an SMB server like Windows NT or
241 Samba.
242
243 %description smb_auth -l pl
244 To jest modu³ uwierzytelniania proxy. Przy pomocy smb_auth mo¿na
245 uwierzytelniaæ u¿ytkowników proxy na serwerach SMB, jak Windows NT czy
246 Samba.
247
248 %package msnt_auth
249 Summary:        MSNT domain authentication helper for Squid
250 Summary(pl):    Obs³uga uwierzytelniania w domenie MSNT dla squida
251 Group:          Networking/Admin
252 Requires:       %{name} = %{epoch}:%{version}-%{release}
253
254 %description msnt_auth
255 This is an authentication module for the Squid proxy server to
256 authenticate users on an NT domain.
257
258 %description msnt_auth -l pl
259 Jest to modu³ uwierzytelniania proxy, który pozwala na
260 uwierzytelnianie u¿ytkowników proxy w domenie NT.
261
262 %package yp_auth
263 Summary:        YP authentication helper for Squid
264 Summary(pl):    Obs³uga uwierzytelniania YP dla squida
265 Group:          Networking/Admin
266 Requires:       %{name} = %{epoch}:%{version}-%{release}
267
268 %description yp_auth
269 This is an authentication module for the Squid proxy server to
270 authenticate users on YP.
271
272 %description yp_auth -l pl
273 Jest to modu³ uwierzytelniania proxy, który pozwala na
274 uwierzytelnianie u¿ytkowników proxy poprzez YP.
275
276 %package ncsa_auth
277 Summary:        NCSA httpd style authentication helper for Squid
278 Summary(pl):    Obs³uga uwierzytelniania NCSA httpd dla squida
279 Group:          Networking/Admin
280 Requires:       %{name} = %{epoch}:%{version}-%{release}
281
282 %description ncsa_auth
283 This module uses a NCSA httpd style password file for authentication.
284
285 %description ncsa_auth -l pl
286 Modu³ uwierzytelniania proxy u¿ywaj±cy pliku hase³ jak w NCSA httpd.
287
288 %package sasl_auth
289 Summary:        SASL authentication helper for Squid
290 Summary(pl):    Obs³uga uwierzytelniania SASL dla squida
291 Group:          Networking/Admin
292 Requires:       %{name} = %{epoch}:%{version}-%{release}
293
294 %description sasl_auth
295 This is an authentication module for the Squid proxy server to
296 authenticate users via SASL.
297
298 %description sasl_auth -l pl
299 Jest to modu³ uwierzytelniania proxy, który pozwala na
300 uwierzytelnianie u¿ytkowników proxy poprzez SASL.
301
302 %package winbind_auth
303 Summary:        WINBIND authentication helper for Squid
304 Summary(pl):    Obs³uga uwierzytelniania WINBIND dla squida
305 Group:          Networking/Admin
306 Requires:       %{name} = %{epoch}:%{version}-%{release}
307
308 %description winbind_auth
309 This is an authentication module for the Squid proxy server to
310 authenticate users via WINBIND.
311
312 %description winbind_auth -l pl
313 Jest to modu³ uwierzytelniania proxy, który pozwala na
314 uwierzytelnianie u¿ytkowników proxy poprzez WINBIND.
315
316 %package getpwname_auth
317 Summary:        getpwname authentication helper for Squid
318 Summary(pl):    Obs³uga uwierzytelniania getpwname dla squida
319 Group:          Networking/Admin
320 Requires:       %{name} = %{epoch}:%{version}-%{release}
321
322 %description getpwname_auth
323 This is an authentication module for the Squid proxy server to
324 authenticate users using getpwname.
325
326 %description getpwname_auth -l pl
327 Jest to modu³ uwierzytelniania proxy, który pozwala na
328 uwierzytelnianie u¿ytkowników proxy poprzez getpwname.
329
330 %package passwd_auth
331 Summary:        passwd authentication helper for Squid
332 Summary(pl):    Obs³uga uwierzytelniania passwd dla squida
333 Group:          Networking/Admin
334 Requires:       %{name} = %{epoch}:%{version}-%{release}
335
336 %description passwd_auth
337 This is an authentication module for the Squid proxy server to
338 authenticate users with separate passwd file.
339
340 %description passwd_auth -l pl
341 Jest to modu³ uwierzytelniania proxy, który pozwala na
342 uwierzytelnianie u¿ytkowników proxy poprzez oddzielny plik passwd.
343
344 %package ntlm_auth
345 Summary:        NTLM authentication helper for Squid
346 Summary(pl):    Obs³uga uwierzytelniania NTLM dla squida
347 Group:          Networking/Admin
348 Requires:       %{name} = %{epoch}:%{version}-%{release}
349
350 %description ntlm_auth
351 This is an authentication module for the Squid proxy server to
352 authenticate users on NTLM.
353
354 %description ntlm_auth -l pl
355 Jest to modu³ uwierzytelniania proxy, który pozwala na
356 uwierzytelnianie u¿ytkowników proxy poprzez NTLM.
357
358 %package ip_acl
359 Summary:        IP external ACL helper for Squid
360 Summary(pl):    Wsparcie kontroli dostêpu przez IP dla squida
361 Group:          Networking/Admin
362 Requires:       %{name} = %{epoch}:%{version}-%{release}
363
364 %description ip_acl
365 This is an external ACL module for the Squid proxy server to limit
366 access for users based on IP address.
367
368 %description ip_acl -l pl
369 Jest to modu³ kontroli dostêpu (ACL) do proxy, który pozwala na
370 ograniczenie dostêpu u¿ytkowników proxy na podstawie ich adresu IP.
371
372 %package ldap_acl
373 Summary:        LDAP group external ACL helper for Squid
374 Summary(pl):    Wsparcie kontroli dostêpu przez grupy LDAP dla squida
375 Group:          Networking/Admin
376 Requires:       %{name} = %{epoch}:%{version}-%{release}
377
378 %description ldap_acl
379 This is an external ACL module for the Squid proxy server to limit
380 access for users based on LDAP group membership.
381
382 %description ldap_acl -l pl
383 Jest to modu³ kontroli dostêpu (ACL) do proxy, który pozwala na
384 ograniczenie dostêpu u¿ytkowników proxy na podstawie ich
385 przynale¿no¶ci do grup LDAP.
386
387 %package unix_acl
388 Summary:        UNIX group external ACL helper for Squid
389 Summary(pl):    Wsparcie kontroli dostêpu przez grupy UNIX dla squida
390 Group:          Networking/Admin
391 Requires:       %{name} = %{epoch}:%{version}-%{release}
392
393 %description unix_acl
394 This is an external ACL module for the Squid proxy server to limit
395 access for users based on UNIX group membership.
396
397 %description unix_acl -l pl
398 Jest to modu³ kontroli dostêpu (ACL) do proxy, który pozwala na
399 ograniczenie dostêpu u¿ytkowników proxy na podstawie ich
400 przynale¿no¶ci do grup UNIX.
401
402 %package wbinfo_acl
403 Summary:        NT domain group external ACL helper for Squid
404 Summary(pl):    Wsparcie kontroli dostêpu przez grupy w domenie NT dla squida
405 Group:          Networking/Admin
406 Requires:       %{name} = %{epoch}:%{version}-%{release}
407
408 %description wbinfo_acl
409 This is an external ACL module for the Squid proxy server to limit
410 access for users based on NT domain group membership using wbinfo.
411
412 %description wbinfo_acl -l pl
413 Jest to modu³ kontroli dostêpu (ACL) do proxy, który pozwala na
414 ograniczenie dostêpu u¿ytkowników proxy na podstawie ich
415 przynale¿no¶ci do grup w domenie NT przy u¿yciu wbinfo.
416
417 %package winbind_acl
418 Summary:        NT domain group external ACL helper for Squid
419 Summary(pl):    Wsparcie kontroli dostêpu przez grupy w domenie NT dla squida
420 Group:          Networking/Admin
421 Requires:       %{name} = %{epoch}:%{version}-%{release}
422
423 %description winbind_acl
424 This is an external ACL module for the Squid proxy server to limit
425 access for users based on NT domain group membership based on Samba
426 Winbindd from Samba 2.2.4 or greater.
427
428 %description winbind_acl -l pl
429 Jest to modu³ kontroli dostêpu (ACL) do proxy, który pozwala na
430 ograniczenie dostêpu u¿ytkowników proxy na podstawie ich
431 przynale¿no¶ci do grup w domenie NT oparty na Samba Winbindd z pakietu
432 Samba 2.2.4 lub wy¿szego.
433
434 %prep
435 %setup -q -a1 -a4
436 # Bug fixes from Squid home page:
437 %patch0 -p1
438 %patch1 -p1
439 %patch2 -p1
440 %patch3 -p1
441 %patch4 -p1
442 %patch5 -p1
443 %patch6 -p1
444 %patch7 -p1
445 %patch8 -p1
446 %patch9 -p1
447 %patch10 -p1
448 %patch11 -p1
449 %patch12 -p1
450 %patch13 -p1
451 # Other patches:
452 %patch100 -p1
453 %patch101 -p1
454 %patch102 -p1
455 %patch103 -p1
456 %patch104 -p1
457 %patch105 -p1
458 %patch106 -p1
459 %patch107 -p1
460 %patch108 -p1
461 %patch109 -p1
462 %patch110 -p1
463 %{?with_combined_log:%patch111 -p1}
464
465 %build
466 %{__aclocal}
467 %{__autoconf}
468 %{__automake}
469 %configure \
470         --datadir=%{_datadir}/squid \
471         --disable-ipf-transparent \
472         --enable-arp-acl \
473         --enable-auth=yes \
474         --enable-basic-auth-helpers=yes \
475         --enable-cache-digests \
476         --enable-carp \
477         --enable-delay-pools \
478         --enable-digest-auth-helpers=yes \
479         --enable-err-language=English \
480         --enable-external-acl-helpers=yes \
481         --enable-forw-via-db \
482         --enable-htcp \
483         --enable-icmp \
484         --enable-linux-netfilter \
485         --enable-ntlm-auth-helpers=yes \
486         --enable-referer-log \
487         --enable-removal-policies="lru heap" \
488         --enable-ssl \
489         --enable-snmp \
490         --enable-storeio="aufs,coss,diskd,null,ufs" \
491         --enable-underscores \
492         --enable-useragent-log \
493         --enable-x-accelerator-vary \
494         --localstatedir=/var \
495         --sysconfdir=%{_sysconfdir} \
496         --with-pthreads
497
498 %{__make}
499
500 perl -pi -e 's#%{_prefix}/.*bin/perl#%{_bindir}/perl#g' contrib/*
501 perl -pi -e 's#%{_prefix}/.*bin/perl#%{_bindir}/perl#g' scripts/*
502 find helpers/ -type f | xargs perl -pi -e 's#%{_prefix}/.*bin/perl#%{_bindir}/perl#g'
503
504 %install
505 rm -rf $RPM_BUILD_ROOT
506 install -d $RPM_BUILD_ROOT%{_cgidir} \
507         $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,security,sysconfig,logrotate.d} \
508         $RPM_BUILD_ROOT{%{_sbindir},%{_bindir},%{_libexecdir}/contrib} \
509         $RPM_BUILD_ROOT%{_mandir}/man8 \
510         $RPM_BUILD_ROOT%{_datadir}/squid \
511         $RPM_BUILD_ROOT/var/{cache,log{,/archiv}}/squid
512
513 %{__make} install \
514         DESTDIR=$RPM_BUILD_ROOT
515
516 cp -a contrib/*.pl $RPM_BUILD_ROOT%{_libexecdir}/contrib
517 install scripts/*.pl $RPM_BUILD_ROOT%{_libexecdir}
518
519 install %{SOURCE7} $RPM_BUILD_ROOT/etc/pam.d/squid
520 touch $RPM_BUILD_ROOT/etc/security/blacklist.squid
521
522 mv -f $RPM_BUILD_ROOT%{_libdir}/squid/cachemgr.cgi $RPM_BUILD_ROOT%{_cgidir}
523
524 cd $RPM_BUILD_ROOT/etc/squid
525 cp -f squid.conf{,.default}
526 patch -p0 < %{SOURCE5}
527 cd -
528
529 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/squid
530 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/squid
531 install %{SOURCE6} $RPM_BUILD_ROOT/etc/logrotate.d/squid
532
533 touch $RPM_BUILD_ROOT/var/log/squid/{access,cache,store}.log
534
535 # These two files start squid. They are replaced by /etc/rc.d/init.d script.
536 rm -f $RPM_BUILD_ROOT%{_bindir}/R*
537
538 # dunno why, but manual is not installed
539 mv doc/squid.8 $RPM_BUILD_ROOT%{_mandir}/man8
540
541 # We don't want Makefiles as docs...
542 rm -f doc/Makefile*
543
544 # We don't like message: rpm found unpackaged files ...
545 rm -f $RPM_BUILD_ROOT/etc/squid/msntauth.conf.default \
546         $RPM_BUILD_ROOT/etc/squid/squid.conf.orig
547
548 %clean
549 rm -rf $RPM_BUILD_ROOT
550
551 %triggerpostun -- squid < 7:2.5.STABLE7-5
552 %addusertogroup stats squid
553
554 %pre
555 if [ -n "`/usr/bin/getgid squid`" ]; then
556         if [ "`/usr/bin/getgid squid`" != "91" ]; then
557                 echo "Error: group squid doesn't have gid=91. Correct this before installing squid." 1>&2
558                 exit 1
559         fi
560 else
561         /usr/sbin/groupadd -g 91 squid 1>&2
562 fi
563 if [ -n "`/bin/id -u squid 2>/dev/null`" ]; then
564         if [ "`/bin/id -u squid`" != "91" ]; then
565                 echo "Error: user squid doesn't have uid=91. Correct this before installing squid." 1>&2
566                 exit 1
567         fi
568 else
569         /usr/sbin/useradd -o -u 91 -s /bin/false -g squid \
570                 -c "SQUID http caching daemon" -d /var/cache/squid squid 1>&2
571         %addusertogroup stats squid
572 fi
573 [ -L %{_datadir}/squid/errors ] && rm -rf %{_datadir}/squid/errors || :
574
575 %post
576 if ! grep -q "^visible_hostname" /etc/squid/squid.conf; then
577         echo visible_hostname `/bin/hostname -f` >> /etc/squid/squid.conf
578 fi
579
580 if [ "$1" = "1" ]; then
581         /sbin/chkconfig --add squid
582         echo "Run \"/etc/rc.d/init.d/squid start\" to start squid." >&2
583 else
584         if [ -f /var/lock/subsys/squid ]; then
585                 /etc/rc.d/init.d/squid restart >&2
586         fi
587 fi
588
589 %preun
590 if [ "$1" = "0" ]; then
591         if [ -f /var/lock/subsys/squid ]; then
592                 /etc/rc.d/init.d/squid stop >&2
593         fi
594         /sbin/chkconfig --del squid
595 fi
596
597 %postun
598 if [ "$1" = "0" ]; then
599         %userremove squid
600         %groupremove squid
601 fi
602
603 %files
604 %defattr(644,root,root,755)
605 %doc CONTRIBUTORS COPYRIGHT CREDITS README ChangeLog QUICKSTART RELEASENOTES.html SPONSORS
606 %doc doc/* src/mib.txt FAQ*.html book-full.html
607 %attr(755,root,root) %{_bindir}/squidclient
608 %attr(755,root,root) %{_libexecdir}/diskd
609 # YES, it has to be suid root, it sends ICMP packets.
610 %attr(4754,root,squid) %{_libexecdir}/pinger
611 %attr(755,root,root) %{_libexecdir}/unlinkd
612 %attr(755,root,root) %{_libexecdir}/fakeauth_auth
613 %attr(755,root,root) %{_sbindir}/*
614
615 %attr(755,root,root) %dir %{_sysconfdir}
616
617 %attr(754,root,root) /etc/rc.d/init.d/squid
618 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/squid
619 %attr(640,root,squid) %config(noreplace) /etc/sysconfig/squid
620 %attr(640,root,squid) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/squid.conf
621 %attr(640,root,squid) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mime.conf
622 %attr(640,root,root) %{_sysconfdir}/mime.conf.default
623 %attr(640,root,root) %{_sysconfdir}/squid.conf.default
624
625 %dir %{_datadir}/squid
626 %dir %{_datadir}/squid/errors
627 %{_datadir}/squid/icons
628 %{_datadir}/squid/mib.txt
629 %lang(bg) %{_datadir}/squid/errors/Bulgarian
630 %lang(ca) %{_datadir}/squid/errors/Catalan
631 %lang(cs) %{_datadir}/squid/errors/Czech
632 %lang(da) %{_datadir}/squid/errors/Danish
633 %lang(nl) %{_datadir}/squid/errors/Dutch
634 %{_datadir}/squid/errors/English
635 %lang(et) %{_datadir}/squid/errors/Estonian
636 %lang(fi) %{_datadir}/squid/errors/Finnish
637 %lang(fr) %{_datadir}/squid/errors/French
638 %lang(de) %{_datadir}/squid/errors/German
639 %lang(he) %{_datadir}/squid/errors/Hebrew
640 %lang(hu) %{_datadir}/squid/errors/Hungarian
641 %lang(it) %{_datadir}/squid/errors/Italian
642 %lang(ja) %{_datadir}/squid/errors/Japanese
643 %lang(ko) %{_datadir}/squid/errors/Korean
644 %lang(lt) %{_datadir}/squid/errors/Lithuanian
645 %lang(pl) %{_datadir}/squid/errors/Polish
646 %lang(pt) %{_datadir}/squid/errors/Portuguese
647 %lang(ro) %{_datadir}/squid/errors/Romanian
648 %lang(ru) %{_datadir}/squid/errors/Russian-1251
649 %lang(ru) %{_datadir}/squid/errors/Russian-koi8-r
650 %lang(zh_CN) %{_datadir}/squid/errors/Simplify_Chinese
651 %lang(sk) %{_datadir}/squid/errors/Slovak
652 %lang(es) %{_datadir}/squid/errors/Spanish
653 %lang(sr) %{_datadir}/squid/errors/Serbian
654 %lang(sv) %{_datadir}/squid/errors/Swedish
655 %lang(zh_TW) %{_datadir}/squid/errors/Traditional_Chinese
656 %lang(tr) %{_datadir}/squid/errors/Turkish
657
658 %attr(755,root,root) %dir %{_libexecdir}
659 %attr(755,root,root) %{_libexecdir}/*.pl
660 %attr(755,root,root) %{_libexecdir}/contrib
661
662 %attr(770,root,squid) %dir /var/log/archiv/squid
663 %attr(770,root,squid) %dir /var/log/squid
664 %attr(660,root,squid) %ghost /var/log/squid/*
665
666 %attr(770,root,squid) %dir /var/cache/squid
667 %{_mandir}/man8/squid.8*
668
669 %files cachemgr
670 %defattr(644,root,root,755)
671 %attr(755,root,root) %{_cgidir}/*
672
673 %files ldap_auth
674 %defattr(644,root,root,755)
675 %doc helpers/basic_auth/LDAP/README
676 %attr(755,root,root) %{_libexecdir}/%{name}_ldap_auth
677 %{_mandir}/man8/%{name}_ldap_auth.*
678
679 %files pam_auth
680 %defattr(644,root,root,755)
681 %doc helpers/basic_auth/PAM/pam_auth.c
682 %config(noreplace) /etc/pam.d/squid
683 %config(noreplace) /etc/security/blacklist.squid
684 %attr(755,root,root) %{_libexecdir}/pam_auth
685 %{_mandir}/man8/pam_auth.8*
686
687 %files smb_auth
688 %defattr(644,root,root,755)
689 %doc helpers/basic_auth/SMB/{README,ChangeLog,smb_auth.sh}
690 %doc helpers/basic_auth/multi-domain-NTLM/*
691 %attr(755,root,root) %{_libexecdir}/smb_auth*
692
693 %files msnt_auth
694 %defattr(644,root,root,755)
695 %doc helpers/basic_auth/MSNT/README*
696 %attr(755,root,root) %{_libexecdir}/msnt_auth
697 %attr(640,root,squid) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/msntauth.conf
698
699 %files yp_auth
700 %defattr(644,root,root,755)
701 %attr(755,root,root) %{_libexecdir}/yp_auth
702
703 %files ncsa_auth
704 %defattr(644,root,root,755)
705 %attr(755,root,root) %{_libexecdir}/ncsa_auth
706
707 %files sasl_auth
708 %defattr(644,root,root,755)
709 %doc helpers/basic_auth/SASL/{README,squid_sasl*}
710 %attr(755,root,root) %{_libexecdir}/sasl_auth
711
712 %files winbind_auth
713 %defattr(644,root,root,755)
714 %attr(755,root,root) %{_libexecdir}/wb_auth
715
716 %files getpwname_auth
717 %defattr(644,root,root,755)
718 %attr(755,root,root) %{_libexecdir}/getpwname_auth
719
720 %files passwd_auth
721 %defattr(644,root,root,755)
722 %attr(755,root,root) %{_libexecdir}/digest_pw_auth
723
724 %files ntlm_auth
725 %defattr(644,root,root,755)
726 %doc helpers/ntlm_auth/no_check/{README*,no_check.pl}
727 %attr(755,root,root) %{_libexecdir}/wb_ntlmauth
728 %attr(755,root,root) %{_libexecdir}/ntlm_auth
729
730 %files ip_acl
731 %defattr(644,root,root,755)
732 %doc helpers/external_acl/ip_user/{README,example*}
733 %attr(755,root,root) %{_libexecdir}/ip_user_check
734
735 %files ldap_acl
736 %defattr(644,root,root,755)
737 %attr(755,root,root) %{_libexecdir}/squid_ldap_group
738 %{_mandir}/man8/%{name}_ldap_group.*
739
740 %files unix_acl
741 %defattr(644,root,root,755)
742 %doc helpers/external_acl/unix_group/README
743 %attr(755,root,root) %{_libexecdir}/squid_unix_group
744 %{_mandir}/man8/%{name}_unix_group.*
745
746 %files wbinfo_acl
747 %defattr(644,root,root,755)
748 %attr(755,root,root) %{_libexecdir}/wbinfo_group.pl
749
750 %files winbind_acl
751 %defattr(644,root,root,755)
752 %doc helpers/external_acl/winbind_group/readme.txt
753 %attr(755,root,root) %{_libexecdir}/wb_group
This page took 0.160665 seconds and 4 git commands to generate.