unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* Ye olde Apple mktemp
@ 2019-06-10 18:27 Ralph Seichter
  2019-06-10 18:59 ` Tomi Ollila
  2019-06-10 21:55 ` Ralph Seichter
  0 siblings, 2 replies; 3+ messages in thread
From: Ralph Seichter @ 2019-06-10 18:27 UTC (permalink / raw)
  To: notmuch

Another quirk that occurs during the configuration phase on older macOS
versions (when they were still called OS X, actually) in the MacPorts
build farm:

  Checking for GMime session key extraction support...
  usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
         mktemp [-d] [-q] [-u] -t prefix
  No.

Hooray for that ancient mktemp binary. :-/ The following local patch
solves the issue for me:

diff --git a/configure b/configure
index 8b80f0e0..fa715946 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 -t /tmp); 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 \

Alas, "mktemp -d -t /tmp" is incompatible with GNU coreutils' mktemp,
while "mktemp -d -p /tmp" is not understood by Apple's variant because
of the "-p". I don't know what syntax would be universally acceptable.

Is there a way to pass platform-dependent parameters to mktemp with the
current build mechanics?

-Ralph

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: Ye olde Apple mktemp
  2019-06-10 18:27 Ye olde Apple mktemp Ralph Seichter
@ 2019-06-10 18:59 ` Tomi Ollila
  2019-06-10 21:55 ` Ralph Seichter
  1 sibling, 0 replies; 3+ messages in thread
From: Tomi Ollila @ 2019-06-10 18:59 UTC (permalink / raw)
  To: Ralph Seichter, notmuch

On Mon, Jun 10 2019, Ralph Seichter wrote:

> Another quirk that occurs during the configuration phase on older macOS
> versions (when they were still called OS X, actually) in the MacPorts
> build farm:
>
>   Checking for GMime session key extraction support...
>   usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
>          mktemp [-d] [-q] [-u] -t prefix
>   No.
>
> Hooray for that ancient mktemp binary. :-/ The following local patch
> solves the issue for me:
>
> diff --git a/configure b/configure
> index 8b80f0e0..fa715946 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 -t /tmp); 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 \
>
> Alas, "mktemp -d -t /tmp" is incompatible with GNU coreutils' mktemp,
> while "mktemp -d -p /tmp" is not understood by Apple's variant because
> of the "-p". I don't know what syntax would be universally acceptable.
>
> Is there a way to pass platform-dependent parameters to mktemp with the
> current build mechanics?

Hmm, we have:

test/test-lib.sh:TEST_TMPDIR=$(mktemp -d "${TMPDIR:-/tmp}/notmuch-test-$$.XXXXXX")

does that test work ?

does

TEMP_GPG=$(mktemp -d /tmp/tmp.XXXXXX)

make any difference ?

if it doesn't, then we just have to do uname=$(uname) earlier
and add `-t` to mktemp(1) parameters in case it is darwin
(ot something) 

Tomi

>
> -Ralph

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Ye olde Apple mktemp
  2019-06-10 18:27 Ye olde Apple mktemp Ralph Seichter
  2019-06-10 18:59 ` Tomi Ollila
@ 2019-06-10 21:55 ` Ralph Seichter
  1 sibling, 0 replies; 3+ messages in thread
From: Ralph Seichter @ 2019-06-10 21:55 UTC (permalink / raw)
  To: notmuch

* Ralph Seichter:

> The following local patch solves the issue for me [...]

Well, it does solve the mktemp call failing due to a missing
parameter. There is however additional fun [1] to be had once mktemp
succeeds:

-----snip-----
Checking for GMime session key extraction support... gpg: can't connect to the agent: File name too long
gpg: error getting the KEK: No agent running
gpg: error reading '[stdin]': No agent running
gpg: import from '[stdin]' failed: No agent running
No.
*** Error: Could not extract session keys from encrypted message.

This is likely due to your GMime having been built against a old
version of GPGME.

Please try to rebuild your version of GMime against a more recent
version of GPGME (at least GPGME 1.8.0).
Your current GPGME development version is: 1.13.0-unknown
-----snip-----

I found a GNUPGHOME length limit mentioned in a Debian bug [2] and other
places; looks like the Notmuch build is running into that limit. That
configure does not regcognize GPGME 1.13.0 is of course only a minor
issue, but the GnuPG error breaks the build.

-Ralph

[1] https://build.macports.org/builders/ports-10.10_x86_64-builder/builds/88616/steps/install-port/logs/stdio
[2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=847206

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-06-10 21:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-10 18:27 Ye olde Apple mktemp Ralph Seichter
2019-06-10 18:59 ` Tomi Ollila
2019-06-10 21:55 ` Ralph Seichter

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).