Permalink
Browse files

Split CHECKSUMS_SIGNING_PROGRAM into program/args

New config option CHECKSUM_SIGNING_ARGS added.  IPC::Cmd added
as a prerequisite.

If the signing program isn't available, don't try to sign checksums.

Putting in a fake signing program gives an easy way to disable signing
for testing without ANDK's actual key.

(Longer term, need to break up the arguments as well and check those.)
  • Loading branch information...
xdg committed Aug 13, 2011
1 parent eba6a30 commit 20265868507352013b200af6b47b7b5b2710de16
Showing with 7 additions and 2 deletions.
  1. +1 −0 Makefile.PL
  2. +2 −1 lib/PAUSE.pm
  3. +4 −1 lib/PAUSE/mldistwatch.pm
View
@@ -27,6 +27,7 @@ WriteMakefile(
File::Rsync::Mirror::Recentfile
HTML::Entities
HTTP::Date
+ IPC::Cmd
IPC::Run3
JSON::XS
MD5
View
@@ -104,7 +104,8 @@ $PAUSE::Config ||=
TMP => '/home/ftp/tmp/',
UPLOAD => 'upload@pause.perl.org',
# sign the auto-generated CHECKSUM files with:
- CHECKSUMS_SIGNING_PROGRAM => ('gpg --homedir /home/k/PAUSE/111_sensi'.
+ CHECKSUMS_SIGNING_PROGRAM => ('gpg'),
+ CHECKSUMS_SIGNING_ARGS => ('--homedir /home/k/PAUSE/111_sensi'.
'tive/gnupg-pause-batch-signing-home '.
'--clearsign --default-key '),
CHECKSUMS_SIGNING_KEY => '450F89EC',
View
@@ -22,6 +22,7 @@ use File::Copy ();
use File::Spec ();
use File::Temp 0.14 (); # begin of OO interface
use HTTP::Date ();
+use IPC::Cmd ();
use JSON ();
use List::Util ();
use List::MoreUtils ();
@@ -1353,9 +1354,11 @@ sub mlroot {
sub writechecksum {
my($self, $dir) = @_;
return if $CHECKSUMDONE{$dir}++;
+ return unless IPC::Cmd::can_run( $PAUSE::Config->{CHECKSUMS_SIGNING_PROGRAM} );
local($CPAN::Checksums::CAUTION) = 1;
local($CPAN::Checksums::SIGNING_PROGRAM) =
- $PAUSE::Config->{CHECKSUMS_SIGNING_PROGRAM};
+ $PAUSE::Config->{CHECKSUMS_SIGNING_PROGRAM} . " " .
+ $PAUSE::Config->{CHECKSUMS_SIGNING_ARGS};
local($CPAN::Checksums::SIGNING_KEY) =
$PAUSE::Config->{CHECKSUMS_SIGNING_KEY};
eval { CPAN::Checksums::updatedir($dir); };

0 comments on commit 2026586

Please sign in to comment.