[PATCH v2 01/14] test: add known broken test for reply to message with multiple Cc...
[notmuch-archives.git] / 96 / aefea0874652de3490a9d317ef5a1cea316852
1 Return-Path: <tomi.ollila@iki.fi>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5  by arlo.cworth.org (Postfix) with ESMTP id 3314D6DE0AC2\r
6  for <notmuch@notmuchmail.org>; Sun, 13 Dec 2015 03:16:54 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0.693\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0.693 tagged_above=-999 required=5 tests=[AWL=0.041, \r
12  SPF_NEUTRAL=0.652] autolearn=disabled\r
13 Received: from arlo.cworth.org ([127.0.0.1])\r
14  by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
15  with ESMTP id xxMkzYAHydos for <notmuch@notmuchmail.org>;\r
16  Sun, 13 Dec 2015 03:16:52 -0800 (PST)\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
18  by arlo.cworth.org (Postfix) with ESMTP id 569316DE005F\r
19  for <notmuch@notmuchmail.org>; Sun, 13 Dec 2015 03:16:52 -0800 (PST)\r
20 Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
21  by guru.guru-group.fi (Postfix) with ESMTP id 2BB7A10005A;\r
22  Sun, 13 Dec 2015 13:17:07 +0200 (EET)\r
23 From: Tomi Ollila <tomi.ollila@iki.fi>\r
24 To: David Bremner <david@tethera.net>,\r
25  Daniel Kahn Gillmor <dkg@fifthhorseman.net>,\r
26  Notmuch Mail <notmuch@notmuchmail.org>\r
27 Subject: Re: [PATCH 7/9] add a gpg_path value for notmuch_database_t\r
28 In-Reply-To: <m24mfmbolm.fsf@guru.guru-group.fi>\r
29 References: <1449718786-28000-1-git-send-email-dkg@fifthhorseman.net>\r
30  <1449718786-28000-8-git-send-email-dkg@fifthhorseman.net>\r
31  <m21tas7ifa.fsf@guru.guru-group.fi> <87mvtgfws4.fsf@alice.fifthhorseman.net>\r
32  <87d1ubdu0k.fsf@zancas.localnet> <m24mfmbolm.fsf@guru.guru-group.fi>\r
33 User-Agent: Notmuch/0.21+32~g73439f8 (http://notmuchmail.org) Emacs/24.3.1\r
34  (x86_64-unknown-linux-gnu)\r
35 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
36  $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
37  !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
38 Date: Sun, 13 Dec 2015 13:17:07 +0200\r
39 Message-ID: <m21taqbnt8.fsf@guru.guru-group.fi>\r
40 MIME-Version: 1.0\r
41 Content-Type: text/plain\r
42 X-BeenThere: notmuch@notmuchmail.org\r
43 X-Mailman-Version: 2.1.20\r
44 Precedence: list\r
45 List-Id: "Use and development of the notmuch mail system."\r
46  <notmuch.notmuchmail.org>\r
47 List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,\r
48  <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
49 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
50 List-Post: <mailto:notmuch@notmuchmail.org>\r
51 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
52 List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
53  <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
54 X-List-Received-Date: Sun, 13 Dec 2015 11:16:54 -0000\r
55 \r
56 On Sun, Dec 13 2015, Tomi Ollila <tomi.ollila@iki.fi> wrote:\r
57 \r
58 > On Sun, Dec 13 2015, David Bremner <david@tethera.net> wrote:\r
59 >\r
60 >>\r
61 >> Without weighing in on the advisibility of searching for gpg in $PATH,\r
62 >> there is a glib function g_find_program_in_path. We're already linking\r
63 >> to glib (because of gmime mainly, but it's used other places as well).\r
64 >\r
65 > glib2-2.38 (glib/gutils.c) seems to look in PATH, and if \r
66 > g_getenv ("PATH") == NULL uses hardcoded path "/bin:/usr/bin:.";\r
67 > (it us "security" feature to have '.' last...)\r
68 >\r
69 > If rest is TL;DR; I'd suggest we use this... since libgpgme has implemented\r
70 > it IMO too late for use in 2016 (or do additional compat function?)\r
71 \r
72 Actually now that I sent this mail it kept rolling on my mind... If anyone\r
73 else than me (and libgpgme?) thinks that '.' should not be in search path\r
74 we could do\r
75 \r
76 if (getenv("PATH") == NULL) {\r
77    path_set = true;\r
78    setenv("PATH", "/bin:/usr/bin", 1); // XXX *BSD configurability //\r
79 }\r
80 else path_set = false;\r
81 \r
82 ... g_find_program_in_path("gpg2")\r
83 ... g_find_program_in_path("gpg")\r
84 \r
85 if (path_set) {\r
86   unsetenv("PATH");\r
87 \r
88 ---\r
89 \r
90 I also thought of examining the return value starting with ./ but\r
91 (current or) future version of g_find_program_in_path() might\r
92 canonicalize the returned path...\r
93 \r
94 \r
95 Tomi\r
96 \r
97 \r
98 >\r
99 >> The other point that occurs to me is that libgpgme solves this same\r
100 >> problem in src/posix-util.c. It also seems to search path, at least\r
101 >> optionally, although only if it cannot find gpgconf.\r
102 >\r
103 > On Fedora 20 I looked gpgme-1.3.2 sources -- in there I could not find\r
104 > this search using PATH... gpg-1.3.2 is released 2012-05-02...\r
105 >\r
106 > Jessie (lib)gpgme 1.5.1 (2014-07-30) seems to have the code David mentioned...\r
107 > (btw. I was suprisingly hard to search Debian packages; IIRC it was easier)\r
108 >\r
109 > Ubuntu 14.04 LTS has (lib)gpgme 1.4.3 (ubuntu5). I did not download that\r
110 > source... but 1.5.1 NEWS indicates that this PATH search has arrived to\r
111 > 1.5.0 (2014-05-21)\r
112 >\r
113 > This search is different from glib2-version that if getenv("PATH") == NULL\r
114 > search only "/bin:/usr/bin"\r