From 3d8b00e5a14ae07000ae2f482916728d5a13eca75e3976133f8d5d8254c03945 Mon Sep 17 00:00:00 2001 From: Aleksa Sarai Date: Thu, 18 Mar 2021 04:08:21 +0000 Subject: [PATCH 1/2] 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 --- lxd.changes | 6 ++++++ lxd.service | 2 +- lxd.spec | 15 ++++++++------- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/lxd.changes b/lxd.changes index 1ac4042..c4bb01b 100644 --- a/lxd.changes +++ b/lxd.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Mar 15 16:49:41 UTC 2021 - Callum Farmer + +- Move OVMF symlinks to /usr/share, /opt is not allowed in SUSE + packages. + ------------------------------------------------------------------- Fri Mar 5 16:31:52 UTC 2021 - Aleksa Sarai diff --git a/lxd.service b/lxd.service index 75d9ce7..d515f5c 100644 --- a/lxd.service +++ b/lxd.service @@ -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 diff --git a/lxd.spec b/lxd.spec index c734843..cf117ff 100644 --- a/lxd.spec +++ b/lxd.spec @@ -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} From c35dcc13d55a197365cad4189eb26d7965ac8f37a3d49e834d964ef310010f03 Mon Sep 17 00:00:00 2001 From: Aleksa Sarai Date: Thu, 18 Mar 2021 04:12:38 +0000 Subject: [PATCH 2/2] Remove trailing whitespace in .changes. OBS-URL: https://build.opensuse.org/package/show/Virtualization:containers/lxd?expand=0&rev=82 --- lxd.changes | 2 +- lxd.spec | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lxd.changes b/lxd.changes index c4bb01b..0c65654 100644 --- a/lxd.changes +++ b/lxd.changes @@ -2,7 +2,7 @@ Mon Mar 15 16:49:41 UTC 2021 - Callum Farmer - Move OVMF symlinks to /usr/share, /opt is not allowed in SUSE - packages. + packages. ------------------------------------------------------------------- Fri Mar 5 16:31:52 UTC 2021 - Aleksa Sarai diff --git a/lxd.spec b/lxd.spec index cf117ff..2bba6ee 100644 --- a/lxd.spec +++ b/lxd.spec @@ -84,8 +84,8 @@ Requires: qemu-x86 # Storage backends -- we don't recommend ZFS since it's not *technically* a # blessed configuration. Recommends: lvm2 -Recommends: thin-provisioning-tools Recommends: btrfsprogs +Recommends: thin-provisioning-tools Suggests: zfs %description @@ -368,7 +368,6 @@ grep -q '^root:' /etc/subgid || \ %{_sbindir}/rc%{name} %{_unitdir}/%{name}.service - %dir %{_localstatedir}/lib/%{name} %dir %{_localstatedir}/log/%{name}