[CLI] bug in notmuch setup
authorPatrick Totzke <patricktotzke@gmail.com>
Sun, 5 May 2013 21:22:44 +0000 (22:22 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:54:38 +0000 (09:54 -0800)
ed/94bd64aa0535bcacec1f5fcf198ec988c0e9c5 [new file with mode: 0644]

diff --git a/ed/94bd64aa0535bcacec1f5fcf198ec988c0e9c5 b/ed/94bd64aa0535bcacec1f5fcf198ec988c0e9c5
new file mode 100644 (file)
index 0000000..861c67e
--- /dev/null
@@ -0,0 +1,136 @@
+Return-Path: <patricktotzke@gmail.com>\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 23C63431FBD\r
+       for <notmuch@notmuchmail.org>; Sun,  5 May 2013 14:22:56 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.799\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] 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 0hiKRaFue74T for <notmuch@notmuchmail.org>;\r
+       Sun,  5 May 2013 14:22:50 -0700 (PDT)\r
+Received: from mail-wi0-f175.google.com (mail-wi0-f175.google.com\r
+       [209.85.212.175]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 6AA1C431FAE\r
+       for <notmuch@notmuchmail.org>; Sun,  5 May 2013 14:22:50 -0700 (PDT)\r
+Received: by mail-wi0-f175.google.com with SMTP id h11so2004262wiv.2\r
+       for <notmuch@notmuchmail.org>; Sun, 05 May 2013 14:22:47 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+       h=x-received:content-type:mime-version:content-disposition:to\r
+       :message-id:from:user-agent:subject:date;\r
+       bh=/orZukd//0tucQ5/gtLbv3y3xc5XTymDMfRWxrCCiZM=;\r
+       b=s+4bLTc3SCPNlMba1+o4TYjBbLM+RSVVbALoAwQ63yt47ezbt17s4XiXVaGlEdgXlo\r
+       L3/CqlVPBsfW1ZD2t+sCM+UnjORhBhVRwihHiG01KK/uaI6yvH9uSc9zllSCF09OWVkp\r
+       1dANcpHkDF7f2feuwU6MvF0wl2letWlDH4kLgW13eJ7WtZfd0dfjzriWn3qgAotjJgQK\r
+       t8SrLo+4oZV+SHE4Ezkvq6Ehh2FOTXh/nKCRxIFY99sO10/A2u5k2hTUdtbdFhFKEwDr\r
+       lGE1v11vryyIzgj0BOg90Se+wqMiXTh17smpQAo7GigEXVf9t87BKv0QuIGxq/gJNiI1\r
+       mlfA==\r
+X-Received: by 10.180.206.204 with SMTP id lq12mr5808741wic.30.1367788967815; \r
+       Sun, 05 May 2013 14:22:47 -0700 (PDT)\r
+Received: from localhost (cpc14-sgyl28-2-0-cust332.18-2.cable.virginmedia.com.\r
+       [82.39.85.77])\r
+       by mx.google.com with ESMTPSA id m13sm3737860wiw.7.2013.05.05.14.22.46\r
+       for <notmuch@notmuchmail.org>\r
+       (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+       Sun, 05 May 2013 14:22:47 -0700 (PDT)\r
+Content-Type: multipart/signed; protocol="application/pgp-signature";\r
+       micalg="pgp-sha1"; boundary="===============6540599420040082609=="\r
+MIME-Version: 1.0\r
+Content-Disposition: inline\r
+To: notmuch@notmuchmail.org\r
+Message-ID: <20130505212244.13465.1871@brick>\r
+From: Patrick Totzke <patricktotzke@gmail.com>\r
+User-Agent: alot/0.3.4\r
+Subject: [CLI] bug in notmuch setup\r
+Date: Sun, 05 May 2013 22:22:44 +0100\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: Sun, 05 May 2013 21:22:56 -0000\r
+\r
+--===============6540599420040082609==\r
+Content-Type: text/plain; charset="utf-8"\r
+MIME-Version: 1.0\r
+Content-Transfer-Encoding: quoted-printable\r
+\r
+Hi all,\r
+\r
+As mentioned on IRC earlier, current master seems to have an issue with `no=\r
+tmuch setup`,\r
+which fails to write ~/.notmuch-config if not already present.\r
+\r
+Here are excerpts from the discussion from #notmuch:\r
+--------------------------------------%<-----------------------------------=\r
+----\r
+19:08:29 <pazz> i have no notmuch config so far. when i run `notmuch` i get=\r
+ questioned about my name and so forth. =\r
+\r
+                then:\r
+19:08:31 <pazz> Error canonicalizing /home/pazz/.notmuch-config: No such fi=\r
+le or directory\r
+19:14:01 <bremner> it could also be a bug. There was some change recently t=\r
+o avoid overwriting symlinks with files.\r
+19:15:29 <bremner> pazz: I think you found a bug. try "touch .notmuch-confi=\r
+g" and run notmuch-setup again.\r
+19:21:54 <pazz> bremner: i'm a little confused because i thought i'd done t=\r
+hat already. anyway: notmuch setup =\r
+\r
+                fails iff there is no ~/.notmuch-config present.\r
+19:22:38 <pazz> if there is an empty file notmuch setup runs ok, exit code =\r
+is 0 and the file gets overwritten\r
+...\r
+19:43:55 <Domo_> Error canonicalizing /home/too/.notmuch-config: No such fi=\r
+le or directory\r
+19:46:52 <Domo_> apparently realpath(3) fails in case there is no such file=\r
+ ;/\r
+19:50:50 <pazz> forgot to mention: i'm on 0.15.2+85~g44fe1f2d\r
+19:52:55 <bremner> yeah, the offending patch is +79, I think\r
+19:53:25 <Domo_> the reason is obvious .. notmuch_config_save() executes   =\r
+  filename =3D realpath\r
+                 (config->filename, NULL);\r
+19:53:53 <Domo_> maybe just additionally checking for ENOENT could fix that=\r
+...\r
+19:57:20 <bremner> sounds plausible. Have to double check we are not relyin=\r
+g on some implicit re-allocation by =\r
+\r
+                   realpath.\r
+19:58:41 <Domo_> true: free (filename) needs not to be done in case realpat=\r
+h() fails with ENOENT\r
+\r
+-------------------------------------->%-----------------------------------=\r
+----\r
+\r
+Best,\r
+/p\r
+\r
+--===============6540599420040082609==\r
+MIME-Version: 1.0\r
+Content-Transfer-Encoding: 7bit\r
+Content-Description: signature\r
+Content-Type: application/pgp-signature; name="signature.asc"; charset="us-ascii"\r
+\r
+-----BEGIN PGP SIGNATURE-----\r
+Version: GnuPG v1.4.12 (GNU/Linux)\r
+\r
+iEYEABECAAYFAlGGzaQACgkQlDQDZ9fWxar2/QCfR9GUqp/LTmf+oFOhgrdlAyRO\r
+OkIAoJQGpZssIzRgckeBzybQ+xorHZuy\r
+=doKC\r
+-----END PGP SIGNATURE-----\r
+\r
+--===============6540599420040082609==--\r