snapd package is missing dependency on grub-common for grub-editenv

Bug #1621745 reported by Steve Langasek
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Snappy
Fix Released
High
Unassigned
Ubuntu Image
Fix Released
Undecided
Unassigned

Bug Description

'snap prepare-image' requires grub-common to be installed in order for /usr/bin/grub-editenv to be available. Without it, snap prepare image fails as:

$ UBUNTU_IMAGE_SKIP_COPY_UNVERIFIED_MODEL=1 snap prepare-image --channel=edge ./ubuntu_image/tests/data/model.assertion /tmp/unpack
836.00 KB / 836.00 KB [====================================] 100.00 % 2.51 MB/s
2016/09/09 05:29:19.200267 image.go:203: Cannot fetch and check prerequisites for the model assertion, it will not be copied into the image: assertion not found
Fetching pc
836.00 KB / 836.00 KB [====================================] 100.00 % 2.64 MB/s
Fetching ubuntu-core
75.12 MB / 75.12 MB [======================================] 100.00 % 2.21 MB/s
Fetching pc-kernel
110.70 MB / 110.70 MB [====================================] 100.00 % 2.30 MB/s
error: failed to run command "/usr/bin/grub-editenv /tmp/unpack/image/boot/grub/grubenv set snap_kernel=pc-kernel_19.snap": "" (fork/exec /usr/bin/grub-editenv: no such file or directory)
$

No corresponding problem affects uboot, since snapd apparently implements uboot.env environment manipulation directly in go code.

Revision history for this message
Oliver Grawert (ogra) wrote :

if such a dep gets added (instaed of doing the same internal handling for grub like we do or uboot), please make sure it is arch specific else we get the grub dependencies installed on arm images

Revision history for this message
Oliver Grawert (ogra) wrote :

s/or/for/

Revision history for this message
John Lenton (chipaca) wrote : Re: [Bug 1621745] Re: snapd package is missing dependency on grub-common for grub-editenv

ogra, what's the equivalent dep for uboot arches?

I'm ignoring the fact that the map between architecture and bootloader
is more flexible than we're pretending in this bug :-)

On 9 September 2016 at 11:33, Oliver Grawert <email address hidden> wrote:
> s/or/for/
>
> --
> You received this bug notification because you are a member of Snappy
> Developers, which is subscribed to Snappy.
> https://bugs.launchpad.net/bugs/1621745
>
> Title:
> snapd package is missing dependency on grub-common for grub-editenv
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/snappy/+bug/1621745/+subscriptions

Revision history for this message
Oliver Grawert (ogra) wrote :

there is no dep needed for uboot, snapd has uboot.go and AFAIK michael was planning to do the same for grub ...
grub-common is >10MB ... grub-editenv is < 200k of this, currently i'm removing all of grub-common at image build time, only leaving the grub-editenv binary around to not bloat the images with unneeded cruft.

Steve Langasek (vorlon)
Changed in snappy:
importance: Undecided → High
Revision history for this message
Michael Vogt (mvo) wrote :

Well, this is slightly tricky. I don't want to make "grub-common" arch specific. This would mean that you can not build i386 images on an arm64 target anymore. So maybe the way forward is the native grubenv code.

Revision history for this message
Barry Warsaw (barry) wrote :

Thanks mvo. I've added a bugtask for ubuntu-image and will discuss with Steve.

Revision history for this message
Michael Vogt (mvo) wrote :
Barry Warsaw (barry)
Changed in ubuntu-image:
status: New → Fix Released
Michael Vogt (mvo)
Changed in snappy:
status: New → Incomplete
status: Incomplete → Fix Released
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.