Commit Graph

70 Commits

Author SHA1 Message Date
christos 8c4c80c2ef fix man page. 2013-02-03 19:16:06 +00:00
christos 6a0fd2f03e add the ability to only output paths included in a spec file when creating
from a directory (-c)
2013-02-03 19:15:16 +00:00
wiz 0d9af955c5 Typo fix. 2012-12-20 20:31:01 +00:00
wiz 4612bed094 Add missing letter and use x.y versions for Fx/Nx. 2012-12-20 20:17:26 +00:00
christos 3afc22d858 Implement the "flavor" output discussed in tech-userlevel@, by Brooks Davis 2012-12-20 16:43:16 +00:00
christos 7f80b3db6a - No mention of -t in the usage message or the manpage SYNOPSIS (Brooks Davis) 2012-12-12 15:52:10 +00:00
wiz 324794350b Fix typos; remove trailing whitespace; add missing options to SYNOPSIS. 2012-10-05 09:18:02 +00:00
christos b73d92b069 Implement FreeBSD's "nochange" keyworld which causes the existance of a
filesystem object to be checked but none of its attiributes.(brooks)
2012-10-05 01:31:05 +00:00
christos 23fe062937 Implement FreeBSD's "nochange" keyworld which causes the existance of a
filesystem object to be checked but none of its attributes. (brooks)
2012-10-05 01:30:36 +00:00
christos 9e84d4e8c2 Implement FreeBSD's -f spec1 -f spec2 spec comparision function. This
is more useful than -C and diff because it highlights the keys that have
changed value so for example, you can see that the size of a file has
not changed but the contents have. (brooks)
2012-10-05 01:26:56 +00:00
christos 09b2a8d434 clarify seconds.09nanoseconds format (brooks) 2012-10-05 01:19:54 +00:00
christos c80bcab895 add -j flag to indent directory blocks (from brooks) 2012-10-05 01:13:50 +00:00
christos 43c54169be add -q flag to silence warnings about symlinks to existing dirs (from OpenBSD
via brooks)
2012-10-05 01:05:14 +00:00
christos 0c2ce7c15d add -n flag to disable comments (brook) 2012-10-05 01:01:07 +00:00
christos 8a1488a16f account for differences in digest names 2012-10-05 00:59:35 +00:00
wiz 4f36cb9e44 - Sort order of options mentioned in text;
- improve wording;
- remove unneeded macros (fixes mandoc(1) warnings);
- in the `EXAMPLES' section, for `-d', mention the use of `-U'
  besides that of `-u' (as the former is a variant on the latter).

From Bug Hunting.
2012-10-03 19:27:48 +00:00
wiz 0e068e9935 Fix date. 2010-01-20 14:00:48 +00:00
uebayasi b833b11a50 Document -t (modify mtime). Bump date. 2010-01-20 13:50:27 +00:00
apb 02a79f3336 * Rewrite intro to mention all three things mtree can do (check directory
tree against spec; create spec; modify spec).
* Consistently use "options" to refer to command line options.  "flags"
  is used to refer to file flags.
* Some other clarifications and changes for consistency.
2009-04-09 09:53:37 +00:00
wiz 7b2130ba39 Sort options and option descriptions.
Remove an incomplete sentence ("It will") -- probably pasto.
Give the tagged lists more space for the first column.
Remove unnecessary Bk/Ek pairs.
2009-04-08 19:39:23 +00:00
apb ef658dd50e The recent addition of sorting to "mtree -C" broke some third party
scripts.  Now make sorting optional, controled by the "-S" flag.
2009-04-08 19:03:13 +00:00
joerg 284c3410b6 Don't use .Xo/.Xc. Replace use of .Sm off / .Sm on with .Ns. 2009-03-11 18:10:05 +00:00
wiz 7eff20f8db New sentence, new line. 2009-02-02 03:27:37 +00:00
hubertf 47da095c98 -c: make it clear where the file hierarchy starts
-I, -E: they also work with -C, not just with -D
2009-02-01 22:37:22 +00:00
martin cd22f25e6f Move TNF licenses to 2 clause form 2008-05-02 18:11:04 +00:00
pavel b1328dedeb describe how to suppress printing of "type" keyword when -k is used.
bump date.
2006-09-12 20:22:49 +00:00
wiz 7e78208091 i.e. without a space. PR 33328 by Igor Sobrado. 2006-04-22 19:35:35 +00:00
elad 7084f7a24b SHA2 support has been pulled up to NetBSD 3.0, update the history part. 2005-11-10 19:41:59 +00:00
elad aae00d5a54 Add SHA2 support in mtree. 2005-08-24 20:55:41 +00:00
elad d0b9773c8f Reference cksum(1) only. 2005-08-24 20:49:51 +00:00
lukem 9cc32040b1 Implement -M to "merge" entries, even with different types.
This can be used in /etc/security to allow special.local to override
types of entries in special (e.g, replacing a dir with a link).

Rename Wflag to mtree_Wflag, to be more "external namespace" friendly.
2004-07-22 16:51:45 +00:00
agc 326b2259b7 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22366, verified by myself.
2003-08-07 11:25:11 +00:00
wiz 085295fd9c Quote some characters. 2003-06-27 23:21:50 +00:00
grant f125cd44b3 grammar tweak. 2003-03-31 08:44:22 +00:00
wiz 990562bfef .Nm does not need a dummy argument ("") before punctuation or
for correct formatting of the SYNOPSIS any longer.
2003-02-25 10:34:36 +00:00
grant 653b2f1552 File types belong under 'type', not 'uname'. 2002-12-27 06:31:51 +00:00
lukem 3cbfaf0af4 Add -C, which dumps the specification with the full path name first,
and then all the other fields.  (I.e, like -D except with the name
first instead of last).
Consistenly strsvis(3) encode path names (even for -C and -D).
2002-12-23 04:40:19 +00:00
lukem 92a480785a correct description of -D 2002-12-09 13:42:08 +00:00
lukem b927725af9 support multiple entries for "." and full paths if the types match; the last
listed entry's settings override the existing settings for that node.
2002-02-11 12:43:55 +00:00
lukem daea03f9f5 Support `/unset all', to unset all of the global values set with `/set ...' 2002-02-05 12:15:13 +00:00
lukem 9ca22e1409 Add '-N dbdir', to specify that user & group lookups (via pwcache(3)) are to
be done from dbdir/master.passwd and dbdir/group, using simple text file
parsing routines.
2002-01-24 03:20:11 +00:00
wiz a2d753e3ef Whitespace nits. 2002-01-19 11:44:57 +00:00
lukem e8b2f3326f User interface changes from (or inspired by) FreeBSD:
- Add -L to walk the tree `logically', by following symbolic links in
  the heirarchy.
- Add -P to walk the tree `physically'. This is the current behaviour,
  and the default.
- Add "-X excludes-file" to give mtree the ability to exclude files and
  directories from its traversal.  excludes-file contains fnmatch(3)
  patterns to exclude from the walk.
- Add "md5digest" synonym for "md5".
- Add "rmd160" keyword for RMD-160 message digest, and "rmd160digest" synonym.
- Add "sha1" keyword for SHA-1 message digest, and "sha1digest" synonym.
- Don't try to compare() other attributes if the type doesn't match;
  it's nothing but trouble, and no use anyway.
- In -c, only emit "/set" records if something has changed since the
  previous one.

User interface changes by me:
- Check a device's parameters before checking uid/gid/mode.
- If updating (-u), modify the following to match the specification:
	- Device type (retaining existing ownership).
	- Symlink target.

Fixes from (or inspired by) FreeBSD:
- Use p->ftslevel instead of own code to keep track of the level ourself.
  The previous code got majorly confused if fts(3) couldn't descend
  into a subdir, resulting in leaf nodes getting attached to the wrong
  directory.
  XXX: This new method is much much more robust, even though it's not 100%
  perfect; it might result in a couple of following entries in the spec
  to be incorrectly tagged as missing.
- Pass a useful pathname to rlink(), so that logical (-L) traversal
  doesn't confuse symlink checking.
- Consistently use MAXPATHLEN+1 sized buffers for pathnames, so that
  there's room for the NUL.
- Use mtree_err() and strerror(p->fts_errno) to report errors during
  the fts(3) walk.

Fixes by me:
- Remove now-unused `const char *name' argument from compare().
- Change crc_total from an int to a u_int32_t, to match usr.bin/cksum/crc.c.
- Remove trailing whitespace.
- Remove unnecessary (void) casts on functions.
- Reorder entries in the getopt() switch.
- Replace strtoq() with strtoll(), and use strtoul() appropriately.
- Renumber F_ flags to be in alphabetical order.
2001-11-07 08:01:51 +00:00
lukem 1e617f29fb Add -W: don't attempt to change the perms/time/flags on existing entries, nor
set them when creating new directories. (AKA the ``don't whack'' option).
Concept suggested by Todd Vierling.
2001-10-25 14:47:39 +00:00
lukem 273cdba6ea document requirement about first node being a directory called "." 2001-10-22 07:11:46 +00:00
lukem dafcb3846f improve enumeration of the different specfile entry types 2001-10-19 02:57:34 +00:00
lukem bc1697fc70 Add "device" keyword, which allows the device number to be specified,
to be later checked and possibly created. Uses parsing and encoding
routines from mknod(8).
2001-10-09 04:50:00 +00:00
lukem 09805a42a3 - use "full path" instead of "absolute path"; perry thinks it's less confusing
- clarify the `all' keyword support in -k, -K and -R. should solve [misc/14186]
- use ".sp" instead of ".Pp"  (from FreeBSD).
2001-10-08 00:53:30 +00:00
lukem 8b951d1f0d * Implement support for absolute paths in the specfile. An absolute path
is one that contains a `/' character that is not the first character.
  All parent directories referenced in the path must exist.
* Add copyright for all the work I've done.
* Document the history of various features added since 4.3-Reno.
2001-10-05 15:32:57 +00:00
lukem d8c78c600b - support "all" as a valid keyword for -k, -K and -R.
- parsekey(): support "all" as a keyword which returns a value with all bits
  set that pertain to a valid keyword.
- dump_nodes():
	- only print out a keyword if it's requested AND it's set in the node
	- UNAME falls back to UID if the user name can't be determined
	- GNAME falls back to GID if the group name can't be determined
- rework man page:
	- use Sy instead of Cm
	- use Pq, Dq, Ql, etc instead of ``...''
2001-10-05 13:14:56 +00:00