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:
- check out http://svn.apache.org/repos/asf/zookeeper/dist
- edit the KEYS file
- add the output of gpg2 --armor --fingerprint --list-sigs <keyid> and gpg2 --armor --export <keyid> to the file
- commit
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/hadoop/common/branches/branch-X.Y
- 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 ''zookeeper-X.Y.N''
- Commit these changes.
svn commit -m "Preparing for release X.Y.Z"
- 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: HADOOP-A, HADOOP-B."
- 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/hadoop/nightly/hudsonBuildHadoopRelease.sh?view=markup.
export JAVA_HOME=/path/to/32bit/jdk export CFLAGS=-m32 export CXXFLAGS=-m32 ant -Dversion=X.Y.Z -Dcompile.native=true -Dcompile.c++=true -Dlibhdfs=1 -Dlibrecordio=true -Dxercescroot=/usr/local/xerces-c -Declipse.home=/usr/lib/eclipse -Dforrest.home=/usr/local/forrest -Djava5.home=/usr/local/jdk1.5 clean api-report tar test test-c++-libhdfs export JAVA_HOME=/path/to/64bit/jdk export CFLAGS=-m64 export CXXFLAGS=-m64 ant -Dversion=X.Y.Z -Dcompile.native=true -Dcompile.c++=true compile-core-native compile-c++ tar
- Check that release file looks ok - e.g. install it and run examples from tutorial.
- Generate the MD5 checksum of the release file.
md5sum zookeeper-X.Y.Z.tar.gz > zookeeper-X.Y.Z.tar.gz.md5
- Sign the release
gpg --armor --output zookeeper-X.Y.Z.tar.gz.asc --detach-sig zookeeper-X.Y.Z.tar.gz
- 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
- Stage the release candidate to the maven repository:
ant -Dversion=X.Y.Z -Drepo=staging mvn-deploy
- Log into Nexus, select Staging from the left navigation pane, right-click on the pushed repository, and close the release.
- Call a release vote on dev at zookeeper.apache.org.
Maven
Support is now available for pushing the jar artifacts to the Apache maven repository.
1) sign the jar/pom files using gpg
2) copy the jar/pom/etc... into the appropriate directory
http://people.apache.org/repo/m2-ibiblio-rsync-repository/org/apache/hadoop/zookeeper/
full details here:http://www.apache.org/dev/repository-faq.html
the files are sync'd daily, and ivy finds it.
maven metadata files have to be updated manually
Smoke Tests
Before the release, run the following smoke tests (at least).
- Run unit tests on different hardwares: mac, windows, linux.