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 (<EMAIL_FILE>) {
chomp;
# 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(<TMP>) {
+ 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
# 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(<TMP>) {
- 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