From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Rob Browning Newsgroups: gmane.emacs.devel Subject: MAIL_USE_FLOCK and Debian. Date: Sat, 15 Feb 2003 01:02:11 -0600 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <87lm0ijabw.fsf@raven.i.defaultvalue.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1045292467 26742 80.91.224.249 (15 Feb 2003 07:01:07 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 15 Feb 2003 07:01:07 +0000 (UTC) Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18jwJt-0006wf-00 for ; Sat, 15 Feb 2003 08:01:05 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18jwXB-00034S-00 for ; Sat, 15 Feb 2003 08:14:50 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18jwLU-0005uP-02 for emacs-devel@quimby.gnus.org; Sat, 15 Feb 2003 02:02:44 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18jwLF-0005aY-00 for emacs-devel@gnu.org; Sat, 15 Feb 2003 02:02:29 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18jwL7-00059r-00 for emacs-devel@gnu.org; Sat, 15 Feb 2003 02:02:23 -0500 Original-Received: from dsl093-098-016.wdc1.dsl.speakeasy.net ([66.93.98.16] helo=defaultvalue.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18jwL1-0004fO-00 for emacs-devel@gnu.org; Sat, 15 Feb 2003 02:02:16 -0500 Original-Received: from raven.i.defaultvalue.org (raven.i.defaultvalue.org [192.168.1.7]) by defaultvalue.org (Postfix) with ESMTP id D301813897 for ; Sat, 15 Feb 2003 01:02:11 -0600 (CST) Original-Received: by raven.i.defaultvalue.org (Postfix, from userid 1000) id BD28BBF137; Sat, 15 Feb 2003 01:02:11 -0600 (CST) Original-To: emacs-devel@gnu.org User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-pc-linux-gnu) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:11660 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:11660 On a Debian system, the setting of MAIL_USE_FLOCK in s/gnu-linux.h is guaranteed to be wrong, so right now, Debian applies the patch below and adds -DDEBIAN to CFLAGS in debian/rules. Of course this fix isn't appropriately general because it only works for people using debian/rules to build Emacs packages. So I'd like to figure out what the "right" way to fix it would be. The general rule is that on a Debian system, you should only use liblockfile, nothing else. Though I have patches that make sure that liblockfile is used and that the location of the mail spool is detected correctly, we still need an acceptable way to make sure that on a Debian system, MAIL_USE_FLOCK isn't defined. My patches also add support for dynamic detection and use of USE_MAIL_SPOOL_DIRECTORY, CONF_MAIL_SPOOL_DIRECTORY, CONF_MAIL_PROGRAM_NAME, MOVEMAIL_LOCK_LIBS, and the elisp-side mail-spool-directory variable, though I'm not sure those changes, as they stand, will necessarily be wanted upstream. I discussed them with Gerd some time back, but now I need to finish re-evaluating them against current CVS, and to discuss them here to make sure they're still desired. Thanks --- emacs21-21.2.orig/src/s/gnu-linux.h +++ emacs21-21.2/src/s/gnu-linux.h @@ -130,7 +130,14 @@ programs. I assume that most people are using newer mailers that have heard of flock. Change this if you need to. */ -#define MAIL_USE_FLOCK +/* 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. */ +#ifdef DEBIAN +# undef MAIL_USE_FLOCK +#else +# define MAIL_USE_FLOCK +#endif -- Rob Browning rlb @defaultvalue.org, @linuxdevel.com, and @debian.org Previously @cs.utexas.edu GPG starting 2002-11-03 = 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4