Bzr
Using bzr to Manage Extension Packages
New Upstream Version of Existing Extension
When a particular extension project releases a new version, we need to release a corresponding package in ubuntu. This is called a new upstream release. Among other things, we will need to update the source, change the package version numbers and perform changelog maintenance. This is a step-by-step guide to updating a package for a new upstream release.
NOTE: I will be using the firebug extension as an example of how to update a package's new upstream source.
Make sure you have the latest XPI.TEMPLATE
bzr branch http://bazaar.launchpad.net/~mozillateam/firefox-extensions/XPI.TEMPLATE
Create a local branch of the current ubuntu package. We will treat this as the upstream from here on out, so lets call it that to avoid confusion.
bzr branch http://bazaar.launchpad.net/~ubuntu-dev/firefox-extensions/firebug.ubuntu firebug.upstream
Download a new version of the upstream project. This can be accomplished in a number of ways - in the case of firebug, they use svn via google code.
svn co http://fbug.googlecode.com/svn/branches/firebug1.2
- cd .ubuntu branch
- bzr merge /path/to/upstream/branch
- dch -vNEWUPSTREAMVERSION-0ubunu1 -DUNRELEASED
- edit changelog
- bzr commit -m "* merge NEWUPSTREAMVERSION from .upstream branch"
- testbuild, fix package; rinse, repeat
- dch -r
- bzr commit -m "* RELEASE NEWUPSTREAMVERSION-0ubuntu1 to ubuntu/intrepid"
Work in progress beyond this line
using one branch for both .upstream and .ubuntu
Find upstream revision number in branch log
bzr log lp:nspluginwrapper
Branch upstream branch using that revision number
bzr branch lp:nspluginwrapper -r UPSTREAM-REVISION upstream
Branch ubuntu branch
bzr branch lp:nspluginwrapper ubuntu.VERSION-XubuntuY
Copy over new source to the upstream branch
cd upstream cp -r ../new-source . bzr commit -m "New upstream version a.b.c"
Merge updated local upstream branch with the ubuntu branch
cd ../ubuntu.VERSION-XubuntuY bzr merge ../upstream
Configure .bzr-builddeb/default.conf to specify upstream branch revision ID
editor .bzr-builddeb/default.conf
Check REVISION-ID of your upstream commit in 'bzr log --show-ids'. .bzr-builddeb/default.conf:
[BUILDDEB] merge = True export-upstream = . export-upstream-revision = revid:REVISION-ID
Commit changes produced by merge and configuration of .bzr-builddeb/default.conf
bzr commit -m "Merge with upstream revision UPSTREAM-REVISION+1
Apply the rest of your packaging changes
dch -vNEWUPSTREAMVERSION-0ubuntu1 -DUNRELEASED change-1 change-2 ... bzr commit -m "changes..."
Release it...
dch -r bzr commit -m "RELEASE VERSION-XubuntuY to ubuntu/name"
MozillaTeam/Extensions/Bzr (last edited 2009-01-02 10:25:07 by cable-89-216-185-198)