Skip to content

Commit 423b6d1

Browse files
Merge #964: Add release-process.md
3ed0d02 doc: add CHANGELOG template (Jonas Nick) 6f42dc1 doc: add release_process.md (Jonas Nick) 0bd3e42 build: set library version to 0.0.0 explicitly (Jonas Nick) b4b02fd build: change libsecp version from 0.1 to 0.1.0-pre (Jonas Nick) Pull request description: This is an attempt at a simple release process. Fixes #856. To keep it simple, there is no concept of release candidates for now. The release version is determined by semantic versioning of the API. Since it does not seem to be a lot of work, it is proper to also version the ABI with the libtool versioning system. This versioning scheme (semver API, libtool versioning ABI) follows the suggestion in the [autotools mythbusters](https://autotools.io/libtool/version.html). Experimental modules are a bit of a headache, as expected. This release process suggests to treat any change in experimental modules as backwards compatible. That way, users of stable modules are not bothered by frequent non-backwards compatible releases. But a downside is that one must not use experimental modules in shared libraries (which should be mentioned in the README?). It would be nice if we could make the schnorrsig module stable in the not too distant future (see also #817). ACKs for top commit: apoelstra: utACK 3ed0d02 elichai: ACK 3ed0d02 sipa: ACK 3ed0d02 real-or-random: ACK 3ed0d02 Tree-SHA512: 25a04335a9579e16de48d378b93a9c6a248529f67f7c436680fa2d495192132743ce016c547aa9718cdcc7fe932de31dd7594f49052e8bd85572a84264f2dbee
2 parents 9281c9f + 3ed0d02 commit 423b6d1

File tree

4 files changed

+50
-2
lines changed

4 files changed

+50
-2
lines changed

Makefile.am

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ endif
8888
libsecp256k1_la_SOURCES = src/secp256k1.c
8989
libsecp256k1_la_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src $(SECP_INCLUDES)
9090
libsecp256k1_la_LIBADD = $(SECP_LIBS) $(COMMON_LIB) $(PRECOMPUTED_LIB)
91-
libsecp256k1_la_LDFLAGS = -no-undefined
91+
libsecp256k1_la_LDFLAGS = -no-undefined -version-info $(LIB_VERSION_CURRENT):$(LIB_VERSION_REVISION):$(LIB_VERSION_AGE)
9292

9393
if VALGRIND_ENABLED
9494
libsecp256k1_la_CPPFLAGS += -DVALGRIND

configure.ac

+23-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
AC_PREREQ([2.60])
2-
AC_INIT([libsecp256k1],[0.1])
2+
3+
# The package (a.k.a. release) version is based on semantic versioning 2.0.0 of
4+
# the API. All changes in experimental modules are treated as
5+
# backwards-compatible and therefore at most increase the minor version.
6+
define(_PKG_VERSION_MAJOR, 0)
7+
define(_PKG_VERSION_MINOR, 1)
8+
define(_PKG_VERSION_BUILD, 0)
9+
define(_PKG_VERSION_IS_RELEASE, false)
10+
11+
# The library version is based on libtool versioning of the ABI. The set of
12+
# rules for updating the version can be found here:
13+
# https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
14+
# All changes in experimental modules are treated as if they don't affect the
15+
# interface and therefore only increase the revision.
16+
define(_LIB_VERSION_CURRENT, 0)
17+
define(_LIB_VERSION_REVISION, 0)
18+
define(_LIB_VERSION_AGE, 0)
19+
20+
AC_INIT([libsecp256k1],m4_join([.], _PKG_VERSION_MAJOR, _PKG_VERSION_MINOR, _PKG_VERSION_BUILD)m4_if(_PKG_VERSION_IS_RELEASE, [true], [], [-pre]),[https://github.com/bitcoin-core/secp256k1/issues],[libsecp256k1],[https://github.com/bitcoin-core/secp256k1])
21+
322
AC_CONFIG_AUX_DIR([build-aux])
423
AC_CONFIG_MACRO_DIR([build-aux/m4])
524
AC_CANONICAL_HOST
@@ -381,6 +400,9 @@ AM_CONDITIONAL([ENABLE_MODULE_EXTRAKEYS], [test x"$enable_module_extrakeys" = x"
381400
AM_CONDITIONAL([ENABLE_MODULE_SCHNORRSIG], [test x"$enable_module_schnorrsig" = x"yes"])
382401
AM_CONDITIONAL([USE_EXTERNAL_ASM], [test x"$use_external_asm" = x"yes"])
383402
AM_CONDITIONAL([USE_ASM_ARM], [test x"$set_asm" = x"arm"])
403+
AC_SUBST(LIB_VERSION_CURRENT, _LIB_VERSION_CURRENT)
404+
AC_SUBST(LIB_VERSION_REVISION, _LIB_VERSION_REVISION)
405+
AC_SUBST(LIB_VERSION_AGE, _LIB_VERSION_AGE)
384406

385407
# Make sure nothing new is exported so that we don't break the cache.
386408
PKGCONFIG_PATH_TEMP="$PKG_CONFIG_PATH"

doc/CHANGELOG.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Changelog
2+
3+
This file is currently only a template for future use.
4+
5+
Each change falls into one of the following categories: Added, Changed, Deprecated, Removed, Fixed or Security.
6+
7+
## [Unreleased]
8+
9+
## [MAJOR.MINOR.PATCH] - YYYY-MM-DD
10+
11+
### Added/Changed/Deprecated/Removed/Fixed/Security
12+
- [Title with link to Pull Request](https://link-to-pr)

doc/release-process.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Release Process
2+
3+
1. Open PR to master that
4+
1. adds release notes to `doc/CHANGELOG.md` and
5+
2. if this is **not** a patch release, updates `_PKG_VERSION_{MAJOR,MINOR}` and `_LIB_VERSIONS_*` in `configure.ac`
6+
2. After the PR is merged,
7+
* if this is **not** a patch release, create a release branch with name `MAJOR.MINOR`.
8+
Make sure that the branch contains the right commits.
9+
Create commit on the release branch that sets `_PKG_VERSION_IS_RELEASE` in `configure.ac` to `true`.
10+
* if this **is** a patch release, open a pull request with the bugfixes to the `MAJOR.MINOR` branch.
11+
Also include the release note commit bump `_PKG_VERSION_BUILD` and `_LIB_VERSIONS_*` in `configure.ac`.
12+
4. Tag the commit with `git tag -s vMAJOR.MINOR.PATCH`.
13+
5. Push branch and tag with `git push origin --tags`.
14+
6. Create a new GitHub release with a link to the corresponding entry in `doc/CHANGELOG.md`.

0 commit comments

Comments
 (0)