History log of /freebsd-10.0-release/usr.bin/xinstall/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
259065 07-Dec-2013 gjb

- Copy stable/10 (r259064) to releng/10.0 as part of the
10.0-RELEASE cycle.
- Update __FreeBSD_version [1]
- Set branch name to -RC1

[1] 10.0-CURRENT __FreeBSD_version value ended at '55', so
start releng/10.0 at '100' so the branch is started with
a value ending in zero.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


251424 05-Jun-2013 brooks

New install flags were merged to 9-STABLE and will appear in FreeBSD-9.2.

Sponsored by: DARPA, AFRL
Submitted by: ru
MFC after: 3 days


246784 14-Feb-2013 hrs

- Fix libmd dependency. It is needed in the bootstrap library list because
usr.bin/xinstall depends on it.
- Remove libutil from usr.bin/xinstall/Makefile. No symbol was actually used.

Reviewed by: brooks


246147 31-Jan-2013 brooks

When in -U mode do avoid setting SUID bits, but do not modify the mode
variable so the intended mode can be logged correctly if -M is specified.

Sponsored by: DARPA, AFRL


245821 22-Jan-2013 brooks

Remove documentation of the old -M option.

Sponsored by: DARPA, AFRL


245793 22-Jan-2013 brooks

Make "install -l s[ar]" act like "ln -sfh" as intended. This fixes
installation of symbolic links where the target is a link is to an
existing directory.


245667 19-Jan-2013 joel

Remove EOL whitespace.


245617 18-Jan-2013 brooks

Introduce six new options from NetBSD:
* -M <metalog> Log metadata in mtree format.
* -D <destdir> Log paths relative to <destdir>.
* -h <hash> Log digest of type <hash>.
* -T <tags> Specify which mtree tags to log.
* -l <linkflag> Create hard or symbolic links (allows logging).
* -U Install without root privileges (owner, group, mode,
and flags can be logged via -M

NOTE: In the interest of compatibility with NetBSD and because it is the
obvious letter, the nearly useless -M option (disable mmap) has been
repurposed.

Sponsored by: DARPA, AFRL
Obtained from: NetBSD
Reviewed by: bz


245312 11-Jan-2013 brooks

Implement the -N <dbdir> option which allows an alternate passwd and
group file to be used. This is useful for installing on systems where
a user or group does not currently exist.

Sponsored by: DARPA, AFRL
Obtained from: NetBSD
MFC after: 5 days


237988 02-Jul-2012 kib

Issue proper diagnostic on the short writes, also consider the
case of write reporting 0 bytes as short write.

Reported and tested by: adreast
MFC after: 1 week


227202 06-Nov-2011 ed

Add missing static keywords to xinstall(1)


218940 22-Feb-2011 uqs

Teach tools/install.sh the -d directory mode.

Sync up with flags understood by install(1) [1], and make install(1)'s
usage output not hide the clearly documented -M flag.

PR: misc/154739 [1]
Submitted by: arundel


218909 21-Feb-2011 brucec

Fix typos - remove duplicate "the".

PR: bin/154928
Submitted by: Eitan Adler <lists at eitanadler.com>
MFC after: 3 days


216370 11-Dec-2010 joel

Remove the advertising clause from UCB copyrighted files in usr.bin. This
is in accordance with the information provided at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change

Also add $FreeBSD$ to a few files to keep svn happy.

Discussed with: imp, rwatson


204111 20-Feb-2010 uqs

Fix common misspelling of hierarchy

Pointed out by: bf1783 at gmail
Approved by: np (cxgb), kientzle (tar, etc.), philip (mentor)


201386 02-Jan-2010 ed

Build usr.bin/ with WARNS=6 by default.

Also add some missing $FreeBSD$ to keep svn happy.


200515 14-Dec-2009 delphij

Style improvements:

- Sort function prototypes;
- Apply static on all function bodies. To quote bde@:

> It is a good obfuscation to declare functions as static only in the
> prototype, so that you can't see the static for the actual function.
> The reverse obfuscation (with static only in the function definition)
> would make more sense, but is a constraint error.

Reviewed by: bde


200466 13-Dec-2009 delphij

xinstall.c does not require ctype functions, so ctype.h is not
necessary here.

Note: this would change the md5 checksum due to change caused
by different register layout.


200465 13-Dec-2009 delphij

Staticify internal functions and make usage() a prototype.


200462 13-Dec-2009 delphij

Revert most part of 200420 as requested, as more review and polish is
needed.


200420 11-Dec-2009 delphij

Remove unneeded header includes from usr.bin/ except contributed code.

Tested with: make universe


174587 14-Dec-2007 edwin

Give a better description when a install of multiple files fails
because of the absence of a destination directory or if the
"destination directory" is not a directory.

PR: bin/11826
Submitted by: Denis Eremenko <moonshade@pnhz.kz>
Approved by: grog@
X-MFC after: various freezes


162792 29-Sep-2006 ru

Markup fixes.


156363 06-Mar-2006 obrien

Add an override (DONTSTRIP) so that one can easily install debugable
binaries when one cannot easily edit a package's Makefiles and/or
configure scripts.


148580 31-Jul-2005 keramida

Fix all the spelling mistakes I could find in the man pages for words
that have at least 3 characters.

MFC after: 1 week
Thanks to: Music band ``Chingon''
for keeping me company while searching for these.


141846 13-Feb-2005 ru

Expand *n't contractions.


140817 25-Jan-2005 ssouhlal

- Make WARNS?= 6 clean
- Add WARNS?= 6

Approved by: stefanf, grehan (mentor)


140420 18-Jan-2005 ru

Sort sections.


140368 17-Jan-2005 ru

Added the EXIT STATUS section where appropriate.


131491 02-Jul-2004 ru

Mechanically kill hard sentence breaks.


130354 11-Jun-2004 marcel

Document the STRIPBIN environment variable. This includes adding a
forward reference from where strip(1) is being mention (-s option).

PR: bin/28620


127112 17-Mar-2004 ru

Improved incorrect usage diagnostics.


127111 17-Mar-2004 ru

Trust bsd.prog.mk to set SRCS correctly.


127110 17-Mar-2004 ru

GC unnecessary include file.


125553 07-Feb-2004 ru

- Demangle usage().
- Require the "directory" argument with the -d option.


117455 11-Jul-2003 phk

Since (x)install is pretty unhelpfull and just spits out a Usage
for a lot of unrelated error conditions, at least report the line
number where it bailed.

Don't use multiline string literals for Usage, gcc 3.3 doesn't like them.


113136 05-Apr-2003 imp

Migrate to a new way of dealing with building from old revisions of
FreeBSD. This method attempts to centralize all the necessary hacks
or work arounds in one of two places in the tree (src/Makefile.inc1
and src/tools/build). We build a small compatibility library
(libbuild.a) as well as selectively installing necessary include
files. We then include this directory when building host binaries.

This removes all the past release compatibilty hacks from various
places in the tree. We still build on tip of stable and current. I
will work with those that want to support more, although I anticipate
it will just work.

Many thanks to ru@, obrien@ and jhb@ for providing valuable input at
various stage of implementation, as well as for working together to
positively effect a change for the better.


107788 12-Dec-2002 ru

Uniformly refer to a file system as "file system".

Approved by: re


107428 30-Nov-2002 fenner

If both the unlink and the open fail, return the errno from the
unlink (very likely EPERM), since the errno from the open might
be a confusing ETXTBSY.

Approved by: re
MFC After: 1 week


107413 30-Nov-2002 bde

#include <sys/time.h> instead of depending on namespace pollution in
<sys/stat.h> for the declaration of struct timeval.

Approved by: re (rwatson)


106967 15-Nov-2002 peter

A little bit of anti-foot-shooting. Use utimes(2) rather than
the deprecated utime(3). utimes(2) uses timeval, but utime(3) uses
time_t's. If you do bad things (like I did) by mixing up include files
with libc, then install can do strange things if you mismatch the time_t
stuff. utime() is emulated entirely within libc.

Approved by: re (jhb)


106852 13-Nov-2002 ru

Take __FreeBSD_version into account when BOOTSTRAPPING.


106247 31-Oct-2002 ru

Document the new behavior of -C with respect to inode-change-time.
Document that -p also preserves the access time of the source.


106246 31-Oct-2002 ru

Do not change the target file's inode-change-time if -C is
specified, the target file already exists and the files are
the same, and the target's file flags and mode need not to
be changed.


102944 04-Sep-2002 dwmalone

ANSIify function definitions.
Add some constness to avoid some warnings.
Remove use register keyword.
Deal with missing/unneeded extern/prototypes.
Some minor type changes/casts to avoid warnings.

Reviewed by: md5


100870 29-Jul-2002 ru

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".

Requested by: bde


97876 05-Jun-2002 ru

Start the (overdue) de-orbit sequence for the -d -C combo,
as was promised in revision 1.43.

MFC after: 1 month


96704 16-May-2002 trhodes

More consistancy. file system > filesystem


96674 15-May-2002 fanf

Report errors properly if wait() fails.

PR: 30543
Approved by: dwmalone (mentor)
MFC after: 3 weeks


96439 12-May-2002 bde

Fixed 5 style bugs in VCS ids.


96437 12-May-2002 bde

Fixed printing the the strip binary's name in error messages.


96416 11-May-2002 marcel

Add support for stripping non-native object files by using an
environment variable that specifies the name of the strip(1)
program to use. The envvar is "STRIPBIN". The more natural
choice would be "STRIP", but that one is taken already.


95124 20-Apr-2002 charnier

Use `The .Nm utility'


94276 09-Apr-2002 ru

No longer needed to #ifdef __FBSDID, this is now handled by Makefile.inc1.


92922 22-Mar-2002 imp

remove __P


92611 18-Mar-2002 des

Bump the cutoff mark for comparing files from 8 MB to 16 MB.


90416 08-Feb-2002 markm

Remove NO_WERRORs and WARNS=n's. To be revisited after GCC3.


88179 19-Dec-2001 imp

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>


87724 12-Dec-2001 ru

More "const" poisoning, and only use NO_WERROR if we're bootstrapping.


87685 11-Dec-2001 markm

WARNS=2, use __FBSDID(), set NO_WERROR, as there are "dirty" files used
during the bootstrap phase.


85337 23-Oct-2001 dd

This program uses sysexits(3), so it does not exit 1 on failure.

PR: 31415


83571 17-Sep-2001 ru

When bootstrapping install(1), libc may not have the strtofflags(3) support.


82067 21-Aug-2001 ru

Update -v documentation to match reality.

Spotted by: bde


79452 09-Jul-2001 brian

Fix the type of the NULL arg to execl()

Idea from: Theo de Raadt <deraadt@openbsd.org>


77481 30-May-2001 ru

Note that the default behavior has changed to copy files.
Also, fix markup in the SYNOPSIS.

Submitted by: dougb


77472 30-May-2001 ru

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


77412 29-May-2001 imp

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.


77345 28-May-2001 ru

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


75084 02-Apr-2001 ru

Do not override `realinstall' target, use ${PROGNAME}.


74862 27-Mar-2001 ru

Do not override the ``install'' target.


74848 27-Mar-2001 ru

MAN[1-9] -> MAN.


70197 19-Dec-2000 ru

Prepare for mdoc(7)NG.


68963 20-Nov-2000 ru

mdoc(7) police: use the new features of the Nm macro.


66813 08-Oct-2000 bde

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.


61749 17-Jun-2000 joe

Switch over to using the new fflagstostr and strtofflags library calls.


58628 26-Mar-2000 charnier

Add DIAGNOSTICS section name


57670 01-Mar-2000 sheldonh

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.


57003 05-Feb-2000 joe

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


56692 27-Jan-2000 joe

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 ;)


55476 05-Jan-2000 bde

Actually remove unrequired SRCS.


55302 01-Jan-2000 joe

Added missing DPADD's. Removed unrequired SRCS's.

Obtained from: bde


55270 30-Dec-1999 joe

Moved flags_to_string and string_to_flags into libutil. It's used in
many places nowadays.


54191 06-Dec-1999 obrien

Add "-v" to usage().


54190 06-Dec-1999 obrien

Document the "-v" flag. [It was like that when I got here.. honestly.]


51705 27-Sep-1999 billf

-Wall fixes.

Submitted by: nrahlstr


50477 28-Aug-1999 peter

$Id$ -> $FreeBSD$


41847 16-Dec-1998 imp

Free memory from setmode.

Obtained from: OpenBSD


40301 13-Oct-1998 des

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


36842 10-Jun-1998 peter

fchflags(8) -> fchflags(2)
Submitted by: Kenneth Merry <ken@plutotech.com>

Also, while here, mention that other FS's don't do flags.


36586 02-Jun-1998 peter

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>.


32652 20-Jan-1998 bde

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.


32490 13-Jan-1998 alex

Change MAP_FAILED to type void *.
Typo fix.


32429 11-Jan-1998 peter

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.


32360 09-Jan-1998 jb

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.


30809 28-Oct-1997 ache

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)


30795 27-Oct-1997 ache

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


29379 14-Sep-1997 peter

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.


28827 27-Aug-1997 charnier

Uncomment sccsid string and enclose it inside #if 0/#endif.
Cosmetic in man page.


26083 24-May-1997 peter

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.


24360 29-Mar-1997 imp

compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.


23012 22-Feb-1997 peter

Revert $FreeBSD$ to $Id$


21786 16-Jan-1997 alex

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


21673 14-Jan-1997 jkh

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.


18611 01-Oct-1996 imp

Sync usage line to man page, per style(9).

Pointed out by: Bruce Evans <bde@zeta.org.au>


18572 29-Sep-1996 imp

Submitted by: Bruce Evans

Remove -S for the install usage message
Make the install usage message < 80 columns wide
Place the dodir declaration in order.


18551 29-Sep-1996 imp

Implement -d in install. Update the man page to reflect this change.


18525 28-Sep-1996 imp

Use EX_* exit values, from NetBSD


18489 24-Sep-1996 bde

Changed 'd' to 'D' in getopt arg too.


18482 24-Sep-1996 imp

Per discussions in -current
- 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.


18040 05-Sep-1996 peter

Be more careful with mmap. If it fails, fall back to a plain compare or
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.


18039 05-Sep-1996 peter

accidently removed the "dont compare > 8MB files hack".
didn't rewind the files after the read()s in the non-mmap compare.


18038 05-Sep-1996 peter

Only attempt to mmap() files from a ufs or cd9660 fs for comparing or
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.


17546 12-Aug-1996 peter

Add a simple -v (verbose) option that allows you to see when -C actually
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.


16611 23-Jun-1996 bde

Made strip failures fatal. This fixes PR 1328.


15144 08-Apr-1996 joerg

Don't reference NULL pointers if owner and/or group are omitted.

Pointed out by: somebody on the mailing list who's name i forgot


15069 06-Apr-1996 julian

Submitted by: archie@tribe.com

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.


14520 11-Mar-1996 mpp

Fix a couple of typos.

Submitted by: Philippe Charnier <charnier@limrr.fr>


13965 08-Feb-1996 pst

Kludge-fix for a specific instance of bin/517.
The real fix requires changes to getpwent(3) and friends and getgrent(3)
and friends.

Submitted by: Tim Wilkinson


13744 30-Jan-1996 mpp

Fix a bunch of spelling errors in a bunch of man pages.


11356 09-Oct-1995 bde

Add options -C (same as -c except for preserving the modification
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)


10346 27-Aug-1995 dg

Backed out change in rev 1.2.


9911 04-Aug-1995 joerg

Make install not remove the target file if -s has been specified but
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)


9701 25-Jul-1995 bde

Change `install' to `${INSTALL}' so that default install flags can be
specified in the top level Makefiles.


2496 04-Sep-1994 ats

Reviewed by:
Submitted by:
Get the man page installed. Does anyone know the reason for the name
xinstall instead of install for this directory ? Would life more
easy to get this whole thing under install.


1866 05-Aug-1994 wollman

More merry makefile munging for man page compatability.


1661 31-May-1994 rgrimes

Add ${COPY} on install command so that the file in obj does
not get removed when running make install.


1637 30-May-1994 rgrimes

Cleanup so that make install can run, many install: maninstall changed
to just install:, sperious targets and CLEANFILES removed.


1591 27-May-1994 rgrimes

This commit was generated by cvs2svn to compensate for changes in r1590,
which included commits to RCS files with non-trunk default branches.