installed file or directory to `log'. This is primarily designed
to be used in conjunction with -U, but that's not mandatory.
Provide metadata_log() to do the hard work. The log file is opened
for append at the start, and flock(LOCK_EX) is used to prevent
interleaved output (from multiple concurrent install(8) operations).
- Improve parsing of owner and groups (e.g., strtoul() instead of atoi()),
and don't rely upon uid==-1 to indicate "no owner"; use a flag instead.
- Make fileflags a global variable; uid, gid, and mode are, so lets be
consistent...
- Improve -U (unpriv); work on file flags as well, and only try to change
the file flags after the temporary file is renamed (since certain flags
will prevent the rename from working).
chown/chgrp stages which would otherwise blow out if not running as
root. A future version may log the owner/group to allow correction by
a later privileged cleanup pass.
Just warn about madvise failure; it's not something to blow up about.
Document new option, and clean up option grouping for -d (install
directory) option.
rather than "-s". For example:
install -S "-i -s symbolfile" foo /usr/bin/foo
Invokes:
/bin/sh -c "strip -i -s /usr/bin/foo"
This is needed, because we need different strip options for dynamic libraries and
Mach-O bundles than for executables; our strip supports more directed stripping.
/bin/sh is used in this case, to parse the arguments.
Don't bother mmap()ing files of zero length. Was a workaround for a bug in our mmap(),
which didn't get along with such files, but makes sense anyway.