Re: git and quilt
Jonathan Nieder <firstname.lastname@example.org> writes:
> John Goerzen wrote:
>> On Wed, Feb 03, 2010 at 04:25:40PM -0600, Matt Zagrabelny wrote:
>>> I am using git with no debian/patches (quilt/dpatch) to manage the cdpr
>> I am doing the same, for the very simple reason that every other
>> approach I've seen violates the KISS (Keep It Simple, Stupid)
>> I am not a fan of git-rebase due in part to the difficulty of working
>> with others, but also in part due to the difficulty of tracking how
>> your differences from upstream change over time. All the
>> debian/patches systems I have seen suffer from both of these flaws.
> I donâ??t strongly disagree, but consider for a moment a method that
> tries to work around these flaws. It uses dpkg source format
> 3.0 (quilt).
> There are three branches: master, upstream, and upstream+patches.
> - master: patched source (including debian/ dir)
> - upstream: upstream source
> - upstream+patches: patched source (w/o debian/ dir)
> upstream+patches is rebuilt for each new upstream version by
> cherry-picking the relevant commits. I havenâ??t scripted this, but
> it would not be hard to.
> This method has a few advantages:
> - upstream can pull directly from you if they like all your patches
> - you can work on and test the patched source by building off of the
> upstream+patches branch
> - it is easy for others to find your patches, in a form that does not
> require any forward porting.
> - if you generate your debian/patches directory with git format-patch,
> dpkg will check that master and upstream+patches tell the same story.
> If you donâ??t mind the occasional duplicate commit, for new fixes you
> can work against upstream+patches and then merge it into master, though
> I donâ??t do this.
> FWIW I have been using this method and itâ??s not so bad.
He wants to KISS. So lets make it even simpler.
- master: patched source
- upstream: upstream source
Convert to 3.0 (quilt) format and keep it out of git:
echo "3.0 (quilt)" >debian/source/format
echo "debian/patches" >>.gitignore
echo ".pc" >>.gitignore
And then to build you use (or pass it to git-buildpackage):
There is no need to manually create any patch with git format-patch.
dpkg-source will create a fresh debian/patches/debian-changes on every
build containing all your differences between upstream (well, the
orig.tar.ext) and master outside the debian dir.
The advantage of this over the 1.0 format is that it supports
orig.tar.bz2, has the debian dir as tar (so it can contain binary data
too) and changes to upstream in debian/patches/debian-changes that can
easily be extracted by upstream or for a patch tracker without having to
know your git.