Use /var/db/obsolete instead of /etc/obsolete
etc/Makefile:
Create separate target "install-obsolete-files" to populate
/var/db/obsolete, instead of using "install-etc-files".
Makefile:
Add do-obsolete target, to run "cd etc && make install-obsolete-files",
and add this to BUILDTARGETS.
This moves the "obsolete files" creation from "distribution" to "build".
Per discussion with Andrew Brown.
* Improve message display in find_file_in_dirlist()
* do_obsolete(): instead of running distrib/sets/makeobsolete to
temporarily generate the obsolete sets lists, look for them in
${SRC_DIR}/etc/obsolete/* or ${DEST_DIR}/etc/obsolete/*.
The obsolete check now works for "extracted etc.tgz" as the source dir.
etc/Makefile (install-etc-files), distrib/sets/lists/*
* Install obsolete set lists into /etc/obsolete/
* Tweak how pwd_mkdb files are added to METALOG
distrib/sets/makeobsolete
* Don't bother with "_obsolete" suffix on generated file names.
The old behaviour caused problems when /home is a symlink on a system
and pax is used to extract base.tgz or "installworld" the base set
(because pax will remove the symlink before creating the now-empty
directory). It also made it more difficult for a site that wants
permissions on /home to be something other than what the NetBSD
defaults are.
For sites which want /home, it's a "once off" operation to create it,
and "useradd -m" (with the default "base-dir" of /home) will create
it anyway.
This resolves PR [install/19673], as well as being more consistent
with our defacto policy of "not stomping on stuff we don't need to".