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