diff options
author | sem <sem@FreeBSD.org> | 2004-09-02 14:44:14 +0800 |
---|---|---|
committer | sem <sem@FreeBSD.org> | 2004-09-02 14:44:14 +0800 |
commit | 7b57415face465e0dba5ac8df49b2579cbf881b5 (patch) | |
tree | e5181b06b2afe61829aee76cc1eef9745c9944a3 /www/squid31 | |
parent | 8eef4ad5ab07318ee03e9fe7ff3a0ec3ef3df7a4 (diff) | |
download | freebsd-ports-gnome-7b57415face465e0dba5ac8df49b2579cbf881b5.tar.gz freebsd-ports-gnome-7b57415face465e0dba5ac8df49b2579cbf881b5.tar.zst freebsd-ports-gnome-7b57415face465e0dba5ac8df49b2579cbf881b5.zip |
Implement vendor patches for the following issues:
- try to prevent crashes of the digest helper (squid bug #1031)
- correct parsing of the acl_time directive when multiple time specifications
are given (squid bug #1060)
- correct "cachemgr config" output for http_header_* directives
(squid bug #1056)
- recognize the Content-Disposition header to be able to specify
http_header_access directives using it (squid bug #961)
See <http://www.squid-cache.org/Versions/v2/2.5/bugs/> for further
information.
Reimplement the rcNG support. See UPDATING for details.
PR: ports/71260
Submitted by: maintainer
Diffstat (limited to 'www/squid31')
-rw-r--r-- | www/squid31/Makefile | 25 | ||||
-rw-r--r-- | www/squid31/distinfo | 8 | ||||
-rw-r--r-- | www/squid31/files/squid.sh | 100 | ||||
-rw-r--r-- | www/squid31/pkg-descr | 8 | ||||
-rw-r--r-- | www/squid31/pkg-install | 24 |
5 files changed, 93 insertions, 72 deletions
diff --git a/www/squid31/Makefile b/www/squid31/Makefile index 91211d57b6b8..b42ad2cdd75b 100644 --- a/www/squid31/Makefile +++ b/www/squid31/Makefile @@ -74,7 +74,7 @@ PORTNAME= squid PORTVERSION= 2.5.6 -PORTREVISION= 9 +PORTREVISION= 10 CATEGORIES= www MASTER_SITES= \ ftp://ftp.squid-cache.org/pub/%SUBDIR%/ \ @@ -106,7 +106,11 @@ PATCHFILES= squid-2.5.STABLE6-ufs_no_valid_dir.patch \ squid-2.5.STABLE6-ntlm_fetch_string.patch \ squid-2.5.STABLE6-ntlm_noreuse_leak.patch \ squid-2.5.STABLE6-ntlm_challengereuse_leak.patch \ - squid-2.5.STABLE6-rotate_error.patch + squid-2.5.STABLE6-rotate_error.patch \ + squid-2.5.STABLE6-digest_crash.patch \ + squid-2.5.STABLE6-acl_times.patch \ + squid-2.5.STABLE6-http_header_range.patch \ + squid-2.5.STABLE6-Content-Disposition.patch PATCH_DIST_STRIP= -p1 MAINTAINER= tmseck@netcologne.de @@ -148,7 +152,8 @@ OPTIONS= SQUID_LDAP_AUTH "Install LDAP authentication helpers" off \ SQUID_FOLLOW_XFF "Follow X-Forwarded-For headers" off \ SQUID_AUFS "Enable the aufs storage scheme" off \ SQUID_COSS "Enable the COSS storage scheme" off \ - SQUID_STACKTRACES "Create backtraces on fatal errors" off + SQUID_STACKTRACES "Create backtraces on fatal errors" off \ + SQUID_RCNG "Install an rcNG startup script" on PLIST_FILES= etc/rc.d/squid.sh etc/squid/mib.txt etc/squid/mime.conf.default \ etc/squid/msntauth.conf.default etc/squid/squid.conf.default \ @@ -298,6 +303,14 @@ CONFIGURE_ARGS+= --enable-follow-x-forwarded-for .if defined(WITH_SQUID_STACKTRACES) CONFIGURE_ARGS+= --enable-stacktraces .endif +.if !defined(WITHOUT_SQUID_RCNG) +USE_RC_SUBR= yes +rc_del= rcold +rc_state= rcng +.else +rc_del= rcng +rc_state= rcold +.endif # Languages: # @@ -338,8 +351,12 @@ pre-install: # Prevent installation of .orig files by deleting them. @${FIND} ${WRKSRC} -name '*.bak' -delete @${FIND} ${WRKSRC} -name '*.orig' -delete +# create an rcOld/rcNG squid.sh: @${SED} -e 's|%%PREFIX%%|${PREFIX}|g' \ - -e 's|%%SQUID_UID%%|${SQUID_UID}|g' ${FILESDIR}/squid.sh \ + -e 's|%%SQUID_UID%%|${SQUID_UID}|g' \ + -e 's|%%RC_SUBR%%|${RC_SUBR}|g' \ + -e '/--begin ${rc_del}/,/--end ${rc_del}/d' \ + -e '/--.*${rc_state}/d' ${FILESDIR}/squid.sh \ >${WRKDIR}/squid.sh pre-su-install: diff --git a/www/squid31/distinfo b/www/squid31/distinfo index 38316ee2f6e7..b0f3c5b6ceb6 100644 --- a/www/squid31/distinfo +++ b/www/squid31/distinfo @@ -40,3 +40,11 @@ MD5 (squid2.5/squid-2.5.STABLE6-ntlm_challengereuse_leak.patch) = d6bdb1500f947b SIZE (squid2.5/squid-2.5.STABLE6-ntlm_challengereuse_leak.patch) = 13473 MD5 (squid2.5/squid-2.5.STABLE6-rotate_error.patch) = e842e11bd987d56e49df020a17fb1ad9 SIZE (squid2.5/squid-2.5.STABLE6-rotate_error.patch) = 2238 +MD5 (squid2.5/squid-2.5.STABLE6-digest_crash.patch) = b0e5a15164ac7f14682bc200f2efd6c9 +SIZE (squid2.5/squid-2.5.STABLE6-digest_crash.patch) = 1250 +MD5 (squid2.5/squid-2.5.STABLE6-acl_times.patch) = 91c69f9a5cebd5d84a4eee63ea10be99 +SIZE (squid2.5/squid-2.5.STABLE6-acl_times.patch) = 3047 +MD5 (squid2.5/squid-2.5.STABLE6-http_header_range.patch) = 83b25961601597375682afde86ce23a8 +SIZE (squid2.5/squid-2.5.STABLE6-http_header_range.patch) = 616 +MD5 (squid2.5/squid-2.5.STABLE6-Content-Disposition.patch) = c11ca0bcf406b4240a745fc52b063495 +SIZE (squid2.5/squid-2.5.STABLE6-Content-Disposition.patch) = 1815 diff --git a/www/squid31/files/squid.sh b/www/squid31/files/squid.sh index 0888ef91b274..db49ae683c01 100644 --- a/www/squid31/files/squid.sh +++ b/www/squid31/files/squid.sh @@ -2,23 +2,28 @@ # # $FreeBSD$ # +# --begin rcng # PROVIDE: squid # REQUIRE: NETWORKING SERVERS # BEFORE: DAEMON # KEYWORD: FreeBSD shutdown # # Note: -# If you are running an rcNG-System (i.e. FreeBSD 5 and later) you need to set -# "squid_enable=YES" in either /etc/rc.conf, /etc/rc.conf.local or +# Set "squid_enable=yes" in either /etc/rc.conf, /etc/rc.conf.local or # /etc/rc.conf.d/squid to make this script actually do something. There # you can also set squid_chdir, squid_user, and squid_flags. # # Please see squid(8), rc.conf(5) and rc(8) for further details. +# +# --end rcng -name="squid" +name=squid command=%%PREFIX%%/sbin/squid +# --begin rcng extra_commands=reload reload_cmd="${command} -k reconfigure" +restart_cmd=squid_restart +# --end rcng stop_cmd="${command} -k shutdown" squid_chdir=${squid_chdir:-%%PREFIX%%/squid/logs} squid_enable=${squid_enable:-"NO"} @@ -26,45 +31,52 @@ squid_flags=${squid_flags-"-D"} squid_user=${squid_user:-%%SQUID_UID%%} default_config=%%PREFIX%%/etc/squid/squid.conf -if [ -f /etc/rc.subr ]; then - # make use of rcNG features: - . /etc/rc.subr - rcvar=`set_rcvar` - load_rc_config ${name} - # squid(8) will not start if ${default_config} is not present so try - # to catch that beforehand via ${required_files} rather than make - # squid(8) crash. - # If you remove the default configuration file make sure to add - # '-f /path/to/your/squid.conf' to squid_flags - if [ -z "${squid_flags}" ]; then - required_files=${default_config} - fi - required_dirs=${squid_chdir} - run_rc_command "$1" -else - # implement the startup using the "old style" for non-rcNG-systems: - case $1 in - start) - if [ -x "${command}" -a \ - \( -f "${default_config}" -o "${squid_flags}" \) ]; then - echo -n ' squid' - (cd ${squid_chdir} && exec su -fm ${squid_user} -c \ - "${command} ${squid_flags}") - fi - ;; - stop) - if [ -x "${command}" ]; then - echo -n ' squid' - ${stop_cmd} - while ps -xcU ${squid_user} | grep -q squid; do - sleep 2 - done - fi - ;; - *) - echo "usage: ${0##*/} {start|stop}" >&2 - exit 64 - ;; - esac - exit 0 +# --begin rcng +squid_restart() { + run_rc_command stop + run_rc_command poll + run_rc_command start +} + +. %%RC_SUBR%% +rcvar=`set_rcvar` +load_rc_config ${name} + +# squid(8) will not start if ${default_config} is not present so try +# to catch that beforehand via ${required_files} rather than make +# squid(8) crash. +# If you remove the default configuration file make sure to add +# '-f /path/to/your/squid.conf' to squid_flags + +if [ -z "${squid_flags}" ]; then + required_files=${default_config} fi +required_dirs=${squid_chdir} +run_rc_command "$1" +# --end rcng +# --begin rcold +case $1 in +start) + if [ -x "${command}" -a \ + \( -f "${default_config}" -o "${squid_flags}" \) ]; then + echo -n " ${name}" + (cd ${squid_chdir} && exec su -fm ${squid_user} -c \ + "${command} ${squid_flags}") + fi + ;; +stop) + if [ -x "${command}" ]; then + echo -n " ${name}" + ${stop_cmd} + while ps -xcU ${squid_user} | grep -q squid; do + sleep 2 + done + fi + ;; + *) + echo "usage: ${0##*/} {start|stop}" >&2 + exit 64 + ;; +esac +exit 0 +# --end rcold diff --git a/www/squid31/pkg-descr b/www/squid31/pkg-descr index f2674655d01e..46543b891846 100644 --- a/www/squid31/pkg-descr +++ b/www/squid31/pkg-descr @@ -11,13 +11,5 @@ continued development of the cache where Harvest finished. Please see this port's Makefile for a list of compilation options. -*** UPDATE NOTICE *** -Starting from Version 2.5.4_6 the default user:group changed from -nobody:nogroup to squid:squid. You can restore the old behavior -of this port by specifying SQUID_UID=nobody SQUID_GID=nogroup in -your make environment. Helper applications are now installed to -$PREFIX/libexec/squid instead of $PREFIX/libexec, too. - You can find further information on the project's website at - WWW: http://www.squid-cache.org/ diff --git a/www/squid31/pkg-install b/www/squid31/pkg-install index bbb7d0c9eafb..16e9aada1108 100644 --- a/www/squid31/pkg-install +++ b/www/squid31/pkg-install @@ -146,24 +146,16 @@ POST-INSTALL) echo " initialize the cache directory by running \"squid -z\"" echo " as 'root' or '${squid_user}' before starting squid." echo "" - tput md - echo " *** UPDATE NOTICE ***" + echo " Please note that ${PKG_PREFIX}/etc/rc.d/squid.sh" + echo " will not start squid automatically anymore unless you" + echo " explicitly configured the port not to install an rcNG" + echo " style startup script via 'make config'." echo "" - echo " Starting with version 2.5.4_6, all helper applications are" - echo " installed to ${PKG_PREFIX}/libexec/squid instead of" - echo " ${PKG_PREFIX}/libexec." - echo " Please check your squid.conf and update it if necessary." - tput me + echo " To enable squid, set squid_enable=yes in either" + echo " /etc/rc.conf, /etc/rc.conf.local or /etc/rc.conf.d/squid" + echo " See ${PKG_PREFIX}/etc/rc.d/squid.sh for more" + echo " configuration options." echo "" - if [ -f /etc/rc.subr ]; then - echo " Please note that ${PKG_PREFIX}/etc/rc.d/squid.sh" - echo " will not start squid automatically on this system." - echo " You need to set squid_enable=yes in either" - echo " /etc/rc.conf, /etc/rc.conf.local or /etc/rc.conf.d/squid" - echo " See ${PKG_PREFIX}/etc/rc.d/squid.sh for more" - echo " configuration options." - echo "" - fi ;; *) exit 64 |