Git import fails when GPG-signed

Asked by Giovanni Santini on 2017-02-17

Problem (TL;DR): As in title.

I set up a git import for FreshPlayerPlugin in order to have automated daily builds.
I was reported that autobuilds were not available even though commits were available upstream.
I've noticed then that automatic imports were failing.
So I tried to run an import and I had this error log:

2017-02-17 11:55:24 INFO
Traceback (most recent call last):
  File "/srv/", line 106, in <module>
  File "/srv/", line 101, in main
  File "/srv/", line 617, in run
    return self._doImport()
  File "/srv/", line 820, in _doImport
  File "/srv/", line 722, in fetch
    self.fetch_objects(stop_revision, fetch_tags=fetch_tags, limit=limit)
  File "/srv/", line 745, in fetch_objects
    determine_wants, self.source.mapping, limit=limit)
  File "/srv/", line 718, in fetch_objects
  File "/srv/", line 484, in import_git_objects
  File "/srv/", line 334, in import_commit
    raise UnknownCommitExtra(commit, [item[0] for item in commit.extra])
bzrlib.plugins.git.errors.UnknownCommitExtra: Unknown extra fields in <Commit af485a6d8f860929f696a4d296c013e506cf4e66>: ['gpgsig'].
Import failed:
Traceback (most recent call last):
Failure: twisted.internet.error.ProcessTerminated: A process has ended with a probable error condition: process ended with exit code 1.

A possible solution would be to totally drop the GPG signature field...
Else, the good solution would be to implement GPG signature support for commits.

The involved git import:
The full failed git import log:

Question information

English Edit question
Launchpad itself Edit question
No assignee Edit question
Last query:
Last reply:
Naël (nathanael-naeri) said : #1

I've found a bug related to your question: bug 1084403. As far as I can understand, it cannot be fixed by simply ignoring the gpgsig field in the git commit, and it will not be fixed by supporting this field either.

As far as I understand, the recommended way to deal with Git repositories that have GPG-signed commits is to import the code as a Git repository on Launchpad (yes, it's apparently possible now, I wasn't aware of that) instead of importing it as a Bazaar branch, i.e. use the git-to-git feature instead of the bzr-git plugin.

See bug 1084403 comments 46 and 48, bug 1653794 comment 1, question 303648 comment 1, and:

Colin Watson (cjwatson) said : #2

Yes, Nathanaël is right: please just use Git-to-Git imports if you possibly can. They're much simpler and more robust. It's unlikely that the gpgsig problems with Git-to-Bazaar imports will be fixed, at least not in the near future.

Giovanni Santini (itachi-san) said : #3

The fact is that I am working on Precise 12.04, which does not support Git build recipes.
I will try to backport the relevant packages...
Else I will have to work it in another way. Sigh.

Colin Watson (cjwatson) said : #4

Why do you say that precise does not support Git recipes? It should work fine.

Giovanni Santini (itachi-san) said : #5

@cjwatson, there's no 'git-build-recipe' package for precise.

At [1] there's a link to a PPA but the backports stop at trusty.


Colin Watson (cjwatson) said : #6

Sure, but does that actually matter? git-build-recipe is just used for building the source package. Launchpad currently always runs git-build-recipe on xenial regardless of the target series; there's then a separate build job that builds binary packages, which runs on precise or whatever the target series is.

Giovanni Santini (itachi-san) said : #7

@cjwatson OK, that's useful to know.
So I will just create a chroot to test out the recipe and that will be fine, I suppose.

Can you help with this problem?

Provide an answer of your own, or ask Giovanni Santini for more information if necessary.

To post a message you must log in.