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

pristine tarball generator

(Reposted here with additions from my blog, for people who don't read that.)

Keeping pristine upstream tarballs around is a pain, especially when working
in a team. Wouldn't it be nice to be able to keep them in revision control?
Except, it would use far too much disk...

Here's a solution. It generates a binary delta between the pristine
upstream tarball and a tarball created using files checked out of the
repository. The delta should be quite small, and any checkout of the
repository that has the same file contents as that used to create the
delta can be used to regenerate the pristine tarball.

Example (which would presumably be more fun and faster if I used git,
but works well enough):

joey@kodama:~package/uqm-voice> svn switch svn+ssh://uqm.debian.net/srv/svn/uqm/tags/uqm-voice/upstream_version_0.3
D    debian
A    comm/blackur/black041.ogg
U    comm/shofixt/shofi040.ogg
U    comm/starbas/starb182.ogg
D    comm/slyland/slyla030.ogg
U    comm/chmmr/chmmr035.ogg
U    comm/supox/supox031.ogg
Updated to revision 223.
joey@kodama:~package/uqm-voice> pristine-tar extract ~/uqm-voice.delta ../uqm-voice_0.3.orig.tar.gz

A quick svn switch back to trunk and the package is ready for building.
The generated tarball is bit-identical to the 19 MB upstream tarball,
though you have to gunzip them both to check this, since the gzip
compression differs. 

The 41k uqm-voice.delta file was created earlier as follows; normally
this would happen when packaging the new upstream version, and it could
be checked into revision control.

joey@kodama:~> pristine-tar stash lib/debian/unstable/uqm-voice_0.3.orig.tar.gz uqm-voice.delta

I've uploaded pristine-tar to incoming or see

I'm hoping that some people will find this useful and support for it
will get into svn-buildpackage, git-buildpackage, etc. I think it could
be significantly simpler and easier to use than the complex dance
svn-buildpackage uses to try to find or download an upstream tarball,
and it could make git-buildpackage's existing code to try and create an
.orig.tar.gz much more accurate.

see shy jo

Attachment: signature.asc
Description: Digital signature

Reply to: