Re: Clinica package
On Fri, Jan 13, 2012 at 09:05:37AM +0900, Charles Plessy wrote:
> short summary: you can ignore the pristine-tar branch if you use apt-get source
> or debian/rules get-orig-source.
Sure, that's what I'm used to do always. However, I was told with
git-buildpackage there is no need to have this tarball separately
because everything will be organised automagically by pristine-tar.
> Perhaps you did not update the pristine-tar branch before trying to build the
> package ? The commande ‘gbp-pull’ will do this conveniently for you.
I simply assumed that a `git pull` would simply do the right thing and
I guess this assumption is valid:
$ gbp-pull
gbp:info: Branch 'master' is already up to date.
gbp:info: Branch 'upstream' is already up to date.
gbp:info: Branch 'pristine-tar' is already up to date.
> Otherwilse, it can be done simply by checking out the pristine-tar branch,
> pulling (‘git pull’), and checking out the master branch again. The same
> applies the upstream branch.
This implyes that
git pull && git-buildpackage
is the proper way to build a package (which was not in my case with the
clinica package)
> Normally, it would not matter to work with pristine-tar or not: if the package
> is already uploaded, ‘apt-get source’ can provide the reference upstream
> sources, so that git-buildpackage does not need the upstream and pristine-tar
> branches. The problem arises when ‘debian/rules get-orig-source’ does not
> produce tarballs with stable MD5 sums. In our standard workflow, the one who
> uploads defines the MD5 fingerprint of the tarball that will be in the Debian
> archive. With the pristine-tar workflow, it is the one who updates the Git
> repository who defines what should be uploaded. This opens the way to
> potential problems.
IMHO, *.tar.bz which is the case for clinica does not have the same
problem as gz and files are identical. Or am I wrong here?
> One part of the solution is to work on the get-orig-source target to force
> it to make as stable MD5 fingerprints as possible.
>
> Note also that at anytime you can work with tarballs produced by the
> get-orig-source target, even if their MD5 fingerprint fluctuates. It is
> just that if you upload the package, then the pristine-tar branch will be
> inaccurate.
>
> The other part of the solution is therefore to find or write a tool that allows
> to easily align the pristine-tar branch with the Debian archive.
>
> About just keeping the debian directory; I would not like it. Having the
> upstream source checked in is an addictive convenience for bug hunting, and
> also for copyright checking and other inspections done during upgrades. This
> is one of my main motivations for using Git. And within that workflow, the
> pristine-tar branch helps me to work off-line.
I could accept this if it would work as expected but as I had it always
caused trouble to me (I do not say that it's not me who missunderstood
the process - but it should work solid enough that it is error prone).
After following David's hint
pristine-tar checkout clinica_0.2.1~dfsg.orig.tar.bz2
I got the orig tarball - but I got it inside the working dir. However
git-buildpackage is expecting it in ../tarballs.
$ git-buildpackage -k "Andreas Tille <tille@debian.org>"
...
gbp:info: Orig tarball 'clinica_0.2.1~dfsg.orig.tar.bz2' not found at '../tarballs/'
(That's identical to svn-buildpackage so it is convinient.)
So I moved it to this location and got:
$ git-buildpackage -k "Andreas Tille <tille@debian.org>"
dh clean
dh_testdir
dh_auto_clean
dh_clean
./waf --nocache distclean
'distclean' finished successfully (0.000s)
rm -f gschemas.compiled
if test -d "waflib"; then find waflib -name "*.pyc" -delete; fi
gbp:info: Orig tarball 'clinica_0.2.1~dfsg.orig.tar.bz2' found at '../tarballs/'
gbp:info: Exporting 'HEAD' to '/home/tillea/debian-maintain/alioth/debian-med_git/build-area/clinica-tmp'
gbp:info: Moving '/home/tillea/debian-maintain/alioth/debian-med_git/build-area/clinica-tmp' to '/home/tillea/debian-maintain/alioth/debian-med_git/build-area/clinica-0.2.1~dfsg'
/bin/sh: 1: Syntax error: end of file unexpected
gbp:error: ~/bin/git-pbuilder returned 2
gbp:error: Couldn't run '~/bin/git-pbuilder -k Andreas Tille <tille@debian.org>'
Uhmmm? Should I stick to my old habit and just unpack the tarball
somewhere else and copy the debian/ dir into it. I never made
friends with svn-buildpackage and I somehow feel it will be the
same with git-buildpackage. :-(
Kind regards
Andreas.
--
http://fam-tille.de
Reply to: