* Fwd: Delivery Status Notification (Failure)
[not found] ` <5d03ff8e.1c69fb81.c82a3.d08e.GMR@mx.google.com>
@ 2019-06-14 20:16 ` Tomi Ollila
2019-06-15 17:51 ` [PATCH] configure: fix mktemp call for macOS Ralph Seichter
0 siblings, 1 reply; 11+ messages in thread
From: Tomi Ollila @ 2019-06-14 20:16 UTC (permalink / raw)
To: notmuch
[-- Attachment #1.1: Type: text/plain, Size: 2246 bytes --]
Sorry for the mess -- too tired to fight with this -- hopefully the content
is readable below (will not know before mail leaves...)
[image: Virhekuvake]
Viestiä ei toimitettu
Olet lähettämässä viestiä toisesta osoitteesta tai aliaksesta
Lähetysosoite-ominaisuudella. Lähetysosoite-tilin asetukset ovat
virheelliset tai vanhentuneet. Tarkista kyseisen tilin asetukset ja yritä
lähettää viesti uudelleen.
LISÄTIETOJA <https://support.google.com/mail/?p=CustomFromDenied>
---------- Forwarded message ----------
From: Tomi Ollila <tomi.ollila@iki.fi>
To: notmuch@notmuchmail.org
Cc:
Bcc:
Date: Fri, 14 Jun 2019 23:11:47 +0300
Subject: Re: [PATCH] configure: fix mktemp call for macOS
Hi
cannot (easily) attach to the thread from this account, therefore...
First, it would be better if
TEMP_GPG=$(mktemp -d "${TMPDIR:-/tmp}/notmuch.XXXXXX")
worked, then the behaviour on Linux would not change.
To me it looks like the problem in that one debian bug (i847206) is that the
directory pathname is already like 106 octets -- and on Linux the maximun
unix domain socket pathname is 108 octets -- gpg socket is probably longer
than 1 octet here :D
In case of macOS (and BSD, so says internet) max pathname is 104 octets
In Ralph's example $TMPDIR is
/var/folders/m_/w5lk3r_1495dhnl4l0s96pr00000gn/T/
-- 50 octets. Also probably older system would not have so much longer
tmpdir settings that appending gpg socket name would make length pass
104 octets...
But I am not personally against "hardcoding" /tmp/ (i.e. ignoring TMPDIR) as
prefix location where temporary directory for GNUPGHOME is created
(and, again I don't see where it could fail (barring cases similar to xkcd
workflow)), but perhaps the behavioural change could be mentioned in
the commit message.
(BTW: in case of clutter, by default $TMPDIR is not set, and if set then
user is
responsible of cleaning the clutter. if macOS does its own magic with
$TMPDIR (i.e. w/o user's intervention) then os should also take care
of the clutter...)
(BTW2: I was about to claim that ./configure in notmuch removes GNUPGHOME
quickly after its use has ended, but I did not look anything doing that...)
Tomi
[-- Attachment #1.2: Type: text/html, Size: 3811 bytes --]
[-- Attachment #2: icon.png --]
[-- Type: image/png, Size: 5747 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] configure: fix mktemp call for macOS
2019-06-14 20:16 ` Fwd: Delivery Status Notification (Failure) Tomi Ollila
@ 2019-06-15 17:51 ` Ralph Seichter
2019-06-16 11:12 ` Tomi Ollila
0 siblings, 1 reply; 11+ messages in thread
From: Ralph Seichter @ 2019-06-15 17:51 UTC (permalink / raw)
To: notmuch
* Tomi Ollila:
> First, it would be better if
>
> TEMP_GPG=$(mktemp -d "${TMPDIR:-/tmp}/notmuch.XXXXXX")
>
> worked, then the behaviour on Linux would not change.
I'm trying to figure out if I can override $TMPDIR during the MacPorts
configure phase. According to the documentation, modifying environment
variables should work, but I am not quite there yet.
Corollary: I suggest we go for the method shown above for the time
being. I am not a fan of hardcoding paths either.
-Ralph
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] configure: fix mktemp call for macOS
2019-06-15 17:51 ` [PATCH] configure: fix mktemp call for macOS Ralph Seichter
@ 2019-06-16 11:12 ` Tomi Ollila
2019-06-16 15:18 ` Ralph Seichter
0 siblings, 1 reply; 11+ messages in thread
From: Tomi Ollila @ 2019-06-16 11:12 UTC (permalink / raw)
To: notmuch
On Sat, Jun 15 2019, Ralph Seichter wrote:
> * Tomi Ollila:
>
>> First, it would be better if
>>
>> TEMP_GPG=$(mktemp -d "${TMPDIR:-/tmp}/notmuch.XXXXXX")
>>
>> worked, then the behaviour on Linux would not change.
>
> I'm trying to figure out if I can override $TMPDIR during the MacPorts
> configure phase. According to the documentation, modifying environment
> variables should work, but I am not quite there yet.
>
> Corollary: I suggest we go for the method shown above for the time
> being. I am not a fan of hardcoding paths either.
That maintains the status quo, so no-one needs to explain the change
in commit message.
SO I pre-LGTM anyone sending message containing the followin change:
+ if ! TEMP_GPG=$(mktemp -d "${TMPDIR:-/tmp}/notmuch.XXXXXX"); then
Tomi
>
> -Ralph
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH] configure: fix mktemp call for macOS
2019-06-16 11:12 ` Tomi Ollila
@ 2019-06-16 15:18 ` Ralph Seichter
2019-06-17 5:10 ` David Bremner
0 siblings, 1 reply; 11+ messages in thread
From: Ralph Seichter @ 2019-06-16 15:18 UTC (permalink / raw)
To: notmuch
Add missing template to mktemp, as required by macOS / OS X.
Signed-off-by: Ralph Seichter <abbot@monksofcool.net>
---
configure | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure b/configure
index 8b80f0e0..6e73b22e 100755
--- a/configure
+++ b/configure
@@ -529,7 +529,7 @@ int main () {
return 0;
}
EOF
- if ! TEMP_GPG=$(mktemp -d); then
+ if ! TEMP_GPG=$(mktemp -d "${TMPDIR:-/tmp}/notmuch.XXXXXX"); then
printf 'No.\nCould not make tempdir for testing session-key support.\n'
errors=$((errors + 1))
elif ${CC} ${CFLAGS} ${gmime_cflags} _check_session_keys.c ${gmime_ldflags} -o _check_session_keys \
--
2.22.0
(This obsoletes id:87r27z63uk.fsf@ra.horus-it.com)
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH] configure: fix mktemp call for macOS
@ 2019-06-12 0:26 Ralph Seichter
2019-06-14 10:57 ` David Bremner
0 siblings, 1 reply; 11+ messages in thread
From: Ralph Seichter @ 2019-06-12 0:26 UTC (permalink / raw)
To: notmuch
The mktemp call in configure is incompatible with /usr/bin/mktemp as
shipped with macOS, where it fails due to a missing parameter. I added
the missing template, and the call is now working with both Apple's
and GNU coreutils' mktemp.
Signed-off-by: Ralph Seichter <abbot@monksofcool.net>
---
configure | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure b/configure
index 8b80f0e0..feebafcc 100755
--- a/configure
+++ b/configure
@@ -529,7 +529,7 @@ int main () {
return 0;
}
EOF
- if ! TEMP_GPG=$(mktemp -d); then
+ if ! TEMP_GPG=$(mktemp -d /tmp/notmuch.XXXXXX); then
printf 'No.\nCould not make tempdir for testing session-key support.\n'
errors=$((errors + 1))
elif ${CC} ${CFLAGS} ${gmime_cflags} _check_session_keys.c ${gmime_ldflags} -o _check_session_keys \
--
2.21.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] configure: fix mktemp call for macOS
2019-06-12 0:26 Ralph Seichter
@ 2019-06-14 10:57 ` David Bremner
2019-06-14 11:19 ` Ralph Seichter
0 siblings, 1 reply; 11+ messages in thread
From: David Bremner @ 2019-06-14 10:57 UTC (permalink / raw)
To: Ralph Seichter, notmuch; +Cc: Tomi Ollila
Ralph Seichter <abbot@monksofcool.net> writes:
> The mktemp call in configure is incompatible with /usr/bin/mktemp as
> shipped with macOS, where it fails due to a missing parameter. I added
> the missing template, and the call is now working with both Apple's
> and GNU coreutils' mktemp.
>
I'm hoping Tomi will comment, but I wonder if we should do something
like
TEMP_GPG=$(mktemp -d "${TMPDIR:-/tmp}/notmuch.XXXXXX")
(borrowed from test/test-lib.sh). This avoids hardcoding the temporary
directory.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] configure: fix mktemp call for macOS
2019-06-14 10:57 ` David Bremner
@ 2019-06-14 11:19 ` Ralph Seichter
2019-06-14 17:57 ` Tomi Ollila
0 siblings, 1 reply; 11+ messages in thread
From: Ralph Seichter @ 2019-06-14 11:19 UTC (permalink / raw)
To: David Bremner, notmuch; +Cc: Tomi Ollila
* David Bremner:
> TEMP_GPG=$(mktemp -d "${TMPDIR:-/tmp}/notmuch.XXXXXX")
>
> (borrowed from test/test-lib.sh). This avoids hardcoding the temporary
> directory.
I had the same thought at first, but I want to ensure that the path
length does not cause trouble anymore.
> uname -v
Darwin Kernel Version 18.6.0: Thu Apr 25 23:16:27 PDT 2019; root:xnu-4903.261.4~2/RELEASE_X86_64
> echo $TMPDIR
/var/folders/m_/w5lk3r_1495dhnl4l0s96pr00000gn/T/
That's my MacBook Pro with macOS 10.14.5 (Mojave). AFAIK, older versions
can have longer names. Also, I am concerned with accumulating clutter.
> grep clean_tmps_dirs /etc/defaults/periodic.conf
daily_clean_tmps_dirs="/tmp"
The /tmp directory will, with default settings, be cleaned periodically
by the OS, while $TMPDIR (which is user-specific) will not.
-Ralph
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] configure: fix mktemp call for macOS
2019-06-14 11:19 ` Ralph Seichter
@ 2019-06-14 17:57 ` Tomi Ollila
2019-06-14 18:11 ` Tomi Ollila
2019-06-16 14:30 ` Daniel Kahn Gillmor
0 siblings, 2 replies; 11+ messages in thread
From: Tomi Ollila @ 2019-06-14 17:57 UTC (permalink / raw)
To: Ralph Seichter, David Bremner, notmuch
On Fri, Jun 14 2019, Ralph Seichter wrote:
> * David Bremner:
>
>> TEMP_GPG=$(mktemp -d "${TMPDIR:-/tmp}/notmuch.XXXXXX")
>>
>> (borrowed from test/test-lib.sh). This avoids hardcoding the temporary
>> directory.
>
> I had the same thought at first, but I want to ensure that the path
> length does not cause trouble anymore.
Yes. $TMPDIR could be problematic if it makes the full (unix domain
socket?) path be too long.
SO, exact version Ralph made looks good to me.
Tomi
>
> > uname -v
> Darwin Kernel Version 18.6.0: Thu Apr 25 23:16:27 PDT 2019; root:xnu-4903.261.4~2/RELEASE_X86_64
> > echo $TMPDIR
> /var/folders/m_/w5lk3r_1495dhnl4l0s96pr00000gn/T/
>
> That's my MacBook Pro with macOS 10.14.5 (Mojave). AFAIK, older versions
> can have longer names. Also, I am concerned with accumulating clutter.
>
> > grep clean_tmps_dirs /etc/defaults/periodic.conf
> daily_clean_tmps_dirs="/tmp"
>
> The /tmp directory will, with default settings, be cleaned periodically
> by the OS, while $TMPDIR (which is user-specific) will not.
>
> -Ralph
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> https://notmuchmail.org/mailman/listinfo/notmuch
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] configure: fix mktemp call for macOS
2019-06-14 17:57 ` Tomi Ollila
@ 2019-06-14 18:11 ` Tomi Ollila
2019-06-16 14:30 ` Daniel Kahn Gillmor
1 sibling, 0 replies; 11+ messages in thread
From: Tomi Ollila @ 2019-06-14 18:11 UTC (permalink / raw)
To: Ralph Seichter, David Bremner, notmuch
On Fri, Jun 14 2019, Tomi Ollila wrote:
> On Fri, Jun 14 2019, Ralph Seichter wrote:
>
>> * David Bremner:
>>
>>> TEMP_GPG=$(mktemp -d "${TMPDIR:-/tmp}/notmuch.XXXXXX")
>>>
>>> (borrowed from test/test-lib.sh). This avoids hardcoding the temporary
>>> directory.
>>
>> I had the same thought at first, but I want to ensure that the path
>> length does not cause trouble anymore.
>
> Yes. $TMPDIR could be problematic if it makes the full (unix domain
> socket?) path be too long.
>
> SO, exact version Ralph made looks good to me.
Revert that. mktemp(1) uses $TMPDIR if defined (and just tested)
>
> Tomi
>
>
>>
>> > uname -v
>> Darwin Kernel Version 18.6.0: Thu Apr 25 23:16:27 PDT 2019; root:xnu-4903.261.4~2/RELEASE_X86_64
>> > echo $TMPDIR
>> /var/folders/m_/w5lk3r_1495dhnl4l0s96pr00000gn/T/
>>
>> That's my MacBook Pro with macOS 10.14.5 (Mojave). AFAIK, older versions
>> can have longer names. Also, I am concerned with accumulating clutter.
>>
>> > grep clean_tmps_dirs /etc/defaults/periodic.conf
>> daily_clean_tmps_dirs="/tmp"
>>
>> The /tmp directory will, with default settings, be cleaned periodically
>> by the OS, while $TMPDIR (which is user-specific) will not.
>>
>> -Ralph
>> _______________________________________________
>> notmuch mailing list
>> notmuch@notmuchmail.org
>> https://notmuchmail.org/mailman/listinfo/notmuch
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] configure: fix mktemp call for macOS
2019-06-14 17:57 ` Tomi Ollila
2019-06-14 18:11 ` Tomi Ollila
@ 2019-06-16 14:30 ` Daniel Kahn Gillmor
1 sibling, 0 replies; 11+ messages in thread
From: Daniel Kahn Gillmor @ 2019-06-16 14:30 UTC (permalink / raw)
To: Tomi Ollila, Ralph Seichter, David Bremner, notmuch
[-- Attachment #1: Type: text/plain, Size: 537 bytes --]
On Fri 2019-06-14 20:57:07 +0300, Tomi Ollila wrote:
> Yes. $TMPDIR could be problematic if it makes the full (unix domain
> socket?) path be too long.
Modern, maintained version of GnuPG will only place sockets directly in
the $GNUPGHOME if /run/user/$(id -u) (i.e., $XDG_RUNTIME_DIR) is not
available.
I've just sent a message to gnupg-devel asking for help from upstream
there, this shouldn't be this complicated. see
id:87blyxd2qu.fsf@fifthhorseman.net on gnupg-devel@gnupg.org ("safe
ephemeral GnuPG homdirs").
--dkg
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2019-06-17 5:10 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CAC=HcsFwVdsxMeCLk9qZYeHbd_+qJN77EqPZ17S2UgdR0bb6mw@mail.gmail.com>
[not found] ` <5d03ff8e.1c69fb81.c82a3.d08e.GMR@mx.google.com>
2019-06-14 20:16 ` Fwd: Delivery Status Notification (Failure) Tomi Ollila
2019-06-15 17:51 ` [PATCH] configure: fix mktemp call for macOS Ralph Seichter
2019-06-16 11:12 ` Tomi Ollila
2019-06-16 15:18 ` Ralph Seichter
2019-06-17 5:10 ` David Bremner
2019-06-12 0:26 Ralph Seichter
2019-06-14 10:57 ` David Bremner
2019-06-14 11:19 ` Ralph Seichter
2019-06-14 17:57 ` Tomi Ollila
2019-06-14 18:11 ` Tomi Ollila
2019-06-16 14:30 ` Daniel Kahn Gillmor
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.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).