Commit Graph

75 Commits

Author SHA1 Message Date
ru
95e914ce15 No longer needed to #ifdef __FBSDID, this is now handled by Makefile.inc1. 2002-04-09 11:39:05 +00:00
imp
6b8e9d623c remove __P 2002-03-22 01:42:45 +00:00
des
7d55322c3f Bump the cutoff mark for comparing files from 8 MB to 16 MB. 2002-03-18 23:26:13 +00:00
markm
fcaa25d991 Remove NO_WERRORs and WARNS=n's. To be revisited after GCC3. 2002-02-08 23:07:37 +00:00
imp
1972f62704 xinstall is part of the upgrade path for 4.4-RELEASE as well.
Do the usualy ifdef trick here.

Reported by: dworkin muller <addr-removed> and faried nawaz <fn@hungry.com>
2001-12-19 06:05:42 +00:00
ru
81018b217f More "const" poisoning, and only use NO_WERROR if we're bootstrapping. 2001-12-12 08:49:51 +00:00
markm
741130cddf WARNS=2, use __FBSDID(), set NO_WERROR, as there are "dirty" files used
during the bootstrap phase.
2001-12-11 22:46:42 +00:00
dd
1bca1827e7 This program uses sysexits(3), so it does not exit 1 on failure.
PR:		31415
2001-10-23 00:47:27 +00:00
ru
56d979def6 When bootstrapping install(1), libc may not have the strtofflags(3) support. 2001-09-17 11:58:14 +00:00
ru
9902c756ae Update -v documentation to match reality.
Spotted by:	bde
2001-08-21 15:59:55 +00:00
brian
34ad3e29c4 Fix the type of the NULL arg to execl()
Idea from: Theo de Raadt <deraadt@openbsd.org>
2001-07-09 09:24:06 +00:00
ru
e8e3157f6e Note that the default behavior has changed to copy files.
Also, fix markup in the SYNOPSIS.

Submitted by:	dougb
2001-05-30 09:45:47 +00:00
ru
46f4113815 Backout rev. 1.42 (relaxing the check for -d plus other flags).
Instead, issue a warning for now if -d and -C options are used
together.  This will be turned into an error before 4.5-RELEASE.

Reviewed by:	imp
2001-05-30 07:08:49 +00:00
imp
0716046ac4 Use use ${INSTALL} -d in our build process. If INSTALL is set to
"install -C" then things will fail due to new checks.  Relax the
checks so that install -C -d works again.
2001-05-29 18:41:16 +00:00
ru
e28ff481f2 Many new features and optimization improvements:
o New flags: -b and -B (backup)
o New flag: -S (safe copy; aka "atomic" install)
o The -c flag is now the default.
o The -D flag was withdrawn.

Reviewed by:	bde (up to some point)
Obtained from:	OpenBSD but heavily modified
MFC after:	1 month
2001-05-28 16:41:53 +00:00
ru
42f8f6d866 Do not override `realinstall' target, use ${PROGNAME}. 2001-04-02 11:54:59 +00:00
ru
62802d4075 Do not override the ``install'' target. 2001-03-27 15:14:49 +00:00
ru
8ec47de9c3 MAN[1-9] -> MAN. 2001-03-27 10:52:19 +00:00
ru
655e7db87e Prepare for mdoc(7)NG. 2000-12-19 16:00:12 +00:00
ru
0957874304 mdoc(7) police: use the new features of the Nm macro. 2000-11-20 19:21:22 +00:00
bde
73d023390c Use the correct timestamp for the -C -p case when the comparison fails.
A garbage timestamp was used for at least installing /dev/null with -C -p
when the target doesn't already exist.
2000-10-08 09:17:56 +00:00
joe
d38d9a6248 Switch over to using the new fflagstostr and strtofflags library calls. 2000-06-17 14:19:33 +00:00
charnier
ed17e2d488 Add DIAGNOSTICS section name 2000-03-26 15:06:46 +00:00
sheldonh
d39e57413d Remove single-space hard sentence breaks. These degrade the quality
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.
2000-03-01 12:20:22 +00:00
joe
bb1bbb6d1f Revert part of the last commit, remove {g|s}etflags from the libc
interface, and statically link them to the programs using them.
These functions, upon reflection and discussion, are too generically
named for a library interface with such specific functionality.
Also the api that they use, whilst ok for private use, isn't good
enough for a libc function.

Additionally there were complications with the build/install-world
process.  It depends heavily upon xinstall, which got broken by
the change in api, and caused bootstrap problems and general mayhem.

There is work in progress to address future problems that may be
caused by changes in install-chain tools, and better names for
{g|s}etflags can be derived when some future program requires them.
For now the code has been left in src/lib/libc/gen (it started off
in src/bin/ls).

It's important to provide library functions for manipulating file
flag strings if we ever want this interface to be adopted outside
of the source tree, but now isn't necessarily the right moment
with 4.0-release just around the corner.

Approved:	jkh
2000-02-05 18:42:36 +00:00
joe
a3a381812b Historically file flags (schg, uschg, etc) have been converted from
string to u_long and back using two functions, flags_to_string and
string_to_flags, which co-existed with 'ls'.  As time has progressed
more and more other tools have used these private functions to
manipulate the file flags.

Recently I moved these functions from /usr/src/bin/ls to libutil,
but after some discussion with bde it's been decided that they
really ought to go in libc.

There are two already existing libc functions for manipulating file
modes:  setmode and getmode.  In keeping with these flags_to_string
has been renamed getflags and string_to_flags to setflags.

The manual page could probably be improved upon ;)
2000-01-27 21:17:01 +00:00
bde
00c594d838 Actually remove unrequired SRCS. 2000-01-05 19:22:10 +00:00
joe
f6504eea50 Added missing DPADD's. Removed unrequired SRCS's.
Obtained from:	bde
2000-01-01 15:44:11 +00:00
joe
e1558fa7cb Moved flags_to_string and string_to_flags into libutil. It's used in
many places nowadays.
1999-12-30 13:15:15 +00:00
obrien
94069ddd22 Add "-v" to usage(). 1999-12-06 05:02:32 +00:00
obrien
b6ee6509df Document the "-v" flag. [It was like that when I got here.. honestly.] 1999-12-06 05:01:14 +00:00
billf
8b77d6d469 -Wall fixes.
Submitted by:	nrahlstr
1999-09-27 00:36:03 +00:00
peter
e4b04a2b21 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
imp
08725fd9fe Free memory from setmode.
Obtained from: OpenBSD
1998-12-16 04:51:27 +00:00
des
d55d163bcc Calls one or more of malloc(), warn(), err(), syslog(), execlp() or
execvp() in the child branch of a vfork(). Changed to use fork()
instead.

Some of these (mv, find, apply, xargs) might benefit greatly from
being rewritten to use vfork() properly.

PR:		Loosely related to bin/8252
Approved by:	jkh and bde
1998-10-13 14:52:33 +00:00
peter
6c57133574 fchflags(8) -> fchflags(2)
Submitted by:  Kenneth Merry <ken@plutotech.com>

Also, while here, mention that other FS's don't do flags.
1998-06-10 07:17:59 +00:00
peter
fefb8de8ef Treat an EOPNOTSUPP from fchflags() as a non-fatal case. Only warn about
it if flags were explicitly specified on the command line.  Do not warn
if we were merely trying to preserve flags or remove UF_NODUMP.  NFS does
not support flags.

I'm not sure that this is ideal, but it should do for now.  Installing
a plain file onto a NFS server must work, we used to silently ignore the
attempt.  Doing a binary install looses the flags anyway since cpio
doens't preserve them with the cdrom/network images.
XXX make world should not use flags or chown/chgrp in the obj/tmp area.

This is based on a suggestion from Ken Merry <ken@plutotech.com>.
1998-06-02 12:00:08 +00:00
bde
6ecb1cddb8 Converted to Lite2 mount interface - don't use numeric filesystem
types.  The NetBSD compatibility cruft was more correct for -current
than FreeBSD's own code.  It just used NetBSD #defines instead of
string literals for the filesystem names.  NetBSD's MOUNT_UFS is
"ffs", so using a literal "ufs" gives wrong results, but this is
unimportant, especially for bootstrapping.

Fixed style bugs in trymmap().

Fixed some disordered declarations.
1998-01-20 13:52:32 +00:00
alex
cbae2d4417 Change MAP_FAILED to type void *.
Typo fix.
1998-01-13 02:12:43 +00:00
peter
28a9024320 Add an option (-M) to install to disable use of mmap(2). This is kinda
handy at the moment with -current's mmap+unlink interactions..  The
problems seem worst when using INSTALL="install -C" in /etc/make.conf.
This could well come in handy in the future too.
1998-01-11 11:43:36 +00:00
jb
922214a4f7 Allow install to build from FreeBSD source using NetBSD tools and
headers during the port of FreeBSD to a NetBSD supported architecture.
FreeBSD needs to be able to install itself from very early on.
1998-01-09 06:05:13 +00:00
ache
3047737dac 1) Create intermediate directories with 755, not 777
2) Exit with error diagnostic if file exists but not a directory (-d)
3) Do chmod independently of chown (-d)
1997-10-28 14:20:10 +00:00
ache
0bc1fbadaf 1) Ignore -C with -d, not fail (for $(INSTALL) macro from /etc/make.conf)
2) When uid/gid not specified, not try to set 0:0 owner, just do nothing.
It makes possible to use install -d by users without setting
their uid:gid each time.
3) Be more specific where install_dir fails
1997-10-27 22:53:33 +00:00
peter
c771c1467b When calling strip, temporarily close the file, call strip and then
reopen it after strip has finished.  This makes it work when
/usr/bin/strip replaces the file rather than doing an in-place edit
(such as the binutils-2.8 strip, which is a variation of objcopy).
This is necessary if install(1) and strip(1) are going to cooperate
on an ELF system.
1997-09-14 08:21:44 +00:00
charnier
0da82d0dd8 Uncomment sccsid string and enclose it inside #if 0/#endif.
Cosmetic in man page.
1997-08-27 06:29:23 +00:00
peter
0504fa59ac Bootstrap aid from older releases.. 'make world' can't build xinstall
until the includes are installed, and it doesn't install the includes until
xinstall is built (the previous xinstall binary may not have -C).  As a
bandaid, define MAP_FAILED ourselves if <sys/mman.h> didn't.  Perhaps it
would be safer to simply disable mmap if all the prerequisites are not
there.
1997-05-24 05:39:19 +00:00
imp
cd84ece5fd compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
1997-03-29 04:34:07 +00:00
peter
aef78d145b Revert $FreeBSD$ to $Id$ 1997-02-22 19:58:13 +00:00
alex
ee019a53dc Sweep through the tree fixing mmap() usage:
- Use MAP_FAILED instead of the constant -1 to indicate
    failure (required by POSIX).
  - Removed flag arguments of '0' (required by POSIX).
  - Fixed code which expected an error return of 0.
  - Fixed code which thought any address with the high bit set
    was an error.
  - Check for failure where no checks were present.

Discussed with:	bde
1997-01-16 21:58:40 +00:00
jkh
9c0cd3f9df Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00