Commit Graph

165 Commits

Author SHA1 Message Date
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
Will Andrews
7a37b5fc17 Add a ${CP} alias for copying files in the build.
Some users build FreeBSD as non-root in Perforce workspaces.  By default,
Perforce sets files read-only unless they're explicitly being edited.
As a result, the -f argument must be used to cp in order to override the
read-only flag when copying source files to object directories.  Bare use of
'cp' should be avoided in the future.

Update all current users of 'cp' in the src tree.

Reviewed by:	emaste
MFC after:	1 week
Sponsored by:	Spectra Logic
2015-01-16 21:39:08 +00:00
Simon J. Gerraty
dc981c8d1b -u and -U are supposed to affect existing files too.
Reviewed by:	marcel
2014-12-09 19:50:50 +00:00
Baptiste Daroussin
c6db8143ed Convert usr.sbin to LIBADD
Reduce overlinking
2014-11-25 16:57:27 +00:00
Simon J. Gerraty
9268022b74 Merge from head@274682 2014-11-19 01:07:58 +00:00
Will Andrews
76479f1d3f Fix incremental builds involving non-root users with read-only source files.
Makefiles should not assume that source files can be overwritten.  This is the
common case for Perforce source trees.

This is a followup commit to r211243 in the same vein.

MFC after:	1 month
Sponsored by:	Spectra Logic
MFSpectraBSD:	r1036319 on 2014/01/29, r1046711 on 2014/03/06
2014-09-18 14:41:57 +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
3b8f084595 Merge head 2014-04-28 07:50:45 +00:00
Brooks Davis
a85228f164 Merge from CheriBSD:
commit 70b8f0c127
Author: Brooks Davis <brooks@one-eyed-alien.net>
Date:   Mon Jan 27 22:53:57 2014 +0000

    Move mtree.5 to usr.sbin/nmtree.
    Remove note that mtree 2.0 format files aren't supported.

MFC after:	4 weeks
Sponsored by:	DARPA, AFRL
2014-01-30 21:32:25 +00:00
Brooks Davis
6adfbbbf16 Merge from CheriBSD:
commit 6b569451b9
Author: Brooks Davis <brooks@one-eyed-alien.net>
Date:   Mon Jan 27 22:50:46 2014 +0000

    Always install nmtree as mtree.
    For compability, link mtree to nmtree.

X-MFC after:	never
Sponsored by:	DARPA, AFRL
2014-01-30 21:25:01 +00:00
Simon J. Gerraty
3caf0790a8 Merge head@256284 2013-10-13 02:35:19 +00:00
Xin LI
fb9e5c2167 Do not emit size for non-regular files. There is nothing that
mtree(1) can do in this situation and would cause confusion.

MFC candidate.

Approved by:	re (hrs)
2013-09-12 00:14:25 +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
Brooks Davis
624c4889c7 Always install our mtree as /usr/sbin/fmtree and link it as
/usr/sbin/mtree by default.

Add a src.conf option WITH_NMTREE that causes NetBSD's mtree to be linked
as /usr/sbin/mtree as well as /usr/sbin/nmtree.
2013-01-09 21:07:08 +00:00
Simon J. Gerraty
23090366f7 Sync from head 2012-11-04 02:52:03 +00:00
Ed Schouten
eccad22277 More -Wmissing-variable-declarations fixes.
In addition to adding missing `static' keywords:
- bin/dd: Pull in `extern.h' to guarantee consistency with source file.
- libexec/rpc.rusersd: Move shared globals into an extern.h.
- libexec/talkd: Move `debug' and `hostname' into extern.h.
- usr.bin/cksum: Put counters in extern.h, as they are used by ckdist/mtree.
- usr.bin/m4: Move `end_result' into extern.h.
- usr.sbin/services_mkdb: Move shared globals into an extern.h.
2012-10-20 10:33:15 +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
Joel Dahl
c0cbd1c6f1 Remove superfluous paragraph macro. 2012-03-25 09:18:34 +00:00
Ed Schouten
b3608ae18f Replace index() and rindex() calls with strchr() and strrchr().
The index() and rindex() functions were marked LEGACY in the 2001
revision of POSIX and were subsequently removed from the 2008 revision.
The strchr() and strrchr() functions are part of the C standard.

This makes the source code a lot more consistent, as most of these C
files also call into other str*() routines. In fact, about a dozen
already perform strchr() calls.
2012-01-03 18:51:58 +00:00
Eitan Adler
3b6dc18ef5 - fix duplicate "a a" in some comments
Submitted by:	eadler
Approved by:	simon
MFC after:	3 days
2011-11-13 17:06:33 +00:00
Christian Brueffer
d1ecad4b31 Wording fixes.
PR:		143454
Submitted by:	Warren Block <wblock@wonkity.com>
MFC after:	3 days
2010-05-14 01:45:05 +00:00
Ulrich Spörlein
0afc94c17a mdoc: move CAVEATS, BUGS and SECURITY CONSIDERATIONS sections to the
bottom of the manpages and order them consistently.

GNU groff doesn't care about the ordering, and doesn't even mention
CAVEATS and SECURITY CONSIDERATIONS as common sections and where to put
them.

Found by:	mdocml lint run
Reviewed by:	ru
2010-05-13 12:07:55 +00:00
Yaroslav Tykhiy
0ca97bb61f Keep the list of default keywords sorted so that paranoid folks like me
don't try to find a hidden meaning in the strange order.  The list used
to be sorted in rev. 1.1 from 4.4BSD but the order was broken as soon as
in rev. 1.2 by a single-character fix.

MFC after:	3 days
2010-04-03 00:47:48 +00:00
Maxim Konovalov
3e6b66eecc o Remove a duplicate reference to -f flag in the SYNOPSYS section.
o Improve wording.

PR:		docs/144407
Submitted by:	gcooper
MFC after:	1 week
2010-03-30 09:22:33 +00:00
Ed Schouten
99742a231f Change all our own code to use st_*tim instead of st_*timespec.
Also remove some local patches to diff(1) which are now unneeded.
2010-03-28 13:16:08 +00:00
Ulrich Spörlein
8fa03d08ca Fix common misspelling of hierarchy
Pointed out by:		bf1783 at gmail
Approved by:		np (cxgb), kientzle (tar, etc.), philip (mentor)
2010-02-20 10:19:19 +00:00
Ed Schouten
71ccf09269 The last big commit: let usr.sbin/ use WARNS=6 by default. 2010-01-02 11:07:44 +00:00
Tim Kientzle
9feaf24750 Write timestamps with exactly 9 digits after the period.
This ensures that the value written is both compatible with
older mtree versions (which expect the value after the period
to be an integer count of nanoseconds after the whole second)
and is a correct floating-point value.

Leave the parsing code unchanged so it will continue to read
older files.
2009-01-31 05:17:28 +00:00
Tim Kientzle
bbc14adaed Accept integer times. Previously, the field "time=1233294539" would be
rejected as invalid.
2009-01-30 05:49:27 +00:00
Tim Kientzle
66cbdc8aab Add the mtree.5 manpage. I'll come back soon and
remove the format specification from mtree.8.
I also need to reconcile a few issues between this
mtree.5 and what is actually implemented in FreeBSD's
mtree utility.

MFC after: 30 days
2008-01-01 06:15:57 +00:00
Dag-Erling Smørgrav
afe54b5818 When applying a spec, traverse the existing directory tree in lexical
order.  This allows direct comparison of the output of two different
runs, regardless of the order in which readdir(2) returns directory
entries.

MFC after:	3 weeks
2007-12-07 12:22:38 +00:00
Giorgos Keramidas
1d916e2c71 mtree should use getcwd() instead of getwd(). getcwd() is safer,
because it includes checks for the length of the buffer it uses.

Reviewed by:	phk, cperciva
MFC after:	3 days
2007-11-02 15:11:53 +00:00
Maxim Konovalov
346e07c1ba o Add an example how to create /etc/mtree style mtree(8) files.
PR:		docs/113667
Submitted by:	edwin
MFC after:	1 week
2007-06-16 08:26:00 +00:00
Ruslan Ermilov
bc84aa4ba3 Markup fixes. 2006-09-29 17:57:04 +00:00
Maxim Konovalov
190483c011 o Add an 'optional' keyword, which allows files to be in the
specification, but not in the file hierarchy.

PR:		bin/99531
Submitted by:	skv
Obtained from:	NetBSD, originally from Ed Symanzik
Regress. test:	test/test05.sh
MFC after:	1 month
2006-07-03 10:55:22 +00:00
Brian Somers
6e03259288 If we fail in chown(2), try to just change the group and continue on to
change the permissions.  Failures are still recorded.

This allows mtree to do a generally better job of things when uid != 0.

Sponsored by:		ActiveState/Sophos
Partially submitted by:	neilw at ActiveState dot com
Reviewed by:		neilw at ActiveState dot com
MFC after:		3 weeks
2005-08-11 15:43:55 +00:00
Giorgos Keramidas
6fb9b618f5 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.
2005-07-31 03:30:48 +00:00
Ruslan Ermilov
9d73fabda7 Markup fixes.
Approved by:	re (blanket)
2005-06-14 12:26:36 +00:00
Anton Berezin
b6a9d20adc Adds sha256 support. While it is a good idea to also add sha384 and
sha512, I did not do that since it is not entirely clear where "the one
true place" to hold their implementations is going to be.  Sha256 is
different since mtree already links against libmd.

Make recommended procedure for integrity checking in the manpage
consistent.

Fix a bug with -f spec1 -f spec2 comparison, which prevented
test/tes03.sh from running successfully.

Reviewed by:	phk, cperciva
2005-03-29 11:44:17 +00:00
Ruslan Ermilov
0227791b40 Expand *n't contractions. 2005-02-13 22:25:33 +00:00
Ruslan Ermilov
59a3c79da6 Sort sections. 2005-01-18 20:02:45 +00:00
Ruslan Ermilov
a866e17077 Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
Hidetoshi Shimokawa
e379c1ada3 Remove extra "*/". 2004-08-07 10:04:29 +00:00
Warner Losh
486c8cc4c6 Per letter dated July 22, 1999 remove 3rd clause of Berkeley derived software
(with permission of addtional copyright holders where appropriate)
2004-08-07 04:28:56 +00:00
Ruslan Ermilov
455fb174df Eliminated double whitespace. 2004-07-03 18:35:53 +00:00