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

dpkg source format 3.0 (git)

Henrique de Moraes Holschuh wrote:

> Given the size of the .git dir when you're not using something like stgit
> and have all objects properly packed, one could even consider shipping .git
> inside the package if it is small enough.
> Is that a proper way to do this?  Or would we need a new 3.0 format variant
> to do it right (assuming we want to do that) ?

There has been talk [1] of a format variant that uses git bundles to do
that efficiently, but nothing concrete.  To me, it seems like a good idea.

A few points [2] to keep in mind:

 - People can easily download source packages to access the original
   source and Debian changes without too much technical
   sophistication.  Even a quilt series is just a series of patches so
   it doesn’t require specialized tools.  So there is precedent for
   making it easy to access a source package from Debian.

   Will ‘git’ ever be as ubiquitous as ‘patch’?  If the source package
   is something you can ‘git clone’ to get a repository with
   appropriate ‘master’ and ‘origin/upstream’ branches, is that good
   enough?  Probably. ;-)

 - The bundle needs to be clonable without use of any external object
   repository.  The bundle ought to have branches ‘master’ and
   ‘upstream’, relevant tags, maybe a ‘pristine-tar’ branch, and not
   much extra junk.

 - To be included in Debian main, everything in the bundle should meet
   the free software guidelines (right?); practically speaking, this
   means the history would very often be cauterized when the project
   is first packaged for Debian.

   Maybe some of the damage from this could be mitigated by including
   a suitable grafts file or refs for use by ‘git replace’.

 - Including the whole history with each upload and forcing users and
   buildds to reclone with each download would be unpleasant.  (This
   can be turned around: with work, a git-based format might be able
   to decrease bandwidth use for sites like snapshots.debian.org.)

 - Bundles are hard to recreate.  If they were to be created on the
   fly some way as in the previous item, the md5sums are not stable.
   Just something to think about.

Thoughts?  Especially, if anyone would like to talk implementation,
let me know.  It sounds difficult to do right, but there’s no harm in

The easiest way to try this out now is to include a bundle in the
source tarball (ugh) and clone it at build time.  If you’re doing
that, please let me know how it goes.


[1] http://thread.gmane.org/gmane.linux.debian.devel.dpkg.general/11234
[2] Thanks to Goswin for many of these:

Reply to: