summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Chvatal <scarabeus@gentoo.org>2011-08-27 11:29:52 +0000
committerTomas Chvatal <scarabeus@gentoo.org>2011-08-27 11:29:52 +0000
commit91339f4956cb3e63960c1d6edd636601ced324ce (patch)
treeed9517545ab048eb22e4014de666e747e2f14bb7 /sys-boot
parentalpha/ia64/s390/sh/sparc stable wrt #377909 (diff)
downloadhistorical-91339f4956cb3e63960c1d6edd636601ced324ce.tar.gz
historical-91339f4956cb3e63960c1d6edd636601ced324ce.tar.bz2
historical-91339f4956cb3e63960c1d6edd636601ced324ce.zip
Bump to grub 1.99. Drop older grub2 versions. Take maintainership of grub:2 series.
Package-Manager: portage-2.2.0_alpha51/cvs/Linux x86_64
Diffstat (limited to 'sys-boot')
-rw-r--r--sys-boot/grub/ChangeLog11
-rw-r--r--sys-boot/grub/Manifest26
-rw-r--r--sys-boot/grub/files/defaults30
-rw-r--r--sys-boot/grub/files/grub-1.96-genkernel.patch19
-rw-r--r--sys-boot/grub/files/grub-1.99-genkernel.patch19
-rw-r--r--sys-boot/grub/files/grub.default36
-rw-r--r--sys-boot/grub/grub-1.98.ebuild116
-rw-r--r--sys-boot/grub/grub-1.99.ebuild262
-rw-r--r--sys-boot/grub/grub-1.99_rc1.ebuild123
-rw-r--r--sys-boot/grub/grub-9999.ebuild253
-rw-r--r--sys-boot/grub/metadata.xml6
11 files changed, 514 insertions, 387 deletions
diff --git a/sys-boot/grub/ChangeLog b/sys-boot/grub/ChangeLog
index 6abce5825926..a16e89f5863b 100644
--- a/sys-boot/grub/ChangeLog
+++ b/sys-boot/grub/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for sys-boot/grub
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/ChangeLog,v 1.158 2011/08/21 04:33:07 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/ChangeLog,v 1.159 2011/08/27 11:29:52 scarabeus Exp $
+
+*grub-1.99 (28 Aug 2011)
+
+ 28 Aug 2011; Tomáš Chvátal <scarabeus@gentoo.org>
+ -files/grub-1.96-genkernel.patch, -grub-1.98.ebuild, -grub-1.99_rc1.ebuild,
+ +grub-1.99.ebuild, -files/grub-1.99-genkernel.patch, grub-9999.ebuild,
+ +files/grub.default, -files/defaults, metadata.xml:
+ Bump to grub 1.99. Drop older grub2 versions. Take maintainership of grub:2
+ series.
21 Aug 2011; Mike Frysinger <vapier@gentoo.org> grub-1.98.ebuild,
grub-1.99_rc1.ebuild, grub-9999.ebuild:
diff --git a/sys-boot/grub/Manifest b/sys-boot/grub/Manifest
index 3968842cb460..47a62a9b165d 100644
--- a/sys-boot/grub/Manifest
+++ b/sys-boot/grub/Manifest
@@ -1,11 +1,6 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA256
-
-AUX defaults 1020 RMD160 48ce6914d693bef9db7f41afecb92c18715ffb7f SHA1 af556abd7deb0d0939f4766df265aa6882707cbe SHA256 302a0cfa6e1f6acf52f5d558cd03f3631313a4b95de038f10f740439ea0a921f
AUX grub-0.97-gpt.patch 10682 RMD160 53dd38d52f2b38fb28dfb670d6fd27e47a562bbb SHA1 6057a076110d469fb63e56e57711d281221f9b42 SHA256 5e38046cfb727420e5b4b19d71c7fb4ddff22cbcc356c9f888763b0c1963d389
-AUX grub-1.96-genkernel.patch 634 RMD160 bc1fdaa51e3f0e3b777a303e0f1c76987c7e69e5 SHA1 e79384a3ac32bfd74c884ead8133b1691a743316 SHA256 8ee327465d9b6d704a78b0c7b31cfdee7c6e7e9f9897e8d0a86198430f0c6ea0
-AUX grub-1.99-genkernel.patch 745 RMD160 02675a7c654b46b9047a432004cfd8d6d1b74649 SHA1 3d0e32b99e716e85a17d28db8d29679c30af8a11 SHA256 19e266d18b2e7ec41a39be06a12f4a2a647155590a30ed4c79e5caf6a60a4343
AUX grub.conf.gentoo 627 RMD160 d90fb4373bad476f98ec9c5065d6cdfd9e3b706f SHA1 004f2fc04605ec9190de0a87e7df8bbc33daff89 SHA256 914b15af252210a32776196437cd8013e10e57d5780e66877ef3fe9a2b4b9776
+AUX grub.default 1227 RMD160 c1b5a7d6a2825d03d885672f4e749ceebb04b71b SHA1 aaafe3b3963487f879c05e538d2a86969cf9bd08 SHA256 4f0235da904532bb762e5fe8be61477a76f7ad0ace4c78735758312eccd30aa3
DIST grub-0.92-gentoo-0.2.tar.bz2 21727 RMD160 f420e3352d46fdfb77a1121879382265805bc3ef SHA1 1bb1463067679aab909d1bd96996cfa72556de81 SHA256 f579b49b2d24702905c333ce2b6170a554ce26d0232c65478a21a1fd2eb8b8fe
DIST grub-0.92.tar.gz 877112 RMD160 97b377a542d415a73c681f2d4c2f57d28e708644 SHA1 15bd5aaa816728583235ab0d5477c1ac32855583 SHA256 197e690faed45bcbf854ab5dc591053d6f6ed1a5b8e5596c4ba27d6f0d50eb37
DIST grub-0.94-gentoo-0.1.tar.bz2 40585 RMD160 49ddf70f7f1b3c5ac0d72408d5cfcb924df07a4c SHA1 f59333af3d4fc7b8d77c876ef956681f7cc335cb SHA256 6f5ac30e0495917cd062c48568bab582f68f288bb3fe4fb968869fdefcd012e3
@@ -22,8 +17,7 @@ DIST grub-0.97-patches-1.7.tar.bz2 31190 RMD160 f72f956c36d07e914bb7b4512ff9c883
DIST grub-0.97-patches-1.8.tar.bz2 48274 RMD160 99c967daca704e853e9d161a51db3d39040bab4f SHA1 3e643d8de0d77456409176ebc4b3b14d547d99dc SHA256 fcd16e6def8ace7bb5928c2d16ddb032a57a5df24a69f9cfae5ce6292785318b
DIST grub-0.97-patches-1.9.tar.bz2 51809 RMD160 a745902212dbd22f4d9f0bb0d563ffd44b429eaa SHA1 1d9da2df8bccef9821ebbbc2f5c5353dbd90bf4d SHA256 6b8445c9260803f059031cbe7475a45fee6499fc2dbd911288af6169455c4028
DIST grub-0.97.tar.gz 971783 RMD160 7fb5674edf0c950bd38e94f85ff1e2909aa741f0 SHA1 2580626c4579bd99336d3af4482c346c95dac4fb SHA256 4e1d15d12dbd3e9208111d6b806ad5a9857ca8850c47877d36575b904559260b
-DIST grub-1.98.tar.gz 2449386 RMD160 197fb8d7c673bd67ae81eda53a2baa2968cc1e69 SHA1 e83a2c438f4773a2e272c225983c0145e1ffd641 SHA256 bef2c1892e052967b65aab6aa62ac702c0e50ef8848506eacf3c0b2f5007c614
-DIST grub-1.99~rc1.tar.gz 4256752 RMD160 e99ac336db296cd2aaaf9529a230833383b2fdbf SHA1 866b6979974ad7209d236cb4e1819039f0bd1c6d SHA256 f0333efa6c5e3198f658b8124eebcf613b916b7873d647abb009169d1ff39d52
+DIST grub-1.99.tar.xz 2639224 RMD160 d59a47fa40b2be0d5ea5b2b00ff5538cfa147747 SHA1 a5ae9558f30ce7757a76aa130088b053a87e2fb6 SHA256 f308148d4c83c6f16a73b58a0cd39381656edb740929028cae7ad5f0d651021b
DIST splash.xpm.gz 33856 RMD160 2fead61f91c368429e80936248bb02af2bdf15ff SHA1 98e679f9698be43426f971f89a088c053e8c804a SHA256 b95600f777331b0dd31d51c68f60f0e846e4c8b628857a41165f4e6b30e6acaf
EBUILD grub-0.92-r1.ebuild 2606 RMD160 89f0287e32655136b91156084b56fe6df582c7ff SHA1 e0f0a79f4cf159cb9aa3ef3ce4e471042a003e40 SHA256 7e523b16eda16ef887a74d51ff0820492b8cf17a2b7dc42181eee8006c080488
EBUILD grub-0.94-r1.ebuild 3500 RMD160 0847c2f47e5144bf33e7d5e21157dd3bcffe6385 SHA1 31b2176750a78a40ab62294b72a6f9cbba04941e SHA256 7d4670b1305af61027bee24a1ea8c2ced1797789f7a0592fe91ba60c047c002c
@@ -39,15 +33,7 @@ EBUILD grub-0.97-r6.ebuild 8801 RMD160 3da0ba7ea62758c9fd352f7290b441c3e9f08fb6
EBUILD grub-0.97-r8.ebuild 8941 RMD160 4caee80e02de14e6a88a3ab016df32f90c258f09 SHA1 be1f73938f4763cf6413afee97062abb8666ffbb SHA256 5876009e82e6556be90d2355defd3039d244f5a53313ba29ce937e9c14e169ff
EBUILD grub-0.97-r9.ebuild 9045 RMD160 5db30743506d7ae274695a94bd1c7c5fea8003e2 SHA1 4796cd56c8e77239719bd31a0542b11129e7922f SHA256 153939f732549503f08dd2acff27325b3e398ffc065e16c1749281c6c66a97d5
EBUILD grub-0.97.ebuild 4494 RMD160 f798b7101af90add6d45725e34aeb7f219e0b748 SHA1 fbb215b293127635ba41e7fa952518e5e07f118a SHA256 d08c03989b1cd6ad91fa2e1a098e0230994570472d0f11a6d926e21e06071c58
-EBUILD grub-1.98.ebuild 3073 RMD160 ea0c8d62713baded9db91a75fec0d34f822d41ce SHA1 96c95137270f3d3cea7f211b9d04e8a2071da819 SHA256 d2dfe70ff02dad8f6aaa2e4b3b5ebf26b50b1640f58039152dd75b4d1367ca54
-EBUILD grub-1.99_rc1.ebuild 3377 RMD160 4c51d17ad567a08c93c2221030af70b9e7b6bc1c SHA1 2aa61c092e2c5de62830ac198c644cb6c6756dcf SHA256 383254f4275ec678cf90c0e871704c6d11e457274f4191aba981193a4cbc8541
-EBUILD grub-9999.ebuild 3376 RMD160 ac7b48ee7a4dff4632700c9c574858ace83357b9 SHA1 ab3380dd25924d00de5c719208177b636a3dbd1c SHA256 c46cf1f70658e4a2d27f2a9906d3840a858ba5f8d72fbbbdf45afc2e31bc9ad5
-MISC ChangeLog 32390 RMD160 7c4a10bba5801d08fc25e844f17781a69af3f458 SHA1 838b28cd7e101d0ce5fa5aa195d47a25e9b458c4 SHA256 dbfd534a4f9c25477e33ac3386acc8f60c5a1e300751bb355a00f3290a3ae745
-MISC metadata.xml 349 RMD160 8e5ecd3c757f94fbccafc8120f4c8a04567135b4 SHA1 3ff0251dbb2863c4fbf0913b901bc27ed73a1acd SHA256 fcb983296ee1568339772668bcf236db0a24aabba6c328343d7bdb790978cbb9
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.17 (GNU/Linux)
-
-iF4EAREIAAYFAk5QiosACgkQaC/OocHi7JamwAD/WEnIWzQeKJ1Wld3Vuq41Bf/G
-xU14KTxv6XNEkUmOzrMBAIiN+tD6ER8X0qv8G1QbFMV8q5xLV5yKcTi/8dt5rrd+
-=6El4
------END PGP SIGNATURE-----
+EBUILD grub-1.99.ebuild 6898 RMD160 585b8f791b2de72762bd7513226088a5647a8ae6 SHA1 7239e166097ef56e2f866b12f6ade213ccc3b887 SHA256 6d00d2764fbfbcb50bd9924bd942a57b19258a3d58234f9173c14d9d66f9feb6
+EBUILD grub-9999.ebuild 6899 RMD160 0705d65b4b378190a5f80af3afb7ed2cd4928669 SHA1 0fe3c6826a33db4d1edfd9957abe30b216eedf2a SHA256 2be6b8be54ff477cc4dfd346e25e6c3850eac6c5099e12fcabe40218bf7f3af1
+MISC ChangeLog 32768 RMD160 7904f5559a00c1f7e82cb64f098b4e85aff9d256 SHA1 b080be864b6558cce308b229fdeca0d10844188c SHA256 b7a1abada7ad982acf9c19f7b4efded2836b3169e96847b6f3227247b7e91eff
+MISC metadata.xml 440 RMD160 9366a9671b7f1ea0819b205afacb7295bfb3bb3a SHA1 ac08599a29d23589f301593db43a832fa23214f1 SHA256 f995b61e88c792e453a6bf5d65d54916323dead2b149ec7153e75f4e12bfc505
diff --git a/sys-boot/grub/files/defaults b/sys-boot/grub/files/defaults
deleted file mode 100644
index 25e59090071f..000000000000
--- a/sys-boot/grub/files/defaults
+++ /dev/null
@@ -1,30 +0,0 @@
-# /etc/defaults/grub
-# If you change this file, run 'grub-mkconfig -o /boot/grub/grub.cfg'
-# afterwords to update /boot/grub/grub.cfg. Make sure your /boot is
-# mounted rw before executing this command.
-#
-# See the grub info page for documentation on possible variables and
-# their associated values. This wiki also has random bits of info:
-# http://en.gentoo-wiki.com/wiki/Grub2#Using_variables
-
-GRUB_DEFAULT=0
-GRUB_HIDDEN_TIMEOUT=0
-GRUB_HIDDEN_TIMEOUT_QUIET=true
-GRUB_TIMEOUT=10
-
-GRUB_CMDLINE_LINUX_DEFAULT=""
-GRUB_CMDLINE_LINUX=""
-
-# 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
-
-# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
-#GRUB_DISABLE_LINUX_UUID=true
-
-# Uncomment to disable generation of recovery mode menu entrys
-#GRUB_DISABLE_RECOVERY=true
diff --git a/sys-boot/grub/files/grub-1.96-genkernel.patch b/sys-boot/grub/files/grub-1.96-genkernel.patch
deleted file mode 100644
index e06f38356a02..000000000000
--- a/sys-boot/grub/files/grub-1.96-genkernel.patch
+++ /dev/null
@@ -1,19 +0,0 @@
---- util/grub.d/10_linux.in
-+++ util/grub.d/10_linux.in
-@@ -61,7 +61,7 @@
- EOF
- }
-
--list=`for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* ; do
-+list=`for i in /boot/kernel-* /boot/vmlinu[xz]-* /vmlinu[xz]-* ; do
- if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
- done`
-
-@@ -78,6 +78,7 @@
- initrd=
- for i in "initrd.img-${version}" "initrd-${version}.img" \
- "initrd-${version}" "initrd.img-${alt_version}" \
-+ "initramfs-genkernel-${version}" "initramfs-genkernel-${alt_version}" \
- "initrd-${alt_version}.img" "initrd-${alt_version}"; do
- if test -e "${dirname}/${i}" ; then
- initrd="$i"
diff --git a/sys-boot/grub/files/grub-1.99-genkernel.patch b/sys-boot/grub/files/grub-1.99-genkernel.patch
deleted file mode 100644
index 4d4aee5a0e9e..000000000000
--- a/sys-boot/grub/files/grub-1.99-genkernel.patch
+++ /dev/null
@@ -1,19 +0,0 @@
---- util/grub.d/10_linux.in
-+++ util/grub.d/10_linux.in
-@@ -109,7 +109,7 @@
- EOF
- }
-
--list=`for i in /boot/vmlinuz-* /boot/vmlinux-* /vmlinuz-* /vmlinux-* ; do
-+list=`for i in /boot/kernel-* /boot/vmlinuz-* /boot/vmlinux-* /vmlinuz-* /vmlinux-* ; do
- if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
- done`
- prepare_boot_cache=
-@@ -127,6 +127,7 @@
- initrd=
- for i in "initrd.img-${version}" "initrd-${version}.img" \
- "initrd-${version}" "initramfs-${version}.img" \
-+ "initramfs-genkernel-${version}" "initramfs-genkernel-${alt_version}" \
- "initrd.img-${alt_version}" "initrd-${alt_version}.img" \
- "initrd-${alt_version}" "initramfs-${alt_version}.img"; do
- if test -e "${dirname}/${i}" ; then
diff --git a/sys-boot/grub/files/grub.default b/sys-boot/grub/files/grub.default
new file mode 100644
index 000000000000..b8767d9a9602
--- /dev/null
+++ b/sys-boot/grub/files/grub.default
@@ -0,0 +1,36 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/files/grub.default,v 1.1 2011/08/27 11:29:52 scarabeus Exp $
+#
+# To populate all changes in this file you need to regenerate your
+# grub configuration file afterwards:
+# 'grub2-mkconfig -o /boot/grub2/grub.cfg'
+#
+# See the grub info page for documentation on possible variables and
+# their associated values.
+
+GRUB_DEFAULT=0
+GRUB_HIDDEN_TIMEOUT=0
+GRUB_HIDDEN_TIMEOUT_QUIET=true
+GRUB_TIMEOUT=10
+
+GRUB_CMDLINE_LINUX_DEFAULT=""
+GRUB_CMDLINE_LINUX=""
+
+# 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
+
+# Background image used on graphical terminal.
+# Can be in various bitmap formats.
+#GRUB_BACKGROUND="/boot/grub2/mybackground.png"
+
+# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
+#GRUB_DISABLE_LINUX_UUID=true
+
+# Uncomment to disable generation of recovery mode menu entrys
+#GRUB_DISABLE_RECOVERY=true
diff --git a/sys-boot/grub/grub-1.98.ebuild b/sys-boot/grub/grub-1.98.ebuild
deleted file mode 100644
index d3258228e1e3..000000000000
--- a/sys-boot/grub/grub-1.98.ebuild
+++ /dev/null
@@ -1,116 +0,0 @@
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-1.98.ebuild,v 1.11 2011/08/21 04:33:07 vapier Exp $
-
-# XXX: need to implement a grub.conf migration in pkg_postinst before we ~arch
-
-inherit mount-boot eutils flag-o-matic toolchain-funcs
-
-if [[ ${PV} == "9999" ]] ; then
- EBZR_REPO_URI="http://bzr.savannah.gnu.org/r/grub/trunk/grub/"
- inherit autotools bzr
- SRC_URI=""
-else
- SRC_URI="ftp://alpha.gnu.org/gnu/${PN}/${P}.tar.gz
- mirror://gentoo/${P}.tar.gz"
-fi
-
-DESCRIPTION="GNU GRUB 2 boot loader"
-HOMEPAGE="http://www.gnu.org/software/grub/"
-
-LICENSE="GPL-3"
-use multislot && SLOT="2" || SLOT="0"
-KEYWORDS=""
-IUSE="custom-cflags debug truetype multislot static"
-
-RDEPEND=">=sys-libs/ncurses-5.2-r5
- dev-libs/lzo
- truetype? ( media-libs/freetype media-fonts/unifont )"
-DEPEND="${RDEPEND}
- dev-lang/ruby
- virtual/yacc
- sys-devel/flex"
-
-export STRIP_MASK="*/grub/*/*.mod"
-QA_EXECSTACK="sbin/grub-probe sbin/grub-setup sbin/grub-mkdevicemap bin/grub-script-check bin/grub-fstest"
-
-src_unpack() {
- if [[ ${PV} == "9999" ]] ; then
- bzr_src_unpack
- else
- unpack ${A}
- fi
- cd "${S}"
- epatch "${FILESDIR}"/${PN}-1.96-genkernel.patch #256335
- epatch_user
-
- # autogen.sh does more than just run autotools
- # need to eautomake due to weirdness #296013
- if [[ ${PV} == "9999" ]] ; then
- sed -i \
- -e '/^\(auto\|ac\)/s:^:e:' \
- -e "s:^eautomake:`which automake`:" \
- autogen.sh
- (. ./autogen.sh) || die
- fi
-}
-
-src_compile() {
- use custom-cflags || unset CFLAGS CPPFLAGS LDFLAGS
- use static && append-ldflags -static
-
- econf \
- --disable-werror \
- --sbindir=/sbin \
- --bindir=/bin \
- --libdir=/$(get_libdir) \
- --disable-efiemu \
- $(use_enable truetype grub-mkfont) \
- $(use_enable debug mm-debug) \
- $(use_enable debug grub-emu-usb) \
- $(use_enable debug grub-fstest)
- emake -j1 || die "making regular stuff"
-}
-
-src_install() {
- emake DESTDIR="${D}" install || die
- dodoc AUTHORS ChangeLog NEWS README THANKS TODO
- cat <<-EOF >> "${D}"/lib*/grub/grub-mkconfig_lib
- GRUB_DISTRIBUTOR="Gentoo"
- EOF
- if use multislot ; then
- sed -i "s:grub-install:grub2-install:" "${D}"/sbin/grub-install || die
- mv "${D}"/sbin/grub{,2}-install || die
- mv "${D}"/sbin/grub{,2}-set-default || die
- mv "${D}"/usr/share/man/man8/grub{,2}-install.8 || die
- mv "${D}"/usr/share/info/grub{,2}.info || die
- fi
-}
-
-setup_boot_dir() {
- local boot_dir=$1
- local dir=${boot_dir}/grub
-
- if [[ ! -e ${dir}/grub.cfg ]] ; then
- einfo "Running: grub-mkconfig -o '${dir}/grub.cfg'"
- grub-mkconfig -o "${dir}/grub.cfg"
- fi
-
- #local install=grub-install
- #use multislot && install="grub2-install --grub-setup=/bin/true"
- #einfo "Running: ${install} "
- #${install}
-}
-
-pkg_postinst() {
- mount-boot_mount_boot_partition
-
- if use multislot ; then
- elog "You have installed grub2 with USE=multislot, so to coexist"
- elog "with grub1, the grub2 install binary is named grub2-install."
- fi
- setup_boot_dir "${ROOT}"boot
-
- # needs to be after we call setup_boot_dir
- mount-boot_pkg_postinst
-}
diff --git a/sys-boot/grub/grub-1.99.ebuild b/sys-boot/grub/grub-1.99.ebuild
new file mode 100644
index 000000000000..bd13e6eef935
--- /dev/null
+++ b/sys-boot/grub/grub-1.99.ebuild
@@ -0,0 +1,262 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-1.99.ebuild,v 1.1 2011/08/27 11:29:52 scarabeus Exp $
+
+EAPI=4
+
+if [[ ${PV} == "9999" ]] ; then
+ EBZR_REPO_URI="http://bzr.savannah.gnu.org/r/grub/trunk/grub/"
+ LIVE_ECLASS="autotools bzr"
+ SRC_URI=""
+else
+ MY_P=${P/_/\~}
+ SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.xz
+ mirror://gentoo/${MY_P}.tar.xz"
+ S=${WORKDIR}/${MY_P}
+fi
+
+inherit mount-boot eutils flag-o-matic toolchain-funcs ${LIVE_ECLASS}
+unset LIVE_ECLASS
+
+DESCRIPTION="GNU GRUB boot loader"
+HOMEPAGE="http://www.gnu.org/software/grub/"
+
+LICENSE="GPL-3"
+SLOT="2"
+[[ ${PV} != "9999" ]] && KEYWORDS="~amd64 ~mips ~x86"
+IUSE="custom-cflags debug device-mapper nls static sdl truetype"
+
+GRUB_PLATFORMS="coreboot efi-32 efi-64 emu ieee1275 multiboot pc qemu qemu-mips yeeloong"
+# everywhere:
+# emu
+# mips only:
+# qemu-mips, yeeloong
+# amd64, x86, ppc, ppc64
+# ieee1275
+# amd64, x86
+# coreboot, multiboot, efi-32, pc, qemu
+# amd64
+# efi-64
+for i in ${GRUB_PLATFORMS}; do
+ IUSE+=" grub_platforms_${i}"
+done
+unset i
+
+# os-prober: Used on runtime to detect other OSes
+# xorriso (dev-libs/libisoburn): Used on runtime for mkrescue
+RDEPEND="
+ dev-libs/libisoburn
+ dev-libs/lzo
+ sys-boot/os-prober
+ >=sys-libs/ncurses-5.2-r5
+ debug? (
+ sdl? ( media-libs/libsdl )
+ )
+ device-mapper? ( >=sys-fs/lvm2-2.02.45 )
+ truetype? ( media-libs/freetype >=media-fonts/unifont-5 )"
+DEPEND="${RDEPEND}
+ >=dev-lang/python-2.5.2
+ sys-devel/flex
+ virtual/yacc
+"
+if [[ ${PV} == "9999" ]]; then
+ DEPEND+=" >=sys-devel/autogen-5.10 sys-apps/help2man"
+else
+ DEPEND+=" app-arch/xz-utils"
+fi
+
+export STRIP_MASK="*/grub*/*/*.{mod,img}"
+QA_EXECSTACK="
+ lib64/grub2/*/setjmp.mod
+ lib64/grub2/*/kernel.img
+ sbin/grub2-probe
+ sbin/grub2-setup
+ sbin/grub2-mkdevicemap
+ bin/grub2-script-check
+ bin/grub2-fstest
+ bin/grub2-mklayout
+ bin/grub2-menulst2cfg
+ bin/grub2-mkrelpath
+ bin/grub2-mkpasswd-pbkdf2
+ bin/grub2-mkfont
+ bin/grub2-editenv
+ bin/grub2-mkimage
+"
+
+grub_run_phase() {
+ local phase=$1
+ local platform=$2
+ [[ -z ${phase} || -z ${platform} ]] && die "${FUNCNAME} [phase] [platform]"
+
+ [[ -d "${WORKDIR}/build-${platform}" ]] || \
+ { mkdir "${WORKDIR}/build-${platform}" || die ; }
+ pushd "${WORKDIR}/build-${platform}" > /dev/null || die
+
+ echo ">>> Running ${phase} for platform \"${platform}\""
+ echo ">>> Working in: \"${WORKDIR}/build-${platform}\""
+
+ grub_${phase} ${platform}
+
+ popd > /dev/null || die
+}
+
+grub_src_configure() {
+ local platform=$1
+ local target
+
+ [[ -z ${platform} ]] && die "${FUNCNAME} [platform]"
+
+ # if we have no platform then --with-platform=guessed does not work
+ [[ ${platform} == "guessed" ]] && platform=""
+
+ # check if we have to specify the target (EFI)
+ # or just append correct --with-platform
+ if [[ -n ${platform} ]]; then
+ if [[ ${platform} == efi* ]]; then
+ # EFI platform hack
+ [[ ${platform/*-} == 32 ]] && target=i386
+ [[ ${platform/*-} == 64 ]] && target=x86_64
+ # program-prefix is required empty because otherwise it is equal to
+ # target variable, which we do not want at all
+ platform="
+ --with-platform=${platform/-*}
+ --target=${target}
+ --program-prefix=
+ "
+ else
+ platform=" --with-platform=${platform}"
+ fi
+ fi
+
+ ECONF_SOURCE="${WORKDIR}/${P}/" \
+ econf \
+ --disable-werror \
+ --sbindir=/sbin \
+ --bindir=/bin \
+ --libdir=/$(get_libdir) \
+ --disable-efiemu \
+ --program-transform-name=s,grub,grub2, \
+ $(use_enable device-mapper) \
+ $(use_enable truetype grub-mkfont) \
+ $(use_enable nls) \
+ $(use_enable debug mm-debug) \
+ $(use sdl && use_enable debug grub-emu-sdl) \
+ $(use_enable debug grub-emu-usb) \
+ ${platform}
+}
+
+grub_src_compile() {
+ default_src_compile
+}
+
+grub_src_install() {
+ default_src_install
+}
+
+src_prepare() {
+ local i j archs
+
+ epatch_user
+
+ # autogen.sh does more than just run autotools
+ if [[ ${PV} == "9999" ]] ; then
+ sed -i -e '/^autoreconf/s:^:set +e; e:' autogen.sh || die
+ (. ./autogen.sh) || die
+ fi
+
+ # install into the right dir for eselect #372735
+ sed -i \
+ -e '/^bashcompletiondir =/s:=.*:= $(datarootdir)/bash-completion:' \
+ util/bash-completion.d/Makefile.in || die
+
+ # get enabled platforms
+ GRUB_ENABLED_PLATFORMS=""
+ for i in ${GRUB_PLATFORMS}; do
+ use grub_platforms_${i} && GRUB_ENABLED_PLATFORMS+=" ${i}"
+ done
+ [[ -z ${GRUB_ENABLED_PLATFORMS} ]] && GRUB_ENABLED_PLATFORMS="guessed"
+ einfo "Going to build following platforms: ${GRUB_ENABLED_PLATFORMS}"
+}
+
+src_configure() {
+ local i
+
+ use custom-cflags || unset CFLAGS CPPFLAGS LDFLAGS
+ use static && append-ldflags -static
+
+ for i in ${GRUB_ENABLED_PLATFORMS}; do
+ grub_run_phase ${FUNCNAME} ${i}
+ done
+}
+
+src_compile() {
+ local i
+
+ for i in ${GRUB_ENABLED_PLATFORMS}; do
+ grub_run_phase ${FUNCNAME} ${i}
+ done
+}
+
+src_install() {
+ local i
+
+ for i in ${GRUB_ENABLED_PLATFORMS}; do
+ grub_run_phase ${FUNCNAME} ${i}
+ done
+
+ # slot all collisions with grub legacy
+ mv "${ED}"/usr/share/info/grub.info \
+ "${ED}"/usr/share/info/grub2.info || die
+
+ # can't be in docs array as we use defualt_src_install in different builddir
+ dodoc AUTHORS ChangeLog NEWS README THANKS TODO
+ insinto /etc/default
+ newins "${FILESDIR}"/grub.default grub
+ cat <<EOF >> "${ED}"/lib*/grub2/grub-mkconfig_lib
+ GRUB_DISTRIBUTOR="Gentoo"
+EOF
+}
+
+setup_boot_dir() {
+ local dir=$1
+
+ # display the link to guide if user didn't set up anything yet.
+ elog "For informations how to configure grub-2 please reffer to the guide:"
+ elog " http://dev.gentoo.org/~scarabeus/grub-2-guide.xml"
+
+ if [[ ! -e ${dir}/grub.cfg && -e ${dir/2/}/menu.lst ]] ; then
+ # This is first grub2 install and we have old configuraton for
+ # grub1 around. Lets try to generate grub.cfg from it so user
+ # does not loose any stuff when rebooting.
+ # NOTE: in long term he still NEEDS to migrate to grub.d stuff.
+ einfo "Running: grub2-menulst2cfg '${dir/2/}/menu.lst' '${dir}/grub.cfg'"
+ grub2-menulst2cfg "${dir/2/}/menu.lst" "${dir}/grub.cfg" || \
+ ewarn "Running grub2-menulst2cfg failed!"
+
+ einfo "Even if we just created configuration for your grub2 using old"
+ einfo "grub-legacy configuration file you should migrate to use new style"
+ einfo "configuration in '${ROOT}/etc/grub.d'."
+ einfo
+
+ else
+ # we need to refresh the grub.cfg everytime just to play it safe
+ einfo "Running: grub2-mkconfig -o '${dir}/grub.cfg'"
+ grub2-mkconfig -o "${dir}/grub.cfg" || \
+ ewarn "Running grub2-mkconfig failed! Check your configuration files!"
+ fi
+
+ elog "Remember to run \"grub2-mkconfig -o '${dir}/grub.cfg'\" every time"
+ elog "you update the configuration files!"
+
+ elog "Remember to run grub2-install to install your grub every time"
+ elog "you update this package!"
+}
+
+pkg_postinst() {
+ mount-boot_mount_boot_partition
+
+ setup_boot_dir "${ROOT}"boot/grub2
+
+ # needs to be called after we call setup_boot_dir
+ mount-boot_pkg_postinst
+}
diff --git a/sys-boot/grub/grub-1.99_rc1.ebuild b/sys-boot/grub/grub-1.99_rc1.ebuild
deleted file mode 100644
index d760b9127470..000000000000
--- a/sys-boot/grub/grub-1.99_rc1.ebuild
+++ /dev/null
@@ -1,123 +0,0 @@
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-1.99_rc1.ebuild,v 1.6 2011/08/21 04:33:07 vapier Exp $
-
-# XXX: need to implement a grub.conf migration in pkg_postinst before we ~arch
-
-inherit mount-boot eutils flag-o-matic toolchain-funcs
-
-if [[ ${PV} == "9999" ]] ; then
- EBZR_REPO_URI="http://bzr.savannah.gnu.org/r/grub/trunk/grub/"
- inherit autotools bzr
- SRC_URI=""
-else
- MY_P=${P/_/\~}
- SRC_URI="ftp://alpha.gnu.org/gnu/${PN}/${MY_P}.tar.gz
- mirror://gentoo/${MY_P}.tar.gz"
- S=${WORKDIR}/${MY_P}
-fi
-
-DESCRIPTION="GNU GRUB 2 boot loader"
-HOMEPAGE="http://www.gnu.org/software/grub/"
-
-LICENSE="GPL-3"
-use multislot && SLOT="2" || SLOT="0"
-KEYWORDS=""
-IUSE="custom-cflags debug truetype multislot static"
-
-RDEPEND=">=sys-libs/ncurses-5.2-r5
- dev-libs/lzo
- truetype? ( media-libs/freetype >=media-fonts/unifont-5 )"
-DEPEND="${RDEPEND}
- >=sys-devel/autogen-5.10
- >=dev-lang/python-2.5.2
- virtual/yacc
- sys-devel/flex"
-[[ ${PV} == "9999" ]] && DEPEND+=" sys-apps/help2man"
-
-export STRIP_MASK="*/grub/*/*.mod"
-QA_EXECSTACK="sbin/grub-probe sbin/grub-setup sbin/grub-mkdevicemap bin/grub-script-check bin/grub-fstest"
-
-src_unpack() {
- if [[ ${PV} == "9999" ]] ; then
- bzr_src_unpack
- else
- unpack ${A}
- fi
- cd "${S}"
- epatch "${FILESDIR}"/${PN}-1.99-genkernel.patch #256335
- epatch_user
-
- # autogen.sh does more than just run autotools
- # need to eautomake due to weirdness #296013
- if [[ ${PV} == "9999" ]] ; then
- sed -i -e '/^autoreconf/s:^:e:' autogen.sh || die
- (. ./autogen.sh) || die
- fi
-
- # install into the right dir for eselect #372735
- sed -i \
- -e '/^bashcompletiondir =/s:=.*:= $(datarootdir)/bash-completion:' \
- util/bash-completion.d/Makefile.in || die
-}
-
-src_compile() {
- use custom-cflags || unset CFLAGS CPPFLAGS LDFLAGS
- use static && append-ldflags -static
-
- econf \
- --disable-werror \
- --sbindir=/sbin \
- --bindir=/bin \
- --libdir=/$(get_libdir) \
- --disable-efiemu \
- $(use_enable truetype grub-mkfont) \
- $(use_enable debug mm-debug) \
- $(use_enable debug grub-emu) \
- $(use_enable debug grub-emu-usb) \
- $(use_enable debug grub-fstest)
- emake -j1 || die "making regular stuff"
-}
-
-src_install() {
- emake DESTDIR="${D}" install || die
- dodoc AUTHORS ChangeLog NEWS README THANKS TODO
- cat <<-EOF >> "${D}"/lib*/grub/grub-mkconfig_lib
- GRUB_DISTRIBUTOR="Gentoo"
- EOF
- if use multislot ; then
- sed -i "s:grub-install:grub2-install:" "${D}"/sbin/grub-install || die
- mv "${D}"/sbin/grub{,2}-install || die
- mv "${D}"/sbin/grub{,2}-set-default || die
- mv "${D}"/usr/share/man/man8/grub{,2}-install.8 || die
- mv "${D}"/usr/share/info/grub{,2}.info || die
- fi
-}
-
-setup_boot_dir() {
- local boot_dir=$1
- local dir=${boot_dir}/grub
-
- if [[ ! -e ${dir}/grub.cfg ]] ; then
- einfo "Running: grub-mkconfig -o '${dir}/grub.cfg'"
- grub-mkconfig -o "${dir}/grub.cfg"
- fi
-
- #local install=grub-install
- #use multislot && install="grub2-install --grub-setup=/bin/true"
- #einfo "Running: ${install} "
- #${install}
-}
-
-pkg_postinst() {
- mount-boot_mount_boot_partition
-
- if use multislot ; then
- elog "You have installed grub2 with USE=multislot, so to coexist"
- elog "with grub1, the grub2 install binary is named grub2-install."
- fi
- setup_boot_dir "${ROOT}"boot
-
- # needs to be after we call setup_boot_dir
- mount-boot_pkg_postinst
-}
diff --git a/sys-boot/grub/grub-9999.ebuild b/sys-boot/grub/grub-9999.ebuild
index 9fdf88d4f966..ff941904db36 100644
--- a/sys-boot/grub/grub-9999.ebuild
+++ b/sys-boot/grub/grub-9999.ebuild
@@ -1,31 +1,54 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-9999.ebuild,v 1.36 2011/08/21 04:33:07 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-9999.ebuild,v 1.37 2011/08/27 11:29:52 scarabeus Exp $
-# XXX: need to implement a grub.conf migration in pkg_postinst before we ~arch
-EAPI="2"
-
-inherit mount-boot eutils flag-o-matic toolchain-funcs
+EAPI=4
if [[ ${PV} == "9999" ]] ; then
EBZR_REPO_URI="http://bzr.savannah.gnu.org/r/grub/trunk/grub/"
- inherit autotools bzr
+ LIVE_ECLASS="autotools bzr"
SRC_URI=""
else
- SRC_URI="ftp://alpha.gnu.org/gnu/${PN}/${P}.tar.gz
- mirror://gentoo/${P}.tar.gz"
+ MY_P=${P/_/\~}
+ SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.xz
+ mirror://gentoo/${MY_P}.tar.xz"
+ S=${WORKDIR}/${MY_P}
fi
+inherit mount-boot eutils flag-o-matic toolchain-funcs ${LIVE_ECLASS}
+unset LIVE_ECLASS
+
DESCRIPTION="GNU GRUB boot loader"
HOMEPAGE="http://www.gnu.org/software/grub/"
LICENSE="GPL-3"
-use multislot && SLOT="2" || SLOT="0"
-KEYWORDS=""
-IUSE="custom-cflags debug device-mapper multislot static sdl truetype"
+SLOT="2"
+[[ ${PV} != "9999" ]] && KEYWORDS="~amd64 ~mips ~x86"
+IUSE="custom-cflags debug device-mapper nls static sdl truetype"
-RDEPEND=">=sys-libs/ncurses-5.2-r5
+GRUB_PLATFORMS="coreboot efi-32 efi-64 emu ieee1275 multiboot pc qemu qemu-mips loongson"
+# everywhere:
+# emu
+# mips only:
+# qemu-mips, loongson
+# amd64, x86, ppc, ppc64
+# ieee1275
+# amd64, x86
+# coreboot, multiboot, efi-32, pc, qemu
+# amd64
+# efi-64
+for i in ${GRUB_PLATFORMS}; do
+ IUSE+=" grub_platforms_${i}"
+done
+unset i
+
+# os-prober: Used on runtime to detect other OSes
+# xorriso (dev-libs/libisoburn): Used on runtime for mkrescue
+RDEPEND="
+ dev-libs/libisoburn
dev-libs/lzo
+ sys-boot/os-prober
+ >=sys-libs/ncurses-5.2-r5
debug? (
sdl? ( media-libs/libsdl )
)
@@ -33,18 +56,109 @@ RDEPEND=">=sys-libs/ncurses-5.2-r5
truetype? ( media-libs/freetype >=media-fonts/unifont-5 )"
DEPEND="${RDEPEND}
>=dev-lang/python-2.5.2
+ sys-devel/flex
virtual/yacc
- sys-devel/flex"
-[[ ${PV} == "9999" ]] && DEPEND+=" >=sys-devel/autogen-5.10 sys-apps/help2man"
+"
+if [[ ${PV} == "9999" ]]; then
+ DEPEND+=" >=sys-devel/autogen-5.10 sys-apps/help2man"
+else
+ DEPEND+=" app-arch/xz-utils"
+fi
+
+export STRIP_MASK="*/grub*/*/*.{mod,img}"
+QA_EXECSTACK="
+ lib64/grub2/*/setjmp.mod
+ lib64/grub2/*/kernel.img
+ sbin/grub2-probe
+ sbin/grub2-setup
+ sbin/grub2-mkdevicemap
+ bin/grub2-script-check
+ bin/grub2-fstest
+ bin/grub2-mklayout
+ bin/grub2-menulst2cfg
+ bin/grub2-mkrelpath
+ bin/grub2-mkpasswd-pbkdf2
+ bin/grub2-mkfont
+ bin/grub2-editenv
+ bin/grub2-mkimage
+"
+
+grub_run_phase() {
+ local phase=$1
+ local platform=$2
+ [[ -z ${phase} || -z ${platform} ]] && die "${FUNCNAME} [phase] [platform]"
+
+ [[ -d "${WORKDIR}/build-${platform}" ]] || \
+ { mkdir "${WORKDIR}/build-${platform}" || die ; }
+ pushd "${WORKDIR}/build-${platform}" > /dev/null || die
+
+ echo ">>> Running ${phase} for platform \"${platform}\""
+ echo ">>> Working in: \"${WORKDIR}/build-${platform}\""
+
+ grub_${phase} ${platform}
+
+ popd > /dev/null || die
+}
+
+grub_src_configure() {
+ local platform=$1
+ local target
+
+ [[ -z ${platform} ]] && die "${FUNCNAME} [platform]"
+
+ # if we have no platform then --with-platform=guessed does not work
+ [[ ${platform} == "guessed" ]] && platform=""
+
+ # check if we have to specify the target (EFI)
+ # or just append correct --with-platform
+ if [[ -n ${platform} ]]; then
+ if [[ ${platform} == efi* ]]; then
+ # EFI platform hack
+ [[ ${platform/*-} == 32 ]] && target=i386
+ [[ ${platform/*-} == 64 ]] && target=x86_64
+ # program-prefix is required empty because otherwise it is equal to
+ # target variable, which we do not want at all
+ platform="
+ --with-platform=${platform/-*}
+ --target=${target}
+ --program-prefix=
+ "
+ else
+ platform=" --with-platform=${platform}"
+ fi
+ fi
+
+ ECONF_SOURCE="${WORKDIR}/${P}/" \
+ econf \
+ --disable-werror \
+ --sbindir=/sbin \
+ --bindir=/bin \
+ --libdir=/$(get_libdir) \
+ --disable-efiemu \
+ --program-transform-name=s,grub,grub2, \
+ $(use_enable device-mapper) \
+ $(use_enable truetype grub-mkfont) \
+ $(use_enable nls) \
+ $(use_enable debug mm-debug) \
+ $(use sdl && use_enable debug grub-emu-sdl) \
+ $(use_enable debug grub-emu-usb) \
+ ${platform}
+}
+
+grub_src_compile() {
+ default_src_compile
+}
-export STRIP_MASK="*/grub/*/*.mod"
-QA_EXECSTACK="sbin/grub-probe sbin/grub-setup sbin/grub-mkdevicemap bin/grub-script-check bin/grub-fstest"
+grub_src_install() {
+ default_src_install
+}
src_prepare() {
+ local i j archs
+
epatch_user
# autogen.sh does more than just run autotools
- # need to eautomake due to weirdness #296013
if [[ ${PV} == "9999" ]] ; then
sed -i -e '/^autoreconf/s:^:set +e; e:' autogen.sh || die
(. ./autogen.sh) || die
@@ -54,72 +168,95 @@ src_prepare() {
sed -i \
-e '/^bashcompletiondir =/s:=.*:= $(datarootdir)/bash-completion:' \
util/bash-completion.d/Makefile.in || die
+
+ # get enabled platforms
+ GRUB_ENABLED_PLATFORMS=""
+ for i in ${GRUB_PLATFORMS}; do
+ use grub_platforms_${i} && GRUB_ENABLED_PLATFORMS+=" ${i}"
+ done
+ [[ -z ${GRUB_ENABLED_PLATFORMS} ]] && GRUB_ENABLED_PLATFORMS="guessed"
+ einfo "Going to build following platforms: ${GRUB_ENABLED_PLATFORMS}"
}
src_configure() {
+ local i
+
use custom-cflags || unset CFLAGS CPPFLAGS LDFLAGS
use static && append-ldflags -static
- econf \
- --disable-werror \
- --sbindir=/sbin \
- --bindir=/bin \
- --libdir=/$(get_libdir) \
- --disable-efiemu \
- $(use_enable device-mapper) \
- $(use_enable truetype grub-mkfont) \
- $(use_enable debug mm-debug) \
- $(use sdl && use_enable debug grub-emu-sdl) \
- $(use_enable debug grub-emu-usb)
+ for i in ${GRUB_ENABLED_PLATFORMS}; do
+ grub_run_phase ${FUNCNAME} ${i}
+ done
}
src_compile() {
- emake -j1 || die
+ local i
+
+ for i in ${GRUB_ENABLED_PLATFORMS}; do
+ grub_run_phase ${FUNCNAME} ${i}
+ done
}
src_install() {
- emake DESTDIR="${D}" install || die
- dodoc AUTHORS ChangeLog NEWS README THANKS TODO
+ local i
+
+ for i in ${GRUB_ENABLED_PLATFORMS}; do
+ grub_run_phase ${FUNCNAME} ${i}
+ done
+
+ # slot all collisions with grub legacy
+ mv "${ED}"/usr/share/info/grub.info \
+ "${ED}"/usr/share/info/grub2.info || die
- insinto /etc/defaults
- doins "${FILESDIR}"/defaults || die
- cat <<-EOF >> "${D}"/lib*/grub/grub-mkconfig_lib
+ # can't be in docs array as we use defualt_src_install in different builddir
+ dodoc AUTHORS ChangeLog NEWS README THANKS TODO
+ insinto /etc/default
+ newins "${FILESDIR}"/grub.default grub
+ cat <<EOF >> "${ED}"/lib*/grub2/grub-mkconfig_lib
GRUB_DISTRIBUTOR="Gentoo"
- EOF
-
- if use multislot ; then
- sed -i "s:grub-install:grub2-install:" "${D}"/sbin/grub-install || die
- mv "${D}"/sbin/grub{,2}-install || die
- mv "${D}"/sbin/grub{,2}-set-default || die
- mv "${D}"/usr/share/man/man8/grub{,2}-install.8 || die
- mv "${D}"/usr/share/info/grub{,2}.info || die
- fi
+EOF
}
setup_boot_dir() {
- local boot_dir=$1
- local dir=${boot_dir}/grub
+ local dir=$1
+
+ # display the link to guide if user didn't set up anything yet.
+ elog "For informations how to configure grub-2 please reffer to the guide:"
+ elog " http://dev.gentoo.org/~scarabeus/grub-2-guide.xml"
+
+ if [[ ! -e ${dir}/grub.cfg && -e ${dir/2/}/menu.lst ]] ; then
+ # This is first grub2 install and we have old configuraton for
+ # grub1 around. Lets try to generate grub.cfg from it so user
+ # does not loose any stuff when rebooting.
+ # NOTE: in long term he still NEEDS to migrate to grub.d stuff.
+ einfo "Running: grub2-menulst2cfg '${dir/2/}/menu.lst' '${dir}/grub.cfg'"
+ grub2-menulst2cfg "${dir/2/}/menu.lst" "${dir}/grub.cfg" || \
+ ewarn "Running grub2-menulst2cfg failed!"
- if [[ ! -e ${dir}/grub.cfg ]] ; then
- einfo "Running: grub-mkconfig -o '${dir}/grub.cfg'"
- grub-mkconfig -o "${dir}/grub.cfg"
+ einfo "Even if we just created configuration for your grub2 using old"
+ einfo "grub-legacy configuration file you should migrate to use new style"
+ einfo "configuration in '${ROOT}/etc/grub.d'."
+ einfo
+
+ else
+ # we need to refresh the grub.cfg everytime just to play it safe
+ einfo "Running: grub2-mkconfig -o '${dir}/grub.cfg'"
+ grub2-mkconfig -o "${dir}/grub.cfg" || \
+ ewarn "Running grub2-mkconfig failed! Check your configuration files!"
fi
- #local install=grub-install
- #use multislot && install="grub2-install --grub-setup=/bin/true"
- #einfo "Running: ${install} "
- #${install}
+ elog "Remember to run \"grub2-mkconfig -o '${dir}/grub.cfg'\" every time"
+ elog "you update the configuration files!"
+
+ elog "Remember to run grub2-install to install your grub every time"
+ elog "you update this package!"
}
pkg_postinst() {
mount-boot_mount_boot_partition
- if use multislot ; then
- elog "You have installed grub2 with USE=multislot, so to coexist"
- elog "with grub1, the grub2 install binary is named grub2-install."
- fi
- setup_boot_dir "${ROOT}"boot
+ setup_boot_dir "${ROOT}"boot/grub2
- # needs to be after we call setup_boot_dir
+ # needs to be called after we call setup_boot_dir
mount-boot_pkg_postinst
}
diff --git a/sys-boot/grub/metadata.xml b/sys-boot/grub/metadata.xml
index a05c3308cc79..10d306a4d940 100644
--- a/sys-boot/grub/metadata.xml
+++ b/sys-boot/grub/metadata.xml
@@ -2,8 +2,12 @@
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>base-system</herd>
+<maintainer restrict="&gt;=sys-boot/grub-1.99">
+ <email>scarabeus@gentoo.org</email>
+ <name>Tomáš Chvátal</name>
+ <description>Grub 2 maintainer</description>
+</maintainer>
<use>
<flag name='device-mapper'>Enable support for <pkg>sys-fs/device-mapper</pkg></flag>
- <flag name='multislot'>Allow grub1 and grub2 to be installed simultaneously</flag>
</use>
</pkgmetadata>