From patchwork Wed Apr 26 23:08:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Stringer X-Patchwork-Id: 755687 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wCwql3WQHz9s7y for ; Thu, 27 Apr 2017 09:13:39 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id C2367B92; Wed, 26 Apr 2017 23:08:19 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 62F7B982 for ; Wed, 26 Apr 2017 23:08:16 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 6BC33106 for ; Wed, 26 Apr 2017 23:08:14 +0000 (UTC) Received: from mfilter21-d.gandi.net (mfilter21-d.gandi.net [217.70.178.149]) by relay2-d.mail.gandi.net (Postfix) with ESMTP id 3A668C5A43; Thu, 27 Apr 2017 01:08:13 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter21-d.gandi.net Received: from relay2-d.mail.gandi.net ([IPv6:::ffff:217.70.183.194]) by mfilter21-d.gandi.net (mfilter21-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id RBKZjXFC_XMR; Thu, 27 Apr 2017 01:08:11 +0200 (CEST) X-Originating-IP: 208.91.1.34 Received: from carno.eng.vmware.com (unknown [208.91.1.34]) (Authenticated sender: joe@ovn.org) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 6CD73C5A4F; Thu, 27 Apr 2017 01:08:10 +0200 (CEST) From: Joe Stringer To: dev@openvswitch.org Date: Wed, 26 Apr 2017 16:08:02 -0700 Message-Id: <20170426230803.13527-2-joe@ovn.org> X-Mailer: git-send-email 2.11.1 In-Reply-To: <20170426230803.13527-1-joe@ovn.org> References: <20170426230803.13527-1-joe@ovn.org> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [RFC 1/2] libopenvswitch: Rename to libfoo-X.Y. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org The current intent for Open vSwitch is to maintain libopenvswitch ABI stability for minor versions, for example each release within the 2.7.z series. According to the following documentation, no changes to exported headers should be made. http://docs.openvswitch.org/en/latest/internals/contributing/libopenvswitch-abi/ However, it is occasionally necessary to make changes to {include/openvswitch,lib}/*.h headers to fix issues within a given release series. The current libtool tagging mechanism in the build system does not allow for this without creating a conflict between the libtool 'current' version and the next minor release of OVS. This patch modifies libopenvswitch build to include the MAJOR.MINOR release version in the libX name, and include the libtool CURRENT and OVS MICRO release in the libtool versioning tags to indicate library stability. The resulting format is "libfoo-X.Y.so.CURRENT.0.Z" for OVS release "X.Y.Z". Developers should still attempt to avoid introducing ABI-breaking changes within a particular OVS-X.Y release series, but if this is not possible this patch introduced a mechanism to allow an ABI-breaking fix to be introduced. In such a case, developers may update the libtool CURRENT version to indicate this breakage to library users. Signed-off-by: Joe Stringer --- .../internals/contributing/libopenvswitch-abi.rst | 16 +++++++++------- m4/openvswitch.m4 | 6 +++--- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/Documentation/internals/contributing/libopenvswitch-abi.rst b/Documentation/internals/contributing/libopenvswitch-abi.rst index 845d90898859..8fa24db964cd 100644 --- a/Documentation/internals/contributing/libopenvswitch-abi.rst +++ b/Documentation/internals/contributing/libopenvswitch-abi.rst @@ -87,16 +87,18 @@ ABI Policy ---------- Open vSwitch will export the ABI version at the time of release, such that the -library name will be the major version, and the rest of the release version -information will be conveyed with a libtool interface version. +library name will be the major.minor version, and the rest of the release +version information will be conveyed with a libtool interface version. The intent is for Open vSwitch to maintain an ABI stability for each minor revision only (so that Open vSwitch release 2.5 carries a guarantee for all -2.5.ZZ micro-releases). This means that any porting effort to stable branches -must take not to disrupt the existing ABI. Each new 'minor-level' release -bumps the libtool 'current' version, which informs the linker of a backwards -incompatible interface, signaling that libraries exposed by Open vSwitch 2.6 -will not maintain ABI stability with Open vSwitch 2.5. +2.5.ZZ micro-releases). This means that any porting effort to stable branches +must take not to disrupt the existing ABI. + +In the event that a bug must be fixed in a backwards-incompatible way, +developers must bump the libtool 'current' version to inform the linker of the +ABI breakage. This will signal that libraries exposed by the subsequent release +will not maintain ABI stability with the previous version. Coding ------- diff --git a/m4/openvswitch.m4 b/m4/openvswitch.m4 index 48892f9f720e..648750ab5ad9 100644 --- a/m4/openvswitch.m4 +++ b/m4/openvswitch.m4 @@ -614,9 +614,9 @@ AC_DEFUN([OVS_LIBTOOL_VERSIONS], OVS_MAJOR=`echo "$PACKAGE_VERSION" | sed -e 's/[[.]].*//'` OVS_MINOR=`echo "$PACKAGE_VERSION" | sed -e "s/^$OVS_MAJOR//" -e 's/^.//' -e 's/[[.]].*//'` OVS_MICRO=`echo "$PACKAGE_VERSION" | sed -e "s/^$OVS_MAJOR.$OVS_MINOR//" -e 's/^.//' -e 's/[[^0-9]].*//'` - OVS_LT_RELINFO="-release $OVS_MAJOR" - OVS_LT_VERINFO="-version-info $OVS_MINOR:$OVS_MICRO" + OVS_LT_RELINFO="-release $OVS_MAJOR.$OVS_MINOR" + OVS_LT_VERINFO="-version-info $LT_CURRENT:$OVS_MICRO" OVS_LTINFO="$OVS_LT_RELINFO $OVS_LT_VERINFO" - AC_MSG_RESULT([libX-$OVS_MAJOR.so.$OVS_MINOR.0.$OVS_MICRO)]) + AC_MSG_RESULT([libX-$OVS_MAJOR.$OVS_MINOR.so.$LT_CURRENT.0.$OVS_MICRO)]) AC_SUBST(OVS_LTINFO) ])