CFT: FreeBSD Package Base

Matthew Seaman matthew at FreeBSD.org
Mon Apr 29 11:56:02 UTC 2019


On 29/04/2019 11:52, Christoph Moench-Tegeder wrote:
> This situation should be improved. Given that etcupdate is in all
> supported releases, we can even update UPDATING and the Handbook.
> So, does anyone have a pointer to the official procedure?

Basically run:

   # etcupdate

towards the end of your standard update-from-src process.  Pretty much 
all the available arguments to etcupdate have sane defaults, so it's 
quite likely you can just run the bare command.  (Obv. check the man 
page for details though)  It will automatically do a 3-way merge between 
the latest sources, the sources from the previous time you ran etcupdate 
and your deployed configuration in /etc

Most of the time, that's all you need to do.  Occasionally however 
etcupdate will run into a merge conflict.  When that happens etcupdate 
will display a SVN-like status report showing the conflicting files and 
refuse to do anything until the conflicts have been resolved.  Which you 
do by:

   # etcupdate resolve

That's an interactive process which runs through all of the conflicts 
and allows you to examine the differences and select either your own or 
the upstream version, or to just edit the files and merge the conflicts 
manually.  Should be pretty familiar if you've ever used git or svn...

Once everything has been marked as resolved, etcupdate reverts back to 
the usual behaviour and will automatically merge in any new updates as 
far as possible.

Most of the time using etcupdate just boils down to a single, 
non-interactive command to keep everything up to date during the update 
process.  Much less faff than using mergemaster.

Occasionally you may need to run:

   # etcupdate -p

before you 'make buildworld' -- that's in exactly the same circumstances 
where you'ld previously have run 'mergemaster -p' and it does the same 
job: apply any necessary changes to allow your build to succeed.  The 
times you need to do this should be flagged in UPDATING.

	Cheers,

	Matthew



More information about the freebsd-stable mailing list