my @ret;
open (EMAIL_FILE, "<", "$package_config_base/$package_name/email")
- || &fatal("The directory line should start with the name of the package for which you are trying to upload a file, e.g. gcc, gawk, or gasm. We have no package named '$package_name'.",1);
+ || &fatal("The directory line should start with the name of the package for which you are trying to upload a file, e.g. gcc, gawk, or emacs. We have no package named '$package_name'.",1);
while (<EMAIL_FILE>) {
chomp;
# Phone home. E-mail the contents of the directive file to the maintainer,
# for debugging purposes. After this point, we don't need to pass the
# $directive_file_contents to any subsequent &fatal calls.
- debug($directive_file_contents) if $DEBUG;
+ if (defined $info{'package'}) {
+ debug($directive_file_contents, $info{'package'}) if $DEBUG;
+ } else {
+ debug($directive_file_contents, '') if $DEBUG;
+ }
# They have to specify a directory directive.
if (!$info{"directory"}) {
# Verify that the file has been correctly signed with a valid signature.
my @verify_args = ("/usr/bin/gpgv", "--keyring", $keyring,
$sig_file, $upload_file);
-
- my $verify_str = join(' ',@verify_args);
- ($verify_str) = $verify_str =~ /^(.*)$/;
- ftp_syslog('info',"$verify_str\n") if ($DEBUG > 0);
-
if (!system (@verify_args)) {
$valid = 1;
last;
sub debug {
my $msg = shift;
+ my $package_name = shift;
if ($NOMAIL) {
- ftp_syslog('info', "($log_style) Subject: [$m_style gnu-ftp-debug] new upload processed\nBody: $msg");
+ ftp_syslog('info', "($log_style) Subject: [$m_style gnu-ftp-debug] new upload processed: $package_name\nBody: $msg");
} else {
my $smtp = Net::SMTP->new ("127.0.0.1");
ftp_die("FATAL: SMTP connection failed") unless $smtp;
$smtp->datasend ("To: $maintainer_email\n");
$smtp->datasend ("From: ftp-upload-script\@gnu.org\n");
$smtp->datasend ("Reply-To: ftp-upload\@gnu.org\n");
- $smtp->datasend ("Subject: [$m_style gnu-ftp-debug] new upload processed");
+ $smtp->datasend ("Subject: [$m_style gnu-ftp-debug] new upload processed: $package_name");
$smtp->datasend ("\n\n");
$smtp->datasend ("$msg\n");
$smtp->dataend ();