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