[PATCH 4/4] Update NEWS for user.other_name
[notmuch-archives.git] / e3 / 4fa8e3e9eba4c42ec09558a6689bb94f0dcc7f
1 Return-Path: <jani@nikula.org>\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 olra.theworths.org (Postfix) with ESMTP id 07EE1431FBC\r
6         for <notmuch@notmuchmail.org>; Sat,  7 Mar 2015 09:12:50 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 1.738\r
10 X-Spam-Level: *\r
11 X-Spam-Status: No, score=1.738 tagged_above=-999 required=5\r
12         tests=[DNS_FROM_AHBL_RHSBL=2.438, RCVD_IN_DNSWL_LOW=-0.7]\r
13         autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id 7BJFOq26zaCL for <notmuch@notmuchmail.org>;\r
17         Sat,  7 Mar 2015 09:12:46 -0800 (PST)\r
18 Received: from mail-we0-f172.google.com (mail-we0-f172.google.com\r
19         [74.125.82.172]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id 91C5B431FAE\r
22         for <notmuch@notmuchmail.org>; Sat,  7 Mar 2015 09:12:46 -0800 (PST)\r
23 Received: by wesx3 with SMTP id x3so18909626wes.4\r
24         for <notmuch@notmuchmail.org>; Sat, 07 Mar 2015 09:12:45 -0800 (PST)\r
25 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
26         d=1e100.net; s=20130820;\r
27         h=x-gm-message-state:from:to:subject:in-reply-to:references\r
28         :user-agent:date:message-id:mime-version:content-type;\r
29         bh=gO5dUaFmQs1pXsQZeidoujnJ6+EhEA7uNgIkhm2hr/8=;\r
30         b=iph0QuAe6Z96z6DqyehCmWEfqPdLMPwNOEAE8zANDvGCM5/d8mIyi6luTV9ltnaGgP\r
31         EugnIo2Sl+uWe4Mf8bFSMKmYrq1SjkOwm4XsqRrjRYc06MH7SnqwymEYa8TjjQILw8ZC\r
32         0RsUdkRpH6CwEuUrGVGtdVwjyeEhBmlgKzgfInb3Qrza01SQRrgevpLZwtfd6CMd1QyG\r
33         Xzlk7ndgP4OrV8nPSMiGvCcq/3yY0TACb+KJOBoUd7eY40pnKpkak3hMPrPtIZmQvhak\r
34         VPFzxEQvKo1S1n13rzkoYtegeLZnzfr/F4KPtzlDBMS1y7c3qEWHDMPbpFJW1D72DVTc\r
35         dZxg==\r
36 X-Gm-Message-State:\r
37  ALoCoQk1LneNBp3ek1Ec2YiI55vncAzIsJA1fmrYnUtagMlZZDd53cI5BoaUZ7LsYDOQZlVuzmUi\r
38 X-Received: by 10.194.60.104 with SMTP id g8mr40443510wjr.96.1425748365704;\r
39         Sat, 07 Mar 2015 09:12:45 -0800 (PST)\r
40 Received: from localhost (mobile-internet-bcee3b-76.dhcp.inet.fi.\r
41         [188.238.59.76])\r
42         by mx.google.com with ESMTPSA id ga8sm7414890wib.11.2015.03.07.09.12.44\r
43         (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
44         Sat, 07 Mar 2015 09:12:44 -0800 (PST)\r
45 From: Jani Nikula <jani@nikula.org>\r
46 To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org\r
47 Subject: Re: [PATCH 1/2] CLI: set up infrastructure to make path to\r
48         gpg     configurable.\r
49 In-Reply-To: <1418155271-23704-1-git-send-email-david@tethera.net>\r
50 References: <1418155271-23704-1-git-send-email-david@tethera.net>\r
51 User-Agent: Notmuch/0.19+74~g6aeef2e (http://notmuchmail.org) Emacs/24.4.1\r
52         (x86_64-pc-linux-gnu)\r
53 Date: Sat, 07 Mar 2015 19:13:04 +0200\r
54 Message-ID: <87fv9givdr.fsf@nikula.org>\r
55 MIME-Version: 1.0\r
56 Content-Type: text/plain\r
57 X-BeenThere: notmuch@notmuchmail.org\r
58 X-Mailman-Version: 2.1.13\r
59 Precedence: list\r
60 List-Id: "Use and development of the notmuch mail system."\r
61         <notmuch.notmuchmail.org>\r
62 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
63         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
64 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
65 List-Post: <mailto:notmuch@notmuchmail.org>\r
66 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
67 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
68         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
69 X-List-Received-Date: Sat, 07 Mar 2015 17:12:50 -0000\r
70 \r
71 On Tue, 09 Dec 2014, David Bremner <david@tethera.net> wrote:\r
72 > GMIME takes a path to gpg, but we hardcode that path.  In this commit\r
73 > we push hardcoding all the way up to the top level of a notmuch\r
74 > command, where we can later make it configurable.\r
75 \r
76 Mmmh, to be pedantic, this does not push the hardcoding to the top\r
77 level, since "gpg" still remains at the lowest level. But it allows\r
78 specifying the path at the top level. Which I think is fine.\r
79 \r
80 LGTM.\r
81 \r
82 \r
83 > ---\r
84 >  crypto.c         | 10 +++++-----\r
85 >  notmuch-client.h |  1 +\r
86 >  notmuch-reply.c  |  3 ++-\r
87 >  notmuch-show.c   |  3 ++-\r
88 >  4 files changed, 10 insertions(+), 7 deletions(-)\r
89 >\r
90 > diff --git a/crypto.c b/crypto.c\r
91 > index 6f4a6db..026640f 100644\r
92 > --- a/crypto.c\r
93 > +++ b/crypto.c\r
94 > @@ -24,12 +24,12 @@\r
95 >  \r
96 >  /* Create a GPG context (GMime 2.6) */\r
97 >  static notmuch_crypto_context_t *\r
98 > -create_gpg_context (void)\r
99 > +create_gpg_context (const char *gpgpath)\r
100 >  {\r
101 >      notmuch_crypto_context_t *gpgctx;\r
102 >  \r
103 >      /* TODO: GMimePasswordRequestFunc */\r
104 > -    gpgctx = g_mime_gpg_context_new (NULL, "gpg");\r
105 > +    gpgctx = g_mime_gpg_context_new (NULL, gpgpath ? gpgpath : "gpg");\r
106 >      if (! gpgctx)\r
107 >       return NULL;\r
108 >  \r
109 > @@ -43,13 +43,13 @@ create_gpg_context (void)\r
110 >  \r
111 >  /* Create a GPG context (GMime 2.4) */\r
112 >  static notmuch_crypto_context_t *\r
113 > -create_gpg_context (void)\r
114 > +create_gpg_context (const char* gpgpath)\r
115 >  {\r
116 >      GMimeSession *session;\r
117 >      notmuch_crypto_context_t *gpgctx;\r
118 >  \r
119 >      session = g_object_new (g_mime_session_get_type (), NULL);\r
120 > -    gpgctx = g_mime_gpg_context_new (session, "gpg");\r
121 > +    gpgctx = g_mime_gpg_context_new (session, gpgpath ? gpgpath : "gpg");\r
122 >      g_object_unref (session);\r
123 >  \r
124 >      if (! gpgctx)\r
125 > @@ -83,7 +83,7 @@ notmuch_crypto_get_context (notmuch_crypto_t *crypto, const char *protocol)\r
126 >      if (strcasecmp (protocol, "application/pgp-signature") == 0 ||\r
127 >       strcasecmp (protocol, "application/pgp-encrypted") == 0) {\r
128 >       if (! crypto->gpgctx) {\r
129 > -         crypto->gpgctx = create_gpg_context ();\r
130 > +         crypto->gpgctx = create_gpg_context (crypto->gpgpath);\r
131 >           if (! crypto->gpgctx)\r
132 >               fprintf (stderr, "Failed to construct gpg context.\n");\r
133 >       }\r
134 > diff --git a/notmuch-client.h b/notmuch-client.h\r
135 > index 5e0d475..c25c4ea 100644\r
136 > --- a/notmuch-client.h\r
137 > +++ b/notmuch-client.h\r
138 > @@ -80,6 +80,7 @@ typedef struct notmuch_crypto {\r
139 >      notmuch_crypto_context_t* gpgctx;\r
140 >      notmuch_bool_t verify;\r
141 >      notmuch_bool_t decrypt;\r
142 > +    const char *gpgpath;\r
143 >  } notmuch_crypto_t;\r
144 >  \r
145 >  typedef struct notmuch_show_params {\r
146 > diff --git a/notmuch-reply.c b/notmuch-reply.c\r
147 > index 7c1c809..e18370f 100644\r
148 > --- a/notmuch-reply.c\r
149 > +++ b/notmuch-reply.c\r
150 > @@ -769,7 +769,8 @@ notmuch_reply_command (notmuch_config_t *config, int argc, char *argv[])\r
151 >       .part = -1,\r
152 >       .crypto = {\r
153 >           .verify = FALSE,\r
154 > -         .decrypt = FALSE\r
155 > +         .decrypt = FALSE,\r
156 > +         .gpgpath = NULL\r
157 >       }\r
158 >      };\r
159 >      int format = FORMAT_DEFAULT;\r
160 > diff --git a/notmuch-show.c b/notmuch-show.c\r
161 > index d416fbd..d292f29 100644\r
162 > --- a/notmuch-show.c\r
163 > +++ b/notmuch-show.c\r
164 > @@ -1082,7 +1082,8 @@ notmuch_show_command (notmuch_config_t *config, int argc, char *argv[])\r
165 >       .output_body = TRUE,\r
166 >       .crypto = {\r
167 >           .verify = FALSE,\r
168 > -         .decrypt = FALSE\r
169 > +         .decrypt = FALSE,\r
170 > +         .gpgpath = NULL\r
171 >       },\r
172 >       .include_html = FALSE\r
173 >      };\r
174 > -- \r
175 > 2.1.3\r
176 >\r
177 > _______________________________________________\r
178 > notmuch mailing list\r
179 > notmuch@notmuchmail.org\r
180 > http://notmuchmail.org/mailman/listinfo/notmuch\r