all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* movemail on Debian
@ 2003-04-29 14:17 Dave Love
  2003-04-30  5:43 ` Richard Stallman
  0 siblings, 1 reply; 11+ messages in thread
From: Dave Love @ 2003-04-29 14:17 UTC (permalink / raw)


21.3 never got fixed for mail locking on Debian and apparently could
lose mail from a spool delivered to by a Debian system.  (I've made
previous attempts to get this fixed.  It should really be fixed by
making the locking runtime-configurable, but this seems to fix an
important case.)

If there's a bug-fix follow-on, please consider the following.  I
can't really test it, but perhaps someone could at least check the
logic and consider it also for the head source.  It does at least get
liblockfile dynamically linked, which it isn't in the movemail from
the Debian package.  For the head, it should probably be cleaned up to
distinguish HAVE_LIBMAIL and HAVE_LIBLOCKFILE.

Note that with this you get a warning which should probably be dealt
with:

movemail.c:327: the use of `mktemp' is dangerous, better use `mkstemp'

2003-04-29  Dave Love  <fx@gnu.org>

	* configure.in: When we have -llockfile, define HAVE_LIBMAIL, not
	LIBMAIL.

Index: configure.in
===================================================================
RCS file: /cvsroot/emacs/emacs/configure.in,v
retrieving revision 1.267.4.17
diff -u -p -c -r1.267.4.17 configure.in
cvs server: conflicting specifications of output style
*** configure.in	7 Apr 2003 09:34:40 -0000	1.267.4.17
--- configure.in	29 Apr 2003 13:58:35 -0000
*************** if test "$ac_cv_lib_lockfile_maillock" =
*** 1967,1975 ****
      AC_MSG_ERROR([Shared liblockfile found but can't link against it.
  This probably means that movemail could lose mail.
  There may be a \`development' package to install containing liblockfile.])
-   else AC_DEFINE(LIBMAIL, -llockfile)
-   fi
    else :
  fi
  AC_CHECK_FUNCS(touchlock)
  AC_CHECK_HEADERS(maillock.h)
--- 1967,1975 ----
      AC_MSG_ERROR([Shared liblockfile found but can't link against it.
  This probably means that movemail could lose mail.
  There may be a \`development' package to install containing liblockfile.])
    else :
+   fi
+ else AC_DEFINE(HAVE_LIBMAIL)
  fi
  AC_CHECK_FUNCS(touchlock)
  AC_CHECK_HEADERS(maillock.h)

2003-04-29  Dave Love  <fx@gnu.org>

	* config.in: Add HAVE_LIBLOCKFILE.

	* s/gnu-linux.h (MAIL_USE_FLOCK): Don't define if we should use
	maillock.

*** gnu-linux.h.~1.83.~	Fri Sep 28 16:50:04 2001
--- gnu-linux.h	Tue Apr 29 15:13:55 2003
***************
*** 129,136 ****
--- 129,146 ----
  /* On GNU/Linux systems, both methods are used by various mail
     programs.  I assume that most people are using newer mailers that
     have heard of flock.  Change this if you need to. */
+ /* Debian contains a patch which says: ``On Debian/GNU/Linux systems,
+    configure gets the right answers, and that means *NOT* using flock.
+    Using flock is guaranteed to be the wrong thing. See Debian Policy
+    for details.'' and then uses `#ifdef DEBIAN'.  Unfortunately the
+    Debian maintainer hasn't provided a clean fix for Emacs.
+    movemail.c will use `maillock' when MAILDIR, HAVE_LIBMAIL and
+    HAVE_MAILLOCK_H are defined, so the following appears to be the
+    correct logic.  (MAILDIR is defined in maillock.h.)  -- fx */
  
+ #if !(defined (HAVE_LIBMAIL) && defined (HAVE_MAILLOCK_H))
  #define MAIL_USE_FLOCK
+ #endif
  
  /* Define CLASH_DETECTION if you want lock files to be written
     so that Emacs can tell instantly when you try to modify

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

* Re: movemail on Debian
  2003-04-29 14:17 movemail on Debian Dave Love
@ 2003-04-30  5:43 ` Richard Stallman
  2003-04-30 17:59   ` Dave Love
  0 siblings, 1 reply; 11+ messages in thread
From: Richard Stallman @ 2003-04-30  5:43 UTC (permalink / raw)
  Cc: emacs-devel

	    * configure.in: When we have -llockfile, define HAVE_LIBMAIL, not
	    LIBMAIL.

Can you explain the meaning of defining LIBMAIL, and the meaning of
defining HAVE_LIBMAIL, so I can understand this change?

Does HAVE_LIBMAIL have any existing meaning, distinct from its effect
on the conditional you are adding to gnu-linux.h?

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

* Re: movemail on Debian
  2003-04-30  5:43 ` Richard Stallman
@ 2003-04-30 17:59   ` Dave Love
  2003-05-02 14:37     ` Richard Stallman
  0 siblings, 1 reply; 11+ messages in thread
From: Dave Love @ 2003-04-30 17:59 UTC (permalink / raw)
  Cc: emacs-devel

Richard Stallman <rms@gnu.org> writes:

> 	    * configure.in: When we have -llockfile, define HAVE_LIBMAIL, not
> 	    LIBMAIL.
> 
> Can you explain the meaning of defining LIBMAIL,

I think there wasn't any.  [I was fairly sure the configurey worked at
one stage, but that was perhaps a couple of years back and it seems
the current version doesn't DTRT despite what the Debian patch says.]

> and the meaning of defining HAVE_LIBMAIL, so I can understand this
> change?

It's normal autoconf for `can link -lmail'.

> Does HAVE_LIBMAIL have any existing meaning, distinct from its effect
> on the conditional you are adding to gnu-linux.h?

I think movemail is written to work with function `maillock' (?) from
a proprietary libmail.  Debian has the same function in liblockfile.
Defining HAVE_LIBMAIL (albeit a lie) gets movemail to use maillock --
as I commented in gnu-linux.h -- without touching movemail.c.  See
conditionals on HAVE_LIBMAIL &c near the top of movemail.c.

Is that clear?

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

* Re: movemail on Debian
  2003-04-30 17:59   ` Dave Love
@ 2003-05-02 14:37     ` Richard Stallman
  2003-05-03 14:25       ` Dave Love
  0 siblings, 1 reply; 11+ messages in thread
From: Richard Stallman @ 2003-05-02 14:37 UTC (permalink / raw)
  Cc: emacs-devel

    I think movemail is written to work with function `maillock' (?) from
    a proprietary libmail.  Debian has the same function in liblockfile.
    Defining HAVE_LIBMAIL (albeit a lie) gets movemail to use maillock --
    as I commented in gnu-linux.h -- without touching movemail.c.  See
    conditionals on HAVE_LIBMAIL &c near the top of movemail.c.

    Is that clear?

Yes, it is clear now.  Would you please install your changes
in the trunk and in RC?

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

* Re: movemail on Debian
  2003-05-02 14:37     ` Richard Stallman
@ 2003-05-03 14:25       ` Dave Love
  2003-05-04 13:04         ` Richard Stallman
  0 siblings, 1 reply; 11+ messages in thread
From: Dave Love @ 2003-05-03 14:25 UTC (permalink / raw)
  Cc: emacs-devel

Richard Stallman <rms@gnu.org> writes:

> Yes, it is clear now.

[I hope someone can actually check the implementation.]

> Would you please install your changes in the trunk and in RC?

I don't think it should be installed as such on the trunk.  It should
be cleaned up with separate definitions for libmail and liblockfile
with appropriate changes to movemail.  (That's probably trivial, but
I'm not sure.)

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

* Re: movemail on Debian
  2003-05-03 14:25       ` Dave Love
@ 2003-05-04 13:04         ` Richard Stallman
  2003-05-04 18:05           ` Dave Love
  0 siblings, 1 reply; 11+ messages in thread
From: Richard Stallman @ 2003-05-04 13:04 UTC (permalink / raw)
  Cc: emacs-devel

    > Would you please install your changes in the trunk and in RC?

    I don't think it should be installed as such on the trunk.

Should it be installed as such in RC?  If so, please do.

								It should
    be cleaned up with separate definitions for libmail and liblockfile
    with appropriate changes to movemail.

Would you like to write what should be installed in the trunk?

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

* Re: movemail on Debian
  2003-05-04 13:04         ` Richard Stallman
@ 2003-05-04 18:05           ` Dave Love
  2003-05-05 19:10             ` Richard Stallman
  0 siblings, 1 reply; 11+ messages in thread
From: Dave Love @ 2003-05-04 18:05 UTC (permalink / raw)
  Cc: emacs-devel

Richard Stallman <rms@gnu.org> writes:

> Should it be installed as such in RC?  If so, please do.

I already did.

> 								It should
>     be cleaned up with separate definitions for libmail and liblockfile
>     with appropriate changes to movemail.
> 
> Would you like to write what should be installed in the trunk?

I'd rather leave it to the movemail maintainer or someone else.  [It
still needs re-writing so the locking mechanism is selectable at
runtime, as discussed some time ago, which is the reason I don't use
it.]

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

* Re: movemail on Debian
  2003-05-04 18:05           ` Dave Love
@ 2003-05-05 19:10             ` Richard Stallman
  2003-05-20 16:59               ` Dave Love
  0 siblings, 1 reply; 11+ messages in thread
From: Richard Stallman @ 2003-05-05 19:10 UTC (permalink / raw)
  Cc: emacs-devel

    > Would you like to write what should be installed in the trunk?

    I'd rather leave it to the movemail maintainer or someone else.  [It
    still needs re-writing so the locking mechanism is selectable at
    runtime, as discussed some time ago, which is the reason I don't use
    it.]

I don't know if anyone else will do it.  A run-time decision is the
right thing, but your change would be better than nothing.  So could
you adapt it to the trunk and install it, please?

Someone else can always improve it later, if we find someone to do it.

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

* Re: movemail on Debian
  2003-05-05 19:10             ` Richard Stallman
@ 2003-05-20 16:59               ` Dave Love
  2003-05-21 15:31                 ` Richard Stallman
  0 siblings, 1 reply; 11+ messages in thread
From: Dave Love @ 2003-05-20 16:59 UTC (permalink / raw)
  Cc: emacs-devel

Richard Stallman <rms@gnu.org> writes:

>     I'd rather leave it to the movemail maintainer or someone else.  [It
>     still needs re-writing so the locking mechanism is selectable at
>     runtime, as discussed some time ago, which is the reason I don't use
>     it.]
>
> I don't know if anyone else will do it.  A run-time decision is the
> right thing, but your change would be better than nothing.  So could
> you adapt it to the trunk and install it, please?

I've done this, with a heavy heart, but I still don't know for sure
it's right.

> Someone else can always improve it later, if we find someone to do it.

Why isn't movemail maintained with, or integrated into, mailutils?  It
would presumably be a trivial job to assemble it from mailutils
components, and then would get things like APOP support automatically
(currently missing and what I need to fetch mail from GNU, for
instance).

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

* Re: movemail on Debian
  2003-05-20 16:59               ` Dave Love
@ 2003-05-21 15:31                 ` Richard Stallman
  2003-05-25 15:31                   ` Dave Love
  0 siblings, 1 reply; 11+ messages in thread
From: Richard Stallman @ 2003-05-21 15:31 UTC (permalink / raw)
  Cc: emacs-devel

    Why isn't movemail maintained with, or integrated into, mailutils?

I am not sure what that would mean.  Could you explain?

      It
    would presumably be a trivial job to assemble it from mailutils
    components,

I understand that even less.

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

* Re: movemail on Debian
  2003-05-21 15:31                 ` Richard Stallman
@ 2003-05-25 15:31                   ` Dave Love
  0 siblings, 0 replies; 11+ messages in thread
From: Dave Love @ 2003-05-25 15:31 UTC (permalink / raw)
  Cc: emacs-devel

Richard Stallman <rms@gnu.org> writes:

>     Why isn't movemail maintained with, or integrated into, mailutils?
>
> I am not sure what that would mean.  Could you explain?

I'm not sure what needs explaining.  I'd hope it meant that movemail
got expert maintenance from someone else with important features like
IMAP (see etc/TODO) and APOP.  Mailutils already has specific support
for Emacs since its `mh' component is already advertised primarily to
support mh-e, so I guess it would be open to providing movemail.  I
guess you'd end up with substantially more source for the program in
Emacs, and you'd have to sync it, but that seems worthwhile.

>       It
>     would presumably be a trivial job to assemble it from mailutils
>     components,
>
> I understand that even less.

The job that movemail does is basically a subset of what `mail' has to
do to extract messages to your mbox, so adding a movemail program to
mailutils should be easy.

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

end of thread, other threads:[~2003-05-25 15:31 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-29 14:17 movemail on Debian Dave Love
2003-04-30  5:43 ` Richard Stallman
2003-04-30 17:59   ` Dave Love
2003-05-02 14:37     ` Richard Stallman
2003-05-03 14:25       ` Dave Love
2003-05-04 13:04         ` Richard Stallman
2003-05-04 18:05           ` Dave Love
2003-05-05 19:10             ` Richard Stallman
2003-05-20 16:59               ` Dave Love
2003-05-21 15:31                 ` Richard Stallman
2003-05-25 15:31                   ` Dave Love

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.