mergemaster and better support for ezjails

Warren Block wblock at wonkity.com
Sun Jul 13 16:17:04 UTC 2014


On Sun, 13 Jul 2014, Ian Smith wrote:

> On Sat, 12 Jul 2014 20:08:52 -0600, Warren Block wrote:
>> A couple of patches to make mergemaster work better with ezjails.
>> > These are only very superficially tested.  Feedback welcome.
>> > 1. If /etc/mergemaster.rc exists in the jail, it is sourced.  This
>>    allows IGNORE_FILES to be set in the jail.  And other settings, but
>>    that's the one I wanted.
>
> # Read /etc/mergemaster.rc first so the one in $HOME can override
> #
> if [ -r /etc/mergemaster.rc ]; then
> -  . /etc/mergemaster.rc
> +  . "${DESTDIR}/etc/mergemaster.rc"
> fi
>
> # Read .mergemasterrc before command line so CLI can override
> #
> if [ -r "$HOME/.mergemasterrc" ]; then
> -  . "$HOME/.mergemasterrc"
> +  . "${DESTDIR}/$HOME/.mergemasterrc"
> fi
>
> Maybe a dumb question, but ..
>
> In both cases, don't we need to test the readability of those files with 
> ${DESTDIR} prepended, rather than the originals, before sourcing them?  Or 
> can we here safely assume that they will exist? Or doesn't it matter?

Yes, you are right, but it doesn't matter because as Mateusz Guzik 
points out, it's not safe to source those files from a jail.


More information about the freebsd-jail mailing list