From: unknown Date: Thu, 2 Aug 2007 22:16:25 +0000 (-0500) Subject: Import version as of 2007-08-02 for upload-ftp-v1.1.pl X-Git-Tag: 20200730__import~46 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=acbd664c07521f2acd374e557b3846490df5d7bd;p=gatekeeper.git Import version as of 2007-08-02 for upload-ftp-v1.1.pl --- diff --git a/upload-ftp-v1.1.pl b/upload-ftp-v1.1.pl index 98810cf..42fd2fc 100755 --- a/upload-ftp-v1.1.pl +++ b/upload-ftp-v1.1.pl @@ -461,7 +461,7 @@ sub email_addresses { my @ret; open (EMAIL_FILE, "<", "$package_config_base/$package_name/email") - || &fatal("open $package_name email config failed: $!",0); + || &fatal("unable to find configuration for package $package_name, probably caused by a missing/erroneous 'directory' line in your directive file",1); while () { chomp; @@ -498,6 +498,21 @@ sub read_directive_file { # That'll take manual intervention (i.e., email to maintainers@gnu.org). open (DIRECTIVE_FILE, "<", $directive_file) || ftp_die("FATAL: open($directive_file) failed: $!"); + + # If we don't know whose project this file belongs to, because the + # 'directory:' line is messed up or not there, we'd still like to let the + # uploader know something went wrong. So let's see if we can match the + # directive file signature against one of our public keyrings. + my @tmp_keyrings; + open(TMP,"/usr/bin/find $package_config_base -name pubring.gpg|"); + while() { + chomp(); + push(@tmp_keyrings,$_); + } + close(TMP); + + my $tmp_retval = &verify_keyring($directive_file,@tmp_keyrings); + push(@{$info{email}},$1) if ($tmp_retval =~ /Good signature from .*?<(.*?)>/); my $signed = 0; # If there is a command in the directive that doesn't require an actual file to work @@ -605,29 +620,12 @@ sub read_directive_file { # They have to specify a directory directive. if (!$info{"directory"}) { - # Now, this is tricky. We don't know whose project this file belongs to, - # because the 'directory:' line is messed up or not there. Ideally we'd - # like to let the uploader know that something went wrong though. So let's - # see if we can match the signature against one of our public keyrings. - my @keyrings; - open(TMP,"/usr/bin/find $package_config_base -name pubring.gpg|"); - while() { - chomp(); - push(@keyrings,$_); - } - close(TMP); - - my $retval = &verify_keyring($directive_file,@keyrings); - push(@{$info{email}},$1) if ($retval =~ /Good signature from .*?<(.*?)>/); - - # Now send the warning to the upload-ftp script maintainer, and the person - # who signed the file, if we know who it is. + # Send the warning to the upload-ftp script maintainer, and the person who + # signed the file, if we were able to extract that from the signature on + # the directive file. &fatal("no directory directive specified in $directive_file",1); - } - - # There are a few possibilities regarding the 'filename' directive # 1. It exists in the directive file - there is no problem # 2. It doesn't exist in the directive file