commit 231b9e57374c990421cf3653138909afd2d507f79c1dd301ed17b5398d04ce11 Author: Adrian Schröter Date: Fri May 3 12:16:51 2024 +0200 Sync from SUSE:SLFO:Main efibootmgr revision 10138ca5cdc76ca56c286e9f55bb50df diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/efibootmgr-18.tar.bz2 b/efibootmgr-18.tar.bz2 new file mode 100644 index 0000000..2d9e068 --- /dev/null +++ b/efibootmgr-18.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:442867d12f8525034a404fc8af3036dba8e1fc970998af2486c3b940dfad0874 +size 45220 diff --git a/efibootmgr-delete-multiple.diff b/efibootmgr-delete-multiple.diff new file mode 100644 index 0000000..87f4cd8 --- /dev/null +++ b/efibootmgr-delete-multiple.diff @@ -0,0 +1,303 @@ +From 21741160071c83e4ae6b9fa268947abfd0d3405f Mon Sep 17 00:00:00 2001 +From: Raymund Will +Date: Fri, 3 Mar 2017 18:47:44 +0100 +Subject: [PATCH] Extended Delete +References: bsc#870211, bsc#945705 + +Delete boot entries not only by number. but alse based on +- partition UUID, optionally restricted by loader +or +- disk and partition, again optionally restricted by loader. + +This does unfortunately require an API-change of efivar! + +Signed-off-by: Raymund Will +--- +Index: efibootmgr-18/src/efibootmgr.c +=================================================================== +--- efibootmgr-18.orig/src/efibootmgr.c ++++ efibootmgr-18/src/efibootmgr.c +@@ -664,6 +664,146 @@ delete_label(const char *prefix, const u + return 0; + } + ++static int ++delete_by_uuid(const char *prefix, char *uuid_str, char *loader) ++{ ++ int count = 0; ++ list_t *pos, *tmp; ++ var_entry_t *entry; ++ const unsigned char *description; ++ efi_load_option *load_option; ++ efidp path = NULL; ++ char text_path[1024]; ++ ++ list_for_each_safe(pos, tmp, &entry_list) { ++ uint16_t pathlen; ++ ssize_t rc; ++ ++ entry = list_entry(pos, var_entry_t, list); ++ load_option = (efi_load_option *)entry->data; ++ pathlen = efi_loadopt_pathlen(load_option, ++ entry->data_size); ++ path = efi_loadopt_path(load_option, entry->data_size); ++ rc = efidp_format_device_path((unsigned char *)text_path, 1024, ++ path, pathlen); ++ ++ if (rc < 0 || rc > 1024) ++ error(20, "Could not parse device path"); ++ ++ if (strlen(text_path) == 0) ++ continue; ++ if (strcasestr(text_path, uuid_str) == NULL) ++ continue; ++ if (loader && strcasestr(text_path, loader) == NULL) ++ continue; ++ /* found! */ ++ if (opts.verbose) { ++ description = efi_loadopt_desc(load_option, ++ entry->data_size); ++ printf("Delete %s%04X %s\t%s\n", ++ prefix, entry->num, description, text_path); ++ } ++ if (delete_var(prefix, entry->num) != 0) ++ return -1; ++ count++; ++ } ++ if (count==0) { ++ /* Nothing changed => exit early */ ++ exit(0); ++ } ++ return 0; ++} ++ ++static int ++delete_by_dpl(const char *prefix, char *disk, uint32_t part, char *loader) ++{ ++ int fd, rc; ++ uint64_t start, size; ++ efi_guid_t signature; ++ char sigstr[40]; ++ char *sigstrp = sigstr; ++ uint8_t mbr_type, signature_type; ++ ++ if (disk == NULL && part == 0 && loader == NULL) ++ errx(42, "Cowardly refusing to delete ALL %s entries.", ++ prefix); ++ if (disk == NULL) { ++ /* foreach d in gpt_disks ++ * delete_by_dpl(prefix, d, part, loader) ++ */ ++ errx(42, "Future extension."); ++ } ++ if (part == 0) { ++ /* foreach p in partions_on_gpt_disk ++ * delete_by_dpl(prefix, disk, p, loader) ++ */ ++ errx(42, "Future extension."); ++ } ++ memset((char *)&signature, 0, sizeof(signature)); ++ ++ fd = open(disk, O_RDONLY|O_DIRECT); ++ if (fd == -1) ++ error(42, "Could not open disk %s", disk); ++ rc = efi_disk_get_partition_info(fd, part, &start, &size, ++ (uint8_t*)&signature, &mbr_type, &signature_type); ++ close(fd); ++ ++ if (rc) ++ return -1; ++ if (mbr_type != 0x02) { ++ errx(42, "Cowardly refusing non-GPT disk %s", disk); ++ } ++ ++ efi_guid_to_str(&signature, &sigstrp); ++ ++ if (opts.verbose && !loader) { ++ printf("About to delete all entries referring to UUID %s\n", ++ sigstr); ++ } else if ( opts.delete != 15) { ++ printf("About to delete all entries referring to loader %s\n" ++ " on UUID %s\n", ++ loader, sigstr); ++ } ++ return delete_by_uuid(prefix,sigstr,loader); ++} ++ ++/* verbatim copy of same function in efivar/src/creator.c */ ++static char * ++tilt_slashes(char *s) ++{ ++ char *p; ++ for (p = s; *p; p++) ++ if (*p == '/') ++ *p = '\\'; ++ return s; ++} ++ ++static int ++check_uuid(const char *s) ++{ ++ /* algorithm derived from efivar/src/guid.h */ ++ size_t len = 36; ++ unsigned int i; ++ if (strlen(s) != len) ++ return -1; ++ for (i = 0; i < len; i++) { ++ if (i == 8 || i == 13 || i == 18 || i == 23) { ++ if (s[i] != '-') ++ return -1; ++ continue; ++ } ++ if (s[i] >= '0' && s[i] <= '9') ++ continue; ++ /* "| 0x20" is tolower() without having to worry about ++ * locale concerns, since we know everything here must ++ * be within traditional ascii space. */ ++ if ((s[i] | 0x20) >= 'a' && (s[i] | 0x20) <= 'f') ++ continue; ++ return -1; ++ } ++ return 0; ++} ++ + static void + set_var_nums(const char *prefix, list_t *list) + { +@@ -1397,7 +1537,9 @@ usage() + printf("\t-a | --active Set bootnum active.\n"); + printf("\t-A | --inactive Set bootnum inactive.\n"); + printf("\t-b | --bootnum XXXX Modify BootXXXX (hex).\n"); +- printf("\t-B | --delete-bootnum Delete bootnum.\n"); ++ printf("\t-B | --delete-bootnum delete bootnum (specified with -b)\n"); ++ printf("\t --delete delete entry by bootnum (-b), by UUID (-P)\n"); ++ printf("\t or by disk+partition[+file] (-d -p -l)\n"); + printf("\t-c | --create Create new variable bootnum and add to bootorder at index (-I).\n"); + printf("\t-C | --create-only Create new variable bootnum and do not add to bootorder.\n"); + printf("\t-d | --disk disk Disk containing boot loader (defaults to /dev/sda).\n"); +@@ -1420,6 +1562,7 @@ usage() + printf("\t-o | --bootorder XXXX,YYYY,ZZZZ,... Explicitly set BootOrder (hex).\n"); + printf("\t-O | --delete-bootorder Delete BootOrder.\n"); + printf("\t-p | --part part Partition containing loader (defaults to 1 on partitioned devices).\n"); ++ printf("\t-P | --part-uuid UUID select all variables for given partition UUID\n"); + printf("\t-q | --quiet Be quiet.\n"); + printf("\t-r | --driver Operate on Driver variables, not Boot Variables.\n"); + printf("\t-t | --timeout seconds Set boot manager timeout waiting for user input.\n"); +@@ -1447,6 +1590,7 @@ set_default_opts() + opts.label = (unsigned char *)"Linux"; + opts.disk = "/dev/sda"; + opts.part = -1; ++ opts.part_uuid = NULL; + } + + static void +@@ -1470,6 +1614,7 @@ parse_opts(int argc, char **argv) + {"delete-bootnum", no_argument, 0, 'B'}, + {"create", no_argument, 0, 'c'}, + {"create-only", no_argument, 0, 'C'}, ++ {"delete", no_argument, 0, 2}, + {"disk", required_argument, 0, 'd'}, + {"remove-dups", no_argument, 0, 'D'}, + {"edd", required_argument, 0, 'e'}, +@@ -1508,7 +1653,7 @@ parse_opts(int argc, char **argv) + }; + + c = getopt_long(argc, argv, +- "aAb:BcCd:De:E:fFgi:kl:L:m:M:n:No:Op:qrt:Tuv::Vwy@:h", ++ "aAb:BcCd:De:E:fFgi:kl:L:m:M:n:No:Op:P:qrt:Tuv::Vwy@:h", + long_options, &option_index); + if (c == -1) + break; +@@ -1561,11 +1706,16 @@ parse_opts(int argc, char **argv) + opts.create = 1; + opts.no_order = 1; + break; ++ case 2: ++ opts.delete |= 1; ++ break; + case 'D': + opts.deduplicate = 1; + break; + case 'd': + opts.disk = optarg; ++ if (opts.delete) ++ opts.delete |= 2; + break; + case 'e': + rc = sscanf(optarg, "%d", &snum); +@@ -1627,6 +1777,9 @@ parse_opts(int argc, char **argv) + break; + case 'l': + opts.loader = optarg; ++ tilt_slashes(opts.loader); ++ if (opts.delete) ++ opts.delete |= 8; + break; + case 'L': + opts.label = (unsigned char *)optarg; +@@ -1707,6 +1860,17 @@ parse_opts(int argc, char **argv) + else + errorx(37, "invalid numeric value %s\n", + optarg); ++ if (opts.delete) ++ opts.delete |= 4; ++ break; ++ case 'P': ++ if ((rc=check_uuid(optarg)) < 0) { ++ fprintf(stderr, ++ "malformed partition UUID: %s (%d)\n", ++ optarg, rc); ++ exit(1); ++ } ++ opts.part_uuid = optarg; + break; + case 'q': + opts.quiet = 1; +@@ -1843,9 +2007,24 @@ main(int argc, char **argv) + set_var_nums(prefices[mode], &entry_list); + + if (opts.delete) { +- if (opts.num == -1 && opts.explicit_label == 0) { ++ if (opts.part_uuid) { ++ ret = delete_by_uuid(prefices[mode], opts.part_uuid, ++ (opts.delete & 8) ? opts.loader : NULL); ++ if (ret < 0) ++ error(42, "Could not delete variable(s)"); ++ } else if (opts.delete & 2) { ++ ret = delete_by_dpl(prefices[mode], ++ (opts.delete & 2) ? opts.disk : NULL, ++ (opts.delete & 4) ? opts.part : 0, ++ (opts.delete & 8) ? opts.loader : NULL); ++ if (ret < 0) ++ error(42, "Could not delete variable(s)"); ++ } else if (opts.delete > 1) ++ errorx(3, "Disk and partition must be specified " ++ "(see the --delete option)."); ++ else if (opts.num == -1 && opts.explicit_label == 0) { + errorx(3, +- "You must specify an entry to delete (see the -b option or -L option)."); ++ "You must specify an entry to delete (e.g. with the -b option or -L option)."); + } else { + if (opts.num != -1) { + ret = delete_var(prefices[mode], opts.num); +Index: efibootmgr-18/src/include/efibootmgr.h +=================================================================== +--- efibootmgr-18.orig/src/include/efibootmgr.h ++++ efibootmgr-18/src/include/efibootmgr.h +@@ -66,6 +66,7 @@ typedef struct { + int keep_old_entries; + char *testfile; + char *extra_opts_file; ++ char *part_uuid; + uint32_t part; + int abbreviate_path; + uint32_t edd10_devicenum; +@@ -77,7 +78,7 @@ typedef struct { + int below4g; + int above4g; + int deduplicate; +- unsigned int delete:1; ++ unsigned int delete:4; + unsigned int delete_order:1; + unsigned int delete_bootnext:1; + unsigned int quiet:1; diff --git a/efibootmgr.changes b/efibootmgr.changes new file mode 100644 index 0000000..d911ab3 --- /dev/null +++ b/efibootmgr.changes @@ -0,0 +1,338 @@ +------------------------------------------------------------------- +Tue Dec 20 06:17:48 UTC 2022 - Gary Ching-Pang Lin + +- Update to v18 + * fixed the simple run example + * Restore activation error message in efibootmgr + * remove-dupes: update error message + * Fix typo in manual page + * README: Note efivarfs as the current required kernel module + * Fix possible read out of bounds in ucs2_to_utf8 + * Add code of conduct + * Fix help messages + * Add option for insertion location of new entries +- Rebase efibootmgr-delete-multiple.diff + +------------------------------------------------------------------- +Tue Aug 3 10:03:52 UTC 2021 - Paolo Stivanin + +- Update to v17: [jsc#SLE-22542] + * use efivar's logging facility more (more info in -v2 , -v3, etc) + * Various bug fixes + * Better -e parsing + * fix pkg-config invocation for ldflags + * Make efibootmgr use EFIDIR / efibootmgr.efidir like fwupdate does + * make --loader default build-time configurable + * sanitize set_mirror()/get_mirror() + * Add support for parsing loader options as UCS2 + * GCC 7 fixes + * Don't use -fshort-wchar since we don't run on EFI machines. +- Drop 0001-Don-t-use-fshort-wchar-when-building-63.patch (upstreamed) +- Drop 0002-Remove-extra-const-keywords-gcc-7-gripes-about.patch + (upstreamed) +- Drop 0003-Add-support-for-parsing-optional-data-as-ucs2.patch + (upstreamed) +- Drop MARM-sanitize-set_mirror.diff (upstreamed) +- Drop efibootmgr-derhat.diff (upstreamed) +- Rebase efibootmgr-delete-multiple.diff + +------------------------------------------------------------------- +Tue Apr 3 13:50:11 CEST 2018 - kukuk@suse.de + +- Use %license instead of %doc [bsc#1082318] + +------------------------------------------------------------------- +Sat Jun 10 14:45:44 UTC 2017 - meissner@suse.com + +- forcefully enable PIE + +------------------------------------------------------------------- +Fri Mar 3 20:46:25 UTC 2017 - rw@suse.com + +- Update to 14 plus upstream fixes. [fate#322108] + (0001-Don-t-use-fshort-wchar-when-building-63.patch, + 0002-Remove-extra-const-keywords-gcc-7-gripes-about.patch, + 0003-Add-support-for-parsing-optional-data-as-ucs2.patch) +- Forward port and refresh SLE patches + (efibootmgr-derhat.diff, MARM-sanitize-set_mirror.diff + efibootmgr-delete-multiple.diff) +- Drop upstreamed patches + (efibootmgr-check-boot-order.diff, + efibootmgr-fix-efivar-0.24.patch, + efibootmgr-fix-usage-of-efi_loadopt_path-again.patch, + MARM-add-m-and-M-options.diff, + MARM-extend-man-for-M-option.diff, + MARM-fix-insufficient-validation-check-of-M-option.diff, + MARM-introduce-man-for-m-and-M-option.diff) + +------------------------------------------------------------------- +Thu Feb 16 12:49:42 UTC 2017 - msuchanek@suse.com + +- Build on all archs. There is no reason not to. [boo#1025520] +- Depend on new enough efivar. Build fails otherwise. + +------------------------------------------------------------------- +Sat Aug 20 16:17:42 UTC 2016 - arvidjaar@gmail.com + +- add efibootmgr-fix-usage-of-efi_loadopt_path-again.patch - fix + efibootmgr -v with new efivar (boo#993458) + +------------------------------------------------------------------- +Thu Jul 14 11:11:15 UTC 2016 - rw@suse.com + +- Add support for Memory Address Range Mirroring. + [fate#320999, bsc#987599] + (add MARM-add-m-and-M-options.diff, + MARM-fix-insufficient-validation-check-of-M-option.diff, + MARM-introduce-man-for-m-and-M-option.diff, + MARM-extend-man-for-M-option.diff, + MARM-sanitize-set_mirror.diff) + +------------------------------------------------------------------- +Wed Jul 13 04:42:38 UTC 2016 - glin@suse.com + +- Add efibootmgr-fix-efivar-0.24.patch fix the compilation errors + caused by the efivar update + +------------------------------------------------------------------- +Tue Sep 15 16:44:37 UTC 2015 - rw@suse.com + +- Properly latch long to short option for delete. [bsc#945705] + (efibootmgr-delete-multiple.diff) + +------------------------------------------------------------------- +Fri Jul 24 14:24:00 UTC 2015 - rw@suse.com + +- Refresh for SLE12. [bsc#929677] + (efibootmgr-gcc-Wall.diff, efibootmgr-delete-multiple.diff) + +------------------------------------------------------------------- +Fri Jun 12 07:45:20 UTC 2015 - mpluskal@suse.com + +- Update to 0.12 + * This release is mostly a maintenance release that uses + libefivar's new library API for creating device paths and load + options. + * Also DHCPv4 network boot entries are now something you can + create without knowing an awful lot about ACPI. +- Refresh patches + efibootmgr-0.11.0-derhat.diff as efibootmgr-derhat.diff + efibootmgr-0.11.0-check-boot-order.diff as + efibootmgr-check-boot-order.diff +- Update project and download url + +------------------------------------------------------------------- +Wed Mar 11 15:26:59 UTC 2015 - rw@suse.com + +- Allow disk/partition as selector for delete as well. [bsc#870211] + (efibootmgr-delete-multiple.diff) +- Remove version number from patches. + (add efibootmgr-derhat.diff, efibootmgr-fail-visibly.diff, + efibootmgr-gcc-Wall.diff, efibootmgr-set_boot_order.diff, + efibootmgr-write-unique-id-once.diff; + drop efibootmgr-0.6.0-check-boot-order.diff, + efibootmgr-0.6.0-delete-by-uuid.diff, efibootmgr-0.6.0-derhat.diff, + efibootmgr-0.6.0-fail-visibly.diff, efibootmgr-0.6.0-gcc-Wall.diff, + efibootmgr-0.6.0-set_boot_order.diff, + efibootmgr-0.6.0-write-unique-id-once.diff) +Note: this entry reflects obsoleted, SLE-only changes! + +------------------------------------------------------------------- +Fri Jan 30 10:47:13 UTC 2015 - rw@suse.com + +- Introduce partition UUID as selector for delete. [bsc#870211] + (efibootmgr-0.6.0-delete-by-uuid.diff) + +------------------------------------------------------------------- +Mon Dec 22 21:43:12 UTC 2014 - mpluskal@suse.com + +- Enable i586 build + +------------------------------------------------------------------- +Fri Oct 31 10:34:00 UTC 2014 - dmueller@suse.com + +- efibootmgr-0.6.0-check-boot-order.diff, efibootmgr-0.6.0-derhat.diff: + pass source validator check +- switch homepage to https://github.com/vathpela/efibootmgr + +------------------------------------------------------------------- +Wed Oct 29 03:51:49 UTC 2014 - glin@suse.com + +- Update version number to 0.11.0 +- Rebase patches + (efibootmgr-0.11.0-derhat.diff, + efibootmgr-0.11.0-check-boot-order.diff) +- Drop efibootmgr-0.6.0-set_boot_order.diff since the data size of + the variable is handled properly now +- Drop efibootmgr-0.6.0-fail-visibly.diff since err() and warn() + are introduced to show more meaningful messages +- Drop upstreamed patch + (efibootmgr-0.6.0-gcc-Wall.diff, + efibootmgr-0.6.0-write-unique-id-once.diff) + +------------------------------------------------------------------- +Tue Sep 9 13:24:25 UTC 2014 - schwab@suse.de + +- Enable for aarch64 [fate#318444] + +------------------------------------------------------------------- +Mon Jul 7 10:45:04 UTC 2014 - glin@suse.com + +- Add efibootmgr-0.6.0-check-boot-order.diff to delete BootOrder + if there is no more boot option. [bnc#883545] + +------------------------------------------------------------------- +Thu Dec 19 15:59:44 UTC 2013 - rw@suse.com + +- Update version number to 0.6.0, +- Integrate SLE11 patches. [bnc#830784] + (efibootmgr-0.6.0-fail-visibly.diff, + efibootmgr-0.6.0-set_boot_order.diff) +- Fix gcc warnings. + (efibootmgr-0.6.0-gcc-Wall.diff) +- Make default '--loader' build-time configurable. + (efibootmgr-0.6.0-derhat.diff) +- Don't let '--write-signature' overwrite unique signatures. + (efibootmgr-0.6.0-write-unique-id-once.diff) +- Drop obsolete patches + (efibootmgr-0.5.4.diff, + efibootmgr-0.5.4-catchup.diff, + efibootmgr-0.5.4-sector-size.diff) + +------------------------------------------------------------------- +Wed Mar 27 21:05:20 UTC 2013 - rw@suse.com + +- Print EFI status for failed '--create' as well. [bnc#811767] + (efibootmgr-0.5.4-fail-visibly.diff) + +------------------------------------------------------------------- +Wed Mar 27 16:00:41 UTC 2013 - rw@suse.com + +- Fix '--bootorder' handling. [bnc#810899] + (efibootmgr-0.5.4-set_boot_order.diff) +- Print EFI status in case of failure. [bnc#811767] + (efibootmgr-0.5.4-fail-visibly.diff) + +------------------------------------------------------------------- +Tue Feb 12 16:38:47 UTC 2013 - rw@suse.com + +- Apply critical upstream fixes + o for memory leaking variable creation. [bnc#746324] + o to improve spec conformance by removing device path padding. + o to work around broken Apple firmware. + (efibootmgr-0.5.4-catchup.diff) +- Allow hard disk sector sizes not equal to 512. [bnc#711830] + (efibootmgr-0.5.4-sector-size.diff) + +------------------------------------------------------------------- +Tue Jun 12 16:51:40 UTC 2012 - mgorse@suse.com + +- Add zlib-devel to BuildRequires + +------------------------------------------------------------------- +Sun Sep 18 17:17:12 UTC 2011 - jengelh@medozas.de + +- Remove redundant/obsolete tags/sections from specfile + (cf. packaging guidelines) + +------------------------------------------------------------------- +Wed Oct 15 12:20:15 CEST 2008 - ro@suse.de + +- added ExclusiveArch + +------------------------------------------------------------------- +Thu Jul 31 09:48:27 CEST 2008 - rw@suse.de + +- Update to efibootmgr 0.5.4. [FATE#301882] + +------------------------------------------------------------------- +Fri Jan 18 13:09:14 CET 2008 - rw@suse.de + +- Return non-zero exit code on errors. [#307965, FATE#302608] + +------------------------------------------------------------------- +Wed Dec 20 00:07:46 CET 2006 - rw@suse.de + +- Use '&' instead of '&&' to mask bits. [#219735] +- Fix compilation for STABLE. + +------------------------------------------------------------------- +Wed Jan 25 21:44:51 CET 2006 - mls@suse.de + +- converted neededforbuild to BuildRequires + +------------------------------------------------------------------- +Wed Nov 9 22:36:56 CET 2005 - schwab@suse.de + +- Update to efibootmgr 0.5.3. + +------------------------------------------------------------------- +Mon Sep 19 10:46:24 CEST 2005 - schwab@suse.de + +- Update to efibootmgr 0.5.2.2. + +------------------------------------------------------------------- +Wed Aug 10 17:58:56 CEST 2005 - schwab@suse.de + +- Update to efibootmgr 0.5.2 [#102441]. + +------------------------------------------------------------------- +Tue May 10 14:50:15 CEST 2005 - schwab@suse.de + +- Fix parsing of bus info for network boot entry [#82882]. + +------------------------------------------------------------------- +Wed Mar 9 14:14:23 CET 2005 - schwab@suse.de + +- Update to efibootmgr 0.5.1. + +------------------------------------------------------------------- +Fri Aug 27 00:08:55 CEST 2004 - schwab@suse.de + +- Update to efibootmgr 0.5.0. + +------------------------------------------------------------------- +Thu Jun 10 00:46:13 CEST 2004 - schwab@suse.de + +- Update to efibootmgr 0.5.0-test4. + +------------------------------------------------------------------- +Mon May 3 17:40:40 CEST 2004 - schwab@suse.de + +- Update to efibootmgr 0.5.0-test3. + +------------------------------------------------------------------- +Fri Sep 5 23:49:41 CEST 2003 - schwab@suse.de + +- Update to efibootmgr 0.4.2. + +------------------------------------------------------------------- +Wed Oct 23 11:21:36 CEST 2002 - schwab@suse.de + +- Update to efibootmgr 0.4.1. + +------------------------------------------------------------------- +Sun May 5 15:59:08 CEST 2002 - schwab@suse.de + +- Update to efibootmgr 0.4.0. + +------------------------------------------------------------------- +Fri Aug 10 21:26:18 CEST 2001 - schwab@suse.de + +- Update to efibootmgr 0.3.4. + +------------------------------------------------------------------- +Wed May 23 11:42:24 CEST 2001 - schwab@suse.de + +- Update to efibootmgr 0.3.2. + +------------------------------------------------------------------- +Tue May 22 15:38:14 CEST 2001 - schwab@suse.de + +- Fix uninitialized variable. + +------------------------------------------------------------------- +Sat May 19 02:11:36 CEST 2001 - schwab@suse.de + +- Initial version 0.3.1. + diff --git a/efibootmgr.spec b/efibootmgr.spec new file mode 100644 index 0000000..7881617 --- /dev/null +++ b/efibootmgr.spec @@ -0,0 +1,76 @@ +# +# spec file for package efibootmgr +# +# Copyright (c) 2023 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: efibootmgr +Version: 18 +Release: 0 +Summary: EFI Boot Manager +License: GPL-2.0-or-later +Group: System/Boot +URL: https://github.com/rhinstaller/efibootmgr +Source: https://github.com/rhboot/efibootmgr/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.bz2 +Patch0: %{name}-delete-multiple.diff +BuildRequires: pkgconfig +BuildRequires: pkgconfig(efiboot) >= 31 +BuildRequires: pkgconfig(efivar) >= 31 +BuildRequires: pkgconfig(libpci) +BuildRequires: pkgconfig(popt) +BuildRequires: pkgconfig(zlib) + +%description +The EFI Boot Manager allows the user to edit the Intel Extensible +Firmware Interface (EFI) Boot Manager variables. Additional +information about the EFI can be found at +. + +%prep +%autosetup -p1 + +%build +# removing hotfix function declaration: +# https://github.com/rhboot/efibootmgr/issues/128 +sed -e '/extern int efi_set_verbose/d' -i "src/efibootmgr.c" + +LOADER="grub.efi" # default loader +[ "$RPM_ARCH" != ia64 ] || LOADER="elilo.efi" # except Itanium + +case "%{_repository}" in +(openSUSE*) VENDOR="openSUSE";; +(SLE_11_SP*) VENDOR="SuSE" LOADER="elilo.efi";; +(SUSE*|SLE*) VENDOR="SUSE";; +(*) VENDOR="linux";; +esac +%make_build CFLAGS="%{optflags} -flto -fPIE -pie" \ + OS_VENDOR="$VENDOR" EFI_LOADER="$LOADER" EFIDIR="$VENDOR" + +%install +case "%{_repository}" in +(openSUSE*) VENDOR="openSUSE";; +(SLE_11_SP*) VENDOR="SuSE" LOADER="elilo.efi";; +(SUSE*|SLE*) VENDOR="SUSE";; +(*) VENDOR="linux";; +esac +make DESTDIR=%{buildroot} sbindir=%{_sbindir} EFIDIR="$VENDOR" install + +%files +%license COPYING +%doc README +%{_sbindir}/efiboot* +%{_mandir}/man8/*.gz + +%changelog