From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 378756DE0F86 for ; Mon, 10 Jun 2019 11:59:38 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.422 X-Spam-Level: X-Spam-Status: No, score=0.422 tagged_above=-999 required=5 tests=[AWL=-0.230, SPF_NEUTRAL=0.652] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IV4rGyTWevjo for ; Mon, 10 Jun 2019 11:59:37 -0700 (PDT) Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) by arlo.cworth.org (Postfix) with ESMTP id 5200E6DE0F80 for ; Mon, 10 Jun 2019 11:59:37 -0700 (PDT) Received: from guru.guru-group.fi (localhost [IPv6:::1]) by guru.guru-group.fi (Postfix) with ESMTP id 57A21100084; Mon, 10 Jun 2019 21:59:35 +0300 (EEST) From: Tomi Ollila To: Ralph Seichter , notmuch@notmuchmail.org Subject: Re: Ye olde Apple mktemp In-Reply-To: <87a7epz46e.fsf@ra.horus-it.com> References: <87a7epz46e.fsf@ra.horus-it.com> User-Agent: Notmuch/0.28.3+84~g41389bb (https://notmuchmail.org) Emacs/25.2.1 (x86_64-unknown-linux-gnu) X-Face: HhBM'cA~ MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2019 18:59:38 -0000 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