diff options
author | Richard Yao <ryao@gentoo.org> | 2012-05-29 09:48:00 +0000 |
---|---|---|
committer | Richard Yao <ryao@gentoo.org> | 2012-05-29 09:48:00 +0000 |
commit | af9c274f3ff458a5a94228f1d8fc89c87e174f0a (patch) | |
tree | 84457f6745bbf973c1108bdbd2138a9c9676b028 /sys-boot | |
parent | Bump haskeline to 0.6.4.7 (diff) | |
download | historical-af9c274f3ff458a5a94228f1d8fc89c87e174f0a.tar.gz historical-af9c274f3ff458a5a94228f1d8fc89c87e174f0a.tar.bz2 historical-af9c274f3ff458a5a94228f1d8fc89c87e174f0a.zip |
Add xarthisius' patch for bug #360513 to GRUB 0.97 patchset, reviewed by myself and jdhore, approved by Chainsaw in IRC
Package-Manager: portage-2.1.10.49/cvs/Linux x86_64
Diffstat (limited to 'sys-boot')
-rw-r--r-- | sys-boot/grub/ChangeLog | 8 | ||||
-rw-r--r-- | sys-boot/grub/Manifest | 13 | ||||
-rw-r--r-- | sys-boot/grub/grub-0.97-r11.ebuild | 291 |
3 files changed, 300 insertions, 12 deletions
diff --git a/sys-boot/grub/ChangeLog b/sys-boot/grub/ChangeLog index f5d240d0315d..b30986ea320a 100644 --- a/sys-boot/grub/ChangeLog +++ b/sys-boot/grub/ChangeLog @@ -1,6 +1,12 @@ # 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.203 2012/05/18 15:01:23 josejx Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/ChangeLog,v 1.204 2012/05/29 09:48:00 ryao Exp $ + +*grub-0.97-r11 (29 May 2012) + + 29 May 2012; Richard Yao <ryao@gentoo.org> +grub-0.97-r11.ebuild: + Add xarthisius' patch for bug #360513 to GRUB 0.97 patchset, reviewed by + myself and jdhore, approved by Chainsaw in IRC 18 May 2012; Joseph Jezak <josejx@gentoo.org> grub-1.99-r2.ebuild, grub-2.00_beta5.ebuild, grub-9999.ebuild: diff --git a/sys-boot/grub/Manifest b/sys-boot/grub/Manifest index a9e81cdb87e6..ad916a507266 100644 --- a/sys-boot/grub/Manifest +++ b/sys-boot/grub/Manifest @@ -1,6 +1,3 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - 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 AUX 1.99-improve_devmapper.patch 7134 RMD160 a8dbf91626c607f5fec85235a2042b7e82ffd8d2 SHA1 d3684f80d5f319059ccee1f6822b5a96dd467258 SHA256 b12624944d129820966146d55693b325d48d5d56901727142e386be082661778 @@ -39,6 +36,7 @@ EBUILD grub-0.96-r1.ebuild 4459 RMD160 353f2e2f4fd65fa2169280df190b2d550246f69c EBUILD grub-0.96-r2.ebuild 4315 RMD160 936fb704e07141a6e3937ef7ae66678754c009c2 SHA1 560ec89ab79b67350990625736c222ac00fe73bf SHA256 47a243f251180b5e4a8695db5d81eceb90f4a3116c4abc088a1ed656ceadec9a EBUILD grub-0.96-r3.ebuild 4291 RMD160 3b74b0c268db8a403ee302aad3a3744a04e2cfd6 SHA1 f0763bf562e6a779b82964d9081567ea19dd6a92 SHA256 ce7a2a810dc1df885b6df4ba6e4bdb9e2db68954bd49ba7259b8e7a7532a49b2 EBUILD grub-0.97-r10.ebuild 9451 RMD160 f680b7bed349829f3b054679a8c89537b0ce82bc SHA1 b07b83aa87b6893fe7c377259c563416ba493246 SHA256 53bb4befba08aed721d0fee1807f00ecc2b6a64a59caf374f63e53e7bfebc385 +EBUILD grub-0.97-r11.ebuild 9449 RMD160 1cf70e1fde9edc08eb8bb1f13aa51f9631bbc317 SHA1 141d2947fd16558b25d8f7e4fa35b1638091d095 SHA256 7018db81773ccdb33754e47c9566d8f468eca9b9a5b525a015a598545acdd1cf EBUILD grub-0.97-r2.ebuild 4820 RMD160 7a8ac57870d9eb0787550091a10fe4ebf3c582a5 SHA1 adc2221a26ea0facd85b3c9b03d391a6e2afdc4c SHA256 e76d0df0f865851a7ed5aba91b4f275ad099d9dd61f897c8a27ac0df31880a2d EBUILD grub-0.97-r3.ebuild 4689 RMD160 0f5c44cab29f47eb1a3c7beb9506b4d3b62b7ef6 SHA1 17e7fcfded3c52fcd2a7a75a83fe28b0cb3ff67a SHA256 eb73b7a857dee8ad4e867be404179c64c18604c3abe12b3e674f69a6a6c4c177 EBUILD grub-0.97-r4.ebuild 4934 RMD160 10b75bb768ffa22b208f2720604669c4381588bf SHA1 95b4988ab97f22e791c38803d98525a76f5312f4 SHA256 f47a10c677c94ed9757923edcbf2e4c0e1dc4210e693852673a4b4e85686697b @@ -56,12 +54,5 @@ EBUILD grub-2.00_beta3-r2.ebuild 6692 RMD160 31ba77ba971c2c588d4c112d9e800cb2b44 EBUILD grub-2.00_beta3.ebuild 6488 RMD160 d0cbccc50d81e7b6e70c27c5309c2faec2ff3b44 SHA1 a2c074dcd6c535fb66a0ffb189dcf00394528772 SHA256 d39abf04dc1d6b4e03511647c3585ab8950b5778ec3a1fe0fe87de615b334477 EBUILD grub-2.00_beta5.ebuild 7006 RMD160 78c31378b2dc61507d53801bf38066ca04c75ee1 SHA1 b5dcffe2bfd062757d10fbae746e5351cc56526b SHA256 72916bb6f2adec657ae76fcfc1bf2b9ff0dcfaa7be133a64aa4e4903dc000b83 EBUILD grub-9999.ebuild 7001 RMD160 09593bb205094a9799a591f3f75e6b0d0133449d SHA1 24c93bbe9d151b328f5613c3db6feaea86e4b6d8 SHA256 3de57891f339c95b852ddca7cb9f203446a96b2a8164cfa7eb0efc0a266ce4cf -MISC ChangeLog 40450 RMD160 f52c55f1aebd3b2cc875eb7a143a26c5d96bdb9a SHA1 66f2942661cb3c12404dc863a992a66d0d4bc67f SHA256 d7baca243fa2cbbf6074a4454d9d736d2c62f3f5d96a88bb11ded36def9df9f5 +MISC ChangeLog 40671 RMD160 f4a8d28b20b7d7a15e6b46443195b2a9a736de1a SHA1 3c48ed62e0d24b1fa8f042afc46b2a0d610f6986 SHA256 d79169cdd0204f4720f16faea6de97b459c990414a13d0ee1ad8edd356a716ba MISC metadata.xml 673 RMD160 2181a768c776eed3e76c3604a2a0c03be360aa06 SHA1 0434ff5fb3b8702ca4a4661240ed08cfb06c529c SHA256 e14e5e46b726a3645b85217a2afbd5b04adb54990c7db837e01a50a8322d81b9 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.17 (GNU/Linux) - -iEYEARECAAYFAk+2ZEkACgkQcsIHjyDViGSQHACfUIIrU+mHKacUK97bh+WT0naj -2AUAoLUt7z2CjFlB0MJne015Mu407w9U -=a62H ------END PGP SIGNATURE----- diff --git a/sys-boot/grub/grub-0.97-r11.ebuild b/sys-boot/grub/grub-0.97-r11.ebuild new file mode 100644 index 000000000000..57f7ab3da151 --- /dev/null +++ b/sys-boot/grub/grub-0.97-r11.ebuild @@ -0,0 +1,291 @@ +# 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-r11.ebuild,v 1.1 2012/05/29 09:48:00 ryao 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 +# USE='static -ncurses -netboot -custom-cflags' \ +# GRUB_STATIC_PACKAGE_BUILDING=1 ebuild \ +# grub-${PVR}.ebuild package && \ +# cp -f ${PKGDIR}/${CAT}/${PF}.tbz2 ${DISTDIR}/grub-static-${PVR}.tar.bz2 + +inherit mount-boot eutils flag-o-matic toolchain-funcs autotools linux-info pax-utils + +PATCHVER="1.12" # 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() { + 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=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 "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 + + # 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 "${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() { + 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}" +} |