diff --git a/.gitignore b/.gitignore index 397aa51..749ce29 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/virt-firmware-v1.6.tar.gz +SOURCES/virt-firmware-24.2.tar.gz diff --git a/.python-virt-firmware.metadata b/.python-virt-firmware.metadata index 749538f..204683d 100644 --- a/.python-virt-firmware.metadata +++ b/.python-virt-firmware.metadata @@ -1 +1 @@ -66497d46df1c46543e71526530192ee296469cc4 SOURCES/virt-firmware-v1.6.tar.gz +33632fc870a65b25373ee6c8003f25a2d7bd73aa SOURCES/virt-firmware-24.2.tar.gz diff --git a/SOURCES/0001-setup.cfg-drop-peutils.patch b/SOURCES/0001-setup.cfg-drop-peutils.patch deleted file mode 100644 index c7243b5..0000000 --- a/SOURCES/0001-setup.cfg-drop-peutils.patch +++ /dev/null @@ -1,37 +0,0 @@ -From b6db3b1366fe61a7cbe176c92420076bc6aa5936 Mon Sep 17 00:00:00 2001 -From: Gerd Hoffmann -Date: Mon, 14 Nov 2022 15:58:07 +0100 -Subject: [PATCH] setup.cfg: drop peutils - ---- - setup.cfg | 5 ----- - 1 file changed, 5 deletions(-) - -diff --git a/setup.cfg b/setup.cfg -index 5f57feac114d..307d6e279d4c 100644 ---- a/setup.cfg -+++ b/setup.cfg -@@ -17,10 +17,8 @@ packages = - virt/firmware - virt/firmware/efi - virt/firmware/varstore -- virt/peutils - install_requires = - cryptography -- pefile - - [options.entry_points] - console_scripts = -@@ -29,9 +27,6 @@ console_scripts = - virt-fw-dump = virt.firmware.dump:main - virt-fw-sigdb = virt.firmware.sigdb:main - migrate-vars = virt.firmware.migrate:main -- pe-dumpinfo = virt.peutils.peutils:pe_dumpinfo -- pe-listsigs = virt.peutils.peutils:pe_listsigs -- pe-addsigs = virt.peutils.peutils:pe_addsigs - - [options.package_data] - virt/firmware = certs/*.pem, aws/dict.v0 --- -2.38.1 - diff --git a/SPECS/python-virt-firmware.spec b/SPECS/python-virt-firmware.spec index d961bb7..4d2ef60 100644 --- a/SPECS/python-virt-firmware.spec +++ b/SPECS/python-virt-firmware.spec @@ -1,20 +1,20 @@ -%global pypi_version 1.6 +%global pypi_version 24.2 Name: python-virt-firmware Version: %{pypi_version} -Release: 2%{?dist} +Release: 1%{?dist} Summary: Tools for virtual machine firmware volumes License: GPLv2 -URL: https://gitlab.com/kraxel/virt-firmware -Source0: https://gitlab.com/kraxel/virt-firmware/-/archive/v%{pypi_version}/virt-firmware-v%{pypi_version}.tar.gz -Patch1: 0001-setup.cfg-drop-peutils.patch +URL: https://pypi.org/project/virt-firmware/ +Source0: virt-firmware-%{pypi_version}.tar.gz BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3dist(cryptography) BuildRequires: python3dist(setuptools) BuildRequires: make +BuildRequires: systemd systemd-rpm-macros %description Tools for ovmf / armvirt firmware volumes This is a small collection of tools @@ -28,6 +28,7 @@ Summary: %{summary} Provides: virt-firmware Requires: python3dist(cryptography) Requires: python3dist(setuptools) +Requires: python3dist(pefile) %description -n python3-virt-firmware Tools for ovmf / armvirt firmware volumes This is a small collection of tools for edk2 firmware images. They support decoding and printing the content of @@ -42,8 +43,18 @@ 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 < 252-21 +Obsoletes: rhel-cvm-update-tool +%description -n uki-direct +kernel-install plugin and systemd unit to manage automatic +UKI (unified kernel image) updates. + %prep -%autosetup -n virt-firmware-v%{pypi_version} +%autosetup -n virt-firmware-%{pypi_version} %build %py3_build @@ -56,23 +67,94 @@ 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 -%doc README.md +%doc README.md experimental %{_bindir}/host-efi-vars %{_bindir}/virt-fw-dump %{_bindir}/virt-fw-vars %{_bindir}/virt-fw-sigdb +%{_bindir}/kernel-bootcfg +%{_bindir}/uefi-boot-menu %{_bindir}/migrate-vars +%{_bindir}/pe-dumpinfo +%{_bindir}/pe-listsigs +%{_bindir}/pe-addsigs +%{_bindir}/pe-inspect %{_mandir}/man1/virt-*.1* +%{_mandir}/man1/kernel-bootcfg.1* +%{_mandir}/man1/uefi-boot-menu.1* +%{_mandir}/man1/pe-*.1* %{python3_sitelib}/virt/firmware +%{python3_sitelib}/virt/peutils %{python3_sitelib}/virt_firmware-%{pypi_version}-py%{python3_version}.egg-info %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 +* Fri Feb 16 2024 Gerd Hoffmann - 24.2-1 +- update to version 24.2 + +* Thu Jan 11 2024 Gerd Hoffmann - 24.1.1-1 +- update to version 24.1.1 + +* Tue Jan 09 2024 Gerd Hoffmann - 24.1-1 +- update to version 24.1 +- Resolves: RHEL-21090 + +* Wed Jan 03 2024 Gerd Hoffmann - 23.11-3 +- add "obsoletes: rhel-cvm-update-tool" to uki-direct + +* Tue Jan 02 2024 Gerd Hoffmann - 23.11-2 +- add uki-direct subpackage +- Resolves: RHEL-19383 + +* Wed Dec 13 2023 Gerd Hoffmann - 23.11-1 +- update to version 23.11 + +* Thu Oct 12 2023 Gerd Hoffmann - 23.10-2 +- drop uki-direct subpackage for now (wait for systemd update) + +* Wed Oct 11 2023 Gerd Hoffmann - 23.10-1 +- update to version 23.10 +- add uki-direct subpackage + +* Tue Jun 27 2023 Gerd Hoffmann - 23.6-2 +- drop -peutils subpackage + +* Tue Jun 20 2023 Gerd Hoffmann - 23.6-1 +- update to version 23.6 +- resolves: rhbz#2216102 + +* Thu May 04 2023 Gerd Hoffmann - 23.5-1 +- update to version 23.5 +- resolves: rhbz#2193089 + +* Fri Apr 14 2023 Gerd Hoffmann - 23.4-1 +- update to version 23.4 +- resolves: rhbz#2186770 +- resolves: rhbz#2143566 + * Tue Nov 15 2022 Gerd Hoffmann - 1.6-2 - add tests.yml