python-virt-firmware/python-virt-firmware.spec

117 lines
3.6 KiB
RPMSpec
Raw Normal View History

%global pypi_version 24.11
2022-04-13 15:06:22 +00:00
Name: python-virt-firmware
Version: %{pypi_version}
Release: %autorelease
2022-04-13 15:06:22 +00:00
Summary: Tools for virtual machine firmware volumes
License: GPL-2.0-only
2023-04-14 07:57:59 +00:00
URL: https://pypi.org/project/virt-firmware/
2024-07-11 16:25:07 +00:00
Source0: virt_firmware-%{pypi_version}.tar.gz
2022-04-13 15:06:22 +00:00
BuildArch: noarch
BuildRequires: python3-devel
2022-09-27 15:02:48 +00:00
BuildRequires: python3dist(cryptography)
2022-04-13 15:06:22 +00:00
BuildRequires: python3dist(setuptools)
2022-09-27 11:44:15 +00:00
BuildRequires: make help2man
2023-09-12 13:33:36 +00:00
BuildRequires: systemd systemd-rpm-macros
2022-04-13 15:06:22 +00:00
%description
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
firmware volumes. Variable stores (OVMF_VARS.fd) can be modified, for example
to enroll secure boot certificates.
%package -n python3-virt-firmware
Summary: %{summary}
%{?python_provide:%python_provide python3-virt-firmware}
2022-10-28 14:11:02 +00:00
Provides: virt-firmware
Conflicts: python3-virt-firmware-peutils < 23.9
2023-09-12 13:18:13 +00:00
Obsoletes: python3-virt-firmware-peutils < 23.9
2022-04-13 15:06:22 +00:00
Requires: python3dist(cryptography)
Requires: python3dist(setuptools)
2023-09-12 13:18:13 +00:00
Requires: python3dist(pefile)
2022-04-13 15:06:22 +00:00
%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
firmware volumes. Variable stores (OVMF_VARS.fd) can be modified, for example
to enroll secure boot certificates.
2022-09-27 09:36:00 +00:00
%package -n python3-virt-firmware-tests
Summary: %{summary} - test cases
2022-09-27 16:19:14 +00:00
Requires: python3-virt-firmware
2022-10-05 07:58:31 +00:00
Requires: python3dist(pytest)
2022-10-05 08:53:36 +00:00
Requires: edk2-ovmf
2022-09-27 09:36:00 +00:00
%description -n python3-virt-firmware-tests
test cases
2023-09-12 13:33:36 +00:00
%package -n uki-direct
Provides: ukidirect
Summary: %{summary} - manage UKI kernels.
Requires: python3-virt-firmware
Conflicts: systemd < 254
2023-09-12 13:33:36 +00:00
%description -n uki-direct
kernel-install plugin and systemd unit to manage automatic
UKI (unified kernel image) updates.
2022-04-13 15:06:22 +00:00
%prep
2024-07-11 16:25:07 +00:00
%autosetup -n virt_firmware-%{pypi_version}
2022-04-13 15:06:22 +00:00
%build
%py3_build
%install
%py3_install
2022-09-27 13:01:17 +00:00
# manpages
2022-09-27 16:19:14 +00:00
install -m 755 -d %{buildroot}%{_mandir}/man1
install -m 644 man/*.1 %{buildroot}%{_mandir}/man1
2022-09-27 09:36:00 +00:00
# tests
mkdir -p %{buildroot}%{_datadir}/%{name}
cp -ar tests %{buildroot}%{_datadir}/%{name}
2023-09-12 13:33:36 +00:00
# uki-direct
install -m 755 -d %{buildroot}%{_unitdir}
2023-09-19 07:26:18 +00:00
install -m 755 -d %{buildroot}%{_libdir}/kernel/install.d
2023-09-12 13:33:36 +00:00
install -m 644 systemd/kernel-bootcfg-boot-successful.service %{buildroot}%{_unitdir}
2023-09-19 07:26:18 +00:00
install -m 755 systemd/99-uki-uefi-setup.install %{buildroot}%{_libdir}/kernel/install.d
2023-09-12 13:33:36 +00:00
%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
2022-04-13 15:06:22 +00:00
%files -n python3-virt-firmware
%license LICENSE
2023-01-16 16:09:22 +00:00
%doc README.md experimental
2022-04-13 15:06:22 +00:00
%{_bindir}/host-efi-vars
%{_bindir}/virt-fw-dump
%{_bindir}/virt-fw-vars
2022-06-22 10:19:43 +00:00
%{_bindir}/virt-fw-sigdb
2023-06-19 10:55:24 +00:00
%{_bindir}/kernel-bootcfg
%{_bindir}/uefi-boot-menu
2022-09-27 09:19:40 +00:00
%{_bindir}/migrate-vars
2023-09-12 13:18:13 +00:00
%{_bindir}/pe-dumpinfo
%{_bindir}/pe-listsigs
%{_bindir}/pe-addsigs
2023-10-10 14:53:51 +00:00
%{_bindir}/pe-inspect
%{_mandir}/man1/virt-*.1*
2023-09-12 12:03:21 +00:00
%{_mandir}/man1/kernel-bootcfg.1*
%{_mandir}/man1/uefi-boot-menu.1*
2024-01-09 15:54:05 +00:00
%{_mandir}/man1/pe-*.1*
2022-04-13 15:06:22 +00:00
%{python3_sitelib}/virt/firmware
%{python3_sitelib}/virt/peutils
2023-09-12 13:18:13 +00:00
%{python3_sitelib}/virt_firmware-%{pypi_version}-py%{python3_version}.egg-info
2022-09-27 09:36:00 +00:00
%files -n python3-virt-firmware-tests
%{_datadir}/%{name}/tests
2023-09-12 13:33:36 +00:00
%files -n uki-direct
%{_unitdir}/kernel-bootcfg-boot-successful.service
2023-09-19 07:26:18 +00:00
%{_libdir}/kernel/install.d/99-uki-uefi-setup.install
2023-09-12 13:33:36 +00:00
2022-04-13 15:06:22 +00:00
%changelog
%autochangelog