- improve munging of NetBSD.dist and METALOG into metalog, using mtree to
"cleanup" / "merge" entries, and don't sort the result.
relies upon mtree to not change the order (see below)
- use (newly added) join.awk to output lines in metalog that are listed
in flist.${set}. join.awk doesn't require either file to be sorted
(unlike join(1)), which is required because we want to retain the
order of the metalog, because certain entries in the metalog (such
as hard links) make assumptions about the permissions of earlier entries.
this should fix [toolchain/16207]
- read NetBSD.dist from ${DESTDIR}/etc/mtree instead of /usr/src/etc/mtree
- run mtree with "-N ${DESTDIR}/etc" instead of using the host user databases
contain the correct permissions.
Makefile:
- set SETSENV to the list of variables we wish to pass to each shell
script and use that, rather than duplicating the effort below
- call maketars with "-M ${METALOG}" if UNPRIVED is set.
getdirs.awk:
- takes a list of filenames and outputs the list along with all the
directories used by those filenames
maketars:
- support "-M metalog"
- merge etc/mtree/NetBSD.dist with the "-M metalog" for use in the tgz build
- for a given set, find the union between the set list and the metalog
generated above and use that as the list of files to ${PAX} up as the
tgz file.
attempted to be created.
This way, in "discover missing files" mode, you'll get the benefit
of getting all the missing files listed before this script bombs
out with a non-zero exit status, something which can be of benefit
on slow machines.
mode with no options and no parameters.
You have to be careful about the difference between $@ and $*.
In particular, "if [ -n "$@" ]" does not do what you think it will.