From 05043ef6afb15bff90673200e475208f1fefb827 Mon Sep 17 00:00:00 2001 From: randomdan Date: Fri, 13 May 2011 18:25:13 +0000 Subject: 1.99_rc2 works with LVM mirrors --- sys-boot/grub/Manifest | 4 ++ sys-boot/grub/files/defaults | 30 +++++++++ sys-boot/grub/files/grub.conf.gentoo | 16 +++++ sys-boot/grub/grub-1.99_rc2.ebuild | 115 +++++++++++++++++++++++++++++++++++ 4 files changed, 165 insertions(+) create mode 100644 sys-boot/grub/files/defaults create mode 100644 sys-boot/grub/files/grub.conf.gentoo create mode 100644 sys-boot/grub/grub-1.99_rc2.ebuild (limited to 'sys-boot/grub') diff --git a/sys-boot/grub/Manifest b/sys-boot/grub/Manifest index 76f4520..36651ef 100644 --- a/sys-boot/grub/Manifest +++ b/sys-boot/grub/Manifest @@ -1 +1,5 @@ +AUX defaults 1020 RMD160 48ce6914d693bef9db7f41afecb92c18715ffb7f SHA1 af556abd7deb0d0939f4766df265aa6882707cbe SHA256 302a0cfa6e1f6acf52f5d558cd03f3631313a4b95de038f10f740439ea0a921f +AUX grub.conf.gentoo 627 RMD160 d90fb4373bad476f98ec9c5065d6cdfd9e3b706f SHA1 004f2fc04605ec9190de0a87e7df8bbc33daff89 SHA256 914b15af252210a32776196437cd8013e10e57d5780e66877ef3fe9a2b4b9776 +DIST grub-1.99~rc2.tar.gz 4297065 RMD160 aadf6d9eb554c7201bcd1a1b72bbe49ec88fdfcd SHA1 1cd0b6a805266eddfb903223b0accd2edf58e563 SHA256 ea8f243c95851d58d34ac04910929395790e9b9383d6deb2bb6750435bc3e7bd +EBUILD grub-1.99_rc2.ebuild 3111 RMD160 bad47d5d9278f11ba82838e1d83b86775ea7ecaa SHA1 0abe5845e48c449b7a672f86dd40a4b25155beab SHA256 f662f9fced59aa161ea3429310f29c27db3d019bf0ea3c139c3ca117c5b20da2 EBUILD grub-9999-r2931.ebuild 3013 RMD160 c53ad65c9a817ac8a788e74c06621c63f2427905 SHA1 256854d5b3c7e99c755192eaa4cf86ffc090f423 SHA256 22d991f55851d7e3084f749258003e91d89beb65a905ad9bf06a66b1dfd5e846 diff --git a/sys-boot/grub/files/defaults b/sys-boot/grub/files/defaults new file mode 100644 index 0000000..25e5909 --- /dev/null +++ b/sys-boot/grub/files/defaults @@ -0,0 +1,30 @@ +# /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.conf.gentoo b/sys-boot/grub/files/grub.conf.gentoo new file mode 100644 index 0000000..0027099 --- /dev/null +++ b/sys-boot/grub/files/grub.conf.gentoo @@ -0,0 +1,16 @@ +# 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: diff --git a/sys-boot/grub/grub-1.99_rc2.ebuild b/sys-boot/grub/grub-1.99_rc2.ebuild new file mode 100644 index 0000000..4e8f078 --- /dev/null +++ b/sys-boot/grub/grub-1.99_rc2.ebuild @@ -0,0 +1,115 @@ +# 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.3 2011/04/10 14:34:42 ulm 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" +[[ ${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_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 +} + +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 +} -- cgit v1.2.3