From e55a898c5d4b9df6644a070f6870657fd95789e2 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Oct 29 2019 11:07:54 +0000 Subject: import efibootmgr-17-2.el7 --- diff --git a/.efibootmgr.metadata b/.efibootmgr.metadata new file mode 100644 index 0000000..53c54f5 --- /dev/null +++ b/.efibootmgr.metadata @@ -0,0 +1 @@ +c28188c71a0e85c1c36dc89453847ff879651fa4 SOURCES/efibootmgr-17.tar.bz2 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bc747ea --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/efibootmgr-17.tar.bz2 diff --git a/SOURCES/0001-RHEL-7.x-popt-doesn-t-have-popt.pc-work-around-its-a.patch b/SOURCES/0001-RHEL-7.x-popt-doesn-t-have-popt.pc-work-around-its-a.patch new file mode 100644 index 0000000..6af36db --- /dev/null +++ b/SOURCES/0001-RHEL-7.x-popt-doesn-t-have-popt.pc-work-around-its-a.patch @@ -0,0 +1,43 @@ +From 77604f4e9ca646f1b8234b5d223fb4c8e786c512 Mon Sep 17 00:00:00 2001 +From: Peter Jones +Date: Mon, 13 Mar 2017 15:33:54 -0400 +Subject: [PATCH 1/2] RHEL 7.x popt doesn't have popt.pc, work around its + absense. + +Related: rhbz#1380825 + +Signed-off-by: Peter Jones +--- + src/Makefile | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +diff --git a/src/Makefile b/src/Makefile +index 258bac1c04a..453ddadfca2 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -21,15 +21,19 @@ ALL_SOURCES=$(EFIBOOTMGR_SOURCES) + + efibootmgr : $(call objects-of,$(EFIBOOTMGR_SOURCES)) + efibootmgr : PKGS=efivar efiboot ++efibootmgr : LIBS=popt + + eficonman : $(call objects-of,$(EFICONMAN_SOURCES)) +-eficonman : PKGS=efivar efiboot popt ++eficonman : PKGS=efivar efiboot ++eficonman : LIBS=popt + + efibootdump : $(call objects-of,$(EFIBOOTDUMP_SOURCES)) +-efibootdump : PKGS=efivar efiboot popt ++efibootdump : PKGS=efivar efiboot ++efibootdump : LIBS=popt + + efibootnext : $(call objects-of,$(EFIBOOTNEXT_SOURCES)) +-efibootnext : PKGS=efivar efiboot popt ++efibootnext : PKGS=efivar efiboot ++efibootnext : LIBS=popt + + deps : $(ALL_SOURCES) + $(MAKE) -f $(TOPDIR)/Make.deps deps SOURCES="$(ALL_SOURCES)" SUBDIR_CFLAGS="$(SUBDIR_CFLAGS)" +-- +2.17.1 + diff --git a/SOURCES/0002-Don-t-build-efibootdump-on-RHEL-7.4.patch b/SOURCES/0002-Don-t-build-efibootdump-on-RHEL-7.4.patch new file mode 100644 index 0000000..185dd18 --- /dev/null +++ b/SOURCES/0002-Don-t-build-efibootdump-on-RHEL-7.4.patch @@ -0,0 +1,41 @@ +From d67065dc8bbca6c7b921cf57d4a30e8c700b3a8e Mon Sep 17 00:00:00 2001 +From: Peter Jones +Date: Mon, 13 Mar 2017 15:48:09 -0400 +Subject: [PATCH 2/2] Don't build efibootdump on RHEL 7.4... + +Because popt is ancient (1.13 released in 2007, as opposed to 1.16 +released in 2010), it does not have POPT_ARG_ARGV, which efibootdump +uses. Since there's no feature for efibootdump, and we've never shipped +it, just nerf it out of the build. + +Signed-off-by: Peter Jones +--- + src/Makefile | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/src/Makefile b/src/Makefile +index 453ddadfca2..162f5526b3c 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -7,7 +7,7 @@ include $(TOPDIR)/Make.defaults + + SUBDIR_CFLAGS = -I$(SRCDIR)/include + +-BINTARGETS=efibootmgr efibootdump ++BINTARGETS=efibootmgr + TARGETS=$(BINTARGETS) + + all : deps $(TARGETS) +@@ -45,9 +45,7 @@ clean : + install : + $(INSTALL) -d -m 755 $(DESTDIR)/$(sbindir)/ + $(INSTALL) -m 755 efibootmgr $(DESTDIR)/$(sbindir)/efibootmgr +- $(INSTALL) -m 755 efibootdump $(DESTDIR)/$(sbindir)/efibootdump + $(INSTALL) -d -m 755 $(DESTDIR)/$(mandir)/man8/ + $(INSTALL) -m 644 efibootmgr.8 $(DESTDIR)/$(mandir)/man8/efibootmgr.8 +- $(INSTALL) -m 644 efibootdump.8 $(DESTDIR)/$(mandir)/man8/efibootdump.8 + + .PHONY : all deps clean install +-- +2.17.1 + diff --git a/SOURCES/0003-remove-extra-decl.patch b/SOURCES/0003-remove-extra-decl.patch new file mode 100644 index 0000000..90f83e0 --- /dev/null +++ b/SOURCES/0003-remove-extra-decl.patch @@ -0,0 +1,27 @@ +From 99b578501643377e0b1994b2a068b790d189d5ad Mon Sep 17 00:00:00 2001 +From: Peter Jones +Date: Wed, 13 Jun 2018 09:41:01 -0400 +Subject: [PATCH] remove extra decl + +Signed-off-by: Peter Jones +--- + src/efibootmgr.c | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/src/efibootmgr.c b/src/efibootmgr.c +index de38f01a186..4e1a6801515 100644 +--- a/src/efibootmgr.c ++++ b/src/efibootmgr.c +@@ -1536,9 +1536,6 @@ parse_opts(int argc, char **argv) + "invalid numeric value %s\n", + optarg); + } +- /* XXX efivar-36 accidentally doesn't have a public +- * header for this */ +- extern int efi_set_verbose(int verbosity, FILE *errlog); + efi_set_verbose(opts.verbose - 2, stderr); + break; + case 'V': +-- +2.17.1 + diff --git a/SPECS/efibootmgr.spec b/SPECS/efibootmgr.spec new file mode 100644 index 0000000..ff36f81 --- /dev/null +++ b/SPECS/efibootmgr.spec @@ -0,0 +1,127 @@ +%define efivar_version 36-4 + +Summary: EFI Boot Manager +Name: efibootmgr +Version: 17 +Release: 2%{?dist} +Group: System Environment/Base +License: GPLv2+ +URL: http://github.com/rhinstaller/%{name}/ +BuildRequires: git, popt-devel +BuildRequires: efivar-libs >= %{efivar_version} +BuildRequires: efivar-devel >= %{efivar_version} +BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXXXX) +# EFI/UEFI don't exist on PPC +ExclusiveArch: x86_64 aarch64 + +# for RHEL / Fedora when efibootmgr was part of the elilo package +Conflicts: elilo <= 3.6-6 +Obsoletes: elilo <= 3.6-6 + +Source0: https://github.com/rhinstaller/%{name}/releases/download/%{name}-%{version}/%{name}-%{version}.tar.bz2 +Patch0001: 0001-RHEL-7.x-popt-doesn-t-have-popt.pc-work-around-its-a.patch +Patch0002: 0002-Don-t-build-efibootdump-on-RHEL-7.4.patch +Patch0003: 0003-remove-extra-decl.patch + +%global efidir %(eval echo $(grep ^ID= /etc/os-release | sed -e 's/^ID=//' -e 's/rhel/redhat/')) + +%description +%{name} displays and allows the user to edit the Intel Extensible +Firmware Interface (EFI) Boot Manager variables. Additional +information about EFI can be found at +http://developer.intel.com/technology/efi/efi.htm and http://uefi.org/. + +%prep +%setup -q +git init +git config user.email "example@example.com" +git config user.name "RHEL Ninjas" +git add . +git commit -a -q -m "%{version} baseline." +git am %{patches} - 17-2 +- Try to make covscan actually complete the scan... + Related: rhbz#1570032 + Related: rhbz#1558937 + Related: rhbz#1520533 + +* Sun Jun 10 2018 Peter Jones - 17-1 +- Update to efibootmgr 17 + Related: rhbz#1570032 + Related: rhbz#1558937 + Resolves: rhbz#1520533 + +* Tue May 09 2017 Peter Jones - 15-2 +- Fix some coverity issues + Related: rhbz#1380825 + +* Mon Mar 13 2017 Peter Jones - 15-1 +- Update to efivar 15 for fwupdate + Related: rhbz#1380825 + +* Tue Jul 19 2016 Peter Jones - 0.8.0-10 +- Another man page update for Memory Address Range Mirroring + Related: rhbz#1271412 + +* Wed Jul 13 2016 Peter Jones - 0.8.0-9 +- Update man page for Memory Address Range Mirroring + Related: rhbz#1271412 + +* Mon Jun 06 2016 Peter Jones - - 0.8.0-8 +- Add options for Memory Address Range Mirroring + Resolves: rhbz#1271412 + +* Thu Jul 09 2015 Peter Jones - 0.8.0-7 +- Fix a couple of problems parsing command line options QA is seeing. + Resolves: rhbz#1241411 + +* Tue Jun 30 2015 Peter Jones - 0.8.0-6 +- Handle -b and -o parsing in a way that matches the documentation. + Resolves: rhbz#1174964 +- Use the right GUID when setting boot entries active/inactive + Resolves: rhbz#1221771 + +* Mon Feb 02 2015 Peter Jones - 0.8.0-5 +- Fix patch merge error from -4 + Resolves: rhbz#1188313 + +* Thu Jan 08 2015 Peter Jones - 0.8.0-4 +- Fix buffer overflow when remove_from_boot_order removes nothing (lennysz) + Resolves: rhbz#1168019 + +* Wed Oct 15 2014 Peter Jones - 0.8.0-3 +- Don't error when BootOrder is unset and we're trying to add to it. + Related:rhbz#967969 + +* Wed Sep 10 2014 Peter Jones - 0.8.0-2 +- Fix some covscan related errors. + Related: rhbz#1129435 + +* Fri Sep 05 2014 Peter Jones - 0.8.0-1 +- Rebase to 0.8.0 + Resolves: rhbz#1129435