--- /dev/null
+Return-Path: <david@tethera.net>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 6C86B6DE17F7\r
+ for <notmuch@notmuchmail.org>; Thu, 29 Oct 2015 04:00:37 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.097\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.097 tagged_above=-999 required=5 tests=[AWL=0.097]\r
+ autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id VW5nSeXgiDIQ for <notmuch@notmuchmail.org>;\r
+ Thu, 29 Oct 2015 04:00:35 -0700 (PDT)\r
+Received: from gitolite.debian.net (gitolite.debian.net [87.98.215.224])\r
+ by arlo.cworth.org (Postfix) with ESMTPS id 453676DE1804\r
+ for <notmuch@notmuchmail.org>; Thu, 29 Oct 2015 04:00:34 -0700 (PDT)\r
+Received: from remotemail by gitolite.debian.net with local (Exim 4.80)\r
+ (envelope-from <david@tethera.net>)\r
+ id 1ZrkUX-0008IX-Oi; Thu, 29 Oct 2015 10:31:33 +0000\r
+Received: (nullmailer pid 6016 invoked by uid 1000); Thu, 29 Oct 2015\r
+ 10:31:14 -0000\r
+From: David Bremner <david@tethera.net>\r
+To: notmuch@notmuchmail.org\r
+Subject: [Frederic Bonnard] Bug#803363: [PATCH] notmuch: workaround for FTBFS\r
+User-Agent: Notmuch/0.21~rc3+7~g10e933a (http://notmuchmail.org) Emacs/24.5.1\r
+ (x86_64-pc-linux-gnu)\r
+Date: Thu, 29 Oct 2015 07:31:14 -0300\r
+Message-ID: <8737wu6k5p.fsf@zancas.localnet>\r
+MIME-Version: 1.0\r
+Content-Type: multipart/mixed; boundary="=-=-="\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.20\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <https://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: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Thu, 29 Oct 2015 11:00:37 -0000\r
+\r
+--=-=-=\r
+Content-Type: text/plain\r
+\r
+\r
+opinions? Shall I apply this in 0.21?\r
+\r
+\r
+\r
+\r
+--=-=-=\r
+Content-Type: message/rfc822\r
+Content-Disposition: inline\r
+Content-Transfer-Encoding: 8bit\r
+\r
+Return-path: <bounces+20151029-bremner=debian.org@packages.qa.debian.org>\r
+Envelope-to: david@tethera.net\r
+Delivery-date: Thu, 29 Oct 2015 06:33:11 -0300\r
+Received: from quantz.debian.org ([5.153.231.28])\r
+ by yantan.tethera.net with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128)\r
+ (Exim 4.80)\r
+ (envelope-from <bounces+20151029-bremner=debian.org@packages.qa.debian.org>)\r
+ id 1Zrja2-0007Yj-SC\r
+ for david@tethera.net; Thu, 29 Oct 2015 06:33:11 -0300\r
+Received: from qa by quantz.debian.org with local (Exim 4.84)\r
+ (envelope-from <bounces+20151029-bremner=debian.org@packages.qa.debian.org>)\r
+ id 1Zrja0-0006wn-Mc\r
+ for david@tethera.net; Thu, 29 Oct 2015 09:33:08 +0000\r
+Received: from buxtehude.debian.org ([140.211.166.26]) from C=NA,ST=NA,\r
+ L=Ankh Morpork,O=Debian SMTP,OU=Debian SMTP CA,CN=buxtehude.debian.org,\r
+ EMAIL=hostmaster@buxtehude.debian.org (verified) by quantz.debian.org with\r
+ esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84)\r
+ (envelope-from <debbugs@buxtehude.debian.org>) id 1Zrja0-0006vG-4N for\r
+ notmuch@packages.qa.debian.org; Thu, 29 Oct 2015 09:33:08 +0000\r
+Received: from debbugs by buxtehude.debian.org with local (Exim 4.84)\r
+ (envelope-from <debbugs@buxtehude.debian.org>) id 1ZrjZy-0004Xs-6i; Thu,\r
+ 29 Oct 2015 09:33:06 +0000\r
+X-Loop: owner@bugs.debian.org\r
+Subject: Bug#803363: [PATCH] notmuch: workaround for FTBFS\r
+Reply-To: Frederic Bonnard <frederic@fr.ibm.com>, 803363@bugs.debian.org\r
+Resent-From: Frederic Bonnard <frederic@fr.ibm.com>\r
+Resent-To: debian-bugs-dist@lists.debian.org\r
+Resent-CC: Carl Worth <cworth@debian.org>\r
+X-Loop: owner@bugs.debian.org\r
+Resent-Date: Thu, 29 Oct 2015 09:33:02 +0000\r
+Resent-Message-ID: <handler.803363.B.144611105616905@bugs.debian.org>\r
+X-Debian-PR-Message: report 803363\r
+X-Debian-PR-Package: src:notmuch\r
+X-Debian-PR-Keywords: patch\r
+X-Debian-PR-Source: notmuch\r
+Received: via spool by submit@bugs.debian.org id=B.144611105616905 (code\r
+ B); Thu, 29 Oct 2015 09:33:02 +0000\r
+Received: (at submit) by bugs.debian.org; 29 Oct 2015 09:30:56 +0000\r
+X-Spam-Checker-Version: SpamAssassin 3.4.0-bugs.debian.org_2005_01_02\r
+ (2014-02-07) on buxtehude.debian.org\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-3.9 required=4.0 tests=BAYES_00,MURPHY_DRUGS_REL8,\r
+ RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H2,RP_MATCHES_RCVD,SPF_PASS autolearn=no\r
+ autolearn_force=no version=3.4.0-bugs.debian.org_2005_01_02\r
+X-Spam-Bayes: score:0.0000 Tokens: new, 34; hammy, 150; neutral, 90;\r
+ spammy, 0. spammytokens: hammytokens:0.000-+--Usertags, 0.000-+--ppc64el,\r
+ 0.000-+--sourceversion, 0.000-+--source-version, 0.000-+--SourceVersion\r
+Received: from e06smtp05.uk.ibm.com ([195.75.94.101]) by\r
+ buxtehude.debian.org with esmtps (TLS1.0:RSA_CAMELLIA_256_CBC_SHA1:256)\r
+ (Exim 4.84) (envelope-from <frederic@fr.ibm.com>) id 1ZrjXr-0004OF-Up for\r
+ submit@bugs.debian.org; Thu, 29 Oct 2015 09:30:56 +0000\r
+Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP\r
+ Gateway: Authorized Use Only! Violators will be prosecuted for\r
+ <submit@bugs.debian.org> from <frederic@fr.ibm.com>; Thu, 29 Oct 2015\r
+ 09:30:47 -0000\r
+Received: from d06dlp01.portsmouth.uk.ibm.com (9.149.20.13) by\r
+ e06smtp05.uk.ibm.com (192.168.101.135) with IBM ESMTP SMTP Gateway:\r
+ Authorized Use Only! Violators will be prosecuted; Thu, 29 Oct 2015\r
+ 09:30:44 -0000\r
+X-Ibm-Helo: d06dlp01.portsmouth.uk.ibm.com\r
+X-Ibm-Mailfrom: frederic@fr.ibm.com\r
+X-Ibm-Rcptto: submit@bugs.debian.org\r
+Received: from b06cxnps4075.portsmouth.uk.ibm.com\r
+ (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by\r
+ d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id 11C0017D8069 for\r
+ <submit@bugs.debian.org>; Thu, 29 Oct 2015 09:30:57 +0000 (GMT)\r
+Received: from d06av11.portsmouth.uk.ibm.com\r
+ (d06av11.portsmouth.uk.ibm.com [9.149.37.252]) by\r
+ b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id\r
+ t9T9Uiaf10879262 for <submit@bugs.debian.org>; Thu, 29 Oct 2015 09:30:44\r
+ GMT\r
+Received: from d06av11.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by\r
+ d06av11.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP\r
+ id t9T9Uif6012102 for <submit@bugs.debian.org>; Thu, 29 Oct 2015 03:30:44\r
+ -0600\r
+Received: from smtp.lab.toulouse-stg.fr.ibm.com\r
+ (srv01.lab.toulouse-stg.fr.ibm.com [9.101.4.1]) by\r
+ d06av11.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id\r
+ t9T9UiKX012084 for <submit@bugs.debian.org>; Thu, 29 Oct 2015 03:30:44\r
+ -0600\r
+Received: from debian.fdz.fr (kin.test.toulouse-stg.fr.ibm.com\r
+ [9.101.18.11]) by smtp.lab.toulouse-stg.fr.ibm.com (Postfix) with ESMTP id\r
+ 0B4A422038C for <submit@bugs.debian.org>; Thu, 29 Oct 2015 10:30:44 +0100\r
+ (CET)\r
+Received: from localhost (localhost [IPv6:::1]) by debian.fdz.fr (Postfix)\r
+ with ESMTP id EDEB32AE8C for <submit@bugs.debian.org>; Thu, 29 Oct 2015\r
+ 10:29:59 +0100 (CET)\r
+Date: Thu, 29 Oct 2015 10:29:59 +0100\r
+Message-ID: <20151029102959.GC32083@kin.test.toulouse-stg.fr.ibm.com>\r
+From: Frederic Bonnard <frederic@fr.ibm.com>\r
+To: submit@bugs.debian.org\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=utf-8\r
+Content-Disposition: inline\r
+Content-Transfer-Encoding: 8bit\r
+X-TM-As-MML: disable\r
+X-Content-Scanned: Fidelis XPS MAILER\r
+X-Cbid: 15102909-0021-0000-0000-000004A37092\r
+Delivered-To: submit@bugs.debian.org\r
+Delivered-To: notmuch@packages.qa.debian.org\r
+Precedence: list\r
+X-Loop: notmuch@packages.qa.debian.org\r
+X-Debian: PTS\r
+X-Debian-Package: notmuch\r
+X-PTS-Package: notmuch\r
+X-PTS-Keyword: bts\r
+List-ID: <notmuch.bts.packages.qa.debian.org>\r
+List-Unsubscribe: <mailto:pts@qa.debian.org?body=unsubscribe%20notmuch>\r
+\r
+Source: notmuch\r
+Source-Version: 0.21~rc3-3\r
+Tags: patch\r
+User: debian-powerpc@lists.debian.org\r
+Usertags: ppc64el \r
+\r
+--\r
+\r
+Hi,\r
+on ppc64el, there is a FTBFS on this version since 0.20.2-2 due a test\r
+failing (070).\r
+This is due to the fact that the test is using a breakpoint on the function\r
+notmuch_database_add_message so that it can force a return code and check\r
+the exit code of the binary is the one injected, but for some reason, gdb\r
+fails to trap that function : the breakpoint does not interrupt the program.\r
+In the early days, this was known because of the ABIv2 that makes a function\r
+have a Local Entry Point and a Global Entry Point.\r
+And gdb placed a breakpoint on notmuch_database_add_message, on the address\r
+off the GEP, and in some case you only get through the LEP, and then\r
+the breakpoint is not called.\r
+For reference : https://sourceware.org/ml/gdb-patches/2014-01/msg01013.html\r
+This should be fixed in gdb now, but it seems there's an issue on that.\r
+So the workaround for the moment is to place a 2nd breakpoint on the LEP,\r
+which is at the address of notmuch_database_add_message + 8.\r
+On other architectures, this won't cause trouble as the first one will be\r
+activated and return with the forced exit code will be done.\r
+So notmuch is not broken, but there is something wrong with gdb, and\r
+in the meantime, I need to check with gdb what's going on.\r
+F.\r
+\r
+---\r
+Index: sources-notmuch/0.21~rc3-3/test/T070-insert.sh\r
+===================================================================\r
+--- sources-notmuch/0.21~rc3-3/test/T070-insert.sh\r
++++ sources-notmuch/0.21~rc3-3/test/T070-insert.sh\r
+@@ -192,8 +192,9 @@\r
+ gen_insert_msg\r
+ cat <<EOF > index-file-$code.gdb\r
+ set breakpoint pending on\r
+ break notmuch_database_add_message\r
++break *notmuch_database_add_message+8\r
+ commands\r
+ return NOTMUCH_STATUS_$code\r
+ continue\r
+ end\r
+\r
+\r
+--=-=-=--\r