[Pkg-samba-maint] Workflow new upstream merge in our bzr repo
Christian PERRIER
bubulle at debian.org
Wed Mar 16 06:05:53 UTC 2011
Quoting Luk Claes (luk at debian.org):
> On 03/15/2011 10:13 PM, Steve Langasek wrote:
> > On Tue, Mar 15, 2011 at 07:56:45PM +0100, Luk Claes wrote:
> >> What are the steps I should take to merge a new upstream in our bzr
> >> repository? I see that there are upstream refs, though how do they get
> >> there as upstream is still git?
> >
> > A write-up of the workflow is here:
> >
> > http://web.dodds.net/~vorlon/wiki/blog/bzr-git_case_study.html
> >
> > In particular, the last two paragraphs apply to merges of new upstream
> > versions.
>
> Thanks, I'll have a look.
Below is what I saved as "bzr-workflow.txt" in my local work
directory.
This is taken from a mail sent by Steve in March 2010 when he started
working to import cifs-utils in bzr:
(Steve talking)
I've tentatively set up a bzr repo for cifs-utils at
bzr+ssh://bzr.debian.org/bzr/pkg-samba/cifs-utils. Here are the runes for
working with the repo. Note that this uses 'bzr checkout' instead of
'bzr branch', to simplify the process and make it more svn-like. If someone
prefers to work with standalone branches (to support things like offline
commits), I'm happy to provide a crib sheet for that as well.
(And once we work out any bugs with this setup, if we decide this is what
we're going to go with, I expect I'll turn this into a blog entry so
there'll be a permanent location to find this info :)
You'll need the packages 'bzr', 'bzr-git', and 'bzr-builddeb' installed for
this. The bzr package in lenny is too old for the currently recommended bzr
repository format, so you will need to either use the bzr from testing
(2.1.0-1), or use the one from backports.org (2.0.3-1~bpo50+1). There is
currently no bzr-builddeb package on backports.org, and the ones in both
lenny *and* sid are too old for bzr 2.1. So for the moment, I recommend
using unstable or testing (perhaps in a chroot) and pulling the bzr-builddeb
package from experimental. I understand from Jelmer that a new upstream
release of bzr-builddeb should happen soon, which will let this work w/o
pulling from experimental.
For commit notifications, you will also need the package 'bzr-email', but
I'll cover that separately once it's confirmed the basics are working and
acceptable.
Also, as I said, this is a tentative repository, so I'm not opposed to
throwing away the history in here - but in order to make it a useful example
I did put together some preliminary cifs-utils packaging in parallel to the
work you were doing, Christian, and I'd like to make sure the differences in
the packaging are reconciled before this gets uploaded to the archive.
Whichever way we go, it'll also be simplest to implement if we make a
decision on a VCS as early as possible in the development, so we don't have
a lot of history to migrate.
Setting up your local working directory:
$ bzr init-repo cifs-utils
Shared repository with trees (format: 2a)
Location:
shared repository: cifs-utils
$ cd cifs-utils
$ bzr co bzr+ssh://bzr.debian.org/bzr/pkg-samba/cifs-utils/trunk
$ cd trunk
Committing changes:
$ debcommit # works the same as for svn... :)
Committing changes that aren't mentioned in the changelog:
$ bzr commit
Updating references to the upstream git repository (done if you're preparing
to merge a new upstream version, or if we want to cherry-pick a fix from
upstream, or if you just want to browse upstream changes using bzr):
$ bzr git-import git://git.samba.org/cifs-utils.git \
bzr+ssh://bzr.debian.org/bzr/pkg-samba/cifs-utils/upstream
Merging a new upstream version:
$ cd cifs-utils
$ wget ftp://ftp.samba.org/pub/samba/cifs-utils/cifs-utils-$version.tar.bz2
$ cd trunk
$ bzr merge-upstream --v3 --version $version_with_epoch \
../cifs-utils-$version.tar.bz2 -r tag:cifs-utils-$version \
bzr+ssh://bzr.debian.org/bzr/pkg-samba/cifs-utils/upstream/HEAD
No distribution specified, and no changelog, assuming 'debian'
Committing to: /tmp/tmpbzOVMs/upstream/
Committed revision 2.
All changes applied successfully.
The new upstream version has been imported.
You should now review the changes and then commit.
$ bzr diff
<review changes>
$ bzr commit -m "merge upstream $version"
Committing to: bzr+ssh://bzr.debian.org/bzr/pkg-samba/cifs-utils/trunk
modified debian/changelog
Committed revision 50.
Creating a source package (no need to download the upstream tarball -
bzr-builddeb uses pristine-tar):
$ cd cifs-utils/trunk
$ bzr bd --source -- -uc -us
Reviewing history:
$ cd cifs-utils/trunk
$ bzr log
Creating a new branch (e.g., for backports):
$ bzr branch bzr+ssh://bzr.debian.org/bzr/pkg-samba/cifs-utils/trunk \
bzr+ssh://bzr.debian.org/bzr/pkg-samba/cifs-utils/branches/lenny-bpo
$ cd cifs-utils
$ mkdir branches
$ cd branches
$ bzr co bzr+ssh://bzr.debian.org/bzr/pkg-samba/cifs-utils/branches/lenny-bpo
Any questions? Other operations that you would want to know how to do
before considering this?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-samba-maint/attachments/20110316/97be1f3d/attachment.pgp>
More information about the Pkg-samba-maint
mailing list