svn commit: r320406 - in head/www/squid33: . files
Thomas-Martin Seck
tmseck at FreeBSD.org
Sun Jun 9 19:47:48 UTC 2013
Author: tmseck
Date: Sun Jun 9 19:47:46 2013
New Revision: 320406
URL: http://svnweb.freebsd.org/changeset/ports/320406
Log:
- Update to 3.3.5 including vendor patches 12566 to 12572
- Remove some leftovers from the repocopy of squid32 [1]
- Move the creation/deletion of the Squid state directory from
pkg-install/pkg-deinstall to rc.d/squid [2]
- Add a squid_getpid function and update the procname pattern to get
the correct name and PID of Squid's master process
PR: ports/178511 [1]
Submitted by: crees [2]
Approved by: crees (mentor)
Modified:
head/www/squid33/Makefile
head/www/squid33/distinfo
head/www/squid33/files/pkg-install.in
head/www/squid33/files/pkg-message.in
head/www/squid33/files/squid.in
head/www/squid33/pkg-deinstall
Modified: head/www/squid33/Makefile
==============================================================================
--- head/www/squid33/Makefile Sun Jun 9 19:30:58 2013 (r320405)
+++ head/www/squid33/Makefile Sun Jun 9 19:47:46 2013 (r320406)
@@ -39,7 +39,6 @@
PORTNAME= squid
PORTVERSION= 3.3.${SQUID_STABLE_VER}
-PORTREVISION= 1
CATEGORIES= www ipv6
MASTER_SITES= ftp://ftp.squid-cache.org/pub/%SUBDIR%/ \
http://mirrors.ccs.neu.edu/Squid/ \
@@ -48,14 +47,14 @@ MASTER_SITES= ftp://ftp.squid-cache.org/
ftp://ftp.solnet.ch/mirror/squid/ \
ftp://ftp.ntua.gr/pub/www/Squid/squid/ \
${MASTER_SITE_RINGSERVER:S,%SUBDIR%,net/www/squid,} \
- http://www.squid-cache.org/Versions/v3/3.2/ \
- http://www2.us.squid-cache.org/Versions/v3/3.2/ \
- http://www3.us.squid-cache.org/Versions/v3/3.2/ \
- http://www1.at.squid-cache.org/Versions/v3/3.2/ \
- http://www.eu.squid-cache.org/Versions/v3/3.2/ \
- http://www1.ie.squid-cache.org/Versions/v3/3.2/ \
- http://www1.jp.squid-cache.org/Versions/v3/3.2/ \
- http://www1.za.squid-cache.org/Versions/v3/3.2/
+ http://www.squid-cache.org/Versions/v3/${PORTVERSION:R}/ \
+ http://www2.us.squid-cache.org/Versions/v3/${PORTVERSION:R}/ \
+ http://www3.us.squid-cache.org/Versions/v3/${PORTVERSION:R}/ \
+ http://www1.at.squid-cache.org/Versions/v3/${PORTVERSION:R}/ \
+ http://www.eu.squid-cache.org/Versions/v3/${PORTVERSION:R}/ \
+ http://www1.ie.squid-cache.org/Versions/v3/${PORTVERSION:R}/ \
+ http://www1.jp.squid-cache.org/Versions/v3/${PORTVERSION:R}/ \
+ http://www1.za.squid-cache.org/Versions/v3/${PORTVERSION:R}/
MASTER_SITE_SUBDIR= squid
DIST_SUBDIR= squid3.3
@@ -67,8 +66,14 @@ PATCH_SITES= http://www.squid-cache.org/
http://www1.ie.squid-cache.org/%SUBDIR%/ \
http://www1.jp.squid-cache.org/%SUBDIR%/ \
http://www2.tw.squid-cache.org/%SUBDIR%/
-PATCH_SITE_SUBDIR= Versions/v3/3.2/changesets
-PATCHFILES= #empty
+PATCH_SITE_SUBDIR= Versions/v3/${PORTVERSION:R}/changesets
+PATCHFILES= squid-3.3-12566.patch \
+ squid-3.3-12567.patch \
+ squid-3.3-12568.patch \
+ squid-3.3-12569.patch \
+ squid-3.3-12570.patch \
+ squid-3.3-12571.patch \
+ squid-3.3-12572.patch
MAINTAINER= tmseck at FreeBSD.org
COMMENT= HTTP Caching Proxy
@@ -78,7 +83,7 @@ LICENSE_FILE= ${WRKSRC}/COPYING
LATEST_LINK= squid33
-SQUID_STABLE_VER= 4
+SQUID_STABLE_VER= 5
CONFLICTS_INSTALL= squid-2.[0-9].* squid-3.[!3].* cacheboy-[0-9]* lusca-head-[0-9]*
GNU_CONFIGURE= yes
Modified: head/www/squid33/distinfo
==============================================================================
--- head/www/squid33/distinfo Sun Jun 9 19:30:58 2013 (r320405)
+++ head/www/squid33/distinfo Sun Jun 9 19:47:46 2013 (r320406)
@@ -1,2 +1,16 @@
-SHA256 (squid3.3/squid-3.3.4.tar.bz2) = e962c27a294f6dd57a32fdc493e32c16d24687035f03f1140c491fb8c12ce170
-SIZE (squid3.3/squid-3.3.4.tar.bz2) = 2987756
+SHA256 (squid3.3/squid-3.3.5.tar.bz2) = eb60d37721ac8180269bc3d8b27c0c688ed7fef0412b35cc51875d085e821355
+SIZE (squid3.3/squid-3.3.5.tar.bz2) = 2990661
+SHA256 (squid3.3/squid-3.3-12566.patch) = f8410049bb8bba3ed80bd82c25c0e6fe694ec9ef132696a67cb35a6ae1674857
+SIZE (squid3.3/squid-3.3-12566.patch) = 3125
+SHA256 (squid3.3/squid-3.3-12567.patch) = 1509b86bdd24587d56542c13dc2966437911ac98f4eb984616b6b8d5efddea11
+SIZE (squid3.3/squid-3.3-12567.patch) = 1582
+SHA256 (squid3.3/squid-3.3-12568.patch) = 259e73aa5e5aa547db0c2f051d02cc2abbf92e55b9790691263a72706c058c1f
+SIZE (squid3.3/squid-3.3-12568.patch) = 1657
+SHA256 (squid3.3/squid-3.3-12569.patch) = a3fdfdcaad9e65519992338cb8054ebf9a34978effd7f58c765e9f417f58b891
+SIZE (squid3.3/squid-3.3-12569.patch) = 2370
+SHA256 (squid3.3/squid-3.3-12570.patch) = 4ab5b0722bcaad33b0bee428c801b714af8a91414c5c7c5cb7141af6dca35d22
+SIZE (squid3.3/squid-3.3-12570.patch) = 1417
+SHA256 (squid3.3/squid-3.3-12571.patch) = 7709fa29ce6ff9a8a853c60837492afcb670a80a0b941e7ecd8b3ba3576ad0b5
+SIZE (squid3.3/squid-3.3-12571.patch) = 7368
+SHA256 (squid3.3/squid-3.3-12572.patch) = 6acc746569c8a770937f1e1f497c4e3e56ea23bd1c73682da339aaf84c7e1bd2
+SIZE (squid3.3/squid-3.3-12572.patch) = 2952
Modified: head/www/squid33/files/pkg-install.in
==============================================================================
--- head/www/squid33/files/pkg-install.in Sun Jun 9 19:30:58 2013 (r320405)
+++ head/www/squid33/files/pkg-install.in Sun Jun 9 19:47:46 2013 (r320406)
@@ -9,7 +9,6 @@ squid_homedir="/var/squid"
squid_cache_basedir="${squid_homedir}/cache"
squid_confdir="${PKG_PREFIX:-%%PREFIX%%}/etc/squid"
squid_logdir="/var/log/squid"
-squid_rundir="/var/run/squid"
# these are hardcoded, see /usr/ports/UIDs and /usr/ports/GIDs:
squid_user=squid
squid_group=squid
@@ -54,14 +53,6 @@ POST-INSTALL)
chown ${squid_user} ${squid_logdir}
chgrp ${squid_group} ${squid_logdir}
fi
- if [ ! -d ${squid_rundir} ]; then
- echo "Creating ${squid_rundir}..."
- install -d -o ${squid_user} -g ${squid_group} \
- -m 0755 ${squid_rundir}
- else
- chown ${squid_user} ${squid_rundir}
- chgrp ${squid_group} ${squid_rundir}
- fi
for file in cachemgr.conf errorpage.css mime.conf msntauth.conf squid.conf; do
if [ ! -f ${squid_confdir}/${file} \
-a -f ${squid_confdir}/${file}.default ]; then
Modified: head/www/squid33/files/pkg-message.in
==============================================================================
--- head/www/squid33/files/pkg-message.in Sun Jun 9 19:30:58 2013 (r320405)
+++ head/www/squid33/files/pkg-message.in Sun Jun 9 19:47:46 2013 (r320406)
@@ -22,7 +22,7 @@
Note:
If you just updated your Squid installation from an earlier version,
- make sure to check your Squid configuration against the 3.2 default
+ make sure to check your Squid configuration against the 3.3 default
configuration file %%PREFIX%%/etc/squid/squid.conf.default.
%%PREFIX%%/etc/squid/squid.conf.documented is a fully annotated
Modified: head/www/squid33/files/squid.in
==============================================================================
--- head/www/squid33/files/squid.in Sun Jun 9 19:30:58 2013 (r320405)
+++ head/www/squid33/files/squid.in Sun Jun 9 19:47:46 2013 (r320406)
@@ -53,21 +53,24 @@ load_rc_config ${name}
: ${squid_pidfile:=/var/run/squid/squid.pid}
: ${squid_user:=squid}
-command=%%PREFIX%%/sbin/squid
+squid_command="%%PREFIX%%/sbin/squid"
# Make sure that we invoke squid with "-f ${squid_conf}"; define this
# variable early so reload_cmd and stop_precmd pick it up:
-command_args="-f ${squid_conf}"
+required_args="-f ${squid_conf}"
extra_commands=reload
-reload_cmd="${command} ${command_args} ${squid_flags} -k reconfigure"
-start_precmd=squid_setfib
-stop_precmd="${command} ${command_args} ${squid_flags} -k check 2>/dev/null"
+reload_cmd="${squid_command} ${required_args} ${squid_flags} -k reconfigure"
+start_precmd=squid_prestart
+start_cmd="${squid_command} ${required_args} ${squid_flags}"
+start_postcmd=squid_getpid
+stop_precmd="${squid_command} ${required_args} ${squid_flags} -k check 2>/dev/null"
stop_cmd=squid_stop
pidfile=${squid_pidfile}
-procname=squid-1
+procname="?squid-*"
required_dirs=${squid_chdir}
+state_dir=/var/run/squid
# squid(8) will not start if ${squid_conf} is not present so try
# to catch that beforehand via ${required_files} rather than make
@@ -75,8 +78,13 @@ required_dirs=${squid_chdir}
required_files=${squid_conf}
-squid_setfib()
+squid_prestart()
{
+ # prepare the state directory:
+ [ -d ${state_dir} ] && rm -rf ${state_dir}
+ install -d -o ${squid_user} -m 0755 ${state_dir}
+
+ # setup FIB tables:
if command -v check_namevarlist > /dev/null 2>&1; then
check_namevarlist fib && return 0
fi
@@ -84,18 +92,35 @@ squid_setfib()
${SYSCTL} net.fibs >/dev/null 2>&1 || return 0
squid_fib=${squid_fib:-"NONE"}
- if [ "x${squid_fib}" != "xNONE" ]; then
- command="setfib -F ${squid_fib} ${command}"
+ if [ "${squid_fib}" != "NONE" ]; then
+ start_cmd="setfib -F ${squid_fib} ${squid_command} ${required_args} ${squid_flags}"
else
return 0
fi
}
+squid_getpid()
+{
+ # retrieve the PID of the Squid master process explicitly here
+ # in case rc.subr was unable to determine it:
+ if [ -z "$rc_pid" ]; then
+ while ! [ -f ${pidfile} ]; do
+ sleep 1
+ done
+ read _pid _junk <${pidfile}
+ [ -z "${_pid}" ] || pid=${_pid}
+ else
+ pid=${rc_pid}
+ fi
+}
+
squid_stop()
{
+ squid_getpid
echo "Stopping ${name}."
- ${command} ${command_args} ${squid_flags} -k shutdown
+ ${squid_command} ${required_args} ${squid_flags} -k shutdown
run_rc_command poll
+ rm -rf ${state_dir}
}
run_rc_command $1
Modified: head/www/squid33/pkg-deinstall
==============================================================================
--- head/www/squid33/pkg-deinstall Sun Jun 9 19:30:58 2013 (r320405)
+++ head/www/squid33/pkg-deinstall Sun Jun 9 19:47:46 2013 (r320406)
@@ -8,7 +8,6 @@ squid_homedir="/var/squid"
squid_cache_basedir="${squid_homedir}/cache"
squid_confdir=${PKG_PREFIX}/etc/squid
squid_logdir="/var/log/squid"
-squid_rundir="/var/run/squid"
case $2 in
DEINSTALL)
@@ -17,7 +16,7 @@ DEINSTALL)
cmp -s -z ${f} ${f}.default && rm ${f}
done
# try to cleanup directories in /var:
- for d in ${squid_cache_basedir}/squid ${squid_cache_basedir} ${squid_homedir} ${squid_logdir} ${squid_rundir}; do
+ for d in ${squid_cache_basedir}/squid ${squid_cache_basedir} ${squid_homedir} ${squid_logdir}; do
rmdir ${d} 2>/dev/null
done
;;
@@ -31,7 +30,7 @@ POST-DEINSTALL)
echo " created by a default installation of this package, run"
echo ""
echo " pw userdel -n squid -u 100"
- if [ -d ${squid_homedir} -o -d ${squid_confdir} -o -d ${squid_logdir} -o -d ${squid_rundir} ] ; then
+ if [ -d ${squid_homedir} -o -d ${squid_confdir} -o -d ${squid_logdir} ] ; then
echo ""
echo " In order to ease updates the cache and log directories"
echo " and all configuration files modified by you were preserved."
More information about the svn-ports-head
mailing list