all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* paths.el not reloaded; impacts integrity of any distribution
@ 2007-01-25  4:02 Jskud
  2007-01-25 21:43 ` Richard Stallman
  0 siblings, 1 reply; 3+ messages in thread
From: Jskud @ 2007-01-25  4:02 UTC (permalink / raw)
  To: bug-gnu-emacs

This bug report will be sent to the Free Software Foundation,
not to your local site managers!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.

Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list,
and to the gnu.emacs.bug news group.

In GNU Emacs 21.3.1 (i686-pc-linux-gnu, X toolkit)
 of 2006-04-07 on turbosphere.fedoralegacy.org
configured using `configure  --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --target=i386-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --with-gcc --with-pop --with-sound'
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: C
  locale-coding-system: nil
  default-enable-multibyte-characters: t

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

I installed Emacs and when invoked, Emacs had the wrong value for the
sendmail-program on my machine.  It should have had /usr/sbin/sendmail.
It had fakemail.  As a result, the outgoing mail headers were corrupted.
A more detailed description of the original problem, and a limited
workaround, are included below; but it does not really identify or
address the underlying problem.

I determined that paths.el is not reloaded on Emacs invocation.  I
conclude that the root cause of a stale path variable is that paths.el,
initially loaded by loadup.el, is not reloaded for the current machine
environment -- the values set by paths.el are saved when emacs is
dumped, and reloaded when emacs is invoked.  Therefore, if the current
machine environment does not match the build environment, values that
were determined and dumped might be wrong when reloaded and run.

A possible work-around/solution is to re-load paths.el in site-start.el,
so that the paths are fresh and correct for the current environment.

The following (as yet unposted) submission is a description of the path
that lead me here.  Note that the suggested work around is very (too)
focused -- reloading paths.el seems like a better choice.

> From Jskud Wed Jan 24 08:56:28 -0800 2007
> From: Jskud@Jskud.com
> To: fedora-legacy-list@redhat.com
> Subject: emacs RH9&FC1 upgrade: botched mail headers, missing subject lines
> 
> I updated my RH9 Emacs installation with
> 
>     0:emacs-21.2-34.legacy.i386=emacs-21.2-34.legacy.i386.rpm
>     0:emacs-leim-21.2-34.legacy.i386=emacs-leim-21.2-34.legacy.i386.rpm
>     0:emacs-el-21.2-34.legacy.i386=emacs-el-21.2-34.legacy.i386.rpm
> 
> I use Emacs mail, and found my outgoing mail headers often were botched.
> In particular, the result was a missing subject line.
> 
> I then upgraded to the latest FC1 Emacs versions
> 
>     0:emacs-21.3-9.2.legacy.i386=emacs-21.3-9.2.legacy.i386.rpm
>     0:emacs-leim-21.3-9.2.legacy.i386=emacs-leim-21.3-9.2.legacy.i386.rpm
>     0:emacs-el-21.3-9.2.legacy.i386=emacs-el-21.3-9.2.legacy.i386.rpm
> 
> and had the same problem.
> 
> Instead of this
> 
>     From Jskud Tue Jan 23 22:44:44 -0800 2007
>     From: <<sender>>
>     To: <<address>>
>     Subject: <<subject>>
> 
> I would get something like this
> 
>     From Jskud Tue Jan 23 22:44:44 2007
>     To: <<address>>
> 
>     From: <<sender>>
>     To: <<address>>
>     Subject: <<subject>>
> 
> I tracked it down, and found that the sendmail-program variable is
> erroneously set to fakemail.  
> 
> I suspect that when emacs was built, it calculated and stored the value
> of sendmail-program as determined by the build environment.  And that
> did not include /usr/sbin/sendmail.
> 
> A workaround is to add the following lines to your .emacs file.
> 
>     ;; HACK to fix FC1 21.3 distribution,
>     ;; which leaves sendmail-program set to broken fakemail
>     ;; -- this code snippet stolen from paths.el
>     (defconst sendmail-program
>       (cond
> 	((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.
>       "Program used to send messages.")
> 
> FYI.  /Jskud

Recent input:
[[not-relevant]]

Recent messages:
[[not-relevant]]

Thanks for a great tool.  Hope this helps make it better.

/Jskud

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: paths.el not reloaded; impacts integrity of any distribution
  2007-01-25  4:02 paths.el not reloaded; impacts integrity of any distribution Jskud
@ 2007-01-25 21:43 ` Richard Stallman
  2007-01-26  6:41   ` Jskud
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Stallman @ 2007-01-25 21:43 UTC (permalink / raw)
  To: Jskud; +Cc: bug-gnu-emacs

In the development Emacs, sendmail-program is initialized when you
start Emacs.

Thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: paths.el not reloaded; impacts integrity of any distribution
  2007-01-25 21:43 ` Richard Stallman
@ 2007-01-26  6:41   ` Jskud
  0 siblings, 0 replies; 3+ messages in thread
From: Jskud @ 2007-01-26  6:41 UTC (permalink / raw)
  To: rms; +Cc: bug-gnu-emacs

Thanks for the reply, and correction: that a stale sendmail-program path
does not impact all distributions; I see it in some binary distributions
(cf.  fedora legacy update releases for redhat 9 and fedora core 1).

To avoid stale path problems with future binary releases, wouldn't it
make sense to reload paths.el on startup as part of the Emacs mainline?

/Jskud

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-01-26  6:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-25  4:02 paths.el not reloaded; impacts integrity of any distribution Jskud
2007-01-25 21:43 ` Richard Stallman
2007-01-26  6:41   ` Jskud

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.