summaryrefslogtreecommitdiff
path: root/app-emulation/virt-firmware
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-03-17 18:49:32 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-03-17 18:49:32 +0000
commit5c94a4b3d11ad7b169e23bd604cf403c96bf4f1c (patch)
tree51700ddb4327326dcc3f915423b58b3842fef379 /app-emulation/virt-firmware
parentd1ad4013179c639433bdbfa5025ca403aac0767b (diff)
gentoo auto-resync : 17:03:2024 - 18:49:32
Diffstat (limited to 'app-emulation/virt-firmware')
-rw-r--r--app-emulation/virt-firmware/Manifest3
-rw-r--r--app-emulation/virt-firmware/files/virt-firmware-24.2-allow-cmdline-override.patch68
-rw-r--r--app-emulation/virt-firmware/virt-firmware-24.2_p20240315-r2.ebuild (renamed from app-emulation/virt-firmware/virt-firmware-24.2_p20240315-r1.ebuild)13
3 files changed, 75 insertions, 9 deletions
diff --git a/app-emulation/virt-firmware/Manifest b/app-emulation/virt-firmware/Manifest
index 59c9c8f65bff..b00c9defb55b 100644
--- a/app-emulation/virt-firmware/Manifest
+++ b/app-emulation/virt-firmware/Manifest
@@ -1,7 +1,8 @@
AUX kernel-bootcfg-boot-successful 225 BLAKE2B 27c798393135049ca2d4d50f01e8c8a52773d137bcd695357e57038b28a8cfa3fa88602b01a28ab2c7521d53c7ec85edb1bd968ff544d8ec1eaf01f478b8d990 SHA512 101089f296cd04b84d6f5eade432d2de76688959a0dc24560ff4882fd99431142a4916ba8ede935bd7055d6e32d53dcd3cb9c7c6e556035f22942088e946411e
+AUX virt-firmware-24.2-allow-cmdline-override.patch 3702 BLAKE2B 51fac95c5af89e43bf07a6dc72805764bad72368ef3deeb14dc31bfaf0916f81dbe4e246b2d27eea93b8021068231382436361bc7a57ca9295220271190071e4 SHA512 4e01a45d1620c46600ff514e506ca3e5c4f2c2ddca8b2294648c22ebaeaef4223597a5546f13566c34362a3d0be181b42120cd0c79ab19fa5df1c84c1b0c491b
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-r1.ebuild 1030 BLAKE2B 2d8761f2044dd9a955383b6c029df69f304961e2bfb6256d72e780345c344d963e879527b68d5d238cd0fb1676bfd43f217e47432b5b3222ef903d28ac26e0c0 SHA512 d17324a840f805a3d94e15d163bf6dd66629523a441b8fe5e43793d37f374382135de806c4c87cc96adea4efc3b621ab2a552ce45fa619762274200163944d66
-EBUILD virt-firmware-24.2_p20240315-r1.ebuild 1226 BLAKE2B 752459c47909c2668ad7e29cda5c294ca092d0da7a409e193307c5b75469f9fff8c2583b7315cbbdba43b203d0c83efadf0241596b337e17c976c431097c26aa SHA512 6fdbfdb458643f0bb5b93c3b5e109f9d951ea8b9526ef018db08b6c22507cd62c606a09f9373116037825a83a48ebb768ab341e9c0922f8a82e4549255af829a
+EBUILD virt-firmware-24.2_p20240315-r2.ebuild 1192 BLAKE2B 18f34510eb0efa51b43b4aab0e4bcf7f7eafbd354570723e47b18306dc8d89d9e742a376c4879205598c6d86bee7ec19821ad214f16a99d79ada648a891e5c3a SHA512 7fccbc5c67319e2759820ff074fc607ddcc8d1dac6e80fdf4d594e966314bddb2db61a96a3d6444cdbd1b8241f13c09a95022d6a646865ebde56e100146b24a4
MISC metadata.xml 726 BLAKE2B 809ef093c67bf4c03ae99efa7112b92c3d6d24058ba8ae444045ae52adf9accf60e42a84966f8fd7ab793dfb3238660f4f422fbae2c36f6fd35bf0b02b42a1f1 SHA512 af58f69792dadd71c66022fb08f0f878c3f140114287000a16e96fd8b30bf410e595d373a5cd92b56bd28d5f9996ab5cdecac91ba1b743f2e807feeeaf6e9cbd
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
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
}