summaryrefslogtreecommitdiff
path: root/network/squid
diff options
context:
space:
mode:
Diffstat (limited to 'network/squid')
-rw-r--r--network/squid/README4
-rw-r--r--network/squid/rc.squid.new83
-rw-r--r--network/squid/slack-desc11
-rw-r--r--network/squid/squid.SlackBuild17
-rw-r--r--network/squid/squid.conf2
-rw-r--r--network/squid/squid.info8
-rw-r--r--network/squid/squid.logrotate13
7 files changed, 34 insertions, 104 deletions
diff --git a/network/squid/README b/network/squid/README
index ecff64fc7d..87cfca48af 100644
--- a/network/squid/README
+++ b/network/squid/README
@@ -7,4 +7,6 @@ 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.
-See /usr/doc/squid-3.0.STABLE13/README.SBo for configuration help.
+See /usr/doc/squid-3.0.STABLE21/README.SBo for configuration help.
+Note that the default squid.conf and /etc/logrotate.d/squid files have
+changed in this release, so be sure to merge the changes into place.
diff --git a/network/squid/rc.squid.new b/network/squid/rc.squid.new
deleted file mode 100644
index 4810dae64f..0000000000
--- a/network/squid/rc.squid.new
+++ /dev/null
@@ -1,83 +0,0 @@
-#!/bin/sh
-# Start/stop/restart/reload the Squid Internet Object Cache (squid)
-# To make Squid start automatically at boot, make this
-# file executable: chmod 755 /etc/rc.d/rc.Squid
-#
-# Written for Slackware Linux by Erik Jan Tromp
-# Modified by David Somero <xgizzmo@slackbuilds.org>
-
-SQUIDCFG=/etc/squid/squid.conf
-SQUIDCMD=/usr/sbin/squid
-
-if [ ! -r $SQUIDCFG ]; then
- echo "Please set the correct path to $SQUIDCFG"
- exit 1
-fi
-
-if [ ! -x $SQUIDCMD ]; then
- echo "$SQUIDCMD not found"
- exit 1
-fi
-
-squid_start() {
- # Create cache directory hierarchy if needed
- ALL_DIRS=$(awk '/^cache_dir/ {print $3}' $SQUIDCFG)
- [ -z "$ALL_DIRS" ] && ALL_DIRS=/var/cache/squid
-
- for CACHE_DIR in $ALL_DIRS ; do
- if [ ! -d $CACHE_DIR/00 ] ; then
- echo "Creating swap directories: $SQUIDCMD -z"
- $SQUIDCMD -z 2> /dev/null
- break
- fi
- done
-
- echo "Starting Squid: $SQUIDCMD -DF"
- $SQUIDCMD -DF
-}
-
-squid_stop() {
- COUNTDOWN=$(awk '/^shutdown_lifetime/ {print $2}' $SQUIDCFG)
- [ -z "$COUNTDOWN" ] && COUNTDOWN=30
-
- echo -n "Shutting down Squid in $COUNTDOWN seconds: "
- $SQUIDCMD -k shutdown 2> /dev/null
- while $SQUIDCMD -k check 2> /dev/null ; do
- sleep 1
- echo -n .
- COUNTDOWN=$[ $COUNTDOWN - 1 ]
- if [ $COUNTDOWN -le 0 ] ; then
- $SQUIDCMD -k interrupt 2> /dev/null
- sleep 1
- break
- fi
- done
- echo
-}
-
-squid_restart() {
- squid_stop
- sleep 1
- squid_start
-}
-
-squid_reload() {
- $SQUIDCMD -k reconfigure 2> /dev/null
-}
-
-case "$1" in
-'start')
- squid_start
- ;;
-'stop')
- squid_stop
- ;;
-'restart')
- squid_restart
- ;;
-'reload')
- squid_reload
- ;;
-*)
- echo "usage: $0 start|stop|restart|reload"
-esac
diff --git a/network/squid/slack-desc b/network/squid/slack-desc
index aad25c1c9e..4c31860d82 100644
--- a/network/squid/slack-desc
+++ b/network/squid/slack-desc
@@ -12,9 +12,8 @@ squid: Squid is a high-performance proxy caching server for web clients,
squid: supporting FTP, gopher, and HTTP data objects.
squid:
squid: Homepage: http://www.squid-cache.org/
-squid:
-squid:
-squid:
-squid:
-squid:
-
+squid:
+squid:
+squid:
+squid:
+squid:
diff --git a/network/squid/squid.SlackBuild b/network/squid/squid.SlackBuild
index 5995673077..f06620a899 100644
--- a/network/squid/squid.SlackBuild
+++ b/network/squid/squid.SlackBuild
@@ -3,7 +3,7 @@
# Slackware build script for squid
# http://www.squid-cache.org/
-# Copyright 2006-2008 David Somero (dsomero@hotmail.com) Athens,TN USA
+# Copyright 2006-2009 David Somero (dsomero@hotmail.com) Athens,TN USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,7 +24,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=squid
-VERSION=3.0.STABLE14
+VERSION=3.0.STABLE21
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -39,10 +39,13 @@ SQUIDGROUP=${SQUIDGROUP:-nobody}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
fi
set -e
@@ -64,15 +67,17 @@ CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc/squid \
--localstatedir=/var/log/squid \
--datadir=/usr/share/squid \
--mandir=/usr/man \
--enable-snmp \
+ --enable-auth="basic" \
+ --enable-basic-auth-helpers="NCSA" \
--enable-linux-netfilter \
--enable-async-io \
- --build=$ARCH-slackware-linux \
- --host=$ARCH-slackware-linux
+ --build=$ARCH-slackware-linux
make all
make install DESTDIR=$PKG
@@ -81,7 +86,7 @@ make install DESTDIR=$PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
xargs strip --strip-unneeded 2> /dev/null || true
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
- xargs strip --strip-unneeded 2> /dev/null
+ xargs strip --strip-unneeded 2> /dev/null || true
)
( cd $PKG/usr/man
@@ -125,4 +130,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/network/squid/squid.conf b/network/squid/squid.conf
index 4e65bc782c..28b2fc0c75 100644
--- a/network/squid/squid.conf
+++ b/network/squid/squid.conf
@@ -1919,7 +1919,7 @@ cache_store_log /var/log/squid/store.log
# <pid>'.
#
#Default:
-# logfile_rotate 10
+logfile_rotate 0
# TAG: emulate_httpd_log on|off
# The Cache can emulate the log file format which many 'httpd'
diff --git a/network/squid/squid.info b/network/squid/squid.info
index c78e01eae9..010096a4b4 100644
--- a/network/squid/squid.info
+++ b/network/squid/squid.info
@@ -1,8 +1,10 @@
PRGNAM="squid"
-VERSION="3.0.STABLE14"
+VERSION="3.0.STABLE21"
HOMEPAGE="http://www.squid-cache.org/"
-DOWNLOAD="http://www.squid-cache.org/Versions/v3/3.0/squid-3.0.STABLE14.tar.bz2"
-MD5SUM="7aaff2319d2263404d788a82a10c8633"
+DOWNLOAD="http://www.squid-cache.org/Versions/v3/3.0/squid-3.0.STABLE21.tar.bz2"
+MD5SUM="279168fe1fe5b38bbf6eee12babbc4ad"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
MAINTAINER="David Somero"
EMAIL="dsomero@hotmail.com"
APPROVED="rworkman"
diff --git a/network/squid/squid.logrotate b/network/squid/squid.logrotate
index e6d8309b7b..cad527de36 100644
--- a/network/squid/squid.logrotate
+++ b/network/squid/squid.logrotate
@@ -1,13 +1,18 @@
+# We set logfile_rotate=0 in squid.conf, which disables filename rotation
+# by squid itself (as we'll let logrotate handle the filename rotation), but
+# squid still closes and then reopens the logfile. The goal of this file is
+# to rotate the logfile (rename it from squid.log to squid.log.1) without
+# compressing it immediately, as squid will still be writing to the renamed
+# log file. Then the postrotate script will tell squid to close and then
+# reopen squid.log, effectively using the new logfile. The old logfile
+# (squid.log.1) will be compressed by logrotate's next invocation.
/var/log/squid/*.log {
weekly
rotate 5
- copytruncate
compress
+ delaycompress
notifempty
missingok
-# This script asks squid to rotate its logs on its own.
-# Restarting squid is a long process and it is not worth
-# doing it just to rotate logs
postrotate
/usr/sbin/squid -k rotate
endscript