summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2012-02-29 01:52:23 +0000
committerMike Gilbert <floppym@gentoo.org>2012-02-29 01:52:23 +0000
commit225cc4635d843b70ddcce4d840d589a8040327d3 (patch)
treea3f92ee705cae41ce55d260adf86ef9057618663 /sys-boot
parentStable for HPPA (bug #406037). (diff)
downloadhistorical-225cc4635d843b70ddcce4d840d589a8040327d3.tar.gz
historical-225cc4635d843b70ddcce4d840d589a8040327d3.tar.bz2
historical-225cc4635d843b70ddcce4d840d589a8040327d3.zip
Updates for grub-2.00_beta0 release.
* Move binaries to /usr. * If GRUB_PLATFORMS is set, install binaries as grub2-${platform}-foo. * Add mount and libzfs USE flags. * Drop pkg_config. Need to figure out if this is feasible with multiple platforms. Package-Manager: portage-2.2.0_alpha89/cvs/Linux x86_64
Diffstat (limited to 'sys-boot')
-rw-r--r--sys-boot/grub/ChangeLog11
-rw-r--r--sys-boot/grub/Manifest28
-rw-r--r--sys-boot/grub/files/grub.default6
-rw-r--r--sys-boot/grub/grub-2.00_beta0.ebuild258
-rw-r--r--sys-boot/grub/grub-9999.ebuild223
-rw-r--r--sys-boot/grub/metadata.xml13
6 files changed, 370 insertions, 169 deletions
diff --git a/sys-boot/grub/ChangeLog b/sys-boot/grub/ChangeLog
index ffc0df2e9f7c..ab0beed8c5e6 100644
--- a/sys-boot/grub/ChangeLog
+++ b/sys-boot/grub/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for sys-boot/grub
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/ChangeLog,v 1.177 2012/01/30 09:14:59 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/ChangeLog,v 1.178 2012/02/29 01:52:22 floppym Exp $
+
+*grub-2.00_beta0 (29 Feb 2012)
+
+ 29 Feb 2012; Mike Gilbert <floppym@gentoo.org> +grub-2.00_beta0.ebuild,
+ files/grub.default, grub-9999.ebuild, metadata.xml:
+ Updates for grub-2.00_beta0 release. * Move binaries to /usr. * If
+ GRUB_PLATFORMS is set, install binaries as grub2-${platform}-foo. * Add mount
+ and libzfs USE flags. * Drop pkg_config. Need to figure out if this is
+ feasible with multiple platforms.
30 Jan 2012; Tomáš Chvátal <scarabeus@gentoo.org> grub-1.99-r2.ebuild,
grub-9999.ebuild:
diff --git a/sys-boot/grub/Manifest b/sys-boot/grub/Manifest
index ab1cd64d6e02..ab14c897c8f6 100644
--- a/sys-boot/grub/Manifest
+++ b/sys-boot/grub/Manifest
@@ -1,5 +1,5 @@
-----BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
+Hash: SHA256
AUX 1.99-call_proper_grub_probe.patch 536 RMD160 28e914f6ef8e2d9eb73316fa8e5d29b6541d806f SHA1 91237ebbe574baf48d05302c01422c0f0b5c8b49 SHA256 0e27b4ba6a0deedef2f65822e3b76aea4a817cb7219b01c29c8f682c450bd5e8
AUX 1.99-do_not_stat_so_often.patch 1731 RMD160 ed04af18876c27ca6a85d627d2082a773add19c8 SHA1 ee1936e26f2a3f564195385465752ccee7d29713 SHA256 a33fdbcab7fa4ad66b26598d9a6f1703f419229058c1e9c9c14edb6272783727
@@ -8,7 +8,7 @@ AUX 1.99-stat_root_device_properly-p1.patch 698 RMD160 f28b945c2342a2a95e67357c5
AUX 1.99-stat_root_device_properly-p2.patch 621 RMD160 2b52c8cbddf95def3fcc77ec8a2cb3524891fd1e SHA1 280dafa0d0c93905a850b17e9a9f09cea1357a05 SHA256 431876459562c0aae6e854a97eeaf0cacdad8ceb5477788a4d691e4e6fa613eb
AUX grub-0.97-gpt.patch 10682 RMD160 53dd38d52f2b38fb28dfb670d6fd27e47a562bbb SHA1 6057a076110d469fb63e56e57711d281221f9b42 SHA256 5e38046cfb727420e5b4b19d71c7fb4ddff22cbcc356c9f888763b0c1963d389
AUX grub.conf.gentoo 627 RMD160 d90fb4373bad476f98ec9c5065d6cdfd9e3b706f SHA1 004f2fc04605ec9190de0a87e7df8bbc33daff89 SHA256 914b15af252210a32776196437cd8013e10e57d5780e66877ef3fe9a2b4b9776
-AUX grub.default 1229 RMD160 457cd4cac9c8d8a6edf5ae347c13f5f3feeea734 SHA1 cdeb5d577df33d340bf233fec76fdefa6251d25f SHA256 1ca3065f28c72043036fdc19565e66b1315928c725765463b2c6037e04deb1c5
+AUX grub.default 1254 RMD160 06e05de60133cc1e31769c6106031fe59de46053 SHA1 4fc3138fe313707bfdd307d4538bfc98c14c4cbc SHA256 181bdb7433ebcbde635e7058a1febaf0100e4e9c83ea4fd222d7010c375882d8
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
@@ -26,6 +26,7 @@ DIST grub-0.97-patches-1.8.tar.bz2 48274 RMD160 99c967daca704e853e9d161a51db3d39
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.99.tar.xz 2639224 RMD160 d59a47fa40b2be0d5ea5b2b00ff5538cfa147747 SHA1 a5ae9558f30ce7757a76aa130088b053a87e2fb6 SHA256 f308148d4c83c6f16a73b58a0cd39381656edb740929028cae7ad5f0d651021b
+DIST grub-2.00~beta0.tar.xz 4833964 RMD160 8c3f6b1a54d028c4fa4e181e1b1bfc4e401e4414 SHA1 de5aadcfb8e0a52de8870560ebfb30dc62adaf44 SHA256 e96e81341e7cf931721cbdd2cff1f4aeb643566aad6ab0bcf97173821409019a
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 3344 RMD160 ad8adeda7d3da0bec327de95ca6af74ba5d9bfb3 SHA1 cd392ee540c944a55d2a7b519dca64bcd9f616bc SHA256 ac10bab29fc22b230c2a2e0e7fea5788fb0131bd61a5285c0f007db1a60acf0f
@@ -42,23 +43,14 @@ EBUILD grub-0.97-r8.ebuild 8941 RMD160 4caee80e02de14e6a88a3ab016df32f90c258f09
EBUILD grub-0.97-r9.ebuild 9045 RMD160 5db30743506d7ae274695a94bd1c7c5fea8003e2 SHA1 4796cd56c8e77239719bd31a0542b11129e7922f SHA256 153939f732549503f08dd2acff27325b3e398ffc065e16c1749281c6c66a97d5
EBUILD grub-0.97.ebuild 4242 RMD160 9bb0b20da4d7c66b099cf478f6e0f05be6659085 SHA1 e19eae0a05492981cdb64c5a820d1060580f264a SHA256 3e00e668fd389a3187c8403a609cad1f19e0d93d2e7778791212d1c3a0b57c4d
EBUILD grub-1.99-r2.ebuild 8300 RMD160 6df4c87f96f1a7e080a6c19ef2a74bdf08a8e5d3 SHA1 5b060d6c45ef8bfa248e91d3832606c377fbe782 SHA256 6431497cdb3591e4804723b6ea3678e8554bf40a840782dd4a3b1f9bcd6c3513
-EBUILD grub-9999.ebuild 8024 RMD160 6471f3f7ad97d5bddf402b2b012dab80fa3175e6 SHA1 d9ca6820fbd80cb6f1097e35ed1257b3b4233e99 SHA256 a6a6c328482aec8aa1e6b2225991e6ab151f396557ca506dc155396388cad772
-MISC ChangeLog 36016 RMD160 cad8d78ba84f4aa0c56c00c12a759e287e6c1876 SHA1 f2f992ed1680891a2190b06859276e515d05ba78 SHA256 b56e7848203629b0dc2e7a1a3b6fc1bc60a5c1b9949fd13bb0c065a9e4eca6cf
-MISC metadata.xml 339 RMD160 755d01714b2122044f91caa8edd71b0ee4436d8e SHA1 4383abb52e4eb0cbe5215f9b0d86f3977eeee674 SHA256 62efb79ff5e2adec3535622af752bbb291b5b6c130094447364c567a5ff2e1ca
+EBUILD grub-2.00_beta0.ebuild 6195 RMD160 2240e100c77bb3a50962cc73bd7780d4ead12322 SHA1 81443e0fdc38c047cc58857d7e4d77886f5903d6 SHA256 b36d2be3cb676e281c72f7490ea840c119f9bbf92e2d408ff0339c2120659e62
+EBUILD grub-9999.ebuild 6190 RMD160 bf6f7a745af2e6e86705536fe2881c4b007e971d SHA1 c6d9c3ebc25179706ae557a156b0e1c52ec49921 SHA256 c471c0c219f7e9b0b8038f7bb473ef7819a0495c9f2c3530581aa01110303738
+MISC ChangeLog 36436 RMD160 60e055b33013e6bcab82e45de88e3c51b6a5f130 SHA1 6905beb0d2b8dde858e63b6c54e56ebd6577c0d8 SHA256 29043dd9a238804072989d5d71119abb302f05e029c5dc84ee87401613a9cf12
+MISC metadata.xml 673 RMD160 2181a768c776eed3e76c3604a2a0c03be360aa06 SHA1 0434ff5fb3b8702ca4a4661240ed08cfb06c529c SHA256 e14e5e46b726a3645b85217a2afbd5b04adb54990c7db837e01a50a8322d81b9
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
-iQIcBAEBAgAGBQJPJmAaAAoJEOSiRoyO7jvomtYP/0AszzWOv7eL7ZAuZb7b1qR9
-B4cqyVSGl5DJaIxC2v+4SuBSUZ+MVsfd5nFeWxlBZD9tft+BHBJClGIlGetwxKCM
-pxlmsOlLTl6BlosYVb5r/DhMrctGKVr8AnkMt286lNZbaILCzBLnV0HDI23M9n2o
-bayVpV+db1tBM2PfZ0gig4A/KVTTET+uJ7bSr/pnKSGS8RCKoyqEjhMHRgSisSN+
-3lbWFMjZTp/vcUR0kQRIcfuwHHMADZtxO2aogPT6NVUWm4lSe0hCzAEIlYTd5N2T
-RCTfUUxW2g6IlC7o5/+mEMIRS+y6WL4rgFOWDo/WvGnUcRSVcJdpvh5KeW3kdVlS
-FIeE9gcLCbVn27S+ulqW2a0ZIYzKb2bxf0bCz6y3TTfJs4Bw58hTZg2D8i4W7mPJ
-QxlvlaUNSA+UkzGBMZJQcYE0sC7r76S3RZAf3ewa5QaEtOIZrGE2NuB4a5Vet120
-xsV+VYpVjQimFaDhkDgNVOzq193sat/lcn6S1K/fZcwBFwInseYCZBfyJsyTZCCQ
-oGVlJwkYxxKWUZo6gzrd4X+UZEa70hqM+Rflo6UTFO/3MIkXBZa9GjR7ADDuClbz
-DulO6tPS1oL5LXxzjYMQYwO0PB8Dg4MSJ341j6qZFmjSw2EoQuY5JzAZClajMY1B
-a0rRBq6abVuL3qPoDbm8
-=8WYG
+iF4EAREIAAYFAk9NhN0ACgkQC77qH+pIQ6ShQwD/W/oVsHkpa39Spyq81Mo+e29W
+cWQZeqyMLzZ3XKl2Ad8A/RwnvNlBOeOztR64F7KRrGrnOv4yn9m9LBX6Rp/vmkHm
+=v/K6
-----END PGP SIGNATURE-----
diff --git a/sys-boot/grub/files/grub.default b/sys-boot/grub/files/grub.default
index 580d27580fa3..061e4d1b9de7 100644
--- a/sys-boot/grub/files/grub.default
+++ b/sys-boot/grub/files/grub.default
@@ -1,6 +1,6 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2012 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.2 2011/08/30 06:45:04 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/files/grub.default,v 1.3 2012/02/29 01:52:23 floppym Exp $
#
# To populate all changes in this file you need to regenerate your
# grub configuration file afterwards:
@@ -9,6 +9,8 @@
# 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
diff --git a/sys-boot/grub/grub-2.00_beta0.ebuild b/sys-boot/grub/grub-2.00_beta0.ebuild
new file mode 100644
index 000000000000..e71083dbffd2
--- /dev/null
+++ b/sys-boot/grub/grub-2.00_beta0.ebuild
@@ -0,0 +1,258 @@
+# 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-2.00_beta0.ebuild,v 1.1 2012/02/29 01:52:22 floppym Exp $
+
+EAPI=4
+
+if [[ ${PV} == "9999" ]] ; then
+ EBZR_REPO_URI="http://bzr.savannah.gnu.org/r/grub/trunk/grub/"
+ LIVE_ECLASS="bzr"
+ SRC_URI=""
+ DO_AUTORECONF="true"
+else
+ MY_P=${P/_/\~}
+ if [[ ${PV} == *_alpha* || ${PV} == *_beta* ]]; then
+ SRC_URI="http://alpha.gnu.org/gnu/${PN}/${MY_P}.tar.xz"
+ else
+ SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.xz
+ mirror://gentoo/${MY_P}.tar.xz"
+ fi
+ # Masked until documentation guys consolidate the guide and approve
+ # it for usage.
+ #KEYWORDS="~amd64 ~mips ~x86"
+ S=${WORKDIR}/${MY_P}
+fi
+
+inherit eutils flag-o-matic pax-utils toolchain-funcs ${DO_AUTORECONF:+autotools} ${LIVE_ECLASS}
+unset LIVE_ECLASS
+
+DESCRIPTION="GNU GRUB boot loader"
+HOMEPAGE="http://www.gnu.org/software/grub/"
+
+LICENSE="GPL-3"
+SLOT="2"
+IUSE="custom-cflags debug device-mapper efiemu mount nls static sdl truetype libzfs"
+
+GRUB_PLATFORMS=(
+ # everywhere:
+ emu
+ # mips only:
+ qemu-mips yeeloong
+ # amd64, x86, ppc, ppc64:
+ ieee1275
+ # amd64, x86:
+ coreboot multiboot efi-32 pc qemu
+ # amd64:
+ efi-64
+)
+IUSE+=" ${GRUB_PLATFORMS[@]/#/grub_platforms_}"
+
+# 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 )
+ libzfs? ( sys-fs/zfs )
+ mount? ( sys-fs/fuse )
+ truetype? ( media-libs/freetype >=media-fonts/unifont-5 )"
+DEPEND="${RDEPEND}
+ >=dev-lang/python-2.5.2
+ sys-devel/flex
+ virtual/yacc
+ sys-apps/texinfo
+"
+if [[ -n ${DO_AUTORECONF} ]] ; 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="
+ usr/bin/grub*
+ usr/sbin/grub*
+ usr/lib*/grub/*/*.mod
+ usr/lib*/grub/*/kernel.exec
+ usr/lib*/grub/*/kernel.img
+ usr/lib*/grub/*/setjmp.module
+"
+
+QA_WX_LOAD="
+ usr/lib*/grub/*/kernel.exec
+ usr/lib*/grub/*/kernel.img
+ usr/lib*/grub/*/*.image
+"
+
+QA_PRESTRIPPED="
+ usr/lib.*/grub/.*/kernel.img
+"
+
+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
+ local transform="grub2"
+ local with_platform
+
+ [[ -z ${platform} ]] && die "${FUNCNAME} [platform]"
+
+ if [[ ${platform} != "guessed" ]]; then
+ transform="grub2-${platform}"
+ fi
+
+ # check if we have to specify the target (EFI)
+ # or just append correct --with-platform
+ 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
+ with_platform="
+ --with-platform=${platform/-*}
+ --target=${target}
+ --program-prefix=
+ "
+ elif [[ ${platform} != "guessed" ]]; then
+ with_platform=" --with-platform=${platform}"
+ fi
+
+ ECONF_SOURCE="${S}" \
+ econf \
+ --disable-werror \
+ --program-transform-name="s,grub,${transform}," \
+ --with-grubdir=grub2 \
+ $(use_enable debug mm-debug) \
+ $(use_enable debug grub-emu-usb) \
+ $(use_enable device-mapper) \
+ $(use_enable efiemu) \
+ $(use_enable mount grub-mount) \
+ $(use_enable nls) \
+ $(use_enable truetype grub-mkfont) \
+ $(use_enable libzfs) \
+ $(use sdl && use_enable debug grub-emu-sdl) \
+ ${with_platform}
+}
+
+grub_src_compile() {
+ default_src_compile
+ pax-mark -mpes "${grub_binaries[@]}"
+}
+
+grub_src_install() {
+ default_src_install
+}
+
+src_prepare() {
+ local i j
+
+ epatch_user
+
+ # fix texinfo file name, as otherwise the grub2.info file will be
+ # useless
+ sed -i \
+ -e '/setfilename/s:grub.info:grub2.info:' \
+ -e 's:(grub):(grub2):' \
+ docs/grub.texi
+
+ # autogen.sh does more than just run autotools
+ if [[ -n ${DO_AUTORECONF} ]] ; 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"
+ elog "Going to build following platforms: ${GRUB_ENABLED_PLATFORMS}"
+}
+
+src_configure() {
+ local i
+
+ use custom-cflags || unset CFLAGS CPPFLAGS LDFLAGS
+ use libzfs && addpredict /etc/dfs
+ use static && append-ldflags -static
+
+ for i in ${GRUB_ENABLED_PLATFORMS}; do
+ grub_run_phase ${FUNCNAME} ${i}
+ done
+}
+
+src_compile() {
+ # Used for pax marking in grub_src_compile
+ local grub_binaries=(
+ grub-editenv
+ grub-fstest
+ grub-menulst2cfg
+ grub-mkimage
+ grub-mklayout
+ grub-mkpasswd-pbkdf2
+ grub-mkrelpath
+ grub-script-check
+ grub-bios-setup
+ grub-ofpathname
+ grub-probe
+ grub-sparc64-setup
+ )
+ use mount && grub_binaries+=( grub-mount )
+ use truetype && grub_binaries+=( grub-mkfont )
+
+ 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
+
+ mv "${ED}"usr/share/info/grub{,2}.info || die
+
+ # can't be in docs array as we use default_src_install in different builddir
+ dodoc AUTHORS ChangeLog NEWS README THANKS TODO
+ insinto /etc/default
+ newins "${FILESDIR}"/grub.default grub
+}
+
+pkg_postinst() {
+ # display the link to guide
+ elog "For information on how to configure grub-2 please refer to the guide:"
+ elog " http://dev.gentoo.org/~scarabeus/grub-2-guide.xml"
+}
diff --git a/sys-boot/grub/grub-9999.ebuild b/sys-boot/grub/grub-9999.ebuild
index c3aaddfe4630..19136334da1a 100644
--- a/sys-boot/grub/grub-9999.ebuild
+++ b/sys-boot/grub/grub-9999.ebuild
@@ -1,6 +1,6 @@
# 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-9999.ebuild,v 1.49 2012/01/30 09:14:59 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-9999.ebuild,v 1.50 2012/02/29 01:52:22 floppym Exp $
EAPI=4
@@ -11,15 +11,19 @@ if [[ ${PV} == "9999" ]] ; then
DO_AUTORECONF="true"
else
MY_P=${P/_/\~}
- SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.xz
+ if [[ ${PV} == *_alpha* || ${PV} == *_beta* ]]; then
+ SRC_URI="http://alpha.gnu.org/gnu/${PN}/${MY_P}.tar.xz"
+ else
+ SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.xz
mirror://gentoo/${MY_P}.tar.xz"
+ fi
# Masked until documentation guys consolidate the guide and approve
# it for usage.
#KEYWORDS="~amd64 ~mips ~x86"
S=${WORKDIR}/${MY_P}
fi
-inherit mount-boot eutils flag-o-matic pax-utils toolchain-funcs ${DO_AUTORECONF:+autotools} ${LIVE_ECLASS}
+inherit eutils flag-o-matic pax-utils toolchain-funcs ${DO_AUTORECONF:+autotools} ${LIVE_ECLASS}
unset LIVE_ECLASS
DESCRIPTION="GNU GRUB boot loader"
@@ -27,7 +31,7 @@ HOMEPAGE="http://www.gnu.org/software/grub/"
LICENSE="GPL-3"
SLOT="2"
-IUSE="custom-cflags debug device-mapper efiemu nls static sdl truetype"
+IUSE="custom-cflags debug device-mapper efiemu mount nls static sdl truetype libzfs"
GRUB_PLATFORMS=(
# everywhere:
@@ -54,6 +58,8 @@ RDEPEND="
sdl? ( media-libs/libsdl )
)
device-mapper? ( >=sys-fs/lvm2-2.02.45 )
+ libzfs? ( sys-fs/zfs )
+ mount? ( sys-fs/fuse )
truetype? ( media-libs/freetype >=media-fonts/unifont-5 )"
DEPEND="${RDEPEND}
>=dev-lang/python-2.5.2
@@ -67,27 +73,25 @@ else
DEPEND+=" app-arch/xz-utils"
fi
-export STRIP_MASK="*/grub*/*/*.{mod,img}"
+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
+ usr/bin/grub*
+ usr/sbin/grub*
+ usr/lib*/grub/*/*.mod
+ usr/lib*/grub/*/kernel.exec
+ usr/lib*/grub/*/kernel.img
+ usr/lib*/grub/*/setjmp.module
"
QA_WX_LOAD="
- lib*/grub2/*/kernel.img
- lib*/grub2/*/setjmp.mod
+ usr/lib*/grub/*/kernel.exec
+ usr/lib*/grub/*/kernel.img
+ usr/lib*/grub/*/*.image
+"
+
+QA_PRESTRIPPED="
+ usr/lib.*/grub/.*/kernel.img
"
grub_run_phase() {
@@ -110,50 +114,52 @@ grub_run_phase() {
grub_src_configure() {
local platform=$1
local target
+ local transform="grub2"
+ local with_platform
[[ -z ${platform} ]] && die "${FUNCNAME} [platform]"
- # if we have no platform then --with-platform=guessed does not work
- [[ ${platform} == "guessed" ]] && platform=""
+ if [[ ${platform} != "guessed" ]]; then
+ transform="grub2-${platform}"
+ fi
# 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
+ 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
+ with_platform="
+ --with-platform=${platform/-*}
+ --target=${target}
+ --program-prefix=
+ "
+ elif [[ ${platform} != "guessed" ]]; then
+ with_platform=" --with-platform=${platform}"
fi
- ECONF_SOURCE="${WORKDIR}/${P}/" \
+ ECONF_SOURCE="${S}" \
econf \
--disable-werror \
- --sbindir=/sbin \
- --bindir=/bin \
- --libdir=/$(get_libdir) \
- --program-transform-name=s,grub,grub2, \
+ --program-transform-name="s,grub,${transform}," \
+ --with-grubdir=grub2 \
$(use_enable debug mm-debug) \
$(use_enable debug grub-emu-usb) \
$(use_enable device-mapper) \
$(use_enable efiemu) \
+ $(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}
}
grub_src_compile() {
default_src_compile
+ pax-mark -mpes "${grub_binaries[@]}"
}
grub_src_install() {
@@ -161,7 +167,7 @@ grub_src_install() {
}
src_prepare() {
- local i j archs
+ local i j
epatch_user
@@ -170,7 +176,7 @@ src_prepare() {
sed -i \
-e '/setfilename/s:grub.info:grub2.info:' \
-e 's:(grub):(grub2):' \
- "${S}"/docs/grub.texi
+ docs/grub.texi
# autogen.sh does more than just run autotools
if [[ -n ${DO_AUTORECONF} ]] ; then
@@ -196,6 +202,7 @@ src_configure() {
local i
use custom-cflags || unset CFLAGS CPPFLAGS LDFLAGS
+ use libzfs && addpredict /etc/dfs
use static && append-ldflags -static
for i in ${GRUB_ENABLED_PLATFORMS}; do
@@ -204,6 +211,24 @@ src_configure() {
}
src_compile() {
+ # Used for pax marking in grub_src_compile
+ local grub_binaries=(
+ grub-editenv
+ grub-fstest
+ grub-menulst2cfg
+ grub-mkimage
+ grub-mklayout
+ grub-mkpasswd-pbkdf2
+ grub-mkrelpath
+ grub-script-check
+ grub-bios-setup
+ grub-ofpathname
+ grub-probe
+ grub-sparc64-setup
+ )
+ use mount && grub_binaries+=( grub-mount )
+ use truetype && grub_binaries+=( grub-mkfont )
+
local i
for i in ${GRUB_ENABLED_PLATFORMS}; do
@@ -218,114 +243,16 @@ src_install() {
grub_run_phase ${FUNCNAME} ${i}
done
- # No need to move the info file with the live ebuild since we
- # already changed the generated file name during the preparation
- # phase.
- if [[ ${PV} != "9999" ]]; then
- # slot all collisions with grub legacy
- mv "${ED}"/usr/share/info/grub.info \
- "${ED}"/usr/share/info/grub2.info || die
- fi
-
- # Do pax marking
- local PAX=(
- "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-editenv"
- "bin/grub2-mkimage"
- )
- for e in ${PAX[@]}; do
- pax-mark -mpes "${ED}/${e}"
- done
+ mv "${ED}"usr/share/info/grub{,2}.info || die
# can't be in docs array as we use default_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
-
- elog
- elog "To configure GRUB 2, check the defaults in /etc/default/grub and"
- elog "then run 'emerge --config =${CATEGORY}/${PF}'."
-
- # display the link to guide
- show_doc_url
}
-show_doc_url() {
- elog
- elog "For informations how to configure grub-2 please refer to the guide:"
+pkg_postinst() {
+ # display the link to guide
+ elog "For information on how to configure grub-2 please refer to the guide:"
elog " http://dev.gentoo.org/~scarabeus/grub-2-guide.xml"
}
-
-setup_boot_dir() {
- local dir=$1
- local use_legacy='n'
-
- # Make sure target directory exists
- mkdir -p "${dir}"
-
- if [[ -e ${dir/2/}/menu.lst ]] ; then
- # Legacy config exists, ask user what to do
- einfo "Found legacy GRUB configuration. Do you want to convert it"
- einfo "instead of using autoconfig (y/N)?"
- read use_legacy
-
- use_legacy=${use_legacy,,[A-Z]}
- fi
-
- if [[ ${use_legacy} == y* ]] ; then
- grub1_cfg=${dir/2/}/menu.lst
- grub2_cfg=${dir}/grub.cfg
-
- # GRUB legacy configuration exists. Use it instead of doing
- # our normal autoconfigure.
- #
-
- einfo "Converting legacy config at '${grub1_cfg}' for use by GRUB2."
- ebegin "Running: grub2-menulst2cfg '${grub1_cfg}' '${grub2_cfg}'"
- grub2-menulst2cfg "${grub1_cfg}" "${grub2_cfg}" &> /dev/null
- eend $?
-
- ewarn
- ewarn "Even though the conversion above succeeded, you are STRONGLY"
- ewarn "URGED to upgrade to the new GRUB2 configuration format."
-
- # Remind the user about the documentation
- show_doc_url
- else
- # Run GRUB 2 autoconfiguration
- einfo "Running GRUB 2 autoconfiguration."
- ebegin "grub2-mkconfig -o '${dir}/grub.cfg'"
- grub2-mkconfig -o "${dir}/grub.cfg" &> /dev/null
- eend $?
- fi
-
- einfo
- einfo "Remember to run grub2-install to activate GRUB2 as your default"
- einfo "bootloader."
-}
-
-pkg_config() {
- local dir
-
- mount-boot_mount_boot_partition
-
- einfo "Enter the directory where you want to setup grub2 ('${ROOT}boot/grub2/'):"
- read dir
-
- [[ -z ${dir} ]] && dir="${ROOT}"boot/grub2
-
- setup_boot_dir "${dir}"
-
- mount-boot_pkg_postinst
-}
diff --git a/sys-boot/grub/metadata.xml b/sys-boot/grub/metadata.xml
index dca555ea2852..2cf8c3a38a43 100644
--- a/sys-boot/grub/metadata.xml
+++ b/sys-boot/grub/metadata.xml
@@ -2,6 +2,13 @@
<!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="&gt;=sys-boot/grub-2">
+ <email>floppym@gentoo.org</email>
+ <name>Mike Gilbert</name>
+</maintainer>
<use>
<flag name='device-mapper'>
Enable support for <pkg>sys-fs/device-mapper</pkg>
@@ -9,5 +16,11 @@
<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>
</use>
</pkgmetadata>