]> git.pld-linux.org Git - packages/squid.git/blobdiff - squid.spec
- up to 3.0.STABLE16
[packages/squid.git] / squid.spec
index 1fe08f6ee1926576f265fcc36fa51a2f333a7750..c82e177f9e136338a355b25bd3b19afc04dcafd0 100644 (file)
@@ -1,7 +1,12 @@
 # TODO
-# - use /usr/lib/cgi-bin instead of /home/services
-# - test fd-config.patch (works in Fedora)
-# - test new hit_miss_mark.patch (ZPH TOS)
+# - REVIEW patches and configuration
+# - ZPH TOS -
+# For this to work correctly, you will need to patch your linux
+# kernel with the TOS preserving ZPH patch.
+# The kernel patch can be downloaded from http://zph.bratcheda.org
+# - Installed (but unpackaged) file(s) found:
+#   /usr/share/squid/errors/templates/ERR_ACCESS_DENIED
+#   /usr/share/squid/errors/templates/ERR_ZERO_SIZE_OBJECT
 #
 # Conditional build:
 %bcond_with    combined_log    # enables apache-like combined log format
@@ -14,46 +19,46 @@ Summary(ru.UTF-8):  Squid - кэш объектов Internet
 Summary(uk.UTF-8):     Squid - кеш об'єктів Internet
 Summary(zh_CN.UTF-8):  SQUID 高速缓冲代理服务器
 Name:          squid
-Version:       2.6.STABLE14
-Release:       0.3
+Version:       3.0.STABLE16
+# review patches before stable release
+Release:       0.1
 Epoch:         7
 License:       GPL v2
 Group:         Networking/Daemons
-Source0:       http://www.squid-cache.org/Versions/v2/2.6/%{name}-%{version}.tar.bz2
-# Source0-md5: eadb138d48320df8b99349121159c6bf
+Source0:       http://www.squid-cache.org/Versions/v3/3.0/%{name}-%{version}.tar.bz2
+# Source0-md5: aa039a2c75404a496f0e99a278599e00
 # http://www.squid-cache.org/Doc/FAQ/FAQ.tar.gz
 Source1:       %{name}-FAQ.tar.gz
 # Source1-md5: cb9a955f8cda9cc166e086fccd412a43
 Source2:       %{name}.init
 Source3:       %{name}.sysconfig
 # http://squid-docs.sourceforge.net/latest/zip-files/book-full-html.zip
-Source4:       %{name}-book-full-html.zip
+Source4:       http://squid-docs.sourceforge.net/latest/zip-files/book-full-html.zip
 # Source4-md5: 4f3b6dab1de9cbb847df89d8b417378a
 Source5:       %{name}.conf.patch
 Source6:       %{name}.logrotate
 Source7:       %{name}.pamd
 # Bug fixes from Squid home page, please include URL
-# lets have fun - there is no patches... yet :)
+# lets have fun - there is no patches... yet:)
 # Other patches:
-# http://www.it-academy.bg/zph/
-Patch100:      %{name}_hit_miss_mark.patch
-Patch101:      %{name}-fhs.patch
-Patch102:      %{name}-location.patch
-Patch103:      %{name}-domainmatch.patch
-Patch104:      %{name}-libnsl_fixes.patch
-Patch106:      %{name}-crash-on-ENOSPC.patch
-Patch107:      %{name}-newssl.patch
-Patch109:      %{name}-more_FD-new.patch
-Patch110:      %{name}-empty-referer.patch
-Patch111:      %{name}-align.patch
-Patch112:      %{name}-2.5.STABLE4-apache-like-combined-log.patch
-Patch113:      %{name}-auth_on_acceleration.patch
-Patch114:      %{name}-fd-config.patch
+# http://zph.bratcheda.org/
+Source8:       %{name}-cachemgr-apache.conf
+Patch0:                %{name}_hit_miss_mark.patch
+Patch1:                %{name}-fhs.patch
+Patch2:                %{name}-location.patch
+Patch4:                %{name}-libnsl_fixes.patch
+Patch5:                %{name}-crash-on-ENOSPC.patch
+Patch7:                %{name}-empty-referer.patch
+Patch8:                %{name}-2.5.STABLE4-apache-like-combined-log.patch
+Patch9:                %{name}-auth_on_acceleration.patch
+Patch10:       %{name}-ppc-m32.patch
+Patch11:       %{name}-cachemgr-webapp.patch
 URL:           http://www.squid-cache.org/
 BuildRequires: autoconf
 BuildRequires: automake
 BuildRequires: cyrus-sasl-devel >= 2.1.0
 BuildRequires: db-devel
+BuildRequires: libltdl-devel
 BuildRequires: openldap-devel >= 2.3.0
 BuildRequires: openssl-devel >= 0.9.7d
 BuildRequires: pam-devel
@@ -68,21 +73,26 @@ Requires(post):     grep
 Requires(post,preun):  /sbin/chkconfig
 Requires(postun):      /usr/sbin/groupdel
 Requires(postun):      /usr/sbin/userdel
-Requires(pre): /bin/id
+Requires(pre,triggerpostun):   /bin/id
 Requires(pre): /usr/bin/getgid
 Requires(pre): /usr/lib/rpm/user_group.sh
 Requires(pre): /usr/sbin/groupadd
 Requires(pre): /usr/sbin/useradd
+Requires(pre,triggerpostun):   /usr/sbin/usermod
 Requires:      rc-scripts >= 0.2.0
 Requires:      setup >= 2.4.6
 Provides:      group(squid)
+# epoll enabled by default:
+Requires:      uname(release) >= 2.6
 Provides:      user(squid)
 Conflicts:     logrotate < 3.7-4
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+%define                _webapps        /etc/webapps
+%define                _webapp         cachemgr
 %define                _libexecdir     %{_libdir}/%{name}
 %define                _sysconfdir     /etc/%{name}
-%define                _cgidir         /home/services/httpd/cgi-bin
+%define                _cgidir         %{_prefix}/lib/cgi-bin/%{_webapp}
 
 %description
 Squid is a high-performance proxy caching server for web clients,
@@ -183,12 +193,17 @@ Squid - це кешуючий проксі-сервер для web-клієнт
 %package cachemgr
 Summary:       CGI script for Squid management
 Summary(pl.UTF-8):     Skrypt CGI do zarządzania Squidem przez WWW
-Group:         Networking/Admin
-Requires:      %{name} = %{epoch}:%{version}-%{release}
+Group:         Applications/WWW
+# does not require squid locally
+Requires:      group(http)
+Requires:      webapps
 Requires:      webserver
+Requires:      webserver(access)
+Requires:      webserver(alias)
+Requires:      webserver(cgi)
 
 %description cachemgr
-Cachemgr.cgi is a CGI script that allows administrator to chceck
+Cachemgr.cgi is a CGI script that allows administrator to check
 various informations about Squid via WWW.
 
 %description cachemgr -l pl.UTF-8
@@ -411,15 +426,20 @@ ograniczenie dostępu użytkowników proxy na podstawie ich
 przynależności do grup w domenie NT przy użyciu wbinfo.
 
 %package session_acl
-Summary:       Squid session tracking external acl group helper
+Summary:       Squid session tracking external ACL group helper
+Summary(pl.UTF-8):     Wsparcie kontroli dostępu przez śledzenie sesji
 Group:         Networking/Admin
 Requires:      %{name} = %{epoch}:%{version}-%{release}
 
 %description session_acl
-This  helper maintains a concept of sessions by monitoring requests and
-timing out sessions if no requests have been seen for the idle  timeout
+This helper maintains a concept of sessions by monitoring requests and
+timing out sessions if no requests have been seen for the idle timeout
 timer.
 
+%description session_acl -l pl.UTF-8
+Moduł oparty na koncepcji sesji, śledzący zapytania i wygaszający sesje
+jeśli w określonym czasie nie widziano w ich obrębie kolejnych zapytań.
+
 %package scripts
 Summary:       Perl scripts for Squid
 Summary(pl.UTF-8):     Skrypty perlowe dla Squida
@@ -437,69 +457,72 @@ Ten pakiet zawiera skrypty perlowe i dodatkowe programy dla Squida.
 # Bug fixes from Squid home page:
 
 # Other patches:
-%patch100 -p1
-%patch101 -p1
-%patch102 -p1
-%patch103 -p1
-%patch104 -p1
-%patch106 -p1
-%patch107 -p1
-%patch109 -p1
-%patch110 -p1
-%patch111 -p1
-%{?with_combined_log:%patch112 -p1}
-%patch113 -p1
-%patch114 -p1
+#%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch4 -p1
+%patch5 -p1
+#%patch7 -p1
+%{?with_combined_log:%patch8 -p1}
+%patch9 -p1
+%ifarch ppc
+%patch10 -p1
+%endif
+%patch11 -p1
 
 %{__sed} -i -e '1s#!.*bin/perl#!%{__perl}#' {contrib,scripts,helpers/*/*}/*.pl
 
 %build
+%{__libtoolize}
 %{__aclocal}
 %{__autoconf}
 %{__autoheader}
 %{__automake}
 %configure \
        --datadir=%{_datadir}/squid \
-       --enable-storeio="aufs,coss,diskd,null,ufs" \
-       --enable-removal-policies="heap,lru" \
-       --enable-icmp \
-       --enable-delay-pools \
-       --enable-useragent-log \
-       --enable-referer-log \
-       --enable-kill-parent-hack \
-       --enable-forward-log \
-       --enable-multicast-miss \
-       --enable-snmp \
        --enable-arp-acl \
-       --enable-htcp \
-       --enable-ssl \
-       --enable-forw-via-db \
-       --enable-cache-digests \
-       --enable-err-language=English \
-       --enable-coss-aio-ops \
-       --enable-linux-netfilter \
-       --enable-large-cache-files \
        --enable-auth="basic,digest,negotiate,ntlm" \
        --enable-basic-auth-helpers="LDAP,MSNT,NCSA,PAM,SASL,SMB,YP,getpwnam,multi-domain-NTLM" \
+       --enable-cache-digests \
+       --enable-coss-aio-ops \
+       --enable-delay-pools \
        --enable-digest-auth-helpers="ldap,password" \
+       --enable-err-language=English \
+       --enable-esi \
        --enable-external-acl-helpers="ip_user,ldap_group,session,unix_group,wbinfo_group" \
+       --enable-follow-x-forwarded-for \
+       --enable-forward-log \
+       --enable-forw-via-db \
+       --enable-htcp \
+       --enable-icap-client \
+       --enable-icmp \
+       --enable-kill-parent-hack \
+       --enable-large-cache-files \
+       --enable-linux-netfilter \
+       --enable-linux-tproxy \
+       --enable-multicast-miss \
        --enable-ntlm-auth-helpers="SMB,fakeauth,no_check" \
        --enable-ntlm-fail-open \
+       --enable-referer-log \
+       --enable-removal-policies="heap,lru" \
+       --enable-snmp \
+       --enable-ssl \
+       --enable-storeio="aufs,diskd,null,ufs" \
+       --enable-useragent-log \
        --enable-x-accelerator-vary \
-       --enable-follow-x-forwarded-for \
        --localstatedir=/var \
        --sysconfdir=%{_sysconfdir} \
        --with-auth-on-acceleration \
-       --with-pthreads \
        --with-large-files \
-       --enable-fd-config \
-       --with-maxfd=32768
+       --with-maxfd=32768 \
+       --with-pthreads \
+       --enable-zph-qos
 
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_cgidir} \
+install -d $RPM_BUILD_ROOT{%{_cgidir},%{_webapps}/%{_webapp}} \
        $RPM_BUILD_ROOT/etc/{pam.d,rc.d/init.d,security,sysconfig,logrotate.d} \
        $RPM_BUILD_ROOT{%{_sbindir},%{_bindir},%{_libexecdir}/contrib} \
        $RPM_BUILD_ROOT%{_mandir}/man8 \
@@ -516,10 +539,13 @@ install %{SOURCE7} $RPM_BUILD_ROOT/etc/pam.d/squid
 touch $RPM_BUILD_ROOT/etc/security/blacklist.squid
 
 mv -f $RPM_BUILD_ROOT%{_libdir}/squid/cachemgr.cgi $RPM_BUILD_ROOT%{_cgidir}
+cp -a %{SOURCE8} $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/apache.conf
+cp -a %{SOURCE8} $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/httpd.conf
+rm -f $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/cachemgr.conf.default
 
 cd $RPM_BUILD_ROOT/etc/squid
-cp -f squid.conf{,.default}
-patch -p0 < %{SOURCE5}
+%{__patch} -p0 < %{SOURCE5}
+rm -f *~ *.orig mime.conf.default squid.conf.default
 cd -
 
 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/squid
@@ -543,10 +569,10 @@ rm -f docs/Makefile*
 rm -f $RPM_BUILD_ROOT/etc/squid/msntauth.conf.default \
        $RPM_BUILD_ROOT/etc/squid/squid.conf.orig
 
-> $RPM_BUILD_ROOT/var/cache/squid/netdb_state
-> $RPM_BUILD_ROOT/var/cache/squid/swap.state
-> $RPM_BUILD_ROOT/var/cache/squid/swap.state.clean
-> $RPM_BUILD_ROOT/var/cache/squid/swap.state.last-clean
+:> $RPM_BUILD_ROOT/var/cache/squid/netdb_state
+:> $RPM_BUILD_ROOT/var/cache/squid/swap.state
+:> $RPM_BUILD_ROOT/var/cache/squid/swap.state.clean
+:> $RPM_BUILD_ROOT/var/cache/squid/swap.state.last-clean
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -588,33 +614,49 @@ fi
 %triggerpostun -- squid < 7:2.5.STABLE7-5
 %addusertogroup stats squid
 
+%triggerin cachemgr -- apache1 < 1.3.37-3, apache1-base
+%webapp_register apache %{_webapp}
+
+%triggerun cachemgr -- apache1 < 1.3.37-3, apache1-base
+%webapp_unregister apache %{_webapp}
+
+%triggerin cachemgr -- apache < 2.2.0, apache-base
+%webapp_register httpd %{_webapp}
+
+%triggerun cachemgr -- apache < 2.2.0, apache-base
+%webapp_unregister httpd %{_webapp}
+
+%triggerpostun -- cachemgr < 7:3.0.STABLE10-0.2
+if [ -f %{_sysconfdir}/cachemgr.conf.rpmsave ]; then
+       cp -f %{_webapps}/%{_webapp}/cachemgr.conf{,.rpmsave}
+       mv -f %{_sysconfdir}/cachemgr.conf.rpmsave %{_webapps}/%{_webapp}/cachemgr.conf
+fi
+
 %files
 %defattr(644,root,root,755)
 %doc CONTRIBUTORS COPYRIGHT CREDITS README ChangeLog QUICKSTART RELEASENOTES.html SPONSORS
-%doc docs/* src/mib.txt FAQ*.html book-full.html
+%doc docs/* src/mib.txt FAQ*.html book-full.html src/squid.conf.default src/mime.conf.default
 %attr(755,root,root) %{_bindir}/squidclient
-%attr(755,root,root) %{_bindir}/cossdump
-%attr(755,root,root) %{_libexecdir}/diskd-daemon
+%attr(755,root,root) %{_libexecdir}/diskd
 # YES, it has to be suid root, it sends ICMP packets.
 %attr(4754,root,squid) %{_libexecdir}/pinger
 %attr(755,root,root) %{_libexecdir}/unlinkd
 %attr(755,root,root) %{_libexecdir}/fakeauth_auth
 %attr(755,root,root) %{_sbindir}/*
 
-%attr(755,root,root) %dir %{_sysconfdir}
-
 %attr(754,root,root) /etc/rc.d/init.d/squid
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/squid
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/squid
+
+%dir %{_sysconfdir}
 %attr(640,root,squid) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/squid.conf
 %attr(640,root,squid) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mime.conf
-%attr(640,root,root) %{_sysconfdir}/mime.conf.default
-%attr(640,root,root) %{_sysconfdir}/squid.conf.default
 
 %dir %{_datadir}/squid
 %dir %{_datadir}/squid/errors
 %{_datadir}/squid/icons
 %{_datadir}/squid/mib.txt
+%lang(am) %{_datadir}/squid/errors/Armenian
 %lang(az) %{_datadir}/squid/errors/Azerbaijani
 %lang(bg) %{_datadir}/squid/errors/Bulgarian
 %lang(ca) %{_datadir}/squid/errors/Catalan
@@ -645,8 +687,9 @@ fi
 %lang(sv) %{_datadir}/squid/errors/Swedish
 %lang(zh_TW) %{_datadir}/squid/errors/Traditional_Chinese
 %lang(tr) %{_datadir}/squid/errors/Turkish
-
-%attr(755,root,root) %dir %{_libexecdir}
+%lang(uk) %{_datadir}/squid/errors/Ukrainian*
+%{_datadir}/squid/errors/templates
+%dir %{_libexecdir}
 
 %attr(770,root,squid) %dir /var/log/archive/squid
 %attr(770,root,squid) %dir /var/log/squid
@@ -661,8 +704,11 @@ fi
 
 %files cachemgr
 %defattr(644,root,root,755)
-%attr(640,root,squid) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cachemgr.conf
-%attr(755,root,root) %{_cgidir}/*
+%dir %attr(750,root,http) %{_webapps}/%{_webapp}
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/apache.conf
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/httpd.conf
+%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/cachemgr.conf
+%attr(755,root,root) %{_cgidir}/cachemgr.cgi
 %{_mandir}/man8/cachemgr.cgi.8*
 
 %files ldap_auth
This page took 0.039187 seconds and 4 git commands to generate.