pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc Update gpg2dot to version 1.4.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c9f812be484c
branches:  trunk
changeset: 490149:c9f812be484c
user:      agc <agc%pkgsrc.org@localhost>
date:      Thu Mar 03 22:43:49 2005 +0000

description:
Update gpg2dot to version 1.4.

Fixes from Christoph Badura, who tested on gnupg-1.2.

This new version works with gnupg-1.4.0 as well as older versions of gpg,
and uses the --list-sigs argument as well as the --with-colons arguments
to gpg.

diffstat:

 doc/CHANGES                       |   3 ++-
 security/gpg2dot/Makefile         |   6 +++---
 security/gpg2dot/files/gpg2dot.pl |  23 ++++++++++++-----------
 3 files changed, 17 insertions(+), 15 deletions(-)

diffs (85 lines):

diff -r ff3796e2559e -r c9f812be484c doc/CHANGES
--- a/doc/CHANGES       Thu Mar 03 22:30:15 2005 +0000
+++ b/doc/CHANGES       Thu Mar 03 22:43:49 2005 +0000
@@ -1,4 +1,4 @@
-$NetBSD: CHANGES,v 1.9413 2005/03/03 21:32:54 wiz Exp $
+$NetBSD: CHANGES,v 1.9414 2005/03/03 22:44:43 agc Exp $
 
 Changes to the packages collection and infrastructure in 2005:
 
@@ -1261,3 +1261,4 @@
        Updated xmms-flac to 1.1.2 [wiz 2005-03-03]
        Updated anthy to 6300 [taya 2005-03-03]
        Updated vte to 0.11.12 [jmmv 2005-03-03]
+       Updated gpg2dot to 1.4 [agc 2005-03-03]
diff -r ff3796e2559e -r c9f812be484c security/gpg2dot/Makefile
--- a/security/gpg2dot/Makefile Thu Mar 03 22:30:15 2005 +0000
+++ b/security/gpg2dot/Makefile Thu Mar 03 22:43:49 2005 +0000
@@ -1,8 +1,7 @@
-# $NetBSD: Makefile,v 1.4 2004/04/04 22:16:59 hubertf Exp $
+# $NetBSD: Makefile,v 1.5 2005/03/03 22:43:49 agc Exp $
 #
 
-DISTNAME=      gpg2dot-1.3
-WRKSRC=                ${WRKDIR}
+DISTNAME=      gpg2dot-1.4
 CATEGORIES=    security
 MASTER_SITES=  # empty
 DISTFILES=     # empty
@@ -19,6 +18,7 @@
 NO_CONFIGURE=  yes
 
 DISTVER=       ${DISTNAME:S/gpg2dot-//}
+WRKSRC=                ${WRKDIR}
 
 .include "../../mk/bsd.prefs.mk"
 
diff -r ff3796e2559e -r c9f812be484c security/gpg2dot/files/gpg2dot.pl
--- a/security/gpg2dot/files/gpg2dot.pl Thu Mar 03 22:30:15 2005 +0000
+++ b/security/gpg2dot/files/gpg2dot.pl Thu Mar 03 22:43:49 2005 +0000
@@ -1,6 +1,6 @@
-#!@PREFIX@/bin/perl
+#! @PREFIX@/bin/perl
 #
-# $NetBSD: gpg2dot.pl,v 1.3 2004/04/04 22:16:59 hubertf Exp $
+# $NetBSD: gpg2dot.pl,v 1.4 2005/03/03 22:43:49 agc Exp $
 
 # ----------------------------------------------------------------------------
 # "THE BEER-WARE LICENSE" (Revision 42):
@@ -20,26 +20,27 @@
 $date = localtime();
 $mykeyid = shift;
 
-$sg = "";
-open(GPG, "gpg --list-keys --verbose 2>/dev/null |");
+open(GPG, "gpg --list-sigs --with-colons --no-sig-cache --verbose 2>/dev/null |");
 while (<GPG>) {
     chomp;
-    if (/^(pub) +(\S+)\s+(\S+)\s+(.+\S)/ ||
-       /^(uid) +\s+(.+\S)/) {
-       if ($1 eq "pub") {
-           ($lkeyid, $date, $kuid) = ($2, $3, $4);
+    my @fields = split /:/;
+    if ($fields[0] eq "pub" || $fields[0] eq "uid") {
+       if ($fields[0] eq "pub") {
+           ($lkeyid, $date, $kuid) = ($fields[4], $fields[5], $fields[9]);
        }
        else {
-           ($kuid) = ($2);
+           next; # XXX --with-colons doesn't seem to produce uid records with useable values
+           ($kuid) = ($fields[$9]);
        }
        $kuid =~ s/\"/\\\"/g;
+       $kuid =~ s/\\x([0-9a-fA-F]+)/chr(hex($1))/eg;
        ($keyid = $lkeyid) =~ s:.*/::;
        $kuid{$keyid} = $kuid;
        next if ($label{$keyid} != "");
        $label{$keyid} = "$lkeyid - $date\\n$kuid";
     }
-    elsif (/^sig (.{7}) (\S+)\s+(\S+)\s+(.+\S)/) {
-       ($skeyid, $date, $suid) = ($2, $3, $4);
+    elsif ($fields[0] eq "sig") {
+       ($skeyid, $date, $suid) = ($fields[4], $fields[5], $fields[9]);
        next if ($suid =~ /id not found/ ||
                 $skeyid eq $keyid);
        push(@isigs, "$keyid $skeyid $date $suid");



Home | Main Index | Thread Index | Old Index