# ^ this is a workaround but works (only) on DSA-administered machines
'dgit-distro.debian.git-url' => 'https://git.dgit.debian.org',
'dgit-distro.debian.git-url-suffix' => '',
+ 'dgit-distro.debian.nmu-bug-new' => 'submit@bugs.debian.org',
+ 'dgit-distro.debian.nmu-bug-old' => '@bugs.debian.org',
'dgit-distro.debian.upload-host' => 'ftp-master', # for dput
'dgit-distro.debian.mirror' => 'http://ftp.debian.org/debian/',
'dgit-distro.debian-security.archive-query' => 'aptget:',
die $donmudiff;
}
+ my (@header, @psuedoheader, @body);
+
my @closes = split /\s+/, $dctrl->{Closes} // '';
if (@closes==1) {
- push @header, <<END;
-To: $closes[0]\@$domain
-Subject: #$closes[0]: Fixed in NMU ($package $version)
-END
+ push @header,
+ To => $closes[0].'@'.(access_cfg 'nmu-bug-old'),
+ Subject => "#$closes[0]: Fixed in NMU ($package $version)";
} else {
- push @header, <<END;
-To: $newbug
-Subject: $source: diff for NMU version $version
-END
+ push @header,
+ To => (access_cfg 'nmu-bug-new'),
+ Subject => "$source: diff for NMU version $version";
}
- push @header, <<END:
-X-Mailer: dgit ($our_version)
-END
push @body, <<END;
Dear Maintainer,
END
}
+ my $msg = build MIME::Entity @header,
+ 'Boundary' => "dgit-$current",
+ 'Content-Type' => 'multipart/mixed';
+
+ $msg->attach(Charset => 'utf-8',
+ Data => (join "", @pseudoheader, "\n", @body),
+ Encoding => '-SUGGEST');
+
+ $msg->attach(Charset => 'utf-8',
+ Path => output of git diff,
+ Description => "NMU diff for $version",
+ Filename => "${package}_${version}_nmu.diff",
+ Disposition => 'attachment'
+
+
+ prepend dgit to x-mailer
+ push @header,
+ 'X-Mailer' => "dgit ($our_version)"
+
sub dopush () {
printdebug "actually entering push\n";