SHA256
1
0
forked from pool/lxd

Accepting request 896774 from Virtualization:containers

- fix dependencies for aarch64/armv7l 

- 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/896774
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/lxd?expand=0&rev=31
This commit is contained in:
Dominique Leuenberger 2021-06-03 22:33:20 +00:00 committed by Git OBS Bridge
commit 4584e6a318
2 changed files with 29 additions and 0 deletions

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Tue Jun 1 20:35:20 UTC 2021 - Dirk Müller <dmueller@suse.com>
- fix dependencies for aarch64/armv7l
-------------------------------------------------------------------
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> Mon May 31 05:11:38 UTC 2021 - Aleksa Sarai <asarai@suse.com>

View File

@ -25,6 +25,14 @@
%define lxd_datadir %{_datadir}/lxd %define lxd_datadir %{_datadir}/lxd
%define lxd_ovmfdir %{lxd_datadir}/ovmf %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 Name: lxd
Version: 4.14 Version: 4.14
Release: 0 Release: 0
@ -72,6 +80,7 @@ Requires: rsync
Requires: squashfs Requires: squashfs
Requires: tar Requires: tar
Requires: xz Requires: xz
%if 0%{arch_vm_support} != 0
# Needed for VM support. # Needed for VM support.
Requires: qemu-ovmf-x86_64 Requires: qemu-ovmf-x86_64
BuildRequires: qemu-ovmf-x86_64 BuildRequires: qemu-ovmf-x86_64
@ -82,7 +91,13 @@ Requires: qemu-ui-spice-core
%else %else
Requires: qemu-ui-spice-app Requires: qemu-ui-spice-app
%endif %endif
%ifarch %ix86 x86_64
Requires: qemu-x86 Requires: qemu-x86
%endif
%ifarch aarch64 %arm
Requires: qemu-arm
%endif
%endif
# Storage backends -- we don't recommend ZFS since it's not *technically* a # Storage backends -- we don't recommend ZFS since it's not *technically* a
# blessed configuration. # blessed configuration.
Recommends: lvm2 Recommends: lvm2
@ -309,6 +324,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 0711 %{buildroot}%{_localstatedir}/lib/%{name}
install -d -m 0755 %{buildroot}%{_localstatedir}/log/%{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 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 # in the way it expects. In particular, LXD depends on specific filenames for
# the firmware files so we create fake ones with symlinks. # the firmware files so we create fake ones with symlinks.
@ -316,6 +332,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-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 %{_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 ln -s OVMF_VARS.fd %{buildroot}%{lxd_ovmfdir}/OVMF_VARS.ms.fd
%endif
%fdupes %{buildroot} %fdupes %{buildroot}
@ -373,7 +390,9 @@ grep -q '^root:' /etc/subgid || \
%config(noreplace) /etc/lxd/config.yml %config(noreplace) /etc/lxd/config.yml
%dir /etc/lxd/servercerts %dir /etc/lxd/servercerts
%if 0%{arch_vm_support} != 0
%{lxd_datadir} %{lxd_datadir}
%endif
%{_sbindir}/rc%{name} %{_sbindir}/rc%{name}
%{_unitdir}/%{name}.service %{_unitdir}/%{name}.service