From: Ian Jackson Date: Thu, 5 Apr 2018 14:40:00 +0000 (+0100) Subject: email output: Add MIME headers X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=7e16a7e5137ce5e4d960e9a1403409990a93ff9b;p=people%2Fiwj%2Fosstest.git email output: Add MIME headers We universally use UTF-8 in git commit messages and other kinds of messages. The RFC-*822 default is us-ascii. Fix this by providing a set of MIME headers. Reported-by: Andrew Cooper Signed-off-by: Ian Jackson --- diff --git a/Osstest.pm b/Osstest.pm index ceb62ca5..22637869 100644 --- a/Osstest.pm +++ b/Osstest.pm @@ -246,6 +246,12 @@ sub readglobalconfig () { $c{DebianMirrorHost} ||= 'ftp.debian.org' if $c{DebianMirrorProxy}; + $c{EmailStdHeaders} ||= <<'END'; +Content-Type: text/plain; charset="UTF-8" +Content-Transfer-Encoding: 8bit +MIME-Version: 1.0 +END + my $pubbaseprefix = $c{PubBaseDir} ? "$c{PubBaseDir}/" : ""; foreach my $l (qw(logs results)) { my $u = ucfirst $l; diff --git a/cri-args-hostlists b/cri-args-hostlists index 58a22522..a75ff7bf 100644 --- a/cri-args-hostlists +++ b/cri-args-hostlists @@ -103,6 +103,7 @@ start_email () { cat $OSSTEST_EMAIL_HEADER fi echo "Message-ID: " + printf '%s\n' "`getconfig EmailStdHeaders`" printf 'Subject: %s' "${subject_prefix:-[$branch test] }" local flight_html_dir=$OSSTEST_HTMLPUB_DIR/ diff --git a/mg-execute-flight b/mg-execute-flight index 5a861b05..98aca45d 100755 --- a/mg-execute-flight +++ b/mg-execute-flight @@ -58,6 +58,7 @@ if [ x"$flight" = x ]; then badusage; fi : ${blessing:=play} : ${email:=`getconfig Username`} +: ${email_std_headers:=`getconfig EmailStdHeaders`} set +e tty=`exec 2>/dev/null; tty` @@ -88,6 +89,7 @@ exec >tmp/$flight.email cat <