git-build-recipe's pristine-tar support assumes the pristine-tar branch name upstream

Bug #1683914 reported by Robie Basak
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
git-build-recipe
New
Undecided
Unassigned

Bug Description

Our git importer has to differentiate between Debian and Ubuntu, so provides two separate pristine-tar branches under two separate names. This accommodates the cases where Debian and Ubuntu did not share identical orig tarballs.

We need a mechanism to specify the remote pristine-tar branch name in a build recipe, or alternatively we need a more general mechanism to create a branch locally that tracks an arbitrary remote branch.

Use case: I'm trying to combine the server team's git importer work with automatic build recipes in order to be able to automatically maintain specific deltas against Ubuntu in PPAs. The general idea is to be able to create a delta once (by branching from the imported repository) and then to leave the rest to automation. The importer will update its git repo, which will cause the build recipe to fire, merge in the pre-determined changes and build a patched version in a PPA (with a higher version than the archive).

Expected behaviour: git-build-recipe manages to find the pristine-tar branch I wish it to use, presumably by specifying it using some appropriate syntax in the build recipe.

Actual behaviour: git-build-recipe fails to find the pristine-tar branch imported by the git importer. It either fails, or if --allow-fallback-to-native is provided then it falls back by converting to a native package.

Revision history for this message
Maarten Fonville (maarten-fonville) wrote :

Sorry, I am not very acquinted with git-build-recipe, but is this issue the same cause as the problem I experience when trying to build a debian upstream git with a recipe: https://code.launchpad.net/~maarten-fonville/+recipe/cargo-daily

and then hitting this error:
# git-build-recipe format 0.4 deb-version {debupstream}-0~{revtime}
lp:~maarten-fonville/cargo/+git/trunk debian/sid

RUN ['git-build-recipe', '--safe', '--no-build', '--manifest', '/home/buildd/build-RECIPEBRANCHBUILD-1374084/chroot-autobuild/home/buildd/work/tree/manifest', '--distribution', 'artful', '--allow-fallback-to-native', '--append-version', '~ubuntu17.10.1', '/home/buildd/build-RECIPEBRANCHBUILD-1374084/chroot-autobuild/home/buildd/work/recipe', '/home/buildd/build-RECIPEBRANCHBUILD-1374084/chroot-autobuild/home/buildd/work/tree']
fatal: ambiguous argument 'bc12196f047d0385f14f42873cf61c9575015b25^{tree}': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
fatal: Not a valid object name
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
pristine-tar: command failed: git archive --format=tar bc12196f047d0385f14f42873cf61c9575015b25\^\{tree\} | (cd '/tmp/pristine-tar.eECyyROHMg' && tar x)
Traceback (most recent call last):
  File "/usr/bin/git-build-recipe", line 9, in <module>
    load_entry_point('git-build-recipe==0.1', 'console_scripts', 'git-build-recipe')()
  File "/usr/lib/python3/dist-packages/gitbuildrecipe/main.py", line 164, in main
    package_version.upstream_version, working_basedir)
  File "/usr/lib/python3/dist-packages/gitbuildrecipe/deb_util.py", line 74, in extract_upstream_tarball
    cwd=path)
  File "/usr/lib/python3.5/subprocess.py", line 581, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['pristine-tar', 'checkout', '/home/buildd/build-RECIPEBRANCHBUILD-1374084/chroot-autobuild/home/buildd/work/tree/cargo_0.17.0.orig.tar.gz']' returned non-zero exit status 2

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.