For a how-to for branch-3.5, see the guide here.
For a how-to for branch-3.6+, see the guide here.
Setting up the signing keys
Before you do a release you'll need a signing key that is registered with apache. If you already have one, you can skip this section. Otherwise, here are the steps to do:
- use gpg2 --gen-key to generate a new key. Make sure that the key size is 4096 bits, the key doesn't expire, and use CODE SIGNING KEY for the comment.
- Now you need to register your key at http://pgp.mit.edu/ using the output of gpg --armor --export <keyid>
- Add your key to the KEYS file:
- ssh people.apache.org
- cd /www/wwwsvn co https://dist.apache.org/repos/dist/release/zookeeper/ zookeeper_dist
- cd zookeeper_dist.
- edit the KEYS fileadd . See the output of top of the KEYS file for instructions on how to edit this file
- svn ci
- Upload digest to your account on id.apache.org (gpg2 --armor --fingerprint --list-sigs <keyid> and gpg2 --armor --export <keyid> to the file
...
- fingerprint)
Important Notes
- when updating JIRA be sure to use the "batch change" operator under the "tools" menu. Disable email notifications when using batch change, subsequent to large JIRA operations (moving issues btw releases, closing JIRAs after a release, etc...) send email to the dev@ list detailing the changes.
Updating the release branch
These operations take place in the release branch:
Branching
Skip this section if this is NOT the first release in a series (i.e. release X.Y.0).
- Notify developers on the mailing list that you are about to branch a release.
- Update CHANGES.txt to include the release version and date (use Unreleased for the date if it is unknown) and remove Trunk (unreleased changes).
Commit these changes to trunk.
Code Block svn commit -m "Preparing for release X.Y.Z"
Create a branch for the release series:
Check out the branch with:Code Block svn copy https:
Code Block svn co https://svn.apache.org/repos/asf/zookeeper/trunk https://svn.apache.org/repos/asf/zookeeper/branches/branch-X.Y
- If not already done, merge desired patches from trunk into the branch and commit these changes. You can find the revision numbers using svn log CHANGES.txt in the branch and in trunk.
Code Block cd branch-X.Y svn merge -rR1:R2 ../trunk . svn commit -m "Merge -r R1:R2 from trunk to X.Y branch. Fixes: ZOOKEEPER-A, ZOOKEEPER-B."
- Update CHANGES.txt to include the release version and date (this change must be committed to trunk and any intermediate branches between trunk and the branch being released).
- Update src/docs/releasenotes.html with release notes for this release. You can get the HTML by following the "Release Notes" link for the relevant release on the https://issues.apache.org/jira/browse/ZOOKEEPER?report=com.sourcelabs.jira.plugin.portlet.releases:releases-projecttab#selectedTab=com.atlassian.jira.plugin.system.project%3Aroadmap-panel tab in Jira.
- Update the version number in build.xml to be ''X.Y.Z''
- Update the version number in src/c/configure.ac and src/c/include/zookeeper_version.h to be ''X.Y.Z''
- Commit these changes.
Code Block svn commit -m "Preparing for release X.Y.Z"
- Tag the release candidate (R is the release candidate number, and starts from 0):
Code Block svn copy https://svn.apache.org/repos/asf/zookeeper/branches/branch-X.Y \ https://svn.apache.org/repos/asf/zookeeper/tags/release-X.Y.Z-rcR -m "ZooKeeper X.Y.Z-rcR release."
Building
- Build the release & run unit tests. This is captured in http://svn.apache.org/viewvc/zookeeper/nightly/hudsonBuildZooKeeperRelease.sh?view=markup.
Code Block ant test package tar
- Untar the generated zookeeper-X.Y.Z.tar.gz and do the following:
- Sign the toplevel zookeeper-X.Y.Z.jar
Code Block gpg --armor --output zookeeper-X.Y.Z.jar.asc --detach-sig zookeeper-X.Y.Z.jar
- Generate the MD5/SHA1 checksums for each file in dist-maven
Code Block md5sum file > file.md5 sha1 file > file.sha1
- Sign each file in dist-maven
Code Block gpg --armor --output file.asc --detach-sig file
- Sign the toplevel zookeeper-X.Y.Z.jar
- Tar/GZ the release directory as zookeeper-X.Y.Z.tar.gz
Code Block tar -caf zookeeper-X.Y.Z.tar.gz zookeeper-X.Y.Z
- Generate the MD5/SHA1 checksums for the release artifact.
Code Block md5sum zookeeper-X.Y.Z.tar.gz > zookeeper-X.Y.Z.tar.gz.md5 sha1 zookeeper-X.Y.Z.tar.gz > zookeeper-X.Y.Z.tar.gz.sha1
- Sign the release
Code Block gpg --armor --output zookeeper-X.Y.Z.tar.gz.asc --detach-sig zookeeper-X.Y.Z.tar.gz
- Check that release file looks ok - e.g. install it and run examples from tutorial.
- untar the release artifact in a test directory
- Copy release files to a public place.
Code Block ssh people.apache.org mkdir public_html/zookeeper-X.Y.Z-candidate-0 scp -p zookeeper-X.Y.Z.tar.gz* people.apache.org:public_html/zookeeper-X.Y.Z-candidate-0
- Call a release vote on dev at zookeeper.apache.org.
Publishing
Once three PMC members have voted for a release, it may be published.
-m "Branching for X.Y releases"
- Update CHANGES.txt to add back in Trunk (unreleased changes).
- Update the default version in build.xml on trunk to X.Y+1.0-SNAPSHOT.
- Update the version number in src/c/configure.ac and src/c/include/zookeeper_version.h to be X.Y+1.0.
Commit these changes to trunk.
Code Block svn commit -m "Preparing for X.Y+1.0 development"
Updating the release branch
These operations take place in the release branch:
Check out the branch with:
Code Block git clone https://svn.apache.org/repos/asf/zookeeper/branches/branch-X.Y
If not already done, merge desired patches from trunk into the branch and commit these changes. You can find the revision numbers using svn log CHANGES.txt in the branch and in trunk.
Code Block cd branch-X.Y svn merge -rR1:R2 ../trunk . svn commit -m "Merge -r R1:R2 from trunk to X.Y branch. Fixes: ZOOKEEPER-A, ZOOKEEPER-B."
- Do a final pass regeneration of docs by running "ant -Dforrest.home=<path to Forrest> clean docs". If there are any modifications, then they'll show up under the docs folder. If there are any changes, then commit them. However, DO NOT commit changes in docs/releasenotes.html or docs/releasenotes.pdf. (Release notes are handled in a separate step.) Release notes should be regenerated each time a documentation patch is committed. This final pass before the release is intended to catch mistakes in case this step was missed at commit time.
- Update CHANGES.txt to include the release version and date (this change must be committed to trunk and any intermediate branches between trunk and the branch being released).
- Update docs/releasenotes.html with release notes for this release. You can get the HTML by following the "Release Notes" link for the relevant release on the https://issues.apache.org/jira/browse/ZOOKEEPER?report=com.sourcelabs.jira.plugin.portlet.releases:releases-projecttab#selectedTab=com.atlassian.jira.plugin.system.project%3Aroadmap-panel tab in Jira. Note that you need to exclude the won't fix or invalid tickets.
- TODO - document howto generate the release notes using the new mechanism
- Update the version number in build.xml to be ''X.Y.Z''
- Update the version number in src/c/include/winconfig.h, src/c/configure.ac, and src/c/include/zookeeper_version.h to be ''X.Y.Z''
- Update the copyright years in NOTICE.txt if it's outdated.
Commit these changes.
Code Block svn commit -m "Preparing for release X.Y.Z"
Tag the release candidate (R is the release candidate number, and starts from 0):
Code Block svn copy https://svn.apache.org/repos/asf/zookeeper/branches/branch-X.Y \ https://svn.apache.org/repos/asf/zookeeper/tags/release-X.Y.Z-rcR -m "ZooKeeper X.Y.Z-rcR release."
Building
Build the release & run unit tests.
Code Block ant test package tar
- Untar the generated zookeeper-X.Y.Z.tar.gz and do the following:
Sign the toplevel zookeeper-X.Y.Z.jar
Code Block gpg --armor --output zookeeper-X.Y.Z.jar.asc --detach-sig zookeeper-X.Y.Z.jar
Sign each file in dist-maven
Code Block gpg --armor --output file.asc --detach-sig file
Tar/GZ the release directory as zookeeper-X.Y.Z.tar.gz
Code Block tar -caf zookeeper-X.Y.Z.tar.gz zookeeper-X.Y.Z
Generate the MD5/SHA1 checksums for the release artifact.
Code Block md5sum zookeeper-X.Y.Z.tar.gz > zookeeper-X.Y.Z.tar.gz.md5 sha1sum zookeeper-X.Y.Z.tar.gz > zookeeper-X.Y.Z.tar.gz.sha1
Sign the release
Code Block gpg --armor --output zookeeper-X.Y.Z.tar.gz.asc --detach-sig zookeeper-X.Y.Z.tar.gz
- Check that release file looks ok - e.g. install it and run examples from tutorial.
- untar the release artifact in a test directory
Copy release files to a public place.
Code Block ssh people.apache.org mkdir public_html/zookeeper-X.Y.Z-candidate-0 scp -p zookeeper-X.Y.Z.tar.gz* people.apache.org:public_html/zookeeper-X.Y.Z-candidate-0
- Stage the release artifacts to the Apache Nexus repository
Create ~/.m2/settings.xml introducing the values that are specific to you:
Code Block <settings> <servers> <server> <id>apache.snapshots.https</id> <username>XXXXXXX</username> <password>XXXXXXXX</password> </server> <server> <id>apache.staging.https</id> <username>XXXXXXX</username> <password>XXXXXXX</password> </server> </servers> <profiles> <profile> <id>gpg</id> <properties> <gpg.passphrase>XXXXXXX</gpg.passphrase> </properties> </profile> </profiles> </settings>
See http://maven.apache.org/guides/mini/guide-encryption.html for details on encrypting the passwords rather than leaving them in the clear.
Run the following on the branch check out
Code Block ant mvn-deploy -Dstaging=true
- Enter Apache Nexus and do the following:
Click on Log In in the upper right corner. Log in using your apache user name and password.
In the left navigation pane, select Staging Repositories.
- Identify the release candidate you just pushed, by your user name (in parentheses as part of the "Repository" name) and the "Created On" date. Click on the check box to the left of your Repository name to select it. (If you accidentally click on the Repository name itself, another tab will pop open. If so, just close it.)
Click the Close button above the Repository names. This makes your release candidate available at the Staging level.
If you have previously staged an older release candidate with the same version number, and it is still showing in the Repository list, you must select and Drop the old one now.
Confirm that your new release candidate is visible at https://repository.apache.org/content/groups/staging/org/apache/zookeeper/zookeeper/ with correct file modification dates.
Call for a release vote on dev (note dev@ and not user@, the user list is for discussion of released software only) at zookeeper.apache.org. Here is a sample email (from 3.4.6 release):
Code Block language text Subject: [VOTE] Apache ZooKeeper release 3.4.6 candidate 0 This is a bugfix release candidate for 3.4.6. It fixes 117 issues, including issues that affect leader election, Zab, and SASL authentication. The full release notes is available at: https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310801&version=12323310 *** Please download, test and vote by March 9th 2014, 23:59 UTC+0. *** Source files: http://people.apache.org/~fpj/zookeeper-3.4.6-candidate-0/ Maven staging repo: https://repository.apache.org/content/groups/staging/org/apache/zookeeper/zookeeper/3.4.6/ The tag to be voted upon: https://svn.apache.org/repos/asf/zookeeper/tags/release-3.4.6-rc0 ZooKeeper's KEYS file containing PGP keys we use to sign the release: http://www.apache.org/dist/zookeeper/KEYS Should we release this candidate?
Publishing
Once three PMC members have voted for a release, it may be published.
Tag the release:
Code Block svn move https://svn.apache.org/repos/asf/zookeeper/tags/release-X.Y.Z-rcR \ https://svn.apache.org/repos/asf/zookeeper/tags/release-X.Y.Z -m "ZooKeeper X.Y.Z release."
Update the version number to the next logical SNAPSHOT version (e.g. X.Y.Z to X.Y.Z+1-SNAPSHOT)
Check in release files to the distribution server
Code Block svn co https://dist.apache.org/repos/dist/release/zookeeper/ zookeeper_dist cd zookeeper_dist mkdir zookeeper-X.Y.Z # copy tgz/asc/md5/sha1 files from your public_html to zookeeper-X.Y.Z svn add zookeeper-X.Y.Z svn ci -m "Add ZooKeeper X.Y.Z release"
- After checking in the release, you'll receive an automated email from reporter.apache.org with a link requesting additional details about the release. This form must be completed by a PMC member. If you are a PMC members, follow the link and complete the form. If you are not a PMC member, forward the email to dev@zookeeper.apache.org and ask for assistance from a PMC member.
- Tag the release:
Code Block svn move https://svn.apache.org/repos/asf/zookeeper/tags/release-X.Y.Z-rcR \ https://svn.apache.org/repos/asf/zookeeper/tags/release-X.Y.Z -m "ZooKeeper X.Y.Z release."
- Copy release files to the distribution directory and make them writable by the zookeeper group.
ssh people.apache.org cp -pr public_html/zookeeper-X.Y.Z-candidate-0 /www/www.apache.org/dist/zookeeper/zookeeper-X.Y.Z cd /www/www.apache.org/dist/zookeeper chgrp -R zookeeper zookeeper-X.Y.Z chmod -R g+w zookeeper-X.Y.ZCode Block The release directory usually contains just two releases, the most recent from two branches, with a
link named 'stable' to the most recent recommended version.link named 'stable' to the most recent recommended version.
Code Block cd zookeeper_dist # don't do the following rm for the time being, until we are sure the new rel is actually stable --> ### rm -rf zookeeper-A.B.C rm stable; rm current ln -s
Code Block ssh people.apache.org cd /www/www.apache.org/dist/zookeeper rm -rf zookeeper-A.B.C; rmD stable ln -s zookeeper-A.B.D stable A.B.D current svn ci -m 'Updating links'
- Release the Maven artifacts on Apache Nexus:
- Click on 'Staging repositories'.
- Select the repository corresponding to the release candidate.
- Click on the 'Release' button and follow instructions.
- Wait 24 hours for release to propagate to mirrors.
Prepare to edit the website.
Code Block svn co https://svn.apache.org/repos/asf/zookeeper/site
- Add the newly tagged release to the website as an external. When adding the new branch, leave the old branches so that links do not break. Once the external is added, update your workspace to checkout the new external reference.
Code Block svn propedit svn:externals publish/docs svn update
- Update the documentation links in author/src/documentation/content/xdocs/site.xml.
- Update the release news in author/src/documentation/content/xdocs/releases.xml.
- Update the link publish/docs/current.
- Regenerate the site, review it, then commit it.
Code Block ant firefox publish/index.html svn commit -m "Updated site for release X.Y.Z."
Copy the new release documentation into the content/doc directory
Code Block cd site/trunk/content/doc mkdir rX.Y.Z cd rX.Y.Z tar xvf /www/www.apache.org/dist/zookeeper/zookeeper-X.Y.Z/zookeeper-X.Y.Z.tar.gz 'zookeeper-X.Y.Z/docs' mv zookeeper-X.Y.Z/docs/* . rm -r zookeeper-X.Y.Z cd .. svn add rX.Y.Z
- Update the release news in site/trunk/content/releases.textile
- Update the nav panel to include X.Y.Z (which may now be "current") site/trunk/templates/sidenav.textile
- Copy the new Javadoc to CMS
svn cloneCode Block Regenerate the site, review it, then commit it. (checkout
asfzookeeperwebsites/cms/build if you haven't already)
Code Block cd site/trunk .../apache_cms_build/build_site.pl --source-base . --target-base /tmp/sitegen <open /tmp/sitegen/index.html in your browser and verify the site> svn commit -m "Updated site for release X.Y.Z."
Update the "current" doc pointer if necessary (as CMS doesn't currently support symlinks in build/staging we need to push this directly to production)
Code Block svn co https://svn.apache.org/repos/infra/websites/production/zookeeper/content cd content/doc rm current ln -s rX.Y.Z currentsite/trunk site cd site/content/doc mkdir rX.Y.Z cd rX.Y.Z tar xvf /www/www.apache.org/dist/zookeeper/zookeeper-X.Y.Z/zookeeper-X.Y.Z.tar.gz '*/docs/api' tar xvf /www/www.apache.org/dist/zookeeper/zookeeper-X.Y.Z/zookeeper-X.Y.Z.tar.gz '*/docs/jdiff' mv zookeeper-X.Y.Z/docs/api . mv zookeeper-X.Y.Z/docs/jdiff . rm -r zookeeper-X.Y.Z svn add api jdiff svn commit -m "AddedUpdated apicurrent docspointer to site for release X.Y.Z."
- Review your changes on the staging site: http://zookeeper.staging.apache.org
Deploy your site changes.
Code Block https://cms.apache.org/redirect?uri=http%3A//zookeeper.apache.org/ publish the site changes
Send announcements to the user and developer lists once the site changes are visible. Here is a sample email:
No Format Subject: [ANNOUNCE] Apache ZooKeeper X.Y.Z The Apache ZooKeeper team is proud to announce Apache ZooKeeper version X.Y.Z ZooKeeper is a high-performance coordination service for distributed applications. It exposes common services - such as naming, configuration management, synchronization, and group services - in a simple interface so you don't have to write them from scratch. You can use it off-the-shelf to implement consensus, group management, leader election, and presence protocols. And you can build on it for your own, specific needs. For ZooKeeper release details and downloads, visit: http://zookeeper.apache.org/releases.html ZooKeeper X.Y.Z Release Notes are at: http://zookeeper.apache.org/doc/rX.Y.Z/releasenotes.html We would like to thank the contributors that made the release possible. Regards, The ZooKeeper Team
- In Jira, ensure that only issues in the "Fixed" state have a "Fix Version" set to release X.Y.Z.
- In Jira, "release" the version. Visit the "Administer Project" page, then the "Manage versions" page. You need to have the "Admin" role in ZooKeeper's Jira for this step and the next.
- In Jira, close issues resolved in the release. Disable mail notifications for this bulk change.
Maven
Support is now available for pushing the jar artifacts to the Apache maven repository.to the Apache maven repository.
WARNING: the process has changed but the docs not yet updated, see https://issues.apache.org/jira/browse/ZOOKEEPER-1430
- login to people.apache.org
- copy the files from the release artifact "dist-maven" directory into /www/people.apache.org/repo/m2-ibiblio-rsync-repository/org/apache/zookeeper/zookeeper/X.Y.Z
- chmod -R g+w /www/people.apache.org/repo/m2-ibiblio-rsync-repository/org/apache/zookeeper/zookeeper/X.Y.Z
- cd to /www/people.apache.org/repo/m2-ibiblio-rsync-repository/org/apache/zookeeper/zookeeper
- edit maven-metadata.xml
- add X.Y.Z to versions
- update the version to X.Y.Z
- update the lastUpdated
sign and md5sum maven-metadata.xml
Code Block md5sum maven-metadata.xml > maven-metadata.xml.md5 gpg2 --armor --output maven-metadata.xml.asc --detach-sig maven-metadata.xml
Smoke Tests
Before the release, run the following smoke tests (at least).
...