all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jskud@Jskud.com
To: bug-gnu-emacs@gnu.org
Subject: paths.el not reloaded; impacts integrity of any distribution
Date: Wed, 24 Jan 2007 20:02:11 -0800	[thread overview]
Message-ID: <200701250402.l0P42BsA005400@echo.jskud.com> (raw)

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

             reply	other threads:[~2007-01-25  4:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-25  4:02 Jskud [this message]
2007-01-25 21:43 ` paths.el not reloaded; impacts integrity of any distribution Richard Stallman
2007-01-26  6:41   ` Jskud

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200701250402.l0P42BsA005400@echo.jskud.com \
    --to=jskud@jskud.com \
    --cc=bug-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.