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