aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/xinstall/xinstall.c
Commit message (Collapse)AuthorAgeFilesLines
* MFC.Ruslan Ermilov2002-08-071-1/+1
| | | | | | | | | Ignore -C, -p, and -S options of install(1) when used with the -d option. Warn about COPY being phased out. Restore the old method of always comparing before installing: INSTALL="install -C". Notes: svn path=/stable/4/; revision=101467
* Back out previous commit, rev 1.3.2.5 of bsd.sys.mk takes care of it.Dag-Erling Smørgrav2002-07-031-2/+0
| | | | Notes: svn path=/stable/4/; revision=99367
* Apply band-aid to unbreak upgrades from old RELENG_4 systems.Dag-Erling Smørgrav2002-07-031-0/+2
| | | | Notes: svn path=/stable/4/; revision=99358
* MFC: synch with -CURRENT.Dag-Erling Smørgrav2002-07-011-42/+43
| | | | Notes: svn path=/stable/4/; revision=99228
* MFC rev 1.54: Report errors properly if wait() fails.Tony Finch2002-06-211-1/+2
| | | | Notes: svn path=/stable/4/; revision=98592
* MFC:David E. O'Brien2001-08-011-256/+314
| | | | | | | | | | 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. Notes: svn path=/stable/4/; revision=80852
* MFC: r1.40: Use the correct timestamp for the -C -p case when the comparison ↵Kris Kennaway2001-03-041-2/+2
| | | | | | | fails. Notes: svn path=/stable/4/; revision=73499
* MFC: Use the new fflagstostr and strtofflags functions in libc.Josef Karthauser2000-06-281-1/+1
| | | | Notes: svn path=/stable/4/; revision=62194
* Historically file flags (schg, uschg, etc) have been converted fromJosef Karthauser2000-01-271-2/+1
| | | | | | | | | | | | | | | | | | | | 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 ;) Notes: svn path=/head/; revision=56692
* Add "-v" to usage().David E. O'Brien1999-12-061-3/+3
| | | | Notes: svn path=/head/; revision=54191
* -Wall fixes.Bill Fumerola1999-09-271-0/+1
| | | | | | | Submitted by: nrahlstr Notes: svn path=/head/; revision=51705
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50477
* Free memory from setmode.Warner Losh1998-12-161-1/+2
| | | | | | | Obtained from: OpenBSD Notes: svn path=/head/; revision=41847
* Calls one or more of malloc(), warn(), err(), syslog(), execlp() orDag-Erling Smørgrav1998-10-131-2/+2
| | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=40301
* Treat an EOPNOTSUPP from fchflags() as a non-fatal case. Only warn aboutPeter Wemm1998-06-021-9/+17
| | | | | | | | | | | | | | | | | 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>. Notes: svn path=/head/; revision=36586
* Converted to Lite2 mount interface - don't use numeric filesystemBruce Evans1998-01-201-17/+13
| | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=32652
* Change MAP_FAILED to type void *.Alexander Langer1998-01-131-3/+3
| | | | | | | Typo fix. Notes: svn path=/head/; revision=32490
* Add an option (-M) to install to disable use of mmap(2). This is kindaPeter Wemm1998-01-111-4/+7
| | | | | | | | | 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. Notes: svn path=/head/; revision=32429
* Allow install to build from FreeBSD source using NetBSD tools andJohn Birrell1998-01-091-1/+9
| | | | | | | | headers during the port of FreeBSD to a NetBSD supported architecture. FreeBSD needs to be able to install itself from very early on. Notes: svn path=/head/; revision=32360
* 1) Create intermediate directories with 755, not 777Andrey A. Chernov1997-10-281-4/+5
| | | | | | | | 2) Exit with error diagnostic if file exists but not a directory (-d) 3) Do chmod independently of chown (-d) Notes: svn path=/head/; revision=30809
* 1) Ignore -C with -d, not fail (for $(INSTALL) macro from /etc/make.conf)Andrey A. Chernov1997-10-271-9/+9
| | | | | | | | | | 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 Notes: svn path=/head/; revision=30795
* When calling strip, temporarily close the file, call strip and thenPeter Wemm1997-09-141-2/+10
| | | | | | | | | | | 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. Notes: svn path=/head/; revision=29379
* Uncomment sccsid string and enclose it inside #if 0/#endif.Philippe Charnier1997-08-271-2/+4
| | | | | | | Cosmetic in man page. Notes: svn path=/head/; revision=28827
* Bootstrap aid from older releases.. 'make world' can't build xinstallPeter Wemm1997-05-241-1/+6
| | | | | | | | | | | 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. Notes: svn path=/head/; revision=26083
* compare return value from getopt against -1 rather than EOF, per the finalWarner Losh1997-03-291-2/+2
| | | | | | | posix standard on the topic. Notes: svn path=/head/; revision=24360
* Revert $FreeBSD$ to $Id$Peter Wemm1997-02-221-1/+1
| | | | Notes: svn path=/head/; revision=23012
* Sweep through the tree fixing mmap() usage:Alexander Langer1997-01-161-5/+5
| | | | | | | | | | | | | | | - 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 Notes: svn path=/head/; revision=21786
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-141-1/+1
| | | | | | | | | | | 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. Notes: svn path=/head/; revision=21673
* Sync usage line to man page, per style(9).Warner Losh1996-10-011-3/+4
| | | | | | | Pointed out by: Bruce Evans <bde@zeta.org.au> Notes: svn path=/head/; revision=18611
* Submitted by: Bruce EvansWarner Losh1996-09-291-5/+5
| | | | | | | | | Remove -S for the install usage message Make the install usage message < 80 columns wide Place the dodir declaration in order. Notes: svn path=/head/; revision=18572
* Implement -d in install. Update the man page to reflect this change.Warner Losh1996-09-291-5/+56
| | | | Notes: svn path=/head/; revision=18551
* Use EX_* exit values, from NetBSDWarner Losh1996-09-281-5/+9
| | | | Notes: svn path=/head/; revision=18525
* Changed 'd' to 'D' in getopt arg too.Bruce Evans1996-09-241-2/+2
| | | | Notes: svn path=/head/; revision=18489
* Per discussions in -currentWarner Losh1996-09-241-3/+3
| | | | | | | | | | | - Change the debug flag from -d to -D to avoid conflict with other install programs. - Update man page to reflect this - Update usage string -d meaning creat directory is specifically not implemented by these changes. Notes: svn path=/head/; revision=18482
* Be more careful with mmap. If it fails, fall back to a plain compare orPeter Wemm1996-09-051-11/+27
| | | | | | | | | | | | copy. Dont leave stray INS@xxxx temp files around, especially when installing something less than 8MB and the destination runs out of space, etc. It still doesn't clean up the temp files on SEGV or other signals etc. Notes: svn path=/head/; revision=18040
* accidently removed the "dont compare > 8MB files hack".Peter Wemm1996-09-051-31/+37
| | | | | | | didn't rewind the files after the read()s in the non-mmap compare. Notes: svn path=/head/; revision=18039
* Only attempt to mmap() files from a ufs or cd9660 fs for comparing orPeter Wemm1996-09-051-4/+45
| | | | | | | | | | | installing. mmap'ing stuff over a nfs mount took out my machine during a 'make world' last night while I was asleep. I started out with a list of fs's to avoid, when I realised that I really didn't know which ones were safe with mmap, so I went for the ones I knew and implemented a fallback compare. Notes: svn path=/head/; revision=18038
* Add a simple -v (verbose) option that allows you to see when -C actuallyPeter Wemm1996-08-121-5/+12
| | | | | | | | | | | | | installs something. This is not 100% right, since it has a false hit when install -C snaps hard links. Also, run strip(1) from the $PATH, otherwise you need a special version of install to install (say) elf binaries which have a different strip. With JDP's elfkit, the layout of the path determines which binary format you are generating. Notes: svn path=/head/; revision=17546
* Made strip failures fatal. This fixes PR 1328.Bruce Evans1996-06-231-2/+4
| | | | Notes: svn path=/head/; revision=16611
* Don't reference NULL pointers if owner and/or group are omitted.Joerg Wunsch1996-04-081-3/+5
| | | | | | | Pointed out by: somebody on the mailing list who's name i forgot Notes: svn path=/head/; revision=15144
* Submitted by: archie@tribe.comJulian Elischer1996-04-061-3/+75
| | | | | | | | | allow the user to install using a Numeric GID or UID. this brings it in to line with chgrp and chown, ans is required by some people using FreeBSD in a product. Notes: svn path=/head/; revision=15069
* Kludge-fix for a specific instance of bin/517.Paul Traina1996-02-081-3/+3
| | | | | | | | | | The real fix requires changes to getpwent(3) and friends and getgrent(3) and friends. Submitted by: Tim Wilkinson Notes: svn path=/head/; revision=13965
* Add options -C (same as -c except for preserving the modificationBruce Evans1995-10-091-74/+220
| | | | | | | | | | | | | | | time of the target if the target file is the same as the source), -d (debug), and -p (same as -C except for preserving the modification time of the source if the target doesn't exists or is different from the source. Use library err() functions instead of our own and pass them better exit codes. Submitted by: wollman (and changed a lot by me) Notes: svn path=/head/; revision=11356
* Backed out change in rev 1.2.David Greenman1995-08-271-1/+1
| | | | Notes: svn path=/head/; revision=10346
* Make install not remove the target file if -s has been specified butJoerg Wunsch1995-08-041-1/+1
| | | | | | | | | | | | stripping failed (since the file has been a shell script, for example). Closes PR # bin/645: "install -c -s" can't inst... Submitted by: hohmuth@inf.tu-dresden.de (Michael Hohmuth) Notes: svn path=/head/; revision=9911
* BSD 4.4 Lite Usr.bin SourcesRodney W. Grimes1994-05-271-0/+358
Notes: svn path=/cvs2svn/branches/CHRISTOS/; revision=1590