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