diff options
author | agc <agc@pkgsrc.org> | 2016-03-31 17:06:18 +0000 |
---|---|---|
committer | agc <agc@pkgsrc.org> | 2016-03-31 17:06:18 +0000 |
commit | 6a9e0391d0798b36587b16df0eaa6358cc4361d7 (patch) | |
tree | c04cee1255305068f924d6b32e8c074e2ff493e6 /pkgtools | |
parent | 25f587c4aaab0a75e42223a97c7357fc2a05bafa (diff) | |
download | pkgsrc-6a9e0391d0798b36587b16df0eaa6358cc4361d7.tar.gz |
Build fixes for rdigest, following previous changes to pkgtools/digest in
February.
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/rdigest/distinfo | 6 | ||||
-rw-r--r-- | pkgtools/rdigest/patches/patch-ab | 49 | ||||
-rw-r--r-- | pkgtools/rdigest/patches/patch-ac | 50 |
3 files changed, 62 insertions, 43 deletions
diff --git a/pkgtools/rdigest/distinfo b/pkgtools/rdigest/distinfo index 89ca4d0b228..2f067d125da 100644 --- a/pkgtools/rdigest/distinfo +++ b/pkgtools/rdigest/distinfo @@ -1,5 +1,5 @@ -$NetBSD: distinfo,v 1.9 2013/07/25 08:25:26 wiz Exp $ +$NetBSD: distinfo,v 1.10 2016/03/31 17:06:18 agc Exp $ SHA1 (patch-aa) = abb2e5088629b2b9ddd854d5238d6bcdf5cd9cae -SHA1 (patch-ab) = 2714a8a9197c4f5bac8ed632c57beb8a47c022ee -SHA1 (patch-ac) = c465218f29c8135a54a1a0cab91eae034780a077 +SHA1 (patch-ab) = 90f3fc0d516f369423a44fabb4707e2c19d27b0d +SHA1 (patch-ac) = 6426d88d867f62ced0beb1878cb34d09b6710f0c diff --git a/pkgtools/rdigest/patches/patch-ab b/pkgtools/rdigest/patches/patch-ab index 828b32ad2bc..fbf1430e7e1 100644 --- a/pkgtools/rdigest/patches/patch-ab +++ b/pkgtools/rdigest/patches/patch-ab @@ -1,20 +1,14 @@ -$NetBSD: patch-ab,v 1.5 2013/07/25 08:25:26 wiz Exp $ +$NetBSD: patch-ab,v 1.6 2016/03/31 17:06:18 agc Exp $ ---- digest.1.orig 2013-07-25 08:24:59.000000000 +0000 -+++ 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 @@ - .\" +Patch digest man page for rdigest functionality + +--- digest.1.orig 2016-03-31 09:37:14.729218330 -0700 ++++ digest.1 2016-03-31 09:40:35.110066257 -0700 +@@ -24,20 +24,21 @@ + .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" --.Dd March 23, 2005 + .Dd February 16, 2016 -.Dt DIGEST 1 -+.Dd March 31, 2005 +.Dt RDIGEST 1 .Os .Sh NAME @@ -24,25 +18,33 @@ $NetBSD: patch-ab,v 1.5 2013/07/25 08:25:26 wiz Exp $ +.Nd calculate message digests of files and directories .Sh SYNOPSIS .Nm + .Op Fl "Vt" +.Op Fl x Ar directory .Ar algorithm - .Op file ... -@@ -45,6 +46,13 @@ + .Op Ar + .Sh DESCRIPTION The .Nm -utility calculates message digests of files or, +utility calculates message digests of files, directories, or, if no file is specified, standard input. + .Pp + It can also run self tests via the +@@ -46,6 +47,12 @@ + for the + .Dv SHA3 + set of digests. +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 + .Pp + The + .Fl V +@@ -111,12 +118,32 @@ + algorithm implementations, which are located in the standard 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 @@ -66,13 +68,16 @@ $NetBSD: patch-ab,v 1.5 2013/07/25 08:25:26 wiz Exp $ +.El .Pp The -@@ -95,4 +122,5 @@ utility exits 0 on success, and \*[Gt]0 + .Nm + utility exits 0 on success, and \*[Gt]0 if an error occurs. .Sh SEE ALSO .Xr cksum 1 , +.Xr digest 1 , .Xr md5 3 , .Xr rmd160 3 , -@@ -102,8 +130,12 @@ The + .Xr sha1 3 +@@ -124,9 +151,13 @@ + The .Nm utility first appeared in -.Nx 1.6 . diff --git a/pkgtools/rdigest/patches/patch-ac b/pkgtools/rdigest/patches/patch-ac index 9c85bb10136..5f8ce40027f 100644 --- a/pkgtools/rdigest/patches/patch-ac +++ b/pkgtools/rdigest/patches/patch-ac @@ -1,14 +1,17 @@ -$NetBSD: patch-ac,v 1.5 2010/02/24 22:00:03 joerg Exp $ +$NetBSD: patch-ac,v 1.6 2016/03/31 17:06:18 agc Exp $ ---- digest.c.orig 2008-09-18 12:13:50.000000000 +0200 -+++ digest.c -@@ -41,8 +41,17 @@ +patch digest program to recurse through directories + +--- digest.c.orig 2016-03-31 09:37:14.729643239 -0700 ++++ digest.c 2016-03-31 10:02:46.312679447 -0700 +@@ -28,9 +28,19 @@ + #include "config.h" #endif +#include <nbcompat.h> +#include <nbcompat/queue.h> +#include <nbcompat/stat.h> - ++ #ifdef HAVE_ERRNO_H #include <errno.h> #endif @@ -20,7 +23,9 @@ $NetBSD: patch-ac,v 1.5 2010/02/24 22:00:03 joerg Exp $ +#endif #ifdef HAVE_LOCALE_H #include <locale.h> -@@ -158,4 +167,155 @@ digest_file(char *fn, alg_t *alg) + #endif +@@ -161,19 +171,173 @@ + return (rc); } +struct excl { @@ -176,33 +181,42 @@ $NetBSD: patch-ac,v 1.5 2010/02/24 22:00:03 joerg Exp $ + int main(int argc, char **argv) -@@ -164,13 +324,19 @@ main(int argc, char **argv) - int rval; - int i; + { + struct stat st; -+ -+ LIST_INIT(&excl); + alg_t *alg; + int test; + int ok; + int i; ++ LIST_INIT(&excl); ++ #ifdef HAVE_SETLOCALE (void) setlocale(LC_ALL, ""); #endif -- while ((i = getopt(argc, argv, "V")) != -1) { -+ while ((i = getopt(argc, argv, "Vx:")) != -1) { + test = 0; +- while ((i = getopt(argc, argv, "Vt")) != -1) { ++ while ((i = getopt(argc, argv, "Vtx:")) != -1) { switch(i) { case 'V': printf("%s\n", VERSION); - return EXIT_SUCCESS; +@@ -181,6 +345,9 @@ + case 't': + test = 1; + break; + case 'x': + exclude(optarg); + break; } } -@@ -197,5 +363,7 @@ main(int argc, char **argv) + if (test) { +@@ -212,7 +379,9 @@ + } } else { - for (i = 0 ; i < argc ; i++) { + for (i = optind + 1 ; i < argc ; i++) { - if (!digest_file(argv[i], alg)) { + if (stat(argv[i], &st) == -1 || + (S_ISREG(st.st_mode) && !digest_file(argv[i], alg)) || + (S_ISDIR(st.st_mode) && !digest_directory(argv[i], alg))) { - (void) fprintf(stderr, "%s\n", argv[i]); - rval = EXIT_FAILURE; + fprintf(stderr, "%s\n", argv[i]); + ok = 0; + } |