after target has been installed and possibly stripped with -s, but
before ownership, permissions or timestamps are set, and before
renaming (with -r) occurs. Per discussion with simonb.
- When metalogging hardlinks, log the mode of the existing target
(rather than the default 0755), and ignore owner/group/fflags.
- Improve man page description of various options to include argument name.
- Clean up usage() to use getprogname(), etc.
Instead, stat the type, and only log an entry if it's a "type=file".
We could log hard links to symlinks, but they're not portable and
their use has been deprecated in our source tree.
Hard links to other types aren't as useful at this stage; if the need
arises we can change this to log the appropriate information then.
round has been tested on Solaris/x86 and Linux hosts.
* Add host tools cap_mkdb, ctags, m4, uudecode.
* Protect __RCSID() and __COPYRIGHT() better.
* Reduce the number of places that need to include "config.h", to keep
sources closer to their "vanilla" versions.
* Add more compat #defines and autoconf-checked functions.
aren't going to do anything with the information anyway and there is
error checking later anyway.
We can now succeed in creating symlinks to locations that don't exist,
just as ln -s will let us do, and we can use install instead of ln -s
in several Makefiles. The code was written with the obvious intent to
let you do this but apparently it was never tested.
/etc/passwd and /etc/group (as well as concept of file flags) as the target.
Rather than look up users, groups, or flags with -U, do what the manpage
indicates: don't even try changing them. If -M is specified, use the
strings that are passed in via options with "gname", "uname", and "flags"
in the resultant mtree file, rather than retranslating them back from numbers.
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).
gid to -1.) Don't bother checking 'unpriv' when it's redundant with the
uid/gid == -1 check. (Doing the uid/gid handling consistently also fixes
the directory-creation code, which didn't check unpriv and did chmod/chown
anyway.) One minor spaces/tabs cleanup at one of the uid/gid checks.
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.
possible, and this not only introduces time where the file is not valid,
but also breaks in the ld.so install where strip does not find ld.so, since
it has not been renamed yet.
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.