Subject: Re: groff/-current build problems
To: Steven M. Bellovin <smb@research.att.com>
From: Luke Mewburn <lukem@netbsd.org>
List: current-users
Date: 12/12/2002 02:33:32
On Sun, Dec 08, 2002 at 11:39:11AM -0500, Steven M. Bellovin wrote:
  | >So don't extract the etc.tgz set then.
  | 
  | Sure -- except that there are lots of other things besides /etc/passwd 
  | and friends in /etc; there's fixed code and new functionality in
  | /etc/rc.d/*, for example.  

Yes; as described elsewhere, postinstall resolves a lot of these issues.
In fact, except for the postfix upgrade, postinstall handled most of
the upgrade issues between NetBSD 1.5 and NetBSD 1.6, which involved
definately more changes than "current from 2 weeks ago to today" :-) 


  | >I regularly upgrade my systems from "old -current" or "earlier release"
  | to "-current" or "head of release branch" by running an UNPRIVED
  | >DESTDIR!=/ build, creating the sets, extracting all sets *except*
  | >etc.tgz, and then running one of:
  | >
  | >    a)	if sources are available:
  | >		cd /usr/src
  | >		./etc/postinstall -s `pwd` check
  | >		./etc/postinstall -s `pwd` fix
  | 
  | Hmm -- 'man postinstall' (on both -current and 1.6) doesn't seem to 
  | work.

That's an issue; it could use a manual page...
It is documented in the install (the upgrading section) for 1.6.


  | >
  | >    b)	if no sources available, but I have etc.tgz:
  | >		mkdir /tmp/foo
  | >		cd /tmp/foo
  | >		pax -zrvpe -f /path/to/etc.tgz
  | >		./etc/postinstall -s `pwd` check
  | >		./etc/postinstall -s `pwd` fix
  | >		cd /
  | >		rm -rf /tmp/foo
  | >
  | >This latter step handles all the "upgrade" issues for me of source
  | >related stuff.   I don't use etcupdate, but I believe it can help with
  | >some of the other "etc upgrade" related issues...
  | >
  | 
  | These tools are nice steps forward.  Daniel Carosone's rsync 
  | mechanism is an even nicer way.  But that's not my point.  The point is 
  | that it's too hard, and sometimes needlessly too hard.

I agree; it needs to be simpler and robust, which I am working on to
improve.


  | Second, we package releases wrong.  etc.tgz perpetuates the confusion 
  | from /etc (and, I might add, /var).  The release-dependent files, such 
  | as /etc/rc.d, belong in one place; things like /etc/passwd and
  | /var/games/rogue.scores belong in another.  In fact, those latter -- 
  | the null or simple stylized files that need to exist (i.e.,
  | /etc/daily.conf (we can argue another time if it should be /etc/daily
  | or /etc/daily.conf that reads in /etc/defaults/daily.conf) should be 
  | generated by tiny shell scripts (most of which would say 'touch file'),
  | rather than being extracted.

Arguably the "static" stuff in etc.tgz could move to base.tgz;
postinstall already checks for updates in this arena.


  | Following from that, there should be conversion tools -- scripts to add 
  | new lines to /etc/passwd, for example, taking care to ensure that 
  | they're only added if needed.
  | 
  | Finally -- and only after that is done -- we should worry about making 
  | life easier for folks who have made their own, personal changes to any 
  | system files.  Wouldn't it be nice if, when doing an install, you were 
  | told "you changed /foo/bar" or "you changed /foo/bar/bletch/bazz.c"?

I believe etcupdate(8) can help here.


  | Every time I do a release upgrade, for example, I have to remember to 
  | make a certain tweak to /sys/dev/pci/if_ex_pci.c, or one of my machines 
  | won't be able to talk on the net.  Similarly, I have to remember a 
  | ghastly hack to dhcp/common/options or my laptop won't be able to talk 
  | to the dhcp server at many Marriott hotels.

Tracking NetBSD source with anoncvs can help here...


  | Note that all of these problems apply to folks who don't track 
  | -current.  It's probably worse for them -- -current users, at least, do 
  | upgrades frequently enough that they're used to it, and have built 
  | tools and work-arounds....

postinstall and etcupdate are both available for NetBSD 1.6 (and later),
and are part of the framework to improve this.  Of course, more work
is needed...

Luke.