Skip to content

Commit 6346a15

Browse files
authored
Update and simply SO versioning policy (AcademySoftwareFoundation#339)
This mirrors OpenEXR PR [1498](AcademySoftwareFoundation/openexr#1498). This change retires the "libtool" versioning scheme and adopts a policy of appending the MAJOR.MINOR.PATCH software release name to the SONAME to form the real name of the shared library. The SOVERSION is specified via the OPENEXR_LIB_SOVERSION setting in CMakeLists.txt and is the single number that increments whenever, and only when, the ABI changes in non-backwards-compatible ways. In practice, this corresponds to major and minor releases. The resulting real shared library file names look like, for example, libOpenEXR.so.31.3.2.0, where libOpenEXR.so.31 is the SONAME and .3.2.0 identifies the corresponding software release. This naming scheme helps reinforce the correspondence between the shared library's real file name and the software release it corresponds to, more so than would be indicated by a single increasing number. By OpenEXR project policy and discussion of the technical steering committee, the additional versioning information in the libtool versioning scheme is too confusing and error-prone to follow, without offering additional practical benefit. Documentation is in CMakeLists.txt and in docs/install.rst. Signed-off-by: Cary Phillips <[email protected]>
1 parent 03988b7 commit 6346a15

File tree

2 files changed

+16
-47
lines changed

2 files changed

+16
-47
lines changed

CMakeLists.txt

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -21,28 +21,17 @@ set(IMATH_VERSION_RELEASE_TYPE "-dev" CACHE STRING "Extra version tag string for
2121
set(IMATH_VERSION ${Imath_VERSION})
2222
set(IMATH_VERSION_API "${Imath_VERSION_MAJOR}_${Imath_VERSION_MINOR}")
2323

24-
# Library/shared-object version using libtool versioning policy.
25-
# See https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
24+
# The SOVERSION (i.e. numerical component of SONAME) tracks the ABI
25+
# version. Increment this number whenever, and only when, the ABI changes in
26+
# non-backwards-compatible ways.
2627
#
27-
# Library API version (CMake's library VERSION attribute) is of the
28-
# form CURRENT.REVISION.AGE; the CMake SOVERSION attribute corresonds
29-
# to just CURRENT. These produce a .so and a symlink symlink, e.g.:
30-
# libImath-3_1.so.29 -> libImath-3_1.so.29.0.0
31-
# ^ ^ ^ ^
32-
# | | | |
33-
# CURRENT | | AGE
34-
# | REVISION
35-
# CURRENT
36-
# When updating:
37-
# 1. no API change: CURRENT.REVISION+1.AGE
38-
# 2. API added: CURRENT+1.0.AGE+1
39-
# 3. API changed: CURRENT+1.0.0
40-
#
41-
set(IMATH_LIBTOOL_CURRENT 29)
42-
set(IMATH_LIBTOOL_REVISION 0)
43-
set(IMATH_LIBTOOL_AGE 0)
44-
set(IMATH_LIB_VERSION "${IMATH_LIBTOOL_CURRENT}.${IMATH_LIBTOOL_REVISION}.${IMATH_LIBTOOL_AGE}")
45-
set(IMATH_LIB_SOVERSION ${IMATH_LIBTOOL_CURRENT})
28+
# The OpenEXR project policy is to append the library version
29+
# "major.minor.patch" to the SONAME to form the real shared library name.
30+
# For example, in "libImath.so.31.3.2.0", "libImath.so.31" is the SONAME
31+
# and ".3.2.0" identifies the corresponding library release.
32+
33+
set(IMATH_LIB_SOVERSION 30)
34+
set(IMATH_LIB_VERSION "${IMATH_LIB_SOVERSION}.${IMATH_VERSION}") # e.g. "30.3.2.0"
4635

4736
# ImathSetup.cmake declares all the configuration variables visible
4837
# in cmake-gui or similar and the rest of the global

CONTRIBUTING.md

Lines changed: 6 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ explains our contribution process and procedures:
1010
* [Legal Requirements](#Legal-Requirements)
1111
* [Development Workflow](#Development-Workflow)
1212
* [Coding Style](#Coding-Style)
13-
* [Versioning Policy](#Versioning-Policy)
14-
* [Creating a Release](#Creating-a-Release)
13+
* [Versioning Policy and Release Process](#Versioning-Policy-and-Release-Process)
1514

1615
Imath is a sub-project of
1716
[OpenEXR](https://github.com/AcademySoftwareFoundation/openexr) and
@@ -316,7 +315,7 @@ library.
316315

317316
The test should should be run, via:
318317

319-
make test
318+
% make test
320319

321320
before submitting a pull request.
322321

@@ -422,28 +421,9 @@ For public APIs, use Doxygen-style comments (start with `///`), such as:
422421
float foo; ///< Doxygen comments on same line look like this
423422
}
424423

425-
## Versioning Policy
424+
## Versioning Policy and Release Process
426425

427-
Imath uses [semantic versioning](https://semver.org), which labels
428-
each version with three numbers: ``major.minor.patch``, where:
429-
430-
* ``major`` - indicates incompatible API changes
431-
* ``minor`` - indicates functionality added in a backwards-compatible manner
432-
* ``patch`` - indicates backwards-compatible bug fixes
433-
434-
## Creating a Release
435-
436-
To create a new release from the ``main`` branch:
437-
438-
1. Update the release notes in ``CHANGES.md``.
439-
440-
Write a high-level summary of the features and
441-
improvements. Include the summary in ``CHANGES.md`` and also in the
442-
Release comments.
443-
444-
Include the log of all PR's included beyond the previous release.
445-
446-
2. Create a new release on the GitHub Releases page.
447-
448-
3. Tag the release with name beginning with ``v``', e.g. ``v2.3.0``.
426+
Imath follows the same policy and release process at OpenEXR. See the
427+
OpenEXR
428+
[CONTRIBUTING.md](https://github.com/AcademySoftwareFoundation/openexr/CONTRIBUTING.md) for the details.
449429

0 commit comments

Comments
 (0)