[PATCH 1/3] lib: Make VERSION macros agree with soname version
authorAustin Clements <amdragon@MIT.EDU>
Wed, 4 Dec 2013 16:19:44 +0000 (11:19 +1900)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:58:36 +0000 (09:58 -0800)
8a/4ae8b0ba089d8520033ba5b5cdb581a010dc5c [new file with mode: 0644]

diff --git a/8a/4ae8b0ba089d8520033ba5b5cdb581a010dc5c b/8a/4ae8b0ba089d8520033ba5b5cdb581a010dc5c
new file mode 100644 (file)
index 0000000..c13a7d8
--- /dev/null
@@ -0,0 +1,130 @@
+Return-Path: <amdragon@mit.edu>\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 ED8F9431FC4\r
+       for <notmuch@notmuchmail.org>; Wed,  4 Dec 2013 08:20:07 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[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 z7kkQhYJt7uA for <notmuch@notmuchmail.org>;\r
+       Wed,  4 Dec 2013 08:20:02 -0800 (PST)\r
+Received: from dmz-mailsec-scanner-8.mit.edu (dmz-mailsec-scanner-8.mit.edu\r
+       [18.7.68.37])\r
+       (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id D2E3B431FCB\r
+       for <notmuch@notmuchmail.org>; Wed,  4 Dec 2013 08:20:00 -0800 (PST)\r
+X-AuditID: 12074425-b7fd96d000000c39-7b-529f56308b3c\r
+Received: from mailhub-auth-1.mit.edu ( [18.9.21.35])\r
+       (using TLS with cipher AES256-SHA (256/256 bits))\r
+       (Client did not present a certificate)\r
+       by dmz-mailsec-scanner-8.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id 20.99.03129.0365F925; Wed,  4 Dec 2013 11:20:00 -0500 (EST)\r
+Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11])\r
+       by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id rB4GJv9B029964; \r
+       Wed, 4 Dec 2013 11:19:58 -0500\r
+Received: from drake.dyndns.org\r
+       (216-15-114-40.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com\r
+       [216.15.114.40]) (authenticated bits=0)\r
+       (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+       by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id rB4GJqmk001674\r
+       (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+       Wed, 4 Dec 2013 11:19:53 -0500\r
+Received: from amthrax by drake.dyndns.org with local (Exim 4.77)\r
+       (envelope-from <amdragon@mit.edu>)\r
+       id 1VoFB2-0002Vw-Iv; Wed, 04 Dec 2013 11:19:52 -0500\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 1/3] lib: Make VERSION macros agree with soname version\r
+Date: Wed,  4 Dec 2013 11:19:44 -0500\r
+Message-Id: <1386173986-9624-1-git-send-email-amdragon@mit.edu>\r
+X-Mailer: git-send-email 1.8.4.rc3\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFlrHIsWRmVeSWpSXmKPExsUixCmqrGsQNj/IYO9rDYsbrd2MFk3TnS2u\r
+       35zJ7MDscev+a3aPZ6tuMXtsOfSeOYA5issmJTUnsyy1SN8ugSvj2fwJrAUf+Cp6/59mbWCc\r
+       wtPFyMkhIWAicePUOyYIW0ziwr31bF2MXBxCArOZJP6/380K4WxglPhw8CY7hHObSaL5+leo\r
+       zFxGiY5d/cwg/WwCGhLb9i9nBLFFBKQldt6dzQpiMwt4SSy70A9mCwu4S6y5shloBwcHi4Cq\r
+       RP/nEpAwr4C9xNmzk5khzlCSWHhqG+sERt4FjAyrGGVTcqt0cxMzc4pTk3WLkxPz8lKLdC30\r
+       cjNL9FJTSjcxgoKF3UV1B+OEQ0qHGAU4GJV4eBXT5wUJsSaWFVfmHmKU5GBSEuUVDJ4fJMSX\r
+       lJ9SmZFYnBFfVJqTWnyIUYKDWUmEd3IgUI43JbGyKrUoHyYlzcGiJM57i8M+SEggPbEkNTs1\r
+       tSC1CCYrw8GhJMFrGwrUKFiUmp5akZaZU4KQZuLgBBnOAzRcFqSGt7ggMbc4Mx0if4pRUUqc\r
+       93AIUEIAJJFRmgfXC4vmV4ziQK8I82aAtPMAEwFc9yugwUxAg5sfzAMZXJKIkJJqYNz7usAp\r
+       ROv6wubc0ynr+0T7Ox4KRjPONkj5wuR0Yqk9b+HCIwYsUwvCBVnXvI+2P8Xzf1nehWf72XVm\r
+       6ZkuXd6xR8rNrKRw2+nzdZJqTTuC3WVcni7sSrsxfyrLzCqPOcYLmwVfZwgHBK0U99cQPqSm\r
+       cnKLw46CsM6pM5nUW1M/FBTtYL/6RImlOCPRUIu5qDgRAEPO98rBAgAA\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: Wed, 04 Dec 2013 16:20:08 -0000\r
+\r
+We have two distinct "library version" numbers: the soname version and\r
+the version macros.  We need both for different reasons: the version\r
+macros enable easy compile-time version detection (and conditional\r
+compilation), while the soname version enables runtime version\r
+detection (which includes the version checking done by things like the\r
+Python bindings).\r
+\r
+However, currently, these two version numbers are different, which is\r
+unnecessary and can lead to confusion (especially in things like\r
+Debian, which include the soname version in the package name).  This\r
+patch makes them the same by bumping the version macros up to agree\r
+with the soname version.\r
+\r
+(We should probably keep the version number in just one place so they\r
+can't get out of sync, but that can be done in another patch.)\r
+---\r
+ lib/Makefile.local | 3 +++\r
+ lib/notmuch.h      | 8 ++++++--\r
+ 2 files changed, 9 insertions(+), 2 deletions(-)\r
+\r
+diff --git a/lib/Makefile.local b/lib/Makefile.local\r
+index 155ac02..cd2c60d 100644\r
+--- a/lib/Makefile.local\r
++++ b/lib/Makefile.local\r
+@@ -18,6 +18,9 @@ LIBNOTMUCH_VERSION_MINOR = 0\r
+ # simply compatible changes to the implementation).\r
+ LIBNOTMUCH_VERSION_RELEASE = 0\r
\r
++# Note: Don't forget to change the VERSION macros in notmuch.h when\r
++# any of the above change.\r
++\r
+ ifeq ($(PLATFORM),MACOSX)\r
+ LIBRARY_SUFFIX = dylib\r
+ # On OS X, library version numbers go before suffix.\r
+diff --git a/lib/notmuch.h b/lib/notmuch.h\r
+index 7c3a30c..42188a8 100644\r
+--- a/lib/notmuch.h\r
++++ b/lib/notmuch.h\r
+@@ -41,8 +41,12 @@ NOTMUCH_BEGIN_DECLS\r
+ #define TRUE 1\r
+ #endif\r
\r
+-#define NOTMUCH_MAJOR_VERSION 0\r
+-#define NOTMUCH_MINOR_VERSION 17\r
++/*\r
++ * The library version number.  This must agree with the soname\r
++ * version in Makefile.local.\r
++ */\r
++#define NOTMUCH_MAJOR_VERSION 3\r
++#define NOTMUCH_MINOR_VERSION 0\r
+ #define NOTMUCH_MICRO_VERSION 0\r
\r
+ /*\r
+-- \r
+1.8.4.rc3\r
+\r