summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2010-07-20 00:06:41 +0000
committerJeroen Roovers <jer@gentoo.org>2010-07-20 00:06:41 +0000
commite8ec86f9daabd6d161c49763d0516d41fe009ead (patch)
treef8d05dcea12fc151d21c97b9e4fa8e3d5fa3fe99 /sys-boot/lilo
parentVersion bump. (diff)
downloadgentoo-2-e8ec86f9daabd6d161c49763d0516d41fe009ead.tar.gz
gentoo-2-e8ec86f9daabd6d161c49763d0516d41fe009ead.tar.bz2
gentoo-2-e8ec86f9daabd6d161c49763d0516d41fe009ead.zip
Give submake a jobserver.
(Portage version: 2.2_rc67/cvs/Linux i686)
Diffstat (limited to 'sys-boot/lilo')
-rw-r--r--sys-boot/lilo/ChangeLog8
-rw-r--r--sys-boot/lilo/files/lilo-23.0-make.patch103
-rw-r--r--sys-boot/lilo/lilo-23.0-r1.ebuild176
3 files changed, 286 insertions, 1 deletions
diff --git a/sys-boot/lilo/ChangeLog b/sys-boot/lilo/ChangeLog
index 5055c3553b27..6e44e4862e46 100644
--- a/sys-boot/lilo/ChangeLog
+++ b/sys-boot/lilo/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-boot/lilo
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-boot/lilo/ChangeLog,v 1.57 2010/07/19 23:57:20 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-boot/lilo/ChangeLog,v 1.58 2010/07/20 00:06:41 jer Exp $
+
+*lilo-23.0-r1 (20 Jul 2010)
+
+ 20 Jul 2010; Jeroen Roovers <jer@gentoo.org> +lilo-23.0-r1.ebuild,
+ +files/lilo-23.0-make.patch:
+ Give submake a jobserver.
19 Jul 2010; Jeroen Roovers <jer@gentoo.org> lilo-23.0.ebuild:
Strip only the lilo binary thanks to Vladimir and Krzysztof Olędzki (bug
diff --git a/sys-boot/lilo/files/lilo-23.0-make.patch b/sys-boot/lilo/files/lilo-23.0-make.patch
new file mode 100644
index 000000000000..39bc514dd61b
--- /dev/null
+++ b/sys-boot/lilo/files/lilo-23.0-make.patch
@@ -0,0 +1,103 @@
+--- Makefile.orig 2010-06-18 19:17:48.000000000 +0200
++++ Makefile 2010-07-20 02:00:18.000000000 +0200
+@@ -26,19 +26,19 @@
+ # everything needed to run, just short of installation
+ #
+ all: test
+- make -C src all
++ $(MAKE) -C src all
+
+ #
+ # everything above plus the statically linked version
+ #
+ alles: test
+- make -C src alles
++ $(MAKE) -C src alles
+
+ #
+ # documentation files
+ #
+ docs:
+- make -C doc all
++ $(MAKE) -C doc all
+
+ #
+ # if you have the 'bcc' compiler, then you can make the diagnostics, too
+@@ -55,23 +55,23 @@
+ @echo before you proceed from this point.
+ @echo "Press <Enter> to continue, <^C> to abort ..."
+ @read
+- @make -C src floppy1
++ @$(MAKE) -C src floppy1
+ @echo Done.
+ @echo
+ @echo Remove the floppy from the drive. Label it "\"1.6\""
+ @echo "Press <Enter> to continue, <^C> to abort ..."
+ @read
+- @make -C src floppy2
++ @$(MAKE) -C src floppy2
+ @echo Done.
+ @echo
+ @echo Remove the floppy from the drive. Label it "\"2.4\""
+ @echo
+
+ diagnostic: test
+- make -C src diagnostic
++ $(MAKE) -C src diagnostic
+
+ dosexe: test
+- make -C dos lilo
++ $(MAKE) -C dos lilo
+
+ #
+ # test for compilers & utilities
+@@ -85,33 +85,33 @@
+ # shorthand install, if one knows that one has the 'bcc' compiler
+ #
+ ins:
+- make -C src ins
++ $(MAKE) -C src ins
+
+ #
+ # normal install, but doesn't make the diagnostic binaries
+ #
+ install: all
+- make -C src install
+- make -C man install
+- make -C dos install
+- make -C src insobs
++ $(MAKE) -C src install
++ $(MAKE) -C man install
++ $(MAKE) -C dos install
++ $(MAKE) -C src insobs
+
+ tidy:
+- make -C src tidy
+- make -C diagnose tidy
+- make -C dos tidy
+- make -C doc tidy
++ $(MAKE) -C src tidy
++ $(MAKE) -C diagnose tidy
++ $(MAKE) -C dos tidy
++ $(MAKE) -C doc tidy
+
+ clean: tidy
+ rm -f test.img
+- make -C src clean
+- make -C diagnose clean
+- make -C dos clean
++ $(MAKE) -C src clean
++ $(MAKE) -C diagnose clean
++ $(MAKE) -C dos clean
+
+ spotless: distclean
+ distclean: clean
+- make -C src distclean
+- make -C diagnose distclean
+- make -C dos distclean
+- make -C doc clean
++ $(MAKE) -C src distclean
++ $(MAKE) -C diagnose distclean
++ $(MAKE) -C dos distclean
++ $(MAKE) -C doc clean
+
diff --git a/sys-boot/lilo/lilo-23.0-r1.ebuild b/sys-boot/lilo/lilo-23.0-r1.ebuild
new file mode 100644
index 000000000000..0298c283498b
--- /dev/null
+++ b/sys-boot/lilo/lilo-23.0-r1.ebuild
@@ -0,0 +1,176 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-boot/lilo/lilo-23.0-r1.ebuild,v 1.1 2010/07/20 00:06:41 jer Exp $
+
+EAPI="2"
+
+inherit eutils flag-o-matic toolchain-funcs
+
+DOLILO_V="0.5"
+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="
+ https://alioth.debian.org/frs/download.php/3315/${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
+ >=sys-fs/device-mapper-1.02.12 ) )"
+
+PROVIDE="virtual/bootloader"
+
+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}/${PN}-22.8-novga.patch"
+
+ # Have parallel make
+ epatch "${FILESDIR}/${P}-make.patch"
+
+ # Do not strip
+ sed -i src/Makefile -e '/strip/d' || die "sed strip failed"
+}
+
+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
+ emake CC="$(tc-getCC) ${LDFLAGS} ${HARDENED_CFLAGS}" alles || die
+ else
+ emake CC="$(tc-getCC) ${LDFLAGS} ${HARDENED_CFLAGS}" all || die
+ fi
+}
+
+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
+
+ doman manPages/*.[5-8]
+ 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
+ einfon "Checking for LILO ..."
+
+ if [ "$(whoami)" != "root" ]
+ then
+ echo; echo
+ eerror "Only root can check for LILO!"
+ return 1
+ fi
+
+ if [ -z "${rootpart}" ]
+ then
+ echo; echo
+ eerror "Could not determine root partition!"
+ return 1
+ fi
+
+ if [ ! -f /etc/lilo.conf -o ! -x /sbin/lilo ]
+ then
+ echo " No"
+ 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
+ echo; echo
+ ewarn "Yes, but I couldn't find a LILO signature on ${bootpart}"
+ ewarn "Check your /etc/lilo.conf, or run /sbin/lilo by hand."
+ return 1
+ fi
+
+ echo " Yes, on ${bootpart}"
+
+ 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
+ echo
+ ewarn "Running /sbin/dolilo failed! Please check what the problem is"
+ ewarn "before your next reboot."
+
+ ebeep 5
+ epause 5
+ 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 then"
+ einfo "that when asked, edit /etc/conf.d/dolilo to harness it's full potential."
+ ebeep 5
+ epause 3
+ echo
+ fi
+}