From owner-freebsd-ports@FreeBSD.ORG Thu Jan 3 22:35:45 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 88EDCEDA for ; Thu, 3 Jan 2013 22:35:45 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from smtp.infracaninophile.co.uk (smtp6.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3cd3:cd67:fafa:3d78]) by mx1.freebsd.org (Postfix) with ESMTP id 1C4F6AA3 for ; Thu, 3 Jan 2013 22:35:44 +0000 (UTC) Received: from seedling.black-earth.co.uk (seedling.black-earth.co.uk [81.2.117.99]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.6/8.14.5) with ESMTP id r03MZaE1043889 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Thu, 3 Jan 2013 22:35:36 GMT (envelope-from matthew@FreeBSD.org) DKIM-Filter: OpenDKIM Filter v2.7.3 smtp.infracaninophile.co.uk r03MZaE1043889 Authentication-Results: smtp.infracaninophile.co.uk/r03MZaE1043889; dkim=none reason="no signature"; dkim-adsp=none (insecure policy) Message-ID: <50E607B8.10302@FreeBSD.org> Date: Thu, 03 Jan 2013 22:35:36 +0000 From: Matthew Seaman User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Oleg Moskalenko Subject: Re: What is policy about auto-editing config files on port install / deinstall? References: <50E49A73.2070008@quip.cz> <50E5FCDA.80906@quip.cz> <031222CBCF33214AB2EB4ABA279428A3012CA8FA98EF@SJCPMAILBOX01.citrite.net> In-Reply-To: <031222CBCF33214AB2EB4ABA279428A3012CA8FA98EF@SJCPMAILBOX01.citrite.net> X-Enigmail-Version: 1.4.6 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig78CE26371860F919D9A28C75" X-Virus-Scanned: clamav-milter 0.97.6 at lucid-nonsense.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,SPF_SOFTFAIL autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lucid-nonsense.infracaninophile.co.uk 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: Thu, 03 Jan 2013 22:35:45 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig78CE26371860F919D9A28C75 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 03/01/2013 22:14, Oleg Moskalenko wrote: > So, what is the general recommended policy on the network services > ports in regard to /etc/rc.conf file ? If I install a port that > creates a service "foodbank", then which choice is better: >=20 > 1) "Automatically" edit /etc/rc.conf in the port installation script > to include the line: foodbank_enable=3D"YES", >=20 > or: >=20 > 2) Display a message to the user like "you must edit /etc/rc.conf to > add line foodbank=3DYES file" ? >=20 > The same question applies to the port de-installation. That's a rather different question to the original. In this case, the policy is clear: always choice 2 -- advise the admin about what to do, where necessary. Installing a port does not reliably imply intent to run it as a service and hence automatically enabling it in rc.conf is simply wrong. Although adding 'foodbank_enable=3D"YES"' to /etc/rc.conf is such a routine action that you probably don't really need to mention it. The original question was more along the lines of 'should installing or deinstalling the port mean automatically editing /usr/local/etc/foodbank.conf ?' Well, maybe. Editing the port on deinstall only makes sense if there are several different ported applications that all use the same configuration file. Otherwise, there's no point editing the config file, since deleting the port means there's nothing left to read it. The classic example of automatically editing a config file occurs with httpd.conf when installing/deinstalling apache modules. That fulfils the multiple ports using the same config file criterion in an exemplary way. Customising a config file used exclusively by one port at install time (but only if there isn't a pre-existing config file) is more of a grey area. On the whole ports tend not to do this, citing the 'Tools not Policy' mantra. But I don't think it is actually forbidden. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. PGP: http://www.infracaninophile.co.uk/pgpkey --------------enig78CE26371860F919D9A28C75 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.16 (Darwin) Comment: Using GnuPG with undefined - http://www.enigmail.net/ iEYEARECAAYFAlDmB7gACgkQ8Mjk52CukIwlUQCfWWERwvvW8c4daELLBVLDX4e1 sIQAn0+9pT5YRHCXsJqwupwhPgFaVhlJ =OHSA -----END PGP SIGNATURE----- --------------enig78CE26371860F919D9A28C75--