Releases:Branch Tag Build Release
How to (branch and tag and build and) release a new version of Camino
by Mark Mentovai
on 2007-02-28
Pinkerton keeps rooting for me to get hit by a bus. I’ve had pretty good luck so far, in large part because I’ve abandoned my old habit of running after buses while they’re in motion and banging on the doors, but even so, the specifics of our release procedure probably should be documented.
These instructions correspond to Camino 1.0.4 (Gecko 1.8.0.10). The base tag for this release was FIREFOX_1_5_0_10_RELEASE
. This specifies the apex of the minibranch. For the 1.0.4 release, changes to that tag for Camino were made on a new CAMINO_1_0_4_MINIBRANCH
branch, and the release tag was CAMINO_1_0_4_RELEASE
. Camino branch and release tags follow this convention (CAMINO_1_1_A2_MINIBRANCH
, CAMINO_1_1_B_RELEASE
).
Contents
- 1 Check out the source
- 2 Fork a minibranch
- 3 Fix your (my) mistakes
- 4 Make client.mk apply to the release tag
- 5 Land other changes on the minibranch
- 6 Release checklist
- 7 Tag it
- 8 Moving the Release Tag for Respins
- 9 Make Tinderbox build it
- 10 Stage it
- 11 Create a source release
- 12 Have someone else set up Breakpad reports
- 13 Other things to do
Check out the source
Instead of a tag, you can also use a branch name, or a branch name with a date. If using a branch name and a date, use -D
when checking out client.mk
, and set MOZ_CO_DATE
when making client.mk
’s checkout
target.
If you’re making a release that corresponds to a Gecko “final” version, be sure to pick up source that doesn’t have a “prerelease” Gecko version number in config/milestone.txt
. Release tags are good for this, but branch snapshots taken at a known freeze time can work too in a pinch. (KaiRo has a tool that periodically queries tags, or you can use cvs log
or perhaps even bonsai (or this link for older branches) to find relevant Gecko tags.)
As of the Gecko 1.8.1.4 and 1.8.0.11 releases, it is possible to base a Camino version on a Gecko release branch forked by the build team. Camino 1.5 is based on GECKO181_20070501_RELBRANCH
, for example, the release branch for products based on Gecko 1.8.1.4 (Firefox 2.0.0.4). Note that we’ve been asked not to check in to this branch, even in mozilla/camino
, so our own minibranch (below) is still needed.
Before pulling the source, you may want to add the target directory to Spotlight’s “Privacy” list.
cvs checkout -r FIREFOX_1_5_0_10_RELEASE mozilla/client.mk mozilla/camino/config cd mozilla MOZCONFIG=`pwd`/camino/config/mozconfig make -w -f client.mk checkout
In some cases, it’s not proper to base a Camino release off of an entire Gecko tree. For example, Camino 1.5.1 is based on FIREFOX_2_0_0_6_RELEASE
in all directories except for mozilla/camino
, which is based on then-current code from CAMINO_1_5_BRANCH
. To switch the base in mozilla/camino
, after the initial checkout above, do:
cvs update -r CAMINO_1_5_BRANCH -Pd camino
However, for the CAMINO_2_0_BRANCH
, Mark recommended we always use the CAMINO_2_0_BRANCH
’s copy of client.mk
. This requires checking out the CAMINO_2_0_BRANCH
copy of client.mk
, uncommenting the MOZ_CO_TAG
and setting it to the appropriate Gecko (Firefox) release tag:
cvs checkout -r CAMINO_2_0_BRANCH mozilla/client.mk mozilla/camino/config cd mozilla sed -e s/#MOZ_CO_TAG =/MOZ_CO_TAG = FIREFOX_3_0_15_RELEASE/ \ < client.mk > client.mk.new && \ mv client.mk.new client.mk MOZCONFIG=`pwd`/camino/config/mozconfig make -w -f client.mk checkout
client.mk
will generate conflicts when switching back and forth between tags using this method, but you can ignore them; the right things will be checked out from the right tags, and you’ll be changing client.mk
before tagging, anyway.
For Camino releases after Firefox has stopped shipping releases on a given branch (e.g., Camino 2.0.4), you’ll instead want to use the appropriate parent branch tag for the MOZ_CO_TAG
, or leave it commented out on the trunk if additional fixes have landed (I seem to recall Mark warning me that setting it to HEAD
in CAMINO_*_BRANCH
copies of client.mk
breaks things). In addition, you’ll want to pull the platform and Firefox version files from the final Firefox release, in order to avoid “pre” strings in the user-agent string (and, therefore, being broken on sites that break with “pre” in the UA):
cvs checkout -r CAMINO_2_0_BRANCH mozilla/client.mk mozilla/camino/config cd mozilla MOZCONFIG=`pwd`/camino/config/mozconfig make -w -f client.mk checkout cvs up -r FIREFOX_3_0_19_RELEASE config/milestone.txt browser/config/version.txt
Fork a minibranch
This can be done either by branching the entire checked-out tree, or branching individual files as needed. client.mk
always needs to be minibranched to adjust its tags. I tend to branch the entire tree if any other files need to change, and to only branch client.mk
if that’s all that’s changing. After branching, use cvs update
to change the tag on the files you’ll be working on in your working copy, so that changes will be committed to the right branch.
The usage here branches everything rooted at the current working directory (mozilla
):
cvs tag -b CAMINO_1_0_4_MINIBRANCH cvs update -r CAMINO_1_0_4_MINIBRANCH
This usage only branches the individual files which will be modified from the base tag(s) for inclusion in the release tag:
cvs tag -b CAMINO_1_5_1_MINIBRANCH \ client.mk \ camino/Info-Camino.plist \ camino/Info-CaminoStatic.plist \ camino/resources/application/all-camino.js \ camino/resources/localized/English.lproj/InfoPlist.strings cvs update -r CAMINO_1_5_1_MINIBRANCH \ client.mk \ camino/Info-Camino.plist \ camino/Info-CaminoStatic.plist \ camino/resources/application/all-camino.js \ camino/resources/localized/English.lproj/InfoPlist.strings
With recent branches, it is often only necessary to minibranch client.mk
and the Camino version file:
cvs tag -b CAMINO_1_6_B3_MINIBRANCH client.mk camino/config/version.txt cvs update -r CAMINO_1_6_B3_MINIBRANCH client.mk camino/config/version.txt
Note that in some cases, a minibranch will be reused for an emergency release. For example, CAMINO_1_6_B1_MINIBRANCH
was used for both Camino 1.6b1 and the emergency followup release, 1.6b2. With such a release, you should simply check out a copy of the minibranch and then skip to the land changes section to update it as needed.
Fix your (my) mistakes
At this point, I realized that the FIREFOX_1_5_0_10_RELEASE
tag didn’t include changes to two Camino files that had been made recently on the MOZILLA_1_8_0_BRANCH
in anticipation of Camino 1.0.4. I realized this because the release notes were missing. I found the other file by querying Bonsai. Here, I updated my local copies of these files to the current 1.8.0 branch versions, and then set the branch tag. I had to use cvs tag -B -F
to move the tag because ad_blocking.css
had already been branched. cvs tag -B -F
is dangerous, but I know what I’m doing. Next time, I’ll remember to check this kind of thing before forking the minibranch.
cvs update -r MOZILLA_1_8_0_BRANCH \ camino/resources/application/ad_blocking.css \ camino/docs/Release\ Notes\ 1-0-4.rtf cvs tag -B -F -b CAMINO_1_0_4_MINIBRANCH \ camino/resources/application/ad_blocking.css \ camino/docs/Release\ Notes\ 1-0-4.rtf cvs update -r CAMINO_1_0_4_MINIBRANCH \ camino/resources/application/ad_blocking.css \ camino/docs/Release\ Notes\ 1-0-4.rtf
Make client.mk
apply to the release tag
Now it’s possible to make changes to the working copy. First, update client.mk
so that it will pull from the release tag (soon to be created). The relevant section of client.mk
should look something like this. In this case, sed
won’t change the NSPR and NSS tags to checked out, but that’s all right, because they’re static tags. I used to change those too, but now I think it’s clearer to see which NSPR and NSS releases were used by leaving their original tags intact in client.mk
. An obvious exception applies when NSPR or NSS files need to change on the minibranch. Note that I feel entitled to use BS in the more administrative commit messages on my own private minibranch.
sed -e s/FIREFOX_1_5_0_10_RELEASE/CAMINO_1_0_4_RELEASE/ \ < client.mk > client.mk.new && \ mv client.mk.new client.mk cvs commit -m "The 1.0.4 minibranch is now boarding at gate 1.8.0.10" \ client.mk
If you’re using a minibranch based off of a Camino-only branch and Firefox has already stopped releasing off of the underlying Gecko branch and additional Gecko changes have landed, make sure that you adjust client.mk
to uncomment the line for the Gecko tag (and set that value to the CAMINO_*_RELEASE
tag as well).
Land other changes on the minibranch
I usually find these by querying Bugzilla for bugs with text like camino-1.0.3
in the status whiteboard field, by checking Bonsai for changes I made to the last release minibranch, or by asking Smokey or Sam. Those guys remember everything. These two things come from bugs 325765 and 325964. When landing things on the minibranch, don’t forget to update the status whiteboard fields of the relevant bugs with text like [camino-1.0.4]
.
sed -e s/0x00010006/0x00010008/ \ < netwerk/cache/src/nsDiskCache.h > netwerk/cache/src/nsDiskCache.h.new && \ mv netwerk/cache/src/nsDiskCache.h.new netwerk/cache/src/nsDiskCache.h cvs commit -m "325765 Camino 1.0 versioned its cache as 1.8 while the main 1.8.0 branch versions it as 1.6. " \ "Use 1.8 to avoid dumping established caches on upgrading from an earlier 1.0.x Camino." \ netwerk/cache/src/nsDiskCache.h patch -p1 < ../mathmlprompt.diff cvs commit -m "325964 MathML missing font dialog contains extra space. " \ "Patch by Smokey Ardisson <alqahira@mindspring.com>. r=me sr=rbs" \ layout/mathml/base/src/mathfont.properties
With recent branches, often the only change after the client.mk
change is to update the Camino version file:
echo 1.6b3 > camino/config/version.txt cvs commit -m "Numbers for Camino 1.6b3" client.mk camino/config/version.txt
Release checklist
Run the release checklist in camino/docs/ReleaseChecklist.txt
to update all of the version numbers. Then, check it all in. The release checklist and the set of files it modifies may vary slightly by branch.
cat camino/docs/ReleaseChecklist.txt cd camino cvs commit -m "Camino 104, position and hold" \ Info-Camino.plist \ Info-CaminoStatic.plist \ installer/Makefile.in \ resources/application/ChimeraVersion.r \ resources/application/WebsiteDefaults.strings \ resources/application/all-camino.js \ resources/localized/English.lproj/InfoPlist.strings cd ..
On recent branches, if you’ve been following this guide, by the time you run the release checklist, there shouldn’t be any actual work to do. It should be a simple verification that the source tree is ready for a release.
You also might want to update the version numbers on the parent branch (MOZILLA_1_8_0_BRANCH
in this case) to indicate that the branch has advanced beyond the new release. This time, I updated the above files on the parent branch to give a version number of 1.0.4+, but this versioning scheme is deprecated. Under the new scheme, the version number should be updated the the next version expected to be released from the branch, with “pre” appended. In this example, the version would be updated to 1.0.5pre. You don’t have to do this now, it can wait until more pressing tasks are done.
Tag it
We’re set. Now tag the tree with the release tag, so that client.mk
actually makes sense. Regardless of whether the whole tree or just a few files were forked on the minibranch, we always tag the entire tree needed for a Camino build, even NSPR and NSS. (We don’t need to tag all of Mozilla’s repository, it’s sufficient to tag a full Camino checkout.)
cvs tag CAMINO_1_0_4_RELEASE
If someone pulls client.mk
by the CAMINO_1_0_4_RELEASE
tag, then they’ll get what they expect. Change the tags in client.mk
on the minibranch to correspond to the minibranch instead of the release tag. It doesn’t make much of a difference because the new minibranch is a stub-ended branch and the buck stops here, but I’m something of an anal release-master. (Observe how carefully I placed that hyphen.) This is only recommended if the entire tree was forked to make a minibranch, otherwise, it’s pointless. If using a Gecko or Firefox release branch (recommended), you probably won’t have forked the entire tree for a minibranch, so this step is safe to skip.
sed -e s/CAMINO_1_0_4_RELEASE/CAMINO_1_0_4_MINIBRANCH/ \ < client.mk > client.mk.new && \ mv client.mk.new client.mk cvs commit -m "Please remain seated until your release-master has turned off the fasten seat belt sign." \ client.mk
Now, this part used to be crappy and top-secret, and fortunately, it’s no longer necessary now that tinderbox can use $UsePrebuiltTalkback
. The old procedure is included here to confuse you. We used to need to tag the Talkback tree too, so that tinderbox would get the right stuff. We only had access to that from the tinderbox itself. I’m not going to tell you what we used for $CVSROOT
, but you could have found it in the build log from any true clobber nightly produced by tinderbox.
CVSROOT=something CVS_RSH=ssh \ cvs checkout -r MOZILLA_1_8_0_BRANCH talkback/fullsoft CVSROOT=something CVS_RSH=ssh \ cvs tag -b CAMINO_1_0_4_MINIBRANCH talkback/fullsoft CVSROOT=something CVS_RSH=ssh \ cvs update -r CAMINO_1_0_4_MINIBRANCH talkback/fullsoft CVSROOT=something CVS_RSH=ssh \ cvs tag CAMINO_1_0_4_RELEASE talkback/fullsoft
Moving the Release Tag for Respins
Sometimes there is a late-breaking change that requires a respin after a release (candidate) build has been produced, or after the tree has been tagged with the _RELEASE
tag, as happened with Camino 1.6.7 and Bug 485286. If the change has landed on the underlying Mozilla branch, you will need to update the changed file(s) in your tree to the correct revision and run cvs tag
again. Since the tag already exists on the file, you need -F
to force the tag to move.
cvs up -j 1.33.28.2 extensions/transformiix/source/xslt/functions/txKeyFunctionCall.cpp cvs tag -F CAMINO_1_6_7_RELEASE extensions/transformiix/source/xslt/functions/txKeyFunctionCall.cpp
After moving the tag, revisit Tinderbox and re-enable the build; as long as $build_hour
has passed since the last release candidate build, Tinderbox will automatically produce a clobber release build. If $build_hour
has not passed, run the following command to trigger a new clobber release build:
rm /builds/tinderbox/Cm1.6.7/Darwin_8.10.2_Depend/last-built
Make Tinderbox build it
Everything’s set now. Configure tinderbox to produce a new build from the release tag. This is a pain, too, but fortunately, the previous release can be used as a template. The stupid wildcard in the rsync is to avoid copying the whole source and object trees, which have names beginning with Darwin with a capital D. Everything else important has a name beginning with a lowercase letter. rsync is used to preserve symbolic links, of which there are many.
cd /builds/tinderbox mkdir Cm1.0.4 rsync -av Cm1.0.3/[a-z]* Cm1.0.4 sed -e s/1\\.0\\.3/1.0.4/ -e s/1_0_3/1_0_4/ \ < Cm1.0.4/tinder-config.pl > Cm1.0.4/tinder-config.pl.new && \ mv Cm1.0.4/tinder-config.pl.new Cm1.0.4/tinder-config.pl
It’s possible for tinderbox to build from either a branch or a tag. The right way is to build releases from tags, but if you’re sure that a tag corresponds exactly to a branch, you can cheat and build from the branch instead. I usually cheat, but for the purposes of these instructions, I’m doing it the right way. First, check $BuildTag
in tinder-config.pl
to make sure it corresponds to your chosen release tag (or branch). When building from a tag (instead of a branch), pull-by-timestamp (cvs checkout -D
) must be turned off. It’s useful when building from branches. Its behavior is controlled by the $UseTimeStamp
tinderbox configuration variable. This time, I’m using:
$BuildTag = 'CAMINO_1_0_4_RELEASE'; $UseTimeStamp = 0; # Use the CVS 'pull-by-timestamp' option, or not
Other significant variables affect the name displayed on the tinderbox status page, and the names of the directories created on the FTP server:
$BuildNameExtra = 'Cm1.0.4'; $milestone = "1.0.4";
If you’re building on a branch that ships Breakpad instead of Talkback, make sure that Talkback is not shipped (and that Breakpad symbols are collected and uploaded):
$shiptalkback = 0; $crashreporter_buildsymbols = 1; $crashreporter_pushsymbols = 1; $ENV{SYMBOL_SERVER_HOST} = 'dm-symbolpush01.mozilla.org'; $ENV{SYMBOL_SERVER_USER} = 'caminobld'; $ENV{SYMBOL_SERVER_PATH} = '/mnt/netapp/breakpad/symbols_camino/'; # this is optional, it's a full path to a ssh private key $ENV{SYMBOL_SERVER_SSH_KEY} = "$ENV{HOME}/.ssh/id_dsa";
This is also a good time to make sure you have not made any relevant changes to the tinder-config.pl
for your release tinderbox since the last release (remember that you are simply copying the previous release’s tinder-config.pl
file, not starting with the tinder-config.pl
in cvs that is used by the nightly builds, so it is important to check for changes made to nightly configuration that also will be needed by an official release). You’ll want to make sure to check the mozconfig
in a similar fashion. (Luckily, tinderbox changes to files other than build-camino.pl
and post-mozilla.pl
are propagated automatically due to symlinks.) You can sanity-check your changes by diff
ing these files against their counterparts in the nightly directory and comparing the changes to the ones you just made above.
Now, edit multi-tinderbox
’s config so that it knows to build the release. Since we don’t have much spare “room” on the tinderbox, I temporarily disable the base branch build while it’s doing a release. In this case, I’m commenting out Cm1.0-M1.8.0
and adding a Cm1.0.4
entry. Later, when the release is built, I’ll comment out Cm1.0.4
and turn Cm1.0-M1.8.0
back on. multi-tinderbox
reloads its configuration when it receives a SIGHUP
; when it finishes the build it’s working on, it’ll start over at the top of the list in its config. For that reason, I like to put the release build I’m doing at the top of multi-config.pl
.
vi /builds/tinderbox/multi-config.pl
The relevant snippet would look something like this:
$ENV{'CVS_RSH'}='ssh'; $ENV{'TBOX_CLIENT_CVS_DIR'}='/builds/cvs/mozilla/tools/tinderbox'; $BuildSleep = 5; $Tinderboxes = [ { tree => "Cm1.0.4" }, # { tree => "Cm1.0-M1.8.0" }, { tree => "Cm1.1-M1.8" }, { tree => "CmTrunk" }, ];
And then tell multi-tinderbox
to reload when the current build finishes:
kill -HUP `cat /builds/tinderbox/multi.pid`
When the release build begins, go to the Camino tinderbox page, click “Administrate Tinderbox Trees” (it should say “Administer,” but whatever), and turn on log scraping for the new build. Do it before the first build completes. If you don’t do this step, it’s no big deal, but the (hopefully green, possibly orange or red) box on tinderbox won’t show test results.
If something goes wrong, fix it. Use the tinderbox logs to your advantage. If you’ve got to move a tag or something, you can refer to the “fix-it” section above where I fixed ad_blocking.css
, remembering that at this point, you’ve got both a _MINIBRANCH
and _RELEASE
tag to worry about.
If you need to trigger a new release build,
rm /builds/tinderbox/Cm1.6.7/Darwin_8.10.2_Depend/last-built
and tinderbox will generate a new release build next cycle.
If Talkback symbol upload appears to fail (as it did with Camino 1.6.7 RC2), you can try again by running
./builds/tinderbox/Cm1.6.7/Darwin_8.10.2_Depend/2009032711/upload-symbols.sh
If Sam is around, you can bug him to check the Talkback symbol server to ensure that your re-upload succeeded.
For Breakpad symbols, you can try again by running the following scripts:
./builds/tinderbox/Cm2.0b3/Darwin_8.10.2_Depend/2009060219/upload-symbols-i386.sh ./builds/tinderbox/Cm2.0b3/Darwin_8.10.2_Depend/2009060219/upload-symbols-ppc.sh
You can check the Breakpad server for symbols by visiting
http://symbols.mozilla.org/symbols_camino/Camino-2.0b3-2009060219-i386-symbols.txt
http://symbols.mozilla.org/symbols_camino/Camino-2.0b3-2009060219-ppc-symbols.txt
and constructing the path to the symbols mentioned in the file.
Since symbol upload failures don't trigger a color change or some sort of visible entry on the waterfall, it is important for you to check the log to make sure that generation and upload succeeded.
If you know when the release date is scheduled, now is a good time to file the Bouncer bug (release, milestone) so that you don’t forget to do so later, particularly if the person doing the website updates is doing so at the last moment.
Now is also a good time to get the new Breakpad reports set up on crash-stats.
Stage it
Once the build is done, test it. It’s not evil to get other people to help test the build with you, just pass them the URL to the “nightly” that tinderbox uploaded. If it seems reasonable, stage it and let people know. When possible, it’s nice to let the localization team know that a build is ready and give them time to prepare the multilingual version, and then stage the en-US and multilingual versions together when everything is ready.
ssh stage.mozilla.org cd /home/ftp/pub/camino/releases cp -p ../nightly/2007-02-28-13-1.0.4/Camino.dmg Camino-1.0.4.dmg chmod 644 Camino-1.0.4.dmg cp -p Camino-1.0.4.dmg en-US rm MD5SUMS LC_ALL=C bash md5sum * > MD5SUMS chmod 644 MD5SUMS exit exit
Stage the source tarball and the multilingual version when they’re ready, too. The source tarball will go in /home/ftp/pub/camino/source/camino-1.0.4.tar.bz2
, and that directory has an MD5SUMS
file as well. The multilingual release will go in
/home/ftp/pub/camino/releases/Camino-1.0.4-MultiLang.dmg
, with a copy at /home/ftp/pub/camino/releases/all/Camino-1.0.4.dmg
.
scp Camino-1.0.4-MultiLang.dmg username@stage.mozilla.org:/home/ftp/pub/camino/releases scp camino-1.0.4.tar.bz2 username@stage.mozilla.org:/home/ftp/pub/camino/source
Be sure to use the correct filename when copying the MultiLang version to releases/all/
. Also be sure to regenerate the MD5SUMS
file in releases/
if you generated it before staging the MultiLang version.
After you've successfully staged the release, you can clean up its nightly/latest-1.6.8/
directory. Assuming you’re in /home/ftp/pub/camino/releases
on stage:
rm -rf ../nightly/latest-1.6.8/
Create a source release
We provide source tarballs for major releases (not alphas, betas, or release candidates). Check out a fresh tree using anonymous CVS, so that the CVS/Root
files are correct for people bootstrapping anonymous CVS workspaces. If the .tar.bz2
file doesn’t wind up at about 33MB (for the 1.8.0 branch), something’s probably wrong.
touch ~/.cvspass CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot \ cvs checkout -r CAMINO_1_0_4_RELEASE mozilla/client.mk mozilla/camino/config cd mozilla MOZCONFIG=`pwd`/camino/config/mozconfig make -w -f client.mk checkout rm .mozconfig.mk .mozconfig.out cd .. chmod -R a+rX mozilla BZIP2=-9 tar --owner 0 --group 0 -jcf camino-1.0.4.tar.bz2 mozilla
Stage the source release as described above in Stage it. Don't forget to remove the mozilla
directory created when checking out the source.
Have someone else set up Breakpad reports
Poke your friendly security-group member to add Socorro reports for the release and the next “pre” version using the Branch Data Sources “add new product version” link on the Admin page on crash-stats.
Other things to do
Your job as a branch tag build release-master is done. It’s time to sit back, relax, and watch as other people do other things. If you needed to modify the procedure in any way, now would be an excellent time to update this document.
- Wait for mirror propagation from
stage.mozilla.org
to all of the systems handlingreleases.mozilla.org
,ftp.mozilla.org
, and other mirrors. - Have someone on the build team update bouncer. File a bug in the “mozilla.org:Build & Release” component, or e-mail build@mozilla.org. If you forget how to accomplish this step, ask Reed. He’s always happy to remind us.
- Someone’s got to update the website, the web site, or both.
- Some releases include a “release notes” URL that needs to be populated with content or a redirect. The release notes URL is defined as
ReleaseNotesDefault
incamino/resources/application/WebsiteDefaults.strings
and is updated as part of the release checklist. The URL used in Camino 1.0.4 is [1], which redirects to [2]. - Don’t forget to restore the Tinderbox configuration in
multi-config.pl
and forcemulti-tinderbox
to reload its configuration withSIGHUP
, as described in the Make Tinderbox build it section.