ports/145860: [update] www/squid - provide patch for rc script to override shutdown command
Emanuel Haupt
ehaupt at FreeBSD.org
Mon Apr 19 19:30:04 UTC 2010
>Number: 145860
>Category: ports
>Synopsis: [update] www/squid - provide patch for rc script to override shutdown command
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Mon Apr 19 19:30:03 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: Emanuel Haupt
>Release: FreeBSD 8.0-STABLE i386
>Organization:
>Environment:
System: FreeBSD freefall.freebsd.org 8.0-STABLE FreeBSD 8.0-STABLE #42 r204803: Sat Mar 6 21:21:56 UTC 2010 simon at freefall.freebsd.org:/usr/src/sys/i386/compile/FREEFALL i386
>Description:
Squid usually tries to shutdown the running process gracefully (-k shutdown),
however this can take a long time. With the following patch one may set the
rcvar squid_squid_stop_flags to "-k kill" in order stop squid with SIGKILL.
The following patch is for:
www/squid
www/squid30
www/squid31
Also, we have to bump PORTREVISION since it affects package creation.
>How-To-Repeat:
>Fix:
--- squid.patch begins here ---
Index: ports/www/squid/Makefile
===================================================================
RCS file: /home/pcvs/ports/www/squid/Makefile,v
retrieving revision 1.227
diff -u -r1.227 Makefile
--- ports/www/squid/Makefile 17 Mar 2010 07:42:01 -0000 1.227
+++ ports/www/squid/Makefile 19 Apr 2010 19:28:27 -0000
@@ -76,6 +76,7 @@
PORTNAME= squid
PORTVERSION= 2.7.${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%/ \
Index: ports/www/squid/files/squid.in
===================================================================
RCS file: /home/pcvs/ports/www/squid/files/squid.in,v
retrieving revision 1.7
diff -u -r1.7 squid.in
--- ports/www/squid/files/squid.in 27 Mar 2010 00:15:17 -0000 1.7
+++ ports/www/squid/files/squid.in 19 Apr 2010 19:28:27 -0000
@@ -39,6 +39,12 @@
# squid_flags: Additional commandline arguments for Squid you might want to
# use. See squid(8) for further details.
#
+# squid_squid_stop_flags:
+# Shutdown command. Squid usually tries to shutdown the running
+# process gracefully (-k shutdown), however this can take a long
+# time. If you set this flag "-k kill" the running squid process
+# will be terminated with SIGKILL.
+#
squid_checkrunning() {
${command} ${squid_flags} -k check 2>/dev/null
@@ -55,7 +61,7 @@
squid_stop() {
echo "Stopping ${name}."
- ${command} ${squid_flags} -k shutdown
+ ${command} ${squid_flags} ${squid_stop_flags}
run_rc_command poll
}
@@ -78,6 +84,7 @@
squid_enable=${squid_enable:-"NO"}
squid_fib=${squid_fib:-"NONE"}
squid_flags=${squid_flags-"-D"}
+squid_stop_flags=${squid_stop_flags-"-k shutdown"}
squid_pidfile=${squid_pidfile:-"%%PREFIX%%/squid/logs/squid.pid"}
squid_user=${squid_user:-%%SQUID_UID%%}
Index: ports/www/squid30/Makefile
===================================================================
RCS file: /home/pcvs/ports/www/squid30/Makefile,v
retrieving revision 1.236
diff -u -r1.236 Makefile
--- ports/www/squid30/Makefile 20 Mar 2010 19:12:43 -0000 1.236
+++ ports/www/squid30/Makefile 19 Apr 2010 19:28:28 -0000
@@ -61,6 +61,7 @@
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%/ \
Index: ports/www/squid30/files/squid.in
===================================================================
RCS file: /home/pcvs/ports/www/squid30/files/squid.in,v
retrieving revision 1.6
diff -u -r1.6 squid.in
--- ports/www/squid30/files/squid.in 27 Mar 2010 00:15:17 -0000 1.6
+++ ports/www/squid30/files/squid.in 19 Apr 2010 19:28:28 -0000
@@ -39,6 +39,12 @@
# squid_flags: Additional commandline arguments for Squid you might want to
# use. See squid(8) for further details.
#
+# squid_squid_stop_flags:
+# Shutdown command. Squid usually tries to shutdown the running
+# process gracefully (-k shutdown), however this can take a long
+# time. If you set this flag "-k kill" the running squid process
+# will be terminated with SIGKILL.
+#
squid_checkrunning() {
${command} ${squid_flags} -k check 2>/dev/null
@@ -55,7 +61,7 @@
squid_stop() {
echo "Stopping ${name}."
- ${command} ${squid_flags} -k shutdown
+ ${command} ${squid_flags} ${squid_stop_flags}
run_rc_command poll
}
@@ -78,6 +84,7 @@
squid_enable=${squid_enable:-"NO"}
squid_fib=${squid_fib:-"NONE"}
squid_flags=${squid_flags-"-D"}
+squid_stop_flags=${squid_stop_flags-"-k shutdown"}
squid_pidfile=${squid_pidfile:-"%%PREFIX%%/squid/logs/squid.pid"}
squid_user=${squid_user:-%%SQUID_UID%%}
Index: ports/www/squid31/Makefile
===================================================================
RCS file: /home/pcvs/ports/www/squid31/Makefile,v
retrieving revision 1.236
diff -u -r1.236 Makefile
--- ports/www/squid31/Makefile 27 Feb 2010 06:33:39 -0000 1.236
+++ ports/www/squid31/Makefile 19 Apr 2010 19:28:28 -0000
@@ -53,6 +53,7 @@
PORTNAME= squid
PORTVERSION= 3.1.0.${SQUID_BETA_VER}
+PORTREVISION= 1
CATEGORIES= www ipv6
MASTER_SITES= ftp://ftp.squid-cache.org/pub/%SUBDIR%/ \
ftp://mirrors.24-7-solutions.net/pub/squid/%SUBDIR%/ \
Index: ports/www/squid31/files/squid.in
===================================================================
RCS file: /home/pcvs/ports/www/squid31/files/squid.in,v
retrieving revision 1.6
diff -u -r1.6 squid.in
--- ports/www/squid31/files/squid.in 27 Mar 2010 00:15:18 -0000 1.6
+++ ports/www/squid31/files/squid.in 19 Apr 2010 19:28:28 -0000
@@ -39,6 +39,12 @@
# squid_flags: Additional commandline arguments for Squid you might want to
# use. See squid(8) for further details.
#
+# squid_squid_stop_flags:
+# Shutdown command. Squid usually tries to shutdown the running
+# process gracefully (-k shutdown), however this can take a long
+# time. If you set this flag "-k kill" the running squid process
+# will be terminated with SIGKILL.
+#
squid_checkrunning() {
${command} ${squid_flags} -k check 2>/dev/null
@@ -55,7 +61,7 @@
squid_stop() {
echo "Stopping ${name}."
- ${command} ${squid_flags} -k shutdown
+ ${command} ${squid_flags} ${squid_stop_flags}
run_rc_command poll
}
@@ -77,6 +83,7 @@
squid_conf=${squid_conf:-"%%PREFIX%%/etc/squid/squid.conf"}
squid_enable=${squid_enable:-"NO"}
squid_fib=${squid_fib:-"NONE"}
+squid_stop_flags=${squid_stop_flags-"-k shutdown"}
squid_pidfile=${squid_pidfile:-"%%PREFIX%%/squid/squid.pid"}
squid_user=${squid_user:-%%SQUID_UID%%}
--- squid.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list