diff --git a/backport-Fix-the-incorrect-long-parameter-in-help-messages.patch b/backport-Fix-the-incorrect-long-parameter-in-help-messages.patch new file mode 100644 index 0000000000000000000000000000000000000000..bc602e0f665b0ad998a889dd1e595afb8691ae59 --- /dev/null +++ b/backport-Fix-the-incorrect-long-parameter-in-help-messages.patch @@ -0,0 +1,25 @@ +From af5b168d1ca205d9fee20142cf9d0d47962a2a0b Mon Sep 17 00:00:00 2001 +From: century6 +Date: Fri, 3 Nov 2023 11:22:12 +0800 +Subject: [PATCH] Fix the incorrect long parameter in help messages + +- fix the incorrect long parameter of --device + +Signed-off-by: Qiumiao Zhang +--- + src/efibootmgr.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/efibootmgr.c b/src/efibootmgr.c +index 7e8cdab..b35fcf4 100644 +--- a/src/efibootmgr.c ++++ b/src/efibootmgr.c +@@ -1404,7 +1404,7 @@ usage() + printf("\t-d | --disk disk Disk containing boot loader (defaults to /dev/sda).\n"); + printf("\t-D | --remove-dups Remove duplicate values from BootOrder.\n"); + printf("\t-e | --edd [1|3] Force boot entries to be created using EDD 1.0 or 3.0 info.\n"); +- printf("\t-E | --device num EDD 1.0 device number (defaults to 0x80).\n"); ++ printf("\t-E | --edd-device num EDD 1.0 device number (defaults to 0x80).\n"); + printf("\t --full-dev-path Use a full device path.\n"); + printf("\t --file-dev-path Use an abbreviated File() device path.\n"); + printf("\t-f | --reconnect Re-connect devices after driver is loaded.\n"); diff --git a/backport-efibootmgr-delete_bootnext-is-just-a-boolean-not-an-entry-id.patch b/backport-efibootmgr-delete_bootnext-is-just-a-boolean-not-an-entry-id.patch new file mode 100644 index 0000000000000000000000000000000000000000..a633af4b48aa4fdeaf36ef933ae636ace5ea1a66 --- /dev/null +++ b/backport-efibootmgr-delete_bootnext-is-just-a-boolean-not-an-entry-id.patch @@ -0,0 +1,32 @@ +From 0ca99d442e9d0a49d3ec373413d781ca392b57bc Mon Sep 17 00:00:00 2001 +From: Dima Zavin +Date: Mon, 8 Jan 2024 11:23:20 -0800 +Subject: [PATCH] efibootmgr: delete_bootnext is just a boolean, not an entry + id + +When deleting bootnext, there's nothing to validate (other than +the variable existing, in which case del will fail as expected). + +This appears to be a copy/paste error when adding the delete-bootnext +option from the [create] bootnext option. + +Signed-off-by: Dima Zavin +--- + src/efibootmgr.c | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/src/efibootmgr.c b/src/efibootmgr.c +index b35fcf4..6f51d33 100644 +--- a/src/efibootmgr.c ++++ b/src/efibootmgr.c +@@ -1928,10 +1928,6 @@ main(int argc, char **argv) + } + + if (opts.delete_bootnext) { +- if (!is_current_entry(opts.delete_bootnext)) +- errorx(17, "Boot entry %04X does not exist", +- opts.delete_bootnext); +- + ret = efi_del_variable(EFI_GLOBAL_GUID, "BootNext"); + if (ret < 0) + error(10, "Could not delete BootNext"); diff --git a/efibootmgr.spec b/efibootmgr.spec index bf0cba7fc47f83d97e1980939d223aa36d43cc44..86dde058339fdf1ace6b16d5896ef88f0fa69397 100644 --- a/efibootmgr.spec +++ b/efibootmgr.spec @@ -1,5 +1,5 @@ Name: efibootmgr -Release: 4 +Release: 5 Version: 18 Summary: A tool manipulating the EFI Boot Manager License: GPLv2+ @@ -9,6 +9,8 @@ Source0: https://github.com/rhboot/%{name}/archive/refs/tags/%{version}.ta Patch6000: backport-Update-efibootmgr.c.patch Patch6001: backport-Add-missing-short-option-handling-for-index-I.patch Patch6002: backport-Fix-segfault-when-passed-index-is-greater-than-curre.patch +Patch6003: backport-Fix-the-incorrect-long-parameter-in-help-messages.patch +Patch6004: backport-efibootmgr-delete_bootnext-is-just-a-boolean-not-an-entry-id.patch BuildRequires: gcc BuildRequires: efi-srpm-macros >= 3-2 efi-filesystem git popt-devel efivar-libs >= 38-1 efivar-devel >= 38-1 @@ -50,6 +52,10 @@ rm -rf %{buildroot} %{_mandir}/*/*.?.gz %changelog +* Mon Jun 17 2024 zhangxingrong - 18-5 +- Fix the incorrect long parameter in help messages +- efibootmgr: delete_bootnext is just a boolean, not an entry id + * Mon Mar 13 2023 zhangqiumiao - 18-4 - Fix segfault when passed --index is greater than current boot order size Add missing short option handling for --index (-I)