Subject: Re: upgrading NetBSD, step order
To: uhel <uhel@gmx.net>
From: Luke Mewburn <lukem@NetBSD.org>
List: netbsd-help
Date: 01/03/2006 18:34:15
--//IivP0gvsAy3Can
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, Jan 01, 2006 at 01:05:24PM +0100, uhel wrote:
  | >  non-root% ./build.sh -U distribution sets kernel=3Dfoo releasekernel=
=3Dfoo
  |=20
  | >  install kernel
  | >  reboot to single user
  | >  extract sets
  | >  run:  postinstall -s /path/to/etc.tgz fix
  | >  reboot
  |=20
  | [....]
  |=20
  | you don't need etcupdate if you use postinstall -s /path/to/etc.tgz fix?
  | If so, when to use etcupdate?


"postinstall fix" is intended to automatically fix issues after
an upgrade, such as a configuration file being moved, or its
syntax slightly changing, (etc.)
At a minimum you should use "postinstall fix" for these reasons.

As far as I can tell, "etcupdate" is intended to merge changes
made to the default system configuration (e.g, extra lines in
/etc/services) that aren't strictly necessary to perform.
etcupdate invokes postinstall fix.

I don't run etcupdate; I have concerns about its method of operation.

etcupdate(8) needs an overhaul:

    1.	etcupdate invokes make to build files within the tree
	differently to how the user built the system (usually
	with build.sh), and that difference causes various
	problems including this PR.
	E.g, PRs 30385 and 22943.

    2.	I'm unhappy that it modifes temproot destructively.

    3.	There should just be one `-s srcdir' argument
	similar to postinstall(8)'s, and etcupdate should
	operate on that non-destructively.
	At a minimum, srcdir could be:
	    -	an extracted copy of etc.tgz
	    -	etc.tgz (etcupdate would extract to tempdir)
	    -	DESTDIR
	The support for an actual source dir (/usr/src) for
	this argument could be implement _if_ the problem
	in 1. above is avoided.

    4.	Its coding style is not consistent with other shell
	scripts we maintain.

--//IivP0gvsAy3Can
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (NetBSD)

iD8DBQFDuij3pBhtmn8zJHIRAlJtAJ9igPmE7IpO09UueDnbrL/w7ldZ5QCgpWGN
6qAoOyj7MmVOuBWySjylrr0=
=dgHf
-----END PGP SIGNATURE-----

--//IivP0gvsAy3Can--