ports/103800: [patch] www/apache22 multiple instantiation does not work in recent releases
Hirohisa Yamaguchi
umq at ueo.co.jp
Fri Sep 29 07:30:23 UTC 2006
>Number: 103800
>Category: ports
>Synopsis: [patch] www/apache22 multiple instantiation does not work in recent releases
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Fri Sep 29 07:30:17 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: Hirohisa Yamaguchi
>Release: FreeBSD 7.0-CURRENT amd64
>Organization:
<organization of PR author (multiple lines)>
>Environment:
System: FreeBSD calliope.****.org 7.0-CURRENT FreeBSD 7.0-CURRENT #2: Fri Sep 1 13:15:27 JST 2006 root at calliope.****.org:/usr/obj/usr/src/sys/CALLIOPE64 amd64
>Description:
In recent releases, .sh suffix on rc start scripts are deleted.
http://www.freebsd.org/cgi/cvsweb.cgi/ports/Mk/bsd.port.mk#rev1.510
In ``multiple instantiation'' feature, the rc script calls
itself recursively, and a change in name of the script file
might cause failure.
>How-To-Repeat:
1. setting up www/apache22 to run multiple instance
2. $PREFIX/etc/rc.d/apache22 start
>Fix:
the patch follows:
diff -Npru ports.orig/www/apache22/Makefile ports/www/apache22/Makefile
--- ports.orig/www/apache22/Makefile Mon Sep 25 01:16:39 2006
+++ ports/www/apache22/Makefile Fri Sep 29 15:46:34 2006
@@ -126,6 +126,13 @@ CONFIGURE_ARGS+= --with-ldap \
.include "${APACHEDIR}/Makefile.modules"
.include <bsd.port.pre.mk>
+# .sh suffix is stripped in recent releases.
+.if (${OSVERSION} >= 700007 || ( ${OSVERSION} < 700000 && ${OSVERSION} >= 600101 ))
+SUB_LIST= "RC_SCRIPT=${PREFIX}/etc/rc.d/${USE_RC_SUBR:S/.sh$//}"
+.else
+SUB_LIST= "RC_SCRIPT=${PREFIX}/etc/rc.d/${USE_RC_SUBR}"
+.endif
+
.if defined(WITH_APR_FROM_PORTS)
PLIST_SUB+= APR_PORTS="@comment "
LIB_DEPENDS+= apr-1:${PORTSDIR}/devel/apr
diff -Npru ports.orig/www/apache22/files/apache22.sh.in ports/www/apache22/files/apache22.sh.in
--- ports.orig/www/apache22/files/apache22.sh.in Mon Sep 25 01:16:40 2006
+++ ports/www/apache22/files/apache22.sh.in Fri Sep 29 15:43:48 2006
@@ -92,7 +92,7 @@ else
if [ "x$1" != "xrestart" ]; then
for profile in ${apache22_profiles}; do
echo "===> apache22 profile: ${profile}"
- %%PREFIX%%/etc/rc.d/apache22.sh $1 ${profile}
+ %%RC_SCRIPT%% $1 ${profile}
retcode="$?"
if [ "0${retcode}" -ne 0 ]; then
failed="${profile} (${retcode}) ${failed:-}"
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list