Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 763180

Summary: app-emulation/lxd: change default OVMF path
Product: Gentoo Linux Reporter: Ogelpre <gentoo.org>
Component: Current packagesAssignee: Joonas Niilola <juippis>
Status: RESOLVED FIXED    
Severity: normal CC: gentoo.org, ionen, virtualization
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=876796
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: OVMF patch
OVMF patch
OVMF patch

Description Ogelpre 2021-01-02 20:13:56 UTC
Created attachment 680737 [details, diff]
OVMF patch

In LXD the default path for OVMF is /usr/share/OVMF:

https://github.com/lxc/lxd/blob/master/lxd/instance/drivers/driver_qemu.go#L661
https://github.com/lxc/lxd/blob/master/lxd/apparmor/instance_qemu.go#L39

In Gentoo OVMF is installed to /usr/share/edk2-ovmf/

I have attached a patch.
Comment 1 Ionen Wolkens gentoo-dev 2021-01-02 20:53:58 UTC
You may want to have a second look at the patch you've submitted.
Comment 2 Ogelpre 2021-01-02 21:38:26 UTC
Created attachment 680776 [details, diff]
OVMF patch

Sorry, c&p fale. Added new patch.

But I found another issue. The UEFI-Image file is also hardcoded for ubuntu. I'll upload a third patch asap.
Comment 3 Ogelpre 2021-01-02 23:06:00 UTC
Created attachment 680779 [details, diff]
OVMF patch

Add patch to fix OVMF file. OVMF_CODE.ms.fd was a symlink on Ubuntu Linux. For reference see:

https://bugs.launchpad.net/ubuntu/+source/edk2/+bug/1864535
Comment 4 Joonas Niilola gentoo-dev 2021-01-03 06:35:34 UTC
Thanks, if you want to be credited with a commit in our git, you need to add a "Signed-off-by:" line here or preferably make a git-format patch. You need to use your legal name for that, 
  https://www.gentoo.org/glep/glep-0076.html#certificate-of-origin

I can make the modification if you don't care about that. But if you do, please also add a comment above the sed lines explaining what it does and a mention to this bug. Something like:

# Fix hardcoded ovmf file path, see bug 763180
Comment 5 Ogelpre 2021-01-03 21:19:56 UTC
Please do it. I am not insisting to be mentioned.
Comment 6 Larry the Git Cow gentoo-dev 2021-01-04 05:18:19 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fa6511e34b163edcde77e9d7b9a49178eb3e3e39

commit fa6511e34b163edcde77e9d7b9a49178eb3e3e39
Author:     Joonas Niilola <juippis@gentoo.org>
AuthorDate: 2021-01-04 05:16:17 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2021-01-04 05:18:11 +0000

    app-emulation/lxd: fix hardcoded ovmf file path
    
    Closes: https://bugs.gentoo.org/763180
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 app-emulation/lxd/lxd-4.0.4-r2.ebuild | 152 ++++++++++++++++++++++++++++++++++
 1 file changed, 152 insertions(+)