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/www.apache.org/dist/zookeeper
- edit the KEYS file
- add the output of gpg2 --armor --fingerprint --list-sigs <keyid> and gpg2 --armor --export <keyid> to the file
Important Notes
- when updating JIRA be sure to use the "batch" operator. Disable email notifications when using batch, 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:
- Check out the branch with:
svn co 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.
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%3Achangelog-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.
svn commit -m "Preparing for release X.Y.Z"
- Tag the release candidate (R is the release candidate number, and starts from 0):
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.
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
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
md5sum file > file.md5 sha1 file > file.sha1
- Sign each file in dist-maven
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
tar -caf zookeeper-X.Y.Z.tar.gz zookeeper-X.Y.Z
- Generate the MD5/SHA1 checksums for the release artifact.
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
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.
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.
- Tag the release:
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.Z
- 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.
ssh people.apache.org cd /www/www.apache.org/dist/zookeeper rm -rf zookeeper-A.B.C; rm stable ln -s zookeeper-A.B.D stable
- Wait 24 hours for release to propagate to mirrors.
- Prepare to edit the website.
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.
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.
ant firefox publish/index.html svn commit -m "Updated site for release X.Y.Z."
- Deploy your site changes.
ssh people.apache.org cd /www/zookeeper.apache.org svn up
- Copy the new Javadoc to people.apache.org:/www/zookeeper.apache.org/docs/rX.Y.Z/api, by doing the following in your home directory on people.apache.org:
ssh people.apache.org 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' chmod -R 775 zookeeper-X.Y.Z chgrp -R zookeeper zookeeper-X.Y.Z cp -rp zookeeper-X.Y.Z/docs/api /www/zookeeper.apache.org/docs/rX.Y.Z rm -r zookeeper-X.Y.Z
- Send announcements to the user and developer lists once the site changes are visible.
- 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.
- login to people.apache.org
- 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
md5sum maven-metadata.xml > maven-metadata.xml.md5 gpg2 --armor --output maven-metadata.xml.asc --detach-sig maven-metadata.xml
- copy the files from dist-maven into /www/people.apache.org/repo/m2-ibiblio-rsync-repository/org/apache/zookeeper/zookeeper/X.Y.Z
Smoke Tests
Before the release, run the following smoke tests (at least).
- Run unit tests on different hardwares: mac, windows, linux.