From owner-freebsd-ports@FreeBSD.ORG Fri Jan 4 09:24:53 2013 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id F3E784AB for ; Fri, 4 Jan 2013 09:24:52 +0000 (UTC) (envelope-from ohauer@gmx.de) Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) by mx1.freebsd.org (Postfix) with ESMTP id 8407E7FC for ; Fri, 4 Jan 2013 09:24:52 +0000 (UTC) Received: from mailout-de.gmx.net ([10.1.76.24]) by mrigmx.server.lan (mrigmx002) with ESMTP (Nemesis) id 0Lnmgj-1TMuZY0HUN-00hvKq for ; Fri, 04 Jan 2013 10:24:51 +0100 Received: (qmail invoked by alias); 04 Jan 2013 09:24:50 -0000 Received: from p578be941.dip0.t-ipconnect.de (EHLO [192.168.0.100]) [87.139.233.65] by mail.gmx.net (mp024) with SMTP; 04 Jan 2013 10:24:50 +0100 X-Authenticated: #1956535 X-Provags-ID: V01U2FsdGVkX1/XlF4bqSrXSNBtpQPxjOrvMYXrDSO4B6CvVxB9va MBzZYAUErfJl+D Message-ID: <50E6A021.9000203@gmx.de> Date: Fri, 04 Jan 2013 10:25:53 +0100 From: olli hauer User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: freebsd-ports@freebsd.org Subject: Re: What is policy about auto-editing config files on port install / deinstall? References: <50E49A73.2070008@quip.cz> <50E5FCDA.80906@quip.cz> In-Reply-To: X-Enigmail-Version: 1.4.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Cc: Scot Hetzel , Miroslav Lachman <000.fbsd@quip.cz> X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2013 09:24:53 -0000 On 2013-01-04 09:51, Scot Hetzel wrote: > On Fri, Jan 4, 2013 at 2:12 AM, Scot Hetzel wrote: >>> >>> Why am I forced to manualy re-enable all 3rd party modules on each upgrade? >>> >>> Modules should not disable something that is explicitly enabled by user / >>> system administrator. >>> >>> >> I found the cause of your issue, the www/mod_sendfile/Makefile has >> AP_GENPLIST= yes defined. This causes the port to use this code to >> create the packing list: >> >> Mk/bsd.apache.mk >> >> 451 ap-gen-plist: >> 452 .if defined(AP_GENPLIST) >> 453 . if !exists(${PLIST}) >> 454 @${ECHO} "===> Generating apache plist" >> 455 # apache22 >> 456 @${ECHO} "@unexec ${SED} -i '' -E >> '/LoadModule[[:blank:]]+%%AP_NAME%%_module/d' >> %D/%%APACHEETCDIR%%/httpd.conf" >> ${PLIST} > > Found the reason for this sed line, as it is used to remove the > LoadModule line from the httpd.conf file so that when Apache is > uninstalled, the httpd.conf could be removed, if there were no changes > from the original. > > see http://svnweb.freebsd.org/ports?view=revision&revision=194395 > > I still think it is better to disable the module on uninstall, and > enable the module on install. > Hi Scot, have you also read the commit log? - Fix leftover httpd.conf for AP_GEN_PLIST using ports. The problem is that apxs does not remove module line from httpd.conf, it merely comments it out. Later, on Apache deinstall, the file differs from stock httpd.conf and is not deleted. The issue is the following. In case the LoadModule line is not removed from httpd.conf the port will be marked as broken by the ports build system. I'm thinking about an parameter which change the semantic in bsd.apache.mk so the module can be installed enabled. For example the following will do that (quick hack) Index: bsd.apache.mk =================================================================== --- bsd.apache.mk (revision 309921) +++ bsd.apache.mk (working copy) @@ -455,7 +445,11 @@ # apache22 @${ECHO} "@unexec ${SED} -i '' -E '/LoadModule[[:blank:]]+%%AP_NAME%%_module/d' %D/%%APACHEETCDIR%%/httpd.conf" >> ${PLIST} @${ECHO} "%%APACHEMODDIR%%/%%AP_MODULE%%" >> ${PLIST} +.if defined(AP_MODENABLE) + @${ECHO} "@exec %D/sbin/apxs -e -a -n %%AP_NAME%% %D/%F" >> ${PLIST} +.else @${ECHO} "@exec %D/sbin/apxs -e -A -n %%AP_NAME%% %D/%F" >> ${PLIST} +.endif @${ECHO} "@unexec echo \"Don't forget to remove all ${MODULENAME}-related directives in your httpd.conf\"">> ${PLIST} . endif .else -- Regards, olli