Re: New mergemaster option -I, failsafe install files

From: Doug Barton <dougb_at_FreeBSD.org>
Date: Wed, 13 May 2009 15:50:19 -0700
Jeremie Le Hen wrote:
> On Sun, May 10, 2009 at 09:54:42PM -0700, Doug Barton wrote:
>> Jeremie Le Hen wrote:
>>> Hi Doug,
>>>
>>> As you may guess from my multiple emails, I'm in the process of
>>> upgrading my jails :-).
>>>
>>> Since I have one jail per service, a very few number of configuration
>>> files are modified on each jail.  As most of user of FreeBSD I think,
>>> I'm used to run "mergemaster -iU" to automate the process as much as
>>> possible.  The problem with service jails (chapter 15.6.1 of the
>>> handbook) is that / is read-only mounted on all jails, /etc /var /root
>>> and a few other places being symlinks to /s, the private read-write
>>> space of each jail.  Thus when mergemaster tries to update
>>> /boot/devices.hints it fails and abort.
>> I think the way to solve this problem would be with an
>> MM_PRE_COMPARE_SCRIPT that deletes /boot/device.hints (and any other
>> relevant files) from the temproot. If they are not present in that
>> directory when the comparison starts then it's a non-issue.
> 
> Actually, /boot belongs to the read/only nullfs mount, so it is not
> possible to use MM_PRE_COMPARE_SCRIPT from the jail.  The only way to
> handle this currently is to remove /boot from the jail template.
> 
> I'm Cc:ing -doc_at_ because chapter 15.6.1 of the handbook (service jails)
> needs to be updated to remove /boot from the jail template "mroot".

I think you misunderstood my suggestion. I was not suggesting to do
anything to the files on the installed system (whether in the jail or
in the host). The temproot that I was referring to is the path that
mergemaster installs the files to prior to comparing them to the
installed versions. When it starts the comparison it simply runs
through every file in the temproot and compares it to the equivalent
on the live system. If a given file is removed from the temproot
before the comparison starts, nothing further will happen with that file.

I think something like this would do what you want, it's a modified
version of one that I used for a long time before I added the
IGNORE_FILES option:

#!/bin/sh

# NOTE: No PATH needed, because mm's PATH is already draconian enough

case "${PRE_WORLD}" in
'')	rm -f ${TEMPROOT}/boot/device.hints ;;
esac

You could also try adding the following to either /etc/mergemaster.rc
or ~/.mergemasterrc:

IGNORE_FILES=/boot/device.hints

That _should_ work, but the first method will work for sure.


hth,

Doug

-- 

    This .signature sanitized for your protection
Received on Wed May 13 2009 - 20:50:25 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:47 UTC