mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-18 21:11:08 +02:00
grub: remove old grub versions, now maintained in coreos-overlay
This commit is contained in:
parent
994fbf19f4
commit
c11611fb65
@ -1,156 +0,0 @@
|
||||
# ChangeLog for sys-boot/grub-static
|
||||
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub-static/ChangeLog,v 1.34 2012/08/08 15:01:59 ago Exp $
|
||||
|
||||
08 Aug 2012; Agostino Sarubbo <ago@gentoo.org> grub-static-0.97-r12.ebuild:
|
||||
Stable for AMD64, wrt bug #418393
|
||||
|
||||
23 Jul 2012; Mike Frysinger <vapier@gentoo.org> grub-static-0.96-r1.ebuild,
|
||||
grub-static-0.97-r10.ebuild, grub-static-0.97-r12.ebuild,
|
||||
grub-static-0.97-r6.ebuild, grub-static-0.97-r9.ebuild,
|
||||
grub-static-0.97.ebuild:
|
||||
Block grub-0.9x versions only #398451 by Duncan.
|
||||
|
||||
*grub-static-0.97-r12 (02 Jun 2012)
|
||||
|
||||
02 Jun 2012; Mike Frysinger <vapier@gentoo.org> +grub-static-0.97-r12.ebuild:
|
||||
Version bump.
|
||||
|
||||
10 Apr 2011; Ulrich Mueller <ulm@gentoo.org> grub-static-0.96-r1.ebuild,
|
||||
grub-static-0.97.ebuild, grub-static-0.97-r6.ebuild,
|
||||
grub-static-0.97-r9.ebuild, grub-static-0.97-r10.ebuild:
|
||||
Don't PROVIDE virtual/bootloader, bug 359971.
|
||||
|
||||
24 Feb 2011; Robin H. Johnson <robbat2@gentoo.org>
|
||||
grub-static-0.97-r10.ebuild:
|
||||
One more bit for hanno. I_KNOW_WHAT_IM_DOING=1 will now enable you to install
|
||||
an unusable grub on amd64 systems without IA32_EMULATION, for specific rescue
|
||||
situations.
|
||||
|
||||
24 Feb 2011; Robin H. Johnson <robbat2@gentoo.org>
|
||||
grub-static-0.97-r10.ebuild:
|
||||
Provide advanced option for hanno to help with system rescues.
|
||||
|
||||
21 Feb 2011; Markos Chandras <hwoarang@gentoo.org>
|
||||
grub-static-0.97-r10.ebuild:
|
||||
Stable on amd64 wrt bug #355693
|
||||
|
||||
09 Jan 2011; Mike Frysinger <vapier@gentoo.org>
|
||||
grub-static-0.97-r9.ebuild, grub-static-0.97-r10.ebuild:
|
||||
Use new mount-boot_pkg_postinst helper.
|
||||
|
||||
30 Nov 2010; Robin H. Johnson <robbat2@gentoo.org>
|
||||
grub-static-0.96-r1.ebuild, grub-static-0.97.ebuild,
|
||||
grub-static-0.97-r6.ebuild, grub-static-0.97-r9.ebuild,
|
||||
grub-static-0.97-r10.ebuild:
|
||||
QA cleanup for repoman happiness.
|
||||
|
||||
*grub-static-0.97-r10 (30 Nov 2010)
|
||||
|
||||
30 Nov 2010; Robin H. Johnson <robbat2@gentoo.org>
|
||||
+grub-static-0.97-r10.ebuild:
|
||||
Bump grub-static to match grub 0.97-r10.
|
||||
|
||||
12 Dec 2009; Robin H. Johnson <robbat2@gentoo.org>
|
||||
grub-static-0.97-r9.ebuild:
|
||||
Suppress the pre-stripped warning.
|
||||
|
||||
12 Dec 2009; Robin H. Johnson <robbat2@gentoo.org>
|
||||
grub-static-0.97-r9.ebuild:
|
||||
Bug #296537: Increase the warnings and catch where the user does not have
|
||||
IA32_EMULATION set, by trying to run the binary.
|
||||
|
||||
04 Jul 2009; Robin H. Johnson <robbat2@gentoo.org>
|
||||
grub-static-0.97-r9.ebuild:
|
||||
Port from sys-boot/grub: Bug #261857: easier install with $ROOT usage.
|
||||
|
||||
04 Jul 2009; Robin H. Johnson <robbat2@gentoo.org>
|
||||
grub-static-0.97-r9.ebuild:
|
||||
Bug #255271: check for IA32_EMULATION on 64-bit, as we are building a
|
||||
32-bit binary and need to be able to run it.
|
||||
|
||||
15 May 2009; Markus Meier <maekke@gentoo.org> grub-static-0.97-r9.ebuild:
|
||||
amd64 stable, bug #269201
|
||||
|
||||
14 May 2009; Christian Faulhammer <fauli@gentoo.org>
|
||||
grub-static-0.97-r9.ebuild:
|
||||
x86 stable, bug 269201
|
||||
|
||||
11 Jan 2009; Markus Meier <maekke@gentoo.org> grub-static-0.97-r6.ebuild:
|
||||
amd64 stable, bug #254028
|
||||
|
||||
*grub-static-0.97-r9 (03 Jan 2009)
|
||||
|
||||
03 Jan 2009; Christoph Mende <angelos@gentoo.org>
|
||||
+grub-static-0.97-r9.ebuild:
|
||||
Version bump to match sys-boot/grub
|
||||
|
||||
28 Oct 2008; Christoph Mende <angelos@gentoo.org>
|
||||
grub-static-0.97-r6.ebuild:
|
||||
Added missing inherit eutils, bug 244706
|
||||
|
||||
*grub-static-0.97-r6 (27 Oct 2008)
|
||||
|
||||
27 Oct 2008; Robin H. Johnson <robbat2@gentoo.org>
|
||||
+grub-static-0.97-r6.ebuild:
|
||||
Bug #239224, version bump to match current non-static build. See bug for
|
||||
full list of fixes. Beware /boot/grub/splash.xpm.gz sometimes vanishing
|
||||
due to a Portage bug. Make SURE you follow the upgrade instructions or you
|
||||
might end up with a non-booting box.
|
||||
|
||||
25 Feb 2008; Chris Gianelloni <wolf31o2@gentoo.org>
|
||||
grub-static-0.97.ebuild:
|
||||
Sync with sys-boot/grub.
|
||||
|
||||
20 Dec 2006; Daniel Drake <dsd@gentoo.org> grub-static-0.97.ebuild:
|
||||
Stable on amd64, bug #156459
|
||||
|
||||
12 Nov 2006; Olivier Crête <tester@gentoo.org> grub-static-0.97.ebuild:
|
||||
Inherit mount-boot to auto-mount boot partition r/w
|
||||
|
||||
03 Nov 2006; Olivier Crête <tester@gentoo.org> grub-static-0.97.ebuild:
|
||||
Added code to install into /boot in pkg_postinst from grub ebuild, see bug
|
||||
#153956
|
||||
|
||||
*grub-static-0.97 (23 Oct 2006)
|
||||
|
||||
23 Oct 2006; Daniel Drake <dsd@gentoo.org> +grub-static-0.97.ebuild:
|
||||
New version, generated from sys-boot/grub-0.97-r3
|
||||
|
||||
16 Sep 2006; <blubb@gentoo.org> -grub-static-0.93.20030118.ebuild:
|
||||
version cleanups
|
||||
|
||||
07 Sep 2006; <blubb@gentoo.org> grub-static-0.96-r1.ebuild:
|
||||
stable on amd64
|
||||
|
||||
*grub-static-0.96-r1 (13 Jun 2006)
|
||||
|
||||
13 Jun 2006; Simon Stelling <blubb@gentoo.org> -grub-static-0.96.ebuild,
|
||||
+grub-static-0.96-r1.ebuild:
|
||||
fix bug 136594
|
||||
|
||||
12 Jun 2006; Olivier Crête <tester@gentoo.org>
|
||||
files/digest-grub-static-0.96, Manifest:
|
||||
Fixed digest
|
||||
|
||||
*grub-static-0.96 (11 Jun 2006)
|
||||
|
||||
11 Jun 2006; Simon Stelling <blubb@gentoo.org>
|
||||
grub-static-0.93.20030118.ebuild, +grub-static-0.96.ebuild:
|
||||
clean up KEYWORDS and bump to amore recent version
|
||||
|
||||
15 Feb 2006; Olivier Crête <tester@gentoo.org>
|
||||
grub-static-0.93.20030118.ebuild:
|
||||
Fix blocker for sys-apps -> sys-boot move
|
||||
|
||||
*grub-static-0.93.20030118 (08 Dec 2003)
|
||||
|
||||
08 Dec 2003; Seemant Kulleen <seemant@gentoo.org>
|
||||
grub-static-0.93.20030118.ebuild, metadata.xml:
|
||||
moved from sys-apps to sys-boot
|
||||
|
||||
*grub-static-0.93.20030118 (26 Jul 2003)
|
||||
|
||||
26 Jul 2003; Olivier Crete <tester@gentoo.org>
|
||||
grub-static-0.93.20030118.ebuild:
|
||||
Initial version of grub static for amd64 since there is no 64-bit bootloader
|
@ -1,28 +0,0 @@
|
||||
-----BEGIN PGP SIGNED MESSAGE-----
|
||||
Hash: SHA512
|
||||
|
||||
DIST grub-static-0.96.tar.bz2 859179 SHA256 3ece8910e7954ca2c2cbebc4d05cfb22e73455f826508661a5b1a60481dcbd76
|
||||
DIST grub-static-0.97-r10.tar.bz2 888963 SHA256 812c8113efa13b6bfe254e866204b4763bf889c796835ed0b53cb64920428d82 SHA512 2a18405c9f7b0712dac2246213f723c1a2be6734bff133b7906e7c18e4370faf924f35d3b834d74761cf50b3ab59e969fbff010e13292618187c65a72aa45a87 WHIRLPOOL 418246dacc50d1232b657ed4a81f8ec34149008e4312109ced834cbc8b380bef7ba2cd4339b22dac521d823723e360d6a70f87e8601979e80673510ea597e0b0
|
||||
DIST grub-static-0.97-r12.tar.bz2 1171586 SHA256 865eb5b3131d30be7ddbbc6969e924f2d199353c076504a2668a8df5be17c51f SHA512 0a4c0b3b556db366df70c7c51a1a26f614f949be4002d7f9a053b7261b80c2c49410e8fd04c7e3717ea560e7cbc6a692d859d07bdfe2099a78a33bce78ac5395 WHIRLPOOL c6e05b297d8cf8c6d84495a122502740d2102c32f14bd2df8b80c9e43a91c7f58f50297dbd4e2ba70fe7aee44a0f06bfff94e597fbddc65fa5b93efd4c2e9fea
|
||||
DIST grub-static-0.97-r6.tar.bz2 1005650 SHA256 1a17a8df6839401f7d1829aebea45c1654c3fcdd6a6f068100126d2fcbe75698
|
||||
DIST grub-static-0.97-r9.tar.bz2 937621 SHA256 0d6af53c5380bd37ea67f314236364baebfff52762ea5e52bf2f66941dabe2d1 SHA512 a8b1f7cd416f2c41c88ba5c34889e7afe9615bf985e69b2d1d3ec2a20b7ceb13e53e8b3df91a5077bfa1a217f3274362033d72f9bafe3ad22be378f26728035c WHIRLPOOL 48c3556902369232a3ee5b1a9a0a61ebb951fd8c25590262d1c944170918e9d4e98fcf3ba3ccd47707e52aabca426c328cc7ad38f97baa9052d61d26a90522ab
|
||||
DIST grub-static-0.97.tar.bz2 954051 SHA256 468ac48823880bd7cb2dd6bf60673adef1313c44a5e3131a0a4a37d2cc1145bc
|
||||
EBUILD grub-static-0.96-r1.ebuild 524 SHA256 c76bc5b61da0e916e9ed8241cd8261ab2450f0ba114a6f5f47c070a4488257ce SHA512 c3cff2018b4bf5a6b86aa8ce2248cc3464301aa093f6d272057ce8ad1b023c25e2d7be12dbbf934c8e35d723fad30ef9aa9fdf66035a2e2bd503e0f6e76ded55 WHIRLPOOL cf814bf5e7ba99b7dc1238969179f5c761649a2230ee90b46d9fbe5067a7ace0794c0f7649b813e25f09f38b3731c9cfdbdee30176abf551e6ce5407f90b9a11
|
||||
EBUILD grub-static-0.97-r10.ebuild 5515 SHA256 4b33ef5aade9667391a8d677afe41358249adef6fdf29e1084e327471ee20dc0 SHA512 8a890fb67dacfdebecb0a67fc9a4f16e63bfb71e8a9f526e34ee9b4ec440c0c9b36edfd40fa26c851c348f39a5a5f4d31b02a8aa28dfdd30288cc7c4658367f6 WHIRLPOOL f9b6396984ef10c268cf51850c390937ea4168612ec23bfa989c1da3a885cd6ded3a6c5702a06ac1a8664108e966fbd081be647fbdbdacc6eca8d953832fe297
|
||||
EBUILD grub-static-0.97-r12.ebuild 5512 SHA256 c980b30540d0e782a72654831d0114f58eb32be0578eec8cf398077e02f65d5c SHA512 fe560b36096406b5dc1cb16c7ead61c72a7fd6352d2e47e03f5dafdba24efbb9a902506873969a35841dd8799c67deae92902a9887db6183a20fc5e4e23bd763 WHIRLPOOL 6240b0dcf9b34f40dc4154668953b0211140d77e51187e9224fa52e4d93a81527c2c8afa86c05f07b2dc2bfd6120d8da6eff642c18d95b4ad73ec1eb6b5c86ee
|
||||
EBUILD grub-static-0.97-r6.ebuild 4444 SHA256 bcf845e0eaa788351719569b11eaaddf9c058e41abed2745f756f6fbb653be42 SHA512 ce44b4175ca7f1d5f23a8a2e5d67b549a9f2829cbba569c97ccd740d2401d5a1835ae590d84245e0b6319b5a66f0cfe4d71b82b77953e4bdb7878f077db7a5b1 WHIRLPOOL 3e5a4ac3aefb5ec8527538115b59aa2af2c745fcb94fb451622e22949d146c0d9eee8ea33a5feea3feb83458c06348290a061d6321aeba5ecc469b5a91dcd5b4
|
||||
EBUILD grub-static-0.97-r9.ebuild 5410 SHA256 81967d1bfd6571ffbc3081b70fd83da1a36a8a86152b2eca88a746ce09c21919 SHA512 b0f5b784d85f2e45d19bf2a734f9873d8e9378b0d644544b2bf4c6dc8a019c90b76f0484758418b4763229065a290aa988a5ce164e2b5ab6e9f28807bdb8bbb9 WHIRLPOOL 34fb3114fabdb61d36d24f946f93fa27db0afdbec0f3cbabc922f22dc19cebc08a67d1eadc685d213c5081616324e4c3cde7ccd3495abba82ad350c84d6cf83b
|
||||
EBUILD grub-static-0.97.ebuild 2035 SHA256 d62c1a79d01ac284eec13d604b827d663966945c5d3209b0cf0358beb9e96e9e SHA512 9b4a940f84b6bf09f8b6404cb1c63bc84830f45610b25fdc58927038bc711b1a1e1602561eeb9bee4a36ca47f5b9f1cf92b1de0c276e242aebef5056641c7c02 WHIRLPOOL 8c7750e5c5cfdc939034651095d545214f28b205c08800ee4c15f37d3c2d30315ea2917b51c9d9bb38920755f94bc45fd35fb2c6bfe7c0d156b585d19c143f87
|
||||
MISC ChangeLog 5551 SHA256 fd373c083a05ef17a5074741d41801878c868780888a079f7fc200085e2cd90f SHA512 524d7b8cf0fe52981a189151d8be58aa545b36b8938378944aa6d29aaa717b07f449155e44a5a54025292162f72cd7562408808966b88970929826166e54af52 WHIRLPOOL d35df4dfea54ce55500d840f48e21b0a6fadb0f0521108e45849a8354b0bad5528afc635f0e149c2f27dd4dea308f4318b9c1bc322a6d2c88d5bb811b486c07e
|
||||
MISC metadata.xml 158 SHA256 0df9eb61f6a4e4a3f8fc16386b0204e22e85940533d769d4a0418a4ecec50d90 SHA512 e59c9f002f414c281cb69001ab64a9f772689b4accb0cc9173d94d2164be3c38c72ce6e36c2b522442a3de954cf88d6f2b6fb74bdfe9e2e2735e78c9c583283e WHIRLPOOL aaab4e99a3175a7ccbd5ee673a7646f1a32ff56b1670bde20322f827caaf63e4993ea9ab9c7fd1ca2fd89b06dd4b68b0956ab40515d6fcb5ec6f484621085a44
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
Version: GnuPG v2.0.19 (GNU/Linux)
|
||||
|
||||
iQEcBAEBCgAGBQJQIn9wAAoJEOTDgjZ80txdO2wH/3SjLqKw7prhH0pHW2AYOMNy
|
||||
Sa/qtPWAi4rplk2fmuVMilRzQr4nLswLYAtOZ8fasW7imEUUuMguNhWoztJEjPXm
|
||||
2TXZxdnIq28cjZDmsaDRFCl+JNaSS8yncd9ggySIoKLSZJ3yk4g1RWTVnhp5Nb84
|
||||
AgGAkp/HXQDHD0lCiBTHxEo4XJzz5d2L5QpqIbQeBV/bCzyXfLm6BTq28chUck1V
|
||||
BkSxfSvBQ3r0q1gLTAWDE9jshBQ0xTwDsiZW1E4tV4t7idY5Tg7zxJKafZ/1WTSa
|
||||
5tBasrQ6vNV98yBY5TsomozUY3Fj4PquCaX/l5HERJraEVMR4ivxNHommJAiL/s=
|
||||
=HPyp
|
||||
-----END PGP SIGNATURE-----
|
@ -1,18 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub-static/grub-static-0.96-r1.ebuild,v 1.5 2012/07/23 03:49:58 vapier Exp $
|
||||
|
||||
DESCRIPTION="Static GNU GRUB boot loader"
|
||||
|
||||
HOMEPAGE="http://www.gnu.org/software/grub/"
|
||||
SRC_URI="mirror://gentoo/grub-static-${PV}.tar.bz2"
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="-* amd64 ~x86"
|
||||
IUSE=""
|
||||
DEPEND="!<sys-boot/grub-2"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
src_install() {
|
||||
cp -a "${WORKDIR}"/* "${D}"/
|
||||
}
|
@ -1,176 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub-static/grub-static-0.97-r10.ebuild,v 1.8 2012/07/23 03:49:58 vapier Exp $
|
||||
|
||||
# XXX: we need to review menu.lst vs grub.conf handling. We've been converting
|
||||
# all systems to grub.conf (and symlinking menu.lst to grub.conf), but
|
||||
# we never updated any of the source code (it still all wants menu.lst),
|
||||
# and there is no indication that upstream is making the transition.
|
||||
|
||||
inherit eutils mount-boot toolchain-funcs linux-info
|
||||
|
||||
PATCHVER="1.9" # Not used, just for tracking with main grub
|
||||
|
||||
DESCRIPTION="GNU GRUB Legacy boot loader (static build)"
|
||||
|
||||
HOMEPAGE="http://www.gnu.org/software/grub/"
|
||||
SRC_URI="mirror://gentoo/${PF}.tar.bz2"
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="-* amd64 ~x86"
|
||||
IUSE=""
|
||||
DEPEND="!<sys-boot/grub-2"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
# These are already stripped since we use a binpkg.
|
||||
QA_PRESTRIPPED="/sbin/grub /bin/mbchk"
|
||||
|
||||
pkg_setup() {
|
||||
local arch="$(tc-arch)"
|
||||
case ${arch} in
|
||||
amd64)
|
||||
CONFIG_CHECK='~IA32_EMULATION'
|
||||
WARNING_IA32_EMULATION="You will NOT be able to run grub unless you have IA32_EMULATION set!"
|
||||
check_extra_config
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cp -a "${WORKDIR}"/* "${D}"/
|
||||
if [[ -z "${I_KNOW_WHAT_I_AM_DOING}" ]]; then
|
||||
run_test_grub "${D}"/sbin/grub && einfo "New grub can run on your system, good!"
|
||||
fi
|
||||
}
|
||||
|
||||
run_test_grub() {
|
||||
local grub="$1"
|
||||
local version="$(${grub} \
|
||||
--read-only --no-pager --no-floppy --no-curses \
|
||||
--no-config-file --batch --version)"
|
||||
local error="grub test-run failed"
|
||||
use amd64 && error="${error} Is IA32_EMULATION set?"
|
||||
[ "${version/${PV}}" != "${version}" ] || die "${error}"
|
||||
return 0
|
||||
}
|
||||
|
||||
#
|
||||
# Below this point, everything is also used in grub-static!
|
||||
# Please keep in sync!
|
||||
#
|
||||
|
||||
setup_boot_dir() {
|
||||
local boot_dir=$1
|
||||
local dir=${boot_dir}
|
||||
|
||||
if [[ -z "${I_KNOW_WHAT_I_AM_DOING}" ]]; then
|
||||
run_test_grub /sbin/grub
|
||||
fi
|
||||
|
||||
mkdir -p "${dir}"
|
||||
[[ ! -L ${dir}/boot ]] && ln -s . "${dir}/boot"
|
||||
dir="${dir}/grub"
|
||||
if [[ ! -e ${dir} ]] ; then
|
||||
mkdir "${dir}" || die "${dir} does not exist!"
|
||||
fi
|
||||
|
||||
# change menu.lst to grub.conf
|
||||
if [[ ! -e ${dir}/grub.conf ]] && [[ -e ${dir}/menu.lst ]] ; then
|
||||
mv -f "${dir}"/menu.lst "${dir}"/grub.conf
|
||||
ewarn
|
||||
ewarn "*** IMPORTANT NOTE: menu.lst has been renamed to grub.conf"
|
||||
ewarn
|
||||
fi
|
||||
|
||||
if [[ ! -e ${dir}/menu.lst ]]; then
|
||||
einfo "Linking from new grub.conf name to menu.lst"
|
||||
ln -snf grub.conf "${dir}"/menu.lst
|
||||
fi
|
||||
|
||||
if [[ -e ${dir}/stage2 ]] ; then
|
||||
mv "${dir}"/stage2{,.old}
|
||||
ewarn "*** IMPORTANT NOTE: you must run grub and install"
|
||||
ewarn "the new version's stage1 to your MBR. Until you do,"
|
||||
ewarn "stage1 and stage2 will still be the old version, but"
|
||||
ewarn "later stages will be the new version, which could"
|
||||
ewarn "cause problems such as an unbootable system."
|
||||
ewarn "This means you must use either grub-install or perform"
|
||||
ewarn "root/setup manually! For more help, see the handbook:"
|
||||
ewarn "http://www.gentoo.org/doc/en/handbook/handbook-${ARCH}.xml?part=1&chap=10#grub-install-auto"
|
||||
ebeep
|
||||
fi
|
||||
|
||||
einfo "Copying files from /lib/grub, /usr/lib/grub and /usr/share/grub to ${dir}"
|
||||
for x in \
|
||||
"${ROOT}"/lib*/grub/*/* \
|
||||
"${ROOT}"/usr/lib*/grub/*/* \
|
||||
"${ROOT}"/usr/share/grub/* ; do
|
||||
[[ -f ${x} ]] && cp -p "${x}" "${dir}"/
|
||||
done
|
||||
|
||||
if [[ ! -e ${dir}/grub.conf ]] ; then
|
||||
s="${ROOT}/usr/share/doc/${PF}/grub.conf.gentoo"
|
||||
[[ -e "${s}" ]] && cat "${s}" >${dir}/grub.conf
|
||||
[[ -e "${s}.gz" ]] && zcat "${s}.gz" >${dir}/grub.conf
|
||||
[[ -e "${s}.bz2" ]] && bzcat "${s}.bz2" >${dir}/grub.conf
|
||||
fi
|
||||
|
||||
# Per bug 218599, we support grub.conf.install for users that want to run a
|
||||
# specific set of Grub setup commands rather than the default ones.
|
||||
grub_config=${dir}/grub.conf.install
|
||||
[[ -e ${grub_config} ]] || grub_config=${dir}/grub.conf
|
||||
if [[ -e ${grub_config} ]] ; then
|
||||
local tmp="${TMPDIR}/${P}-setup_boot_dir-$$"
|
||||
egrep \
|
||||
-v '^[[:space:]]*(#|$|default|fallback|initrd|password|splashimage|timeout|title)' \
|
||||
"${grub_config}" >"${tmp}"
|
||||
# Do NOT fail here, only warn.
|
||||
/sbin/grub --batch \
|
||||
--device-map="${dir}"/device.map \
|
||||
>/dev/null <"${tmp}"
|
||||
rc=$?
|
||||
[[ $rc -ne 0 ]] && ewarn "Grub failed to run!"
|
||||
fi
|
||||
|
||||
# the grub default commands silently piss themselves if
|
||||
# the default file does not exist ahead of time
|
||||
if [[ ! -e ${dir}/default ]] ; then
|
||||
# This may fail, don't worry about it.
|
||||
grub-set-default --root-directory="${boot_dir}" default
|
||||
:
|
||||
fi
|
||||
einfo "Grub has been installed to ${boot_dir} successfully."
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
mount-boot_pkg_postinst
|
||||
|
||||
if [[ -n ${DONT_MOUNT_BOOT} ]]; then
|
||||
elog "WARNING: you have DONT_MOUNT_BOOT in effect, so you must apply"
|
||||
elog "the following instructions for your /boot!"
|
||||
elog "Neglecting to do so may cause your system to fail to boot!"
|
||||
elog
|
||||
else
|
||||
setup_boot_dir "${ROOT}"/boot
|
||||
# Trailing output because if this is run from pkg_postinst, it gets mixed into
|
||||
# the other output.
|
||||
einfo ""
|
||||
fi
|
||||
elog "To interactively install grub files to another device such as a USB"
|
||||
elog "stick, just run the following and specify the directory as prompted:"
|
||||
elog " emerge --config =${PF}"
|
||||
elog "Alternately, you can export GRUB_ALT_INSTALLDIR=/path/to/use to tell"
|
||||
elog "grub where to install in a non-interactive way."
|
||||
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
local dir
|
||||
if [ ! -d "${GRUB_ALT_INSTALLDIR}" ]; then
|
||||
einfo "Enter the directory where you want to setup grub:"
|
||||
read dir
|
||||
else
|
||||
dir="${GRUB_ALT_INSTALLDIR}"
|
||||
fi
|
||||
setup_boot_dir "${dir}"
|
||||
}
|
@ -1,180 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub-static/grub-static-0.97-r12.ebuild,v 1.3 2012/08/08 15:01:59 ago Exp $
|
||||
|
||||
# XXX: we need to review menu.lst vs grub.conf handling. We've been converting
|
||||
# all systems to grub.conf (and symlinking menu.lst to grub.conf), but
|
||||
# we never updated any of the source code (it still all wants menu.lst),
|
||||
# and there is no indication that upstream is making the transition.
|
||||
|
||||
inherit eutils mount-boot toolchain-funcs linux-info
|
||||
|
||||
PATCHVER="1.14" # Not used, just for tracking with main grub
|
||||
|
||||
DESCRIPTION="GNU GRUB Legacy boot loader (static build)"
|
||||
|
||||
HOMEPAGE="http://www.gnu.org/software/grub/"
|
||||
SRC_URI="mirror://gentoo/${PF}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="-* amd64 ~x86"
|
||||
IUSE=""
|
||||
|
||||
DEPEND="!<sys-boot/grub-2"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
S=${WORKDIR}
|
||||
|
||||
pkg_setup() {
|
||||
case $(tc-arch) in
|
||||
amd64)
|
||||
CONFIG_CHECK='~IA32_EMULATION'
|
||||
WARNING_IA32_EMULATION="You will NOT be able to run grub unless you have IA32_EMULATION set!"
|
||||
check_extra_config
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cp -a * "${D}"/
|
||||
# Make sure the docs get compressed
|
||||
dodoc usr/share/doc/${PF}/*
|
||||
|
||||
if [[ -z "${I_KNOW_WHAT_I_AM_DOING}" ]]; then
|
||||
run_test_grub "${D}"/sbin/grub && einfo "New grub can run on your system, good!"
|
||||
fi
|
||||
}
|
||||
|
||||
run_test_grub() {
|
||||
local grub="$1"
|
||||
local version="$(${grub} \
|
||||
--read-only --no-pager --no-floppy --no-curses \
|
||||
--no-config-file --batch --version)"
|
||||
local error="grub test-run failed"
|
||||
use amd64 && error="${error} Is IA32_EMULATION set?"
|
||||
[ "${version/${PV}}" != "${version}" ] || die "${error}"
|
||||
return 0
|
||||
}
|
||||
|
||||
#
|
||||
# Below this point, everything is also used in grub-static!
|
||||
# Please keep in sync!
|
||||
#
|
||||
|
||||
setup_boot_dir() {
|
||||
local boot_dir=$1
|
||||
local dir=${boot_dir}
|
||||
|
||||
if [[ -z "${I_KNOW_WHAT_I_AM_DOING}" ]]; then
|
||||
run_test_grub /sbin/grub
|
||||
fi
|
||||
|
||||
mkdir -p "${dir}"
|
||||
[[ ! -L ${dir}/boot ]] && ln -s . "${dir}/boot"
|
||||
dir="${dir}/grub"
|
||||
if [[ ! -e ${dir} ]] ; then
|
||||
mkdir "${dir}" || die
|
||||
fi
|
||||
|
||||
# change menu.lst to grub.conf
|
||||
if [[ ! -e ${dir}/grub.conf ]] && [[ -e ${dir}/menu.lst ]] ; then
|
||||
mv -f "${dir}"/menu.lst "${dir}"/grub.conf
|
||||
ewarn
|
||||
ewarn "*** IMPORTANT NOTE: menu.lst has been renamed to grub.conf"
|
||||
ewarn
|
||||
fi
|
||||
|
||||
if [[ ! -e ${dir}/menu.lst ]]; then
|
||||
einfo "Linking from new grub.conf name to menu.lst"
|
||||
ln -snf grub.conf "${dir}"/menu.lst
|
||||
fi
|
||||
|
||||
if [[ -e ${dir}/stage2 ]] ; then
|
||||
mv "${dir}"/stage2{,.old}
|
||||
ewarn "*** IMPORTANT NOTE: you must run grub and install"
|
||||
ewarn "the new version's stage1 to your MBR. Until you do,"
|
||||
ewarn "stage1 and stage2 will still be the old version, but"
|
||||
ewarn "later stages will be the new version, which could"
|
||||
ewarn "cause problems such as an unbootable system."
|
||||
ewarn "This means you must use either grub-install or perform"
|
||||
ewarn "root/setup manually! For more help, see the handbook:"
|
||||
ewarn "http://www.gentoo.org/doc/en/handbook/handbook-${ARCH}.xml?part=1&chap=10#grub-install-auto"
|
||||
ebeep
|
||||
fi
|
||||
|
||||
einfo "Copying files from /lib/grub, /usr/lib/grub and /usr/share/grub to ${dir}"
|
||||
for x in \
|
||||
"${ROOT}"/lib*/grub/*/* \
|
||||
"${ROOT}"/usr/lib*/grub/*/* \
|
||||
"${ROOT}"/usr/share/grub/* ; do
|
||||
[[ -f ${x} ]] && cp -p "${x}" "${dir}"/
|
||||
done
|
||||
|
||||
if [[ ! -e ${dir}/grub.conf ]] ; then
|
||||
s="${ROOT}/usr/share/doc/${PF}/grub.conf.gentoo"
|
||||
[[ -e "${s}" ]] && cat "${s}" >${dir}/grub.conf
|
||||
[[ -e "${s}.gz" ]] && zcat "${s}.gz" >${dir}/grub.conf
|
||||
[[ -e "${s}.bz2" ]] && bzcat "${s}.bz2" >${dir}/grub.conf
|
||||
fi
|
||||
|
||||
# Per bug 218599, we support grub.conf.install for users that want to run a
|
||||
# specific set of Grub setup commands rather than the default ones.
|
||||
grub_config=${dir}/grub.conf.install
|
||||
[[ -e ${grub_config} ]] || grub_config=${dir}/grub.conf
|
||||
if [[ -e ${grub_config} ]] ; then
|
||||
local tmp="${TMPDIR}/${P}-setup_boot_dir-$$"
|
||||
egrep \
|
||||
-v '^[[:space:]]*(#|$|default|fallback|initrd|password|splashimage|timeout|title)' \
|
||||
"${grub_config}" >"${tmp}"
|
||||
# Do NOT fail here, only warn.
|
||||
/sbin/grub --batch \
|
||||
--device-map="${dir}"/device.map \
|
||||
>/dev/null <"${tmp}"
|
||||
rc=$?
|
||||
[[ $rc -ne 0 ]] && ewarn "Grub failed to run!"
|
||||
fi
|
||||
|
||||
# the grub default commands silently piss themselves if
|
||||
# the default file does not exist ahead of time
|
||||
if [[ ! -e ${dir}/default ]] ; then
|
||||
# This may fail, don't worry about it.
|
||||
grub-set-default --root-directory="${boot_dir}" default
|
||||
fi
|
||||
einfo "Grub has been installed to ${boot_dir} successfully."
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
mount-boot_mount_boot_partition
|
||||
|
||||
if [[ -n ${DONT_MOUNT_BOOT} ]]; then
|
||||
elog "WARNING: you have DONT_MOUNT_BOOT in effect, so you must apply"
|
||||
elog "the following instructions for your /boot!"
|
||||
elog "Neglecting to do so may cause your system to fail to boot!"
|
||||
elog
|
||||
else
|
||||
setup_boot_dir "${ROOT}"/boot
|
||||
# Trailing output because if this is run from pkg_postinst, it gets mixed into
|
||||
# the other output.
|
||||
einfo ""
|
||||
fi
|
||||
elog "To interactively install grub files to another device such as a USB"
|
||||
elog "stick, just run the following and specify the directory as prompted:"
|
||||
elog " emerge --config =${PF}"
|
||||
elog "Alternately, you can export GRUB_ALT_INSTALLDIR=/path/to/use to tell"
|
||||
elog "grub where to install in a non-interactive way."
|
||||
|
||||
# needs to be after we call setup_boot_dir
|
||||
mount-boot_pkg_postinst
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
local dir
|
||||
if [ ! -d "${GRUB_ALT_INSTALLDIR}" ]; then
|
||||
einfo "Enter the directory where you want to setup grub:"
|
||||
read dir
|
||||
else
|
||||
dir="${GRUB_ALT_INSTALLDIR}"
|
||||
fi
|
||||
setup_boot_dir "${dir}"
|
||||
}
|
@ -1,136 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub-static/grub-static-0.97-r6.ebuild,v 1.7 2012/07/23 03:49:58 vapier Exp $
|
||||
|
||||
# XXX: we need to review menu.lst vs grub.conf handling. We've been converting
|
||||
# all systems to grub.conf (and symlinking menu.lst to grub.conf), but
|
||||
# we never updated any of the source code (it still all wants menu.lst),
|
||||
# and there is no indication that upstream is making the transition.
|
||||
|
||||
inherit eutils mount-boot
|
||||
|
||||
PATCHVER="1.7" # Not used, just for tracking with main grub
|
||||
|
||||
DESCRIPTION="GNU GRUB Legacy boot loader (static build)"
|
||||
|
||||
HOMEPAGE="http://www.gnu.org/software/grub/"
|
||||
SRC_URI="mirror://gentoo/${PF}.tar.bz2"
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="-* amd64 ~x86"
|
||||
IUSE=""
|
||||
DEPEND="!<sys-boot/grub-2"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
src_install() {
|
||||
cp -a "${WORKDIR}"/* "${D}"/
|
||||
}
|
||||
|
||||
#
|
||||
# Below this point, everything is also used in grub-static!
|
||||
# Please keep in sync!
|
||||
#
|
||||
|
||||
setup_boot_dir() {
|
||||
local boot_dir=$1
|
||||
local dir=${boot_dir}
|
||||
|
||||
[[ ! -e ${dir} ]] && die "${dir} does not exist!"
|
||||
[[ ! -L ${dir}/boot ]] && ln -s . "${dir}/boot"
|
||||
dir="${dir}/grub"
|
||||
if [[ ! -e ${dir} ]] ; then
|
||||
mkdir "${dir}" || die "${dir} does not exist!"
|
||||
fi
|
||||
|
||||
# change menu.lst to grub.conf
|
||||
if [[ ! -e ${dir}/grub.conf ]] && [[ -e ${dir}/menu.lst ]] ; then
|
||||
mv -f "${dir}"/menu.lst "${dir}"/grub.conf
|
||||
ewarn
|
||||
ewarn "*** IMPORTANT NOTE: menu.lst has been renamed to grub.conf"
|
||||
ewarn
|
||||
fi
|
||||
|
||||
if [[ ! -e ${dir}/menu.lst ]]; then
|
||||
einfo "Linking from new grub.conf name to menu.lst"
|
||||
ln -snf grub.conf "${dir}"/menu.lst
|
||||
fi
|
||||
|
||||
if [[ -e ${dir}/stage2 ]] ; then
|
||||
mv "${dir}"/stage2{,.old}
|
||||
ewarn "*** IMPORTANT NOTE: you must run grub and install"
|
||||
ewarn "the new version's stage1 to your MBR. Until you do,"
|
||||
ewarn "stage1 and stage2 will still be the old version, but"
|
||||
ewarn "later stages will be the new version, which could"
|
||||
ewarn "cause problems such as an unbootable system."
|
||||
ewarn "This means you must use either grub-install or perform"
|
||||
ewarn "root/setup manually! For more help, see the handbook:"
|
||||
ewarn "http://www.gentoo.org/doc/en/handbook/handbook-${ARCH}.xml?part=1&chap=10#grub-install-auto"
|
||||
ebeep
|
||||
fi
|
||||
|
||||
einfo "Copying files from /lib/grub, /usr/lib/grub and /usr/share/grub to ${dir}"
|
||||
for x in \
|
||||
"${ROOT}"/lib*/grub/*/* \
|
||||
"${ROOT}"/usr/lib*/grub/*/* \
|
||||
"${ROOT}"/usr/share/grub/* ; do
|
||||
[[ -f ${x} ]] && cp -p "${x}" "${dir}"/
|
||||
done
|
||||
|
||||
if [[ ! -e ${dir}/grub.conf ]] ; then
|
||||
s="${ROOT}/usr/share/doc/${PF}/grub.conf.gentoo"
|
||||
[[ -e "${s}" ]] && cat "${s}" >${dir}/grub.conf
|
||||
[[ -e "${s}.gz" ]] && zcat "${s}.gz" >${dir}/grub.conf
|
||||
[[ -e "${s}.bz2" ]] && bzcat "${s}.bz2" >${dir}/grub.conf
|
||||
fi
|
||||
|
||||
# Per bug 218599, we support grub.conf.install for users that want to run a
|
||||
# specific set of Grub setup commands rather than the default ones.
|
||||
grub_config=${dir}/grub.conf.install
|
||||
[[ -e ${grub_config} ]] || grub_config=${dir}/grub.conf
|
||||
if [[ -e ${grub_config} ]] ; then
|
||||
egrep \
|
||||
-v '^[[:space:]]*(#|$|default|fallback|initrd|password|splashimage|timeout|title)' \
|
||||
"${grub_config}" | \
|
||||
/sbin/grub --batch \
|
||||
--device-map="${dir}"/device.map \
|
||||
> /dev/null
|
||||
fi
|
||||
|
||||
# the grub default commands silently piss themselves if
|
||||
# the default file does not exist ahead of time
|
||||
if [[ ! -e ${dir}/default ]] ; then
|
||||
grub-set-default --root-directory="${boot_dir}" default
|
||||
fi
|
||||
einfo "Grub has been installed to ${boot_dir} successfully."
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if [[ -n ${DONT_MOUNT_BOOT} ]]; then
|
||||
elog "WARNING: you have DONT_MOUNT_BOOT in effect, so you must apply"
|
||||
elog "the following instructions for your /boot!"
|
||||
elog "Neglecting to do so may cause your system to fail to boot!"
|
||||
elog
|
||||
else
|
||||
setup_boot_dir "${ROOT}"/boot
|
||||
# Trailing output because if this is run from pkg_postinst, it gets mixed into
|
||||
# the other output.
|
||||
einfo ""
|
||||
fi
|
||||
elog "To interactively install grub files to another device such as a USB"
|
||||
elog "stick, just run the following and specify the directory as prompted:"
|
||||
elog " emerge --config =${PF}"
|
||||
elog "Alternately, you can export GRUB_ALT_INSTALLDIR=/path/to/use to tell"
|
||||
elog "grub where to install in a non-interactive way."
|
||||
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
local dir
|
||||
if [ ! -d "${GRUB_ALT_INSTALLDIR}" ]; then
|
||||
einfo "Enter the directory where you want to setup grub:"
|
||||
read dir
|
||||
else
|
||||
dir="${GRUB_ALT_INSTALLDIR}"
|
||||
fi
|
||||
setup_boot_dir "${dir}"
|
||||
}
|
@ -1,172 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub-static/grub-static-0.97-r9.ebuild,v 1.12 2012/07/23 03:49:58 vapier Exp $
|
||||
|
||||
# XXX: we need to review menu.lst vs grub.conf handling. We've been converting
|
||||
# all systems to grub.conf (and symlinking menu.lst to grub.conf), but
|
||||
# we never updated any of the source code (it still all wants menu.lst),
|
||||
# and there is no indication that upstream is making the transition.
|
||||
|
||||
inherit eutils mount-boot toolchain-funcs linux-info
|
||||
|
||||
PATCHVER="1.9" # Not used, just for tracking with main grub
|
||||
|
||||
DESCRIPTION="GNU GRUB Legacy boot loader (static build)"
|
||||
|
||||
HOMEPAGE="http://www.gnu.org/software/grub/"
|
||||
SRC_URI="mirror://gentoo/${PF}.tar.bz2"
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="-* amd64 x86"
|
||||
IUSE=""
|
||||
DEPEND="!<sys-boot/grub-2"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
# These are already stripped since we use a binpkg.
|
||||
QA_PRESTRIPPED="/sbin/grub /bin/mbchk"
|
||||
|
||||
pkg_setup() {
|
||||
local arch="$(tc-arch)"
|
||||
case ${arch} in
|
||||
amd64)
|
||||
CONFIG_CHECK='~IA32_EMULATION'
|
||||
WARNING_IA32_EMULATION="You will NOT be able to run grub unless you have IA32_EMULATION set!"
|
||||
check_extra_config
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cp -a "${WORKDIR}"/* "${D}"/
|
||||
run_test_grub "${D}"/sbin/grub && einfo "New grub can run on your system, good!"
|
||||
}
|
||||
|
||||
run_test_grub() {
|
||||
local grub="$1"
|
||||
local version="$(${grub} \
|
||||
--read-only --no-pager --no-floppy --no-curses \
|
||||
--no-config-file --batch --version)"
|
||||
local error="grub test-run failed"
|
||||
use amd64 && error="${error} Is IA32_EMULATION set?"
|
||||
[ "${version/${PV}}" != "${version}" ] || die "${error}"
|
||||
return 0
|
||||
}
|
||||
|
||||
#
|
||||
# Below this point, everything is also used in grub-static!
|
||||
# Please keep in sync!
|
||||
#
|
||||
|
||||
setup_boot_dir() {
|
||||
local boot_dir=$1
|
||||
local dir=${boot_dir}
|
||||
|
||||
run_test_grub /sbin/grub
|
||||
|
||||
mkdir -p "${dir}"
|
||||
[[ ! -L ${dir}/boot ]] && ln -s . "${dir}/boot"
|
||||
dir="${dir}/grub"
|
||||
if [[ ! -e ${dir} ]] ; then
|
||||
mkdir "${dir}" || die "${dir} does not exist!"
|
||||
fi
|
||||
|
||||
# change menu.lst to grub.conf
|
||||
if [[ ! -e ${dir}/grub.conf ]] && [[ -e ${dir}/menu.lst ]] ; then
|
||||
mv -f "${dir}"/menu.lst "${dir}"/grub.conf
|
||||
ewarn
|
||||
ewarn "*** IMPORTANT NOTE: menu.lst has been renamed to grub.conf"
|
||||
ewarn
|
||||
fi
|
||||
|
||||
if [[ ! -e ${dir}/menu.lst ]]; then
|
||||
einfo "Linking from new grub.conf name to menu.lst"
|
||||
ln -snf grub.conf "${dir}"/menu.lst
|
||||
fi
|
||||
|
||||
if [[ -e ${dir}/stage2 ]] ; then
|
||||
mv "${dir}"/stage2{,.old}
|
||||
ewarn "*** IMPORTANT NOTE: you must run grub and install"
|
||||
ewarn "the new version's stage1 to your MBR. Until you do,"
|
||||
ewarn "stage1 and stage2 will still be the old version, but"
|
||||
ewarn "later stages will be the new version, which could"
|
||||
ewarn "cause problems such as an unbootable system."
|
||||
ewarn "This means you must use either grub-install or perform"
|
||||
ewarn "root/setup manually! For more help, see the handbook:"
|
||||
ewarn "http://www.gentoo.org/doc/en/handbook/handbook-${ARCH}.xml?part=1&chap=10#grub-install-auto"
|
||||
ebeep
|
||||
fi
|
||||
|
||||
einfo "Copying files from /lib/grub, /usr/lib/grub and /usr/share/grub to ${dir}"
|
||||
for x in \
|
||||
"${ROOT}"/lib*/grub/*/* \
|
||||
"${ROOT}"/usr/lib*/grub/*/* \
|
||||
"${ROOT}"/usr/share/grub/* ; do
|
||||
[[ -f ${x} ]] && cp -p "${x}" "${dir}"/
|
||||
done
|
||||
|
||||
if [[ ! -e ${dir}/grub.conf ]] ; then
|
||||
s="${ROOT}/usr/share/doc/${PF}/grub.conf.gentoo"
|
||||
[[ -e "${s}" ]] && cat "${s}" >${dir}/grub.conf
|
||||
[[ -e "${s}.gz" ]] && zcat "${s}.gz" >${dir}/grub.conf
|
||||
[[ -e "${s}.bz2" ]] && bzcat "${s}.bz2" >${dir}/grub.conf
|
||||
fi
|
||||
|
||||
# Per bug 218599, we support grub.conf.install for users that want to run a
|
||||
# specific set of Grub setup commands rather than the default ones.
|
||||
grub_config=${dir}/grub.conf.install
|
||||
[[ -e ${grub_config} ]] || grub_config=${dir}/grub.conf
|
||||
if [[ -e ${grub_config} ]] ; then
|
||||
local tmp="${TMPDIR}/${P}-setup_boot_dir-$$"
|
||||
egrep \
|
||||
-v '^[[:space:]]*(#|$|default|fallback|initrd|password|splashimage|timeout|title)' \
|
||||
"${grub_config}" >"${tmp}"
|
||||
# Do NOT fail here, only warn.
|
||||
/sbin/grub --batch \
|
||||
--device-map="${dir}"/device.map \
|
||||
>/dev/null <"${tmp}"
|
||||
rc=$?
|
||||
[[ $rc -ne 0 ]] && ewarn "Grub failed to run!"
|
||||
fi
|
||||
|
||||
# the grub default commands silently piss themselves if
|
||||
# the default file does not exist ahead of time
|
||||
if [[ ! -e ${dir}/default ]] ; then
|
||||
# This may fail, don't worry about it.
|
||||
grub-set-default --root-directory="${boot_dir}" default
|
||||
:
|
||||
fi
|
||||
einfo "Grub has been installed to ${boot_dir} successfully."
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
mount-boot_pkg_postinst
|
||||
|
||||
if [[ -n ${DONT_MOUNT_BOOT} ]]; then
|
||||
elog "WARNING: you have DONT_MOUNT_BOOT in effect, so you must apply"
|
||||
elog "the following instructions for your /boot!"
|
||||
elog "Neglecting to do so may cause your system to fail to boot!"
|
||||
elog
|
||||
else
|
||||
setup_boot_dir "${ROOT}"/boot
|
||||
# Trailing output because if this is run from pkg_postinst, it gets mixed into
|
||||
# the other output.
|
||||
einfo ""
|
||||
fi
|
||||
elog "To interactively install grub files to another device such as a USB"
|
||||
elog "stick, just run the following and specify the directory as prompted:"
|
||||
elog " emerge --config =${PF}"
|
||||
elog "Alternately, you can export GRUB_ALT_INSTALLDIR=/path/to/use to tell"
|
||||
elog "grub where to install in a non-interactive way."
|
||||
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
local dir
|
||||
if [ ! -d "${GRUB_ALT_INSTALLDIR}" ]; then
|
||||
einfo "Enter the directory where you want to setup grub:"
|
||||
read dir
|
||||
else
|
||||
dir="${GRUB_ALT_INSTALLDIR}"
|
||||
fi
|
||||
setup_boot_dir "${dir}"
|
||||
}
|
@ -1,76 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub-static/grub-static-0.97.ebuild,v 1.8 2012/07/23 03:49:58 vapier Exp $
|
||||
|
||||
inherit mount-boot
|
||||
|
||||
DESCRIPTION="Static GNU GRUB boot loader"
|
||||
|
||||
HOMEPAGE="http://www.gnu.org/software/grub/"
|
||||
SRC_URI="mirror://gentoo/grub-static-${PV}.tar.bz2"
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="-* amd64 ~x86"
|
||||
IUSE=""
|
||||
DEPEND="!<sys-boot/grub-2"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
src_install() {
|
||||
cp -a "${WORKDIR}"/* "${D}"/
|
||||
}
|
||||
|
||||
#
|
||||
# Everything below is directly copied from the grub ebuild
|
||||
# please try to keep it in sync
|
||||
#
|
||||
|
||||
setup_boot_dir() {
|
||||
local dir="${1}"
|
||||
|
||||
[[ ! -e "${dir}" ]] && die "${dir} does not exist!"
|
||||
[[ ! -e "${dir}"/grub ]] && mkdir "${dir}/grub"
|
||||
|
||||
# change menu.lst to grub.conf
|
||||
if [[ ! -e "${dir}"/grub/grub.conf ]] && [[ -e "${dir}"/grub/menu.lst ]] ; then
|
||||
mv -f "${dir}"/grub/menu.lst "${dir}"/grub/grub.conf
|
||||
ewarn
|
||||
ewarn "*** IMPORTANT NOTE: menu.lst has been renamed to grub.conf"
|
||||
ewarn
|
||||
fi
|
||||
|
||||
if [[ ! -e "${dir}"/grub/menu.lst ]]; then
|
||||
einfo "Linking from new grub.conf name to menu.lst"
|
||||
ln -snf grub.conf "${dir}"/grub/menu.lst
|
||||
fi
|
||||
|
||||
[[ -e "${dir}"/grub/stage2 ]] && mv "${dir}"/grub/stage2{,.old}
|
||||
|
||||
einfo "Copying files from /lib/grub and /usr/lib/grub to ${dir}"
|
||||
for x in /lib*/grub/*/* /usr/lib*/grub/*/* ; do
|
||||
[[ -f "${x}" ]] && cp -p "${x}" "${dir}"/grub/
|
||||
done
|
||||
|
||||
if [[ -e "${dir}"/grub/grub.conf ]] ; then
|
||||
egrep \
|
||||
-v '^[[:space:]]*(#|$|default|fallback|initrd|password|splashimage|timeout|title)' \
|
||||
"${dir}"/grub/grub.conf | \
|
||||
/sbin/grub --batch \
|
||||
--device-map="${dir}"/grub/device.map \
|
||||
> /dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
[[ "${ROOT}" != "/" ]] && return 0
|
||||
[[ -n ${DONT_MOUNT_BOOT} ]] && return 0
|
||||
setup_boot_dir /boot
|
||||
einfo "To install grub files to another device (like a usb stick), just run:"
|
||||
einfo " emerge --config =${PF}"
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
local dir
|
||||
einfo "Enter the directory where you want to setup grub:"
|
||||
read dir
|
||||
setup_boot_dir "${dir}"
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<herd>amd64</herd>
|
||||
</pkgmetadata>
|
File diff suppressed because it is too large
Load Diff
@ -1,29 +0,0 @@
|
||||
-----BEGIN PGP SIGNED MESSAGE-----
|
||||
Hash: SHA256
|
||||
|
||||
AUX grub-2.00-freetype-2.5.1.patch 752 SHA256 95ddb348097df2bdf51a36529935118ad4bb51cb780038d149ed0ae3bf0693c9 SHA512 e9d05de956364b923e01d8f71d77f05d6c0815b7ae21ec5d34875de09770ce42b52f7d410314f7e4a273256350d7cbf311cf95a5d83e469c7a83b9b69879caff WHIRLPOOL 67751eaad605cf064106f2a304657bf1fe1ea1f4bb3f6efe436f2d7e6b84e80b56327e51cff4db63a7f34e7f21a456d3c7517d6ee6da5f8f2cbd7816f34d4016
|
||||
AUX grub.conf.gentoo 627 SHA256 914b15af252210a32776196437cd8013e10e57d5780e66877ef3fe9a2b4b9776 SHA512 5ee586c151b025a153867d2854b73e2e18a6af38e9d65069b7114a55af776803ba947b4901b0806e79fa8f36aeac90daad608b9ec2a4a8526301d1beb36e4ef3 WHIRLPOOL fcaef85cd7c2c446c882874cf4ec8a2241d1fc97720973a0a0cd1add259da599d4dae4d0b429ba2dff0307ed2d4598d5939cbc1b11127a0dedb3a54249ec9f81
|
||||
AUX grub.default-2 1602 SHA256 d1c11fb4decbae9a9827866ec2126b2c11a3d8f6b41278acad139b4dd34338c5 SHA512 15085cdfe706379d931c6841c34403ffcb46765be75425a29b563d69169124447606d8f8444945ed1148ac734da4f12f14a9b18abd6b0501974c1c770ad13c39 WHIRLPOOL 2f72b2a3d4048261cf3d5477b9a33264b3214a803eebcf4b782c33cf71d045e9be878407c64c720c2a7b260a65f8e32a61974c55ebd8d464e0b947133cdf49fd
|
||||
AUX grub.default-3 1872 SHA256 84a7c82094f741fa33b2d883e42baf3157f44d26aba727812fb2f3b1a5f47d44 SHA512 bb49012b985b8f31f19d0598d321b0414f68c12224f78a0565dc190f082f754a78c95cc924bbf65e338e99311dd7f8a53ccca6c9d52583a3ad4b6d6f4fddfd60 WHIRLPOOL d85f7071190a7dcafad6597c68ef93f61b79887fd2d3fb144f16f42fcef85d741b1927f1b201394bfc800ffa1916650cf4caf68f310573ecab69b28e6a56aaf6
|
||||
DIST dejavu-sans-ttf-2.34.zip 406977 SHA256 242e8c1cb2bdc7458bece02cca898f962c2bc919dcf67d97428149228290184d SHA512 dcd802b9c83cfa749b7542d0855eb1facb665a035af8c05f58830fce3ce37ba8d4a6f0353c07ae924c7fc25460d330b7312cbaffd34a2cb314a8e222de385c1b WHIRLPOOL d8b3289997cc39aca1c909ac1cae79727a19932f07b116a4a0bcc83e4a2f136d05d18c8ef2b05504a2f1f65eba85f93d61d52b0c913be7bb3e23f6a403eb6a82
|
||||
DIST grub-0.97-patches-1.14.tar.bz2 52916 SHA256 5c7ca31fd9b2123471daf2e46a1936c4044ad0c12e353d9d3d8c3f83a1c7a0e5 SHA512 d9a8d420fd5a36f181ca608f9b70be90f9d82cee66c8484636fda5085290586071b5d9379d917e8141b993ffc4777859cd02971c916d6167dca6f50d83282c26 WHIRLPOOL 60abd5087e85d9969784b9f5a100934606a76da03b665533d9d4d1d13f4e2d15de233a71e67a32d18a5fbfe128c2c8bf04c0d4451de24e6ca4fbd8dd862e23ea
|
||||
DIST grub-0.97.tar.gz 971783 SHA256 4e1d15d12dbd3e9208111d6b806ad5a9857ca8850c47877d36575b904559260b SHA512 c2bc9ffc8583aeae71cee9ddcc4418969768d4e3764d47307da54f93981c0109fb07d84b061b3a3628bd00ba4d14a54742bc04848110eb3ae8ca25dbfbaabadb WHIRLPOOL 0ad7f5dc035e2a3ad5fd29b6388f06fd12a8cc694117b4cbd42b5302433aa522db23566222d35219fe17fb95edb5090553156198507f70208eda5d858fd52dd5
|
||||
DIST grub-2.00_p5107.tar.xz 5836972 SHA256 92fd8f93621e7083f32ba6ef407f2984e5d3caaafdc35fb3d89ed054ca7c4dac SHA512 a70017dfc837e8fa869af7f71ca6191973f3f44f5a93378100cff5da425aa132b3903a3602ab907ef070872bb7a17f0586c8415845645c596d0621a4929ca83d WHIRLPOOL 5d88806fc849d2ff78ca590312110be4505e2801fee7c68faba39a54a44eedc16eb25dad88f1ff0058dea2e98382944c7e7632ccfa6f4a171ff0ef00cf67fd2d
|
||||
DIST grub-2.02~beta2.tar.xz 5798740 SHA256 f6c702b2a8ea58f27a2b02928bb77973cb5a827af08f63db38c471c0a01b418d SHA512 359903928febce1df53b3bd38aab701b4ea010dfad0dee434e853c865af4bbc60d115e61eac100c79f18d89aa78b2216ef20123f4ef04cc948ecbe226ea1a58c WHIRLPOOL f92e94f43888648484a972a0c82b0a2ac4dc7fbdd6e35ca8b11a6ee92168ac8cf7ee68987b84697ec46ad18189e5c5c9aee8105b91bb131cd7f6f499f45cd58f
|
||||
DIST splash.xpm.gz 33856 SHA256 b95600f777331b0dd31d51c68f60f0e846e4c8b628857a41165f4e6b30e6acaf SHA512 5ae1f786f7d46a95a7061068d5b2b3ad64607c7b190d6f28379508c5dce67e26308325bfd637542a84855dfcf1ea3d143947326fdb189a6a8972208d3ead23da WHIRLPOOL d95b7b588ea8ac7c2c8c53eb8057aef21c825da6411afe3b7e864c606aeffaaebce8ae41ce3e979f277bd6b48a9e82a1f2ea8afc836213b56523d8a854227d7b
|
||||
DIST unifont-5.1.20080820.pcf.gz 1379965 SHA256 122b9c470f29b70223b0e07404a6dfa7f339fcfa6ae74c024f478945af7a9a63 SHA512 8939e2bc82ca97b60e6678f3ff079a2be7ba9b702f2e8ee289e853af5823695f7baafbf14b674fc5e41071f2a6de4f2dadd56bf8b4653849dd756d59622f1649 WHIRLPOOL 0f083d66781cc4c3e554ebeda4e21843fa275ecf3e1908b4873fadfe37b7c88e8346a124656704bb1b29f89afee23d6301b4df0f19e788f454c60d47156fe78d
|
||||
DIST unifont-7.0.01.pcf.gz 1358916 SHA256 7618a96ad50703213848af8ecae816828f528bb8ed179a749f7ca2b86eb15805 SHA512 f985e11729d18cb16d3e46fd1004242aa731a9b03ba16035f5954076686e8cdc39df9087daded5e044ead995b03650d8cf1bba9d060d65b5c3af630dbc9e3260 WHIRLPOOL da682398a22abd4282674d9a79b8fdd53e03054863cc166e43e2640dfb7f11c0b71cd3e42431f2086692f3a4202c2ecae9d6d7126249db0127e2da276aae7c9f
|
||||
EBUILD grub-0.97-r12.ebuild 9233 SHA256 d5486666e1f8339a8308489607c9108cd34e8ebc696a956e2ff8dafad1c71815 SHA512 332a89395331ef04654345f960f2939340ce9b47ae6ac755e54f4ecc85f6243060890e7553b515468aaffd8346bbb5a0b7fbd26d23911b847f12c557854e96f1 WHIRLPOOL 1a20c9df999954ce431ca50eaaa5651721c939229b3a55d820445620218ffa64d43ba6251e88b1df6f54163f6914265596698db513a47d3c415ccaa01b51e61d
|
||||
EBUILD grub-0.97-r13.ebuild 9384 SHA256 c694ab37f477548da2b98c9beb2c5432ddd799e40fcbf82273cd2da3fdb072e1 SHA512 615e4d11ba91c7bc2fcb926bfc791d1aa3151a06dd336f9597ccc5b22a4b6a1bbffde5f7622ec6cc4c04216c63d99becfc9cf38bcf8fed476773bd3b7930fad2 WHIRLPOOL 91d94e1f90393bb5137b791bfa2d73b418938091d81ec44b783d749ea08ee3a615a5ca4d07a841c66429f6ff7d480ae2ad4f0626576ddaab459f111106160761
|
||||
EBUILD grub-2.00_p5107-r2.ebuild 8180 SHA256 1db3f6266e63332ef89d9c32895189fee3307a5ca2f687620df43c5a9d52547a SHA512 f95264d8eff99a1dd8420d64539aef4b7eb464edc8119076af7c175fac418d0e554ee7bb0ae4edb57c3a1a5b82f32da51db6b7ffc4a9a62dc7541d3694b65faa WHIRLPOOL d1dd247120f6de17aaea2899760fd7daf3eb242a3945f6ae2c03eae71c33e3c6bb780639a030d9ba46f4b9b8f23d383fc6559306e40a82be293466ce6d6270a5
|
||||
EBUILD grub-2.02_beta2.ebuild 8187 SHA256 d87dd39f9f59e721a70f3263caf6367a460418c01622a5d38f6e4ab2bcf33d5e SHA512 a36467f0f75280514d7074e7e8fce3193bf8ff59bfef1fa33a5153a029c86f3ce29edfd0e09ff02f6badf363c422530d23b95a5d5ef43ba5fcae8b27916755db WHIRLPOOL d76fee7b4019ac6cd56905185193333e6c382a9cda293a42ec8e356646042a23485c6c5a0332a43cdd69d9760a50e5a868419593dce5dbe4edc037da16b00377
|
||||
EBUILD grub-9999-r1.ebuild 8185 SHA256 708107511c09a6ba441a4c9c2809f3ab3e838e617142d696f8e7c931febfbff7 SHA512 c7e0c34c908e3740cbe74a0f52220eef261fad2724524d0435b1eecf81ca4c606db2a0712a6174d38cd848583578f759ebbeadb33c200e3503a9d0c699d72099 WHIRLPOOL e72e1b245a493b44dfd22210e44af3e32cd0ed1797f3887130d711348381c1244568d7bca4895196e493cf4dd0664d492001aa5c0e9bd8b5e9b44e89b5e7adb1
|
||||
MISC ChangeLog 59191 SHA256 89096f446b5d12072f916fae749b6a29306cc1bf648d8f32dc96c4461877f852 SHA512 97fa02242b7b17c77f00e20aeae045b205f56940a73aa19146753b86e21b55b2c24df80c20a30e27641988ab5fb5451ef6ff401fc5beac764317533b3cf77f1d WHIRLPOOL 88c9d1a8457eb83c8a21c6fa4e56433a5c3473db7e19cef63621beafb2f1e86b4a9c8d0d9770d8d401ef3825c9aa8697eaa1dbb7b04b5f1d493810964918782a
|
||||
MISC metadata.xml 838 SHA256 01beea9f20f03e00fdc21576a1311d3c21874980cdd57a9f2ed08a9d7cda1c46 SHA512 f6266f2f77db089d2f9289be079ef5a3637726b0906c5e96a7d8b7e29a8105cb7c48b9739f5607c0fdac2545db0e87f35132769f82b12db11a6f0018cc3c92f2 WHIRLPOOL 528d4f57ca38b0f0d4c34cd6bd60c7aeefc0fabd1e1e7be8efe0fcba04824d047a6e04288f1fbbd8e865c7435b53e84caffe7d4196809b157ee76e0d2be6f8df
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
Version: GnuPG v2
|
||||
|
||||
iF4EAREIAAYFAlOnGiIACgkQC77qH+pIQ6TFwQEAmbuMcXkJAwY8Wz2HGHy/DpDs
|
||||
BRL78cuU871SPpQL9FQBAJinVEHFfS02306Yj6gFj9BCsq+ZUdJJ2lOSsw33s3AY
|
||||
=LiX1
|
||||
-----END PGP SIGNATURE-----
|
@ -1,24 +0,0 @@
|
||||
commit fd0df6d098b1e6a4f60275c48a3ec88d15ba1fbb
|
||||
Author: Colin Watson <cjwatson@ubuntu.com>
|
||||
Date: Fri Nov 29 12:19:36 2013 +0000
|
||||
|
||||
Fix build with FreeType 2.5.1
|
||||
|
||||
* util/grub-gen-asciih.c: Include FT_SYNTHESIS_H rather than
|
||||
<freetype/ftsynth.h>, fixing build with FreeType 2.5.1.
|
||||
* util/grub-gen-widthspec.c: Likewise.
|
||||
* util/grub-mkfont.c: Likewise.
|
||||
|
||||
diff --git a/util/grub-mkfont.c b/util/grub-mkfont.c
|
||||
index 0d8eb78..242dd01 100644
|
||||
--- a/util/grub-mkfont.c
|
||||
+++ b/util/grub-mkfont.c
|
||||
@@ -43,7 +43,7 @@
|
||||
#include FT_FREETYPE_H
|
||||
#include FT_TRUETYPE_TAGS_H
|
||||
#include FT_TRUETYPE_TABLES_H
|
||||
-#include <freetype/ftsynth.h>
|
||||
+#include FT_SYNTHESIS_H
|
||||
|
||||
#undef __FTERRORS_H__
|
||||
#define FT_ERROR_START_LIST const char *ft_errmsgs[] = {
|
@ -1,16 +0,0 @@
|
||||
# This is a sample grub.conf for use with Genkernel, per the Gentoo handbook
|
||||
# http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=10#doc_chap2
|
||||
# If you are not using Genkernel and you need help creating this file, you
|
||||
# should consult the handbook. Alternatively, consult the grub.conf.sample that
|
||||
# is included with the Grub documentation.
|
||||
|
||||
default 0
|
||||
timeout 30
|
||||
#splashimage=(hd0,0)/boot/grub/splash.xpm.gz
|
||||
|
||||
#title Gentoo Linux 2.6.24-r5
|
||||
#root (hd0,0)
|
||||
#kernel /boot/kernel-genkernel-x86-2.6.24-gentoo-r5 root=/dev/ram0 real_root=/dev/sda3
|
||||
#initrd /boot/initramfs-genkernel-x86-2.6.24-gentoo-r5
|
||||
|
||||
# vim:ft=conf:
|
@ -1,46 +0,0 @@
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/files/grub.default-2,v 1.4 2013/09/21 18:10:55 floppym Exp $
|
||||
#
|
||||
# To populate all changes in this file you need to regenerate your
|
||||
# grub configuration file afterwards:
|
||||
# 'grub2-mkconfig -o /boot/grub/grub.cfg'
|
||||
#
|
||||
# See the grub info page for documentation on possible variables and
|
||||
# their associated values.
|
||||
|
||||
GRUB_DISTRIBUTOR="Gentoo"
|
||||
|
||||
GRUB_DEFAULT=0
|
||||
GRUB_HIDDEN_TIMEOUT=0
|
||||
GRUB_HIDDEN_TIMEOUT_QUIET=true
|
||||
GRUB_TIMEOUT=10
|
||||
|
||||
# Append parameters to the linux kernel command line
|
||||
# GRUB_CMDLINE_LINUX=""
|
||||
|
||||
# Append parameters to the linux kernel command line for non-recovery entries
|
||||
#GRUB_CMDLINE_LINUX_DEFAULT=""
|
||||
|
||||
# Uncomment to disable graphical terminal (grub-pc only)
|
||||
#GRUB_TERMINAL=console
|
||||
|
||||
# The resolution used on graphical terminal.
|
||||
# Note that you can use only modes which your graphic card supports via VBE.
|
||||
# You can see them in real GRUB with the command `vbeinfo'.
|
||||
#GRUB_GFXMODE=640x480
|
||||
|
||||
# Path to theme spec txt file.
|
||||
# The starfield is by default provided with use truetype.
|
||||
# NOTE: when enabling custom theme, ensure you have required font/etc.
|
||||
#GRUB_THEME="/boot/grub/themes/starfield/theme.txt"
|
||||
|
||||
# Background image used on graphical terminal.
|
||||
# Can be in various bitmap formats.
|
||||
#GRUB_BACKGROUND="/boot/grub/mybackground.png"
|
||||
|
||||
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to kernel
|
||||
#GRUB_DISABLE_LINUX_UUID=true
|
||||
|
||||
# Uncomment to disable generation of recovery mode menu entries
|
||||
#GRUB_DISABLE_RECOVERY=true
|
@ -1,56 +0,0 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/files/grub.default-3,v 1.2 2014/02/28 18:07:13 floppym Exp $
|
||||
#
|
||||
# To populate all changes in this file you need to regenerate your
|
||||
# grub configuration file afterwards:
|
||||
# 'grub2-mkconfig -o /boot/grub/grub.cfg'
|
||||
#
|
||||
# See the grub info page for documentation on possible variables and
|
||||
# their associated values.
|
||||
|
||||
GRUB_DISTRIBUTOR="Gentoo"
|
||||
|
||||
# Default menu entry
|
||||
#GRUB_DEFAULT=0
|
||||
|
||||
# Boot the default entry this many seconds after the menu is displayed
|
||||
#GRUB_TIMEOUT=5
|
||||
#GRUB_TIMEOUT_STYLE=menu
|
||||
|
||||
# Append parameters to the linux kernel command line
|
||||
#GRUB_CMDLINE_LINUX=""
|
||||
#
|
||||
# Examples:
|
||||
#
|
||||
# Boot with network interface renaming disabled
|
||||
# GRUB_CMDLINE_LINUX="net.ifnames=0"
|
||||
#
|
||||
# Boot with systemd instead of sysvinit (openrc)
|
||||
# GRUB_CMDLINE_LINUX="init=/usr/lib/systemd/systemd"
|
||||
|
||||
# Append parameters to the linux kernel command line for non-recovery entries
|
||||
#GRUB_CMDLINE_LINUX_DEFAULT=""
|
||||
|
||||
# Uncomment to disable graphical terminal (grub-pc only)
|
||||
#GRUB_TERMINAL=console
|
||||
|
||||
# The resolution used on graphical terminal.
|
||||
# Note that you can use only modes which your graphic card supports via VBE.
|
||||
# You can see them in real GRUB with the command `vbeinfo'.
|
||||
#GRUB_GFXMODE=640x480
|
||||
|
||||
# Path to theme spec txt file.
|
||||
# The starfield is by default provided with use truetype.
|
||||
# NOTE: when enabling custom theme, ensure you have required font/etc.
|
||||
#GRUB_THEME="/boot/grub/themes/starfield/theme.txt"
|
||||
|
||||
# Background image used on graphical terminal.
|
||||
# Can be in various bitmap formats.
|
||||
#GRUB_BACKGROUND="/boot/grub/mybackground.png"
|
||||
|
||||
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to kernel
|
||||
#GRUB_DISABLE_LINUX_UUID=true
|
||||
|
||||
# Uncomment to disable generation of recovery mode menu entries
|
||||
#GRUB_DISABLE_RECOVERY=true
|
@ -1,286 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-0.97-r12.ebuild,v 1.5 2012/08/07 21:00:21 hwoarang Exp $
|
||||
|
||||
# XXX: we need to review menu.lst vs grub.conf handling. We've been converting
|
||||
# all systems to grub.conf (and symlinking menu.lst to grub.conf), but
|
||||
# we never updated any of the source code (it still all wants menu.lst),
|
||||
# and there is no indication that upstream is making the transition.
|
||||
|
||||
# If you need to roll a new grub-static distfile, here is how.
|
||||
# - Robin H. Johnson <robbat2@gentoo.org> - 29 Nov 2010
|
||||
# FEATURES='-noauto -noinfo -nodoc -noman -splitdebug nostrip' \
|
||||
# USE='static -ncurses -netboot -custom-cflags' \
|
||||
# PORTAGE_COMPRESS=true GRUB_STATIC_PACKAGE_BUILDING=1 ebuild \
|
||||
# grub-${PVR}.ebuild clean package && \
|
||||
# qtbz2 -s -j ${PKGDIR}/${CAT}/${PF}.tbz2 && \
|
||||
# mv ${PF}.tar.bz2 ${DISTDIR}/grub-static-${PVR}.tar.bz2
|
||||
|
||||
inherit mount-boot eutils flag-o-matic toolchain-funcs autotools linux-info pax-utils
|
||||
|
||||
PATCHVER="1.14" # Should match the revision ideally
|
||||
DESCRIPTION="GNU GRUB Legacy boot loader"
|
||||
HOMEPAGE="http://www.gnu.org/software/grub/"
|
||||
SRC_URI="mirror://gentoo/${P}.tar.gz
|
||||
mirror://gnu-alpha/${PN}/${P}.tar.gz
|
||||
mirror://gentoo/splash.xpm.gz
|
||||
mirror://gentoo/${P}-patches-${PATCHVER}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 x86 ~x86-fbsd"
|
||||
IUSE="custom-cflags ncurses netboot static"
|
||||
|
||||
RDEPEND="ncurses? (
|
||||
>=sys-libs/ncurses-5.2-r5
|
||||
amd64? ( app-emulation/emul-linux-x86-baselibs )
|
||||
)"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
pkg_setup() {
|
||||
case $(tc-arch) in
|
||||
amd64) CONFIG_CHECK='~IA32_EMULATION' check_extra_config ;;
|
||||
esac
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
cd "${S}"
|
||||
|
||||
# Grub will not handle a kernel larger than EXTENDED_MEMSIZE Mb as
|
||||
# discovered in bug 160801. We can change this, however, using larger values
|
||||
# for this variable means that Grub needs more memory to run and boot. For a
|
||||
# kernel of size N, Grub needs (N+1)*2. Advanced users should set a custom
|
||||
# value in make.conf, it is possible to make kernels ~16Mb in size, but it
|
||||
# needs the kitchen sink built-in.
|
||||
local t="custom"
|
||||
if [[ -z ${GRUB_MAX_KERNEL_SIZE} ]] ; then
|
||||
case $(tc-arch) in
|
||||
amd64) GRUB_MAX_KERNEL_SIZE=9 ;;
|
||||
x86) GRUB_MAX_KERNEL_SIZE=5 ;;
|
||||
esac
|
||||
t="default"
|
||||
fi
|
||||
einfo "Grub will support the ${t} maximum kernel size of ${GRUB_MAX_KERNEL_SIZE} Mb (GRUB_MAX_KERNEL_SIZE)"
|
||||
|
||||
sed -i \
|
||||
-e "/^#define.*EXTENDED_MEMSIZE/s,3,${GRUB_MAX_KERNEL_SIZE},g" \
|
||||
"${S}"/grub/asmstub.c \
|
||||
|| die
|
||||
|
||||
if [[ -n ${PATCHVER} ]] ; then
|
||||
EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
|
||||
eautoreconf
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
filter-flags -fPIE #168834
|
||||
|
||||
use amd64 && multilib_toolchain_setup x86
|
||||
|
||||
unset BLOCK_SIZE #73499
|
||||
|
||||
### i686-specific code in the boot loader is a bad idea; disabling to ensure
|
||||
### at least some compatibility if the hard drive is moved to an older or
|
||||
### incompatible system.
|
||||
|
||||
# grub-0.95 added -fno-stack-protector detection, to disable ssp for stage2,
|
||||
# but the objcopy's (faulty) test fails if -fstack-protector is default.
|
||||
# create a cache telling configure that objcopy is ok, and add -C to econf
|
||||
# to make use of the cache.
|
||||
#
|
||||
# CFLAGS has to be undefined running econf, else -fno-stack-protector detection fails.
|
||||
# STAGE2_CFLAGS is not allowed to be used on emake command-line, it overwrites
|
||||
# -fno-stack-protector detected by configure, removed from netboot's emake.
|
||||
use custom-cflags || unset CFLAGS
|
||||
|
||||
export grub_cv_prog_objcopy_absolute=yes #79734
|
||||
use static && append-ldflags -static
|
||||
|
||||
# Per bug 216625, the emul packages do not provide .a libs for performing
|
||||
# suitable static linking
|
||||
if use amd64 && use static ; then
|
||||
if [ -z "${GRUB_STATIC_PACKAGE_BUILDING}" ]; then
|
||||
die "You must use the grub-static package if you want a static Grub on amd64!"
|
||||
else
|
||||
eerror "You have set GRUB_STATIC_PACKAGE_BUILDING. This"
|
||||
eerror "is specifically intended for building the tarballs for the"
|
||||
eerror "grub-static package via USE='static -ncurses'."
|
||||
eerror "All bets are now off."
|
||||
ebeep 10
|
||||
fi
|
||||
fi
|
||||
|
||||
# build the net-bootable grub first, but only if "netboot" is set
|
||||
if use netboot ; then
|
||||
econf \
|
||||
--libdir=/lib \
|
||||
--datadir=/usr/lib/grub \
|
||||
--exec-prefix=/ \
|
||||
--disable-auto-linux-mem-opt \
|
||||
--enable-diskless \
|
||||
--enable-{3c{5{03,07,09,29,95},90x},cs89x0,davicom,depca,eepro{,100}} \
|
||||
--enable-{epic100,exos205,ni5210,lance,ne2100,ni{50,65}10,natsemi} \
|
||||
--enable-{ne,ns8390,wd,otulip,rtl8139,sis900,sk-g16,smc9000,tiara} \
|
||||
--enable-{tulip,via-rhine,w89c840}
|
||||
|
||||
emake w89c840_o_CFLAGS="-O" || die
|
||||
|
||||
mv -f stage2/{nbgrub,pxegrub} "${S}"/
|
||||
mv -f stage2/stage2 stage2/stage2.netboot
|
||||
|
||||
emake -j1 clean || die
|
||||
fi
|
||||
|
||||
# Now build the regular grub
|
||||
# Note that FFS and UFS2 support are broken for now - stage1_5 files too big
|
||||
econf \
|
||||
--libdir=/lib \
|
||||
--datadir=/usr/lib/grub \
|
||||
--exec-prefix=/ \
|
||||
--disable-auto-linux-mem-opt \
|
||||
$(use_with ncurses curses)
|
||||
|
||||
# sanity check due to common failure
|
||||
use ncurses && ! grep -qs "HAVE_LIBCURSES.*1" config.h && die "USE=ncurses but curses not found"
|
||||
|
||||
emake || die "making regular stuff"
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# non-default block size also give false pass/fails.
|
||||
unset BLOCK_SIZE
|
||||
emake -j1 check || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install || die
|
||||
if use netboot ; then
|
||||
exeinto /usr/lib/grub/${CHOST}
|
||||
doexe nbgrub pxegrub stage2/stage2.netboot || die
|
||||
fi
|
||||
|
||||
# bug 330745
|
||||
pax-mark -m "${D}"/sbin/grub
|
||||
|
||||
dodoc AUTHORS BUGS ChangeLog NEWS README THANKS TODO
|
||||
newdoc docs/menu.lst grub.conf.sample
|
||||
dodoc "${FILESDIR}"/grub.conf.gentoo
|
||||
prepalldocs
|
||||
|
||||
[ -n "${GRUB_STATIC_PACKAGE_BUILDING}" ] && \
|
||||
mv \
|
||||
"${D}"/usr/share/doc/${PF} \
|
||||
"${D}"/usr/share/doc/grub-static-${PF/grub-}
|
||||
|
||||
insinto /usr/share/grub
|
||||
doins "${DISTDIR}"/splash.xpm.gz
|
||||
}
|
||||
|
||||
setup_boot_dir() {
|
||||
local boot_dir=$1
|
||||
local dir=${boot_dir}
|
||||
|
||||
mkdir -p "${dir}"
|
||||
[[ ! -L ${dir}/boot ]] && ln -s . "${dir}/boot"
|
||||
dir="${dir}/grub"
|
||||
if [[ ! -e ${dir} ]] ; then
|
||||
mkdir "${dir}" || die
|
||||
fi
|
||||
|
||||
# change menu.lst to grub.conf
|
||||
if [[ ! -e ${dir}/grub.conf ]] && [[ -e ${dir}/menu.lst ]] ; then
|
||||
mv -f "${dir}"/menu.lst "${dir}"/grub.conf
|
||||
ewarn
|
||||
ewarn "*** IMPORTANT NOTE: menu.lst has been renamed to grub.conf"
|
||||
ewarn
|
||||
fi
|
||||
|
||||
if [[ ! -e ${dir}/menu.lst ]]; then
|
||||
einfo "Linking from new grub.conf name to menu.lst"
|
||||
ln -snf grub.conf "${dir}"/menu.lst
|
||||
fi
|
||||
|
||||
if [[ -e ${dir}/stage2 ]] ; then
|
||||
mv "${dir}"/stage2{,.old}
|
||||
ewarn "*** IMPORTANT NOTE: you must run grub and install"
|
||||
ewarn "the new version's stage1 to your MBR. Until you do,"
|
||||
ewarn "stage1 and stage2 will still be the old version, but"
|
||||
ewarn "later stages will be the new version, which could"
|
||||
ewarn "cause problems such as an unbootable system."
|
||||
ewarn "This means you must use either grub-install or perform"
|
||||
ewarn "root/setup manually! For more help, see the handbook:"
|
||||
ewarn "http://www.gentoo.org/doc/en/handbook/handbook-${ARCH}.xml?part=1&chap=10#grub-install-auto"
|
||||
ebeep
|
||||
fi
|
||||
|
||||
einfo "Copying files from /lib/grub and /usr/share/grub to ${dir}"
|
||||
for x in \
|
||||
"${ROOT}"/lib*/grub/*/* \
|
||||
"${ROOT}"/usr/share/grub/* ; do
|
||||
[[ -f ${x} ]] && cp -p "${x}" "${dir}"/
|
||||
done
|
||||
|
||||
if [[ ! -e ${dir}/grub.conf ]] ; then
|
||||
s="${ROOT}/usr/share/doc/${PF}/grub.conf.gentoo"
|
||||
[[ -e "${s}" ]] && cat "${s}" >${dir}/grub.conf
|
||||
[[ -e "${s}.gz" ]] && zcat "${s}.gz" >${dir}/grub.conf
|
||||
[[ -e "${s}.bz2" ]] && bzcat "${s}.bz2" >${dir}/grub.conf
|
||||
fi
|
||||
|
||||
# Per bug 218599, we support grub.conf.install for users that want to run a
|
||||
# specific set of Grub setup commands rather than the default ones.
|
||||
grub_config=${dir}/grub.conf.install
|
||||
[[ -e ${grub_config} ]] || grub_config=${dir}/grub.conf
|
||||
if [[ -e ${grub_config} ]] ; then
|
||||
egrep \
|
||||
-v '^[[:space:]]*(#|$|default|fallback|initrd|password|splashimage|timeout|title)' \
|
||||
"${grub_config}" | \
|
||||
/sbin/grub --batch \
|
||||
--device-map="${dir}"/device.map \
|
||||
> /dev/null
|
||||
fi
|
||||
|
||||
# the grub default commands silently piss themselves if
|
||||
# the default file does not exist ahead of time
|
||||
if [[ ! -e ${dir}/default ]] ; then
|
||||
grub-set-default --root-directory="${boot_dir}" default
|
||||
fi
|
||||
einfo "Grub has been installed to ${boot_dir} successfully."
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
mount-boot_mount_boot_partition
|
||||
|
||||
if [[ -n ${DONT_MOUNT_BOOT} ]]; then
|
||||
elog "WARNING: you have DONT_MOUNT_BOOT in effect, so you must apply"
|
||||
elog "the following instructions for your /boot!"
|
||||
elog "Neglecting to do so may cause your system to fail to boot!"
|
||||
elog
|
||||
else
|
||||
setup_boot_dir "${ROOT}"/boot
|
||||
# Trailing output because if this is run from pkg_postinst, it gets mixed into
|
||||
# the other output.
|
||||
einfo ""
|
||||
fi
|
||||
elog "To interactively install grub files to another device such as a USB"
|
||||
elog "stick, just run the following and specify the directory as prompted:"
|
||||
elog " emerge --config =${PF}"
|
||||
elog "Alternately, you can export GRUB_ALT_INSTALLDIR=/path/to/use to tell"
|
||||
elog "grub where to install in a non-interactive way."
|
||||
|
||||
# needs to be after we call setup_boot_dir
|
||||
mount-boot_pkg_postinst
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
local dir
|
||||
if [ ! -d "${GRUB_ALT_INSTALLDIR}" ]; then
|
||||
einfo "Enter the directory where you want to setup grub:"
|
||||
read dir
|
||||
else
|
||||
dir="${GRUB_ALT_INSTALLDIR}"
|
||||
fi
|
||||
setup_boot_dir "${dir}"
|
||||
}
|
@ -1,292 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-0.97-r13.ebuild,v 1.3 2012/07/24 15:49:35 vapier Exp $
|
||||
|
||||
# XXX: we need to review menu.lst vs grub.conf handling. We've been converting
|
||||
# all systems to grub.conf (and symlinking menu.lst to grub.conf), but
|
||||
# we never updated any of the source code (it still all wants menu.lst),
|
||||
# and there is no indication that upstream is making the transition.
|
||||
|
||||
# If you need to roll a new grub-static distfile, here is how.
|
||||
# - Robin H. Johnson <robbat2@gentoo.org> - 29 Nov 2010
|
||||
# FEATURES='-noauto -noinfo -nodoc -noman -splitdebug nostrip' \
|
||||
# USE='static -ncurses -netboot -custom-cflags' \
|
||||
# PORTAGE_COMPRESS=true GRUB_STATIC_PACKAGE_BUILDING=1 ebuild \
|
||||
# grub-${PVR}.ebuild clean package && \
|
||||
# qtbz2 -s -j ${PKGDIR}/${CAT}/${PF}.tbz2 && \
|
||||
# mv ${PF}.tar.bz2 ${DISTDIR}/grub-static-${PVR}.tar.bz2
|
||||
|
||||
EAPI="4"
|
||||
|
||||
inherit eutils mount-boot toolchain-funcs linux-info flag-o-matic autotools pax-utils multiprocessing
|
||||
|
||||
PATCHVER="1.14" # Should match the revision ideally
|
||||
DESCRIPTION="GNU GRUB Legacy boot loader"
|
||||
HOMEPAGE="http://www.gnu.org/software/grub/"
|
||||
SRC_URI="mirror://gentoo/${P}.tar.gz
|
||||
mirror://gnu-alpha/${PN}/${P}.tar.gz
|
||||
mirror://gentoo/splash.xpm.gz
|
||||
mirror://gentoo/${P}-patches-${PATCHVER}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86 ~x86-fbsd"
|
||||
IUSE="custom-cflags ncurses netboot static"
|
||||
|
||||
LIB_DEPEND="ncurses? (
|
||||
>=sys-libs/ncurses-5.2-r5[static-libs(+)]
|
||||
amd64? ( app-emulation/emul-linux-x86-baselibs )
|
||||
)"
|
||||
RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
|
||||
DEPEND="${RDEPEND}
|
||||
static? ( ${LIB_DEPEND} )"
|
||||
|
||||
pkg_setup() {
|
||||
case $(tc-arch) in
|
||||
amd64) CONFIG_CHECK='~IA32_EMULATION' check_extra_config ;;
|
||||
esac
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Grub will not handle a kernel larger than EXTENDED_MEMSIZE Mb as
|
||||
# discovered in bug 160801. We can change this, however, using larger values
|
||||
# for this variable means that Grub needs more memory to run and boot. For a
|
||||
# kernel of size N, Grub needs (N+1)*2. Advanced users should set a custom
|
||||
# value in make.conf, it is possible to make kernels ~16Mb in size, but it
|
||||
# needs the kitchen sink built-in.
|
||||
local t="custom"
|
||||
if [[ -z ${GRUB_MAX_KERNEL_SIZE} ]] ; then
|
||||
case $(tc-arch) in
|
||||
amd64) GRUB_MAX_KERNEL_SIZE=9 ;;
|
||||
x86) GRUB_MAX_KERNEL_SIZE=5 ;;
|
||||
esac
|
||||
t="default"
|
||||
fi
|
||||
einfo "Grub will support the ${t} maximum kernel size of ${GRUB_MAX_KERNEL_SIZE} Mb (GRUB_MAX_KERNEL_SIZE)"
|
||||
|
||||
sed -i \
|
||||
-e "/^#define.*EXTENDED_MEMSIZE/s,3,${GRUB_MAX_KERNEL_SIZE},g" \
|
||||
"${S}"/grub/asmstub.c \
|
||||
|| die
|
||||
|
||||
if [[ -n ${PATCHVER} ]] ; then
|
||||
EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
|
||||
eautoreconf
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
filter-flags -fPIE #168834
|
||||
|
||||
use amd64 && multilib_toolchain_setup x86
|
||||
|
||||
unset BLOCK_SIZE #73499
|
||||
|
||||
### i686-specific code in the boot loader is a bad idea; disabling to ensure
|
||||
### at least some compatibility if the hard drive is moved to an older or
|
||||
### incompatible system.
|
||||
|
||||
# grub-0.95 added -fno-stack-protector detection, to disable ssp for stage2,
|
||||
# but the objcopy's (faulty) test fails if -fstack-protector is default.
|
||||
# create a cache telling configure that objcopy is ok, and add -C to econf
|
||||
# to make use of the cache.
|
||||
#
|
||||
# CFLAGS has to be undefined running econf, else -fno-stack-protector detection fails.
|
||||
# STAGE2_CFLAGS is not allowed to be used on emake command-line, it overwrites
|
||||
# -fno-stack-protector detected by configure, removed from netboot's emake.
|
||||
use custom-cflags || unset CFLAGS
|
||||
|
||||
export grub_cv_prog_objcopy_absolute=yes #79734
|
||||
use static && append-ldflags -static
|
||||
|
||||
# Per bug 216625, the emul packages do not provide .a libs for performing
|
||||
# suitable static linking
|
||||
if use amd64 && use static ; then
|
||||
if [[ -z ${GRUB_STATIC_PACKAGE_BUILDING} ]] ; then
|
||||
die "You must use the grub-static package if you want a static Grub on amd64!"
|
||||
else
|
||||
eerror "You have set GRUB_STATIC_PACKAGE_BUILDING. This"
|
||||
eerror "is specifically intended for building the tarballs for the"
|
||||
eerror "grub-static package via USE='static -ncurses'."
|
||||
eerror "All bets are now off."
|
||||
fi
|
||||
fi
|
||||
|
||||
multijob_init
|
||||
|
||||
# build the net-bootable grub first, but only if "netboot" is set
|
||||
if use netboot ; then
|
||||
(
|
||||
multijob_child_init
|
||||
mkdir -p "${WORKDIR}"/netboot
|
||||
pushd "${WORKDIR}"/netboot >/dev/null
|
||||
ECONF_SOURCE=${S} \
|
||||
econf \
|
||||
--libdir=/lib \
|
||||
--datadir=/usr/lib/grub \
|
||||
--exec-prefix=/ \
|
||||
--disable-auto-linux-mem-opt \
|
||||
--enable-diskless \
|
||||
--enable-{3c{5{03,07,09,29,95},90x},cs89x0,davicom,depca,eepro{,100}} \
|
||||
--enable-{epic100,exos205,ni5210,lance,ne2100,ni{50,65}10,natsemi} \
|
||||
--enable-{ne,ns8390,wd,otulip,rtl8139,sis900,sk-g16,smc9000,tiara} \
|
||||
--enable-{tulip,via-rhine,w89c840}
|
||||
popd >/dev/null
|
||||
) &
|
||||
multijob_post_fork
|
||||
fi
|
||||
|
||||
# Now build the regular grub
|
||||
# Note that FFS and UFS2 support are broken for now - stage1_5 files too big
|
||||
econf \
|
||||
--libdir=/lib \
|
||||
--datadir=/usr/lib/grub \
|
||||
--exec-prefix=/ \
|
||||
--disable-auto-linux-mem-opt \
|
||||
$(use_with ncurses curses)
|
||||
|
||||
# sanity check due to common failure
|
||||
use ncurses && ! grep -qs "HAVE_LIBCURSES.*1" config.h && die "USE=ncurses but curses not found"
|
||||
|
||||
multijob_finish
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
use netboot && emake -C "${WORKDIR}"/netboot w89c840_o_CFLAGS="-O"
|
||||
emake
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# non-default block size also give false pass/fails.
|
||||
unset BLOCK_SIZE
|
||||
emake -j1 check
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
if use netboot ; then
|
||||
exeinto /usr/lib/grub/${CHOST}
|
||||
doexe "${WORKDIR}"/netboot/stage2/{nbgrub,pxegrub}
|
||||
newexe "${WORKDIR}"/netboot/stage2/stage2 stage2.netboot
|
||||
fi
|
||||
|
||||
pax-mark -m "${D}"/sbin/grub #330745
|
||||
|
||||
newdoc docs/menu.lst grub.conf.sample
|
||||
dodoc "${FILESDIR}"/grub.conf.gentoo
|
||||
|
||||
[[ -n ${GRUB_STATIC_PACKAGE_BUILDING} ]] && \
|
||||
mv "${D}"/usr/share/doc/{${PF},grub-static-${PF/grub-}}
|
||||
|
||||
insinto /usr/share/grub
|
||||
doins "${DISTDIR}"/splash.xpm.gz
|
||||
}
|
||||
|
||||
setup_boot_dir() {
|
||||
local boot_dir=$1
|
||||
local dir=${boot_dir}
|
||||
|
||||
mkdir -p "${dir}"
|
||||
[[ ! -L ${dir}/boot ]] && ln -s . "${dir}/boot"
|
||||
dir="${dir}/grub"
|
||||
if [[ ! -e ${dir} ]] ; then
|
||||
mkdir "${dir}" || die
|
||||
fi
|
||||
|
||||
# change menu.lst to grub.conf
|
||||
if [[ ! -e ${dir}/grub.conf ]] && [[ -e ${dir}/menu.lst ]] ; then
|
||||
mv -f "${dir}"/menu.lst "${dir}"/grub.conf
|
||||
ewarn "*** IMPORTANT NOTE: menu.lst has been renamed to grub.conf"
|
||||
echo
|
||||
fi
|
||||
|
||||
if [[ ! -e ${dir}/menu.lst ]]; then
|
||||
einfo "Linking from new grub.conf name to menu.lst"
|
||||
ln -snf grub.conf "${dir}"/menu.lst
|
||||
fi
|
||||
|
||||
if [[ -e ${dir}/stage2 ]] ; then
|
||||
mv "${dir}"/stage2{,.old}
|
||||
ewarn "*** IMPORTANT NOTE: you must run grub and install"
|
||||
ewarn "the new version's stage1 to your MBR. Until you do,"
|
||||
ewarn "stage1 and stage2 will still be the old version, but"
|
||||
ewarn "later stages will be the new version, which could"
|
||||
ewarn "cause problems such as an unbootable system."
|
||||
ewarn
|
||||
ewarn "This means you must use either grub-install or perform"
|
||||
ewarn "root/setup manually."
|
||||
ewarn
|
||||
ewarn "For more help, see the handbook:"
|
||||
ewarn "http://www.gentoo.org/doc/en/handbook/handbook-${ARCH}.xml?part=1&chap=10#grub-install-auto"
|
||||
echo
|
||||
fi
|
||||
|
||||
einfo "Copying files from /lib/grub and /usr/share/grub to ${dir}"
|
||||
for x in \
|
||||
"${ROOT}"/lib*/grub/*/* \
|
||||
"${ROOT}"/usr/share/grub/* ; do
|
||||
[[ -f ${x} ]] && cp -p "${x}" "${dir}"/
|
||||
done
|
||||
|
||||
if [[ ! -e ${dir}/grub.conf ]] ; then
|
||||
s="${ROOT}/usr/share/doc/${PF}/grub.conf.gentoo"
|
||||
[[ -e "${s}" ]] && cat "${s}" >${dir}/grub.conf
|
||||
[[ -e "${s}.gz" ]] && zcat "${s}.gz" >${dir}/grub.conf
|
||||
[[ -e "${s}.bz2" ]] && bzcat "${s}.bz2" >${dir}/grub.conf
|
||||
fi
|
||||
|
||||
# Per bug 218599, we support grub.conf.install for users that want to run a
|
||||
# specific set of Grub setup commands rather than the default ones.
|
||||
grub_config=${dir}/grub.conf.install
|
||||
[[ -e ${grub_config} ]] || grub_config=${dir}/grub.conf
|
||||
if [[ -e ${grub_config} ]] ; then
|
||||
egrep \
|
||||
-v '^[[:space:]]*(#|$|default|fallback|initrd|password|splashimage|timeout|title)' \
|
||||
"${grub_config}" | \
|
||||
/sbin/grub --batch \
|
||||
--device-map="${dir}"/device.map \
|
||||
> /dev/null
|
||||
fi
|
||||
|
||||
# the grub default commands silently piss themselves if
|
||||
# the default file does not exist ahead of time
|
||||
if [[ ! -e ${dir}/default ]] ; then
|
||||
grub-set-default --root-directory="${boot_dir}" default
|
||||
fi
|
||||
einfo "Grub has been installed to ${boot_dir} successfully."
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
mount-boot_mount_boot_partition
|
||||
|
||||
if [[ -n ${DONT_MOUNT_BOOT} ]]; then
|
||||
elog "WARNING: you have DONT_MOUNT_BOOT in effect, so you must apply"
|
||||
elog "the following instructions for your /boot!"
|
||||
elog "Neglecting to do so may cause your system to fail to boot!"
|
||||
elog
|
||||
else
|
||||
setup_boot_dir "${ROOT}"/boot
|
||||
# Trailing output because if this is run from pkg_postinst, it gets mixed into
|
||||
# the other output.
|
||||
einfo ""
|
||||
fi
|
||||
elog "To interactively install grub files to another device such as a USB"
|
||||
elog "stick, just run the following and specify the directory as prompted:"
|
||||
elog " emerge --config =${PF}"
|
||||
elog "Alternately, you can export GRUB_ALT_INSTALLDIR=/path/to/use to tell"
|
||||
elog "grub where to install in a non-interactive way."
|
||||
|
||||
# needs to be after we call setup_boot_dir
|
||||
mount-boot_pkg_postinst
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
local dir
|
||||
if [ ! -d "${GRUB_ALT_INSTALLDIR}" ]; then
|
||||
einfo "Enter the directory where you want to setup grub:"
|
||||
read dir
|
||||
else
|
||||
dir="${GRUB_ALT_INSTALLDIR}"
|
||||
fi
|
||||
setup_boot_dir "${dir}"
|
||||
}
|
@ -1,318 +0,0 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-2.00_p5107-r2.ebuild,v 1.8 2014/03/15 03:31:16 floppym Exp $
|
||||
|
||||
EAPI=5
|
||||
|
||||
if [[ ${PV} == 9999 ]]; then
|
||||
AUTOTOOLS_AUTORECONF=1
|
||||
GRUB_AUTOGEN=1
|
||||
fi
|
||||
|
||||
inherit autotools-utils bash-completion-r1 eutils flag-o-matic mount-boot multibuild pax-utils toolchain-funcs versionator
|
||||
|
||||
if [[ ${PV} != 9999 ]]; then
|
||||
if [[ ${PV} == *_alpha* || ${PV} == *_beta* || ${PV} == *_rc* ]]; then
|
||||
# The quote style is to work with <=bash-4.2 and >=bash-4.3 #503860
|
||||
MY_P=${P/_/'~'}
|
||||
SRC_URI="mirror://gnu-alpha/${PN}/${MY_P}.tar.xz"
|
||||
S=${WORKDIR}/${MY_P}
|
||||
else
|
||||
SRC_URI="mirror://gnu/${PN}/${P}.tar.xz
|
||||
mirror://gentoo/${P}.tar.xz
|
||||
http://dev.gentoo.org/~floppym/dist/${P}.tar.xz"
|
||||
S=${WORKDIR}/${P%_*}
|
||||
fi
|
||||
KEYWORDS="amd64 x86"
|
||||
PATCHES=(
|
||||
"${FILESDIR}/grub-2.00-freetype-2.5.1.patch"
|
||||
)
|
||||
else
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="git://git.sv.gnu.org/grub.git
|
||||
http://git.savannah.gnu.org/r/grub.git"
|
||||
fi
|
||||
|
||||
DEJAVU=dejavu-sans-ttf-2.34
|
||||
UNIFONT=unifont-5.1.20080820.pcf
|
||||
SRC_URI+=" truetype? (
|
||||
mirror://sourceforge/dejavu/${DEJAVU}.zip
|
||||
http://unifoundry.com/${UNIFONT}.gz
|
||||
)"
|
||||
|
||||
DESCRIPTION="GNU GRUB boot loader"
|
||||
HOMEPAGE="http://www.gnu.org/software/grub/"
|
||||
|
||||
# Includes licenses for dejavu and unifont
|
||||
LICENSE="GPL-3 truetype? ( BitstreamVera GPL-2-with-font-exception )"
|
||||
SLOT="2"
|
||||
IUSE="custom-cflags debug device-mapper doc efiemu mount +multislot nls static sdl test truetype libzfs"
|
||||
|
||||
GRUB_ALL_PLATFORMS=(
|
||||
# everywhere:
|
||||
emu
|
||||
# mips only:
|
||||
qemu-mips yeeloong
|
||||
# amd64, x86, ppc, ppc64:
|
||||
ieee1275
|
||||
# amd64, x86:
|
||||
coreboot multiboot efi-32 pc qemu
|
||||
# amd64, ia64:
|
||||
efi-64
|
||||
)
|
||||
IUSE+=" ${GRUB_ALL_PLATFORMS[@]/#/grub_platforms_}"
|
||||
|
||||
REQUIRED_USE="grub_platforms_qemu? ( truetype )
|
||||
grub_platforms_yeeloong? ( truetype )"
|
||||
|
||||
# os-prober: Used on runtime to detect other OSes
|
||||
# xorriso (dev-libs/libisoburn): Used on runtime for mkrescue
|
||||
RDEPEND="
|
||||
app-arch/xz-utils
|
||||
>=sys-libs/ncurses-5.2-r5
|
||||
debug? (
|
||||
sdl? ( media-libs/libsdl )
|
||||
)
|
||||
device-mapper? ( >=sys-fs/lvm2-2.02.45 )
|
||||
libzfs? ( sys-fs/zfs )
|
||||
mount? ( sys-fs/fuse )
|
||||
truetype? ( media-libs/freetype )
|
||||
ppc? ( sys-apps/ibm-powerpc-utils sys-apps/powerpc-utils )
|
||||
ppc64? ( sys-apps/ibm-powerpc-utils sys-apps/powerpc-utils )
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
app-misc/pax-utils
|
||||
>=dev-lang/python-2.5.2
|
||||
sys-devel/flex
|
||||
sys-devel/bison
|
||||
sys-apps/help2man
|
||||
sys-apps/texinfo
|
||||
static? (
|
||||
app-arch/xz-utils[static-libs(+)]
|
||||
truetype? (
|
||||
app-arch/bzip2[static-libs(+)]
|
||||
media-libs/freetype[static-libs(+)]
|
||||
sys-libs/zlib[static-libs(+)]
|
||||
)
|
||||
)
|
||||
test? (
|
||||
dev-libs/libisoburn
|
||||
app-emulation/qemu
|
||||
)
|
||||
truetype? ( app-arch/unzip )
|
||||
"
|
||||
RDEPEND+="
|
||||
kernel_linux? (
|
||||
grub_platforms_efi-32? ( sys-boot/efibootmgr )
|
||||
grub_platforms_efi-64? ( sys-boot/efibootmgr )
|
||||
)
|
||||
!multislot? ( !sys-boot/grub:0 )
|
||||
nls? ( sys-devel/gettext )
|
||||
"
|
||||
|
||||
if [[ -n ${GRUB_AUTOGEN} ]]; then
|
||||
DEPEND+=" >=sys-devel/autogen-5.10"
|
||||
fi
|
||||
|
||||
STRIP_MASK="*/grub/*/*.{mod,img}"
|
||||
RESTRICT="test"
|
||||
|
||||
QA_EXECSTACK="
|
||||
usr/bin/grub*
|
||||
usr/sbin/grub*
|
||||
usr/lib*/grub/*/*.mod
|
||||
usr/lib*/grub/*/*.module
|
||||
usr/lib*/grub/*/kernel.exec
|
||||
usr/lib*/grub/*/kernel.img
|
||||
"
|
||||
|
||||
QA_WX_LOAD="
|
||||
usr/lib*/grub/*/kernel.exec
|
||||
usr/lib*/grub/*/kernel.img
|
||||
usr/lib*/grub/*/*.image
|
||||
"
|
||||
|
||||
QA_PRESTRIPPED="
|
||||
usr/lib.*/grub/.*/kernel.img
|
||||
"
|
||||
|
||||
pkg_pretend() {
|
||||
if [[ ${MERGE_TYPE} != binary ]]; then
|
||||
# Bug 439082
|
||||
if ! version_is_at_least 4.8 "$(gcc-version)" &&
|
||||
$(tc-getLD) --version | grep -q "GNU gold"; then
|
||||
eerror "GRUB does not function correctly when built with the gold linker."
|
||||
eerror "Please select the bfd linker with binutils-config."
|
||||
die "GNU gold detected"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
if [[ ${PV} == 9999 ]]; then
|
||||
git-r3_src_unpack
|
||||
fi
|
||||
default_src_unpack
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
[[ ${PATCHES} ]] && epatch "${PATCHES[@]}"
|
||||
sed -i -e /autoreconf/d autogen.sh || die
|
||||
if use multislot; then
|
||||
# fix texinfo file name, bug 416035
|
||||
sed -i -e 's/^\* GRUB:/* GRUB2:/' -e 's/(grub)/(grub2)/' docs/grub.texi || die
|
||||
fi
|
||||
epatch_user
|
||||
if [[ -n ${GRUB_AUTOGEN} ]]; then
|
||||
bash autogen.sh || die
|
||||
fi
|
||||
if [[ -n ${AUTOTOOLS_AUTORECONF} ]]; then
|
||||
autopoint() { return 0; }
|
||||
eautoreconf
|
||||
fi
|
||||
}
|
||||
|
||||
setup_fonts() {
|
||||
ln -s "${WORKDIR}/${DEJAVU}/ttf/DejaVuSans.ttf" DejaVuSans.ttf || die
|
||||
ln -s "${WORKDIR}/${UNIFONT}" unifont.pcf || die
|
||||
}
|
||||
|
||||
grub_configure() {
|
||||
local platform
|
||||
|
||||
case ${MULTIBUILD_VARIANT} in
|
||||
efi-32)
|
||||
platform=efi
|
||||
if [[ ${CTARGET:-${CHOST}} == x86_64* ]]; then
|
||||
local CTARGET=${CTARGET:-i386}
|
||||
fi ;;
|
||||
efi-64)
|
||||
platform=efi
|
||||
if [[ ${CTARGET:-${CHOST}} == i?86* ]]; then
|
||||
local CTARGET=${CTARGET:-x86_64}
|
||||
local TARGET_CFLAGS="-Os -march=x86-64 ${TARGET_CFLAGS}"
|
||||
local TARGET_CPPFLAGS="-march=x86-64 ${TARGET_CPPFLAGS}"
|
||||
export TARGET_CFLAGS TARGET_CPPFLAGS
|
||||
fi ;;
|
||||
guessed) ;;
|
||||
*) platform=${MULTIBUILD_VARIANT} ;;
|
||||
esac
|
||||
|
||||
local myeconfargs=(
|
||||
--disable-werror
|
||||
--program-prefix=
|
||||
--libdir="${EPREFIX}"/usr/lib
|
||||
--htmldir="${EPREFIX}"/usr/share/doc/${PF}/html
|
||||
$(use_enable debug mm-debug)
|
||||
$(use_enable debug grub-emu-usb)
|
||||
$(use_enable device-mapper)
|
||||
$(use_enable mount grub-mount)
|
||||
$(use_enable nls)
|
||||
$(use_enable truetype grub-mkfont)
|
||||
$(use_enable libzfs)
|
||||
$(use sdl && use_enable debug grub-emu-sdl)
|
||||
${platform:+--with-platform=}${platform}
|
||||
|
||||
# Let configure detect this where supported
|
||||
$(usex efiemu '' '--disable-efiemu')
|
||||
)
|
||||
|
||||
if use multislot; then
|
||||
myeconfargs+=( --program-transform-name="s,grub,grub2," )
|
||||
fi
|
||||
|
||||
if use truetype; then
|
||||
mkdir -p "${BUILD_DIR}" || die
|
||||
run_in_build_dir setup_fonts
|
||||
fi
|
||||
|
||||
autotools-utils_src_configure
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
use custom-cflags || unset CCASFLAGS CFLAGS CPPFLAGS LDFLAGS
|
||||
use static && export HOST_LDFLAGS="${HOST_LDFLAGS} -static"
|
||||
|
||||
if version_is_at_least 4.8 "$(gcc-version)"; then
|
||||
export TARGET_LDFLAGS+=" -fuse-ld=bfd"
|
||||
fi
|
||||
|
||||
tc-export CC NM OBJCOPY STRIP
|
||||
export TARGET_CC=${TARGET_CC:-${CC}}
|
||||
tc-export BUILD_CC # Bug 485592
|
||||
|
||||
# Portage will take care of cleaning up GRUB_PLATFORMS
|
||||
MULTIBUILD_VARIANTS=( ${GRUB_PLATFORMS:-guessed} )
|
||||
multibuild_parallel_foreach_variant grub_configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# Sandbox bug 404013.
|
||||
use libzfs && addpredict /etc/dfs:/dev/zfs
|
||||
|
||||
multibuild_foreach_variant autotools-utils_src_compile
|
||||
|
||||
use doc && multibuild_for_best_variant \
|
||||
autotools-utils_src_compile -C docs html
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# The qemu dependency is a bit complex.
|
||||
# You will need to adjust QEMU_SOFTMMU_TARGETS to match the cpu/platform.
|
||||
multibuild_foreach_variant autotools-utils_src_test
|
||||
}
|
||||
|
||||
src_install() {
|
||||
multibuild_foreach_variant autotools-utils_src_install \
|
||||
bashcompletiondir="$(get_bashcompdir)"
|
||||
|
||||
use doc && multibuild_for_best_variant run_in_build_dir \
|
||||
emake -C docs DESTDIR="${D}" install-html
|
||||
|
||||
if use multislot; then
|
||||
mv "${ED%/}"/usr/share/info/grub{,2}.info || die
|
||||
fi
|
||||
|
||||
insinto /etc/default
|
||||
newins "${FILESDIR}"/grub.default-2 grub
|
||||
|
||||
cd "${ED}" || die
|
||||
pax-mark mpes $(scanelf -BF %F usr/{bin,sbin})
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
mount-boot_mount_boot_partition
|
||||
|
||||
if [[ -e "${ROOT%/}/boot/grub2/grub.cfg" && ! -e "${ROOT%/}/boot/grub/grub.cfg" ]]; then
|
||||
mkdir -p "${ROOT%/}/boot/grub"
|
||||
ln -s ../grub2/grub.cfg "${ROOT%/}/boot/grub/grub.cfg"
|
||||
fi
|
||||
|
||||
mount-boot_pkg_postinst
|
||||
|
||||
elog "For information on how to configure GRUB2 please refer to the guide:"
|
||||
elog " http://wiki.gentoo.org/wiki/GRUB2_Quick_Start"
|
||||
|
||||
if has_version 'sys-boot/grub:0'; then
|
||||
elog "A migration guide for GRUB Legacy users is available:"
|
||||
elog " http://www.gentoo.org/doc/en/grub2-migration.xml"
|
||||
fi
|
||||
|
||||
if [[ -z ${REPLACING_VERSIONS} ]]; then
|
||||
if ! has_version sys-boot/os-prober; then
|
||||
elog "Install sys-boot/os-prober to enable detection of other operating systems using grub2-mkconfig."
|
||||
fi
|
||||
if ! has_version dev-libs/libisoburn; then
|
||||
elog "Install dev-libs/libisoburn to enable creation of rescue media using grub2-mkrescue."
|
||||
fi
|
||||
else
|
||||
local v
|
||||
for v in ${REPLACING_VERSIONS}; do
|
||||
if use multislot && ! version_is_at_least 2.00_p5107-r1 ${v}; then
|
||||
ewarn "The grub directory has changed from /boot/grub2 to /boot/grub."
|
||||
ewarn "Please run grub2-install and grub2-mkconfig -o /boot/grub/grub.cfg."
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
@ -1,320 +0,0 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-2.02_beta2.ebuild,v 1.8 2014/06/22 18:02:08 floppym Exp $
|
||||
|
||||
EAPI=5
|
||||
|
||||
if [[ ${PV} == 9999 ]]; then
|
||||
AUTOTOOLS_AUTORECONF=1
|
||||
GRUB_AUTOGEN=1
|
||||
fi
|
||||
|
||||
if [[ -n ${GRUB_AUTOGEN} ]]; then
|
||||
PYTHON_COMPAT=( python{2_6,2_7,3_2,3_3,3_4} )
|
||||
inherit python-any-r1
|
||||
fi
|
||||
|
||||
inherit autotools-utils bash-completion-r1 eutils flag-o-matic mount-boot multibuild pax-utils toolchain-funcs versionator
|
||||
|
||||
if [[ ${PV} != 9999 ]]; then
|
||||
if [[ ${PV} == *_alpha* || ${PV} == *_beta* || ${PV} == *_rc* ]]; then
|
||||
# The quote style is to work with <=bash-4.2 and >=bash-4.3 #503860
|
||||
MY_P=${P/_/'~'}
|
||||
SRC_URI="mirror://gnu-alpha/${PN}/${MY_P}.tar.xz"
|
||||
S=${WORKDIR}/${MY_P}
|
||||
else
|
||||
SRC_URI="mirror://gnu/${PN}/${P}.tar.xz
|
||||
mirror://gentoo/${P}.tar.xz
|
||||
http://dev.gentoo.org/~floppym/dist/${P}.tar.xz"
|
||||
S=${WORKDIR}/${P%_*}
|
||||
fi
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
PATCHES=()
|
||||
else
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="git://git.sv.gnu.org/grub.git
|
||||
http://git.savannah.gnu.org/r/grub.git"
|
||||
fi
|
||||
|
||||
DEJAVU=dejavu-sans-ttf-2.34
|
||||
UNIFONT=unifont-7.0.01
|
||||
SRC_URI+=" truetype? (
|
||||
mirror://sourceforge/dejavu/${DEJAVU}.zip
|
||||
mirror://gnu/unifont/${UNIFONT}/${UNIFONT}.pcf.gz
|
||||
)"
|
||||
|
||||
DESCRIPTION="GNU GRUB boot loader"
|
||||
HOMEPAGE="http://www.gnu.org/software/grub/"
|
||||
|
||||
# Includes licenses for dejavu and unifont
|
||||
LICENSE="GPL-3 truetype? ( BitstreamVera GPL-2-with-font-exception )"
|
||||
SLOT="2"
|
||||
IUSE="debug device-mapper doc efiemu mount +multislot nls static sdl test truetype libzfs"
|
||||
|
||||
GRUB_ALL_PLATFORMS=(
|
||||
# everywhere:
|
||||
emu
|
||||
# mips only:
|
||||
qemu-mips yeeloong
|
||||
# amd64, x86, ppc, ppc64:
|
||||
ieee1275
|
||||
# amd64, x86:
|
||||
coreboot multiboot efi-32 pc qemu xen
|
||||
# amd64, ia64:
|
||||
efi-64
|
||||
)
|
||||
IUSE+=" ${GRUB_ALL_PLATFORMS[@]/#/grub_platforms_}"
|
||||
|
||||
REQUIRED_USE="grub_platforms_qemu? ( truetype )
|
||||
grub_platforms_yeeloong? ( truetype )"
|
||||
|
||||
# os-prober: Used on runtime to detect other OSes
|
||||
# xorriso (dev-libs/libisoburn): Used on runtime for mkrescue
|
||||
RDEPEND="
|
||||
app-arch/xz-utils
|
||||
>=sys-libs/ncurses-5.2-r5
|
||||
debug? (
|
||||
sdl? ( media-libs/libsdl )
|
||||
)
|
||||
device-mapper? ( >=sys-fs/lvm2-2.02.45 )
|
||||
libzfs? ( sys-fs/zfs )
|
||||
mount? ( sys-fs/fuse )
|
||||
truetype? ( media-libs/freetype )
|
||||
ppc? ( sys-apps/ibm-powerpc-utils sys-apps/powerpc-utils )
|
||||
ppc64? ( sys-apps/ibm-powerpc-utils sys-apps/powerpc-utils )
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
${PYTHON_DEPS}
|
||||
app-misc/pax-utils
|
||||
sys-devel/flex
|
||||
sys-devel/bison
|
||||
sys-apps/help2man
|
||||
sys-apps/texinfo
|
||||
grub_platforms_xen? ( app-emulation/xen-tools )
|
||||
static? (
|
||||
app-arch/xz-utils[static-libs(+)]
|
||||
truetype? (
|
||||
app-arch/bzip2[static-libs(+)]
|
||||
media-libs/freetype[static-libs(+)]
|
||||
sys-libs/zlib[static-libs(+)]
|
||||
)
|
||||
)
|
||||
test? (
|
||||
dev-libs/libisoburn
|
||||
app-emulation/qemu
|
||||
)
|
||||
truetype? ( app-arch/unzip )
|
||||
"
|
||||
RDEPEND+="
|
||||
kernel_linux? (
|
||||
grub_platforms_efi-32? ( sys-boot/efibootmgr )
|
||||
grub_platforms_efi-64? ( sys-boot/efibootmgr )
|
||||
)
|
||||
!multislot? ( !sys-boot/grub:0 )
|
||||
nls? ( sys-devel/gettext )
|
||||
"
|
||||
|
||||
STRIP_MASK="*/grub/*/*.{mod,img}"
|
||||
RESTRICT="test"
|
||||
|
||||
QA_EXECSTACK="
|
||||
usr/bin/grub*-emu*
|
||||
usr/lib*/grub/*/*.mod
|
||||
usr/lib*/grub/*/*.module
|
||||
usr/lib*/grub/*/kernel.exec
|
||||
usr/lib*/grub/*/kernel.img
|
||||
"
|
||||
|
||||
QA_WX_LOAD="
|
||||
usr/lib*/grub/*/kernel.exec
|
||||
usr/lib*/grub/*/kernel.img
|
||||
usr/lib*/grub/*/*.image
|
||||
"
|
||||
|
||||
QA_PRESTRIPPED="
|
||||
usr/lib.*/grub/.*/kernel.img
|
||||
"
|
||||
|
||||
pkg_pretend() {
|
||||
if [[ ${MERGE_TYPE} != binary ]]; then
|
||||
# Bug 439082
|
||||
if ! version_is_at_least 4.8 "$(gcc-version)" &&
|
||||
$(tc-getLD) --version | grep -q "GNU gold"; then
|
||||
eerror "GRUB does not function correctly when built with the gold linker."
|
||||
eerror "Please select the bfd linker with binutils-config."
|
||||
die "GNU gold detected"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
if [[ ${PV} == 9999 ]]; then
|
||||
git-r3_src_unpack
|
||||
fi
|
||||
default_src_unpack
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
[[ ${PATCHES} ]] && epatch "${PATCHES[@]}"
|
||||
sed -i -e /autoreconf/d autogen.sh || die
|
||||
if use multislot; then
|
||||
# fix texinfo file name, bug 416035
|
||||
sed -i -e 's/^\* GRUB:/* GRUB2:/' -e 's/(grub)/(grub2)/' docs/grub.texi || die
|
||||
fi
|
||||
epatch_user
|
||||
if [[ -n ${GRUB_AUTOGEN} ]]; then
|
||||
python_setup
|
||||
bash autogen.sh || die
|
||||
fi
|
||||
if [[ -n ${AUTOTOOLS_AUTORECONF} ]]; then
|
||||
autopoint() { return 0; }
|
||||
eautoreconf
|
||||
fi
|
||||
}
|
||||
|
||||
setup_fonts() {
|
||||
ln -s "${WORKDIR}/${DEJAVU}/ttf/DejaVuSans.ttf" DejaVuSans.ttf || die
|
||||
ln -s "${WORKDIR}/${UNIFONT}.pcf" unifont.pcf || die
|
||||
}
|
||||
|
||||
grub_configure() {
|
||||
local platform
|
||||
|
||||
case ${MULTIBUILD_VARIANT} in
|
||||
efi-32)
|
||||
platform=efi
|
||||
if [[ ${CTARGET:-${CHOST}} == x86_64* ]]; then
|
||||
local CTARGET=${CTARGET:-i386}
|
||||
fi ;;
|
||||
efi-64)
|
||||
platform=efi
|
||||
if [[ ${CTARGET:-${CHOST}} == i?86* ]]; then
|
||||
local CTARGET=${CTARGET:-x86_64}
|
||||
local TARGET_CFLAGS="-Os -march=x86-64 ${TARGET_CFLAGS}"
|
||||
local TARGET_CPPFLAGS="-march=x86-64 ${TARGET_CPPFLAGS}"
|
||||
export TARGET_CFLAGS TARGET_CPPFLAGS
|
||||
fi ;;
|
||||
guessed) ;;
|
||||
*) platform=${MULTIBUILD_VARIANT} ;;
|
||||
esac
|
||||
|
||||
local myeconfargs=(
|
||||
--disable-werror
|
||||
--program-prefix=
|
||||
--libdir="${EPREFIX}"/usr/lib
|
||||
--htmldir="${EPREFIX}"/usr/share/doc/${PF}/html
|
||||
$(use_enable debug mm-debug)
|
||||
$(use_enable debug grub-emu-usb)
|
||||
$(use_enable device-mapper)
|
||||
$(use_enable mount grub-mount)
|
||||
$(use_enable nls)
|
||||
$(use_enable truetype grub-mkfont)
|
||||
$(use_enable libzfs)
|
||||
$(use sdl && use_enable debug grub-emu-sdl)
|
||||
${platform:+--with-platform=}${platform}
|
||||
|
||||
# Let configure detect this where supported
|
||||
$(usex efiemu '' '--disable-efiemu')
|
||||
)
|
||||
|
||||
if use multislot; then
|
||||
myeconfargs+=( --program-transform-name="s,grub,grub2," )
|
||||
fi
|
||||
|
||||
if use truetype; then
|
||||
mkdir -p "${BUILD_DIR}" || die
|
||||
run_in_build_dir setup_fonts
|
||||
fi
|
||||
|
||||
autotools-utils_src_configure
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# Bug 508758.
|
||||
replace-flags -O3 -O2
|
||||
|
||||
# We don't want to leak flags onto boot code.
|
||||
export HOST_CCASFLAGS=${CCASFLAGS}
|
||||
export HOST_CFLAGS=${CFLAGS}
|
||||
export HOST_CPPFLAGS=${CPPFLAGS}
|
||||
export HOST_LDFLAGS=${LDFLAGS}
|
||||
unset CCASFLAGS CFLAGS CPPFLAGS LDFLAGS
|
||||
|
||||
use static && HOST_LDFLAGS+=" -static"
|
||||
|
||||
if version_is_at_least 4.8 "$(gcc-version)"; then
|
||||
export TARGET_LDFLAGS+=" -fuse-ld=bfd"
|
||||
fi
|
||||
|
||||
tc-export CC NM OBJCOPY STRIP
|
||||
export TARGET_CC=${TARGET_CC:-${CC}}
|
||||
tc-export BUILD_CC # Bug 485592
|
||||
|
||||
# Portage will take care of cleaning up GRUB_PLATFORMS
|
||||
MULTIBUILD_VARIANTS=( ${GRUB_PLATFORMS:-guessed} )
|
||||
multibuild_parallel_foreach_variant grub_configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# Sandbox bug 404013.
|
||||
use libzfs && addpredict /etc/dfs:/dev/zfs
|
||||
|
||||
multibuild_foreach_variant autotools-utils_src_compile
|
||||
|
||||
use doc && multibuild_for_best_variant \
|
||||
autotools-utils_src_compile -C docs html
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# The qemu dependency is a bit complex.
|
||||
# You will need to adjust QEMU_SOFTMMU_TARGETS to match the cpu/platform.
|
||||
multibuild_foreach_variant autotools-utils_src_test
|
||||
}
|
||||
|
||||
src_install() {
|
||||
multibuild_foreach_variant autotools-utils_src_install \
|
||||
bashcompletiondir="$(get_bashcompdir)"
|
||||
|
||||
use doc && multibuild_for_best_variant run_in_build_dir \
|
||||
emake -C docs DESTDIR="${D}" install-html
|
||||
|
||||
if use multislot; then
|
||||
mv "${ED%/}"/usr/share/info/grub{,2}.info || die
|
||||
fi
|
||||
|
||||
insinto /etc/default
|
||||
newins "${FILESDIR}"/grub.default-3 grub
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
mount-boot_mount_boot_partition
|
||||
|
||||
if [[ -e "${ROOT%/}/boot/grub2/grub.cfg" ]]; then
|
||||
ewarn "The grub directory has changed from /boot/grub2 to /boot/grub."
|
||||
ewarn "Please run grub2-install and grub2-mkconfig -o /boot/grub/grub.cfg."
|
||||
|
||||
if [[ ! -e "${ROOT%/}/boot/grub/grub.cfg" ]]; then
|
||||
mkdir -p "${ROOT%/}/boot/grub"
|
||||
ln -s ../grub2/grub.cfg "${ROOT%/}/boot/grub/grub.cfg"
|
||||
fi
|
||||
fi
|
||||
|
||||
mount-boot_pkg_postinst
|
||||
|
||||
elog "For information on how to configure GRUB2 please refer to the guide:"
|
||||
elog " http://wiki.gentoo.org/wiki/GRUB2_Quick_Start"
|
||||
|
||||
if has_version 'sys-boot/grub:0'; then
|
||||
elog "A migration guide for GRUB Legacy users is available:"
|
||||
elog " http://www.gentoo.org/doc/en/grub2-migration.xml"
|
||||
fi
|
||||
|
||||
if [[ -z ${REPLACING_VERSIONS} ]]; then
|
||||
if ! has_version sys-boot/os-prober; then
|
||||
elog "Install sys-boot/os-prober to enable detection of other operating systems using grub2-mkconfig."
|
||||
fi
|
||||
if ! has_version dev-libs/libisoburn; then
|
||||
elog "Install dev-libs/libisoburn to enable creation of rescue media using grub2-mkrescue."
|
||||
fi
|
||||
fi
|
||||
}
|
@ -1,320 +0,0 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-9999-r1.ebuild,v 1.17 2014/06/22 18:02:08 floppym Exp $
|
||||
|
||||
EAPI=5
|
||||
|
||||
if [[ ${PV} == 9999 ]]; then
|
||||
AUTOTOOLS_AUTORECONF=1
|
||||
GRUB_AUTOGEN=1
|
||||
fi
|
||||
|
||||
if [[ -n ${GRUB_AUTOGEN} ]]; then
|
||||
PYTHON_COMPAT=( python{2_6,2_7,3_2,3_3,3_4} )
|
||||
inherit python-any-r1
|
||||
fi
|
||||
|
||||
inherit autotools-utils bash-completion-r1 eutils flag-o-matic mount-boot multibuild pax-utils toolchain-funcs versionator
|
||||
|
||||
if [[ ${PV} != 9999 ]]; then
|
||||
if [[ ${PV} == *_alpha* || ${PV} == *_beta* || ${PV} == *_rc* ]]; then
|
||||
# The quote style is to work with <=bash-4.2 and >=bash-4.3 #503860
|
||||
MY_P=${P/_/'~'}
|
||||
SRC_URI="mirror://gnu-alpha/${PN}/${MY_P}.tar.xz"
|
||||
S=${WORKDIR}/${MY_P}
|
||||
else
|
||||
SRC_URI="mirror://gnu/${PN}/${P}.tar.xz
|
||||
mirror://gentoo/${P}.tar.xz
|
||||
http://dev.gentoo.org/~floppym/dist/${P}.tar.xz"
|
||||
S=${WORKDIR}/${P%_*}
|
||||
fi
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
PATCHES=()
|
||||
else
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="git://git.sv.gnu.org/grub.git
|
||||
http://git.savannah.gnu.org/r/grub.git"
|
||||
fi
|
||||
|
||||
DEJAVU=dejavu-sans-ttf-2.34
|
||||
UNIFONT=unifont-7.0.01
|
||||
SRC_URI+=" truetype? (
|
||||
mirror://sourceforge/dejavu/${DEJAVU}.zip
|
||||
mirror://gnu/unifont/${UNIFONT}/${UNIFONT}.pcf.gz
|
||||
)"
|
||||
|
||||
DESCRIPTION="GNU GRUB boot loader"
|
||||
HOMEPAGE="http://www.gnu.org/software/grub/"
|
||||
|
||||
# Includes licenses for dejavu and unifont
|
||||
LICENSE="GPL-3 truetype? ( BitstreamVera GPL-2-with-font-exception )"
|
||||
SLOT="2"
|
||||
IUSE="debug device-mapper doc efiemu mount +multislot nls static sdl test truetype libzfs"
|
||||
|
||||
GRUB_ALL_PLATFORMS=(
|
||||
# everywhere:
|
||||
emu
|
||||
# mips only:
|
||||
qemu-mips yeeloong
|
||||
# amd64, x86, ppc, ppc64:
|
||||
ieee1275
|
||||
# amd64, x86:
|
||||
coreboot multiboot efi-32 pc qemu xen
|
||||
# amd64, ia64:
|
||||
efi-64
|
||||
)
|
||||
IUSE+=" ${GRUB_ALL_PLATFORMS[@]/#/grub_platforms_}"
|
||||
|
||||
REQUIRED_USE="grub_platforms_qemu? ( truetype )
|
||||
grub_platforms_yeeloong? ( truetype )"
|
||||
|
||||
# os-prober: Used on runtime to detect other OSes
|
||||
# xorriso (dev-libs/libisoburn): Used on runtime for mkrescue
|
||||
RDEPEND="
|
||||
app-arch/xz-utils
|
||||
>=sys-libs/ncurses-5.2-r5
|
||||
debug? (
|
||||
sdl? ( media-libs/libsdl )
|
||||
)
|
||||
device-mapper? ( >=sys-fs/lvm2-2.02.45 )
|
||||
libzfs? ( sys-fs/zfs )
|
||||
mount? ( sys-fs/fuse )
|
||||
truetype? ( media-libs/freetype )
|
||||
ppc? ( sys-apps/ibm-powerpc-utils sys-apps/powerpc-utils )
|
||||
ppc64? ( sys-apps/ibm-powerpc-utils sys-apps/powerpc-utils )
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
${PYTHON_DEPS}
|
||||
app-misc/pax-utils
|
||||
sys-devel/flex
|
||||
sys-devel/bison
|
||||
sys-apps/help2man
|
||||
sys-apps/texinfo
|
||||
grub_platforms_xen? ( app-emulation/xen-tools )
|
||||
static? (
|
||||
app-arch/xz-utils[static-libs(+)]
|
||||
truetype? (
|
||||
app-arch/bzip2[static-libs(+)]
|
||||
media-libs/freetype[static-libs(+)]
|
||||
sys-libs/zlib[static-libs(+)]
|
||||
)
|
||||
)
|
||||
test? (
|
||||
dev-libs/libisoburn
|
||||
app-emulation/qemu
|
||||
)
|
||||
truetype? ( app-arch/unzip )
|
||||
"
|
||||
RDEPEND+="
|
||||
kernel_linux? (
|
||||
grub_platforms_efi-32? ( sys-boot/efibootmgr )
|
||||
grub_platforms_efi-64? ( sys-boot/efibootmgr )
|
||||
)
|
||||
!multislot? ( !sys-boot/grub:0 )
|
||||
nls? ( sys-devel/gettext )
|
||||
"
|
||||
|
||||
STRIP_MASK="*/grub/*/*.{mod,img}"
|
||||
RESTRICT="test"
|
||||
|
||||
QA_EXECSTACK="
|
||||
usr/bin/grub*-emu*
|
||||
usr/lib*/grub/*/*.mod
|
||||
usr/lib*/grub/*/*.module
|
||||
usr/lib*/grub/*/kernel.exec
|
||||
usr/lib*/grub/*/kernel.img
|
||||
"
|
||||
|
||||
QA_WX_LOAD="
|
||||
usr/lib*/grub/*/kernel.exec
|
||||
usr/lib*/grub/*/kernel.img
|
||||
usr/lib*/grub/*/*.image
|
||||
"
|
||||
|
||||
QA_PRESTRIPPED="
|
||||
usr/lib.*/grub/.*/kernel.img
|
||||
"
|
||||
|
||||
pkg_pretend() {
|
||||
if [[ ${MERGE_TYPE} != binary ]]; then
|
||||
# Bug 439082
|
||||
if ! version_is_at_least 4.8 "$(gcc-version)" &&
|
||||
$(tc-getLD) --version | grep -q "GNU gold"; then
|
||||
eerror "GRUB does not function correctly when built with the gold linker."
|
||||
eerror "Please select the bfd linker with binutils-config."
|
||||
die "GNU gold detected"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
if [[ ${PV} == 9999 ]]; then
|
||||
git-r3_src_unpack
|
||||
fi
|
||||
default_src_unpack
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
[[ ${PATCHES} ]] && epatch "${PATCHES[@]}"
|
||||
sed -i -e /autoreconf/d autogen.sh || die
|
||||
if use multislot; then
|
||||
# fix texinfo file name, bug 416035
|
||||
sed -i -e 's/^\* GRUB:/* GRUB2:/' -e 's/(grub)/(grub2)/' docs/grub.texi || die
|
||||
fi
|
||||
epatch_user
|
||||
if [[ -n ${GRUB_AUTOGEN} ]]; then
|
||||
python_setup
|
||||
bash autogen.sh || die
|
||||
fi
|
||||
if [[ -n ${AUTOTOOLS_AUTORECONF} ]]; then
|
||||
autopoint() { return 0; }
|
||||
eautoreconf
|
||||
fi
|
||||
}
|
||||
|
||||
setup_fonts() {
|
||||
ln -s "${WORKDIR}/${DEJAVU}/ttf/DejaVuSans.ttf" DejaVuSans.ttf || die
|
||||
ln -s "${WORKDIR}/${UNIFONT}.pcf" unifont.pcf || die
|
||||
}
|
||||
|
||||
grub_configure() {
|
||||
local platform
|
||||
|
||||
case ${MULTIBUILD_VARIANT} in
|
||||
efi-32)
|
||||
platform=efi
|
||||
if [[ ${CTARGET:-${CHOST}} == x86_64* ]]; then
|
||||
local CTARGET=${CTARGET:-i386}
|
||||
fi ;;
|
||||
efi-64)
|
||||
platform=efi
|
||||
if [[ ${CTARGET:-${CHOST}} == i?86* ]]; then
|
||||
local CTARGET=${CTARGET:-x86_64}
|
||||
local TARGET_CFLAGS="-Os -march=x86-64 ${TARGET_CFLAGS}"
|
||||
local TARGET_CPPFLAGS="-march=x86-64 ${TARGET_CPPFLAGS}"
|
||||
export TARGET_CFLAGS TARGET_CPPFLAGS
|
||||
fi ;;
|
||||
guessed) ;;
|
||||
*) platform=${MULTIBUILD_VARIANT} ;;
|
||||
esac
|
||||
|
||||
local myeconfargs=(
|
||||
--disable-werror
|
||||
--program-prefix=
|
||||
--libdir="${EPREFIX}"/usr/lib
|
||||
--htmldir="${EPREFIX}"/usr/share/doc/${PF}/html
|
||||
$(use_enable debug mm-debug)
|
||||
$(use_enable debug grub-emu-usb)
|
||||
$(use_enable device-mapper)
|
||||
$(use_enable mount grub-mount)
|
||||
$(use_enable nls)
|
||||
$(use_enable truetype grub-mkfont)
|
||||
$(use_enable libzfs)
|
||||
$(use sdl && use_enable debug grub-emu-sdl)
|
||||
${platform:+--with-platform=}${platform}
|
||||
|
||||
# Let configure detect this where supported
|
||||
$(usex efiemu '' '--disable-efiemu')
|
||||
)
|
||||
|
||||
if use multislot; then
|
||||
myeconfargs+=( --program-transform-name="s,grub,grub2," )
|
||||
fi
|
||||
|
||||
if use truetype; then
|
||||
mkdir -p "${BUILD_DIR}" || die
|
||||
run_in_build_dir setup_fonts
|
||||
fi
|
||||
|
||||
autotools-utils_src_configure
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# Bug 508758.
|
||||
replace-flags -O3 -O2
|
||||
|
||||
# We don't want to leak flags onto boot code.
|
||||
export HOST_CCASFLAGS=${CCASFLAGS}
|
||||
export HOST_CFLAGS=${CFLAGS}
|
||||
export HOST_CPPFLAGS=${CPPFLAGS}
|
||||
export HOST_LDFLAGS=${LDFLAGS}
|
||||
unset CCASFLAGS CFLAGS CPPFLAGS LDFLAGS
|
||||
|
||||
use static && HOST_LDFLAGS+=" -static"
|
||||
|
||||
if version_is_at_least 4.8 "$(gcc-version)"; then
|
||||
export TARGET_LDFLAGS+=" -fuse-ld=bfd"
|
||||
fi
|
||||
|
||||
tc-export CC NM OBJCOPY STRIP
|
||||
export TARGET_CC=${TARGET_CC:-${CC}}
|
||||
tc-export BUILD_CC # Bug 485592
|
||||
|
||||
# Portage will take care of cleaning up GRUB_PLATFORMS
|
||||
MULTIBUILD_VARIANTS=( ${GRUB_PLATFORMS:-guessed} )
|
||||
multibuild_parallel_foreach_variant grub_configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# Sandbox bug 404013.
|
||||
use libzfs && addpredict /etc/dfs:/dev/zfs
|
||||
|
||||
multibuild_foreach_variant autotools-utils_src_compile
|
||||
|
||||
use doc && multibuild_for_best_variant \
|
||||
autotools-utils_src_compile -C docs html
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# The qemu dependency is a bit complex.
|
||||
# You will need to adjust QEMU_SOFTMMU_TARGETS to match the cpu/platform.
|
||||
multibuild_foreach_variant autotools-utils_src_test
|
||||
}
|
||||
|
||||
src_install() {
|
||||
multibuild_foreach_variant autotools-utils_src_install \
|
||||
bashcompletiondir="$(get_bashcompdir)"
|
||||
|
||||
use doc && multibuild_for_best_variant run_in_build_dir \
|
||||
emake -C docs DESTDIR="${D}" install-html
|
||||
|
||||
if use multislot; then
|
||||
mv "${ED%/}"/usr/share/info/grub{,2}.info || die
|
||||
fi
|
||||
|
||||
insinto /etc/default
|
||||
newins "${FILESDIR}"/grub.default-3 grub
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
mount-boot_mount_boot_partition
|
||||
|
||||
if [[ -e "${ROOT%/}/boot/grub2/grub.cfg" ]]; then
|
||||
ewarn "The grub directory has changed from /boot/grub2 to /boot/grub."
|
||||
ewarn "Please run grub2-install and grub2-mkconfig -o /boot/grub/grub.cfg."
|
||||
|
||||
if [[ ! -e "${ROOT%/}/boot/grub/grub.cfg" ]]; then
|
||||
mkdir -p "${ROOT%/}/boot/grub"
|
||||
ln -s ../grub2/grub.cfg "${ROOT%/}/boot/grub/grub.cfg"
|
||||
fi
|
||||
fi
|
||||
|
||||
mount-boot_pkg_postinst
|
||||
|
||||
elog "For information on how to configure GRUB2 please refer to the guide:"
|
||||
elog " http://wiki.gentoo.org/wiki/GRUB2_Quick_Start"
|
||||
|
||||
if has_version 'sys-boot/grub:0'; then
|
||||
elog "A migration guide for GRUB Legacy users is available:"
|
||||
elog " http://www.gentoo.org/doc/en/grub2-migration.xml"
|
||||
fi
|
||||
|
||||
if [[ -z ${REPLACING_VERSIONS} ]]; then
|
||||
if ! has_version sys-boot/os-prober; then
|
||||
elog "Install sys-boot/os-prober to enable detection of other operating systems using grub2-mkconfig."
|
||||
fi
|
||||
if ! has_version dev-libs/libisoburn; then
|
||||
elog "Install dev-libs/libisoburn to enable creation of rescue media using grub2-mkrescue."
|
||||
fi
|
||||
fi
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<herd>base-system</herd>
|
||||
<maintainer>
|
||||
<email>base-system@gentoo.org</email>
|
||||
</maintainer>
|
||||
<maintainer restrict=">=sys-boot/grub-2">
|
||||
<email>floppym@gentoo.org</email>
|
||||
<name>Mike Gilbert</name>
|
||||
</maintainer>
|
||||
<use>
|
||||
<flag name='device-mapper'>
|
||||
Enable support for device-mapper from <pkg>sys-fs/lvm2</pkg>
|
||||
</flag>
|
||||
<flag name='efiemu'>
|
||||
Build and install the efiemu runtimes
|
||||
</flag>
|
||||
<flag name='mount'>
|
||||
Build and install the grub-mount utility
|
||||
</flag>
|
||||
<flag name='libzfs'>
|
||||
Enable support for <pkg>sys-fs/zfs</pkg>
|
||||
</flag>
|
||||
<flag name='multislot'>
|
||||
Allow concurrent installation of <pkg>sys-boot/grub:0</pkg> and
|
||||
<pkg>sys-boot/grub:2</pkg> by renaming all programs.
|
||||
</flag>
|
||||
</use>
|
||||
</pkgmetadata>
|
Loading…
x
Reference in New Issue
Block a user