From d18bf1e01b65ee4bf0c804e2843b282d3d4e5d7c Mon Sep 17 00:00:00 2001
From: V3n3RiX <venerix@redcorelinux.org>
Date: Tue, 15 Jun 2021 14:57:03 +0100
Subject: gentoo resync : 15.06.2021

---
 sys-boot/lilo/Manifest                                 |  7 ++++---
 .../lilo/files/lilo-24.x-check-for-__GLIBC__.patch     | 18 ++++++++++++++++++
 sys-boot/lilo/files/lilo.conf                          |  8 ++++----
 sys-boot/lilo/lilo-24.2.ebuild                         | 14 +++++++++-----
 sys-boot/lilo/metadata.xml                             | 18 +++++++++---------
 5 files changed, 44 insertions(+), 21 deletions(-)
 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/Manifest b/sys-boot/lilo/Manifest
index 7f8d4f6b94ce..8f95b2c6e1aa 100644
--- a/sys-boot/lilo/Manifest
+++ b/sys-boot/lilo/Manifest
@@ -1,8 +1,9 @@
 AUX lilo-24.1-novga.patch 500 BLAKE2B a5ba2f06791812fd7dcafe0882218e6d3884db228f5866604f903972e6914cfdab8379e18eb18f399174581eb72775fda05f1a61df699d39f60564b9a2e337a6 SHA512 067a741086b6df6b5f728ffde3cac949dd9b59cdc11ac1b022f240b69c4a8ef883f5623cc610becd4648f02ad3a243a0d6a939aa8d8c63d9b0158426e6b6f300
 AUX lilo-24.2-add-nvme-support.patch 2779 BLAKE2B 0344624148e31dd9cd99e08f33e777e3a30f2bfc8321fe163a43329ae8c78e96fdb9a6a062648f06705919f89fd754a69a8cf6a2254d95bf7c5c6c78b9a3948e SHA512 14263591673f7486438416cb394f361593bd94da35fac643ae7938a241634aed41582532dcc7c3854c314c5bc68614d61c8099e12affe27c77a8a9a7473352bd
+AUX lilo-24.x-check-for-__GLIBC__.patch 712 BLAKE2B aca353ba185cf112a5557f931c7c6a61bc5d3a67cc4a31d279ab694bd4a1cb5d1b2f94713fd716b8c6ff5cbc1b297cbe1f4289d1ac0aeddd8129c9b811d36648 SHA512 723f9579a6bb3440aab0104a0146604c4a86157a52c6e38434a57509aef4ede50c59b7a706056dd8c894509e6f43348d867af3f91fbda35cc81bb1148c27537e
 AUX lilo-24.x-fix-gcc-10.patch 1020 BLAKE2B d434248d3f4ed4d591ada4d507e5ab80486228bfb4bd99d7597267355d2dfc70252b9f6a93e34f850f67a27698f94a70e0803310c81ffbc4c9d4f439f8155ae6 SHA512 0ef0ab379e787767bcee2c77eeb7bc5acce908850077dcc14a1d71f3a78761946e8e252089fecb441c26cbbee66c868021d42a300d05579d083e654026cf8682
-AUX lilo.conf 1613 BLAKE2B 746e05ed4a38f553d8534087d3889e3c136531752aa39f5de9404e58dcd520925f369a4300e9d16ba779b9cef0ae0ecfdde9221f064f42e6a5c812ee7effbbaf SHA512 be59f5b97cbf8eda744e8a7a281526b3262c80af7d3c61e5476697e1569e6e419c4055a8e7deaa4f65688769d941466043af81e159367bf893a88b77eb3732d5
+AUX lilo.conf 1613 BLAKE2B 0d1f1a67f270e6d0cfac6d6dbdd7468bee3405b455ab20d9095c3f63ffd608323cddcae13550799bb7cc8eb086069c38df65c501b9a3083f01c6b50383d40776 SHA512 27f544fe382f8b126b4bc45a2c60474c0bfd8ddacd7997af67c7263b98ad2eef856b687e9f36232db4cd5625be301a284f208d833aefccd04a01268993007d57
 DIST dolilo-0.6.tar.bz2 3817 BLAKE2B 35c41f5eac8e02d4381db517a9b230d037da184f9ae409bc76307e689ad6b82928ea3794db54c3137afe6c770db86ba0cde78c33d89e775ddea464905070bfd6 SHA512 1b59ea5f2e2ac52d62635c9f7d5fb5b2aff6757e6ea6c0950480d8a11832b872115907abe6d8fb3fa5436e2e8971d9a1dda103dc6a15db6fc310c8f4730ab936
 DIST lilo-24.2.tar.gz 777400 BLAKE2B 71c74235d5df10eed65b67dc1ce2af21163651c752d799da419077025304abf9352535a70f3fb60d086609d8a1c25bf394e29453c338ab022cb2be3cb21af75f SHA512 4437cae21345f483194a5dc95f686f3f3cb2beec78faae3fba959db25eae29fe2c56732e055c05f1d101682c5d442cdc9561fae8074f61f5537dde0413204c54
-EBUILD lilo-24.2.ebuild 4192 BLAKE2B 4d24ee4142c76361435f4b73d756d3526fdeb7aca9ba3a61178b2475a27aea05f3ef0ff3d4d374c0c6576e78a88e103c46b3ec14006a183a645b67bc1d390679 SHA512 a15815bb166ec8e6b1592ce1f225f0a1cc8f19c17e86d1c2ada81c4fb563006ae6829a17519d87df763fc4fc788b3bdc9a09e27e3ae569ff8ad083f1a7559628
-MISC metadata.xml 505 BLAKE2B 5d4b29183307771e55dccfb9cad3434385842837a3c14ebea714f92c21e14c3935239a864c1e8c3397392c6a6392a7f49079bb07b75e9abf5150712047a98d7c SHA512 8eefe8d0c150fadb739fdeca238a2ceac18ec7fff9611021980e742787ea40842bae40c31bf6c0624207e96d1829ea2bde3337f1a6a7b29764bcc19c4a16becc
+EBUILD lilo-24.2.ebuild 4436 BLAKE2B f0f5e13abb580b1ad60576fda1de62de89654ae86a34d9e53133eefb923cef0b08cb0a85fd53cfdc7da9abc5bdc299d201ca5470d98b10afaffb2be5158def8e SHA512 63cc9019d65926bd3da1b049b32de35e979e89b382b87249ca7a9e2489bacaa4af9f8b4b1cb77bab148b0381dd164c84da0d8cda99bcf7e95b424538821430b4
+MISC metadata.xml 474 BLAKE2B 06c2267de10cc9107d2bdd99de5813366819864c8840d5b56b5f1f531c6b174b3cac9aae47a986f6e653a11a45eeb9b55bf545508544b285cadcbd23f1072308 SHA512 b59c4efd861fd83d73f8f24635cd8900c231fa98d61416a2c43581b16c0932140096db1308e17fb2db94231c36d441d55c35705f3cad33a42663894655bc4d2c
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/files/lilo.conf b/sys-boot/lilo/files/lilo.conf
index 3848f779029b..a65ae24252dc 100644
--- a/sys-boot/lilo/files/lilo.conf
+++ b/sys-boot/lilo/files/lilo.conf
@@ -12,7 +12,7 @@ lba32
 #linear
 
 # MBR to install LILO to:
-boot = /dev/hda
+boot = /dev/sda
 map = /boot/.map
 
 # If you are having problems booting from a hardware raid-array
@@ -51,7 +51,7 @@ vga = normal
 # Linux bootable partition config begins
 #
 image = /boot/bzImage
-	root = /dev/hda3
+	root = /dev/sda3
 	#root = /devices/discs/disc0/part3
 	label = Gentoo
 	read-only # read-only for checking
@@ -62,10 +62,10 @@ image = /boot/bzImage
 #
 # DOS bootable partition config begins
 #
-other = /dev/hda1
+other = /dev/sda1
 	#other = /devices/discs/disc0/part1
 	label = Windows
-	table = /dev/hda
+	table = /dev/sda
 #
 # DOS bootable partition config ends  
 #
diff --git a/sys-boot/lilo/lilo-24.2.ebuild b/sys-boot/lilo/lilo-24.2.ebuild
index 475926764a55..9ae96a087bd0 100644
--- a/sys-boot/lilo/lilo-24.2.ebuild
+++ b/sys-boot/lilo/lilo-24.2.ebuild
@@ -3,17 +3,17 @@
 
 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"
 
-DESCRIPTION="Standard Linux boot loader"
-HOMEPAGE="https://alioth.debian.org/projects/lilo/"
+DESCRIPTION="LInux LOader, the original Linux bootloader"
+HOMEPAGE="https://www.joonet.de/lilo/"
 
 DOLILO_TAR="dolilo-${DOLILO_V}.tar.bz2"
 SRC_URI="
-	http://lilo.alioth.debian.org/ftp/sources/${P}.tar.gz
+	https://www.joonet.de/lilo/ftp/sources/${P}.tar.gz
 	mirror://gentoo/${DOLILO_TAR}
 "
 
@@ -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
@@ -65,7 +70,6 @@ src_compile() {
 }
 
 src_install() {
-	keepdir /boot
 	emake DESTDIR="${D}" install
 
 	if use !minimal; then
diff --git a/sys-boot/lilo/metadata.xml b/sys-boot/lilo/metadata.xml
index 443ccb2afb4e..136f5734eb14 100644
--- a/sys-boot/lilo/metadata.xml
+++ b/sys-boot/lilo/metadata.xml
@@ -1,13 +1,13 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 <pkgmetadata>
-<maintainer type="project">
-	<email>base-system@gentoo.org</email>
-	<name>Gentoo Base System</name>
-</maintainer>
-<use>
-	<flag name="device-mapper">Enable support for device-mapper from <pkg>sys-fs/lvm2</pkg></flag>
-	<flag name="minimal">Do not install the dolilo helper script</flag>
-	<flag name="pxeserial">Avoid character echo on PXE serial console</flag>
-</use>
+	<maintainer type="person">
+		<email>kumba@gentoo.org</email>
+	</maintainer>
+
+	<use>
+		<flag name="device-mapper">Enable support for device-mapper from <pkg>sys-fs/lvm2</pkg></flag>
+		<flag name="minimal">Do not install the dolilo helper script</flag>
+		<flag name="pxeserial">Avoid character echo on PXE serial console</flag>
+	</use>
 </pkgmetadata>
-- 
cgit v1.2.3