From b2e297867a13855745e5495c75c10e23f627cc3e Mon Sep 17 00:00:00 2001 From: Jonas Nick Date: Fri, 3 Sep 2021 18:59:13 +0000 Subject: [PATCH 1/5] build: rename library libsecp256k1 -> libsecp256k1-zkp --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index cb1b7f58c..421ac2c51 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ AC_PREREQ([2.60]) -AC_INIT([libsecp256k1],[0.1]) +AC_INIT([libsecp256k1-zkp],[0.1]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_MACRO_DIR([build-aux/m4]) AC_CANONICAL_HOST From e646318a54c418a79ca769e3cf4557dea6dde600 Mon Sep 17 00:00:00 2001 From: Jonas Nick Date: Tue, 6 Jul 2021 21:23:33 +0000 Subject: [PATCH 2/5] build: change libsecp-zkp version from 0.1 to 0.1.0-pre --- configure.ac | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 421ac2c51..fccdaa140 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,14 @@ AC_PREREQ([2.60]) -AC_INIT([libsecp256k1-zkp],[0.1]) +# The package (a.k.a. release) version is based on semantic versioning 2.0.0 of +# the API. All changes in experimental modules are treated as +# backwards-compatible and therefore at most increase the minor version. +define(_PKG_VERSION_MAJOR, 0) +define(_PKG_VERSION_MINOR, 1) +define(_PKG_VERSION_BUILD, 0) +define(_PKG_VERSION_IS_RELEASE, false) + +AC_INIT([libsecp256k1-zkp],m4_join([.], _PKG_VERSION_MAJOR, _PKG_VERSION_MINOR, _PKG_VERSION_BUILD)m4_if(_PKG_VERSION_IS_RELEASE, [true], [], [-pre]),[https://github.com/ElementsProject/secp256k1-zkp/issues],[secp256k1-zkp],[https://github.com/ElementsProject/secp256k1-zkp]) + AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_MACRO_DIR([build-aux/m4]) AC_CANONICAL_HOST From b94f0b36c4d3c261c18ccbccbdaf37721894aa99 Mon Sep 17 00:00:00 2001 From: Jonas Nick Date: Tue, 6 Jul 2021 21:06:46 +0000 Subject: [PATCH 3/5] build: set library version to 0.0.0 explicitly --- Makefile.am | 1 + configure.ac | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/Makefile.am b/Makefile.am index fa455f979..a054c2a70 100644 --- a/Makefile.am +++ b/Makefile.am @@ -76,6 +76,7 @@ endif libsecp256k1_la_SOURCES = src/secp256k1.c libsecp256k1_la_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src $(SECP_INCLUDES) libsecp256k1_la_LIBADD = $(SECP_LIBS) $(COMMON_LIB) +libsecp256k1_la_LDFLAGS = -version-info $(LIB_VERSION_CURRENT):$(LIB_VERSION_REVISION):$(LIB_VERSION_AGE) if VALGRIND_ENABLED libsecp256k1_la_CPPFLAGS += -DVALGRIND diff --git a/configure.ac b/configure.ac index fccdaa140..4699d7422 100644 --- a/configure.ac +++ b/configure.ac @@ -7,6 +7,15 @@ define(_PKG_VERSION_MINOR, 1) define(_PKG_VERSION_BUILD, 0) define(_PKG_VERSION_IS_RELEASE, false) +# The library version is based on libtool versioning of the ABI. The set of +# rules for updating the version can be found here: +# https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html +# All changes in experimental modules are treated as if they don't affect the +# interface and therefore only increase the revision. +define(_LIB_VERSION_CURRENT, 0) +define(_LIB_VERSION_REVISION, 0) +define(_LIB_VERSION_AGE, 0) + AC_INIT([libsecp256k1-zkp],m4_join([.], _PKG_VERSION_MAJOR, _PKG_VERSION_MINOR, _PKG_VERSION_BUILD)m4_if(_PKG_VERSION_IS_RELEASE, [true], [], [-pre]),[https://github.com/ElementsProject/secp256k1-zkp/issues],[secp256k1-zkp],[https://github.com/ElementsProject/secp256k1-zkp]) AC_CONFIG_AUX_DIR([build-aux]) @@ -658,6 +667,9 @@ AM_CONDITIONAL([USE_EXTERNAL_ASM], [test x"$use_external_asm" = x"yes"]) AM_CONDITIONAL([USE_ASM_ARM], [test x"$set_asm" = x"arm"]) AM_CONDITIONAL([ENABLE_MODULE_SURJECTIONPROOF], [test x"$enable_module_surjectionproof" = x"yes"]) AM_CONDITIONAL([USE_REDUCED_SURJECTION_PROOF_SIZE], [test x"$use_reduced_surjection_proof_size" = x"yes"]) +AC_SUBST(LIB_VERSION_CURRENT, _LIB_VERSION_CURRENT) +AC_SUBST(LIB_VERSION_REVISION, _LIB_VERSION_REVISION) +AC_SUBST(LIB_VERSION_AGE, _LIB_VERSION_AGE) # Make sure nothing new is exported so that we don't break the cache. PKGCONFIG_PATH_TEMP="$PKG_CONFIG_PATH" From 707e72ba685f2bdb48df6de3c89c70a4eb956a1e Mon Sep 17 00:00:00 2001 From: Jonas Nick Date: Tue, 6 Jul 2021 21:07:03 +0000 Subject: [PATCH 4/5] doc: add release_process.md --- doc/release_process.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 doc/release_process.md diff --git a/doc/release_process.md b/doc/release_process.md new file mode 100644 index 000000000..2d20e290f --- /dev/null +++ b/doc/release_process.md @@ -0,0 +1,10 @@ +# Release Process + +1. Open PR that + 1. adds release notes to `doc/CHANGELOG.md` and + 2. updates `_PKG_VERSION_{MAJOR,MINOR,BUILD}` and `_LIB_VERSIONS_*` in `configure.ac` +2. After merge, create a release branch with name `MAJOR.MINOR.PATCH`. Make sure that the branch contains the right commits. +3. Create commit on the release branch that sets `_PKG_VERSION_IS_RELEASE` in `configure.ac` to `true`. +4. Tag the commit with `git tag -s vMAJOR.MINOR.PATCH`. +5. Push branch and tag with `git push origin --tags`. +6. Create a new GitHub release with a link to the corresponding entry in `doc/CHANGELOG.md`. From 6ab9dd6af702dc6920fe1528ced82b68de2f8aed Mon Sep 17 00:00:00 2001 From: Jonas Nick Date: Tue, 6 Jul 2021 21:51:36 +0000 Subject: [PATCH 5/5] doc: add CHANGELOG template --- doc/CHANGELOG.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 doc/CHANGELOG.md diff --git a/doc/CHANGELOG.md b/doc/CHANGELOG.md new file mode 100644 index 000000000..3c4c2e458 --- /dev/null +++ b/doc/CHANGELOG.md @@ -0,0 +1,12 @@ +# Changelog + +This file is currently only a template for future use. + +Each change falls into one of the following categories: Added, Changed, Deprecated, Removed, Fixed or Security. + +## [Unreleased] + +## [MAJOR.MINOR.PATCH] - YYYY-MM-DD + +### Added/Changed/Deprecated/Removed/Fixed/Security +- [Title with link to Pull Request](https://link-to-pr)