From owner-freebsd-ports@FreeBSD.ORG Fri Jan 4 08:51:54 2013 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 38AF8B38 for ; Fri, 4 Jan 2013 08:51:54 +0000 (UTC) (envelope-from swhetzel@gmail.com) Received: from mail-ie0-f176.google.com (mail-ie0-f176.google.com [209.85.223.176]) by mx1.freebsd.org (Postfix) with ESMTP id 082776D0 for ; Fri, 4 Jan 2013 08:51:53 +0000 (UTC) Received: by mail-ie0-f176.google.com with SMTP id 13so19344914iea.21 for ; Fri, 04 Jan 2013 00:51:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=iOF+I9drlZj+RICf4W98izvnQh7UrFr01mzr2OBnpu8=; b=F8WALfLA93yZ1yJeb8qkzpk+Qou/ZqAwPpYrMqpW3VI4+kIO+gDpWLtwm5tSnGxVfF boLaVhqK+3Vca/CC2bl5PwJ7cI2sJYBXs2yXplW2PsJLnqJWlj4Vd4Ec+zhQaanpkO/0 6GGOusQmSWpR0VO2HhnBhVsN6srOEm1vOQ9KyayImB/Wc/inH8dkaP1MxqWjq/Br1fG+ 0ZhFWdztrnb6KjVjvU+jam1Sk4HD9jKF7I+UeVI4aqn3gnm9QCc0dXvbidxQX4MQo6TM SQK9ELvbNxj/7sDDGpUuhGyr021nSnmOJEzR6Uz7jD0aM8Fa9nepHOFwvhetibnA7oTA H/vw== MIME-Version: 1.0 Received: by 10.50.190.163 with SMTP id gr3mr40310781igc.106.1357289513268; Fri, 04 Jan 2013 00:51:53 -0800 (PST) Received: by 10.50.49.3 with HTTP; Fri, 4 Jan 2013 00:51:53 -0800 (PST) In-Reply-To: References: <50E49A73.2070008@quip.cz> <50E5FCDA.80906@quip.cz> Date: Fri, 4 Jan 2013 02:51:53 -0600 Message-ID: Subject: Re: What is policy about auto-editing config files on port install / deinstall? From: Scot Hetzel To: Miroslav Lachman <000.fbsd@quip.cz> Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-ports@freebsd.org 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 08:51:54 -0000 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. > 457 @${ECHO} "%%APACHEMODDIR%%/%%AP_MODULE%%" >> ${PLIST} > 458 @${ECHO} "@exec %D/sbin/apxs -e -A -n %%AP_NAME%% %D/%F" >> ${PLIST} > 459 @${ECHO} "@unexec echo \"Don't forget to remove all > ${MODULENAME}-related directives in your httpd.conf\"">> ${PLIST} > 460 . endif > 461 .else > 462 @${DO_NADA} > 463 .endif > 464 .endif > > As well as adding the module disabled in the httpd.conf file: > > 472 do-install: > 473 @${APXS} -i -A -n ${SHORTMODNAME} ${WRKSRC}/${MODULENAME}.${AP_BUILDEXT} > -- DISCLAIMER: No electrons were maimed while sending this message. Only slightly bruised.