I'm trying to create a snap build on launchpad for my application.

I'm able to build the application fine on launchpad normally, however the snap build is failing with the following error:

W:GPG error: http://ppa.launchpad.net/snappy-dev/tools/ubuntu yakkety InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F1831DDAFC42E99D, E:The repository 'http://ppa.launchpad.net/snappy-dev/tools/ubuntu yakkety InRelease' is not signed.

I'm not sure if this is a problem with the snapcraft.yaml that I have writted and added to launchpad : http://bazaar.launchpad.net/~bablu-boy/nutty/trunk/view/head:/snapcraft.yaml

The snap build page on launchpad is here.The build log of the latest snap build has the above error.

Appreciate any help in resolving this issue. Thanks in advance !

  • Looking at the previous build logs containing that error, it seems that you were building against yakkety. You should probably be building against xenial.
    – kyrofa
    Sep 21 '16 at 22:10
  • @Kylethanks for your suggestion. When I tried building against Xenial, I get this error: Pulling granite bzr: ERROR: exceptions.ValueError: Invalid header value 'Basic U05BUEJVSUxELTUyOTMtMTQ3NDQ5NjQ2MzphMzY4NDYwN2I0ODU0NWIyODUwNTMyMzg5ZDFlYTNm\nMA==' This probably looks like a snapcraft error. Sep 21 '16 at 22:27
  • Yeah, that's the bzr bug Colin mentioned in his answer.
    – kyrofa
    Sep 21 '16 at 23:21

This is a bit complicated, and I'm not sure I can resolve it for you on the spot. You've found a bug.

Normally, Launchpad doesn't bother to ship out public keys for the archives it asks its builders to build against, since they're all in our datacentre on trusted networks. This is maybe not ideal, but we configure sbuild to allow unauthenticated archives and so it usually only results in a cosmetic warning.

However, in this case, snapcraft is set up to borrow the build system's apt configuration in order to fetch the packages you've listed in stage-packages, and it doesn't seem to know to also borrow the configuration that allows unauthenticated archives. Thus, things fail.

I think the best fix is probably to change Launchpad to ship the necessary public keys to the builders, at least for snap builds. While it isn't strictly needed in most cases, the strange warning confuses people sometimes even when it doesn't cause a hard failure, and it would be a nice piece of hardening. Please could you file a bug about this?

Separately, I see that you're running into a bzr bug when you tried to build against the primary archive, but at least that one is known and we should have it fixed fairly soon.

Update: This is finally all fixed now. You'll need to change your snapcraft.yaml a bit for series later than xenial because they don't have valac-0.30-vapi (for yakkety, use valac-0.32-vapi, and for zesty, use valac-0.34-vapi; other changes may be needed), but that's all the kind of thing that you should be able to sort out in your build system.

  • Many thanks for your detailed explanation. I will try to read through it properly and research a bit more to make sure I file the right bug for yaketty. When I build the snap against xenial, I am getting the bug you have mentioned for the Invalid header. I will stay tured to the bug to see when it is fixed and re-try the build again. Although the last response in the bug tracker looks like the fix has been released on 9th Sep, 2016 ? Sep 21 '16 at 22:35
  • Don't worry too much about researching a super-detailed bug report. A reference to my explanation here would be fine. The bzr bug has been fixed for yakkety, but not yet for xenial. Sep 22 '16 at 11:20
  • Thanks I have filed a bug here : bugs.launchpad.net/launchpad/+bug/1626739 Sep 22 '16 at 21:00
  • Thanks Colin, I have filed a bug report here: [link] (bugs.launchpad.net/launchpad/+bug/1626739) bugs.launchpad.net/launchpad/+bug/1626739. Is there any build where I can build a snap - xenial and yaketty are out of scope for the present. Sep 22 '16 at 21:03
  • When I try to build the snap locally on my machine I get this error. Is this realted to the launchpad bug as well? Pulling granite Permission denied (publickey). ConnectionReset reading response for 'BzrDir.open_2.1', retrying Permission denied (publickey). bzr: ERROR: Connection closed: Unexpected end of message. Please check connectivity and permissions, and report a bug if problems persist. Command '['bzr', 'branch', 'lp:granite/0.4', '/home/sid/Documents/Projects/snaps/nutty/parts/granite/src']' returned non-zero exit status 3 Sep 29 '16 at 22:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.