#915663 git-buildpackage: submodules vs tarball autogeneration

#915663#5
Date:
2018-12-05 17:17:53 UTC
From:
To:
Dear Maintainer,

Thanks for git-buildpackage, fantastic software I use it daily.

I'm packaging ASynK, see https://salsa.debian.org/debian/ASynK the tip
of branch "debian", commit c4aab5f.  The upstream repo includes
submodules, which are properly "git submodule update --init"ed.

When I try to build, with no orig.tarball, I get:

    $ gbp buildpackage --git-verbose
    gbp:debug: ['git', 'rev-parse', '--show-cdup']
    gbp:debug: ['git', 'rev-parse', '--is-bare-repository']
    gbp:debug: ['git', 'rev-parse', '--git-dir']
    gbp:debug: /bin/true [] []
    gbp:debug: ['git', 'status', '--porcelain']
    gbp:debug: ['git', 'symbolic-ref', 'HEAD']
    gbp:debug: ['git', 'show-ref', 'refs/heads/debian']
    gbp:debug: ['git', 'show-ref', '--verify', 'refs/heads/pristine-tar']
    gbp:debug: ['git', 'ls-tree', "'v2.3.1'"]
    gbp:error: 'v2.3.1' is not a valid treeish

but it certainly is a treeish!

    $ git log -1 --oneline v2.3.1
    4a6bc33 (tag: v2.3.1) Bump the release version

This still happens when I disable submodules in debian/gbp.conf.

But it works when I explicitly specify --git-upstream-tree

    $ gbp buildpackage --git-verbose  --git-upstream-tree=v2.3.1
    gbp:debug: ['git', 'rev-parse', '--show-cdup']
    gbp:debug: ['git', 'rev-parse', '--is-bare-repository']
    gbp:debug: ['git', 'rev-parse', '--git-dir']
    gbp:debug: /bin/true [] []
    gbp:debug: ['git', 'status', '--porcelain']
    gbp:debug: ['git', 'symbolic-ref', 'HEAD']
    gbp:debug: ['git', 'show-ref', 'refs/heads/debian']
    gbp:debug: ['git', 'show-ref', '--verify', 'refs/heads/pristine-tar']
    gbp:debug: ['git', 'ls-tree', 'v2.3.1']
    gbp:info: Creating asynk_2.3.1.orig.tar.gz from 'v2.3.1'
    gbp:debug: Building upstream tarball with compression <compressor type='gzip' >
    gbp:debug: ['git', 'submodule', 'update', '--recursive', '--init', '--no-fetch']
    gbp:debug: ['git', 'archive', '--format=tar', '--prefix=asynk-2.3.1/', '--output=/tmp/tmp0g6oq0j_/main.tar', 'v2.3.1']
    gbp:debug: ['git', 'ls-tree', 'v2.3.1', '-r']
    gbp:debug: ['git', 'ls-tree', '06699b08190d50cc2636b921a654d67db0a967d1', '-r']
    gbp:debug: ['git', 'ls-tree', '7771ffc058a576857851ac59a3c9da69208630b2', '-r']
    gbp:debug: ['git', 'ls-tree', '266501f6b38f7f1cf2a30b750287adce577960e8', '-r']
    gbp:debug: Processing submodule lib/.CalDAVClientLibrary (06699b08)
    gbp:debug: ['git', 'archive', '--format=tar', '--prefix=asynk-2.3.1/lib/.CalDAVClientLibrary/', '--output=/tmp/tmp0g6oq0j_/submodule.tar', '06699b08190d50cc2636b921a654d67db0a967d1']
    gbp:debug: tar ['-A', '-f', '/tmp/tmp0g6oq0j_/main.tar'] ['/tmp/tmp0g6oq0j_/submodule.tar']
    gbp:debug: Processing submodule lib/.gdata (7771ffc0)
    gbp:debug: ['git', 'archive', '--format=tar', '--prefix=asynk-2.3.1/lib/.gdata/', '--output=/tmp/tmp0g6oq0j_/submodule.tar', '7771ffc058a576857851ac59a3c9da69208630b2']
    ^Cgbp:error: Interrupted. Aborting.

It seems like these are the same thing, v2.3.1, certainly they look like
the same string.