- upgrade to latest upstream 3.0.STABLE2
- check config file before starting (#428998) - whitespace unification of init script - some minor path changes in the QUICKSTART file - configure with the --with-filedescriptors=16384 option
This commit is contained in:
parent
42d57949cb
commit
43fe4737fa
@ -1 +1 @@
|
|||||||
squid-3.0.STABLE1.tar.bz2
|
squid-3.0.STABLE2.tar.bz2
|
||||||
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
ec7458b00a68341854d91e7f6ece56ba squid-3.0.STABLE1.tar.bz2
|
33c89b22aaf27d12b818b5f120aa0322 squid-3.0.STABLE2.tar.bz2
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
diff -up squid-3.0.STABLE1/QUICKSTART.location squid-3.0.STABLE1/QUICKSTART
|
diff -up squid-3.0.STABLE2/QUICKSTART.location squid-3.0.STABLE2/QUICKSTART
|
||||||
--- squid-3.0.STABLE1/QUICKSTART.location 2003-07-18 13:10:32.000000000 +0200
|
--- squid-3.0.STABLE2/QUICKSTART.location 2008-02-10 12:04:32.000000000 +0100
|
||||||
+++ squid-3.0.STABLE1/QUICKSTART 2008-01-23 12:07:50.000000000 +0100
|
+++ squid-3.0.STABLE2/QUICKSTART 2008-03-11 15:53:36.000000000 +0100
|
||||||
@@ -12,10 +12,9 @@ After you retrieved, compiled and instal
|
@@ -12,10 +12,9 @@ After you retrieved, compiled and instal
|
||||||
INSTALL in the same directory), you have to configure the squid.conf
|
INSTALL in the same directory), you have to configure the squid.conf
|
||||||
file. This is the list of the values you *need* to change, because no
|
file. This is the list of the values you *need* to change, because no
|
||||||
@ -18,12 +18,12 @@ diff -up squid-3.0.STABLE1/QUICKSTART.location squid-3.0.STABLE1/QUICKSTART
|
|||||||
always ask permission before adding a parent cache. See also the
|
always ask permission before adding a parent cache. See also the
|
||||||
never_direct/always_direct directives.
|
never_direct/always_direct directives.
|
||||||
|
|
||||||
-cache_dir /usr/local/squid/var/cache 100 16 256
|
-cache_dir ufs /usr/local/squid/var/cache 100 16 256
|
||||||
+cache_dir /var/spool/squid 100 16 256
|
+cache_dir ufs /var/spool/squid 100 16 256
|
||||||
|
|
||||||
Add here (first number, here 100) the amount of hard disk space
|
Add here (first number, here 100) the amount of hard disk space
|
||||||
(in megabytes) to devote to caching.
|
(in megabytes) to devote to caching.
|
||||||
@@ -69,8 +68,8 @@ visible_hostname
|
@@ -69,10 +68,10 @@ visible_hostname
|
||||||
After editing squid.conf to your liking, run Squid from the command
|
After editing squid.conf to your liking, run Squid from the command
|
||||||
line TWICE:
|
line TWICE:
|
||||||
|
|
||||||
@ -32,5 +32,8 @@ diff -up squid-3.0.STABLE1/QUICKSTART.location squid-3.0.STABLE1/QUICKSTART
|
|||||||
+ % /usr/sbin/squid -z
|
+ % /usr/sbin/squid -z
|
||||||
+ % /usr/sbin/squid
|
+ % /usr/sbin/squid
|
||||||
|
|
||||||
Check in the cache.log (/usr/local/squid/var/logs/cache.log) that
|
-Check in the cache.log (/usr/local/squid/var/logs/cache.log) that
|
||||||
|
+Check in the cache.log (/var/log/squid/cache.log) that
|
||||||
everything is all right.
|
everything is all right.
|
||||||
|
|
||||||
|
Once Squid created all its files (it can take several minutes on some
|
||||||
|
178
squid.init
178
squid.init
@ -6,11 +6,11 @@
|
|||||||
# config: /etc/squid/squid.conf
|
# config: /etc/squid/squid.conf
|
||||||
# Short-Description: starting and stopping Squid Internet Object Cache
|
# Short-Description: starting and stopping Squid Internet Object Cache
|
||||||
# Description: Squid - Internet Object Cache. Internet object caching is \
|
# Description: Squid - Internet Object Cache. Internet object caching is \
|
||||||
# a way to store requested Internet objects (i.e., data available \
|
# a way to store requested Internet objects (i.e., data available \
|
||||||
# via the HTTP, FTP, and gopher protocols) on a system closer to the \
|
# via the HTTP, FTP, and gopher protocols) on a system closer to the \
|
||||||
# requesting site than to the source. Web browsers can then use the \
|
# requesting site than to the source. Web browsers can then use the \
|
||||||
# local Squid cache as a proxy HTTP server, reducing access time as \
|
# local Squid cache as a proxy HTTP server, reducing access time as \
|
||||||
# well as bandwidth consumption.
|
# well as bandwidth consumption.
|
||||||
### END INIT INFO
|
### END INIT INFO
|
||||||
|
|
||||||
|
|
||||||
@ -24,10 +24,10 @@ export PATH
|
|||||||
. /etc/sysconfig/network
|
. /etc/sysconfig/network
|
||||||
|
|
||||||
if [ -f /etc/sysconfig/squid ]; then
|
if [ -f /etc/sysconfig/squid ]; then
|
||||||
. /etc/sysconfig/squid
|
. /etc/sysconfig/squid
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# don't raise an error if the config file is incomplete
|
# don't raise an error if the config file is incomplete
|
||||||
# set defaults instead:
|
# set defaults instead:
|
||||||
SQUID_OPTS=${SQUID_OPTS:-"-D"}
|
SQUID_OPTS=${SQUID_OPTS:-"-D"}
|
||||||
SQUID_PIDFILE_TIMEOUT=${SQUID_PIDFILE_TIMEOUT:-20}
|
SQUID_PIDFILE_TIMEOUT=${SQUID_PIDFILE_TIMEOUT:-20}
|
||||||
@ -38,7 +38,7 @@ SQUID_SHUTDOWN_TIMEOUT=${SQUID_SHUTDOWN_TIMEOUT:-100}
|
|||||||
|
|
||||||
if [ "$1" == "status" ]; then
|
if [ "$1" == "status" ]; then
|
||||||
[ -z "$SQUID" ] && exit 4
|
[ -z "$SQUID" ] && exit 4
|
||||||
else
|
else
|
||||||
[ -z "$SQUID" ] && exit 1
|
[ -z "$SQUID" ] && exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -46,7 +46,7 @@ prog="$SQUID"
|
|||||||
|
|
||||||
# determine which one is the cache_swap directory
|
# determine which one is the cache_swap directory
|
||||||
CACHE_SWAP=`sed -e 's/#.*//g' /etc/squid/squid.conf | \
|
CACHE_SWAP=`sed -e 's/#.*//g' /etc/squid/squid.conf | \
|
||||||
grep cache_dir | awk '{ print $3 }'`
|
grep cache_dir | awk '{ print $3 }'`
|
||||||
[ -z "$CACHE_SWAP" ] && CACHE_SWAP=/var/spool/squid
|
[ -z "$CACHE_SWAP" ] && CACHE_SWAP=/var/spool/squid
|
||||||
|
|
||||||
RETVAL=0
|
RETVAL=0
|
||||||
@ -57,116 +57,124 @@ probe() {
|
|||||||
|
|
||||||
# check if the squid conf file is present
|
# check if the squid conf file is present
|
||||||
[ -f /etc/squid/squid.conf ] || exit 6
|
[ -f /etc/squid/squid.conf ] || exit 6
|
||||||
}
|
}
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
probe
|
probe
|
||||||
|
|
||||||
for adir in $CACHE_SWAP; do
|
$SQUID -k parse
|
||||||
if [ ! -d $adir/00 ]; then
|
RETVAL=$?
|
||||||
echo -n "init_cache_dir $adir... "
|
if [ $RETVAL -ne 0 ]; then
|
||||||
$SQUID -z -F -D >> /var/log/squid/squid.out 2>&1
|
echo -n $"Starting $prog: "
|
||||||
|
echo_failure
|
||||||
|
echo
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
for adir in $CACHE_SWAP; do
|
||||||
|
if [ ! -d $adir/00 ]; then
|
||||||
|
echo -n "init_cache_dir $adir... "
|
||||||
|
$SQUID -z -F -D >> /var/log/squid/squid.out 2>&1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
echo -n $"Starting $prog: "
|
echo -n $"Starting $prog: "
|
||||||
$SQUID $SQUID_OPTS >> /var/log/squid/squid.out 2>&1
|
$SQUID $SQUID_OPTS >> /var/log/squid/squid.out 2>&1
|
||||||
RETVAL=$?
|
RETVAL=$?
|
||||||
if [ $RETVAL -eq 0 ]; then
|
if [ $RETVAL -eq 0 ]; then
|
||||||
timeout=0;
|
timeout=0;
|
||||||
while : ; do
|
while : ; do
|
||||||
[ ! -f /var/run/squid.pid ] || break
|
[ ! -f /var/run/squid.pid ] || break
|
||||||
if [ $timeout -ge $SQUID_PIDFILE_TIMEOUT ]; then
|
if [ $timeout -ge $SQUID_PIDFILE_TIMEOUT ]; then
|
||||||
RETVAL=1
|
RETVAL=1
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
sleep 1 && echo -n "."
|
sleep 1 && echo -n "."
|
||||||
timeout=$((timeout+1))
|
timeout=$((timeout+1))
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$SQUID
|
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$SQUID
|
||||||
[ $RETVAL -eq 0 ] && echo_success
|
[ $RETVAL -eq 0 ] && echo_success
|
||||||
[ $RETVAL -ne 0 ] && echo_failure
|
[ $RETVAL -ne 0 ] && echo_failure
|
||||||
echo
|
echo
|
||||||
return $RETVAL
|
return $RETVAL
|
||||||
}
|
}
|
||||||
|
|
||||||
stop() {
|
stop() {
|
||||||
echo -n $"Stopping $prog: "
|
echo -n $"Stopping $prog: "
|
||||||
$SQUID -k check >> /var/log/squid/squid.out 2>&1
|
$SQUID -k check >> /var/log/squid/squid.out 2>&1
|
||||||
RETVAL=$?
|
RETVAL=$?
|
||||||
if [ $RETVAL -eq 0 ] ; then
|
if [ $RETVAL -eq 0 ] ; then
|
||||||
$SQUID -k shutdown &
|
$SQUID -k shutdown &
|
||||||
rm -f /var/lock/subsys/$SQUID
|
rm -f /var/lock/subsys/$SQUID
|
||||||
timeout=0
|
timeout=0
|
||||||
while : ; do
|
while : ; do
|
||||||
[ -f /var/run/squid.pid ] || break
|
[ -f /var/run/squid.pid ] || break
|
||||||
if [ $timeout -ge $SQUID_SHUTDOWN_TIMEOUT ]; then
|
if [ $timeout -ge $SQUID_SHUTDOWN_TIMEOUT ]; then
|
||||||
echo
|
echo
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
sleep 2 && echo -n "."
|
sleep 2 && echo -n "."
|
||||||
timeout=$((timeout+2))
|
timeout=$((timeout+2))
|
||||||
done
|
done
|
||||||
echo_success
|
echo_success
|
||||||
echo
|
echo
|
||||||
else
|
else
|
||||||
echo_failure
|
echo_failure
|
||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
return $RETVAL
|
return $RETVAL
|
||||||
}
|
}
|
||||||
|
|
||||||
reload() {
|
reload() {
|
||||||
$SQUID $SQUID_OPTS -k reconfigure
|
$SQUID $SQUID_OPTS -k reconfigure
|
||||||
}
|
}
|
||||||
|
|
||||||
restart() {
|
restart() {
|
||||||
stop
|
stop
|
||||||
start
|
start
|
||||||
}
|
|
||||||
|
|
||||||
condrestart() {
|
|
||||||
[ -e /var/lock/subsys/squid ] && restart || :
|
|
||||||
}
|
}
|
||||||
|
|
||||||
rhstatus() {
|
condrestart() {
|
||||||
status $SQUID && $SQUID -k check
|
[ -e /var/lock/subsys/squid ] && restart || :
|
||||||
|
}
|
||||||
|
|
||||||
|
rhstatus() {
|
||||||
|
status $SQUID && $SQUID -k check
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
start
|
start
|
||||||
;;
|
;;
|
||||||
|
|
||||||
stop)
|
stop)
|
||||||
stop
|
stop
|
||||||
;;
|
;;
|
||||||
|
|
||||||
reload)
|
reload)
|
||||||
reload
|
reload
|
||||||
;;
|
;;
|
||||||
|
|
||||||
restart)
|
restart)
|
||||||
restart
|
restart
|
||||||
;;
|
;;
|
||||||
|
|
||||||
condrestart)
|
condrestart)
|
||||||
condrestart
|
condrestart
|
||||||
;;
|
;;
|
||||||
|
|
||||||
status)
|
status)
|
||||||
rhstatus
|
rhstatus
|
||||||
;;
|
;;
|
||||||
|
|
||||||
probe)
|
probe)
|
||||||
probe
|
probe
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
echo $"Usage: $0 {start|stop|status|reload|restart|condrestart|probe}"
|
echo $"Usage: $0 {start|stop|status|reload|restart|condrestart|probe}"
|
||||||
exit 2
|
exit 2
|
||||||
esac
|
esac
|
||||||
|
|
||||||
exit $?
|
exit $?
|
||||||
|
18
squid.spec
18
squid.spec
@ -3,11 +3,11 @@
|
|||||||
## % define __find_requires %{SOURCE99}
|
## % define __find_requires %{SOURCE99}
|
||||||
|
|
||||||
Name: squid
|
Name: squid
|
||||||
Version: 3.0.STABLE1
|
Version: 3.0.STABLE2
|
||||||
Release: 3%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: The Squid proxy caching server
|
Summary: The Squid proxy caching server
|
||||||
Epoch: 7
|
Epoch: 7
|
||||||
License: GPLv2
|
License: GPLv2+
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
URL: http://www.squid-cache.org
|
URL: http://www.squid-cache.org
|
||||||
Source: http://www.squid-cache.org/Squid/Versions/v3/3.0/squid-%{version}.tar.bz2
|
Source: http://www.squid-cache.org/Squid/Versions/v3/3.0/squid-%{version}.tar.bz2
|
||||||
@ -32,7 +32,7 @@ Patch203: squid-3.0.STABLE1-build.patch
|
|||||||
Patch204: squid-3.0.STABLE1-perlpath.patch
|
Patch204: squid-3.0.STABLE1-perlpath.patch
|
||||||
Patch205: squid-3.0.STABLE1-smb-path.patch
|
Patch205: squid-3.0.STABLE1-smb-path.patch
|
||||||
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
Requires: bash >= 2.0
|
Requires: bash >= 2.0
|
||||||
Requires(pre): shadow-utils
|
Requires(pre): shadow-utils
|
||||||
Requires(post): /sbin/chkconfig
|
Requires(post): /sbin/chkconfig
|
||||||
@ -97,9 +97,10 @@ export CXXFLAGS="-fPIE" ; export CFLAGS="-fPIE -Os -g -pipe -fsigned-char" ; exp
|
|||||||
--enable-wccpv2 \
|
--enable-wccpv2 \
|
||||||
--with-aio \
|
--with-aio \
|
||||||
--with-default-user="squid" \
|
--with-default-user="squid" \
|
||||||
|
--with-filedescriptors=16384 \
|
||||||
--with-dl \
|
--with-dl \
|
||||||
--with-openssl=/usr/kerberos \
|
--with-openssl=/usr/kerberos \
|
||||||
--with-pthreads \
|
--with-pthreads
|
||||||
|
|
||||||
# following options are no longer supported
|
# following options are no longer supported
|
||||||
# --with-winbind-auth-challenge \
|
# --with-winbind-auth-challenge \
|
||||||
@ -330,6 +331,13 @@ fi
|
|||||||
chgrp squid /var/cache/samba/winbindd_privileged >/dev/null 2>&1 || :
|
chgrp squid /var/cache/samba/winbindd_privileged >/dev/null 2>&1 || :
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Mar 13 2008 Martin Nagy <mnagy@redhat.com> - 7:3.0.STABLE2-1
|
||||||
|
- upgrade to latest upstream 3.0.STABLE2
|
||||||
|
- check config file before starting (#428998)
|
||||||
|
- whitespace unification of init script
|
||||||
|
- some minor path changes in the QUICKSTART file
|
||||||
|
- configure with the --with-filedescriptors=16384 option
|
||||||
|
|
||||||
* Tue Feb 26 2008 Martin Nagy <mnagy@redhat.com> - 7:3.0.STABLE1-3
|
* Tue Feb 26 2008 Martin Nagy <mnagy@redhat.com> - 7:3.0.STABLE1-3
|
||||||
- change the cache_effective_group default back to none
|
- change the cache_effective_group default back to none
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user