Re: [PATCH] configure: fix mktemp call for macOS
Ralph Seichter writes: > Add missing template to mktemp, as required by macOS / OS X. > > Signed-off-by: Ralph Seichter > --- I've merged this to master and release. In the case that we do another point release before 0.30, it will be in that. d ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
Re: [PATCH] configure: fix mktemp call for macOS
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@fifthhorseman.net on gnupg-de...@gnupg.org ("safe ephemeral GnuPG homdirs"). --dkg signature.asc Description: PGP signature ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
Re: [PATCH] configure: fix mktemp call for macOS
On Sat, Jun 15 2019, Ralph Seichter wrote: > * Tomi Ollila: > >> First, it would be better if >> >> TEMP_GPG=$(mktemp -d "${TMPDIR:-/tmp}/notmuch.XX") >> >> 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.XX"); then Tomi > > -Ralph ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
Re: [PATCH] configure: fix mktemp call for macOS
* Tomi Ollila: > First, it would be better if > > TEMP_GPG=$(mktemp -d "${TMPDIR:-/tmp}/notmuch.XX") > > 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 ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
Re: [PATCH] configure: fix mktemp call for macOS
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.XX") >>> >>> (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_1495dhnl4l0s96pr0gn/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 ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
Re: [PATCH] configure: fix mktemp call for macOS
On Fri, Jun 14 2019, Ralph Seichter wrote: > * David Bremner: > >> TEMP_GPG=$(mktemp -d "${TMPDIR:-/tmp}/notmuch.XX") >> >> (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_1495dhnl4l0s96pr0gn/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 ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch
Re: [PATCH] configure: fix mktemp call for macOS
* David Bremner: > TEMP_GPG=$(mktemp -d "${TMPDIR:-/tmp}/notmuch.XX") > > (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_1495dhnl4l0s96pr0gn/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
Re: [PATCH] configure: fix mktemp call for macOS
Ralph Seichter 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.XX") (borrowed from test/test-lib.sh). This avoids hardcoding the temporary directory. ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch