diff options
author | Theo Anderson <telans@posteo.de> | 2021-01-19 09:28:02 +1300 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2021-01-18 15:34:01 -0500 |
commit | 9f6631180eab5e24be3e8a2b09c06d226ff7e1ac (patch) | |
tree | 67c212928faab09ef1fdccaa97bcbed7a2304b85 | |
parent | net-libs/libgsasl: Stabilize 1.8.1 sparc, #760381 (diff) | |
download | gentoo-9f6631180eab5e24be3e8a2b09c06d226ff7e1ac.tar.gz gentoo-9f6631180eab5e24be3e8a2b09c06d226ff7e1ac.tar.bz2 gentoo-9f6631180eab5e24be3e8a2b09c06d226ff7e1ac.zip |
sys-boot/efibootmgr: EAPI 7, version bump
Closes: https://bugs.gentoo.org/587094
Closes: https://bugs.gentoo.org/673536
Closes: https://bugs.gentoo.org/557248
Package-Manager: Portage-3.0.13, Repoman-3.0.2
Signed-off-by: Theo Anderson <telans@posteo.de>
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/19098
-rw-r--r-- | sys-boot/efibootmgr/Manifest | 1 | ||||
-rw-r--r-- | sys-boot/efibootmgr/efibootmgr-17.ebuild | 39 | ||||
-rw-r--r-- | sys-boot/efibootmgr/files/efibootmgr-17-clang.patch | 82 | ||||
-rw-r--r-- | sys-boot/efibootmgr/files/efibootmgr-17-fix-efivar-37-conflict.patch | 14 |
4 files changed, 136 insertions, 0 deletions
diff --git a/sys-boot/efibootmgr/Manifest b/sys-boot/efibootmgr/Manifest index 299c980bdb86..9eb28d6dd160 100644 --- a/sys-boot/efibootmgr/Manifest +++ b/sys-boot/efibootmgr/Manifest @@ -1,3 +1,4 @@ DIST efibootmgr-14.tar.bz2 34972 BLAKE2B 78490756c5fd449f4319b79e0818e9d80340bd487f57d0de34f79f48cc24eb7b9c7309b535d00efad4babd40904d4cfb085cca278170625a1e875961e423f5dd SHA512 97935f8752440ce236162e174ea3404e907ebddc5877d597a97813da76ad580689fc2e97044885fc860a12a473af7183242b6120e78e53243d35e569fb002baf DIST efibootmgr-15.tar.bz2 35476 BLAKE2B 19b7c9ce51f3b930b2d59fa4a594c7a8bf5f1c7aa3224049e88cdafe82991799b1b719ec68c80131027f70c16bd19e38157f5d0bc7761843959410c667aa4070 SHA512 d9d9eef14d373d5da88141e8105f754fea4c039755ed0a0cb9b3c9c2bb285733ad930fd912df42075fe2cf750585699307b067f594d8e65269b3b8a5a00b1cd1 DIST efibootmgr-16.tar.bz2 36603 BLAKE2B 3d09a9d3c4ecd48010315fccae60ab408c0d08e9c734e86a944130ea03e038835fa08745819f5353efbbe36f5017be64faded4b625ef0a0b55d4ca0d612ef232 SHA512 936318c7163c07b716f89be3d830957d9db68ba1b059223f7ea3d9eafe0dbf1c91b9aee096f5aed70955c6052c3b8547295c0a47f17cdf43788259d87d1990b9 +DIST efibootmgr-17.tar.gz 41643 BLAKE2B a1995a5df74766f762d2eb971fd6095edea8d0a498c9dd1100515866b40c38ae2f299aae51f12767850ec23fbe4709c2c7428dd48755fbec499669b69f6432c9 SHA512 10c7ad9a79f23dcd4708dc4f42701196af7aa11f5e9a6468ea51f7013d4caeba6c92527ba1304f6e3b2ef3b51b3b69ea1a30f81bb099a8aea49eeb30eb631e1d diff --git a/sys-boot/efibootmgr/efibootmgr-17.ebuild b/sys-boot/efibootmgr/efibootmgr-17.ebuild new file mode 100644 index 000000000000..a6d695bcfe73 --- /dev/null +++ b/sys-boot/efibootmgr/efibootmgr-17.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-funcs + +DESCRIPTION="User-space application to modify the EFI boot manager" +HOMEPAGE="https://github.com/rhinstaller/efibootmgr" +SRC_URI="https://github.com/rhboot/efibootmgr/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~x86" + +RDEPEND=" + sys-apps/pciutils + >=sys-libs/efivar-37:= +" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}/${P}-fix-efivar-37-conflict.patch" + "${FILESDIR}/${P}-clang.patch" +) + +src_prepare() { + default + sed -i 's/-Werror //' Make.defaults || die +} + +src_configure() { + tc-export CC + export EFIDIR="Gentoo" +} + +src_compile() { + emake PKG_CONFIG="$(tc-getPKG_CONFIG)" +} diff --git a/sys-boot/efibootmgr/files/efibootmgr-17-clang.patch b/sys-boot/efibootmgr/files/efibootmgr-17-clang.patch new file mode 100644 index 000000000000..687b294c3339 --- /dev/null +++ b/sys-boot/efibootmgr/files/efibootmgr-17-clang.patch @@ -0,0 +1,82 @@ +From 97668ae0bce776a36ea2001dea63d376be8274ac Mon Sep 17 00:00:00 2001 +From: Peter Jones <pjones@redhat.com> +Date: Wed, 6 Mar 2019 13:08:33 -0500 +Subject: [PATCH] Make sure PKGS= is propogated into the submake for "make + deps" + +When we're doing make deps with "$(CC) -MF", gcc and clang have different +behavior, both broken in different ways, which we're hitting because of a +missing -I argument for libefivar's includes. On clang, when a header can't +be found, it emits a rule with the header as a prerequisite without a path, +such as efivar.h here: + +efibootmgr.o: efibootmgr.c fix_coverity.h efivar.h efiboot.h \ + /home/pjones/devel/github.com/efibootmgr/master/src/include/list.h \ + /home/pjones/devel/github.com/efibootmgr/master/src/include/efi.h \ + /home/pjones/devel/github.com/efibootmgr/master/src/include/unparse_path.h \ + /home/pjones/devel/github.com/efibootmgr/master/src/include/efibootmgr.h \ + error.h + +Then the build that utilizes that rule will fail to find the +prerequisite and tell you something like: + +make[1]: *** No rule to make target 'efivar.h', needed by 'efibootmgr.o'. Stop. +make[1]: Leaving directory '/home/pjones/devel/github.com/efibootmgr/master/src' + +With gcc, when a header can't be found, it emits a rule without that header +as a prerequisite, as such (again with efivar.h): + +efibootmgr.o: efibootmgr.c fix_coverity.h \ + /home/pjones/devel/github.com/efibootmgr/master/src/include/list.h \ + /home/pjones/devel/github.com/efibootmgr/master/src/include/efi.h \ + /home/pjones/devel/github.com/efibootmgr/master/src/include/unparse_path.h \ + /home/pjones/devel/github.com/efibootmgr/master/src/include/efi.h \ + /home/pjones/devel/github.com/efibootmgr/master/src/include/efibootmgr.h \ + error.h + +And then your build will fail if you haven't adjusted CFLAGS to tell it +where to find the header. + +Both of these would be better just erroring, but at least gcc's doesn't +insert a *wrong* dependency. + +This patch adds "PKGS=efivar efibootmgr popt" for all deps under src/. +Technically that's overkill, as efibootmgr itself doesn't need popt, but it +doesn't hurt anything to have the extra part there. The resulting +.efibootmgr.d file has the prerequisites expressed correctly: + +efibootmgr.o: efibootmgr.c fix_coverity.h /usr/include/efivar/efivar.h \ + /usr/include/efivar/efiboot.h \ + /home/pjones/devel/github.com/efibootmgr/master/src/include/list.h \ + /home/pjones/devel/github.com/efibootmgr/master/src/include/efi.h \ + /home/pjones/devel/github.com/efibootmgr/master/src/include/unparse_path.h \ + /home/pjones/devel/github.com/efibootmgr/master/src/include/efi.h \ + /home/pjones/devel/github.com/efibootmgr/master/src/include/efibootmgr.h \ + error.h + +This fixes the issue described in github PR #96 + +Signed-off-by: Peter Jones <pjones@redhat.com> +--- + src/Makefile | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/src/Makefile b/src/Makefile +index 258bac1..32fa188 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -31,8 +31,13 @@ efibootdump : PKGS=efivar efiboot popt + efibootnext : $(call objects-of,$(EFIBOOTNEXT_SOURCES)) + efibootnext : PKGS=efivar efiboot popt + ++deps : PKGS=efivar efiboot popt + deps : $(ALL_SOURCES) +- $(MAKE) -f $(TOPDIR)/Make.deps deps SOURCES="$(ALL_SOURCES)" SUBDIR_CFLAGS="$(SUBDIR_CFLAGS)" ++ $(MAKE) -f $(TOPDIR)/Make.deps \ ++ SOURCES="$(ALL_SOURCES)" \ ++ SUBDIR_CFLAGS="$(SUBDIR_CFLAGS)" \ ++ PKGS="$(PKGS)" \ ++ deps + + clean : + @rm -rfv *.o *.a *.so $(TARGETS) diff --git a/sys-boot/efibootmgr/files/efibootmgr-17-fix-efivar-37-conflict.patch b/sys-boot/efibootmgr/files/efibootmgr-17-fix-efivar-37-conflict.patch new file mode 100644 index 000000000000..614195f3c99d --- /dev/null +++ b/sys-boot/efibootmgr/files/efibootmgr-17-fix-efivar-37-conflict.patch @@ -0,0 +1,14 @@ +diff --git a/src/efibootmgr.c b/src/efibootmgr.c +index de38f01..4e1a680 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': |