Accepting request 879257 from home:gmbr3:Active

- Move OVMF symlinks to /usr/share, /opt is not allowed in SUSE
  packages.

OBS-URL: https://build.opensuse.org/request/show/879257
OBS-URL: https://build.opensuse.org/package/show/Virtualization:containers/lxd?expand=0&rev=81
This commit is contained in:
Aleksa Sarai 2021-03-18 04:08:21 +00:00 committed by Git OBS Bridge
parent d4c91d6734
commit 3d8b00e5a1
3 changed files with 15 additions and 8 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Mar 15 16:49:41 UTC 2021 - Callum Farmer <gmbr3@opensuse.org>
- Move OVMF symlinks to /usr/share, /opt is not allowed in SUSE
packages.
-------------------------------------------------------------------
Fri Mar 5 16:31:52 UTC 2021 - Aleksa Sarai <asarai@suse.com>

View File

@ -5,7 +5,7 @@ Requires=network-online.target lxcfs.service
Documentation=man:lxd(1)
[Service]
Environment=LXD_OVMF_PATH=/opt/lxd/ovmf
Environment=LXD_OVMF_PATH=/usr/share/lxd/ovmf
ExecStart=/usr/bin/lxd --group=lxd --logfile=/var/log/lxd/lxd.log
ExecStartPost=/usr/bin/lxd waitready --timeout=600
TimeoutStartSec=600s

View File

@ -22,7 +22,8 @@
%define _buildshell /bin/bash
%define import_path github.com/lxc/lxd
%define lxd_optdir /opt/lxd
%define lxd_datadir %{_datadir}/lxd
%define lxd_ovmfdir %{lxd_datadir}/ovmf
Name: lxd
Version: 4.12
@ -305,11 +306,10 @@ install -d -m 0755 %{buildroot}%{_localstatedir}/log/%{name}
# 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.
export OVMF_DIR="%{buildroot}%{lxd_optdir}/ovmf"
mkdir -p "$OVMF_DIR"
ln -s %{_datarootdir}/qemu/ovmf-x86_64-ms-code.bin "$OVMF_DIR/OVMF_CODE.fd"
ln -s %{_datarootdir}/qemu/ovmf-x86_64-ms-vars.bin "$OVMF_DIR/OVMF_VARS.ms.fd"
ln -s %{_datarootdir}/qemu/ovmf-x86_64-vars.bin "$OVMF_DIR/OVMF_VARS.fd"
mkdir -p %{buildroot}%{lxd_ovmfdir}
ln -s %{_datarootdir}/qemu/ovmf-x86_64-ms-code.bin %{buildroot}%{lxd_ovmfdir}/OVMF_CODE.fd
ln -s %{_datarootdir}/qemu/ovmf-x86_64-ms-vars.bin %{buildroot}%{lxd_ovmfdir}/OVMF_VARS.ms.fd
ln -s %{_datarootdir}/qemu/ovmf-x86_64-vars.bin %{buildroot}%{lxd_ovmfdir}/OVMF_VARS.fd
%fdupes %{buildroot}
@ -363,10 +363,11 @@ grep -q '^root:' /etc/subgid || \
%{_mandir}/man*/*
%{_libdir}/%{name}
%{lxd_datadir}
%{_sbindir}/rc%{name}
%{_unitdir}/%{name}.service
%{lxd_optdir}
%dir %{_localstatedir}/lib/%{name}
%dir %{_localstatedir}/log/%{name}