Re: [PATCH] configure: test shell parameter substring processing and possibly exec one
authorDavid Bremner <david@tethera.net>
Wed, 2 May 2012 22:25:53 +0000 (19:25 +2100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:46:53 +0000 (09:46 -0800)
ef/aa8abdd1c2af42b88764771728ad549e6159eb [new file with mode: 0644]

diff --git a/ef/aa8abdd1c2af42b88764771728ad549e6159eb b/ef/aa8abdd1c2af42b88764771728ad549e6159eb
new file mode 100644 (file)
index 0000000..f3569e2
--- /dev/null
@@ -0,0 +1,98 @@
+Return-Path: <bremner@unb.ca>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id EE2C0431FAF\r
+       for <notmuch@notmuchmail.org>; Wed,  2 May 2012 15:26:08 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+       autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id JS8FxrecYNyS for <notmuch@notmuchmail.org>;\r
+       Wed,  2 May 2012 15:26:07 -0700 (PDT)\r
+Received: from tesseract.cs.unb.ca (tesseract.cs.unb.ca [131.202.240.238])\r
+       (using TLSv1 with cipher AES256-SHA (256/256 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 6B67A431FAE\r
+       for <notmuch@notmuchmail.org>; Wed,  2 May 2012 15:26:07 -0700 (PDT)\r
+Received: from fctnnbsc30w-156034089108.dhcp-dynamic.fibreop.nb.bellaliant.net\r
+       ([156.34.89.108] helo=zancas.localnet)\r
+       by tesseract.cs.unb.ca with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32)\r
+       (Exim 4.72) (envelope-from <bremner@unb.ca>)\r
+       id 1SPhzj-0007Bh-8N; Wed, 02 May 2012 19:26:03 -0300\r
+Received: from bremner by zancas.localnet with local (Exim 4.77)\r
+       (envelope-from <bremner@unb.ca>)\r
+       id 1SPhzd-0002tl-Ru; Wed, 02 May 2012 19:25:53 -0300\r
+From: David Bremner <david@tethera.net>\r
+To: Tomi Ollila <tomi.ollila@iki.fi>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH] configure: test shell parameter substring processing and\r
+       possibly exec one\r
+In-Reply-To: <1334643263-30207-1-git-send-email-tomi.ollila@iki.fi>\r
+References: <1334589199-25894-1-git-send-email-tomi.ollila@iki.fi>\r
+       <1334643263-30207-1-git-send-email-tomi.ollila@iki.fi>\r
+User-Agent: Notmuch/0.12+152~g904a807 (http://notmuchmail.org) Emacs/23.4.1\r
+       (x86_64-pc-linux-gnu)\r
+Date: Wed, 02 May 2012 19:25:53 -0300\r
+Message-ID: <87ehr2nrta.fsf@zancas.localnet>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-Spam_bar: -\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Wed, 02 May 2012 22:26:09 -0000\r
+\r
+\r
+\r
+I'm still a bit leery of over-complicating the configure script to\r
+support legacy /bin/sh; however, I guess I'm at least convinced that the\r
+only trivial solution is just to document the requirement for posix\r
+/bin/sh.  It will be odd to back this out and document the restriction\r
+later, so please chime in now if you have strong feelings either way.\r
+\r
+Tomi Ollila <tomi.ollila@iki.fi> writes:\r
+\r
+> To tackle this situation the beginning of configure attemts to do a silent\r
+> parameter substitution in a subshell; in case this fails the subshell exits\r
+> with nonzero value which is easy to detect.\r
+\r
+s/attemts/attempts/\r
+\r
+> The || constructs are used twice. The first one is used as Bourne shell\r
+> chokes on 'if ! ... ' construct (and if ...; then :; else do_things; fi\r
+> looks stupid). The second one(liner) takes care of the possible future\r
+> addition of 'set -eu' in the beginning of this script.\r
+\r
+OK, although I might have gone for the empty if myself.\r
+\r
+> +# If not, attempt to locate and launch one which probably can.\r
+\r
+> +( option=option=value; : ${option#*=} ) 2>/dev/null || {\r
+\r
+option=option=value seems a little _too_ clever to me. Any reason not to\r
+use e.g. \r
+\r
+option="A,B" \r
+\r
+> +    if test x"${_NOTMUCH_CONFIGURE-}" = x ; then\r
+> +    _NOTMUCH_CONFIGURE=1; export _NOTMUCH_CONFIGURE\r
+\r
+This could probably use a comment.\r
+\r
+> +    for x in /bin/ksh /bin/bash /usr/bin/bash\r
+\r
+I guess add /usr/local/bin/bash?  I'm slightly worried this list will\r
+just keep growing.\r