Commit Graph

103 Commits

Author SHA1 Message Date
Glen Barber
ac2875fa16 Explicitly add unmarked bin/ binaries to the runtime package.
Note: tcsh(1) has a MK_TCSH=no test, so this should be a separate
package, which requires pre-install/post-install scripts, to be
added later.

Sponsored by:	The FreeBSD Foundation
2016-02-09 16:58:50 +00:00
Simon J. Gerraty
ccfb965433 Add META_MODE support.
Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.

Still need to add real targets under targets/ to build packages.

Differential Revision:       D2796
Reviewed by: brooks imp
2015-06-13 19:20:56 +00:00
Simon J. Gerraty
44d314f704 dirdeps.mk now sets DEP_RELDIR 2015-06-08 23:35:17 +00:00
Simon J. Gerraty
98e0ffaefb Merge sync of head 2015-05-27 01:19:58 +00:00
Jilles Tjoelker
e63db0d3e5 symlink(7): Mention chflagsat() (can take AT_SYMLINK_NOFOLLOW).
MFC after:	1 week
2015-02-16 12:56:55 +00:00
Jilles Tjoelker
2205e0d1bd Add futimens and utimensat system calls.
The core kernel part is patch file utimes.2008.4.diff from
pluknet@FreeBSD.org. I updated the code for API changes, added the manual
page and added compatibility code for old kernels. There is also audit and
Capsicum support.

A new UTIME_* constant might allow setting birthtimes in future.

Differential Revision:	https://reviews.freebsd.org/D1426
Submitted by:	pluknet (partially)
Reviewed by:	delphij, pluknet, rwatson
Relnotes:	yes
2015-01-23 21:07:08 +00:00
Jilles Tjoelker
df30ae985d symlink(7): Note that stat(1) does not follow symlinks by default.
MFC after:	1 week
2014-12-29 13:02:03 +00:00
Simon J. Gerraty
fae50821ae Updated dependencies 2014-05-16 14:09:51 +00:00
Simon J. Gerraty
76b28ad6ab Updated dependencies 2014-05-10 05:16:28 +00:00
Simon J. Gerraty
d1d0158641 Merge from head 2013-09-05 20:18:59 +00:00
Eitan Adler
08aa7c869f Add 'static' where able. 2013-06-02 17:55:00 +00:00
Simon J. Gerraty
7cf3a1c6b2 Updated dependencies 2013-03-11 17:21:52 +00:00
Simon J. Gerraty
f5f7c05209 Updated dependencies 2013-02-16 01:23:54 +00:00
David E. O'Brien
d9a447559b Sync with HEAD. 2013-02-08 16:10:16 +00:00
Glen Barber
955e0a6bd2 Fix wording nit.
PR:		174787
Submitted by:	Cody Rank
MFC after:	3 days
2012-12-28 22:06:33 +00:00
Simon J. Gerraty
23090366f7 Sync from head 2012-11-04 02:52:03 +00:00
Joel Dahl
8850c7d71f Add a couple of examples.
Obtained from:	OpenBSD
2012-11-02 22:32:47 +00:00
Marcel Moolenaar
7750ad47a9 Sync FreeBSD's bmake branch with Juniper's internal bmake branch.
Requested by: Simon Gerraty <sjg@juniper.net>
2012-08-22 19:25:57 +00:00
Ed Schouten
f9d4afb439 Put some static keywords in the source code.
For these simple utilities, it doesn't harm to make all global variables
static. In fact, this allows the compiler to perform better forms of
optimisation and analysis.
2011-10-31 08:59:17 +00:00
Jilles Tjoelker
0cf90cd1d3 bin: Prefer strrchr() to rindex().
This removes the last index/rindex usage from /bin.
2011-03-15 22:22:11 +00:00
Joel Dahl
a53bb70bda Spelling fixes. 2010-07-31 21:09:49 +00:00
Jilles Tjoelker
141c21d9de symlink(7): Add lpathconf(2) and *at system calls.
MFC after:	1 week
2010-04-25 13:29:59 +00:00
Jilles Tjoelker
44f78be924 symlink(7): The ownership of symlinks is used by the system,
in at least three ways, so do not say it is ignored:
* who may delete/rename a symlink in a sticky directory
* who may do lchflags(2)/lchown(2)/lchmod(2)
* whose inode quota is charged

MFC after:	1 week
2010-04-25 13:13:23 +00:00
Jilles Tjoelker
dc00aa5dd6 ln: Allow a trailing slash when creating a link to a directory.
In the 'ln source... directory' synopsis, the basename of each source
determines the name of the created link. Determine this using basename(3)
instead of strrchr(..., '/') which is incorrect if the pathname ends in a
slash.

The patch is somewhat changed to allow for basename(3) implementations that
change the passed pathname, and to fix the -w option's checking also.
The code to compare directory entries only applies to hard links, which
cannot be created to directories using ln.

Example:
  ln -s /etc/defaults/ /tmp
This should create a symlink named defaults.

PR:		121568
Submitted by:	Ighighi
MFC after:	1 week
2010-04-21 21:57:03 +00:00
Jilles Tjoelker
5d66b54e27 ln: Refuse deleting a directory entry by hardlinking it to itself.
Two pathnames refer to the same directory entry iff the directories match
and the final components' names match.

Example: (assuming file1 is an existing file)
  ln -f file1 file1
This now fails while leaving file1 intact. It used to delete file1 and then
complain it cannot be linked because it is gone.

With -i, this error is detected before the question is asked.

MFC after:	2 weeks
2010-04-17 22:39:53 +00:00
Jilles Tjoelker
80a0e9b5f5 Allow creating hard links to symlinks using ln(1).
This implements the POSIX.1-2008 -L and -P flags.

The default remains to create hard links to the target of symlinks.

Approved by:	re (kib), ed (mentor)
2009-07-19 17:35:23 +00:00
Tom Rhodes
8b9e2a36cc Clean up a bit of confusing language and improve .Nd.
PR:		47818
Reviewed by:	keramida
2009-01-13 15:24:35 +00:00
Giorgos Keramidas
d605a06c6e Unbreak last commit to ln for amd64.
Cast string precision to `int'.  amd64 systems warn about the
field precision being `long int' if we don't, and pathnames are
normally short enough to fit in an `int'.

Noticed by:	pav
2008-06-07 09:37:30 +00:00
Giorgos Keramidas
3595f21aae Add a -w warning flag to ln(1). When the -w option is enabled,
ln(1) checks to see if the source of a symlink, i.e. the file it
should point to actually exists.  The default is the old ln
behavior, that does not check, to avoid surprising people who may
be using ln(1) in scripts or other non-interactive places.

PR:		bin/7265
Submitted by:	Joel Ray Holveck, detlev!joelh at mail.camalott.com
MFC after:	2 weeks
2008-06-06 08:27:59 +00:00
Ruslan Ermilov
8090694427 Express in the usage() and SYNOPSIS that -F depends on -s, and
that -f and -i are exclusive.
2007-11-17 21:01:22 +00:00
Ruslan Ermilov
cadf8ad71c Swap "source"/"target" where appropriate, to match documentation. 2007-11-17 20:24:58 +00:00
Gleb Smirnoff
5e09de40c3 Add '-F' option which allows to delete existing empty directories, when
creating symbolic links.

PR:		bin/92149
Submitted by:	Eugene Grosbein <eugen grosbein.pp.ru>
2006-02-14 11:08:05 +00:00
Ruslan Ermilov
0227791b40 Expand *n't contractions. 2005-02-13 22:25:33 +00:00
Ruslan Ermilov
a89237ae95 Sync program's usage() with manpage's SYNOPSIS. 2005-02-09 17:37:39 +00:00
Ruslan Ermilov
6fca4c7c3f Add the new standard EXIT STATUS section where appropriate.
Sort standard sections in the (documented) preferred order.
2005-01-16 16:41:59 +00:00
Warner Losh
9ddb49cbe4 /*- or .\"- or #- to begin license clauses. 2005-01-10 08:39:26 +00:00
Ruslan Ermilov
1171aedcdf Deal with double whitespace. 2004-07-03 00:06:28 +00:00
Ruslan Ermilov
eccea571a7 Mechanically kill hard sentence breaks. 2004-07-02 21:04:19 +00:00
Ruslan Ermilov
d37ea99837 Removed trailing whitespace. 2004-07-02 19:07:33 +00:00
Mark Murray
6195fb4102 Remove clause 3 from the UCB licenses.
OK'ed by:	imp, core
2004-04-06 20:06:54 +00:00
David E. O'Brien
09a80d4867 Quiet warnings about copyright[]. 2003-05-01 16:58:57 +00:00
Tom Rhodes
7d971bbf29 s/filesystem/file system/ as discussed on -developers 2002-08-21 17:32:44 +00:00
Tim J. Robbins
ad2eaa7e87 Claim conformance to 1003.2-1992 instead of 1003.1-2001 due to doubts
raised by Lukas Ertl over symbolic link handling.

PR:		41576
MFC after:	1 week
2002-08-12 12:34:03 +00:00
Mark Murray
f193e3fc68 Fix an easy WARNS. 2002-07-31 16:53:59 +00:00
David E. O'Brien
5eb43ac2f7 Consistently use __FBSDID 2002-06-30 05:13:54 +00:00
Tim J. Robbins
a24ce1c859 Check that snprintf() does not truncate the destination pathname when
linking into a directory.
2002-06-29 04:10:40 +00:00
Tim J. Robbins
bdb9494ae8 ln(1)'s symbolic link handling conforms to IEEE Std. 1003.1-2001, note
this in the Standards section.
2002-06-25 10:02:12 +00:00
Tim J. Robbins
9c24ed854c Correctly mark up the final command line arguments with the Ar macro for
the last two synopsis forms.
2002-06-25 09:58:29 +00:00
Tim J. Robbins
dab94652b1 Reject options, handle "--" end-of-options marker in link(1). 2002-05-30 00:57:38 +00:00
Ruslan Ermilov
3ed30dee85 mdoc(7) police: punctuation. 2002-05-29 15:06:24 +00:00