3 # Terribly ugly hack of a script to verify the signatures on the release
4 # tarballs and produce the list of who signed them in the format we use for
7 # To use just run it in the directory with the signatures and tarballs and
8 # pass the version of subversion you want to check. It assumes gpg is on
9 # you path, if it isn't you should fix that. :D
11 # Script will die if any gpg process returns an error.
13 my $version = $ARGV[0];
16 foreach my $filename (glob("subversion-*.asc")) {
17 my $gpg_output = `gpg --logger-fd 1 --verify $filename`;
19 # gpg exited with a non zero exit value, die with an error
21 die "BAD SIGNATURE in $filename";
23 foreach my $line (split /\n/, $gpg_output) {
24 # Extract the keyid from the GPG output.
25 my ($keyid) = $line =~ /^gpg: Signature made .*? using \w+ key ID (\w+)/;
26 if (defined($keyid)) {
27 # Put the resulting key in a hash to remove duplicates.
33 foreach my $keyid (keys %good_sigs) {
34 my $gpg_output = `gpg --fingerprint $keyid`;
36 # gpg exited with a non zero exit value, die with an error
38 die "UNABLE TO GET FINGERPRINT FOR $keyid";
40 my ($long_keyid, $fingerprint, $null, $name) = $gpg_output =~ /^pub\s+(\w+\/\w
+)[^\n]*\n\s
+Key\sfingerprint\s
=((\s
+[0-9A
-F
]{4}){10})\nuid\s
+([^<\
(]+)\s
/;
41 unless (defined($long_keyid) && defined($name) && defined($fingerprint)) {
42 # Hmm some value didn't get filled in, error out.
43 die "Empty value, possible error in gpg output parsing.";
46 $name [$long_keyid] with fingerprint: