Commit Graph

140 Commits

Author SHA1 Message Date
brueffer
9fac5e5d90 Wording fixes.
PR:		143454
Submitted by:	Warren Block <wblock@wonkity.com>
MFC after:	3 days
2010-05-14 01:45:05 +00:00
uqs
1ab3783e1a 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
yar
5c30b3d015 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
ace76aa12a 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
543b5e901b 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
uqs
f41a820b03 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
073cafdd42 The last big commit: let usr.sbin/ use WARNS=6 by default. 2010-01-02 11:07:44 +00:00
kientzle
1f959f94f1 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
kientzle
fd7700c073 Accept integer times. Previously, the field "time=1233294539" would be
rejected as invalid.
2009-01-30 05:49:27 +00:00
kientzle
d438f6c32b 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
des
0845b2053b 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
keramida
f570dc9af6 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
4590b15ce1 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
ru
081fcce9b9 Markup fixes. 2006-09-29 17:57:04 +00:00
maxim
8b45679548 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
40ef73a9f6 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
keramida
ac7c9f771d 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
ru
f4251aff5d Markup fixes.
Approved by:	re (blanket)
2005-06-14 12:26:36 +00:00
tobez
33bcab2805 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
ru
1541af42f1 Expand *n't contractions. 2005-02-13 22:25:33 +00:00
ru
c05985f13f Sort sections. 2005-01-18 20:02:45 +00:00
ru
6cc4b6c220 Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
simokawa
7467edef22 Remove extra "*/". 2004-08-07 10:04:29 +00:00
imp
9fbed704d5 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
ru
ac606e7e88 Eliminated double whitespace. 2004-07-03 18:35:53 +00:00
ru
6294018a20 Mechanically kill hard sentence breaks. 2004-07-02 23:13:00 +00:00
phk
8f47be3b0a Improve spec to spec comparison output. 2004-06-14 07:28:22 +00:00
ru
db23e347eb Added forgotten -w to the usage(). 2004-06-04 19:29:28 +00:00
ru
99b8988bdc Added forgotten -w to the SYNOPSIS.
Trim whitespace at EOL.
2004-06-04 19:25:47 +00:00
phk
3208862660 Get rid of "lineno: 0" in error messages from create mode.
Add -w(arning) flag which makes failure to look up uid/gid
a nonfatal warning instead of an error.
2004-01-11 19:38:48 +00:00
phk
acdc44bfa7 collect all "extern bla" stuff in extern.h in order to get cross-file
type checking.  No bugs found.
2004-01-11 19:25:56 +00:00
phk
142640c5de Do not emit comments when -n is specified. 2004-01-08 22:21:45 +00:00
phk
66faa6a3a2 The new "spec against spec" comparison code was yet another time
victim of the special sort order employed where files come before
directories and alphabetic inside these two groups.

Approved by:	re@
2003-11-30 18:06:02 +00:00
phk
2a56ea9233 Off by one error in malloc.
Approved by:	re@
2003-11-19 15:28:21 +00:00
phk
818684532e Fix a bug relating to the "files before directories" sort order when
comparing two spec files.
2003-11-13 11:02:57 +00:00
phk
7b725c873e Add a small testcase for the new -f-f mode. 2003-11-05 22:26:39 +00:00
phk
7a3cd410f3 Give mtree(8) the ability to take [two -f spec] arguments and compare
the two specifications to each other.
2003-11-05 22:26:08 +00:00
phk
c1f70887cd Rename spec() and verify() functions to have mtree_ prefix and take
explicit file descriptor instead of assuming stdin.
2003-11-05 20:07:40 +00:00
phk
a88a9d9e80 Take advantage of the fact that we know the err(3) function does not
return to eliminate some else clauses and gain some "outdenting".
2003-11-05 20:05:05 +00:00
bde
5e44220cea Fixed breakage of my world in rev.1.30. #include <sys/time.h> instead of
depending on namespace pollution in <sys/stat.h> for the declarations of
struct timeval and utimes().

Fixed some style bugs in rev.1.30 and some nearby style bugs (mainly
unsorting and missing or extra blank lines).

Removed a wrong comment that was obtained from NetBSD in rev.1.14.  It said
that chflags() reset the times that were set "above" by utimes(), but
utimes wasn't "above" in FreeBSD until rev.1.30, and chflags() does't
actually reset the times.
2003-11-01 08:43:54 +00:00
phk
4ad1bf0342 Make mtree's update function update the modification time too.
Submitted by:	Dan Nelson <dnelson@allantgroup.com>
PR:	53063
2003-10-31 13:39:19 +00:00
phk
bb5c5b4c57 Update test-case to also fail on filenames containing '#' 2003-10-30 12:40:54 +00:00
phk
10c0052ec4 Use vis(3) to encode/decode the target for symlinks.
Make vis(3) decode errors fatal for both symlink targets and fienames.
2003-10-30 12:03:25 +00:00
phk
3b266c3cbf Add another test-script for mtree(8): Check symlinks with space in them. 2003-10-30 12:01:32 +00:00
phk
039259050d Fix bug in mtree(8)'s create mode where files or directories with had
names containing glob(3) expressions would appear verbatim in the
output.

If such an mtree file were used by mtree in update mode, wrong things
would happen.
2003-10-30 10:48:43 +00:00
phk
69589e7dad Add a test script which Mtree fails. 2003-10-30 10:46:23 +00:00
phk
d17fa4e775 Remove clause 3 in the copyrights (according to permission in src/COPYRIGHT)
Remove trailing whitespace.
2003-10-21 08:27:05 +00:00
phk
b8f582b886 Remove "register" keywords.
Use newspeak functions definitions.
2003-10-21 07:58:52 +00:00
ru
cc9d2aeb39 Get rid of duplicates. 2003-09-14 13:41:59 +00:00
obrien
7293a24a2b Use __FBSDID over rcsid[]. Protect copyright[] where needed. 2003-05-03 21:06:42 +00:00