Snapcraft issue during initrd driver generation
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snapcraft |
New
|
Undecided
|
Unassigned |
Bug Description
Hello,
we have an issue after the build of our kernel (used in production on private Ubuntu Core Store) during the generation of the initrd driver:
Snapcraft 2.35, 64-bit Ubuntu 16.04.3 LTS
Command launched:
"snapcraft -d --target-
Using the following snapcraft.yaml:
name: domotz-
confinement: strict
grade: stable
version: 4.9.5
summary: "A domotz-platform kernel built from source"
description: This is a kernel 4.9.5 patched to use Ubuntu Core Platform on H3
type: kernel
architectures: [ armhf ]
parts:
kernel:
plugin: kernel
source: ***private-
source-tag: 1.0.0
kdefconfig: [ domotz_
kconfigs:
- CONFIG_
- CONFIG_DEBUG_INFO=n
- CONFIG_SQUASHFS=m
- CONFIG_
- CONFIG_BT_BCM=m
- CONFIG_
- CONFIG_
- CONFIG_
- CONFIG_RTL8189FS=n
- CONFIG_
- CONFIG_SUN8I_THS=m
- CONFIG_THERMAL=m
- CONFIG_
- CONFIG_CPUFREQ_DT=m
- CONFIG_ATH9K_HW=m
- CONFIG_
- CONFIG_ATH9K_HTC=m
- CONFIG_ATH9K=m
- CONFIG_MAC80211=m
- CONFIG_
- CONFIG_
- squashfs
- sun8i-h3-
after: [firmware]
firmware:
plugin: tar-content
source: firmware.tar
--- Stacktrace --
Generating driver initrd for kernel release: 4.9.5-domotz-
Parallel unsquashfs: Using 8 processors
2 inodes (2 blocks) to write
[======
created 0 files
created 4 directories
created 2 symlinks
created 0 devices
created 0 fifos
Traceback (most recent call last):
File "/usr/bin/
load_
File "/usr/lib/
return get_distributio
File "/usr/lib/
return ep.load()
File "/usr/lib/
return self.resolve()
File "/usr/lib/
module = __import_
File "/usr/lib/
run(
File "/usr/lib/
return self.main(*args, **kwargs)
File "/usr/lib/
rv = self.invoke(ctx)
File "/usr/lib/
return Command.
File "/usr/lib/
return ctx.invoke(
File "/usr/lib/
return callback(*args, **kwargs)
File "/usr/lib/
self.
File "/usr/lib/
yield
File "/usr/lib/
return callback(*args, **kwargs)
File "/usr/lib/
return f(get_current_
File "/usr/lib/
ctx.
File "/usr/lib/
return self.invoke(cmd, **kwargs)
File "/usr/lib/
return callback(*args, **kwargs)
File "/usr/lib/
self.
File "/usr/lib/
yield
File "/usr/lib/
return callback(*args, **kwargs)
File "/usr/lib/
project_
File "/usr/lib/
execute(
File "/usr/lib/
_Executor(
File "/usr/lib/
self.
File "/usr/lib/
getattr(part, step)()
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
initrd_
File "/usr/lib/
tmp_
RuntimeError: Unable to determine mime type for '/tmp/tmpkaqag_
After some investigation seems that the "os.snap" downloaded in the following way:
Starting new HTTPS connection (1): api.snapcraft.io
"GET /api/v1/
Downloading core
Starting new HTTPS connection (1): api.snapcraft.io
"HEAD /api/v1/
Starting new HTTPS connection (1): 068ed04f23.
"GET /download-
Downloading 'os.snap'
Successfully downloaded core at /home/vagrant/
has initrd inside "boot" folder but Snapcraft searches it into "usr/lib/
Since the unsquashfs command selectively extract folders from the "os.snap" we have added "boot" folder to the command.
--- PATCH (unusquashfs.patch) ---
--- snapcraft/
+++ snapcraft/
@@ -237,7 +237,7 @@
with tempfile.
- 'unsquashfs', self.os_snap, os.path.
+ 'unsquashfs', self.os_snap, os.path.
Do you agree that this is the best solution or I miss something?
I can confirm this being issue for many other kernel snaps