Accepting request 896676 from home:cyphar:lxc
- Fix build on i586 by if_arch-ing out the VM support on non-x86_64 platforms. OBS-URL: https://build.opensuse.org/request/show/896676 OBS-URL: https://build.opensuse.org/package/show/Virtualization:containers/lxd?expand=0&rev=90
This commit is contained in:
parent
e9db96e7cf
commit
28c68d979a
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 1 11:57:52 UTC 2021 - Aleksa Sarai <asarai@suse.com>
|
||||
|
||||
- Fix build on i586 by if_arch-ing out the VM support on non-x86_64 platforms.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon May 31 05:11:38 UTC 2021 - Aleksa Sarai <asarai@suse.com>
|
||||
|
||||
|
15
lxd.spec
15
lxd.spec
@ -25,6 +25,14 @@
|
||||
%define lxd_datadir %{_datadir}/lxd
|
||||
%define lxd_ovmfdir %{lxd_datadir}/ovmf
|
||||
|
||||
# We need OVMF in order to support VMs with LXD. At the moment this means we
|
||||
# can only support it on x86_64.
|
||||
%ifarch x86_64
|
||||
%define arch_vm_support 1
|
||||
%else
|
||||
%define arch_vm_support 0
|
||||
%endif
|
||||
|
||||
Name: lxd
|
||||
Version: 4.14
|
||||
Release: 0
|
||||
@ -72,6 +80,7 @@ Requires: rsync
|
||||
Requires: squashfs
|
||||
Requires: tar
|
||||
Requires: xz
|
||||
%if 0%{arch_vm_support} != 0
|
||||
# Needed for VM support.
|
||||
Requires: qemu-ovmf-x86_64
|
||||
BuildRequires: qemu-ovmf-x86_64
|
||||
@ -82,7 +91,9 @@ Requires: qemu-ui-spice-core
|
||||
%else
|
||||
Requires: qemu-ui-spice-app
|
||||
%endif
|
||||
# TODO: SHould we make this architecture-specific?
|
||||
Requires: qemu-x86
|
||||
%endif
|
||||
# Storage backends -- we don't recommend ZFS since it's not *technically* a
|
||||
# blessed configuration.
|
||||
Recommends: lvm2
|
||||
@ -309,6 +320,7 @@ install -D -m 0644 %{S:201} %{buildroot}%{_sysconfdir}/dnsmasq.d/60-lxd.conf
|
||||
install -d -m 0711 %{buildroot}%{_localstatedir}/lib/%{name}
|
||||
install -d -m 0755 %{buildroot}%{_localstatedir}/log/%{name}
|
||||
|
||||
%if 0%{arch_vm_support} != 0
|
||||
# In order for VM support in LXD to function, you need to have OVMF configured
|
||||
# in the way it expects. In particular, LXD depends on specific filenames for
|
||||
# the firmware files so we create fake ones with symlinks.
|
||||
@ -316,6 +328,7 @@ mkdir -p %{buildroot}%{lxd_ovmfdir}
|
||||
ln -s %{_datarootdir}/qemu/ovmf-x86_64-code.bin %{buildroot}%{lxd_ovmfdir}/OVMF_CODE.fd
|
||||
ln -s %{_datarootdir}/qemu/ovmf-x86_64-vars.bin %{buildroot}%{lxd_ovmfdir}/OVMF_VARS.fd
|
||||
ln -s OVMF_VARS.fd %{buildroot}%{lxd_ovmfdir}/OVMF_VARS.ms.fd
|
||||
%endif
|
||||
|
||||
%fdupes %{buildroot}
|
||||
|
||||
@ -373,7 +386,9 @@ grep -q '^root:' /etc/subgid || \
|
||||
%config(noreplace) /etc/lxd/config.yml
|
||||
%dir /etc/lxd/servercerts
|
||||
|
||||
%if 0%{arch_vm_support} != 0
|
||||
%{lxd_datadir}
|
||||
%endif
|
||||
|
||||
%{_sbindir}/rc%{name}
|
||||
%{_unitdir}/%{name}.service
|
||||
|
Loading…
Reference in New Issue
Block a user