Commit Graph

127 Commits

Author SHA1 Message Date
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
tobez
c56269f940 The -s option should not assume -U.
MFC After:	2 weeks
2003-03-19 10:56:34 +00:00
robert
f0edd7ef8f - Align the function prototype of the external `crc' function with
how `crc' is actually defined.
 - Remove an unnecessary `extern' variable declaration.
Data type corrections:
 - Define a variable which contains a file byte offset value as type
   off_t as required by the `crc' function.
 - Change the type of a variable carrying a CRC checksum from `u_long'
   to `uint32_t'.
 - Substitute the wrong `extern' variable declaration of `crc_total'
   by putting a correct one in the shared header extern.h.
   `crc_total' is defined as an `uint32_t', thus fixing
   incorrect mtree checksums on big-endian LP64 machines.
2003-03-13 23:35:30 +00:00
tobez
48bb025c58 Fix two minor mismatch reporting output errors.
Reviewed by:	phk
MFC After:		3 weeks
2003-03-13 15:14:56 +00:00
ru
041d1287e8 Uniformly refer to a file system as "file system".
Approved by:	re
2002-12-12 17:26:04 +00:00
ru
309ad85605 mtree(8) wasn't a bootstrap tool since 2000/07/23 (Makefile.inc1,v 1.161). 2002-11-13 12:03:27 +00:00
wollman
aa09d8b564 Make the threatened fts(3) ABI fix. FTSENT now avoids the use of the struct
hack, thereby allowing future extensions to the structure (e.g., for extended
attributes) without rebreaking the ABI.  FTSENT now contains a pointer to the
parent stream, which fts_compar() can then take advantage of, avoiding the
undefined behavior previously warned about.  As a consequence of this change,
the prototype of the comparison function passed to fts_open() has changed
to reflect the required amount of constness for its use.  All callers in the
tree are updated to use the correct prototype.

Comparison functions can now make use of the new parent pointer to access
the new stream-specific private data pointer, which is intended to assist
creation of reentrant library routines which use fts(3) internally.

Not objected to in spirit by: -arch
2002-09-21 01:28:41 +00:00
des
e0ecf9a222 Get rid of %qd, and unbreak Alpha build. 2002-07-15 12:17:31 +00:00
charnier
d2168fe021 The .Nm utility 2002-07-14 14:47:15 +00:00
alfred
5071cb67d9 fixup for WARNS=4. 2002-07-11 18:42:53 +00:00
alfred
c40ae61c8c de-__P() 2002-07-11 18:31:16 +00:00
alfred
197cf7d2ba Assume __STDC__, remove non-__STDC__ code. 2002-05-28 19:23:47 +00:00
trhodes
7d7bd3ffde Consistancy check: s/file system/filesystem/g 2002-05-16 02:28:39 +00:00
max
ab8b1fb87e Typo. 2002-05-10 03:53:00 +00:00