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

Bug#876667: RFS: pragha/1.3.3-1



Hi Gabriel,

thanks for the git link, makes things easier for me.

> Where did you get pragha-1.3.3.tar.gz from?
> I got it from
> https://github.com/pragha-music-player/pragha/archive/v1.3.3.tar.gz.

I got the same one (but I used `uscan -dd` to download, which uses the
debian/watch file and also renames it according to the rules in that
file).

> The files are not exactly the same, as you mentioned, but their
> contents, after extraction, are identical.

Technically I think it's sufficient if the contents is the same.
However, if you need to release a 1.3.3-2 version of pragha later, your
source package (.dsc) needs to reference (by hash) exactly the same orig
tarball you used for the 1.3.3-1 upload (see last paragraph of policy
5.6.21 [1]).

When using git and multiple computers, that means you pretty much have
to use pristine-tar anyways to satisfy this requirement, and I
personally prefer the tarball distributed with Debian to match exactly
the upstream one.

[1] https://www.debian.org/doc/debian-policy/#files

> >  If you use git and git-buildpackage, make sure to use the
> >  "pristine-tar" feature.  When using this, a small delta file will
> > be added to a special pristine-tar branch.  This allows to
> > reconstruct the original tarball exactly as it was.  
> 
> I wasn't aware of git-buildpackage, so I was making the tarball by
> hand and building with debuild.  Thanks for pointing this out.  On
> the other hand, I still do not understand how git-buildpackage
> works.  All my attempts to use it still resulted in a source tarball
> (.orig.tar.gz) that is not exactly the same as the tarball from
> upstream.

If you want to keep using git-buildpackage, I'd suggest you do the
following:

Add a file debian/gbp.conf with the following contents and commit it:
===
[DEFAULT]
pristine-tar = True
upstream-tag = upstream/v%(version)s

[buildpackage]
ignore-branch = True
===
this allows you to use the gbp commands without specifying the same
parameters over and over.  It also makes working with the repository
easier for someone else.

Then, to make use of pristine-tar, do the following from the root of
your git repository:
* Remove the orig.tar.gz from the parent directory (if present), e.g.:
  rm -f ../pragha_1.3.3.orig.tar.gz
* Re-download it from github, e.g. using your debian/watch file via
  uscan: `uscan -v -dd` (the -v is just so you see what's going on).
  If you download it manually you need to rename it.
* Now, add the pristine-tar delta files:
  pristine-tar commit ../pragha_1.3.3.orig.tar.gz

That's it (and it is only required once); if you build the package now
using git-buildpackage, it will reconstruct the original tarball
exactly as it is on github. :)


And, for the future, if you want to update to a new version of pragha
you can use `gbp import-orig --uscan`. This will use debian/watch to
download the newest version from github, update the upstream branch,
tag it, merge it with your packaging branch and also update the
pristine-tar branch.

Regards
Lukas


Reply to: