diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2010-06-25 06:19:58 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2010-06-25 06:19:58 +0000 |
commit | 222edbafcbbaf3ab1ccbeeb3c744c26777db1b83 (patch) | |
tree | b211930f00b07835bb8f069c31c515f8579a0e06 /sys-boot/grub | |
parent | Version bump to latest upstream stable (7.4.20) and testing (7.9.1) + old ver... (diff) | |
download | historical-222edbafcbbaf3ab1ccbeeb3c744c26777db1b83.tar.gz historical-222edbafcbbaf3ab1ccbeeb3c744c26777db1b83.tar.bz2 historical-222edbafcbbaf3ab1ccbeeb3c744c26777db1b83.zip |
New spin of 0.97 patchset fixes bugs: #160731 - DHCP vendorclass ; #200505, #231039 - garbled text with missing gfx ; #230905 - chainloading syslinux on logical partitions ; #259613 - KVM virtio device support ; #281246, #305283 - PaX/SSP/PIE support.
Package-Manager: portage-2.2_rc67/cvs/Linux x86_64
Diffstat (limited to 'sys-boot/grub')
-rw-r--r-- | sys-boot/grub/ChangeLog | 10 | ||||
-rw-r--r-- | sys-boot/grub/Manifest | 14 | ||||
-rw-r--r-- | sys-boot/grub/grub-0.97-r10.ebuild | 277 |
3 files changed, 289 insertions, 12 deletions
diff --git a/sys-boot/grub/ChangeLog b/sys-boot/grub/ChangeLog index ce2034318e4c..e2c764731f84 100644 --- a/sys-boot/grub/ChangeLog +++ b/sys-boot/grub/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for sys-boot/grub # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/ChangeLog,v 1.134 2010/05/08 17:21:09 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/ChangeLog,v 1.135 2010/06/25 06:19:58 robbat2 Exp $ + +*grub-0.97-r10 (25 Jun 2010) + + 25 Jun 2010; Robin H. Johnson <robbat2@gentoo.org> +grub-0.97-r10.ebuild: + New spin of 0.97 patchset fixes bugs: #160731 - DHCP vendorclass ; + #200505, #231039 - garbled text with missing gfx ; #230905 - chainloading + syslinux on logical partitions ; #259613 - KVM virtio device support ; + #281246, #305283 - PaX/SSP/PIE support. 08 May 2010; Mike Frysinger <vapier@gentoo.org> grub-1.98.ebuild, grub-9999.ebuild: diff --git a/sys-boot/grub/Manifest b/sys-boot/grub/Manifest index c4bdd6f93766..84e39cce4c86 100644 --- a/sys-boot/grub/Manifest +++ b/sys-boot/grub/Manifest @@ -1,6 +1,3 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA256 - 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.conf.gentoo 627 RMD160 d90fb4373bad476f98ec9c5065d6cdfd9e3b706f SHA1 004f2fc04605ec9190de0a87e7df8bbc33daff89 SHA256 914b15af252210a32776196437cd8013e10e57d5780e66877ef3fe9a2b4b9776 @@ -13,6 +10,7 @@ DIST grub-0.96-r1-gentoo-0.1.tar.bz2 47051 RMD160 6dea68ba610fd68c99cf2080648df9 DIST grub-0.96-r2-gentoo-0.1.tar.bz2 47639 RMD160 fceb2193a32e8657390045cfc390829aa056fd5d SHA1 9fcb15861e9c9ec4d46fa80a6c91402c7f3e05dc SHA256 78fabb16c53518a3e96b9984ee49258ed5cdf23b8c33591c38ddf84912ea7e6c DIST grub-0.96.tar.gz 985761 RMD160 33d0cbfaed2dc59975c0ffd9eef55ef46ab34aaa SHA1 2520b03c8990ffe900cfc4fabd800d1056014f48 SHA256 58ba90b7256b1d2a920a7d89eac73ccab01916745f698cbe4fe1c853637ab9ba DIST grub-0.97-patches-1.0.tar.bz2 46259 RMD160 8c16108b1bf75d373f4d9a2f083699139ff62753 SHA1 36184739f02b582bbe76857d83aae7ea81a06e7e SHA256 b3b9f1998e42684b452cf9793523a1654af8fdf82ab208a8731a32c8eeaacb8f +DIST grub-0.97-patches-1.10.tar.bz2 55105 RMD160 41910bd4101a6d487c0b6f0312e4fa188cd6b14e SHA1 eb7b0b06817a411d046b35dea7963dd18b88519a SHA256 09864686a1b017ee3f549e649e09507b6767026c6c84ece677d23429569db004 DIST grub-0.97-patches-1.2.tar.bz2 20872 RMD160 7d91e01873f52daad271eda85e67f031e72570c9 SHA1 d9a11b6142931baeb8d13adb06fc86706ea17e3d SHA256 0a41e076ce1c1dd92b4eaac2905ebd5624162b5258ed0cb234889fa8beb38049 DIST grub-0.97-patches-1.4.tar.bz2 24693 RMD160 6afefff73b5f3ab5c6d05563c4f67f37dbfce16c SHA1 7c26a941467b58380747c9d1e07c14dfc3998b10 SHA256 290dd96fdeb9471c516f061f4949ccda33f8d03ab81a6e2beb5005b3022e71da DIST grub-0.97-patches-1.7.tar.bz2 31190 RMD160 f72f956c36d07e914bb7b4512ff9c88349123ab0 SHA1 6c5e011a8a55fc986abc84c43d59266a42f2ac9c SHA256 6dfb17ff874ce8f737211a728c319a133b90e3633a80daf5ef370c15ee625389 @@ -26,6 +24,7 @@ EBUILD grub-0.94-r1.ebuild 3533 RMD160 d8c0867e559d32f667257436a82739cf76f7692a EBUILD grub-0.96-r1.ebuild 4747 RMD160 1fbaf2c1e712baf3cd7124b6e9ba58ba63ce631a SHA1 3e877e57f4a7618c7a3ebe374fa9f5ae39aae3f4 SHA256 a000bb83287a7d46a5637b60e477d8fedbf8c2b465074edf1ba3b21bca95a374 EBUILD grub-0.96-r2.ebuild 4349 RMD160 8b59e7b7bcf02f6e6698bf785950988c71907e26 SHA1 5f068f5fcfd05a7769814d6fae868f77dea2ccf9 SHA256 cbaae5c519231d853e28e9a2799b08544e8b2a97c93d1905a21244d385b0e20c EBUILD grub-0.96-r3.ebuild 4580 RMD160 f0c3d0697bf808afa9e24c9a0acb007b8473e53b SHA1 2d7dd82a379afd847be5b129a090bb1e954ffd71 SHA256 2278f36b971d091471f39acd68902edf5e54fc88bc2d417e033fbf8128159e13 +EBUILD grub-0.97-r10.ebuild 8987 RMD160 c7b74b52dc6365deb3942a2b83c184be63dcde04 SHA1 0447332f0e7b865f69dd87bbc357f89ae5451f00 SHA256 0dfeeaf9cb7ee22359df9c53879f4c82c916f029f65f0c6dbe3c399557d749e7 EBUILD grub-0.97-r2.ebuild 4854 RMD160 e78aaa77647ba2d658b9a89e1926110997ce4b2b SHA1 a63f69d34080940651bd3cd928cd18a0ac9402ab SHA256 d15e83fdb06d5a9d4cce0a84352ca4a20bc3cc5dd7861a12f1a1a500dea25429 EBUILD grub-0.97-r3.ebuild 4723 RMD160 0becf2078d55ca28738106765ea54742c2aa209b SHA1 c0ce849f7273c070fed44cc4acddb2fecce6c2e5 SHA256 5f96e99ae205c151ea672842b5fd1708541d4efe16f79c03baf70fac5b1301b9 EBUILD grub-0.97-r4.ebuild 4967 RMD160 a24281663a2b5ca3452a044f18dcd1a231870812 SHA1 01cecc3f8505585fc28519ead7d524c3ace778b5 SHA256 1c40a3df3ba6b09ecce9f9d4bc934d342e23d19c5fc1c5eccda589e219bf6e8e @@ -36,12 +35,5 @@ EBUILD grub-0.97-r9.ebuild 8975 RMD160 14ff47a8de303aa73e2571ee1fcb1aae3f433be0 EBUILD grub-0.97.ebuild 4527 RMD160 bc8dec8916cd52bbd0403d3e504f8a407d9e897c SHA1 7fc00e33d980842ed65b242ac53522b51894fa7c SHA256 2c20b9c10a242d15b17b48d73e5136c7f350cd313f77dd177c54a08f663be02a EBUILD grub-1.98.ebuild 2826 RMD160 6860e3a286f21db8db722b5c994568cdb6f5a3d4 SHA1 0414bd2958168f95f2dd643ccb54252224eb57ff SHA256 06b7e4f20080fdab9c707472f108a67e659bcab497d964421b97150f11d3df1d EBUILD grub-9999.ebuild 2780 RMD160 2581018e303b3aec6edd2c15c6f5fc0b2833a7c9 SHA1 08f1fd19445df875ecb42904ddbc678a2889c0fc SHA256 2a73372384ebcdf8f3bc0d9fcddb2612de6cd10ed7d2be9d8757634ce93c462a -MISC ChangeLog 28153 RMD160 b7ee2554d9e21e79dd2b5d357efd5173d6864e2a SHA1 694e58b9b1b5a66e6b63271b003bd445b710bae9 SHA256 fec8f3211ecdddd1ab61269765c63f666118891be8a04a5dc08bb14ab609445a +MISC ChangeLog 28521 RMD160 7da978878776bf009a0ddca701abc229cf3fb963 SHA1 7c0f7f22f4c4eec75e31993cf3130f4e1fee736b SHA256 0d99f22abbce17af9f91e0b52cc22666f5f243768b132a77894d611f2e517bb5 MISC metadata.xml 262 RMD160 afabce9377772aefb54102e9ef237de6bb1561f5 SHA1 c38f9b99d8a84beb40c114283d8d7ddd4ac43d9e SHA256 35a9c56d9c8418806062854a360c27690d25159524df71f28bbd4d644e8706f3 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.14 (GNU/Linux) - -iF4EAREIAAYFAkvlnYcACgkQTwhj9JtAlp5jbgD/bdssVTuP78UgPdKE8cftM93/ -WrJ3SWaJ4JTHmaLoIQ4A/ArusnLhs3kK7p0mmDzKgxSFsFh8ZeOYohr/eFsQyPWR -=/j3p ------END PGP SIGNATURE----- diff --git a/sys-boot/grub/grub-0.97-r10.ebuild b/sys-boot/grub/grub-0.97-r10.ebuild new file mode 100644 index 000000000000..6c0a19f4bf6b --- /dev/null +++ b/sys-boot/grub/grub-0.97-r10.ebuild @@ -0,0 +1,277 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-0.97-r10.ebuild,v 1.1 2010/06/25 06:19:58 robbat2 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 mount-boot eutils flag-o-matic toolchain-funcs autotools linux-info + +PATCHVER="1.10" # 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 + ftp://alpha.gnu.org/gnu/${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" + +DEPEND="ncurses? ( + >=sys-libs/ncurses-5.2-r5 + amd64? ( app-emulation/emul-linux-x86-baselibs ) + )" +PROVIDE="virtual/bootloader" + +pkg_setup() { + local arch="$(tc-arch)" + case ${arch} in + amd64) CONFIG_CHECK='~IA32_EMULATION' check_extra_config ;; + esac +} + +src_unpack() { + unpack ${A} + cd "${S}" + + # patch breaks booting for some people #111885 + rm "${WORKDIR}"/patch/400_*reiser4* + + # 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=7 ;; + x86) GRUB_MAX_KERNEL_SIZE=3 ;; + 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 "Failed to hack memory size" + + 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} || die "netboot econf failed" + + emake w89c840_o_CFLAGS="-O" || die "making netboot stuff" + + mv -f stage2/{nbgrub,pxegrub} "${S}"/ + mv -f stage2/stage2 stage2/stage2.netboot + + make clean || die "make clean failed" + 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) \ + || die "econf failed" + + # 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 + make check || die "make check failed" +} + +src_install() { + emake DESTDIR="${D}" install || die + if use netboot ; then + exeinto /usr/lib/grub/${CHOST} + doexe nbgrub pxegrub stage2/stage2.netboot || die "netboot install" + fi + + 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 "${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}" +} |