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

Re: using upstream tag instead of tarball



On Fri, 13 Jul 2018 18:33:13 +0200
Emmanuel Promayon <Emmanuel.Promayon@univ-grenoble-alpes.fr> wrote:

> Dear all,
> 
> I am trying to package the new CamiTK release (release 4.1.0) and I 
> can't do it without a bit of help!
> 
> In upstream we are also using a local gitlab instance to host our 
> project (hosted on gricad-gitlab.univ-grenoble-alpes.fr).
> We want to change the way the CamiTK debian package is linked with 
> upstream. Before we always published an upstream source tarball. Now
> we would like to avoid the creation of this upstream source tarball
> and create the tarball required by apt directly from the upstream tag.
> 
> I am therefore trying to move to this new process.
> I tried to get information (especially from [1]), but I am not sure I 
> understand things very well.
> 
> This is where I am so far:
> 
> 1) I have the following ~/.gbp.conf
> 
> [DEFAULT]
> # Use pristine-tar
> pristine-tar = True
> pristine-tar-commit = True
> postbuild = lintian -iIE --pedantic $GBP_CHANGES_FILE && echo
> "Lintian OK" # Upstream tag is a number e.g. 4.1.0
> upstream-tag = %(version)s
> # working branch
> debian-branch = debian/sid
> 
> 2 ) I did the following :
> 
> git branch -m upstream old-upstream
> git remote add upstream 
> https://gricad-gitlab.univ-grenoble-alpes.fr/CamiTK/CamiTK.git
> git remote -v
> git fetch upstream

I have been a fan of using git archive for this case, and at this
point in your workflow I would try this:

git archive --format=tar --prefix=camitk-4.1.0/ 4.1.0 | xz > \
 ../camitk_4.1.0.orig.tar.xz

(presuming git has a tag 4.1.0) then using pristine-tar on that.

> git checkout -b debian/sid 4.1.0
> # here add the debian/ directory by hand
> git add debian
> git commit -m "add debian packaging dir"
> git push --set-upstream origin debian/sid
> gbp dch --debian-branch=debian/sid --snapshot --auto debian/
> 
> But I am not sure it is the right thing to do as for instance the 
> changelog now has an entry 4.0.4-3~1.gbpaa26a9 and did not take the
> tag "4.1.0" into account.
> 
> Did any one tried to move from using the upstream tarball to using an 
> upstream tag instead?
> Thanks in advance for any help or comment about what I did so far
> (which might be completely the wrong thing to do!)
> 
> Kind regards,
> Emmanuel
> 
> [1] 
> https://honk.sigxcpu.org/projects/git-buildpackage/manual-html/index.html

But I do not (yet) have a handle on how this can be automated using
new uscan features, so I am looking forward to other folks responses
on this topic.

-Maitland


Reply to: