SHA256
1
0
forked from pool/qemu

Accepting request 840076 from home:bfrogers:branches:Virtualization

- Create qemu-skiboot sub-package. Use update-alternatives mechanism
  to coordinate with opal-firmware (provided with skiboot package set)
  on the provider of the /usr/share/qemu/skiboot.lid firmware file.
  qemu-skiboot uses a priority of 15, while opal-firmware uses a
  priority of 10 (jse#SLE-13240)

OBS-URL: https://build.opensuse.org/request/show/840076
OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=580
This commit is contained in:
Bruce Rogers 2020-10-07 15:06:11 +00:00 committed by Git OBS Bridge
parent ed6a4f1b15
commit 06d29a55b5
4 changed files with 100 additions and 11 deletions

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4792dc5d50579b8c3d4456e1720063243cab5e6a30f98d6bff362f02c8cff873
size 35216
oid sha256:97271682301b58874f99fa7afda93d80e26e22b879380fa67535e221e1d3a63e
size 35280

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Wed Oct 7 13:34:49 UTC 2020 - Bruce Rogers <brogers@suse.com>
- Create qemu-skiboot sub-package. Use update-alternatives mechanism
to coordinate with opal-firmware (provided with skiboot package set)
on the provider of the /usr/share/qemu/skiboot.lid firmware file.
qemu-skiboot uses a priority of 15, while opal-firmware uses a
priority of 10 (jse#SLE-13240)
-------------------------------------------------------------------
Wed Sep 30 18:30:12 UTC 2020 - Bruce Rogers <brogers@suse.com>

View File

@ -374,6 +374,7 @@ BuildRequires: qemu-ppc = %{qemuver}
BuildRequires: qemu-s390 = %{qemuver}
BuildRequires: qemu-seabios = %{sbver}
BuildRequires: qemu-sgabios = 8
BuildRequires: qemu-skiboot = %{qemuver}
BuildRequires: qemu-tools = %{qemuver}
BuildRequires: qemu-ui-curses = %{qemuver}
BuildRequires: qemu-ui-gtk = %{qemuver}
@ -427,6 +428,7 @@ Suggests: qemu-block-rbd
Suggests: qemu-block-ssh
Suggests: qemu-chardev-baum
Suggests: qemu-extra
Suggests: qemu-skiboot
Suggests: qemu-lang
Recommends: qemu-ksm = %{qemuver}
Suggests: qemu-microvm
@ -517,6 +519,7 @@ Release: 0
Requires: %name = %{qemuver}
Recommends: qemu-ipxe
Recommends: qemu-vgabios
Recommends: qemu-skiboot
%description extra
%{generic_qemu_description}
@ -886,6 +889,20 @@ BuildArch: noarch
Provides EDK II based firmware.
%endif
%package skiboot
Summary: OPAL firmware (aka skiboot), used in booting OpenPOWER systems
Group: System/Emulators/PC
Version: %{qemuver}
Release: 0
BuildArch: noarch
Requires(post): update-alternatives
Requires(postun): update-alternatives
Provides: %name:%_datadir/%name/forsplits/06
%description skiboot
Provides OPAL (OpenPower Abstraction Layer) firmware, aka skiboot, as
traditionally packaged with QEMU.
%package ksm
Summary: Kernel Samepage Merging services
Group: System/Emulators/PC
@ -1613,6 +1630,13 @@ install -D -m 0644 %{SOURCE203} %{buildroot}%_docdir/%name/qemu-ga-ref.txt
install -D -m 0644 %{SOURCE204} %{buildroot}%_docdir/%name/qemu-qmp-ref.html
install -D -m 0644 %{SOURCE205} %{buildroot}%_docdir/%name/qemu-qmp-ref.txt
mv %{buildroot}%_libexecdir/qemu-pr-helper %{buildroot}%_bindir/qemu-pr-helper
# in support of update-alternatives
mv %{buildroot}%_datadir/%name/skiboot.lid %{buildroot}%_datadir/%name/skiboot.lid.qemu
# create a dummy target for /etc/alternatives/skiboot.lid
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
ln -s -f %{_sysconfdir}/alternatives/skiboot.lid %{buildroot}%{_datadir}/%name/skiboot.lid
install -D -m 0644 %{SOURCE201} %{buildroot}%_datadir/%name/forsplits/pkg-split.txt
for X in 00 01 02 03 04 05 06 07 08 09
do
@ -1687,6 +1711,15 @@ fi
%postun ksm
%service_del_postun ksm.service
%post skiboot
update-alternatives --install \
%{_datadir}/%name/skiboot.lid skiboot.lid %{_datadir}/%name/skiboot.lid.qemu 15
%postun skiboot
if [ ! -f %{_datadir}/%name/skiboot.lid.qemu ] ; then
update-alternatives --remove skiboot.lid %{_datadir}/%name/skiboot.lid.qemu
fi
%endif # qemu
# ========================================================================
@ -1718,7 +1751,6 @@ fi
%_datadir/%name/forsplits/02
%_datadir/%name/forsplits/04
%_datadir/%name/forsplits/05
%_datadir/%name/forsplits/06
%_datadir/%name/forsplits/07
%_datadir/%name/forsplits/08
%_datadir/%name/forsplits/09
@ -1894,7 +1926,6 @@ fi
%_datadir/%name/canyonlands.dtb
%_datadir/%name/openbios-ppc
%_datadir/%name/qemu_vga.ndrv
%_datadir/%name/skiboot.lid
%_datadir/%name/slof.bin
%_datadir/%name/u-boot.e500
%_datadir/%name/u-boot-sam460-20100605.bin
@ -2150,6 +2181,15 @@ fi
%endif
%endif
%files skiboot
%defattr(-, root, root)
%dir %_datadir/%name
%dir %_datadir/%name/forsplits
%_datadir/%name/forsplits/06
%_datadir/%name/skiboot.lid
%_datadir/%name/skiboot.lid.qemu
%ghost %_sysconfdir/alternatives/skiboot.lid
%files vhost-user-gpu
%defattr(-, root, root)
%dir %_datadir/%name/vhost-user

View File

@ -229,21 +229,21 @@ BuildRequires: libpulse-devel
%if 0%{?with_rbd}
BuildRequires: librbd-devel
%endif
BuildRequires: Mesa-devel
BuildRequires: libSDL2-devel
BuildRequires: libSDL2_image-devel
BuildRequires: libseccomp-devel >= 2.3.0
BuildRequires: libslirp-devel >= 4.2.0
BuildRequires: libspice-server-devel >= 0.12.5
BuildRequires: libssh-devel >= 0.8
BuildRequires: pkgconfig(libudev)
BuildRequires: libusb-1_0-devel >= 1.0.13
BuildRequires: libvdeplug-devel
BuildRequires: lzfse-devel
BuildRequires: Mesa-devel
BuildRequires: libxkbcommon-devel
BuildRequires: lzfse-devel
BuildRequires: lzo-devel
BuildRequires: makeinfo
BuildRequires: multipath-tools-devel
BuildRequires: pkgconfig(libudev)
%if %{build_x86_firmware_from_source}
BuildRequires: nasm
%endif
@ -302,6 +302,7 @@ BuildRequires: qemu-ppc = %{qemuver}
BuildRequires: qemu-s390 = %{qemuver}
BuildRequires: qemu-seabios = %{sbver}
BuildRequires: qemu-sgabios = 8
BuildRequires: qemu-skiboot = %{qemuver}
BuildRequires: qemu-tools = %{qemuver}
BuildRequires: qemu-ui-curses = %{qemuver}
BuildRequires: qemu-ui-gtk = %{qemuver}
@ -355,6 +356,7 @@ Suggests: qemu-block-rbd
Suggests: qemu-block-ssh
Suggests: qemu-chardev-baum
Suggests: qemu-extra
Suggests: qemu-skiboot
Suggests: qemu-lang
Recommends: qemu-ksm = %{qemuver}
Suggests: qemu-microvm
@ -445,6 +447,7 @@ Release: 0
Requires: %name = %{qemuver}
Recommends: qemu-ipxe
Recommends: qemu-vgabios
Recommends: qemu-skiboot
%description extra
%{generic_qemu_description}
@ -612,8 +615,8 @@ Summary: Baum braille chardev support for QEMU
Group: System/Emulators/PC
Version: %{qemuver}
Release: 0
Provides: %name:%_docdir/%name/qemu-ga-ref.html
Provides: %name:%_datadir/%name/forsplits/00
Provides: %name:%_docdir/%name/qemu-ga-ref.html
%{qemu_module_conflicts}
%description chardev-baum
@ -646,8 +649,8 @@ Summary: USB smartcard support for QEMU
Group: System/Emulators/PC
Version: %{qemuver}
Release: 0
Provides: %name:%_docdir/%name/qemu-qmp-ref.txt
Provides: %name:%_datadir/%name/forsplits/03
Provides: %name:%_docdir/%name/qemu-qmp-ref.txt
%{qemu_module_conflicts}
%description hw-usb-smartcard
@ -814,6 +817,20 @@ BuildArch: noarch
Provides EDK II based firmware.
%endif
%package skiboot
Summary: OPAL firmware (aka skiboot), used in booting OpenPOWER systems
Group: System/Emulators/PC
Version: %{qemuver}
Release: 0
BuildArch: noarch
Requires(post): update-alternatives
Requires(postun): update-alternatives
Provides: %name:%_datadir/%name/forsplits/06
%description skiboot
Provides OPAL (OpenPower Abstraction Layer) firmware, aka skiboot, as
traditionally packaged with QEMU.
%package ksm
Summary: Kernel Samepage Merging services
Group: System/Emulators/PC
@ -1470,6 +1487,13 @@ install -D -m 0644 %{SOURCE203} %{buildroot}%_docdir/%name/qemu-ga-ref.txt
install -D -m 0644 %{SOURCE204} %{buildroot}%_docdir/%name/qemu-qmp-ref.html
install -D -m 0644 %{SOURCE205} %{buildroot}%_docdir/%name/qemu-qmp-ref.txt
mv %{buildroot}%_libexecdir/qemu-pr-helper %{buildroot}%_bindir/qemu-pr-helper
# in support of update-alternatives
mv %{buildroot}%_datadir/%name/skiboot.lid %{buildroot}%_datadir/%name/skiboot.lid.qemu
# create a dummy target for /etc/alternatives/skiboot.lid
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
ln -s -f %{_sysconfdir}/alternatives/skiboot.lid %{buildroot}%{_datadir}/%name/skiboot.lid
install -D -m 0644 %{SOURCE201} %{buildroot}%_datadir/%name/forsplits/pkg-split.txt
for X in 00 01 02 03 04 05 06 07 08 09
do
@ -1544,6 +1568,15 @@ fi
%postun ksm
%service_del_postun ksm.service
%post skiboot
update-alternatives --install \
%{_datadir}/%name/skiboot.lid skiboot.lid %{_datadir}/%name/skiboot.lid.qemu 15
%postun skiboot
if [ ! -f %{_datadir}/%name/skiboot.lid.qemu ] ; then
update-alternatives --remove skiboot.lid %{_datadir}/%name/skiboot.lid.qemu
fi
%endif # qemu
# ========================================================================
@ -1575,7 +1608,6 @@ fi
%_datadir/%name/forsplits/02
%_datadir/%name/forsplits/04
%_datadir/%name/forsplits/05
%_datadir/%name/forsplits/06
%_datadir/%name/forsplits/07
%_datadir/%name/forsplits/08
%_datadir/%name/forsplits/09
@ -1751,7 +1783,6 @@ fi
%_datadir/%name/canyonlands.dtb
%_datadir/%name/openbios-ppc
%_datadir/%name/qemu_vga.ndrv
%_datadir/%name/skiboot.lid
%_datadir/%name/slof.bin
%_datadir/%name/u-boot.e500
%_datadir/%name/u-boot-sam460-20100605.bin
@ -2007,6 +2038,15 @@ fi
%endif
%endif
%files skiboot
%defattr(-, root, root)
%dir %_datadir/%name
%dir %_datadir/%name/forsplits
%_datadir/%name/forsplits/06
%_datadir/%name/skiboot.lid
%_datadir/%name/skiboot.lid.qemu
%ghost %_sysconfdir/alternatives/skiboot.lid
%files vhost-user-gpu
%defattr(-, root, root)
%dir %_datadir/%name/vhost-user