Date: Sat, 14 May 2011 18:32:42 +0100 From: Chris Rees <utisoft@gmail.com> To: ports@freebsd.org Subject: Re: Propose new macro: INSTALL_CONF Message-ID: <BANLkTikRxcqbvhyyryxyvt__4eeFSa-siQ@mail.gmail.com> In-Reply-To: <BANLkTimYjuzp%2BV%2Bpi4bpOUv=uwe9UqjmGA@mail.gmail.com> References: <BANLkTimYjuzp%2BV%2Bpi4bpOUv=uwe9UqjmGA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 14 May 2011 16:39, Chris Rees <utisoft@gmail.com> wrote: > Hi all, > > I'm getting frustrated with editing config files of ports in vi, and > being told it's read-only. > > This stops me using ZZ to quit, which makes me sad. > > It's also inconsistent with src/etc/Makefile which uses for example: > > .if ${MK_OPENSSH} !=3D "no" > =A0 =A0 =A0 =A0cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644= \ > =A0 =A0 =A0 =A0 =A0 =A0${SSH} ${DESTDIR}/etc/ssh > .endif > > The problem stems from installing .sample files as DATA, and then using > cp -p preserving the -w bits --> 444 makes perfect sense for a .sample fi= le, > but not at all for a config file. > > I have two options proposed. > > For both introduce CONFMODE into src/share/mk/bsd.own.mk, patch for > which is at [1]. > > Option 1: Rewrite the Porter's Handbook section on config files to use > a macro involving CONFMODE instead of cp -p, which gets complicated > when using with @exec in pkg-plist > > Option 2: Create an INSTALL_CONF macro, which handles the .conf.sample > -> .conf automagically and sticks the right lines into TMPPLIST. > > I'm swinging towards Option 2, but I haven't written the code for that > yet in case someone shoots me down :P > > Any concerns about inconsistencies between the INSTALL_* macros could > be addressed by calling it something different; I'm open to > suggestions! > > We'd also need to deal with the MFC and subsequent updates of bsd.own.mk.= .. > > Chris > > [1] http://www.bayofrum.net/~crees/patches/bsd-own-mk-confmode.patch A third option has occurred to me: Create a new variable USE_CONF_FILES to work in a similar vein to USE_RC_SU= BR... Chris
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BANLkTikRxcqbvhyyryxyvt__4eeFSa-siQ>