head	1.2;
access;
symbols
	RELEASE_8_3_0:1.2
	RELEASE_9_0_0:1.2
	RELEASE_7_4_0:1.2
	RELEASE_8_2_0:1.2
	RELEASE_6_EOL:1.2
	RELEASE_8_1_0:1.2
	RELEASE_7_3_0:1.2
	RELEASE_8_0_0:1.2
	RELEASE_7_2_0:1.2
	RELEASE_7_1_0:1.2
	RELEASE_6_4_0:1.2
	RELEASE_5_EOL:1.2
	RELEASE_7_0_0:1.2
	RELEASE_6_3_0:1.2
	PRE_XORG_7:1.2
	RELEASE_4_EOL:1.2
	RELEASE_6_2_0:1.2
	RELEASE_6_1_0:1.2
	RELEASE_5_5_0:1.2
	RELEASE_6_0_0:1.2
	RELEASE_5_4_0:1.1
	RELEASE_4_11_0:1.1
	RELEASE_5_3_0:1.1;
locks; strict;
comment	@# @;


1.2
date	2005.07.11.08.27.18;	author sem;	state Exp;
branches;
next	1.1;

1.1
date	2004.07.02.16.43.22;	author eik;	state Exp;
branches;
next	;


desc
@@


1.2
log
@- Sync with master port update

PR:		ports/83181
Submitted by:	Vsevolod Stakhov <vsevolod@@highsecure.ru>
@
text
@$NetBSD: patch-ab,v 1.3 2005/03/31 05:02:24 atatat Exp $

--- digest.1.orig	2005-03-30 23:40:39.000000000 -0500
+++ digest.1
@@@@ -2,5 +2,5 @@@@
 .\"
 .\"
-.\" Copyright (c) 2001 Alistair G. Crooks.  All rights reserved.
+.\" Copyright (c) 2001-2005 Alistair G. Crooks.  All rights reserved.
 .\"
 .\" Redistribution and use in source and binary forms, with or without
@@@@ -32,12 +32,13 @@@@
 .\"
 .\"
-.Dd March 23, 2005
-.Dt DIGEST 1
+.Dd March 31, 2005
+.Dt RDIGEST 1
 .Os
 .Sh NAME
-.Nm digest
-.Nd calculate message digests
+.Nm rdigest
+.Nd calculate message digests of files and directories
 .Sh SYNOPSIS
 .Nm
+.Op Fl x Ar directory
 .Ar algorithm
 .Op file ...
@@@@ -45,6 +46,13 @@@@
 The
 .Nm
-utility calculates message digests of files or,
+utility calculates message digests of files, directories, or,
 if no file is specified, standard input.
+The
+.Fl x
+option can be used as many times as required to indicate directories
+not to be included in a directory's hash.
+This allows you to skip, eg, CVS subdirectories in a given tree, which
+can have relatively volatile contents not pertinent to the hash.
+.Pp
 The list of possible algorithms is:
 .Bl -tag -width Ds
@@@@ -89,4 +97,23 @@@@ algorithm implementations, which are loc
 C library, and was designed to be scalable as new message digest
 algorithms are developed.
+The checksum for a directory is implemented as the hash over a list of
+one or two hashes for each of the items in the tree.
+.Bl -bullet
+.It
+For a file, the string
+.Dq f \& 
+along with the path make up the data for one hash, and the contents of
+the file is used for the second hash.
+.It
+For a symbolic link, the string
+.Dq l \&
+along with the path to the symbolic link make up the data for one
+hash, and the target of the symbolic link is used for the second hash.
+.It
+For a directory, the string
+.Dq d \&
+along with the path make up the data for one hash.
+There is no second hash for a directory.
+.El
 .Pp
 The
@@@@ -95,4 +122,5 @@@@ utility exits 0 on success, and \*[Gt]0 
 .Sh SEE ALSO
 .Xr cksum 1 ,
+.Xr digest 1 ,
 .Xr md5 3 ,
 .Xr rmd160 3 ,
@@@@ -102,8 +130,12 @@@@ The
 .Nm
 utility first appeared in
-.Nx 1.6 .
+.Nx 2.0 .
 .Sh AUTHORS
 The
+.Xr digest 1
+utility was written by Alistair G. Crooks \*[Lt]agc@@netbsd.org\*[Gt].
 .Nm
-utility was written by
-.An Alistair G. Crooks Aq agc@@netbsd.org .
+was implemented by Andrew Brown \*[Lt]atatat@@netbsd.org\*[Gt] as a
+patch to
+.Xr digest 1
+to add recursive capabilities.
@


1.1
log
@Add NetBSD rdigest from
  <ftp://ftp.netbsd.org/pub/NetBSD/packages/pkgsrc/pkgtools/rdigest/README.html>
@
text
@d1 1
a1 1
$NetBSD: patch-ab,v 1.1.1.1 2003/07/24 05:21:07 atatat Exp $
d3 1
a3 1
--- digest.1.orig	2002-02-16 15:24:32.000000000 -0500
d5 1
a5 2
@@@@ -31,21 +31,29 @@@@
 .\" SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
d8 8
a15 1
-.Dd February 28, 2001
d17 1
a17 1
+.Dd July 24, 2003
d30 1
a30 1
 .Sh DESCRIPTION
d45 1
a45 2
 .It md5
@@@@ -81,11 +89,32 @@@@ algorithm implementations, which are loc
a47 1
 .Pp
d53 1
a53 1
+.Li Dq f \& 
d58 1
a58 1
+.Li Dq l \&
d63 1
a63 1
+.Li Dq d \&
d67 1
a67 1
+.Pp
d69 1
a69 2
 .Nm
 utility exits 0 on success, and >0 if an error occurs.
d75 1
a75 3
 .Xr sha1 3
@@@@ -93,9 +122,13 @@@@ utility exits 0 on success, and >0 if an
 The
@

