Summary: The SQUID proxy caching server. Name: squid %define squid_version 2.2.STABLE5 %define squid_rpm_version 2.2.5 Version: %{squid_rpm_version} Release: 3 Copyright: GPL Group: System Environment/Daemons URL: http://home.earthlink.net/~intrep/ Packager: Andrew Herrick Distribution: RedHat Linux 6.x Vendor: Squid Team Source: http://squid.nlanr.net/Squid/v2/2.2/squid-%{squid_version}-src.tar.gz Source1: ftp://squid.nlanr.net/web/Squid/FAQ/FAQ.sgml Source2: squid.init Source3: squid.logrotate Patch0: squid-2.2.5-make.patch Patch1: squid-2.2.5-config.patch Patch2: squid-2.2.5-script.patch Patch3: squid-2.2.stable4.webdav_support2.patch BuildRequires: sgml-tools BuildRoot: /var/tmp/squid-root Prereq: /sbin/chkconfig logrotate shadow-utils Obsoletes: squid-novm, squid+icmp, squid-rhcn %description Squid is a high-performance proxy caching server for web clients, supporting FTP, gopher, and HTTP data objects. Unlike traditional caching software, Squid handles all requests in a single, non-blocking, I/O-driven process. Squid keeps meta data and especially hot objects cached in RAM, caches DNS lookups, supports non-blocking DNS lookups, and implements negative caching of failed requests. Squid supports SSL, extensive access controls, and full request logging. By using the lightweight Internet Cache Protocol, Squid caches can be arranged in a hierarchy or mesh for additional bandwidth savings. Squid consists of a main server program squid, a Domain Name System lookup program dnsserver, a program for retrieving FTP data ftpget, and some management and client tools. When squid starts up, it spawns a configurable number of dnsserver processes, each of which can perform a single, blocking Domain Name System (DNS) lookup. This reduces the amount of time the cache waits for DNS lookups. Squid is derived from the ARPA-funded Harvest project. %prep %setup -q -n squid-%{squid_version} %patch0 -p1 -b .make %patch1 -p1 -b .config %patch2 -p1 -b .script cd src %patch3 -p0 -b .webdav cd .. %build CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr \ --exec_prefix=/usr --bindir=/usr/sbin --libexecdir=/usr/lib/squid \ --localstatedir=/var --sysconfdir=/etc/squid \ --enable-poll # --enable-htcp --enable-icmp --enable-snmp --enable-delay-pools # To enable htcp, icmp, snmp or delay pools simply put the desired # line(s) right after the --enable-poll above. # i.e. ' --enable-poll --enable-icmp --enable-snmp' make -f makefile make -C auth_modules/NCSA mkdir script cp scripts/*.pl script mkdir faq cp $RPM_SOURCE_DIR/FAQ.sgml faq cd faq sgml2html FAQ.sgml %install rm -rf $RPM_BUILD_ROOT make install \ prefix=$RPM_BUILD_ROOT/usr \ sysconfdir=$RPM_BUILD_ROOT/etc/squid \ localstatedir=$RPM_BUILD_ROOT/var \ bindir=$RPM_BUILD_ROOT/usr/sbin \ libexecdir=$RPM_BUILD_ROOT/usr/lib/squid #install -m 4750 src/pinger $RPM_BUILD_ROOT/usr/lib/squid cd errors rm -rf $RPM_BUILD_ROOT/etc/squid/errors mkdir -p $RPM_BUILD_ROOT/usr/lib/squid/errors for i in *; do if [ -d $i ]; then mkdir -p $RPM_BUILD_ROOT/usr/lib/squid/errors/$i install -m 644 $i/* $RPM_BUILD_ROOT/usr/lib/squid/errors/$i fi done ln -s /usr/lib/squid/errors/English $RPM_BUILD_ROOT/etc/squid/errors mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d install -m 755 $RPM_SOURCE_DIR/squid.init $RPM_BUILD_ROOT/etc/rc.d/init.d/squid install -m 644 $RPM_SOURCE_DIR/squid.logrotate $RPM_BUILD_ROOT/etc/logrotate.d/squid mkdir -p $RPM_BUILD_ROOT/var/log/squid mkdir -p $RPM_BUILD_ROOT/var/spool/cache strip $RPM_BUILD_ROOT/usr/bin/* $RPM_BUILD_ROOT/usr/sbin/* \ $RPM_BUILD_ROOT/usr/lib/squid/* || : %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %config /etc/squid/squid.conf %config /etc/squid/mime.conf %config /etc/squid/mib.txt /etc/squid/squid.conf.default /etc/squid/mime.conf.default /etc/squid/errors /usr/lib/squid/errors /usr/lib/squid/icons /usr/lib/squid/dnsserver /usr/lib/squid/unlinkd #%attr(4750,root,squid) /usr/lib/squid/pinger /usr/sbin/squid /usr/sbin/client /usr/lib/squid/cachemgr.cgi %config /etc/rc.d/init.d/squid %config /etc/logrotate.d/squid %doc faq/* README ChangeLog QUICKSTART doc/* %doc contrib/url-normalizer.pl contrib/rredir.* contrib/user-agents.pl %doc auth_modules/NCSA/ncsa_auth %doc script %attr(750,nobody,nobody) %dir /var/log/squid %attr(750,nobody,nobody) %dir /var/spool/cache %pre for i in /var/{log/squid,spool/cache} ; do if [ -d $i ] ; then for adir in `find $i -maxdepth 0 \! -user nobody`; do chown -R nobody.nobody $adir done fi done exit 0 %post /sbin/chkconfig --add squid if [ $1 = 0 ]; then case "$LANG" in bg*) DIR=Bulgarian ;; cs*) DIR=Czech ;; nl*) DIR=Dutch ;; ea*) DIR=Estonian ;; fr*) DIR=French ;; de*) DIR=German ;; en*) DIR=English ;; hu*) DIR=Hungarian ;; it*) DIR=Italian ;; ja*) DIR=Japanese ;; pl*) DIR=Polish ;; pt*) DIR=Portuguese ;; ru*) DIR=Russian-koi8-r ;; sk*) DIR=Slovak ;; es*) DIR=Spanish ;; zh*) DIR=Traditional_Chinese ;; tr*) DIR=Turkish ;; *) DIR=English ;; esac ln -snf /usr/lib/squid/errors/$DIR /etc/squid/errors fi %preun if [ $1 = 0 ] ; then /sbin/chkconfig --del squid fi %changelog * Sat Sep 25 1999 Andrew Herrick - 2.2.STABLE5 - Started fresh from redhat spec file. - Took best features from previous spec file - Cleaned up cruft from redhat spec file * Wed Jul 28 1999 Bill Nottingham - put cachemgr.cgi back in /usr/lib/squid * Wed Jul 14 1999 Bill Nottingham - add webdav bugfix patch (#4027) * Mon Jul 12 1999 Bill Nottingham - fix path to config in squid.init (confuses linuxconf) * Wed Jul 7 1999 Bill Nottingham - 2.2.STABLE4 * Wed Jun 9 1999 Dale Lovelace - logrotate changes - errors from find when /var/spool/squid or - /var/log/squid didn't exist * Thu May 20 1999 Bill Nottingham - 2.2.STABLE3 * Thu Apr 22 1999 Bill Nottingham - update to 2.2.STABLE.2 * Sun Apr 18 1999 Bill Nottingham - update to 2.2.STABLE1 * Thu Apr 15 1999 Bill Nottingham - don't need to run groupdel on remove - fix useradd * Mon Apr 12 1999 Bill Nottingham - fix effective_user (bug #2124) * Mon Apr 5 1999 Bill Nottingham - strip binaries * Thu Apr 1 1999 Bill Nottingham - duh. adduser does require a user name. - add a serial number * Tue Mar 30 1999 Bill Nottingham - add an adduser in %pre, too * Thu Mar 25 1999 Bill Nottingham - oog. chkconfig must be in %preun, not %postun * Wed Mar 24 1999 Bill Nottingham - switch to using group squid - turn off icmp (insecure) - update to 2.2.DEVEL3 - build FAQ docs from source * Tue Mar 23 1999 Bill Nottingham - logrotate changes * Sun Mar 21 1999 Cristian Gafton - auto rebuild in the new build environment (release 4) * Wed Feb 10 1999 Bill Nottingham - update to 2.2.PRE2 * Wed Dec 30 1998 Bill Nottingham - cache & log dirs shouldn't be world readable - remove preun script (leave logs & cache @ uninstall) * Tue Dec 29 1998 Bill Nottingham - fix initscript to get cache_dir correct * Fri Dec 18 1998 Bill Nottingham - update to 2.1.PATCH2 - merge in some changes from RHCN version * Sat Oct 10 1998 Cristian Gafton - strip binaries - version 1.1.22 * Sun May 10 1998 Cristian Gafton - don't make packages conflict with each other... * Sat May 02 1998 Cristian Gafton - added a proxy auth patch from Alex deVries - fixed initscripts * Thu Apr 09 1998 Cristian Gafton - rebuilt for Manhattan * Fri Mar 20 1998 Cristian Gafton - upgraded to 1.1.21/1.NOVM.21 * Mon Mar 02 1998 Cristian Gafton - updated the init script to use reconfigure option to restart squid instead of shutdown/restart (both safer and quicker) * Sat Feb 07 1998 Cristian Gafton - upgraded to 1.1.20 - added the NOVM package and tryied to reduce the mess in the spec file * Wed Jan 7 1998 Cristian Gafton - first build against glibc - patched out the use of setresuid(), which is available only on kernels 2.1.44 and later