#1057876 git-buildpackage: import-orig error when using a zipped URL

#1057876#5
Date:
2023-12-10 00:14:52 UTC
From:
To:
Dear Maintainer,

import-orig with a URL (not ending in .zip, but not sure if this is
relevant): gbp tries to use "tar" and fails uncompressing.

For example:
-------
carles@pinux:[debian/unstable]~/git/debian/python-cloudscraper$ gbp import-orig --verbose https://codeload.github.com/VeNoMouS/cloudscraper/zip/refs/heads/master
gbp:debug: ['git', 'rev-parse', '--show-cdup']
gbp:debug: ['git', 'rev-parse', '--is-bare-repository']
gbp:debug: ['git', 'rev-parse', '--git-dir']
gbp:debug: ['git', 'for-each-ref', '--format=%(refname:short)', 'refs/heads/']
gbp:debug: ['git', 'show-ref', '--verify', 'refs/heads/upstream']
gbp:debug: ['git', 'status', '--porcelain']
What is the upstream version? [] 1.2.71-git20230426.cbb3c0ea
gbp:debug: ['git', 'tag', '-l', 'upstream/1.2.71-git20230426.cbb3c0ea']
gbp:debug: tar ['-C', '../tmpntq62qy5', '-a', '-xf', '../master'] []
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Exiting with failure status due to previous errors
gbp:error: Couldn't unpack '../master': it exited with 2
-------

There is a workaround: download the file and then use gbp import-orig
from the downloaded file (in my case named as .zip).