Commit Graph

68 Commits

Author SHA1 Message Date
kleink 361f8ca975 Add the -r flag to usage output. 2001-06-15 08:25:11 +00:00
kleink d2fd431b8f The -r flag is applicable to the file1 -> file2 case, too. 2001-06-15 08:24:17 +00:00
chs 1055c758b8 fall back to read() if mmap() returns an error. 2001-05-28 03:37:22 +00:00
cgd ab2465366a slight portability improvement: use madvise(... MADV_SEQUENTIAL ...)
iff MADV_SEQUENTIAL is actually defined.
2001-03-21 23:16:33 +00:00
cgd 040de26f85 call setprogname(argv[0]) at start of main() 2001-02-21 00:06:22 +00:00
jlam d6ced75307 Change
"program used to trip installed binaries"
to
	"program used to strip installed binaries"
2000-12-27 18:56:21 +00:00
enami e92c3f2867 - The type of return value of setmode is a void * and getmode takes it,
rather than mode_t *.
- Free the storage allocated by setmode unless it is obvious that program
  exits immediately.
2000-10-10 14:30:40 +00:00
kleink 4918722a89 For commands and utilities, use EXIT STATUS rather than RETURN VALUES or
DIAGNOSTICS as appropriate (and documented in mdoc(7)).
2000-09-04 07:35:15 +00:00
hubertf d374d97e3c Allow overriding _PATH_STRIP 2000-09-04 02:45:33 +00:00
cgd 08f606dddb If unprivileged, don't even look up user or group name. (always set uid and
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.
2000-07-27 03:57:50 +00:00
cgd 72b221b09c clean up documentation of STRIP envioronment var. 2000-07-27 03:48:08 +00:00
cgd 3ae828ab49 invoke stripprog using execlp. (this mirrors the behaviour that would
be had from using the shell to invoke strip, and removes an unnecessary
limitation that the STRIP environment variable be an absolute path.)
2000-07-27 03:45:02 +00:00
garbled 36f447259d Make the STRIP env var a little more obvious in the documentation, and
clean up the bottom of this manpage just a tad.
2000-03-22 18:34:43 +00:00
christos b41faac27c don't bitch if madvise returns EOPNOTSUPP 2000-01-15 01:10:12 +00:00
simonb 299578ebd5 Spell "privilege" correctly (correct spelling from Jonathan Stone). 1999-08-16 02:59:22 +00:00
sommerfeld 0c41be440f Add `-U' flag (for "unprivileged"). Currently just skips the
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.
1999-08-01 05:02:06 +00:00
christos 4bcc4c73c4 pacify gcc-2.8 uninitialized variable warnings, and only use timespecs in
struct stat on BSD4_4 systems.
1999-07-06 14:45:31 +00:00
thorpej 61296f9b4d If we choose the mmap() method of copying the file, advise the VM
system that we'll be doing sequential access of the file.
1999-06-26 00:41:39 +00:00
hubertf 558dea2645 Check if given suffix really generates different suffixes - catch e.g. ".%"
Submitted in PR 7278 by NAKAJIMA Yoshihiro <nakayosh@kcn.ne.jp>
1999-03-29 17:01:49 +00:00
christos a33a2c20ff Don't unlink the file first if we are renaming. We want to be as atomic as
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.
1999-03-24 15:13:46 +00:00
garbled 9e44e9b578 More and more .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages.  Many more to
come.
1999-03-22 18:16:34 +00:00
mycroft a1c657fe56 Clean up SYNOPSIS formatting. 1999-03-07 11:29:58 +00:00
christos c888dfac35 PR/2936: Brian C. Grayson: Avoid truncating precious files when installing
and the filesystem is full. Added -r flag to install, which installs on
a temporary file and then renames to the final destination.
1999-02-04 11:56:48 +00:00
hubertf 5f648bdae3 enable numbered backups via -B.old%02d 1999-01-26 01:34:25 +00:00
hubertf a9539cd876 Add a -b(ackup) flag to move any existing file(s) aside by renaming
them to file.old instead of simply deleting them. A different backup
suffix may be chosen with the -B option's argument.
1999-01-25 01:42:57 +00:00
christos 2f6a33d29c char -> unsigned char 1998-12-20 15:07:46 +00:00
mrg 14a817a516 create a "stat_flags.h" to go with stat_flags.c 1998-10-10 07:38:22 +00:00
wsanchez 438823cc1c Add new option -S, which is like -s, but takes a string of options to pass to strip,
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.
1998-10-08 02:12:51 +00:00
erh ecf84c1f19 Add -p flag to usage(). 1998-10-01 18:23:52 +00:00
christos 710d4c153b add -p flag, similar to cp(1) 1998-09-28 08:16:15 +00:00
mycroft 4462053ab3 Fill in missing (default) mmap(2) flags. 1998-02-20 09:27:18 +00:00
thorpej e00e57ff80 Delete extra RCS ID. 1997-12-30 22:31:17 +00:00
chuck 6bfc234bf3 use MAP_PRIVATE for mmap flags, not the non-standard MAP_FILE (aka 0) 1997-12-01 21:11:39 +00:00
tv 070c43b239 accept -c silently with -d; fixes GNU autoconf (among others) that assume
you can use -c with -d
...but this is NOT a reason for those of you making install procedures
to think this behaviour is `correct'... <grin>
1997-11-30 22:20:00 +00:00
thorpej e3a9b9d0ca In strip():
- Use the saved errno to print the error message if the vfork() fails.
- In the child, if the execl() fails, use warn()/_exit(), not err(),
  as the latter is not safe in the presence of a Real vfork().
1997-10-27 23:16:34 +00:00
lukem 42feae592b getopt returns -1 not EOF, fix .Nm 1997-10-20 03:32:25 +00:00
mrg 6e4783d48e WARNSify; deprecate register; clean up .Nm 1997-10-19 14:42:36 +00:00
gwr 10e180cc49 Back out the .PATH.c changes. The .depend problem (and others)
will be fixed using the new .NOPATH make feature instead.
1997-05-08 21:11:01 +00:00
gwr 012e528f2e Use .PATH.c: ... 1997-05-06 20:44:56 +00:00
mikel e66130db20 use proper pathname when unable to exec strip 1997-04-19 03:50:29 +00:00
thorpej 00b4f27f35 Allow the environment variable $STRIP to override _PATH_STRIP for
`-s', helping out cross-compiling.
1997-04-17 07:56:55 +00:00
christos 8913266731 PR/3445: NAKAJIMA Yoshihiro: Typo fix 1997-04-03 15:28:06 +00:00
christos 3917c3179d - Makefile cleanups 1997-03-24 21:57:01 +00:00
christos 852505afb6 Fix pasto in error message. 1997-03-16 19:46:02 +00:00
christos 9384236fae Add support for installing hard and symbolic links via the [-l harms] flag. 1997-03-16 19:43:19 +00:00
mycroft 2c450c6cc2 Remove kluge for GCC bug on m68k. 1997-03-12 18:13:17 +00:00
thorpej d7fa8cdb0d Use a slightly more sane way to cheat around XXX_BROKEN_GCC on the m68k.
The old way was more complex than necessary, and buggy, as pointed out
by Bruce Albrecht <bruce@zuhause.mn.org> in PR #3309.
1997-03-10 17:29:05 +00:00
fvdl ff19eb6a74 warnx --> warn, warnx wasn't needed anymore after previous change
(pointed out by enami tsugutomo)
1997-03-10 14:14:37 +00:00
mouse ee6a5b2cd6 alternate -> alternative, per PR 2643 1997-03-08 14:24:19 +00:00
fvdl 720565ab4f Correct error in previous. 1997-03-06 16:09:45 +00:00