From a4eda25bf0f72d757244b128657832bc4da28375 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 15 Mar 2024 18:47:53 +0000 Subject: gentoo auto-resync : 15:03:2024 - 18:47:52 --- app-emulation/Manifest.gz | Bin 15483 -> 15487 bytes app-emulation/virt-firmware/Manifest | 3 ++ .../files/virt-firmware-24.2-dont-force-shim.patch | 45 +++++++++++++++++ .../virt-firmware-24.2_p20240315.ebuild | 54 +++++++++++++++++++++ 4 files changed, 102 insertions(+) create mode 100644 app-emulation/virt-firmware/files/virt-firmware-24.2-dont-force-shim.patch create mode 100644 app-emulation/virt-firmware/virt-firmware-24.2_p20240315.ebuild (limited to 'app-emulation') diff --git a/app-emulation/Manifest.gz b/app-emulation/Manifest.gz index b890874175fc..ff8d7a9bceb5 100644 Binary files a/app-emulation/Manifest.gz and b/app-emulation/Manifest.gz differ diff --git a/app-emulation/virt-firmware/Manifest b/app-emulation/virt-firmware/Manifest index a7bf666d3dcd..84b92433064a 100644 --- a/app-emulation/virt-firmware/Manifest +++ b/app-emulation/virt-firmware/Manifest @@ -1,3 +1,6 @@ +AUX virt-firmware-24.2-dont-force-shim.patch 1694 BLAKE2B 2777ab44ebedfbe24187ec760709ddda1600cc4cbe7f1f492c901e9f46b8bfc75edbabc6bfd9fab93b18f6957100bee2abc4a8261941eab7ef0c111678f81f33 SHA512 ee0eb319957ff9748fd9c20f72e2fdc34cee3bceff603324acb5a2bce7405b3ecc5ec2cba854730a33d7294b281976e245f9c854be076feaca7ff44623a71e13 DIST virt-firmware-24.2.tar.gz 110844 BLAKE2B db7ad7663678a313bdd0e23de7e374547e5dbc1a04b37a65e366ae042410a3a6c21ccfef3747a2534cb76906868caaf1364ac1ecd1443c1c1053a5b7687da50b SHA512 8583420acb31fb32e4c195c0c1816b36248ec2e486ded0795e51180e2690b2bcdc10eb8707f4fc9fa36da5b24082737c5c3b2e3988f6c5455e08a5d2a0ff92e7 +DIST virt-firmware-24.2_p20240315.tar.gz 105633 BLAKE2B 6d43a00626403739cf40e9d1d9310c02b0a3794a66c61124f21f45714207b3700fe1e91f0bdb57968d03bd1b08b262327edf3e2271db5b7d7dfc33cf52dce7fd SHA512 cb7e10c8ecb65e90373199be30c1e44c6d89a7c1244780999f5a38de10366ad98b0b747ca471360dd3b38a018df883f21a6758cfeabf85f44d96f38622a19655 EBUILD virt-firmware-24.2.ebuild 972 BLAKE2B ccdd92c608c7f34a07f0e0c6bd5a44d4324aa2d1ca67f83325642da8cf548bf03e46c44f12e01236b6fe7186ee9ebff92c6093dee2f94dae25b25a7f21a8f580 SHA512 ebf768029c1073f45d12f7d3330ab3cc5fde85cc236a1419014a355f54b62f2dc51fe1c80cab8ad6a93bb98992e5fa67e520d9e5f882601e47734057f8b02728 +EBUILD virt-firmware-24.2_p20240315.ebuild 1168 BLAKE2B 5e5a694b8a951479e7606aabd1bf11bb31f90d6bbfe80abd4c5acee72d177541e0c7f7f0ccd5e8a39bb3204a09f3d1a5813c65ae8dfdea1d3f9244a2716de150 SHA512 0e82abbf45edda31a8b9216e5e2be2f1d63f627e4bae99cf8595180afa62bbdd48df6351c21011cee24d820e92f32223a692067ae5a25f11fbb58e19064a5ceb MISC metadata.xml 726 BLAKE2B 809ef093c67bf4c03ae99efa7112b92c3d6d24058ba8ae444045ae52adf9accf60e42a84966f8fd7ab793dfb3238660f4f422fbae2c36f6fd35bf0b02b42a1f1 SHA512 af58f69792dadd71c66022fb08f0f878c3f140114287000a16e96fd8b30bf410e595d373a5cd92b56bd28d5f9996ab5cdecac91ba1b743f2e807feeeaf6e9cbd diff --git a/app-emulation/virt-firmware/files/virt-firmware-24.2-dont-force-shim.patch b/app-emulation/virt-firmware/files/virt-firmware-24.2-dont-force-shim.patch new file mode 100644 index 000000000000..bb45026391eb --- /dev/null +++ b/app-emulation/virt-firmware/files/virt-firmware-24.2-dont-force-shim.patch @@ -0,0 +1,45 @@ +https://gitlab.com/kraxel/virt-firmware/-/merge_requests/11 +diff --git a/virt/firmware/bootcfg/linuxcfg.py b/virt/firmware/bootcfg/linuxcfg.py +index 5682b15..121af73 100644 +--- a/virt/firmware/bootcfg/linuxcfg.py ++++ b/virt/firmware/bootcfg/linuxcfg.py +@@ -188,9 +188,10 @@ class LinuxOsInfo(OsRelease): + + def shim_path(self): + esp = self.esp_path() +- subdir = self.esp_distro_dir() ++ distro_dir = self.esp_distro_dir() + arch = self.efi_arch() +- shim = f'{esp}/EFI/{subdir}/shim{arch}.efi' +- if os.path.exists(shim): +- return shim ++ for subdir in distro_dir, 'shim', 'Linux': ++ shim = f'{esp}/EFI/{subdir}/shim{arch}.efi' ++ if os.path.exists(shim): ++ return shim + return None +diff --git a/virt/firmware/bootcfg/main.py b/virt/firmware/bootcfg/main.py +index 04888d5..291903b 100644 +--- a/virt/firmware/bootcfg/main.py ++++ b/virt/firmware/bootcfg/main.py +@@ -34,8 +34,7 @@ def update_next_or_order(cfg, options, nr): + + def add_uki(cfg, options): + if not options.shim and cfg.secureboot: +- logging.error('shim binary not specified') +- sys.exit(1) ++ logging.warning('shim binary not specified') + if not options.title: + logging.error('entry title not specified') + sys.exit(1) +@@ -112,8 +111,8 @@ def boot_success(cfg, options): + + def update_boot_csv(cfg, options): + if not options.shim: +- logging.error('shim binary not specified') +- sys.exit(1) ++ logging.warning('shim binary not specified') ++ sys.exit(0) + efishim = linuxcfg.LinuxEfiFile(options.shim) + shimpath = efishim.dev_path_file() + diff --git a/app-emulation/virt-firmware/virt-firmware-24.2_p20240315.ebuild b/app-emulation/virt-firmware/virt-firmware-24.2_p20240315.ebuild new file mode 100644 index 000000000000..cf1fcb8fc0ef --- /dev/null +++ b/app-emulation/virt-firmware/virt-firmware-24.2_p20240315.ebuild @@ -0,0 +1,54 @@ +# Copyright 2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) +DISTUTILS_USE_PEP517=setuptools + +inherit distutils-r1 optfeature systemd + +COMMIT="f278ef19b0bc94ae93881ee4ab45fcbb03926e5f" + +DESCRIPTION="Tools for ovmf/armvirt firmware volumes" +HOMEPAGE=" + https://gitlab.com/kraxel/virt-firmware + https://pypi.org/project/virt-firmware/ +" +SRC_URI="https://gitlab.com/kraxel/virt-firmware/-/archive/${COMMIT}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/${PN}-${COMMIT}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64" + +RDEPEND=" + dev-python/cryptography[${PYTHON_USEDEP}] + dev-python/pefile[${PYTHON_USEDEP}] +" + +PATCHES=( + "${FILESDIR}/${PN}-24.2-dont-force-shim.patch" +) + +distutils_enable_tests unittest + +python_test() { + eunittest tests +} + +python_install_all() { + distutils-r1_python_install_all + + doman man/*.1 + + systemd_dounit systemd/kernel-bootcfg-boot-successful.service + + exeinto /usr/lib/kernel/install.d + doexe systemd/99-uki-uefi-setup.install +} + +pkg_postinst() { + optfeature "managing UEFI entries on Unified Kernel Image installation and removal" \ + "sys-kernel/installkernel[systemd]" +} -- cgit v1.2.3