Compare commits

..

No commits in common. "c10s" and "c9-beta" have entirely different histories.

9 changed files with 199 additions and 224 deletions

3
.gitignore vendored
View File

@ -1,2 +1 @@
virt-firmware-*.tar.gz SOURCES/virt_firmware-24.11.tar.gz
virt_firmware-*.tar.gz

View File

@ -0,0 +1 @@
07f06002c95710f77823908fcc32f2ae201f1610 SOURCES/virt_firmware-24.11.tar.gz

View File

@ -1,3 +0,0 @@
# python-virt-firmware
The python-virt-firmware package

View File

@ -0,0 +1,197 @@
%global pypi_version 24.11
Name: python-virt-firmware
Version: %{pypi_version}
Release: 1%{?dist}
Summary: Tools for virtual machine firmware volumes
License: GPLv2
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
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}
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
firmware volumes. Variable stores (OVMF_VARS.fd) can be modified, for example
to enroll secure boot certificates.
%package -n python3-virt-firmware-tests
Summary: %{summary} - test cases
Requires: python3-virt-firmware
Requires: python3dist(pytest)
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-%{pypi_version}
%build
%py3_build
%install
%py3_install
# manpages
install -m 755 -d %{buildroot}%{_mandir}/man1
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 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 Nov 29 2024 Gerd Hoffmann <kraxel@redhat.com> - 24.11-1
- update to version 24.11
- Resolves: RHEL-69507
* Thu Jul 11 2024 Gerd Hoffmann <kraxel@redhat.com> - 24.7-1
- update to version 24.7
* Mon Apr 15 2024 Gerd Hoffmann <kraxel@redhat.com> - 24.4-1
- update to version 24.4
* Fri Feb 16 2024 Gerd Hoffmann <kraxel@redhat.com> - 24.2-1
- update to version 24.2
* Thu Jan 11 2024 Gerd Hoffmann <kraxel@redhat.com> - 24.1.1-1
- update to version 24.1.1
* Tue Jan 09 2024 Gerd Hoffmann <kraxel@redhat.com> - 24.1-1
- update to version 24.1
- Resolves: RHEL-21090
* Wed Jan 03 2024 Gerd Hoffmann <kraxel@redhat.com> - 23.11-3
- add "obsoletes: rhel-cvm-update-tool" to uki-direct
* Tue Jan 02 2024 Gerd Hoffmann <kraxel@redhat.com> - 23.11-2
- add uki-direct subpackage
- Resolves: RHEL-19383
* Wed Dec 13 2023 Gerd Hoffmann <kraxel@redhat.com> - 23.11-1
- update to version 23.11
* Thu Oct 12 2023 Gerd Hoffmann <kraxel@redhat.com> - 23.10-2
- drop uki-direct subpackage for now (wait for systemd update)
* Wed Oct 11 2023 Gerd Hoffmann <kraxel@redhat.com> - 23.10-1
- update to version 23.10
- add uki-direct subpackage
* Tue Jun 27 2023 Gerd Hoffmann <kraxel@redhat.com> - 23.6-2
- drop -peutils subpackage
* Tue Jun 20 2023 Gerd Hoffmann <kraxel@redhat.com> - 23.6-1
- update to version 23.6
- resolves: rhbz#2216102
* Thu May 04 2023 Gerd Hoffmann <kraxel@redhat.com> - 23.5-1
- update to version 23.5
- resolves: rhbz#2193089
* Fri Apr 14 2023 Gerd Hoffmann <kraxel@redhat.com> - 23.4-1
- update to version 23.4
- resolves: rhbz#2186770
- resolves: rhbz#2143566
* Tue Nov 15 2022 Gerd Hoffmann <kraxel@redhat.com> - 1.6-2
- add tests.yml
* Mon Nov 14 2022 Gerd Hoffmann <kraxel@redhat.com> - 1.6-1
- update to version 1.6
- drop peutils
- add man-pages
- add tests sub-package
- resolves: rhbz#2142608
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon Jul 18 2022 Gerd Hoffmann <kraxel@redhat.com> - 1.2-1
- update to version 1.2
* Fri Jul 01 2022 Gerd Hoffmann <kraxel@redhat.com> - 1.1-1
- update to version 1.1
* Wed Jun 22 2022 Gerd Hoffmann <kraxel@redhat.com> - 1.0-1
- update to version 1.0
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 0.98-2
- Rebuilt for Python 3.11
* Tue May 24 2022 Gerd Hoffmann <kraxel@redhat.com> - 0.98-1
- update to version 0.98
* Mon Apr 11 2022 Gerd Hoffmann <kraxel@redhat.com> - 0.95-1
- Initial package.

View File

@ -1,59 +0,0 @@
* Fri Apr 14 2023 Gerd Hoffmann <kraxel@redhat.com> - 23.4-1
- update to version 23.4
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.8-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Mon Jan 16 2023 Gerd Hoffmann <kraxel@redhat.com> - 1.8-1
- update to version 1.8
* Fri Dec 02 2022 Gerd Hoffmann <kraxel@redhat.com> - 1.7-1
- update to version 1.7
* Thu Nov 10 2022 Gerd Hoffmann <kraxel@redhat.com> - 1.6-2
- add conflict declaration
* Thu Nov 10 2022 Gerd Hoffmann <kraxel@redhat.com> - 1.6-1
- update to version 1.6
- split peutils to subpackage
* Wed Oct 05 2022 Gerd Hoffmann <kraxel@redhat.com> - 1.5-1
- update to version 1.5
* Wed Oct 05 2022 Gerd Hoffmann <kraxel@redhat.com> - 1.4-5
- turn on gating
* Wed Oct 05 2022 Gerd Hoffmann <kraxel@redhat.com> - 1.4-4
- more test dependency tweaks
* Wed Oct 05 2022 Gerd Hoffmann <kraxel@redhat.com> - 1.4-3
- tweak test dependencies
* Wed Oct 05 2022 Gerd Hoffmann <kraxel@redhat.com> - 1.4-2
- add tests
* Tue Sep 27 2022 Gerd Hoffmann <kraxel@redhat.com> - 1.4-1
- update to version 1.4
- add man-pages
- add tests sub-package
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon Jul 18 2022 Gerd Hoffmann <kraxel@redhat.com> - 1.2-1
- update to version 1.2
* Fri Jul 01 2022 Gerd Hoffmann <kraxel@redhat.com> - 1.1-1
- update to version 1.1
* Wed Jun 22 2022 Gerd Hoffmann <kraxel@redhat.com> - 1.0-1
- update to version 1.0
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 0.98-2
- Rebuilt for Python 3.11
* Tue May 24 2022 Gerd Hoffmann <kraxel@redhat.com> - 0.98-1
- update to version 0.98
* Mon Apr 11 2022 Gerd Hoffmann <kraxel@redhat.com> - 0.95-1
- Initial package.

View File

@ -1,6 +0,0 @@
--- !Policy
product_versions:
- rhel-10
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}

View File

@ -1,135 +0,0 @@
Name: python-virt-firmware
Version: 25.7.3
Release: %autorelease
Summary: Tools for virtual machine firmware volumes
License: GPL-2.0-only
URL: https://pypi.org/project/virt-firmware/
Source0: virt_firmware-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: make help2man
BuildRequires: systemd systemd-rpm-macros
%generate_buildrequires
%pyproject_buildrequires
%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}
Provides: virt-firmware
Conflicts: python3-virt-firmware-peutils < 23.9
Obsoletes: python3-virt-firmware-peutils < 23.9
Requires: python3dist(cryptography)
Requires: python3dist(setuptools)
Requires: python3dist(pefile)
Requires: virt-sb-certs
%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.
%package -n python3-virt-firmware-tests
Summary: %{summary} - test cases
Requires: python3-virt-firmware
Requires: python3dist(pytest)
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.
%package -n virt-sb-certs
Summary: secure boot certificate database
%description -n virt-sb-certs
secure boot certificates used by microsoft and linux distributions, to
be used for a more finegrained secure boot configuration for virtual
machines.
%prep
%autosetup -n virt_firmware-%{version}
%build
%pyproject_wheel
%install
%pyproject_install
# manpages
install -m 755 -d %{buildroot}%{_mandir}/man1
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}%{_prefix}/lib/kernel/install.d
install -m 644 systemd/kernel-bootcfg-boot-successful.service %{buildroot}%{_unitdir}
install -m 755 systemd/99-uki-uefi-setup.install %{buildroot}%{_prefix}/lib/kernel/install.d
# virt-sb-certs
install -m 755 -d %{buildroot}%{_datadir}/virt-sb-certs
dirs=$(cd %{buildroot}%{python3_sitelib}/virt/firmware/certs; echo *)
mv -v %{buildroot}%{python3_sitelib}/virt/firmware/certs/* \
%{buildroot}%{_datadir}/virt-sb-certs
for dir in $dirs; do
ln -vs ../../../../../../..%{_datadir}/virt-sb-certs/$dir \
%{buildroot}%{python3_sitelib}/virt/firmware/certs/$dir
done
%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 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-%{version}.dist-info
%files -n python3-virt-firmware-tests
%{_datadir}/%{name}/tests
%files -n uki-direct
%{_unitdir}/kernel-bootcfg-boot-successful.service
%{_prefix}/lib/kernel/install.d/99-uki-uefi-setup.install
%files -n virt-sb-certs
%{_datadir}/virt-sb-certs
%changelog
%autochangelog

View File

@ -1 +0,0 @@
SHA512 (virt_firmware-25.7.3.tar.gz) = a3e846283e8326a9e82fe5f12084287a2f541cd2fdb44b5a215e11459a90c6625498f1dc8f1a3ea10ba5e2021515ec54e7755132b78ae4b339137980795c6c2a

View File

@ -1,18 +0,0 @@
- hosts: localhost
roles:
- role: standard-test-basic
tags:
- classic
tests:
- virt-fw-dump:
run: /usr/share/python-virt-firmware/tests/test-dump.sh
- virt-fw-vars:
run: /usr/share/python-virt-firmware/tests/test-vars.sh
- virt-fw-sigdb:
run: /usr/share/python-virt-firmware/tests/test-sigdb.sh
- virt-pe-utils:
run: /usr/share/python-virt-firmware/tests/test-pe.sh
- kernel-bootcfg:
run: /usr/share/python-virt-firmware/tests/test-bootcfg.sh
- python-unittest:
run: python3 /usr/share/python-virt-firmware/tests/tests.py