ports/69082: [maintainer update] Fix several hard-coded paths in the net/jabberd port
Kirk Strauser
kirk at strauser.com
Thu Jul 15 04:50:24 UTC 2004
>Number: 69082
>Category: ports
>Synopsis: [maintainer update] Fix several hard-coded paths in the net/jabberd port
>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: Thu Jul 15 04:50:23 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator: Kirk Strauser
>Release: FreeBSD 5.2-CURRENT i386
>Organization:
The Day Companies
>Environment:
System: FreeBSD kanga.honeypot.net 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Thu Apr 8 15:37:48 CDT 2004 root at kanga.honeypot.net:/usr/obj/usr/src/sys/NEW_KANGA i386
>Description:
The net/jabberd port assumed that the system used /etc/rc.subr, rather than
/usr/local/etc/rc.subr. This patch fixes that mistake and also replaces
two other hard-coded paths in the jabberd.sh script.
>How-To-Repeat:
>Fix:
--- jabberd.patch begins here ---
diff -urN jabberd-old/Makefile jabberd/Makefile
--- jabberd-old/Makefile Tue Jul 13 17:27:00 2004
+++ jabberd/Makefile Wed Jul 14 23:32:30 2004
@@ -28,6 +28,8 @@
CONFIGURE_ARGS+=--enable-fs
+RC_SCRIPTS_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
+
.if !defined(WITHOUT_DEBUG)
CONFIGURE_ARGS+=--enable-debug
.endif
@@ -82,12 +84,16 @@
@${ECHO} "WITH_PAM use PAM for authentication"
@${ECHO}
+post-patch:
+ @${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
+ ${FILESDIR}/jabberd.sh > ${WRKDIR}/jabberd.sh
+
pre-install:
PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
post-install:
${ECHO} "Installing ${PREFIX}/etc/rc.d/jabberd.sh startup file."
- ${INSTALL_SCRIPT} ${FILESDIR}/jabberd.sh ${PREFIX}/etc/rc.d/jabberd.sh
+ ${INSTALL_SCRIPT} -m 751 ${WRKDIR}/jabberd.sh ${PREFIX}/etc/rc.d/jabberd.sh
@${CHOWN} -R jabber:jabber ${PREFIX}/etc/jabberd
@${FIND} ${PREFIX}/etc/jabberd -type d | ${XARGS} ${CHMOD} 750
@${FIND} ${PREFIX}/etc/jabberd -type f | ${XARGS} ${CHMOD} 660
diff -urN jabberd-old/files/jabberd.sh jabberd/files/jabberd.sh
--- jabberd-old/files/jabberd.sh Tue Jul 13 09:21:00 2004
+++ jabberd/files/jabberd.sh Wed Jul 14 23:35:34 2004
@@ -8,12 +8,11 @@
# BEFORE: LOGIN
# KEYWORD: FreeBSD shutdown
#
-prefix=/usr/local
+prefix=%%PREFIX%%
# Define these jabberd_* variables in one of these files:
# /etc/rc.conf
# /etc/rc.conf.local
-# /etc/rc.conf.d/gkrellmd
#
# DO NOT CHANGE THESE DEFAULT VALUES HERE
#
@@ -22,13 +21,13 @@
jabberd_flags=""
jabberd_user="jabber"
-. /etc/rc.subr
+. %%RC_SUBR%%
name="jabberd"
rcvar=`set_rcvar`
-command="/usr/local/bin/jabberd"
+command="${prefix}/bin/jabberd"
command_args="&"
-procname="/usr/local/bin/router"
+procname="${prefix}/bin/router"
load_rc_config $name
--- jabberd.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list