[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Testing git-debrebase/dgit in the linux git repo



As discussed in yesterday's meeting, I've been investigating git-
debrebase and dgit as tools for maintaining the linux source package
with upstream included.  It seems like they could make it a lot easier
to add and rebase patches, while maintaining some patch history and
fast-forward branches (unlike a regular git rebase).

Both tools are in the dgit package, and there is a tutorial in the
dgit-maint-debrebase(7) manual page.

Using these tools requires three main changes to the git repository:

1. The upstream code, with full history, is merged into Debian
branches.

This makes the git repository substantially larger.  This may be a
problem for some users checking out development versions.  We might
need to modify instructions in debian-kernel-handbook and elsewhere to
recommend a clone with limited depth.

Currently we merge between the sid and master branches, but the
corresponding upstream branches are not (and should not be) merged.  We
may need to implement a custom merge strategy to make this work.  It
sems that git-debrebase does not (yet) deal well with merges; see the
description of the "--experimntal-merge-resolution" option in its
manual page.

2. Debian changes to upstream code are applied as commits.  The
debian/patches directory is created and committed by dgit only as
necessary.

This means that "git cherry-pick", "git am" etc. should work.  We will
still need to add DEP-3 pseudo-headers to the commit message though. 
We can use a "Gbp-Pq: Topic ..." trailer in the commit message to
organise changes into topics, which are mapped to subdirectories.

I wrote a check-commits script (paralleling check-patches.sh) which
checks for the expected DEP-3 pseudo-headers in Debian commits to the
upstream code.  check-patches.sh will only operate on featureset
patches, which still have to be managed as patches-in-git.

I also updated the genpatch-* scripts and makefiles to cope with this.

3. All generated files in the source package will be included in Debian
branches.

dgit requires that the git tree corresponding to some version of a
Debian source package exactly matches the unpacked package, with the
exception of the .pc directory for a 3.0 (quilt) package.

The only generated files which really need to be present in the source
package are debian/control and debian/tests/control.  We also need to
include debian/control.md5sum so that a stale debian/control file can
be detected.  I made changes to debian/bin/gencontrol.py and
debian/rules to enable this behaviour.  I also changed the way
debian/changelog is checksummed so that debian/control.md5sum won't
change so often.

---

A dgit-suitable version of the master branch now exists, named dgit-
master.  This is experimental, so DO NOT USE THIS BRANCH to build and
upload source packages.  But please do try making changes to this
branch in parallel to your changes to the master branch.

All the changes I described above are only on this branch, not the
master branch.

The initial conversion from debian/patches to git commits is done using
gbp-pq, which can lose headers (bug #905934).  I used a locally patched
version for the conversion.

Ben.

-- 
Ben Hutchings
Sturgeon's Law: Ninety percent of everything is crap.

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: