%bcond_with combined_log # enables apache-like combined log format
#
Summary: SQUID Internet Object Cache
-Summary(es): proxy/cache para www/ftp/gopher
+Summary(es): proxy/cache para WWW/FTP/gopher
Summary(pl): Uniwersalny proxy-cache server
Summary(pt_BR): Cache Squid de objetos Internet
Summary(ru): Squid - ËÜÛ ÏÂßÅËÔÏ× Internet
Summary(uk): Squid - ËÅÛ ÏÂ'¤ËÔ¦× Internet
Summary(zh_CN): SQUID ¸ßËÙ»º³å´úÀí·þÎñÆ÷
Name: squid
-Version: 2.5.STABLE5
-Release: 2
+Version: 2.5.STABLE7
+Release: 9
Epoch: 7
License: GPL v2
Group: Networking/Daemons
Source0: http://www.squid-cache.org/Versions/v2/2.5/%{name}-%{version}.tar.bz2
-# Source0-md5: 45ed1b1cd492e3f529085d09c3ffc1b8
-Source1: %{name}-1.1.19-faq.tar.gz
-# Source1-md5: 77d04ae621d19548797e3a0deb540df6
+# Source0-md5: bf63e34906c68d716896eec0351108dc
+# http://www.squid-cache.org/Doc/FAQ/FAQ.tar.gz
+Source1: %{name}-FAQ.tar.gz
+# Source1-md5: cb9a955f8cda9cc166e086fccd412a43
Source2: %{name}.init
Source3: %{name}.sysconfig
-Source4: http://cache.is.co.za/%{name}-docs.tar.gz
-# Source4-md5: 0cfee556bf6394a0bd3c438c89dd2e63
+# http://squid-docs.sourceforge.net/latest/zip-files/book-full-html.zip
+Source4: %{name}-book-full-html.zip
+# Source4-md5: 4f3b6dab1de9cbb847df89d8b417378a
Source5: %{name}.conf.patch
Source6: %{name}.logrotate
Source7: %{name}.pamd
# Bug fixes from Squid home page:
-Patch0: http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE5-ntlm_assert.patch
-Patch1: http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE5-ldap.patch
-Patch2: http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE5-helper_warning.patch
-Patch3: http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE5-pkgconfig.patch
-Patch4: http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE5-vary.patch
-Patch5: http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE5-lin22_poll.patch
-Patch6: http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE5-version.patch
-Patch7: http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE5-deny_info.patch
-Patch8: http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE5-CONNECT_timeout.patch
-Patch9: http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE5-cache_swap_log.patch
-Patch10: http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE5-ntlm_warning.patch
-Patch11: http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE5-rfc1035NameUnpack.patch
-Patch12: http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE5-digest_blank.patch
-Patch13: http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE5-post_assert.patch
-Patch14: http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE5-spelling.patch
-Patch15: http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE5-digest_ERR.patch
-Patch16: http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE5-turkish_ERR_DNS_FAIL.patch
-Patch17: http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE5-vary_negatively.patch
-Patch18: http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE5-range_offset_limit.patch
-
+Patch0: http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE7-half_closed_POST.patch
+Patch1: http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE7_req_resp_header.patch
+Patch2: http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE7-non_blocking_disk.patch
+Patch3: http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE7-blank_response.patch
+Patch4: http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE7-cachemgr_vmobjects.patch
+Patch5: http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE7-dothost.patch
+Patch6: http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE7-empty_acls.patch
# Other patches:
-Patch110: http://www.sed.pl/~mrk/qos/%{name}_hit_miss_mark.patch
-Patch120: %{name}-fhs.patch
-Patch130: %{name}-location.patch
-Patch140: %{name}-domainmatch.patch
-Patch150: %{name}-libnsl_fixes.patch
-Patch170: %{name}-ac_fix.patch
-Patch180: %{name}-crash-on-ENOSPC.patch
-Patch190: %{name}-newssl.patch
-Patch200: %{name}-sasl.patch
-Patch210: http://piorun.ds.pg.gda.pl/~blues/patches/%{name}-more_FD-new.patch
-Patch220: %{name}-empty-referer.patch
-Patch230: %{name}-2.5.STABLE4-apache-like-combined-log.patch
+Patch100: http://www.sed.pl/~mrk/qos/%{name}_hit_miss_mark.patch
+Patch101: %{name}-fhs.patch
+Patch102: %{name}-location.patch
+Patch103: %{name}-domainmatch.patch
+Patch104: %{name}-libnsl_fixes.patch
+Patch105: %{name}-ac_fix.patch
+Patch106: %{name}-crash-on-ENOSPC.patch
+Patch107: %{name}-newssl.patch
+Patch108: %{name}-nolibs.patch
+Patch109: http://piorun.ds.pg.gda.pl/~blues/patches/%{name}-more_FD-new.patch
+Patch110: %{name}-empty-referer.patch
+Patch111: %{name}-2.5.STABLE4-apache-like-combined-log.patch
URL: http://www.squid-cache.org/
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: cyrus-sasl-devel >= 2.1.0
-BuildRequires: findutils
BuildRequires: openldap-devel
BuildRequires: openssl-devel >= 0.9.7d
BuildRequires: pam-devel
BuildRequires: perl-base
+BuildRequires: rpmbuild(macros) >= 1.166
+BuildRequires: unzip
PreReq: rc-scripts >= 0.2.0
+PreReq: setup >= 2.4.6
Requires(pre): /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(post,preun): /sbin/chkconfig
Requires(post): /bin/hostname
Requires(postun): /usr/sbin/groupdel
Requires(postun): /usr/sbin/userdel
+Provides: group(squid)
+Provides: user(squid)
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define _libexecdir %{_libdir}/%{name}
%description ip_acl
This is an external ACL module for the Squid proxy server to limit
-acces for users based on IP address.
+access for users based on IP address.
%description ip_acl -l pl
Jest to modu³ kontroli dostêpu (ACL) do proxy, który pozwala na
%description ldap_acl
This is an external ACL module for the Squid proxy server to limit
-acces for users based on LDAP group membership.
+access for users based on LDAP group membership.
%description ldap_acl -l pl
Jest to modu³ kontroli dostêpu (ACL) do proxy, który pozwala na
%description unix_acl
This is an external ACL module for the Squid proxy server to limit
-acces for users based on UNIX group membership.
+access for users based on UNIX group membership.
%description unix_acl -l pl
Jest to modu³ kontroli dostêpu (ACL) do proxy, który pozwala na
%description wbinfo_acl
This is an external ACL module for the Squid proxy server to limit
-acces for users based on NT domain group membership using wbinfo.
-
+access for users based on NT domain group membership using wbinfo.
%description wbinfo_acl -l pl
Jest to modu³ kontroli dostêpu (ACL) do proxy, który pozwala na
%description winbind_acl
This is an external ACL module for the Squid proxy server to limit
-acces for users based on NT domain group membership based on Samba
+access for users based on NT domain group membership based on Samba
Winbindd from Samba 2.2.4 or greater.
%description winbind_acl -l pl
Samba 2.2.4 lub wy¿szego.
%prep
-%setup -q -a 1 -a 4
-
+%setup -q -a1 -a4
# Bug fixes from Squid home page:
%patch0 -p1
%patch1 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
-%patch6 -p1
-%patch7 -p1
-%patch8 -p1
-%patch9 -p1
-%patch10 -p1
-%patch11 -p1
-%patch12 -p1
-%patch13 -p1
-%patch14 -p1
-%patch15 -p1
-%patch16 -p1
-%patch17 -p1
-%patch18 -p1
-
+%patch6 -p1
# Other patches:
+%patch100 -p1
+%patch101 -p1
+%patch102 -p1
+%patch103 -p1
+%patch104 -p1
+%patch105 -p1
+%patch106 -p1
+%patch107 -p1
+%patch108 -p1
+%patch109 -p1
%patch110 -p1
-%patch120 -p1
-%patch130 -p1
-%patch140 -p1
-%patch170 -p1
-%patch180 -p1
-%patch190 -p1
-%patch200 -p1
-%patch210 -p1
-%patch220 -p1
-%{?with_combined_log:%patch230 -p1}
+%{?with_combined_log:%patch111 -p1}
%build
%{__aclocal}
--sysconfdir=%{_sysconfdir} \
--with-pthreads
-mv -f squid/* doc
%{__make}
perl -pi -e 's#%{_prefix}/.*bin/perl#%{_bindir}/perl#g' contrib/*
rm -f doc/Makefile*
# We don't like message: rpm found unpackaged files ...
-rm -f $RPM_BUILD_ROOT/etc/squid/msntauth.conf.default \
- $RPM_BUILD_ROOT/etc/squid/squid.conf.orig
+rm -f $RPM_BUILD_ROOT/etc/squid/msntauth.conf.default \
+ $RPM_BUILD_ROOT/etc/squid/squid.conf.orig
%clean
rm -rf $RPM_BUILD_ROOT
+%triggerpostun -- squid < 7:2.5.STABLE7-5
+%addusertogroup stats squid
+
%pre
-if [ -n "`getgid squid`" ]; then
- if [ "`getgid squid`" != "91" ]; then
+if [ -n "`/usr/bin/getgid squid`" ]; then
+ if [ "`/usr/bin/getgid squid`" != "91" ]; then
echo "Error: group squid doesn't have gid=91. Correct this before installing squid." 1>&2
exit 1
fi
else
- /usr/sbin/groupadd -g 91 -r -f squid 1>&2 || :
+ /usr/sbin/groupadd -g 91 squid 1>&2
fi
-if [ -n "`id -u squid 2>/dev/null`" ]; then
- if [ "`id -u squid`" != "91" ]; then
+if [ -n "`/bin/id -u squid 2>/dev/null`" ]; then
+ if [ "`/bin/id -u squid`" != "91" ]; then
echo "Error: user squid doesn't have uid=91. Correct this before installing squid." 1>&2
exit 1
fi
else
- /usr/sbin/useradd -M -o -r -u 91 -s /bin/false \
- -g squid -c "SQUID http caching daemon" -d /var/cache/squid squid 1>&2 || :
+ /usr/sbin/useradd -o -u 91 -s /bin/false -g squid \
+ -c "SQUID http caching daemon" -d /var/cache/squid squid 1>&2
+ %addusertogroup stats squid
fi
[ -L %{_datadir}/squid/errors ] && rm -rf %{_datadir}/squid/errors || :
%postun
if [ "$1" = "0" ]; then
- /usr/sbin/userdel squid
- /usr/sbin/groupdel squid
+ %userremove squid
+ %groupremove squid
fi
%files
%defattr(644,root,root,755)
-%doc faq CONTRIBUTORS COPYRIGHT CREDITS README ChangeLog QUICKSTART
-%doc RELEASENOTES.html SPONSORS doc/* src/mib.txt
+%doc CONTRIBUTORS COPYRIGHT CREDITS README ChangeLog QUICKSTART RELEASENOTES.html SPONSORS
+%doc doc/* src/mib.txt FAQ*.html book-full.html
%attr(755,root,root) %{_bindir}/squidclient
%attr(755,root,root) %{_libexecdir}/diskd
# YES, it has to be suid root, it sends ICMP packets.
%attr(755,root,root) %dir %{_sysconfdir}
%attr(754,root,root) /etc/rc.d/init.d/squid
-%attr(640,root,root) %config(noreplace) /etc/logrotate.d/squid
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/squid
%attr(640,root,squid) %config(noreplace) /etc/sysconfig/squid
%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