From 8a7040fe62ce737c3419d9bc6c95c394a26e589d Mon Sep 17 00:00:00 2001 From: "J. Lewis Muir" Date: Sat, 12 Dec 2015 16:18:52 +1800 Subject: [PATCH] Re: [PATCH 6/9] search for a reasonable gpg implementation --- b7/7cd744ecce170b3108be6186c53e3f8e0d0fa2 | 79 +++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 b7/7cd744ecce170b3108be6186c53e3f8e0d0fa2 diff --git a/b7/7cd744ecce170b3108be6186c53e3f8e0d0fa2 b/b7/7cd744ecce170b3108be6186c53e3f8e0d0fa2 new file mode 100644 index 000000000..93dee38c3 --- /dev/null +++ b/b7/7cd744ecce170b3108be6186c53e3f8e0d0fa2 @@ -0,0 +1,79 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id 458686DE0A9A + for ; Fri, 11 Dec 2015 14:18:56 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: 0.158 +X-Spam-Level: +X-Spam-Status: No, score=0.158 tagged_above=-999 required=5 tests=[AWL=0.158] + 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 IXi6BKoj5Xrc for ; + Fri, 11 Dec 2015 14:18:54 -0800 (PST) +Received: from tuna.imca.aps.anl.gov (tuna.imca.aps.anl.gov [164.54.200.33]) + by arlo.cworth.org (Postfix) with ESMTPS id 5448B6DE005F + for ; Fri, 11 Dec 2015 14:18:54 -0800 (PST) +Received: from mink.imca.aps.anl.gov (seal.imca.aps.anl.gov [164.54.200.39]) + by tuna.imca.aps.anl.gov (Postfix) with ESMTP id 8FE512005F; + Fri, 11 Dec 2015 16:18:52 -0600 (CST) +Subject: Re: [PATCH 6/9] search for a reasonable gpg implementation +To: Tomi Ollila , + Daniel Kahn Gillmor , + Notmuch Mail +References: <1449718786-28000-1-git-send-email-dkg@fifthhorseman.net> + <1449718786-28000-7-git-send-email-dkg@fifthhorseman.net> + +From: "J. Lewis Muir" +Message-ID: <566B4BCC.7060203@imca-cat.org> +Date: Fri, 11 Dec 2015 16:18:52 -0600 +MIME-Version: 1.0 +In-Reply-To: +Content-Type: text/plain; charset=utf-8 +Content-Transfer-Encoding: 7bit +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.20 +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: Fri, 11 Dec 2015 22:18:56 -0000 + +On 12/11/15 3:56 PM, Tomi Ollila wrote: +>> +static const char* +>> +_notmuch_database_get_gpg_path (notmuch_database_t *notmuch) +>> +{ +>> +#define try_gpg_path(z) if (!access(z, X_OK)) return z +>> + try_gpg_path("/usr/bin/gpg2"); +>> + try_gpg_path("/bin/gpg2"); +>> + try_gpg_path("/usr/bin/gpg"); +>> + try_gpg_path("/bin/gpg"); +>> + return NULL; +>> +} +> +> If this were to survive longer, BSD folks would like to have +> /usr/local/bin checked... +> (i don't know (yet) about os x + +I'm not following closely, but seeing paths to programs hard coded in +the source never seems like a good idea; invariably someone will have +the program in an unanticipated location. I'm using pkgsrc on OS X, +and my gpg is at /opt/pkg/bin/gpg. How about a Notmuch configuration +file item specifying the location of the program? Or if not that, how +about a configuration option at build time to specify the location of +gpg that then gets hard coded in the source? Or if not that, how about +an environment variable that will specify the location of the program +(e.g. like OpenSSH's SSH_ASKPASS environment variable)? + +Regards, + +Lewis -- 2.26.2