Date: Wed, 24 Apr 2002 04:01:02 -0700 (PDT) From: Jason Mann <jmann@blueyonder.co.uk> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/37413: www/apache13 port installs broken apache.sh startup script Message-ID: <200204241101.g3OB12H66057@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 37413 >Category: ports >Synopsis: www/apache13 port installs broken apache.sh startup script >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Apr 24 04:10:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Jason Mann >Release: 4.5-RELEASE >Organization: >Environment: FreeBSD neutrino.cableinet.net 4.5-RELEASE FreeBSD 4.5-RELEASE #0: Mon Jan 28 14:31:56 GMT 2002 murray@builder.freebsdmall.com:/usr/src/sys/compile/GENERIC i386 >Description: Due to an error in the Makefile for the www/apache13 port, the startup script installed for the apache13 port does not function correctly. The makefile uses sed to replace occurences of '%%PREFIX%%' in a template script (files/apache.sh) with a real path, usually /usr/local. However, due to a lack of 'g' option on the sed statement, only the first instance of %%PREFIX%% on any given line is replaced. Hence, this line in the template file: [ -x %%PREFIX%%/sbin/apachectl ] && %%PREFIX%%/sbin/apachectl start > /d ev/null && echo -n ' apache' should end up like: [ -x /usr/local/sbin/apachectl ] && /usr/local/sbin/apachectl start > /d ev/null && echo -n ' apache' but in fact ends up like: [ -x /usr/local/sbin/apachectl ] && %%PREFIX%%/sbin/apachectl start > /d ev/null && echo -n ' apache' This is sufficient to make the script non-functional and prevent apache from being started at boot. >How-To-Repeat: Install the current apache13 port with the Makefile dated as follows: # $FreeBSD: ports/www/apache13/Makefile,v 1.110 2002/04/22 03:26:11 dinoex Exp $ # >Fix: There are a couple of fixes: 1. One could manually edit /usr/local/etc/rc.d/apache.sh and replace the missed instance of %%PREFIX%% with the correct path. 2. One could edit the apache13 makefile and add the 'g' option to the relevant sed statement e.g. post-extract: @${SED} -e "s=%%PREFIX%%=${PREFIX}=g" ${FILESDIR}/apache.sh \ > ${WRKSRC}/apache.sh sed would then replace %%PREFIX%% globally on each line of the startup script, instead of just the first instance. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200204241101.g3OB12H66057>