1*758e9fbaSOystein Eftevaag# Release Process: 2*758e9fbaSOystein EftevaagThis document describes the general process that maintainers must follow when making a release of the `tpm2-tss` libraries. 3*758e9fbaSOystein Eftevaag 4*758e9fbaSOystein Eftevaag# Version Numbers 5*758e9fbaSOystein EftevaagOur releases will follow the semantic versioning scheme. 6*758e9fbaSOystein EftevaagYou can find a thorough description of this scheme here: [http://semver.org/](http://semver.org/) 7*758e9fbaSOystein EftevaagIn short, this scheme has 3 parts to the version number: A.B.C 8*758e9fbaSOystein Eftevaag 9*758e9fbaSOystein Eftevaag* A is the 'major' version, incremented when an API incompatible change is made 10*758e9fbaSOystein Eftevaag* B is the 'minor' version, incremented when an API compatible change is made 11*758e9fbaSOystein Eftevaag* C is the 'micro' version, incremented for bug fix releases 12*758e9fbaSOystein EftevaagPlease refer to the [Semantic Versioning](http://semver.org/) website for the authoritative description. 13*758e9fbaSOystein Eftevaag 14*758e9fbaSOystein Eftevaag## Version String 15*758e9fbaSOystein EftevaagThe version string is set for the rest of the autotools bits by autoconf. 16*758e9fbaSOystein EftevaagAutoconf gets this string from the `AC_INIT` macro in the configure.ac file. 17*758e9fbaSOystein EftevaagOnce you decide on the next version number (using the scheme above) you must set it manually in configure.ac. 18*758e9fbaSOystein EftevaagThe version string must be in the form `A.B.C` where `A`, `B` and `C` are integers representing the major, minor and micro components of the version number. 19*758e9fbaSOystein Eftevaag 20*758e9fbaSOystein Eftevaag## Release Candidates 21*758e9fbaSOystein EftevaagIn the run up to a release the maintainers may create tags to identify progress toward the release. 22*758e9fbaSOystein EftevaagIn these cases we will append a string to the release number to indicate progress using the abbreviation `rc` for 'release candidate'. 23*758e9fbaSOystein EftevaagThis string will take the form of `_rcX`. 24*758e9fbaSOystein EftevaagWe append an incremental digit `X` in case more than one release candidate is necessary to communicate progress as development moves forward. 25*758e9fbaSOystein Eftevaag 26*758e9fbaSOystein Eftevaag# Static Analysis 27*758e9fbaSOystein EftevaagBefore a release is made the `coverity_scan` branch must be updated to the point in git history where the release will be made from. 28*758e9fbaSOystein EftevaagThis branch must be pushed to github which will cause the travis-ci infrastructure to run an automated coverity scan. 29*758e9fbaSOystein EftevaagThe results of this scan must be dispositioned by the maintainers before the release is made. 30*758e9fbaSOystein Eftevaag 31*758e9fbaSOystein Eftevaag# Git Tags 32*758e9fbaSOystein EftevaagWhen a release is made a tag is created in the git repo identifying the release by the [version string](#Version String). 33*758e9fbaSOystein EftevaagThe tag should be pushed to upstream git repo as the last step in the release process. 34*758e9fbaSOystein Eftevaag**NOTE** tags for release candidates will be deleted from the git repository after a release with the corresponding version number has been made. 35*758e9fbaSOystein Eftevaag**NOTE** release (not release candidate) tags should be considered immutable. 36*758e9fbaSOystein Eftevaag 37*758e9fbaSOystein Eftevaag## Signed tags 38*758e9fbaSOystein EftevaagGit supports GPG signed tags and for releases after the `1.1.0` release will have tags signed by a maintainer. 39*758e9fbaSOystein EftevaagFor details on how to sign and verify git tags see: https://git-scm.com/book/en/v2/Git-Tools-Signing-Your-Work. 40*758e9fbaSOystein Eftevaag 41*758e9fbaSOystein Eftevaag# Release tarballs 42*758e9fbaSOystein EftevaagWe use the git tag as a way to mark the point of the release in the projects history. 43*758e9fbaSOystein EftevaagWe do not however encourage users to build from git unless they intend to modify the source code and contribute to the project. 44*758e9fbaSOystein EftevaagFor the end user we provide release "tarballs" following the GNU conventions as closely as possible. 45*758e9fbaSOystein Eftevaag 46*758e9fbaSOystein EftevaagTo make a release tarball use the `distcheck` make target. 47*758e9fbaSOystein EftevaagThis target includes a number of sanity checks that are extremely helpful. 48*758e9fbaSOystein EftevaagFor more information on `automake` and release tarballs see: https://www.gnu.org/software/automake/manual/html_node/Dist.html#Dist 49*758e9fbaSOystein Eftevaag 50*758e9fbaSOystein Eftevaag## Hosting Releases on Github 51*758e9fbaSOystein EftevaagGithub automagically generates a page in their UI that maps git tags to 'releases' (even if the tag isn't for a release). 52*758e9fbaSOystein EftevaagAdditionally they support hosting release tarballs through this same interface. 53*758e9fbaSOystein EftevaagThe release tarball created in the previous step must be posted to github using the release interface. 54*758e9fbaSOystein EftevaagAdditionally this tarball must be accompanied by a detached GPG signature. 55*758e9fbaSOystein EftevaagThe Debian wiki has an excellent description of how to post a signed release to Github here: https://wiki.debian.org/Creating%20signed%20GitHub%20releases 56*758e9fbaSOystein Eftevaag**NOTE** release candidates must be taken down after a release with the corresponding version number is available. 57*758e9fbaSOystein Eftevaag 58*758e9fbaSOystein Eftevaag## Signing Release Tarballs 59*758e9fbaSOystein EftevaagSignatures must be generated using the `--detach-sign` and `--armor` options to the `gpg` command: 60*758e9fbaSOystein Eftevaag``` 61*758e9fbaSOystein Eftevaag$ gpg --detach-sign --armor tpm2-tss-X.Y.Z.tar.gz 62*758e9fbaSOystein Eftevaag``` 63*758e9fbaSOystein Eftevaag 64*758e9fbaSOystein Eftevaag## Verifying Signatures 65*758e9fbaSOystein EftevaagVerifying the signature on a release tarball requires the project maintainers public keys be installed in the GPG keyring of the verifier. 66*758e9fbaSOystein EftevaagWith both the release tarball and signature file in the same directory the following command will verify the signature: 67*758e9fbaSOystein Eftevaag``` 68*758e9fbaSOystein Eftevaag$ gpg --verify tpm2-tss-X.Y.Z.tar.gz.asc 69*758e9fbaSOystein Eftevaag``` 70*758e9fbaSOystein Eftevaag 71*758e9fbaSOystein Eftevaag## Signing Keys 72*758e9fbaSOystein EftevaagThe GPG keys used to sign a release tag and the associated tarball must be the same. 73*758e9fbaSOystein EftevaagAdditionally they must: 74*758e9fbaSOystein Eftevaag* belong to a project maintainer 75*758e9fbaSOystein Eftevaag* be discoverable using a public GPG key server 76*758e9fbaSOystein Eftevaag* be associated with the maintainers github account (https://help.github.com/articles/adding-a-new-gpg-key-to-your-github-account/) 77*758e9fbaSOystein Eftevaag 78*758e9fbaSOystein Eftevaag# Announcements 79*758e9fbaSOystein EftevaagRelease candidates and proper releases should be announced on the 01.org TPM2 mailing list: https://lists.01.org/postorius/lists/tpm2.lists.01.org/. 80*758e9fbaSOystein EftevaagThis announcement should be accompanied by a link to the release page on Github as well as a link to the CHANGELOG.md accompanying the release. 81*758e9fbaSOystein Eftevaag 82*758e9fbaSOystein Eftevaag# Maintainance 83*758e9fbaSOystein EftevaagThe most recent minor releases will receive bug fixes and bug fix releases. 84*758e9fbaSOystein EftevaagAdditionally the latest major release will receive bug fixes for another year after release. 85*758e9fbaSOystein Eftevaag 86*758e9fbaSOystein Eftevaag# Release schedule 87*758e9fbaSOystein EftevaagThe project aims for 3 releases per year; early spring, summer, late fall. 88*758e9fbaSOystein EftevaagWhether a release is a major or minor release depends on whether an API/ABI break occurs (see [Semantic Versioning](http://semver.org/)). 89