aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2015-07-18 22:20:13 -0400
committerAnthony G. Basile <blueness@gentoo.org>2015-07-18 22:20:13 -0400
commitc94faa0c4f49904f04a182dc87f8d2fc029c534a (patch)
tree6c678368df669ceabf5372c5c6e984facede6198 /sys-boot
parentnet-misc/iputils: fix USE=idn. (diff)
downloadmusl-c94faa0c4f49904f04a182dc87f8d2fc029c534a.tar.gz
musl-c94faa0c4f49904f04a182dc87f8d2fc029c534a.tar.bz2
musl-c94faa0c4f49904f04a182dc87f8d2fc029c534a.zip
sys-boot/lilo: remove reference to __GLIBC__.
Package-Manager: portage-2.2.18 RepoMan-Options: --force Manifest-Sign-Key: 0xF52D4BBA
Diffstat (limited to 'sys-boot')
-rw-r--r--sys-boot/lilo/Manifest7
-rw-r--r--sys-boot/lilo/files/lilo-24.1-novga.patch12
-rw-r--r--sys-boot/lilo/files/lilo-24.1-remove__GLIBC__.patch11
-rw-r--r--sys-boot/lilo/files/lilo.conf73
-rw-r--r--sys-boot/lilo/lilo-24.1.ebuild186
-rw-r--r--sys-boot/lilo/metadata.xml14
6 files changed, 303 insertions, 0 deletions
diff --git a/sys-boot/lilo/Manifest b/sys-boot/lilo/Manifest
new file mode 100644
index 00000000..39eac8d5
--- /dev/null
+++ b/sys-boot/lilo/Manifest
@@ -0,0 +1,7 @@
+AUX lilo-24.1-novga.patch 500 SHA256 4911147939095f0315ea6f6e48fe53e9daaf8917b5bc3c254f56a1c8d4f37b10 SHA512 067a741086b6df6b5f728ffde3cac949dd9b59cdc11ac1b022f240b69c4a8ef883f5623cc610becd4648f02ad3a243a0d6a939aa8d8c63d9b0158426e6b6f300 WHIRLPOOL 4b9a8ed4d99a6ce6ee3d80ec63d822a6b5d3c18e4d621b7b9037fa9a3f272d118e81d1ae9cbe754ded7eef7b15aeb4e3b8130008d4a536c5357837f732a71781
+AUX lilo-24.1-remove__GLIBC__.patch 475 SHA256 1a60d6ea0fa2f056de918e26a37b127e8fbc4e88d7e056698aada049679a2116 SHA512 5f9556f5e42f20d5a4545599c8cea4df1f4d8e3ff20a51a3b388a9729016c43eefa2b8ff56daa829d53d972ab0393269bbe46d259364102225fd976977c8372b WHIRLPOOL 206b97f5c2d2ef8a3bd097f894c800268339130b4c92b1b0f1955c0f513c77ff76ec8ceac37c296055832e8d27b5f9696c005b7f42fa2504e2d07c08f378093c
+AUX lilo.conf 1722 SHA256 1cc9e4828e7b61f7c0ebf6655d7d6be3b584461308b568267f3c1bb7fb8371d0 SHA512 3e456b950d6f6fa9d1a223e11d60b1679105d97007617f648da5719a1cc9944cb1277849f642faee58038005057c2ed3af1bd635c5c87ec35505cd464e340f49 WHIRLPOOL d6d3749971c7cceba79feef2ed130a0250ecb6961e161aa8850ad99f2272d8cf94dbf2d952abd6b67843040c9623df6b7346d32eb12a9d6586d4c54d1ea875a9
+DIST dolilo-0.6.tar.bz2 3817 SHA256 01293874aea4cfa935d3f22fd52c8f4956e4a85b39a878df1255098825f2840e SHA512 1b59ea5f2e2ac52d62635c9f7d5fb5b2aff6757e6ea6c0950480d8a11832b872115907abe6d8fb3fa5436e2e8971d9a1dda103dc6a15db6fc310c8f4730ab936 WHIRLPOOL 7a24cf7bf4b476967a5d4ba2234ce3256ff9311744be020ef25e6227f8e86098aac89706d23df30d3f0212aa3fe313c0460d1709990b21029d93517b77f61e4e
+DIST lilo-24.1.tar.gz 773223 SHA256 a15280edacb8bca31b9163d65e61270b8c06cb9ffea74374a3a42164a13d4532 SHA512 d1375cac9654fcb3934e7e5e0533e126ff8700a48154eb5019cf62e4b89f14d2ce7a17b6324795d9b60b37ab7656bfb2c9467f6e9d3540095f5c294579e83883 WHIRLPOOL 6534b9494cce30c56f0ec700eb8288ebfdfb9e07ed631958e3f34d03d4fb42de372237dab5d07a8b8ef1c3da49b427d3777be14de9abca339dcd184fce550ab0
+EBUILD lilo-24.1.ebuild 4514 SHA256 06c3fabf91215c5b8b3d22e0a7a936571556eb7c69cee1a85b9487b4191e9251 SHA512 c9f25719e79da0d124bbabd543fd56b3886756794cd084f13f21c501802eb43f0ccc4aa7108983697ef957fe9097ec90c399e6b13e887df8251bdef7c2be84b5 WHIRLPOOL 787d5f4b1d89fb08c4c6c0ac5215d39a4c1ff4898940478e2fb67044da298b4920d577b255566e41e319fbd081af363652eb37447f876c4c990215637ea371d7
+MISC metadata.xml 504 SHA256 4cd65dd103dd97351619de30c8a8eab3f344cb43041a2377e3d8ef8cd9470500 SHA512 decf3fe5ba2137e315f5a7ab428dabff096d01b9eecbce6869e3f33e15f2daaffba450dea1a824ada9ac88a0c2eaaa9160234990c6e0c0e13a75b1c94f0352c0 WHIRLPOOL fc6a70bf788fb0314c8c49012a403212ca080a35ac03277ca254eb29f050276c8e0b366e3258b3ae20e3050b2a72a9f45535a4c313c2f122b413b4ec80e744ca
diff --git a/sys-boot/lilo/files/lilo-24.1-novga.patch b/sys-boot/lilo/files/lilo-24.1-novga.patch
new file mode 100644
index 00000000..512fac69
--- /dev/null
+++ b/sys-boot/lilo/files/lilo-24.1-novga.patch
@@ -0,0 +1,12 @@
+diff -uNr lilo-24.1.ORIG/make.vars lilo-24.1/make.vars
+--- lilo-24.1.ORIG/make.vars 2015-01-22 10:36:54.656904227 +0000
++++ lilo-24.1/make.vars 2015-01-22 10:37:16.516903935 +0000
+@@ -71,7 +71,7 @@
+
+ CONFIG=-DBDATA -DDSECS=3 -DEVMS -DIGNORECASE -DLVM -DNOKEYBOARD -DONE_SHOT \
+ -DPASS160 -DREISERFS -DREWRITE_TABLE -DSOLO_CHAIN -DVERSION -DVIRTUAL \
+- -DMDPRAID -DDEVMAPPER
++ -DMDPRAID -DDEVMAPPER -DNOVGA
+
+ # set the following if you wish LILO.COM to be installed
+ DOS_DIR=/dosC/boot
diff --git a/sys-boot/lilo/files/lilo-24.1-remove__GLIBC__.patch b/sys-boot/lilo/files/lilo-24.1-remove__GLIBC__.patch
new file mode 100644
index 00000000..66ff6b0a
--- /dev/null
+++ b/sys-boot/lilo/files/lilo-24.1-remove__GLIBC__.patch
@@ -0,0 +1,11 @@
+diff -Naur lilo-24.1.orig/src/lilo.c lilo-24.1/src/lilo.c
+--- lilo-24.1.orig/src/lilo.c 2014-10-16 20:06:46.000000000 -0400
++++ lilo-24.1/src/lilo.c 2015-07-18 22:16:32.776066238 -0400
+@@ -182,7 +182,6 @@
+ printf("Without");
+ #endif
+ printf(" device-mapper\n");
+- printf("\nglibc version %d.%d\n", __GLIBC__, __GLIBC_MINOR__);
+ 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
new file mode 100644
index 00000000..08cfc494
--- /dev/null
+++ b/sys-boot/lilo/files/lilo.conf
@@ -0,0 +1,73 @@
+# $Header: /var/cvsroot/gentoo-x86/sys-boot/lilo/files/lilo.conf,v 1.2 2004/07/18 04:42:04 dragonheart Exp $
+# Author: Ultanium
+
+#
+# Start LILO global section
+#
+
+# Faster, but won't work on all systems:
+#compact
+# Should work for most systems, and do not have the sector limit:
+lba32
+# If lba32 do not work, use linear:
+#linear
+
+# MBR to install LILO to:
+boot = /dev/hda
+map = /boot/.map
+
+# If you are having problems booting from a hardware raid-array
+# or have a unusual setup, try this:
+#disk=/dev/ataraid/disc0/disc bios=0x80 # see this as the first BIOS disk
+#disk=/dev/sda bios=0x81 # see this as the second BIOS disk
+#disk=/dev/hda bios=0x82 # see this as the third BIOS disk
+
+# Here you can select the secondary loader to install. A few
+# examples is:
+#
+# boot-text.b
+# boot-menu.b
+# boot-bmp.b
+#
+install = /boot/boot-menu.b # Note that for lilo-22.5.5 or later you
+ # do not need boot-{text,menu,bmp}.b in
+ # /boot, as they are linked into the lilo
+ # binary.
+
+menu-scheme=Wb
+prompt
+# If you always want to see the prompt with a 15 second timeout:
+#timeout=150
+delay = 50
+# Normal VGA console
+vga = normal
+# VESA console with size 1024x768x16:
+#vga = 791
+
+#
+# End LILO global section
+#
+
+#
+# Linux bootable partition config begins
+#
+image = /boot/bzImage
+ root = /dev/hda3
+ #root = /devices/discs/disc0/part3
+ label = Gentoo
+ read-only # read-only for checking
+#
+# Linux bootable partition config ends
+#
+
+#
+# DOS bootable partition config begins
+#
+other = /dev/hda1
+ #other = /devices/discs/disc0/part1
+ label = Windows
+ table = /dev/hda
+#
+# DOS bootable partition config ends
+#
+
diff --git a/sys-boot/lilo/lilo-24.1.ebuild b/sys-boot/lilo/lilo-24.1.ebuild
new file mode 100644
index 00000000..026d3025
--- /dev/null
+++ b/sys-boot/lilo/lilo-24.1.ebuild
@@ -0,0 +1,186 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-boot/lilo/lilo-24.1.ebuild,v 1.1 2015/01/22 10:45:46 chainsaw Exp $
+
+EAPI="5"
+
+inherit eutils 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/"
+
+DOLILO_TAR="dolilo-${DOLILO_V}.tar.bz2"
+SRC_URI="
+ http://lilo.alioth.debian.org/ftp/sources/${P}.tar.gz
+ mirror://gentoo/${DOLILO_TAR}
+"
+
+SLOT="0"
+LICENSE="BSD GPL-2"
+KEYWORDS="-* amd64 x86"
+
+DEPEND=">=sys-devel/bin86-0.15.5"
+RDEPEND="device-mapper? ( >=sys-fs/lvm2-2.02.45 )"
+
+src_prepare() {
+ # this patch is needed when booting PXE and the device you're using
+ # emulates vga console via serial console.
+ # IE.. B.B.o.o.o.o.t.t.i.i.n.n.g.g....l.l.i.i.n.n.u.u.x.x and stair stepping.
+ use pxeserial && epatch "${FILESDIR}/${P}-novga.patch"
+
+ # Remove reference to __GLIBC__ for musl.
+ epatch "${FILESDIR}"/${P}-remove__GLIBC__.patch
+
+ # Do not strip and have parallel make
+ # FIXME: images/Makefile does weird stuff
+ sed -i Makefile src/Makefile \
+ -e '/strip/d;s|^ make| $(MAKE)|g' \
+ -e '/images install/d' \
+ -e '/images all/d' \
+ || die "sed strip failed"
+}
+
+src_configure() {
+ if ! use device-mapper; then
+ sed -i make.vars -e 's|-DDEVMAPPER||g' || die
+ fi
+}
+
+src_compile() {
+ # lilo needs this. bug #140209
+ export LC_ALL=C
+
+ # hardened automatic PIC plus PIE building should be suppressed
+ # because of assembler instructions that cannot be compiled PIC
+ HARDENED_CFLAGS=$(test-flags-CC -fno-pic -nopie)
+
+ # we explicitly prevent the custom CFLAGS for stability reasons
+ if use static; then
+ local target=alles
+ else
+ local target=all
+ fi
+
+ emake CC="$(tc-getCC) ${LDFLAGS} ${HARDENED_CFLAGS}" ${target} || die
+}
+
+src_install() {
+ keepdir /boot
+ emake DESTDIR="${D}" install || die
+
+ if use !minimal; then
+ into /
+ dosbin "${WORKDIR}"/dolilo/dolilo || die
+
+ into /usr
+ dosbin keytab-lilo.pl || die
+
+ insinto /etc
+ newins "${FILESDIR}"/lilo.conf lilo.conf.example || die
+
+ newconfd "${WORKDIR}"/dolilo/dolilo.conf.d dolilo.example || die
+
+ dodoc CHANGELOG* readme/README.* readme/INCOMPAT README
+ docinto samples ; dodoc sample/*
+ fi
+}
+
+# Check whether LILO is installed
+# This function is from /usr/sbin/mkboot from debianutils, with copyright:
+#
+# Debian GNU/Linux
+# Copyright 1996-1997 Guy Maor <maor@debian.org>
+#
+# Modified for Gentoo for use with the lilo ebuild by:
+# Martin Schlemmer <azarah@gentoo.org> (16 Mar 2003)
+#
+lilocheck() {
+ local bootpart=
+ local rootpart="$(mount | grep -v "tmpfs" | grep -v "rootfs" | grep "on / " | cut -f1 -d " ")"
+
+ echo
+ ebegin "Checking whether LILO can be safely updated"
+
+ if [ "$(whoami)" != "root" ]
+ then
+ eend 1
+ eerror "Only root can check for LILO"
+ return 1
+ fi
+
+ if [ -z "${rootpart}" ]
+ then
+ eend 1
+ eerror "Could not determine root partition"
+ return 1
+ fi
+
+ if [ ! -f /etc/lilo.conf -o ! -x /sbin/lilo ]
+ then
+ eend 1
+ eerror "No LILO configuration in place"
+ return 1
+ fi
+
+ bootpart="$(sed -n "s:^boot[ ]*=[ ]*\(.*\)[ ]*:\1:p" /etc/lilo.conf)"
+
+ if [ -z "${bootpart}" ]
+ then
+ # lilo defaults to current root when 'boot=' is not present
+ bootpart="${rootpart}"
+ fi
+
+ if ! dd if=${bootpart} ibs=16 count=1 2>&- | grep -q 'LILO'
+ then
+ eend 1
+ eerror "No LILO signature on ${bootpart}"
+ ewarn "Check your /etc/lilo.conf, or run /sbin/lilo by hand."
+ return 1
+ fi
+
+ if grep -q "^[[:space:]]*password[[:space:]]*=[[:space:]]*\"\"" /etc/lilo.conf
+ then
+ eend 1
+ eerror "Interactive password entry configured"
+ ewarn "Run /sbin/lilo -p by hand."
+ return 1
+ fi
+
+ einfo "LILO on ${bootpart} is safe to update"
+ eend 0
+ return 0
+}
+
+pkg_postinst() {
+ if [ ! -e "${ROOT}/boot/boot.b" -a ! -L "${ROOT}/boot/boot.b" ]
+ then
+ [ -f "${ROOT}/boot/boot-menu.b" ] && \
+ ln -snf boot-menu.b "${ROOT}/boot/boot.b"
+ fi
+
+ if [ "${ROOT}" = "/" ] && use !minimal;
+ then
+ if lilocheck
+ then
+ einfo "Running DOLILO to complete the install"
+ # do not redirect to /dev/null because it may display some input
+ # prompt
+ /sbin/dolilo
+ if [ "$?" -ne 0 ]
+ then
+ eerror "You must manually configure and run LILO"
+ fi
+ fi
+ echo
+ fi
+ if use !minimal; then
+ echo
+ einfo "Issue 'dolilo' instead of 'lilo' to have a friendly wrapper that"
+ einfo "handles mounting and unmounting /boot for you. It can do more, "
+ einfo "edit /etc/conf.d/dolilo to harness its full potential."
+ echo
+ fi
+}
diff --git a/sys-boot/lilo/metadata.xml b/sys-boot/lilo/metadata.xml
new file mode 100644
index 00000000..256d2496
--- /dev/null
+++ b/sys-boot/lilo/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>base-system</herd>
+<maintainer>
+ <email>chainsaw@gentoo.org</email>
+ <name>Tony Vroon</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>
+</pkgmetadata>