ok, using SNAPCRAFT_BUILD_ENVIRONMENT=lxd
on a cleaned project. No previous lxd container for the build present in the system.
$ snapcraft
DEPRECATED: The 'prepare' keyword has been replaced by 'override-build'
See http://snapcraft.io/docs/deprecation-notices/dn7 for more information.
Creating snapcraft-marsshooter
Device fuse added to snapcraft-marsshooter
Waiting for a network connection...
Network connection established
Hit:1 http://archive.ubuntu.com/ubuntu xenial InRelease
Get:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [107 kB]
Get:3 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
Get:4 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]
Get:5 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages [7532 kB]
Get:6 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [549 kB]
Get:7 http://security.ubuntu.com/ubuntu xenial-security/main Translation-en [232 kB]
Get:8 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [368 kB]
Get:9 http://security.ubuntu.com/ubuntu xenial-security/universe Translation-en [139 kB]
Get:10 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages [3456 B]
Get:11 http://security.ubuntu.com/ubuntu xenial-security/multiverse Translation-en [1744 B]
Get:12 http://archive.ubuntu.com/ubuntu xenial/universe Translation-en [4354 kB]
Get:13 http://archive.ubuntu.com/ubuntu xenial/multiverse amd64 Packages [144 kB]
Get:14 http://archive.ubuntu.com/ubuntu xenial/multiverse Translation-en [106 kB]
Get:15 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [840 kB]
Get:16 http://archive.ubuntu.com/ubuntu xenial-updates/main Translation-en [344 kB]
Get:17 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [681 kB]
Get:18 http://archive.ubuntu.com/ubuntu xenial-updates/universe Translation-en [275 kB]
Get:19 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 Packages [16.4 kB]
Get:20 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse Translation-en [8344 B]
Get:21 http://archive.ubuntu.com/ubuntu xenial-backports/main amd64 Packages [6756 B]
Get:22 http://archive.ubuntu.com/ubuntu xenial-backports/main Translation-en [4180 B]
Get:23 http://archive.ubuntu.com/ubuntu xenial-backports/universe amd64 Packages [7420 B]
Get:24 http://archive.ubuntu.com/ubuntu xenial-backports/universe Translation-en [3996 B]
Fetched 15.9 MB in 3s (5295 kB/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
libfreetype6
Use 'apt autoremove' to remove it.
The following NEW packages will be installed:
squashfuse
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 17.4 kB of archives.
After this operation, 54.3 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 squashfuse amd64 0.1.100-0ubuntu1~ubuntu16.04.1 [17.4 kB]
Fetched 17.4 kB in 0s (403 kB/s)
Selecting previously unselected package squashfuse.
(Reading database ... 25666 files and directories currently installed.)
Preparing to unpack .../squashfuse_0.1.100-0ubuntu1~ubuntu16.04.1_amd64.deb ...
Unpacking squashfuse (0.1.100-0ubuntu1~ubuntu16.04.1) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up squashfuse (0.1.100-0ubuntu1~ubuntu16.04.1) ...
error: no changes of type "auto-refresh" found
Looking up assertion ['account-key', 'public-key-sha3-384=BWDEoaqyr25nF5SNCvEv2v7QnM9QsfCc0PBMYD_i2NGSQ32EF2d4D0hqUel3m8ul']
Looking up assertion ['snap-declaration', 'snap-name=core']
Looking up assertion ['snap-revision', 'snap-revision=5328', 'snap-id=99T7MUlRhtI3U0QFgl5mXXESAiSwt776']
Adding assertion core_5328.assert
Installing /run/core_5328.snap
core 16-2.35 from 'canonical' installed
Stopping local:snapcraft-marsshooter
Sorry, Snapcraft ran into an error when trying to running through its
lifecycle that generated a trace that has been put in '/tmp/tmp30v1rft3/trace.txt'.
You can anonymously report this issue to the snapcraft developers.
No other data than this traceback and the version of snapcraft in
use will be sent.
Would you like send this error data? (Yes/No/Always) [no]: yes
Thank you, sent.
The log contains:
Traceback (most recent call last):
File "/snap/snapcraft/1803/bin/snapcraft", line 11, in <module>
load_entry_point('snapcraft==2.43', 'console_scripts', 'snapcraft')()
File "/snap/snapcraft/1803/lib/python3.5/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/snap/snapcraft/1803/lib/python3.5/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/snap/snapcraft/1803/lib/python3.5/site-packages/click/core.py", line 1043, in invoke
return Command.invoke(self, ctx)
File "/snap/snapcraft/1803/lib/python3.5/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/snap/snapcraft/1803/lib/python3.5/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/snap/snapcraft/1803/lib/python3.5/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/snap/snapcraft/1803/lib/python3.5/site-packages/snapcraft/cli/_runner.py", line 93, in run
ctx.forward(lifecyclecli.commands["snap"])
File "/snap/snapcraft/1803/lib/python3.5/site-packages/click/core.py", line 553, in forward
return self.invoke(cmd, **kwargs)
File "/snap/snapcraft/1803/lib/python3.5/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/snap/snapcraft/1803/lib/python3.5/site-packages/snapcraft/cli/lifecycle.py", line 136, in snap
project = _execute(steps.PRIME, parts=[], **kwargs)
File "/snap/snapcraft/1803/lib/python3.5/site-packages/snapcraft/cli/lifecycle.py", line 38, in _execute
lifecycle.containerbuild(step.name, project_config, parts)
File "/snap/snapcraft/1803/lib/python3.5/site-packages/snapcraft/internal/lifecycle/_containers.py", line 51, in containerbuild
).execute(command, args)
File "/snap/snapcraft/1803/lib/python3.5/site-packages/snapcraft/internal/lxd/_containerbuild.py", line 241, in execute
with self._container_running():
File "/snap/snapcraft/1803/usr/lib/python3.5/contextlib.py", line 59, in __enter__
return next(self.gen)
File "/snap/snapcraft/1803/lib/python3.5/site-packages/snapcraft/internal/lxd/_containerbuild.py", line 90, in _container_running
with self._ensure_started():
File "/snap/snapcraft/1803/usr/lib/python3.5/contextlib.py", line 59, in __enter__
return next(self.gen)
File "/snap/snapcraft/1803/lib/python3.5/site-packages/snapcraft/internal/lxd/_containerbuild.py", line 112, in _ensure_started
self._ensure_container()
File "/snap/snapcraft/1803/lib/python3.5/site-packages/snapcraft/internal/lxd/_project.py", line 63, in _ensure_container
self._inject_snapcraft(new_container=new_container)
File "/snap/snapcraft/1803/lib/python3.5/site-packages/snapcraft/internal/lxd/_containerbuild.py", line 316, in _inject_snapcraft
self._inject_snap("snapcraft", tmp_dir)
File "/snap/snapcraft/1803/lib/python3.5/site-packages/snapcraft/internal/lxd/_containerbuild.py", line 351, in _inject_snap
shutil.copyfile(installed, filepath)
File "/snap/snapcraft/1803/usr/lib/python3.5/shutil.py", line 114, in copyfile
with open(src, 'rb') as fsrc:
PermissionError: [Errno 13] Permission denied: '/var/lib/snapd/snaps/snapcraft_1803.snap'
This might be a snapd issue - the snapcraft snap on my host has been saved with root-only access:
$ ls -l /var/lib/snapd/snaps/snapcraft_1803.snap
-rw------- 2 root root 29302784 Aug 30 16:37 /var/lib/snapd/snaps/snapcraft_1803.snap
$ snap version
snap 2.35
snapd 2.35
series 16
neon 16.04
kernel 4.15.0-33-generic
$ snap info snapd
name: snapd
summary: Daemon and tooling that enable snap packages
publisher: Canonicalâś“
license: unset
description: |
Install, configure, refresh and remove snap packages. Snaps are
'universal' packages that work across many different Linux systems,
enabling secure distribution of the latest apps and utilities for
cloud, servers, desktops and the internet of things.
Start with 'snap list' to see installed snaps.
snap-id: PMrrV4ml8uWuEUDBT8dSGnKUYbevVhc4
channels:
stable: –
candidate: –
beta: 2.35 (754) 17MB -
edge: 2.35+git560.g955a1d8 (787) 17MB -
Aside: Why are stable and candidate channels closed?
oops, that was snapd, not core:
$ snap info core
name: core
summary: snapd runtime environment
publisher: Canonicalâś“
contact: snaps@canonical.com
license: unset
description: |
The core runtime environment for snapd
type: core
snap-id: 99T7MUlRhtI3U0QFgl5mXXESAiSwt776
tracking: stable
refresh-date: yesterday at 23:06 BST
channels:
stable: 16-2.35 (5328) 92MB -
candidate: 16-2.35 (5328) 92MB -
beta: 16-2.35 (5328) 92MB -
edge: 16-2.35+git940.75e9b53 (5390) 92MB -
installed: 16-2.35 (5328) 92MB core