tags 685078 + patch
tags 691182 + patch

Hi

We are seeing this problem also at workplace as thunderbird is widely
used. I'm attachng a patch switching to use /bin/echo beeing able to
use echo -e in the same way as it is now and would like to do a NMU.

Would be nice to have this also fixed in Wheezy!

Regards,
Salvatore
diff -Nru xdg-utils-1.1.0~rc1+git20111210/debian/changelog 
xdg-utils-1.1.0~rc1+git20111210/debian/changelog
--- xdg-utils-1.1.0~rc1+git20111210/debian/changelog    2013-03-04 
12:38:18.000000000 +0100
+++ xdg-utils-1.1.0~rc1+git20111210/debian/changelog    2014-04-03 
14:38:47.000000000 +0200
@@ -1,3 +1,13 @@
+xdg-utils (1.1.0~rc1+git20111210-7.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Add fix-bashism-use-of-echo.patch patch.
+    Instead of using echo -e in xdg-email use directly /bin/echo. Fixes
+    bashism use of echo and fixes opening of composer window in Thunderbird.
+    (Closes: #685078, #691182)
+
+ -- Salvatore Bonaccorso <[email protected]>  Thu, 03 Apr 2014 14:38:15 +0200
+
 xdg-utils (1.1.0~rc1+git20111210-7) unstable; urgency=low
 
   * Set Multi-Arch: foreign. Closes: #688681.
diff -Nru 
xdg-utils-1.1.0~rc1+git20111210/debian/patches/fix-bashism-use-of-echo.patch 
xdg-utils-1.1.0~rc1+git20111210/debian/patches/fix-bashism-use-of-echo.patch
--- 
xdg-utils-1.1.0~rc1+git20111210/debian/patches/fix-bashism-use-of-echo.patch    
    1970-01-01 01:00:00.000000000 +0100
+++ 
xdg-utils-1.1.0~rc1+git20111210/debian/patches/fix-bashism-use-of-echo.patch    
    2014-04-03 14:38:47.000000000 +0200
@@ -0,0 +1,27 @@
+Description: Use /bin/echo -e instead of echo -e in xdg-email
+Origin: vendor
+Bug-Debian: https://bugs.debian.org/685078
+Bug-Debian: https://bugs.debian.org/691182
+Forwarded: no
+Author: Salvatore Bonaccorso <[email protected]>
+Last-Update: 2014-04-03
+
+--- a/scripts/xdg-email.in
++++ b/scripts/xdg-email.in
+@@ -43,12 +43,12 @@
+     fi
+ 
+     MAILTO=$(echo "$MAILTO" | sed 's/&/\n/g')
+-    TO=$(echo -e $(echo "$MAILTO" | grep '^to=' | sed 
's/^to=//;s/%\(..\)/\\x\1/g' | awk '{ printf "\"%s\",",$0 }'))
+-    CC=$(echo -e $(echo "$MAILTO" | grep '^cc=' | sed 
's/^cc=//;s/%\(..\)/\\x\1/g' | awk '{ printf "\"%s\",",$0 }'))
+-    BCC=$(echo -e $(echo "$MAILTO" | grep '^bcc=' | sed 
's/^bcc=//;s/%\(..\)/\\x\1/g' | awk '{ printf "\"%s\",",$0 }'))
++    TO=$(/bin/echo -e $(echo "$MAILTO" | grep '^to=' | sed 
's/^to=//;s/%\(..\)/\\x\1/g' | awk '{ printf "\"%s\",",$0 }'))
++    CC=$(/bin/echo -e $(echo "$MAILTO" | grep '^cc=' | sed 
's/^cc=//;s/%\(..\)/\\x\1/g' | awk '{ printf "\"%s\",",$0 }'))
++    BCC=$(/bin/echo -e $(echo "$MAILTO" | grep '^bcc=' | sed 
's/^bcc=//;s/%\(..\)/\\x\1/g' | awk '{ printf "\"%s\",",$0 }'))
+     SUBJECT=$(echo "$MAILTO" | grep '^subject=' | tail -n 1)
+     BODY=$(echo "$MAILTO" | grep '^body=' | tail -n 1)
+-    ATTACH=$(echo -e $(echo "$MAILTO" | grep '^attach=' | sed 
's/^attach=//;s/%\(..\)/\\x\1/g' | awk '{ printf "%s,",$0 }' | sed 's/,$//'))
++    ATTACH=$(/bin/echo -e $(echo "$MAILTO" | grep '^attach=' | sed 
's/^attach=//;s/%\(..\)/\\x\1/g' | awk '{ printf "%s,",$0 }' | sed 's/,$//'))
+ 
+     if [ -z "$TO" ] ; then
+         NEWMAILTO=
diff -Nru xdg-utils-1.1.0~rc1+git20111210/debian/patches/series 
xdg-utils-1.1.0~rc1+git20111210/debian/patches/series
--- xdg-utils-1.1.0~rc1+git20111210/debian/patches/series       2012-06-28 
22:13:21.000000000 +0200
+++ xdg-utils-1.1.0~rc1+git20111210/debian/patches/series       2014-04-03 
14:38:47.000000000 +0200
@@ -6,3 +6,4 @@
 xdg-open-spaces.diff
 xdg-open-escape-sed.diff
 no-X.diff
+fix-bashism-use-of-echo.patch

Reply via email to