summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Ammerlaan <andrewammerlaan@gentoo.org>2024-04-02 14:56:15 +0200
committerAndrew Ammerlaan <andrewammerlaan@gentoo.org>2024-04-02 14:56:15 +0200
commitf29196bf55c8ec0ca72979cd904b8c9a7a2dd81a (patch)
tree4534e7554f87272da8e1b37d7b15c2c4daff07a3
parentsci-misc/oww: fix missing build-time dependency (diff)
downloadgentoo-f29196bf55c8ec0ca72979cd904b8c9a7a2dd81a.tar.gz
gentoo-f29196bf55c8ec0ca72979cd904b8c9a7a2dd81a.tar.bz2
gentoo-f29196bf55c8ec0ca72979cd904b8c9a7a2dd81a.zip
app-emulation/virt-firmware: add 24.2_p20240402
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
-rw-r--r--app-emulation/virt-firmware/Manifest1
-rw-r--r--app-emulation/virt-firmware/files/virt-firmware-24.2_p20240402-expand-shim-search.patch20
-rw-r--r--app-emulation/virt-firmware/virt-firmware-24.2_p20240402.ebuild60
3 files changed, 81 insertions, 0 deletions
diff --git a/app-emulation/virt-firmware/Manifest b/app-emulation/virt-firmware/Manifest
index eac1dd1b0546..22076120b622 100644
--- a/app-emulation/virt-firmware/Manifest
+++ b/app-emulation/virt-firmware/Manifest
@@ -1,2 +1,3 @@
DIST virt-firmware-24.2.tar.gz 110844 BLAKE2B db7ad7663678a313bdd0e23de7e374547e5dbc1a04b37a65e366ae042410a3a6c21ccfef3747a2534cb76906868caaf1364ac1ecd1443c1c1053a5b7687da50b SHA512 8583420acb31fb32e4c195c0c1816b36248ec2e486ded0795e51180e2690b2bcdc10eb8707f4fc9fa36da5b24082737c5c3b2e3988f6c5455e08a5d2a0ff92e7
DIST virt-firmware-24.2_p20240325.tar.gz 107037 BLAKE2B d7fe7c760b769124ccc4192e3133563cf287b8a0cbe281fb758b66ae27a4c9461b6a5bdd7b97ec3e1c8e2a051b8a05fa45ded19eeb3bbbd5ff787443fed96a0d SHA512 4ea5d21bc57bda5fbfae79d70aa7805e1d4ca53aa5aeb40b555d5c03ff0fbd9780a92b3aaf9bc5b7cb8169205487309bff7031ded409e26d8d39b1fe3d937510
+DIST virt-firmware-24.2_p20240402.tar.gz 106875 BLAKE2B cdc6bde95a7db347e896c3d33e7ad0715c5a6cbb9a80dbcfb87379bb0f7693c0b96544cb3a1394ce115cfe98321d79339b682f02250930b85ff4bef35d038251 SHA512 50899655fe76e7ed71d3a607030a2067ae97f15f0d3698a54ec388ac6e27e2c2f39b2b4cb5552dad17e184124d62f70d045bc8b5b1f6c5931d477a911be11637
diff --git a/app-emulation/virt-firmware/files/virt-firmware-24.2_p20240402-expand-shim-search.patch b/app-emulation/virt-firmware/files/virt-firmware-24.2_p20240402-expand-shim-search.patch
new file mode 100644
index 000000000000..9af50fb4b310
--- /dev/null
+++ b/app-emulation/virt-firmware/files/virt-firmware-24.2_p20240402-expand-shim-search.patch
@@ -0,0 +1,20 @@
+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/app-emulation/virt-firmware/virt-firmware-24.2_p20240402.ebuild b/app-emulation/virt-firmware/virt-firmware-24.2_p20240402.ebuild
new file mode 100644
index 000000000000..aa8ad953dd10
--- /dev/null
+++ b/app-emulation/virt-firmware/virt-firmware-24.2_p20240402.ebuild
@@ -0,0 +1,60 @@
+# 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 systemd optfeature
+
+COMMIT="07a1e03c356766eda0188d033bad38b8d27d55ef"
+
+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 ~arm ~arm64 ~x86"
+
+RDEPEND="
+ dev-python/cryptography[${PYTHON_USEDEP}]
+ dev-python/pefile[${PYTHON_USEDEP}]
+ || (
+ sys-apps/systemd[boot(-)]
+ sys-apps/systemd-utils[boot(-)]
+ )
+" # We need bootctl from systemd(-utils)
+
+PATCHES=(
+ "${FILESDIR}/${PN}-24.2_p20240402-expand-shim-search.patch"
+)
+
+distutils_enable_tests unittest
+
+python_test() {
+ eunittest tests
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+
+ doman man/*.1
+
+ doinitd "${FILESDIR}/kernel-bootcfg-boot-successful"
+ systemd_dounit systemd/kernel-bootcfg-boot-successful.service
+
+ # Use our own provided by sys-kernel/installkernel[efistub] instead
+ #exeinto /usr/lib/kernel/install.d
+ #doexe systemd/99-uki-uefi-setup.install
+}
+
+pkg_postinst() {
+ optfeature "automatically updating UEFI configuration on each kernel installation or removal" \
+ "sys-kernel/installkernel[systemd,efistub]"
+}