From bf9a976299a0277b616aee32caf98f9ab4585428 Mon Sep 17 00:00:00 2001 From: Joshua Kinard Date: Sun, 6 Jun 2021 16:01:25 -0400 Subject: sys-boot/lilo: Fix bugs #753608 and #715580 Add QA_FLAGS_IGNORED for '/sbin/lilo' to address Bug #753608 and Add a small patch to check for '__GLIBC__' before a printf() call that references it to avoid compilation errors on non-glibc systems to fix Bug #715580. Also remove the unneeded 'eutils' inherit. Closes: https://bugs.gentoo.org/753608 Closes: https://bugs.gentoo.org/715580 Signed-off-by: Joshua Kinard Package-Manager: Portage-3.0.19, Repoman-3.0.3 --- .../lilo/files/lilo-24.x-check-for-__GLIBC__.patch | 18 ++++++++++++++++++ sys-boot/lilo/lilo-24.2.ebuild | 7 ++++++- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 sys-boot/lilo/files/lilo-24.x-check-for-__GLIBC__.patch (limited to 'sys-boot/lilo') diff --git a/sys-boot/lilo/files/lilo-24.x-check-for-__GLIBC__.patch b/sys-boot/lilo/files/lilo-24.x-check-for-__GLIBC__.patch new file mode 100644 index 000000000000..be3443629cfa --- /dev/null +++ b/sys-boot/lilo/files/lilo-24.x-check-for-__GLIBC__.patch @@ -0,0 +1,18 @@ +diff -Naurp lilo-24.2.orig/src/lilo.c lilo-24.2/src/lilo.c +--- lilo-24.2.orig/src/lilo.c 2021-06-06 15:53:52.389730145 -0400 ++++ lilo-24.2/src/lilo.c 2021-06-06 15:53:28.309159571 -0400 +@@ -182,7 +182,14 @@ extern int has_partitions_beta(dev_t dev + printf("Without"); + #endif + printf(" device-mapper\n"); ++#ifdef __GLIBC__ ++ /* ++ * __GLIBC__ is defined in features.h, which should be pulled ++ * in by stdio.h, but this is not guaranteed nor apparently ++ * documented anywhere. ++ */ + printf("\nglibc version %d.%d\n", __GLIBC__, __GLIBC_MINOR__); ++#endif + printf("Kernel Headers included from %d.%d.%d\n", + LINUX_VERSION_CODE>>16, + LINUX_VERSION_CODE>>8 & 255, diff --git a/sys-boot/lilo/lilo-24.2.ebuild b/sys-boot/lilo/lilo-24.2.ebuild index 5b39c9c32f53..ae703abe60db 100644 --- a/sys-boot/lilo/lilo-24.2.ebuild +++ b/sys-boot/lilo/lilo-24.2.ebuild @@ -3,7 +3,7 @@ EAPI="7" -inherit eutils flag-o-matic toolchain-funcs +inherit flag-o-matic toolchain-funcs DOLILO_V="0.6" IUSE="static minimal pxeserial device-mapper" @@ -24,6 +24,10 @@ KEYWORDS="-* amd64 x86" DEPEND=">=sys-devel/bin86-0.15.5" RDEPEND="device-mapper? ( >=sys-fs/lvm2-2.02.45 )" +# Bootloaders should not be using arbitrary CFLAGS without good reason. A bootloader +# is typically only executed once to boot the system, and it should work the first time. +QA_FLAGS_IGNORED="/sbin/lilo" + src_prepare() { default @@ -34,6 +38,7 @@ src_prepare() { eapply "${FILESDIR}/${PN}-24.2-add-nvme-support.patch" eapply "${FILESDIR}/${PN}-24.x-fix-gcc-10.patch" + eapply "${FILESDIR}/${PN}-24.x-check-for-__GLIBC__.patch" # Do not strip and have parallel make # FIXME: images/Makefile does weird stuff -- cgit v1.2.3-65-gdbad