ports/145674: [Maintainer] www/squid: update to 2.7.STABLE9, move cache and log directories to /var

Thomas-Martin Seck tmseck at web.de
Tue Apr 13 17:20:02 UTC 2010


>Number:         145674
>Category:       ports
>Synopsis:       [Maintainer] www/squid: update to 2.7.STABLE9, move cache and log directories to /var
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Apr 13 17:20:01 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Thomas-Martin Seck
>Release:        FreeBSD 8.0-RELEASE amd64
>Organization:
a private site in Germany
>Environment:
FreeBSD ports collection as of April 13, 2010.



	
>Description:
- update to 2.7.STABLE9
- update MASTER_SITES
- move default cache and log directories from $PREFIX/squid/ to /var/squid/

UPDATING entry:

Starting with 2.7.9 the directory containing the default cache and log
directory was changed from $PREFIX/squid/ to /var/squid/.

Thus the default value for the following Squid configuration parameters
changed as follows:

access_log from $PREFIX/squid/logs/cache.log to /var/squid/logs/cache.log

cache_store_log from $PREFIX/squid/logs/store.log to /var/squid/logs/store.log

pid_filename from $PREFIX/squid/logs/squid.pid to /var/squid/logs/squid.pid

netdb_filename from $PREFIX/squid/logs/netdb.state to
/var/squid/logs/netdb.state

coredump_dir from $PREFIX/squid/cache to /var/squid/cache

Please check whether you need to define any of these variables in your
squid.conf to the old defaults explicitly before updating, especially
if you have configured automated log processing or automated log
rotation. If you define pid_filename in your squid.conf you should
also set squid_pidfile to the same value in /etc/rc.conf, cf.
PREFIX/etc/rc.d/squid.

	
>How-To-Repeat:
	
>Fix:
Apply this patch:

Index: Makefile
===================================================================
--- Makefile	(.../www/squid)	(Revision 1816)
+++ Makefile	(.../local/squid)	(Revision 1816)
@@ -73,24 +73,25 @@
 #     Enable experimental forward_log directive.
 #    --enable-multicast-miss
 #     Enable experimental multicast notification of cachemisses.
+#
 
 PORTNAME=	squid
 PORTVERSION=	2.7.${SQUID_STABLE_VER}
 CATEGORIES=	www
 MASTER_SITES=	ftp://ftp.squid-cache.org/pub/%SUBDIR%/ \
-		ftp://mirrors.24-7-solutions.net/pub/squid/%SUBDIR%/ \
-		ftp://ftp.belnet.be/packages/squid/pub/%SUBDIR%/ \
-		ftp://ftp.nl.uu.net/pub/unix/www/squid/%SUBDIR%/ \
-		ftp://ftp.mirrorservice.org/sites/ftp.squid-cache.org/pub/%SUBDIR%/ \
-		ftp://ftp.ntua.gr/pub/www/Squid/%SUBDIR%/ \
-		ftp://ftp.ccs.neu.edu/pub/mirrors/squid.nlanr.net/pub/%SUBDIR%/ \
-		${MASTER_SITE_RINGSERVER:S,%SUBDIR%,net/www/squid/&,} \
+		http://mirrors.ccs.neu.edu/Squid/ \
+		ftp://ftp.fu-berlin.de/unix/www/squid/squid/ \
+		ftp://ftp.nl.uu.net/pub/unix/www/squid/ \
+		ftp://ftp.solnet.ch/mirror/squid/ \
+		ftp://ftp.ntua.gr/pub/www/Squid/squid/ \
+		http://mirror.aarnet.edu.au/pub/squid/squid/ \
+		${MASTER_SITE_RINGSERVER:S,%SUBDIR%,net/www/squid,} \
 		http://www.squid-cache.org/Versions/v2/2.7/ \
-		http://www3.us.squid-cache.org/Versions/v2/2.7/ \
+		http://www2.us.squid-cache.org/Versions/v2/2.7/ \
 		http://www1.at.squid-cache.org/Versions/v2/2.7/ \
-		http://www2.nl.squid-cache.org/Versions/v2/2.7/ \
-		http://www1.ru.squid-cache.org/Versions/v2/2.7/ \
-		http://www1.uk.squid-cache.org/Versions/v2/2.7/ \
+		http://www2.de.squid-cache.org/Versions/v2/2.7/ \
+		http://www.eu.squid-cache.org/Versions/v2/2.7/ \
+		http://www1.ie.squid-cache.org/Versions/v2/2.7/ \
 		http://www1.jp.squid-cache.org/Versions/v2/2.7/ \
 		http://www2.tw.squid-cache.org/Versions/v2/2.7/
 MASTER_SITE_SUBDIR=	squid
@@ -98,11 +99,11 @@
 DIST_SUBDIR=	squid2.7
 
 PATCH_SITES=	http://www.squid-cache.org/%SUBDIR%/ \
-		http://www3.us.squid-cache.org/%SUBDIR%/ \
+		http://www2.us.squid-cache.org/%SUBDIR%/ \
 		http://www1.at.squid-cache.org/%SUBDIR%/ \
-		http://www2.nl.squid-cache.org/%SUBDIR%/ \
-		http://www1.ru.squid-cache.org/%SUBDIR%/ \
-		http://www1.uk.squid-cache.org/%SUBDIR%/ \
+		http://www2.de.squid-cache.org/%SUBDIR%/ \
+		http://www.eu.squid-cache.org/%SUBDIR%/ \
+		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/v2/2.7/changesets
@@ -112,7 +113,7 @@
 MAINTAINER=	tmseck at web.de
 COMMENT=	HTTP Caching Proxy
 
-SQUID_STABLE_VER=	8
+SQUID_STABLE_VER=	9
 
 CONFLICTS=	squid-2.[^7]* squid-3.* cacheboy-[0-9]* lusca-head-[0-9]*
 GNU_CONFIGURE=	yes
@@ -200,7 +201,7 @@
 		--sbindir=${PREFIX}/sbin  \
 		--datadir=${PREFIX}/etc/squid \
 		--libexecdir=${PREFIX}/libexec/squid \
-		--localstatedir=${PREFIX}/squid \
+		--localstatedir=/var/squid \
 		--sysconfdir=${PREFIX}/etc/squid \
 		--enable-removal-policies="lru heap" \
 		--disable-linux-netfilter \
@@ -395,7 +396,7 @@
 PLIST_DIRS+=	etc/squid/errors/${d}
 PLIST_FILES+=	${error_files:S,^,etc/squid/errors/${d}/,}
 .endfor
-PLIST_DIRS+=	etc/squid/errors etc/squid squid/logs squid/cache squid
+PLIST_DIRS+=	etc/squid/errors etc/squid
 
 post-patch:
 	@${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g' \
Index: distinfo
===================================================================
--- distinfo	(.../www/squid)	(Revision 1816)
+++ distinfo	(.../local/squid)	(Revision 1816)
@@ -1,3 +1,3 @@
-MD5 (squid2.7/squid-2.7.STABLE8.tar.bz2) = c061ba1c9ae39d0aaa8eca137f7dd18b
-SHA256 (squid2.7/squid-2.7.STABLE8.tar.bz2) = 9409b02fc53518e334395df803a1ae30f4ed385b0f041fb310b4c75e2a49138c
-SIZE (squid2.7/squid-2.7.STABLE8.tar.bz2) = 1348473
+MD5 (squid2.7/squid-2.7.STABLE9.tar.bz2) = 3c6642c85470b1079207d43bba25a819
+SHA256 (squid2.7/squid-2.7.STABLE9.tar.bz2) = c0bdfcb5bb68debc1c9441308178bf148c67979b824c892a4710dc80a5b05d5e
+SIZE (squid2.7/squid-2.7.STABLE9.tar.bz2) = 1351366
Index: files/pkg-deinstall.in
===================================================================
--- files/pkg-deinstall.in	(.../www/squid)	(Revision 1816)
+++ files/pkg-deinstall.in	(.../local/squid)	(Revision 1816)
@@ -4,13 +4,21 @@
 #
 
 PATH=/bin:/usr/bin:/usr/sbin
+squid_base="/var/squid"
+squid_cachedir="${squid_base}/cache"
+squid_confdir=${PKG_PREFIX}/etc/squid
+squid_logdir="${squid_base}/logs"
 
 case $2 in
 DEINSTALL)
-	cd ${PKG_PREFIX}/etc/squid || exit 1
+	cd ${squid_confdir} || exit 1
 	for f in cachemgr.conf mime.conf msntauth.conf squid.conf; do
 		cmp -s -z ${f} ${f}.default && rm ${f}
 	done
+	# try to cleanup directories in /var:
+	for d in ${squid_cachedir} ${squid_logdir} ${squid_base} ; do
+		rmdir ${d} 2>/dev/null
+	done
 	;;
 POST-DEINSTALL)
 	echo "===> post-deinstallation information for $1:"
@@ -22,7 +30,7 @@
 	echo "     created by a default installation of this package, run"
 	echo ""
 	echo "     pw userdel -n %%SQUID_UID%% -u 100"
-	if  [ -d ${PKG_PREFIX}/squid -o -d ${PKG_PREFIX}/etc/squid ] ; then
+	if  [ -d ${squid_base} -o -d ${squid_confdir} ] ; then
 		echo ""
 		echo "     In order to ease updates the cache and log directories"
 		echo "     and all configuration files modified by you were preserved."
Index: files/pkg-message.in
===================================================================
--- files/pkg-message.in	(.../www/squid)	(Revision 1816)
+++ files/pkg-message.in	(.../local/squid)	(Revision 1816)
@@ -1,8 +1,8 @@
      o You can find the configuration files for this package in the
        directory %%PREFIX%%/etc/squid.
 
-     o A cache directory has been created in %%PREFIX%%/squid/cache.
-       Log files will be written to %%PREFIX%%/squid/logs.
+     o The default cache directory is /var/squid/cache.
+       The default log directory is /var/squid/logs.
 
        Note:
        You must initialize new cache directories before you can start
@@ -10,8 +10,9 @@
        If your cache directories are already initialized (e.g. after an
        upgrade of squid) you do not need to initialize them again.
 
-     o The default configuration will deny everyone access to the
-       proxy service. Edit the "http_access" directives in
+     o The default configuration will deny everyone but local networks
+       as defined in RFC 1918 access to the proxy service.
+       Edit the "http_access allow/deny" directives in
        %%PREFIX%%/etc/squid/squid.conf to suit your needs.
 
      To enable Squid, set squid_enable=yes in either
Index: files/pkg-install.in
===================================================================
--- files/pkg-install.in	(.../www/squid)	(Revision 1816)
+++ files/pkg-install.in	(.../local/squid)	(Revision 1816)
@@ -5,7 +5,7 @@
 
 PATH=/bin:/usr/bin:/usr/sbin
 pkgname=$1
-squid_base="${PKG_PREFIX:-%%PREFIX%%}/squid"
+squid_base="/var/squid"
 squid_confdir="${PKG_PREFIX:-%%PREFIX%%}/etc/squid"
 if [ -x /usr/sbin/nologin ]; then
 	nologin=/usr/sbin/nologin
Index: files/squid.in
===================================================================
--- files/squid.in	(.../www/squid)	(Revision 1816)
+++ files/squid.in	(.../local/squid)	(Revision 1816)
@@ -13,7 +13,7 @@
 # Additional variables you can define in one of these files:
 #
 # squid_chdir:	the directory into which the rc system moves into before
-# 		starting Squid. Default: %%PREFIX%%/squid
+# 		starting Squid. Default: /var/squid/logs
 #
 # squid_conf:	The configuration file that Squid should use.
 #		Default: %%PREFIX%%/etc/squid/squid.conf
@@ -32,7 +32,7 @@
 # squid_pidfile:
 #		The name (including the full path) of the Squid
 #		master process' PID file.
-#		Default: %%PREFIX%%/logs/squid/squid.pid.
+#		Default: /var/squid/logs/squid.pid.
 #		You only need to change this if you changed the
 #		corresponding entry in your Squid configuration.
 #
@@ -73,12 +73,12 @@
 
 load_rc_config ${name}
 
-squid_chdir=${squid_chdir:-"%%PREFIX%%/squid/logs"}
+squid_chdir=${squid_chdir:-"/var/squid/logs"}
 squid_conf=${squid_conf:-"%%PREFIX%%/etc/squid/squid.conf"}
 squid_enable=${squid_enable:-"NO"}
 squid_fib=${squid_fib:-"NONE"}
 squid_flags=${squid_flags-"-D"}
-squid_pidfile=${squid_pidfile:-"%%PREFIX%%/squid/logs/squid.pid"}
+squid_pidfile=${squid_pidfile:-"/var/squid/logs/squid.pid"}
 squid_user=${squid_user:-%%SQUID_UID%%}
 
 pidfile=${squid_pidfile}
	


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list