[SCM] pkg-kde repository scripts branch, master, updated. b6e1a8e3315ff494a2505d0190946f6cfa4efd9c

Modestas Vainius modax at alioth.debian.org
Sat Jun 11 07:17:21 UTC 2011


The following commit has been merged in the master branch:
commit b6e1a8e3315ff494a2505d0190946f6cfa4efd9c
Author: Modestas Vainius <modax at debian.org>
Date:   Sat Jun 11 10:13:13 2011 +0300

    Force encoding of outgoing mails to be UTF-8.
    
    Add a wrapper script for mailx and a config file which forces charset of
    outgoing mails to be UTF-8 (under heirloom-mailx at least). Use the wrapper
    script in place of direct execution of mail(x).
---
 mail.rc            |    7 +++++++
 process-changes    |    2 +-
 repository-updated |    2 +-
 repository.conf    |    3 +++
 send-mail          |    9 +++++++++
 5 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/mail.rc b/mail.rc
new file mode 100644
index 0000000..fe1f00d
--- /dev/null
+++ b/mail.rc
@@ -0,0 +1,7 @@
+# Force charset to utf-8 (heirloom-mailx)
+set sendcharsets=utf-8
+set ttycharset=utf-8
+set charset=utf-8
+
+# Force encoding to quoted-printable (heirloom-mailx)
+set encoding=quoted-printable
diff --git a/process-changes b/process-changes
index 694e125..ebe7b95 100755
--- a/process-changes
+++ b/process-changes
@@ -24,7 +24,7 @@ POOL_CHANGES="$6"
 changes_basename=`basename "$CHANGES"`
 if [ ! -f "$REPO/processing_$changes_basename" ]; then
 	# Changes is being processed. Avoid dupe mails
-	LC_ALL=en_US.UTF-8 mail -s "$changes_basename ACCEPTED into ${CODENAME}" "$MAILTO" < "$CHANGES"
+	$SEND_MAIL -s "$changes_basename ACCEPTED into ${CODENAME}" "$MAILTO" < "$CHANGES"
 fi
 
 # Chmod changes
diff --git a/repository-updated b/repository-updated
index eaf3d50..bfed64b 100755
--- a/repository-updated
+++ b/repository-updated
@@ -36,7 +36,7 @@ if [ -s "$RECENTLOG" ]; then
 	# Mail recent log
 	echo_mail_body | gpg --homedir "$REPO/keyring" --no-permission-warning \
 		             --default-key $REPO_KEY --output - --clearsign - | \
-		LC_ALL=en_US.UTF-8 mail -s "$MAIL_SUBJECT" "$MAILTO"
+		$SEND_MAIL -s "$MAIL_SUBJECT" "$MAILTO"
 fi
 
 if [ -s "$RECENTLOG" ] || [ -n "$force" ]; then
diff --git a/repository.conf b/repository.conf
index 27277ec..c44a518 100644
--- a/repository.conf
+++ b/repository.conf
@@ -22,3 +22,6 @@ REPO_KEY="93DD2AE2E79C8BAB"
 # Path to the temporary file where distro to flood at the end of
 # processincoming should be written
 FLOOD_DISTROS="$REPO/flood_distros"
+
+# send-mail helper script
+SEND_MAIL="$REPO/send-mail"
diff --git a/send-mail b/send-mail
new file mode 100755
index 0000000..1f587bd
--- /dev/null
+++ b/send-mail
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+LC_ALL=en_US.UTF-8
+MAILRC="`dirname "$0"`/mail.rc"
+
+export LC_ALL
+export MAILRC
+
+exec mailx -n "$@"

-- 
pkg-kde repository scripts



More information about the pkg-kde-commits mailing list