public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virt-firmware/files/, app-emulation/virt-firmware/
@ 2024-03-15 17:48 Andrew Ammerlaan
  0 siblings, 0 replies; 5+ messages in thread
From: Andrew Ammerlaan @ 2024-03-15 17:48 UTC (permalink / raw
  To: gentoo-commits

commit:     23705d366e67b61fc1006845adbff9dfee738d3f
Author:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 15 17:45:07 2024 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Fri Mar 15 17:48:18 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=23705d36

app-emulation/virt-firmware: add 24.2_p20240315

Closes: https://github.com/projg2/installkernel-gentoo/pull/20
Closes: https://github.com/projg2/installkernel-gentoo/issues/19
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>

 app-emulation/virt-firmware/Manifest               |  1 +
 .../files/virt-firmware-24.2-dont-force-shim.patch | 45 ++++++++++++++++++
 .../virt-firmware-24.2_p20240315.ebuild            | 54 ++++++++++++++++++++++
 3 files changed, 100 insertions(+)

diff --git a/app-emulation/virt-firmware/Manifest b/app-emulation/virt-firmware/Manifest
index bc81330a6c0a..b076a294d071 100644
--- a/app-emulation/virt-firmware/Manifest
+++ b/app-emulation/virt-firmware/Manifest
@@ -1 +1,2 @@
 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

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]"
+}


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virt-firmware/files/, app-emulation/virt-firmware/
@ 2024-03-16  8:05 Andrew Ammerlaan
  0 siblings, 0 replies; 5+ messages in thread
From: Andrew Ammerlaan @ 2024-03-16  8:05 UTC (permalink / raw
  To: gentoo-commits

commit:     9fbd94d535866efbf5d566269c33107b2cb39d0f
Author:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 16 08:04:00 2024 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Sat Mar 16 08:05:04 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9fbd94d5

app-emulation/virt-firmware: add openrc service script

Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>

 app-emulation/virt-firmware/files/kernel-bootcfg-boot-successful | 9 +++++++++
 .../{virt-firmware-24.2.ebuild => virt-firmware-24.2-r1.ebuild}  | 3 ++-
 ...2_p20240315.ebuild => virt-firmware-24.2_p20240315-r1.ebuild} | 3 ++-
 3 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/app-emulation/virt-firmware/files/kernel-bootcfg-boot-successful b/app-emulation/virt-firmware/files/kernel-bootcfg-boot-successful
new file mode 100644
index 000000000000..5c7ef1a79ccf
--- /dev/null
+++ b/app-emulation/virt-firmware/files/kernel-bootcfg-boot-successful
@@ -0,0 +1,9 @@
+#!/sbin/openrc-run
+# Copyright 2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+description="UKI Successful Boot"
+
+start() {
+	kernel-bootcfg --boot-successful --update-csv || return 1
+}

diff --git a/app-emulation/virt-firmware/virt-firmware-24.2.ebuild b/app-emulation/virt-firmware/virt-firmware-24.2-r1.ebuild
similarity index 89%
rename from app-emulation/virt-firmware/virt-firmware-24.2.ebuild
rename to app-emulation/virt-firmware/virt-firmware-24.2-r1.ebuild
index 9fd059ab7234..60c7279c9636 100644
--- a/app-emulation/virt-firmware/virt-firmware-24.2.ebuild
+++ b/app-emulation/virt-firmware/virt-firmware-24.2-r1.ebuild
@@ -35,6 +35,7 @@ python_install_all() {
 
 	doman man/*.1
 
+	doinitd "${FILESDIR}/kernel-bootcfg-boot-successful"
 	systemd_dounit systemd/kernel-bootcfg-boot-successful.service
 
 	exeinto /usr/lib/kernel/install.d
@@ -43,5 +44,5 @@ python_install_all() {
 
 pkg_postinst() {
 	optfeature "managing UEFI entries on Unified Kernel Image installation and removal" \
-		"sys-boot/shim sys-kernel/installkernel[systemd]"
+		"sys-boot/shim sys-kernel/installkernel[systemd,uki]"
 }

diff --git a/app-emulation/virt-firmware/virt-firmware-24.2_p20240315.ebuild b/app-emulation/virt-firmware/virt-firmware-24.2_p20240315-r1.ebuild
similarity index 92%
rename from app-emulation/virt-firmware/virt-firmware-24.2_p20240315.ebuild
rename to app-emulation/virt-firmware/virt-firmware-24.2_p20240315-r1.ebuild
index cf1fcb8fc0ef..5eb358eb6555 100644
--- a/app-emulation/virt-firmware/virt-firmware-24.2_p20240315.ebuild
+++ b/app-emulation/virt-firmware/virt-firmware-24.2_p20240315-r1.ebuild
@@ -42,6 +42,7 @@ python_install_all() {
 
 	doman man/*.1
 
+	doinitd "${FILESDIR}/kernel-bootcfg-boot-successful"
 	systemd_dounit systemd/kernel-bootcfg-boot-successful.service
 
 	exeinto /usr/lib/kernel/install.d
@@ -50,5 +51,5 @@ python_install_all() {
 
 pkg_postinst() {
 	optfeature "managing UEFI entries on Unified Kernel Image installation and removal" \
-		"sys-kernel/installkernel[systemd]"
+		"sys-kernel/installkernel[systemd,uki]"
 }


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virt-firmware/files/, app-emulation/virt-firmware/
@ 2024-03-17 16:53 Andrew Ammerlaan
  0 siblings, 0 replies; 5+ messages in thread
From: Andrew Ammerlaan @ 2024-03-17 16:53 UTC (permalink / raw
  To: gentoo-commits

commit:     044771fd93582ce9af74647360f2285de1b5cdc2
Author:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 17 16:42:04 2024 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Sun Mar 17 16:53:09 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=044771fd

app-emulation/virt-firmware: move plugin to installkernel

and add cmdline option so we can use this with vanilla linux stub instead
of systemd-stub

Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>

 ...virt-firmware-24.2-allow-cmdline-override.patch | 68 ++++++++++++++++++++++
 ...uild => virt-firmware-24.2_p20240315-r2.ebuild} | 13 ++---
 2 files changed, 73 insertions(+), 8 deletions(-)

diff --git a/app-emulation/virt-firmware/files/virt-firmware-24.2-allow-cmdline-override.patch b/app-emulation/virt-firmware/files/virt-firmware-24.2-allow-cmdline-override.patch
new file mode 100644
index 000000000000..6dd774424784
--- /dev/null
+++ b/app-emulation/virt-firmware/files/virt-firmware-24.2-allow-cmdline-override.patch
@@ -0,0 +1,68 @@
+https://gitlab.com/kraxel/virt-firmware/-/merge_requests/11
+diff --git a/man/kernel-bootcfg.1 b/man/kernel-bootcfg.1
+index 089d4dc..121304e 100644
+--- a/man/kernel-bootcfg.1
++++ b/man/kernel-bootcfg.1
+@@ -38,6 +38,9 @@ update boot entry for UKI image FILE
+ \fB\-\-remove\-uki\fR FILE
+ remove boot entry for UKI image FILE
+ .TP
++\fB\-\-cmdline\fR CMDLINE
++override UKIs cmdline when adding boot entry (ignored when Secure Boot is enabled) CMDLINE
++.TP
+ \fB\-\-boot\-ok\fR, \fB\-\-boot\-successful\fR
+ boot is successful, update BootOrder to have current
+ entry listed first.
+diff --git a/virt/firmware/bootcfg/main.py b/virt/firmware/bootcfg/main.py
+index 65f2ad3..b809380 100644
+--- a/virt/firmware/bootcfg/main.py
++++ b/virt/firmware/bootcfg/main.py
+@@ -71,6 +71,8 @@ def add_uki(cfg, options):
+     if not options.title:
+         logging.error('entry title not specified')
+         sys.exit(1)
++    if options.cmdline and cfg.secureboot:
++        logging.warning("Overriding built-in UKI cmdline is not possible when Secure Boot is enabled")
+ 
+     efiuki = linuxcfg.LinuxEfiFile(options.adduki)
+     nr = cfg.find_uki_entry(efiuki.efi_filename())
+@@ -84,15 +86,25 @@ def add_uki(cfg, options):
+             if efishim.device != efiuki.device:
+                 logging.error('shim and uki are on different filesystems')
+                 sys.exit(1)
+-            optdata = ucs16.from_string(efiuki.efi_filename())
++            if options.cmdline:
++                optdata = ucs16.from_string(efiuki.efi_filename() + ' ' + options.cmdline)
++            else:
++                optdata = ucs16.from_string(efiuki.efi_filename())
+             entry = bootentry.BootEntry(title = ucs16.from_string(options.title),
+                                         attr = bootentry.LOAD_OPTION_ACTIVE,
+                                         devicepath = efishim.dev_path_file(),
+                                         optdata = bytes(optdata))
+         else:
+-            entry = bootentry.BootEntry(title = ucs16.from_string(options.title),
+-                                        attr = bootentry.LOAD_OPTION_ACTIVE,
+-                                        devicepath = efiuki.dev_path_file())
++            if options.cmdline:
++                optdata = ucs16.from_string(options.cmdline)
++                entry = bootentry.BootEntry(title = ucs16.from_string(options.title),
++                                            attr = bootentry.LOAD_OPTION_ACTIVE,
++                                            devicepath = efiuki.dev_path_file(),
++                                            optdata = bytes(optdata))
++            else:
++                entry = bootentry.BootEntry(title = ucs16.from_string(options.title),
++                                            attr = bootentry.LOAD_OPTION_ACTIVE,
++                                            devicepath = efiuki.dev_path_file())
+ 
+         logging.info('Create new entry: %s', str(entry))
+         nr = cfg.add_entry(entry)
+@@ -229,6 +241,9 @@ def main():
+                        help = 'update boot entry for UKI image FILE', metavar = 'FILE')
+     group.add_argument('--remove-uki', dest = 'removeuki', type = str,
+                        help = 'remove boot entry for UKI image FILE', metavar = 'FILE')
++    group.add_argument('--cmdline', dest = 'cmdline', type = str,
++                       help = 'override UKIs cmdline when adding boot entry '
++                       '(ignored when Secure Boot is enabled)', metavar = 'CMDLINE')
+     group.add_argument('--boot-ok', '--boot-successful', dest = 'bootok',
+                        action = 'store_true', default = False,
+                        help = 'boot is successful, update BootOrder to have '

diff --git a/app-emulation/virt-firmware/virt-firmware-24.2_p20240315-r1.ebuild b/app-emulation/virt-firmware/virt-firmware-24.2_p20240315-r2.ebuild
similarity index 78%
rename from app-emulation/virt-firmware/virt-firmware-24.2_p20240315-r1.ebuild
rename to app-emulation/virt-firmware/virt-firmware-24.2_p20240315-r2.ebuild
index 5eb358eb6555..8fcfe0071043 100644
--- a/app-emulation/virt-firmware/virt-firmware-24.2_p20240315-r1.ebuild
+++ b/app-emulation/virt-firmware/virt-firmware-24.2_p20240315-r2.ebuild
@@ -6,7 +6,7 @@ EAPI=8
 PYTHON_COMPAT=( python3_{10..12} )
 DISTUTILS_USE_PEP517=setuptools
 
-inherit distutils-r1 optfeature systemd
+inherit distutils-r1 systemd
 
 COMMIT="f278ef19b0bc94ae93881ee4ab45fcbb03926e5f"
 
@@ -29,6 +29,7 @@ RDEPEND="
 
 PATCHES=(
 	"${FILESDIR}/${PN}-24.2-dont-force-shim.patch"
+	"${FILESDIR}/${PN}-24.2-allow-cmdline-override.patch"
 )
 
 distutils_enable_tests unittest
@@ -45,11 +46,7 @@ python_install_all() {
 	doinitd "${FILESDIR}/kernel-bootcfg-boot-successful"
 	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,uki]"
+	# Use our own provided by sys-kernel/installkernel[efistub] instead
+	#exeinto /usr/lib/kernel/install.d
+	#doexe systemd/99-uki-uefi-setup.install
 }


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virt-firmware/files/, app-emulation/virt-firmware/
@ 2024-03-20 10:13 Andrew Ammerlaan
  0 siblings, 0 replies; 5+ messages in thread
From: Andrew Ammerlaan @ 2024-03-20 10:13 UTC (permalink / raw
  To: gentoo-commits

commit:     fca47084c44969bbc8f7c851950646fcd659c591
Author:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 20 10:12:56 2024 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Wed Mar 20 10:12:56 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fca47084

app-emulation/virt-firmware: add 24.2_p20240320

Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>

 app-emulation/virt-firmware/Manifest               |  1 +
 ...virt-firmware-24.2-allow-cmdline-override.patch | 68 ----------------------
 .../virt-firmware-24.2_p20240320.ebuild            | 51 ++++++++++++++++
 3 files changed, 52 insertions(+), 68 deletions(-)

diff --git a/app-emulation/virt-firmware/Manifest b/app-emulation/virt-firmware/Manifest
index b076a294d071..c1abb573fd9d 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_p20240315.tar.gz 105633 BLAKE2B 6d43a00626403739cf40e9d1d9310c02b0a3794a66c61124f21f45714207b3700fe1e91f0bdb57968d03bd1b08b262327edf3e2271db5b7d7dfc33cf52dce7fd SHA512 cb7e10c8ecb65e90373199be30c1e44c6d89a7c1244780999f5a38de10366ad98b0b747ca471360dd3b38a018df883f21a6758cfeabf85f44d96f38622a19655
+DIST virt-firmware-24.2_p20240320.tar.gz 107008 BLAKE2B b647ae0a918a85614499741edcd2c9b9aff6b8223905849977600a1b845de4c58ff4c45365e2a40090d5112592a295d4b5c489a8b52203043960c81973dd299f SHA512 825c27d04dcc80e2f8b163906894e9279a11fdf442b45ecf1f1493d3eb1ce9c6047f1c363a39bc1cc4d8870bfa52afa6835abc8e102fd1f17416ebe9c3a65331

diff --git a/app-emulation/virt-firmware/files/virt-firmware-24.2-allow-cmdline-override.patch b/app-emulation/virt-firmware/files/virt-firmware-24.2-allow-cmdline-override.patch
deleted file mode 100644
index 6dd774424784..000000000000
--- a/app-emulation/virt-firmware/files/virt-firmware-24.2-allow-cmdline-override.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-https://gitlab.com/kraxel/virt-firmware/-/merge_requests/11
-diff --git a/man/kernel-bootcfg.1 b/man/kernel-bootcfg.1
-index 089d4dc..121304e 100644
---- a/man/kernel-bootcfg.1
-+++ b/man/kernel-bootcfg.1
-@@ -38,6 +38,9 @@ update boot entry for UKI image FILE
- \fB\-\-remove\-uki\fR FILE
- remove boot entry for UKI image FILE
- .TP
-+\fB\-\-cmdline\fR CMDLINE
-+override UKIs cmdline when adding boot entry (ignored when Secure Boot is enabled) CMDLINE
-+.TP
- \fB\-\-boot\-ok\fR, \fB\-\-boot\-successful\fR
- boot is successful, update BootOrder to have current
- entry listed first.
-diff --git a/virt/firmware/bootcfg/main.py b/virt/firmware/bootcfg/main.py
-index 65f2ad3..b809380 100644
---- a/virt/firmware/bootcfg/main.py
-+++ b/virt/firmware/bootcfg/main.py
-@@ -71,6 +71,8 @@ def add_uki(cfg, options):
-     if not options.title:
-         logging.error('entry title not specified')
-         sys.exit(1)
-+    if options.cmdline and cfg.secureboot:
-+        logging.warning("Overriding built-in UKI cmdline is not possible when Secure Boot is enabled")
- 
-     efiuki = linuxcfg.LinuxEfiFile(options.adduki)
-     nr = cfg.find_uki_entry(efiuki.efi_filename())
-@@ -84,15 +86,25 @@ def add_uki(cfg, options):
-             if efishim.device != efiuki.device:
-                 logging.error('shim and uki are on different filesystems')
-                 sys.exit(1)
--            optdata = ucs16.from_string(efiuki.efi_filename())
-+            if options.cmdline:
-+                optdata = ucs16.from_string(efiuki.efi_filename() + ' ' + options.cmdline)
-+            else:
-+                optdata = ucs16.from_string(efiuki.efi_filename())
-             entry = bootentry.BootEntry(title = ucs16.from_string(options.title),
-                                         attr = bootentry.LOAD_OPTION_ACTIVE,
-                                         devicepath = efishim.dev_path_file(),
-                                         optdata = bytes(optdata))
-         else:
--            entry = bootentry.BootEntry(title = ucs16.from_string(options.title),
--                                        attr = bootentry.LOAD_OPTION_ACTIVE,
--                                        devicepath = efiuki.dev_path_file())
-+            if options.cmdline:
-+                optdata = ucs16.from_string(options.cmdline)
-+                entry = bootentry.BootEntry(title = ucs16.from_string(options.title),
-+                                            attr = bootentry.LOAD_OPTION_ACTIVE,
-+                                            devicepath = efiuki.dev_path_file(),
-+                                            optdata = bytes(optdata))
-+            else:
-+                entry = bootentry.BootEntry(title = ucs16.from_string(options.title),
-+                                            attr = bootentry.LOAD_OPTION_ACTIVE,
-+                                            devicepath = efiuki.dev_path_file())
- 
-         logging.info('Create new entry: %s', str(entry))
-         nr = cfg.add_entry(entry)
-@@ -229,6 +241,9 @@ def main():
-                        help = 'update boot entry for UKI image FILE', metavar = 'FILE')
-     group.add_argument('--remove-uki', dest = 'removeuki', type = str,
-                        help = 'remove boot entry for UKI image FILE', metavar = 'FILE')
-+    group.add_argument('--cmdline', dest = 'cmdline', type = str,
-+                       help = 'override UKIs cmdline when adding boot entry '
-+                       '(ignored when Secure Boot is enabled)', metavar = 'CMDLINE')
-     group.add_argument('--boot-ok', '--boot-successful', dest = 'bootok',
-                        action = 'store_true', default = False,
-                        help = 'boot is successful, update BootOrder to have '

diff --git a/app-emulation/virt-firmware/virt-firmware-24.2_p20240320.ebuild b/app-emulation/virt-firmware/virt-firmware-24.2_p20240320.ebuild
new file mode 100644
index 000000000000..bb4de7712a4e
--- /dev/null
+++ b/app-emulation/virt-firmware/virt-firmware-24.2_p20240320.ebuild
@@ -0,0 +1,51 @@
+# 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
+
+COMMIT="94db6a7d9eb867076d9b79536d9b9b6c065f341b"
+
+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
+
+	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
+}


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virt-firmware/files/, app-emulation/virt-firmware/
@ 2024-04-02 12:56 Andrew Ammerlaan
  0 siblings, 0 replies; 5+ messages in thread
From: Andrew Ammerlaan @ 2024-04-02 12:56 UTC (permalink / raw
  To: gentoo-commits

commit:     f29196bf55c8ec0ca72979cd904b8c9a7a2dd81a
Author:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
AuthorDate: Tue Apr  2 12:56:15 2024 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Tue Apr  2 12:56:15 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f29196bf

app-emulation/virt-firmware: add 24.2_p20240402

Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>

 app-emulation/virt-firmware/Manifest               |  1 +
 ...irmware-24.2_p20240402-expand-shim-search.patch | 20 ++++++++
 .../virt-firmware-24.2_p20240402.ebuild            | 60 ++++++++++++++++++++++
 3 files changed, 81 insertions(+)

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]"
+}


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-04-02 12:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-16  8:05 [gentoo-commits] repo/gentoo:master commit in: app-emulation/virt-firmware/files/, app-emulation/virt-firmware/ Andrew Ammerlaan
  -- strict thread matches above, loose matches on Subject: below --
2024-04-02 12:56 Andrew Ammerlaan
2024-03-20 10:13 Andrew Ammerlaan
2024-03-17 16:53 Andrew Ammerlaan
2024-03-15 17:48 Andrew Ammerlaan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox