Tweak sysutils/dvdimagecmp version 0.3
[dports.git] / security / rdigest / files / patch-ab
1 $NetBSD: patch-ab,v 1.3 2005/03/31 05:02:24 atatat Exp $
2
3 --- digest.1.orig       2005-03-30 23:40:39.000000000 -0500
4 +++ digest.1
5 @@ -2,5 +2,5 @@
6  .\"
7  .\"
8 -.\" Copyright (c) 2001 Alistair G. Crooks.  All rights reserved.
9 +.\" Copyright (c) 2001-2005 Alistair G. Crooks.  All rights reserved.
10  .\"
11  .\" Redistribution and use in source and binary forms, with or without
12 @@ -32,12 +32,13 @@
13  .\"
14  .\"
15 -.Dd March 23, 2005
16 -.Dt DIGEST 1
17 +.Dd March 31, 2005
18 +.Dt RDIGEST 1
19  .Os
20  .Sh NAME
21 -.Nm digest
22 -.Nd calculate message digests
23 +.Nm rdigest
24 +.Nd calculate message digests of files and directories
25  .Sh SYNOPSIS
26  .Nm
27 +.Op Fl x Ar directory
28  .Ar algorithm
29  .Op file ...
30 @@ -45,6 +46,13 @@
31  The
32  .Nm
33 -utility calculates message digests of files or,
34 +utility calculates message digests of files, directories, or,
35  if no file is specified, standard input.
36 +The
37 +.Fl x
38 +option can be used as many times as required to indicate directories
39 +not to be included in a directory's hash.
40 +This allows you to skip, eg, CVS subdirectories in a given tree, which
41 +can have relatively volatile contents not pertinent to the hash.
42 +.Pp
43  The list of possible algorithms is:
44  .Bl -tag -width Ds
45 @@ -89,4 +97,23 @@ algorithm implementations, which are loc
46  C library, and was designed to be scalable as new message digest
47  algorithms are developed.
48 +The checksum for a directory is implemented as the hash over a list of
49 +one or two hashes for each of the items in the tree.
50 +.Bl -bullet
51 +.It
52 +For a file, the string
53 +.Dq f \& 
54 +along with the path make up the data for one hash, and the contents of
55 +the file is used for the second hash.
56 +.It
57 +For a symbolic link, the string
58 +.Dq l \&
59 +along with the path to the symbolic link make up the data for one
60 +hash, and the target of the symbolic link is used for the second hash.
61 +.It
62 +For a directory, the string
63 +.Dq d \&
64 +along with the path make up the data for one hash.
65 +There is no second hash for a directory.
66 +.El
67  .Pp
68  The
69 @@ -95,4 +122,5 @@ utility exits 0 on success, and \*[Gt]0 
70  .Sh SEE ALSO
71  .Xr cksum 1 ,
72 +.Xr digest 1 ,
73  .Xr md5 3 ,
74  .Xr rmd160 3 ,
75 @@ -102,8 +130,12 @@ The
76  .Nm
77  utility first appeared in
78 -.Nx 1.6 .
79 +.Nx 2.0 .
80  .Sh AUTHORS
81  The
82 +.Xr digest 1
83 +utility was written by Alistair G. Crooks \*[Lt]agc@netbsd.org\*[Gt].
84  .Nm
85 -utility was written by
86 -.An Alistair G. Crooks Aq agc@netbsd.org .
87 +was implemented by Andrew Brown \*[Lt]atatat@netbsd.org\*[Gt] as a
88 +patch to
89 +.Xr digest 1
90 +to add recursive capabilities.