On 2020-05-11 00:31:43 +0200, Moritz Barsnick wrote:
> Haha, I still have one message in that thread from 15 years ago marked
> as "unread". It was one of the first threads after I subscribed to this
> list. I stumbled back upon it while checking since when Redhat had
> patched mutt's dotlocking away in their packages (which I pointed out
> in that thread).
> 
> https://marc.info/?l=mutt-dev&m=111443331622131&w=2

And I'm still using Tamotsu Takahashi's sysdotlock patch,
which I modified each time this was needed. Attached.

-- 
Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
diff --git a/Makefile.am b/Makefile.am
index 9045b70a..d1c7d9a8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -52,7 +52,7 @@ mutt_DEPENDENCIES = $(MUTT_LIB_OBJECTS) $(LIBOBJS) 
$(LIBIMAPDEPS) \
        $(INTLDEPS) $(LIBAUTOCRYPTDEPS)
 
 DEFS=-DPKGDATADIR=\"$(pkgdatadir)\" -DSYSCONFDIR=\"$(sysconfdir)\" \
-       -DBINDIR=\"$(bindir)\" -DMUTTLOCALEDIR=\"$(datadir)/locale\" \
+       -DDOTLOCK_PATH=\"@DOTLOCK_PATH@\" -DMUTTLOCALEDIR=\"$(datadir)/locale\" 
\
        -DHAVE_CONFIG_H=1
 
 AM_CPPFLAGS=-I. -I$(top_srcdir) $(IMAP_INCLUDES) $(AUTOCRYPT_INCLUDES) 
$(GPGME_CFLAGS) -Iintl
diff --git a/PATCHES b/PATCHES
index e69de29b..0fb89070 100644
--- a/PATCHES
+++ b/PATCHES
@@ -0,0 +1 @@
+patch-20200424.tamovl.sysdotlock.1
diff --git a/configure.ac b/configure.ac
index 7906ce35..312233dc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -631,8 +631,6 @@ else
         MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS dotlock.o"
 fi
 
-AC_SUBST(DOTLOCK_TARGET)
-
 dnl autoconf <2.60 compatibility
 if test -z "$datarootdir"; then
   datarootdir='${prefix}/share'
@@ -657,8 +655,18 @@ else
         DOTLOCK_GROUP=''
         DOTLOCK_PERMISSION=755
 fi
+
+AC_ARG_WITH(system-dotlock, 
AS_HELP_STRING([--with-system-dotlock=PATH],[Specify where mutt_dotlock already 
exists]),
+        [DOTLOCK_TARGET=''
+         DOTLOCK_GROUP=''
+         DOTLOCK_PERMISSION=755
+         DOTLOCK_PATH=$withval],
+        [DOTLOCK_PATH=$bindir/mutt_dotlock])
+
+AC_SUBST(DOTLOCK_TARGET)
 AC_SUBST(DOTLOCK_GROUP)
 AC_SUBST(DOTLOCK_PERMISSION)
+AC_SUBST(DOTLOCK_PATH)
 
 AC_ARG_WITH(domain, AS_HELP_STRING([--with-domain=DOMAIN],[Specify your DNS 
domain name]),
         [if test $withval != yes; then
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 1cb21b64..315df052 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -12,7 +12,7 @@ if BUILD_DOC
 BUILD_DOC_TARGETS = stamp-doc-chunked manual.html manual.txt $(INFO_DOCFILES)
 endif
 
-DEFS = -DSYSCONFDIR=\"$(sysconfdir)\" -DBINDIR=\"$(bindir)\" -DHAVE_CONFIG_H=1
+DEFS = -DSYSCONFDIR=\"$(sysconfdir)\" -DBINDIR=\"$(bindir)\" 
-DDOTLOCK_PATH=\"@DOTLOCK_PATH@\" -DHAVE_CONFIG_H=1
 AM_CPPFLAGS = -I. -I.. -I$(includedir) -I$(top_srcdir)
 
 MAKEDOC_CPP = $(CPP) $(AM_CPPFLAGS) $(DEFS) $(CPPFLAGS) -D_MAKEDOC -C
diff --git a/init.h b/init.h
index 6cbc30a3..1b2446d3 100644
--- a/init.h
+++ b/init.h
@@ -896,7 +896,7 @@ struct option_t MuttVars[] = {
   ** filtered message is read from the standard output.
   */
 #if defined(DL_STANDALONE) && defined(USE_DOTLOCK)
-  { "dotlock_program",  DT_PATH, R_NONE, {.p=&MuttDotlock}, {.p=BINDIR 
"/mutt_dotlock"} },
+  { "dotlock_program",  DT_PATH, R_NONE, {.p=&MuttDotlock}, {.p=DOTLOCK_PATH} 
},
   /*
   ** .pp
   ** Contains the path of the \fCmutt_dotlock(8)\fP binary to be used by

Reply via email to