From 048049574a48bc3c146e060e47eb2d0741dfd650 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Wed, 11 Oct 2023 13:17:32 +0200 Subject: [PATCH] add uki-direct subpackage --- python-virt-firmware.spec | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/python-virt-firmware.spec b/python-virt-firmware.spec index 0e501dd..52a8e7d 100644 --- a/python-virt-firmware.spec +++ b/python-virt-firmware.spec @@ -43,6 +43,15 @@ Requires: edk2-ovmf %description -n python3-virt-firmware-tests test cases +%package -n uki-direct +Provides: ukidirect +Summary: %{summary} - manage UKI kernels. +Requires: python3-virt-firmware +Conflicts: systemd < 254 +%description -n uki-direct +kernel-install plugin and systemd unit to manage automatic +UKI (unified kernel image) updates. + %prep %autosetup -n virt-firmware-%{pypi_version} @@ -57,6 +66,20 @@ install -m 644 man/*.1 %{buildroot}%{_mandir}/man1 # tests mkdir -p %{buildroot}%{_datadir}/%{name} cp -ar tests %{buildroot}%{_datadir}/%{name} +# uki-direct +install -m 755 -d %{buildroot}%{_unitdir} +install -m 755 -d %{buildroot}%{_libdir}/kernel/install.d +install -m 644 systemd/kernel-bootcfg-boot-successful.service %{buildroot}%{_unitdir} +install -m 755 systemd/99-uki-uefi-setup.install %{buildroot}%{_libdir}/kernel/install.d + +%post -n uki-direct +%systemd_post kernel-bootcfg-boot-successful.service + +%preun -n uki-direct +%systemd_preun kernel-bootcfg-boot-successful.service + +%postun -n uki-direct +%systemd_postun kernel-bootcfg-boot-successful.service %files -n python3-virt-firmware %license LICENSE @@ -82,9 +105,14 @@ cp -ar tests %{buildroot}%{_datadir}/%{name} %files -n python3-virt-firmware-tests %{_datadir}/%{name}/tests +%files -n uki-direct +%{_unitdir}/kernel-bootcfg-boot-successful.service +%{_libdir}/kernel/install.d/99-uki-uefi-setup.install + %changelog * Wed Oct 11 2023 Gerd Hoffmann - 23.10-1 - update to version 23.6 +- add uki-direct subpackage * Tue Jun 27 2023 Gerd Hoffmann - 23.6-2 - drop -peutils subpackage