Really attaching patch now.
On Sat, Oct 25, 2008 at 08:25:45AM +0200, Sven Joachim wrote:
> That is the same problem as in #502762, triggered by a Debian-specific
> patch that lets sendmail.el throw an error if neither sendmail nor
> /usr/bin/mail can be found, first reported and discussed in #429059.
> Since a sensible solution had already been proposed in #429059, I'm
> inclined to throw all these bugs together and assign them to the emacs22
> package.
Doing the actual reassign. Did not include 503340, because has been merged
with #434104 and worked around by not requiring sendmail.el.
I have been playing with emacs22 and noticed from
void-fakemail-mail-loss.diff that there are three files affected,
lisp/mail/feedmail.el
lisp/mail/sendmail.el
lisp/gnus/message.el
I guess we need to change the test in all three files. I am attaching a
patch that changes the test in the three files. I modified the message to
warn if mail-interactive is enabled.
sendmail.el changes are minimally tested with mailcrypt in a pbuilder
chroot.
Rob?
--
Agustin
diff -Nru --exclude mh-loaddefs.el emacs22-22.2+2/debian/changelog emacs22-22.2+2/debian/changelog
--- emacs22-22.2+2/debian/changelog 2008-10-29 19:15:42.000000000 +0100
+++ emacs22-22.2+2/debian/changelog 2008-10-29 19:15:50.000000000 +0100
@@ -1,3 +1,12 @@
+emacs22 (22.2+2-4.0.1) unstable; urgency=low
+
+ * avoid-fakemail-mail-loss.diff->{sendmail.el,feedmail.el,message.el}
+ Do not trigger an error, but warn and enable mail-interactive
+ if there is no mail binary available. Fix proposed by Ralf Resack.
+ (Closes: #429059, #502762).
+
+ -- Agustin Martin Domingo <[EMAIL PROTECTED]> Wed, 29 Oct 2008 13:17:19 +0100
+
emacs22 (22.2+2-4) unstable; urgency=medium
* Fix a security problem related to the invocation of python
diff -Nru --exclude mh-loaddefs.el emacs22-22.2+2/debian/patches/avoid-fakemail-mail-loss.diff emacs22-22.2+2/debian/patches/avoid-fakemail-mail-loss.diff
--- emacs22-22.2+2/debian/patches/avoid-fakemail-mail-loss.diff 2008-10-29 19:15:42.000000000 +0100
+++ emacs22-22.2+2/debian/patches/avoid-fakemail-mail-loss.diff 2008-10-29 19:15:50.000000000 +0100
@@ -10,6 +10,11 @@
mail-interactive is true, Emacs won't wait for the mailer and so
won't know that fakemail failed.
+ 29/08/2008: Modified to set mail-interactive to true in case
+ /usr/bin/mail does not exist. Will now just warn instead of
+ bumping an error. See #429059 for the details for this change.
+ Changed by A. Martin. Fix by Ralf Resack on #429059.
+
For now, Debian sets fakemail's MAIL_PROGRAM_NAME to /usr/bin/mail
(which is the correct value for Debian systems) rather than
/bin/mail. Debian also adjusts Emacs to test for the existence of
@@ -21,11 +26,11 @@
MAIL_PROGRAM_NAME isn't accidentally set to some other value during
the build process. If this is undesirable for some reason, just
commment out avoid-fakemail-loss.diff in debian/patches/series.
-
+
Index: sid/lib-src/fakemail.c
===================================================================
---- sid.orig/lib-src/fakemail.c
-+++ sid/lib-src/fakemail.c
+--- sid.orig/lib-src/fakemail.c 2008-10-29 13:45:18.000000000 +0100
++++ sid/lib-src/fakemail.c 2008-10-29 18:43:12.000000000 +0100
@@ -135,8 +135,10 @@
#define NIL ((line_list) NULL)
#define INITIAL_LINE_SIZE 200
@@ -41,50 +46,54 @@
static char *my_name;
Index: sid/lisp/mail/feedmail.el
===================================================================
---- sid.orig/lisp/mail/feedmail.el
-+++ sid/lisp/mail/feedmail.el
-@@ -1348,7 +1348,10 @@
+--- sid.orig/lisp/mail/feedmail.el 2008-10-29 13:45:18.000000000 +0100
++++ sid/lisp/mail/feedmail.el 2008-10-29 18:46:20.000000000 +0100
+@@ -1348,7 +1348,12 @@
"/usr/lib/sendmail")
((file-exists-p "/usr/ucblib/sendmail")
"/usr/ucblib/sendmail")
- (t "fakemail"))
+ (t
-+ (if (not (file-executable-p "/usr/bin/mail"))
-+ (error "/usr/bin/mail is not executable"))
++ (if (not (file-executable-p "/usr/bin/mail"))
++ (progn
++ (message "No executable /usr/bin/mail found. Enabling mail-interactive.")
++ (setq mail-interactive t)))
+ "fakemail"))
nil errors-to nil "-oi" "-t")
;; provide envelope "from" to sendmail; results will vary
(list "-f" user-mail-address)
Index: sid/lisp/mail/sendmail.el
===================================================================
---- sid.orig/lisp/mail/sendmail.el
-+++ sid/lisp/mail/sendmail.el
-@@ -53,7 +53,10 @@
+--- sid.orig/lisp/mail/sendmail.el 2008-10-29 18:43:12.000000000 +0100
++++ sid/lisp/mail/sendmail.el 2008-10-29 18:46:39.000000000 +0100
+@@ -53,7 +53,12 @@
((file-exists-p "/usr/sbin/sendmail") "/usr/sbin/sendmail")
((file-exists-p "/usr/lib/sendmail") "/usr/lib/sendmail")
((file-exists-p "/usr/ucblib/sendmail") "/usr/ucblib/sendmail")
- (t "fakemail")) ;In ../etc, to interface to /bin/mail.
+ (t
+ (if (not (file-executable-p "/usr/bin/mail"))
-+ (error "/usr/bin/mail is not executable"))
++ (progn
++ (message "No executable /usr/bin/mail found. Enabling mail-interactive.")
++ (setq mail-interactive t)))
+ "fakemail")) ;In ../etc, to interface to /bin/mail.
"Program used to send messages."
:group 'mail
:type 'file)
Index: sid/lisp/gnus/message.el
===================================================================
---- sid.orig/lisp/gnus/message.el
-+++ sid/lisp/gnus/message.el
+--- sid.orig/lisp/gnus/message.el 2008-10-29 18:43:12.000000000 +0100
++++ sid/lisp/gnus/message.el 2008-10-29 18:48:20.000000000 +0100
@@ -4026,7 +4026,12 @@
"/usr/lib/sendmail")
((file-exists-p "/usr/ucblib/sendmail")
"/usr/ucblib/sendmail")
- (t "fakemail"))
+ (t
-+ (if (not
-+ (file-executable-p "/usr/bin/mail"))
-+ (error
-+ "/usr/bin/mail is not executable"))
++ (if (not (file-executable-p "/usr/bin/mail"))
++ (progn
++ (message "No executable /usr/bin/mail found. Enabling mail-interactive.")
++ (setq mail-interactive t)))
+ "fakemail"))
nil errbuf nil "-oi")
;; Always specify who from,