summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Kinard <kumba@gentoo.org>2021-06-06 16:01:25 -0400
committerJoshua Kinard <kumba@gentoo.org>2021-06-06 16:01:45 -0400
commitbf9a976299a0277b616aee32caf98f9ab4585428 (patch)
tree52a0168eb5b9159db22eaf6adac4d27e071dde1d /sys-boot/lilo
parentdev-lang/go: 1.16.5 bump (diff)
downloadgentoo-bf9a976299a0277b616aee32caf98f9ab4585428.tar.gz
gentoo-bf9a976299a0277b616aee32caf98f9ab4585428.tar.bz2
gentoo-bf9a976299a0277b616aee32caf98f9ab4585428.zip
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 <kumba@gentoo.org> Package-Manager: Portage-3.0.19, Repoman-3.0.3
Diffstat (limited to 'sys-boot/lilo')
-rw-r--r--sys-boot/lilo/files/lilo-24.x-check-for-__GLIBC__.patch18
-rw-r--r--sys-boot/lilo/lilo-24.2.ebuild7
2 files changed, 24 insertions, 1 deletions
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