* movemail on Debian
@ 2003-04-29 14:17 Dave Love
0 siblings, 0 replies; only message 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] only message in thread
only message in thread, other threads:[~2003-04-29 14:17 UTC | newest]
Thread overview: (only message) (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
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).