[Debian-med-packaging] Inconsistencies in pristine-tar of several packages

rf at q-leap.de rf at q-leap.de
Sat May 17 14:52:22 UTC 2014


Hi,

when working on backports of some DebMed packages, I discovered
inconsistencies in the pristine-tar branch. Example packages:
bambamc, libbio-graphics-perl, python-htseq

Example case bambamc:

$ git clone https://alioth.debian.org/anonscm/git/debian-med/bambamc.git
Cloning into 'bambamc'...
$ cd bambamc
$ git branch --track pristine-tar remotes/origin/pristine-tar
Branch pristine-tar set up to track remote branch pristine-tar from origin.
$ git checkout pristine-tar
Switched to branch 'pristine-tar'
$ ls
bambamc_0.0.49.orig.tar.gz.delta  bambamc_0.0.49.orig.tar.gz.id
$ cat bambamc_0.0.49.orig.tar.gz.id
42e2174057f8272780c3d112fb6933d1df9dde12
$ git checkout 42e2174057f8272780c3d112fb6933d1df9dde12
fatal: Cannot switch branch to a non-commit.

The reason why this goes by unnoticed is, that git-build-package actually
doesn't check the <pkg>_<upstream_version>.orig.tar.gz.id file where the
commit id corresponding to the upstream tag of <upstream_version> should
be stored. Rather it browses the commit log, looks for a commit message
corresponding to the pristine tar commit and then explicitly creates the 
the orig.tar.gz (see the verbose output below).

-----Output of git-buildpackage  --git-pristine-tar --git-verbose ------
gbp:debug: ['git', 'log', '--pretty=format:%H', '--grep=pristine-tar .* bambamc_0.0.49\\.orig.tar\\.', 'pristine-tar', '--']                                          
gbp:debug: Found pristine-tar commit at '974d7a19102e9845111ccfc0366495a44083fb9f'
gbp:debug: ['git', 'log', '-n1', '--pretty=format:%s', '974d7a19102e9845111ccfc0366495a44083fb9f']                                                                    
gbp:debug: Determined compression type 'gzip'
gbp:debug: ['git', 'branch', '--no-color']
gbp:debug: /usr/bin/pristine-tar [] ['checkout',
'/archive/nfehren/pkg/upstream/debmed/bio-dev/bambamc/bambamc_0.0.49.orig.tar.gz']                                   
-------------------------------------------------

Now the following questions arise (in general but explained using bambamc):
- is <pkg>_<upstream_version>.orig.tar.gz.id ignored on purpose? If yes,
  what's its use?
- What happened to the git repo that the commit id referenced in
  bambamc_0.0.49.orig.tar.gz.id got lost?
- Shouldn't we fix bambamc_0.0.49.orig.tar.gz.id to contain the correct
  commit $(git show-ref --tags -s upstream/0.0.49)

In my opinion <pkg>_<upstream_version>.orig.tar.gz.id should hold a
valid git sha1 corresponding to the commit where the corresponding
upstream source was imported. Only that way, the correspondence between
the imported upstream source and the tar generated by pristine-tar
checkout can be unambiguously established. Of course, you might argue
that building the source package will fail if its not so, but I wouldn't
consider that clean development ...

Maybe more recent versions of git-buildpackage work differently (didn't
have the time to check), but I doubted since then somebody should have
noticed the inconsistencies.

-- 
Roland

-------
http://www.q-leap.com / http://qlustar.com



More information about the Debian-med-packaging mailing list