FreeBSD Bugzilla – Attachment 105263 Details for
Bug 145675
[Maintainer] www/squid30: move cache and log directories to /var/
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 7.68 KB, created by
Thomas-Martin Seck
on 2010-04-13 18:30:01 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Thomas-Martin Seck
Created:
2010-04-13 18:30:01 UTC
Size:
7.68 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- Makefile (.../www/squid30) (Revision 1816) >+++ Makefile (.../local/squid30) (Revision 1816) >@@ -61,21 +61,22 @@ > > PORTNAME= squid > PORTVERSION= 3.0.${SQUID_STABLE_VER} >+PORTREVISION= 1 > 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/v3/3.0/ \ >- http://www3.us.squid-cache.org/Versions/v3/3.0/ \ >+ http://www2.us.squid-cache.org/Versions/v3/3.0/ \ > http://www1.at.squid-cache.org/Versions/v3/3.0/ \ >- http://www2.nl.squid-cache.org/Versions/v3/3.0/ \ >- http://www1.ru.squid-cache.org/Versions/v3/3.0/ \ >- http://www1.uk.squid-cache.org/Versions/v3/3.0/ \ >+ http://www2.de.squid-cache.org/Versions/v3/3.0/ \ >+ http://www.eu.squid-cache.org/Versions/v3/3.0/ \ >+ http://www1.ie.squid-cache.org/Versions/v3/3.0/ \ > http://www1.jp.squid-cache.org/Versions/v3/3.0/ \ > http://www2.tw.squid-cache.org/Versions/v3/3.0/ > MASTER_SITE_SUBDIR= squid >@@ -84,13 +85,12 @@ > > PATCH_SITES= http://www.squid-cache.org/%SUBDIR%/ \ > http://www2.us.squid-cache.org/%SUBDIR%/ \ >- http://www3.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://www1.tw.squid-cache.org/%SUBDIR%/ >+ http://www2.tw.squid-cache.org/%SUBDIR%/ > PATCH_SITE_SUBDIR= Versions/v3/3.0/changesets > PATCHFILES= > >@@ -190,7 +190,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 \ >@@ -393,7 +393,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|%%PREFIX%%|${PREFIX}|g' \ >Index: files/pkg-deinstall.in >=================================================================== >--- files/pkg-deinstall.in (.../www/squid30) (Revision 1816) >+++ files/pkg-deinstall.in (.../local/squid30) (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/squid30) (Revision 1816) >+++ files/pkg-message.in (.../local/squid30) (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,14 +10,11 @@ > 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. > >- Please note that the Squid start script is an rc.d style script. >- This means that Squid will not start automatically at boot >- time unless it is explicitly enabled. >- > To enable Squid, set squid_enable=yes in either > /etc/rc.conf, /etc/rc.conf.local or /etc/rc.conf.d/squid > Please see %%PREFIX%%/etc/rc.d/squid for further details. >@@ -29,4 +26,3 @@ > > Additionally, you should check your configuration by calling > 'squid -f /path/to/squid.conf -k parse' before starting Squid. >- >Index: files/pkg-install.in >=================================================================== >--- files/pkg-install.in (.../www/squid30) (Revision 1816) >+++ files/pkg-install.in (.../local/squid30) (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/squid30) (Revision 1816) >+++ files/squid.in (.../local/squid30) (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%%/squid/logs/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}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 145675
: 105263