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

Re: Upstream using git submodules



On 03/12/15 10:51, Diego M. Rodriguez wrote:
On Wed, Dec 02, 2015 at 02:41:20PM +0000, Ghislain Vaillant wrote:
You can have a look at the ArrayFire package that I personally maintain,
which also relies on submodules.

Thanks a lot for the prompt answer and for the hints, Ghis, as well as for the
pointer to the ArrayFire package: it's been very helpful and informative!
Unfortunately, I still have some follow-up questions after spending some time
testing and reviewing the documentation for gbp and related tools.

- Use the upstream git repository and gbp with the --git-submodules option
(which is the solution I use with ArrayFire).

I have been trying to follow this route, aiming to have a minimal working
example of a repository that produces a package with the submodules fetched:

$ git clone --no-checkout -o upstream https://github.com/jamesturk/jellyfish.git
$ cd jellfish
$ git checkout -b upstream/v0.5.1 0.5.1
$ git checkout -b debian/sid 0.5.1
$ mkdir debian; vim debian/...
(debian/gbp.conf includes submodules = True on buildpackage section)
$ git add debian; git commit -a

At this point, my struggle is how to have a proper pristine branch - is there
a way to use "pristine-tar commit" with the upstream .orig.tar.gz file, that
fetches the submodules when building the package? The closest I get is:
$ git-buildpackage --git-no-pristine-tar --git-submodules --git-upstream-branch=upstream/v0.5.1

You were close, there is a --git-pristine-tar-commit option that does just that ;-)

So your final command should be:

gbp buildpackage --git-upstream-tag=upstream/v0.5.1 --git-debian-branch=debian/sid --git-submodules --git-no-pristine-tar --git-pristine-tar-commit

But I'm not sure if this kind of defeats the purpose, as the generated
.orig.tar.gz differs from the upsteam one by including the submodules contents.
Could you please let me know if there is a better, more solid approach?

The pristine tarball must include the content of the submodules for the builders to be able to build your source package. All the builders need to build a package is a source tarball, a debian tarball and a .dsc.

Ghis


Reply to: