Subject: Re: Upgrading NetBSD Userland
To: Hauke Fath <hf@spg.tu-darmstadt.de>
From: Greg Troxel <gdt@ir.bbn.com>
List: netbsd-users
Date: 01/08/2007 10:50:08
Hauke Fath <hf@spg.tu-darmstadt.de> writes:

> Am 05.01.2007 um 13:51 Uhr -0500 schrieb Greg Troxel:
>>1) Install sysutils/etcmanage from pkgsrc.
>
> Out of curiosity: What does etcmanage do that the etcupdate /
> postinstall cpombo does not?

There are a few differences and in the long term I think it might be
useful to merge etcmanage's features into etcupdate.  My high-level
view is that etcmanage does *only* the "-a" feature of etcupdate,
omitting all else, but does it in a way that's intended to not
require a human after it's been set up once.

The most important difference is probably that etcmanage is totally
non-interactive.  It seems etcupdate doesn't have a non-interactive
mode.  For my usage, this is critical, as I've used etcmanage as part
of the strategy for updating a testbed of 20 machines to a new NetBSD
release.

etcmanage can generate manifests and "import" them, to bootstrap
marking files as unchanged and automatically managed.  It can report
the list of files which exist in /etc (and /dev/MAKEDEV*) which are
not automatically managed.  It can add files to the automatically
managed list.

etcmanage will remove files marked as automatically managed if they
are missing in the "new" directory.

Differences that aren't important:
  different storage of md5sums, but semantically the same.


I find that etcupdate/postinstall conflict a bit, at least with my
philosophy, in that in my view 'postinstall fix' should only do things
that can't be done with 100% safety programmatically.  So things like
/etc/rc.d/foo is not right should be omitted, and done only by an
etc-management tool.  Sometimes I run 'postinstall check' after
etcmanage is done, and either address things manually or run
postinstall fix.  Or maybe the "guaranteed safe" parts should be
separated so they can simply be run from an upgrade script.