diff --git a/sdk_container/src/third_party/portage-stable/sys-boot/grub/ChangeLog b/sdk_container/src/third_party/portage-stable/sys-boot/grub/ChangeLog new file mode 100644 index 0000000000..9fc44065a2 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-boot/grub/ChangeLog @@ -0,0 +1,1226 @@ +# ChangeLog for sys-boot/grub +# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/ChangeLog,v 1.250 2013/02/03 22:39:46 floppym Exp $ + + 03 Feb 2013; Mike Gilbert grub-2.00-r2.ebuild: + Restore keywords after testing. + +*grub-2.00-r2 (03 Feb 2013) + + 03 Feb 2013; Richard Yao + +files/grub-2.00-zfs-feature-flag-support.patch, +grub-2.00-r2.ebuild: + Add ZFS support for Feature Flags and LZ4 Compression from Illumos GRUB; A big + thanks goes to Massimo Maggi for 99.9% of the porting work. + + 19 Jan 2013; Matt Turner grub-2.00-r1.ebuild: + Add yeeloong? ( truetype ) to REQUIRED_USE, bug 452894. + + 19 Jan 2013; Mike Gilbert + files/grub-2.00-parallel-make.patch: + Update parallel make patch to fix bulding of emu platform. + + 13 Jan 2013; Mike Gilbert grub-2.00-r1.ebuild: + Fix dependency on xz-utils, reported by onox. + + 07 Jan 2013; Mike Gilbert + +files/grub-2.00-compression.patch, grub-2.00-r1.ebuild: + Include patch to fix module decompression, #424527 by Maxim Kammerer. + + 07 Jan 2013; Mike Gilbert grub-2.00-r1.ebuild: + A couple more FreeBSD changes. + + 07 Jan 2013; Mike Gilbert +files/grub-2.00-freebsd.patch, + grub-2.00-r1.ebuild: + Fixes for FreeBSD, bug 442050 by Yuta SATOH. + + 22 Oct 2012; Jeroen Roovers metadata.xml: + Fix maintainer Assignee/CC preferences. + + 20 Oct 2012; Mike Gilbert grub-2.00-r1.ebuild, + grub-9999.ebuild: + Add pkg_pretend check to bail out if we are using the gold linker. Bug 439082 + by Ambroz Bizjak. + + 18 Oct 2012; Christoph Junghans + +files/grub-2.00-hardcoded-awk.patch, grub-2.00-r1.ebuild, grub-9999.ebuild: + fixed hardcoded awk (bug #424137) + +*grub-2.00-r1 (16 Oct 2012) + + 16 Oct 2012; Mike Gilbert + +files/grub-2.00-tftp-endian.patch, +grub-2.00-r1.ebuild, -grub-2.00.ebuild, + grub-9999.ebuild: + Apply upstream patch to fix TFTP issue, bug 438612 by Alexander Zubkov. + + 11 Oct 2012; Mike Gilbert grub-2.00.ebuild, + grub-9999.ebuild: + Install modules in /usr/lib/grub. + + 22 Sep 2012; Mike Gilbert metadata.xml: + Clarify metadata. + + 07 Aug 2012; Markos Chandras grub-0.97-r12.ebuild: + Stable on amd64 wrt bug #418393 + + 06 Aug 2012; Agostino Sarubbo grub-0.97-r12.ebuild: + Stable for X86, wrt bug #418393 + + 24 Jul 2012; Mike Frysinger grub-0.97-r13.ebuild: + Touch up style/messages to match grub-static -- no functional changes. + + 23 Jul 2012; Ryan Hill grub-0.97-r13.ebuild: + Remove ebeep due to EAPI 4. Improve output readability. + +*grub-0.97-r13 (23 Jul 2012) + + 23 Jul 2012; Mike Frysinger +grub-0.97-r13.ebuild: + Update to EAPI=4 so we can depend on ncurses[static-libs] when building with + USE=static #427600 by Myckel Habets. + + 22 Jul 2012; Mike Gilbert + +files/grub-2.00-config-quoting.patch, -files/grub-2.00-gettext_printf.patch, + grub-2.00.ebuild, grub-9999.ebuild: + Replace previous patch with better version from upstream. + + 22 Jul 2012; Mike Gilbert + +files/grub-2.00-gettext_printf.patch, grub-2.00.ebuild, grub-9999.ebuild: + Fix problem with single quotes in translated messages in grub-mkconfig. Bug + 426364 by Alex Domingo. + + 18 Jul 2012; Mike Gilbert grub-2.00.ebuild, + grub-9999.ebuild: + Optionally install html docs, bug 426738 by Chris Mayo. + + 13 Jul 2012; Mike Gilbert grub-2.00.ebuild, + grub-9999.ebuild: + Add mulitprocessing.eclass magic to src_configure. + + 07 Jul 2012; Mike Gilbert + +files/grub-2.00-parallel-make.patch, -files/grub-2.00-manpage-race.patch, + grub-2.00.ebuild, grub-9999.ebuild: + Add additional fix for bug 424231. + + 05 Jul 2012; Mike Frysinger + +files/grub-2.00-no-gets.patch, grub-2.00.ebuild: + Fix building with glibc-2.16 #424703 by Martin Jansa. + + 01 Jul 2012; Mike Gilbert grub-2.00.ebuild, + grub-9999.ebuild: + Unset CCASFLAGS. Reported by tommy. + + 01 Jul 2012; Mike Gilbert + +files/grub-2.00-manpage-race.patch, + -files/grub-2.00-10_linux-genkernel.patch, grub-2.00.ebuild, grub-9999.ebuild: + Add patch to fix build race for bug 424231 by Wonko. + + 29 Jun 2012; Mike Gilbert grub-2.00.ebuild, + grub-9999.ebuild: + Extend workaround for sandbox bug 404013. + + 29 Jun 2012; Mike Gilbert grub-0.97-r12.ebuild: + grub-0.97 does not actually install files in /usr/lib, so don't copy that + directory's content to /boot/grub. + + 29 Jun 2012; Mike Gilbert grub-2.00.ebuild, + grub-9999.ebuild: + Replace lzo with xz-utils, bug 424045 by Andrey Volkov. + + 29 Jun 2012; Jeff Horelick grub-2.00.ebuild: + Keyword ~x86 wrt bug 424019 + + 29 Jun 2012; Mike Gilbert grub-2.00.ebuild, + grub-9999.ebuild: + Add ~amd64 keyword for grub:2. + + 29 Jun 2012; Mike Gilbert grub-2.00.ebuild, + grub-9999.ebuild: + Add required use for qemu/truetype, bug 405741 by jlec. + + 29 Jun 2012; Mike Gilbert grub-2.00.ebuild, + grub-9999.ebuild: + Depend on bison, bug 380019. + + 28 Jun 2012; Mike Gilbert files/grub.default-2: + Fix typos in grub.default, #424005 by Chris Mayo. + + 28 Jun 2012; Mike Gilbert grub-2.00.ebuild: + Add ewarn message with instructions for adding grub:0 to the world file. + +*grub-2.00 (28 Jun 2012) + + 28 Jun 2012; Tomáš Chvátal +files/grub.default-2, + -grub-2.00_beta0.ebuild, -grub-2.00_beta1.ebuild, -grub-2.00_beta2.ebuild, + -grub-2.00_beta2-r1.ebuild, -grub-2.00_beta3.ebuild, + -grub-2.00_beta3-r2.ebuild, -grub-2.00_beta5.ebuild, -grub-2.00_rc1.ebuild, + +grub-2.00.ebuild, grub-9999.ebuild: + Version bump to 2.00. Depend also on dejavu (otherwise starfield is not + distributed). Add info about themes to default config file. Remove older + betas/rcs apart from latest beta to ensure fallback if 2.00 has regressions. + +*grub-2.00_rc1 (25 Jun 2012) + + 25 Jun 2012; Mike Gilbert +grub-2.00_rc1.ebuild, + grub-9999.ebuild: + Version bump. Tweak efiemu configure option, bug 422835 by Rafał Mużyło. + + 17 Jun 2012; Mike Gilbert metadata.xml: + Remove redundant maintainer node. + + 09 Jun 2012; Mike Gilbert grub-9999.ebuild: + Stub out autopoint before calling eautoreconf. + + 05 Jun 2012; Mike Gilbert grub-9999.ebuild: + Call autoreconf directly (via autogen.sh) since eautoreconf insists on callign + autopoint. Bug 418081. + +*grub-2.00_beta6 (02 Jun 2012) + + 02 Jun 2012; Mike Gilbert +grub-2.00_beta6.ebuild, + grub-9999.ebuild: + Version bump. Fix links in grub2.info. #416035 by Martin Väth. + + 02 Jun 2012; Mike Frysinger grub-0.97-r12.ebuild: + Expand insns for creating grub-static binpkg so it runs more smoothly. + +*grub-0.97-r12 (31 May 2012) + + 31 May 2012; Mike Frysinger +grub-0.97-r12.ebuild: + Build stage1/stage2 with -march=i[3456]86 based on target tuple to keep + SSE/etc... insns from sneaking into the generated output #360513#115. + + 31 May 2012; Mike Frysinger grub-0.97-r3.ebuild, + grub-0.97-r4.ebuild, grub-0.97-r5.ebuild, grub-0.97-r6.ebuild, + grub-0.97-r8.ebuild, grub-0.97-r9.ebuild, grub-0.97-r10.ebuild, + grub-0.97-r11.ebuild, grub-1.99-r2.ebuild: + Inherit multilib eclass in ebuilds that use it. + + 29 May 2012; Kacper Kowalik grub-0.97-r11.ebuild: + Bump patchver and add it's digest + +*grub-0.97-r11 (29 May 2012) + + 29 May 2012; Richard Yao +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 grub-1.99-r2.ebuild, + grub-2.00_beta5.ebuild, grub-9999.ebuild: + Add runtime dep on tools required to find the OFPATH on PowerPC. + +*grub-2.00_beta5 (09 May 2012) + + 09 May 2012; Mike Gilbert +grub-2.00_beta5.ebuild, + grub-9999.ebuild: + Version bump. Should resolve bug 412497. Repleace dependencies on os-prober + and libisoburn with elog messages. + + 28 Apr 2012; Mike Gilbert grub-2.00_beta3-r2.ebuild, + grub-9999.ebuild: + Depend on static versions of bzip2, freetype, and zlib when USE=static. + +*grub-2.00_beta3-r2 (26 Apr 2012) + + 26 Apr 2012; Mike Gilbert +grub-2.00_beta3-r2.ebuild, + -grub-2.00_beta3-r1.ebuild, files/grub-2.00-10_linux-genkernel.patch: + Replace 10_linux patch with the changeset from upstream. + Bug 413505 by Jan De Luyck. + + 11 Apr 2012; Mike Gilbert + files/grub-2.00-10_linux-genkernel.patch: + Adjust patch to use uname -m in place of a shell glob. + + 11 Apr 2012; Mike Gilbert + files/grub-2.00-10_linux-genkernel.patch: + Remove real_root logic from patch, #411421 by Xake. + + 07 Apr 2012; Mike Gilbert grub-9999.ebuild: + Synchronize live ebuild. + +*grub-2.00_beta3-r1 (07 Apr 2012) + + 07 Apr 2012; Mike Gilbert + +files/grub-2.00-10_linux-genkernel.patch, +grub-2.00_beta3-r1.ebuild: + Add patch to support genkernel initramfs in 10_linux. + +*grub-2.00_beta3 (01 Apr 2012) + + 01 Apr 2012; Mike Gilbert +grub-2.00_beta3.ebuild: + Version bump. + + 24 Mar 2012; Mike Gilbert grub-2.00_beta2-r1.ebuild, + grub-9999.ebuild: + Point users at the quick start guide. + +*grub-2.00_beta2-r1 (20 Mar 2012) + + 20 Mar 2012; Mike Gilbert +grub-2.00_beta2-r1.ebuild: + Fix sort order of kernels in grub2-mkconfig. Bug 408195. + + 18 Mar 2012; Mike Gilbert grub-2.00_beta2.ebuild, + grub-9999.ebuild: + Pass -Os in TARGET_CFLAGS for efi-64 on x86. Don't clobber TARGET variables in + case the user wants to play with them. Set CTARGET to pass --target option to + configure. + + 17 Mar 2012; Mike Gilbert grub-9999.ebuild: + Sync live ebuild. + + 17 Mar 2012; Mike Gilbert grub-2.00_beta2.ebuild: + Enable building x86_64-efi target on an x86 host. Bug 408545. + +*grub-2.00_beta2 (11 Mar 2012) + + 11 Mar 2012; Mike Gilbert +grub-2.00_beta2.ebuild: + Version bump. + + 08 Mar 2012; Mike Gilbert grub-2.00_beta1.ebuild, + grub-9999.ebuild: + Simplify efi-32/64 logic a bit. + +*grub-2.00_beta1 (07 Mar 2012) + + 07 Mar 2012; Mike Gilbert +grub-2.00_beta1.ebuild: + Version bump. + + 06 Mar 2012; Mike Gilbert grub-2.00_beta0.ebuild, + grub-9999.ebuild: + Add runtime dep on efibootmgr for efi platforms. + + 06 Mar 2012; Mike Gilbert grub-2.00_beta0.ebuild, + grub-9999.ebuild: + Don't use the platform to tranform the utility names; it's pointless. Users + may need to specify the --target option if grub2-install fails to auto-detect + it. + + 04 Mar 2012; Mike Gilbert grub-2.00_beta0.ebuild, + grub-9999.ebuild: + Dont mess with grub.texi; this is causing the live ebuild to not generate any + info page at all. + + 29 Feb 2012; Mike Gilbert grub-0.92-r1.ebuild, + grub-0.94-r1.ebuild, grub-0.96-r1.ebuild, grub-0.96-r2.ebuild, + grub-0.96-r3.ebuild, grub-0.97-r10.ebuild, grub-0.97-r2.ebuild, + grub-0.97-r3.ebuild, grub-0.97-r4.ebuild, grub-0.97-r5.ebuild, + grub-0.97-r6.ebuild, grub-0.97-r8.ebuild, grub-0.97-r9.ebuild, + grub-0.97.ebuild, grub-1.99-r2.ebuild, grub-2.00_beta0.ebuild, + grub-9999.ebuild: + Use mirror://gnu-alpha. + + 29 Feb 2012; Tomáš Chvátal grub-1.99-r2.ebuild, + grub-2.00_beta0.ebuild, grub-9999.ebuild: + Rather point people to the wiki than to the stale doc in my devspace. + +*grub-2.00_beta0 (29 Feb 2012) + + 29 Feb 2012; Mike Gilbert +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 grub-1.99-r2.ebuild, + grub-9999.ebuild: + Add more relaxed pax marking to work on hardened. Fixes bug #396371. + + 15 Jan 2012; Mike Gilbert grub-9999.ebuild: + 1.99-call_proper_grub_probe.patch has been applied upstream. + + 14 Jan 2012; Mike Frysinger grub-0.94-r1.ebuild, + grub-0.96-r1.ebuild, grub-0.96-r3.ebuild, grub-0.97.ebuild: + Drop has_m32 as this is the only package to use it, and we do not really + *need* to do so. + + 06 Jan 2012; Mike Frysinger grub-0.97-r10.ebuild: + Fix building with newer automakes. + + 18 Nov 2011; Mike Frysinger grub-1.99-r2.ebuild, + grub-9999.ebuild: + Simplify GRUB_PLATFORMS handling, and move masking here. + + 11 Nov 2011; Diego E. Pettenò grub-1.99-r2.ebuild, + grub-9999.ebuild: + Fix build of live ebuild after info manual fixes (bug #389685). + + 11 Nov 2011; Tomáš Chvátal metadata.xml: + Drop me from maint. + + 02 Nov 2011; Diego E. Pettenò grub-1.99-r2.ebuild, + grub-9999.ebuild: + Fix info manual (was referencing old name); factor out autoreconf handling if + we were to execute that on a non-live ebuild. + + 04 Oct 2011; Tomáš Chvátal grub-1.99-r2.ebuild, + grub-9999.ebuild: + Include option to prompt for grub1 configuration. Thanks to Robert Trace + rtrace{at}farcaster.org for the patch. + + 03 Oct 2011; Tomáš Chvátal grub-1.99-r2.ebuild, + grub-9999.ebuild: + Include minor fixes from Robert Trace + + 14 Sep 2011; Tomáš Chvátal grub-1.99-r2.ebuild, + grub-9999.ebuild: + Run the configure phase for the package only in the pkg_config. Fixes bug + #382769. + + 10 Sep 2011; Ryan Hill grub-0.97-r10.ebuild: + Release patchset 1.11 to work around miscompilation with gcc-4.6 (bug + #360513). No rev-bump as per maintainer. + + 06 Sep 2011; Tomáš Chvátal grub-1.99-r2.ebuild, + grub-9999.ebuild: + Do not show qa warnings about exec. Fixes bug #381041. + +*grub-1.99-r2 (04 Sep 2011) + + 04 Sep 2011; Tomáš Chvátal + +files/1.99-do_not_stat_so_often.patch, +files/1.99-improve_devmapper.patch, + +files/1.99-stat_root_device_properly-p1.patch, -grub-1.99-r1.ebuild, + +files/1.99-stat_root_device_properly-p2.patch, +grub-1.99-r2.ebuild: + Backport patches to fix esissues with non-existant /dev/root. Fixes bug + #381491. + + 31 Aug 2011; Alexey Shvetsov grub-1.99-r1.ebuild, + grub-9999.ebuild: + Fix grub2 install on hardened systems + + 30 Aug 2011; Tomáš Chvátal files/grub.default: + Fix typo entrys -> entries. + +*grub-1.99-r1 (28 Aug 2011) + + 28 Aug 2011; Tomáš Chvátal + +files/1.99-call_proper_grub_probe.patch, -grub-1.99.ebuild, + +grub-1.99-r1.ebuild, grub-9999.ebuild: + Fix hardcoded grub-probe call. Fixes bug #380879. Revision bump so everyone + gets the update. + + 28 Aug 2011; Tomáš Chvátal grub-1.99.ebuild, + grub-9999.ebuild, metadata.xml: + Add efiemu useflag for grub2. Fixes bug #380863. + +*grub-1.99 (28 Aug 2011) + + 28 Aug 2011; Tomáš Chvátal + -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 grub-1.98.ebuild, + grub-1.99_rc1.ebuild, grub-9999.ebuild: + Depend on virtual/yacc, not bison. + + 21 Aug 2011; Matt Turner grub-1.98.ebuild, + grub-1.99_rc1.ebuild, grub-9999.ebuild: + Add missing DEPEND on flex and bison, bug 380019. + + 28 Jun 2011; Mike Frysinger grub-1.99_rc1.ebuild, + grub-9999.ebuild: + Install into the right bash-completion dir #373201 by Rodrigo Severo. + + 29 May 2011; Mike Frysinger grub-9999.ebuild: + Convert to EAPI=2 and do not run `set -e` with eautoreconf #369093 by Zachary + Bedell. + + 10 Apr 2011; Ulrich Mueller grub-0.92-r1.ebuild, + grub-0.94-r1.ebuild, grub-0.96-r1.ebuild, grub-0.96-r2.ebuild, + grub-0.96-r3.ebuild, grub-0.97.ebuild, grub-0.97-r2.ebuild, + grub-0.97-r3.ebuild, grub-0.97-r4.ebuild, grub-0.97-r5.ebuild, + grub-0.97-r6.ebuild, grub-0.97-r8.ebuild, grub-0.97-r9.ebuild, + grub-0.97-r10.ebuild, grub-1.98.ebuild, grub-1.99_rc1.ebuild: + Don't PROVIDE virtual/bootloader, bug 359971. + + 03 Apr 2011; Mike Frysinger grub-9999.ebuild, + metadata.xml: + Add support for USE="device-mapper sdl", drop dead configure options, and + only depend on autogen for live scm ebuilds #357337 by Jon Severinsson. + + 03 Apr 2011; Mike Frysinger grub-9999.ebuild, + +files/defaults: + Start an example /etc/defaults/grub #359365 by john. + + 03 Apr 2011; Mike Frysinger grub-9999.ebuild: + Drop genkernel patch now that upstream has integrated it. + +*grub-1.99_rc1 (02 Mar 2011) + + 02 Mar 2011; Mike Frysinger +grub-1.99_rc1.ebuild: + Version bump #357023 by Boian Berberov. + + 13 Feb 2011; Mike Frysinger grub-0.97-r8.ebuild, + grub-0.97-r9.ebuild, grub-0.97-r10.ebuild, grub-1.98.ebuild, + grub-9999.ebuild: + Make sure boot is mounted rw before we go setting it up #348946 by Jaco + Kroon. + + 09 Jan 2011; Mike Frysinger grub-0.97-r8.ebuild, + grub-0.97-r9.ebuild, grub-0.97-r10.ebuild, grub-1.98.ebuild, + grub-9999.ebuild: + Use new mount-boot_pkg_postinst helper. + + 30 Nov 2010; Robin H. Johnson grub-0.97-r10.ebuild: + Document how to create the grub-static distfiles. + + 07 Oct 2010; Mike Frysinger grub-9999.ebuild: + Add help2man to DEPEND for a pages #339839 by Eric Thibodeau. + + 02 Sep 2010; Robin H. Johnson grub-0.97-r10.ebuild: + Fix RDEPEND. + + 02 Sep 2010; Robin H. Johnson grub-0.97-r10.ebuild: + Bug #330745: Grub needs executable stack. No version bump yet, new revbump + with patchset coming in a few days. + + 24 Aug 2010; Mike Frysinger grub-9999.ebuild: + Redo autotool generation now that upstream uses python/autogen #334333. + + 22 Aug 2010; Mike Frysinger grub-9999.ebuild: + Force recent unifont version #333343 by tormen. + + 31 Jul 2010; Markos Chandras grub-0.97-r10.ebuild: + Stable on amd64 wrt bug #329325 + + 30 Jul 2010; Robin H. Johnson grub-0.97-r10.ebuild: + Bug #329569: Bump the GRUB_MAX_KERNEL_SIZE as kernels have grown over + time. + + 24 Jul 2010; Mike Frysinger grub-1.98.ebuild, + grub-9999.ebuild: + Add grub-fstest to the exec stack list #329221 by Simon Shapiro. + + 22 Jul 2010; Pawel Hajdan jr grub-0.97-r10.ebuild: + x86 stable wrt bug #329325 + + 06 Jul 2010; Mike Frysinger grub-1.98.ebuild, + grub-9999.ebuild: + Rename grub-install manpage and grub2-set-default script for USE=multislot + #288877 by pyon. + + 06 Jul 2010; Mike Frysinger grub-1.98.ebuild, + +files/grub-1.99-genkernel.patch, grub-9999.ebuild: + Fix building with latest upstream revs #324587 by Jeff Kowalczyk. + +*grub-0.97-r10 (25 Jun 2010) + + 25 Jun 2010; Robin H. Johnson +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 grub-1.98.ebuild, + grub-9999.ebuild: + Pull in unifont for mkfont tools #318747 by Alexis Ballier. + +*grub-1.98 (10 Mar 2010) + + 10 Mar 2010; Mike Frysinger +grub-1.98.ebuild: + Version bump. + +*grub-1.97.2 (07 Mar 2010) + + 07 Mar 2010; Mike Frysinger +grub-1.97.2.ebuild: + Version bump #305143 by Xake. + + 17 Jan 2010; Mike Frysinger grub-1.97.1.ebuild, + grub-9999.ebuild: + Workaround eautomake weirdness #296013. + + 17 Jan 2010; Mike Frysinger + files/grub-1.96-genkernel.patch: + Detect genkernel initramfs files #300710 by Vincent-Xavier JUMEL. + + 10 Jan 2010; Mike Frysinger grub-1.97.1.ebuild, + grub-9999.ebuild: + Only build grub-mkfont when USE=truetype #275654 by Cameron Tacklind. + + 22 Nov 2009; Mike Frysinger grub-9999.ebuild: + Switch from svn to bzr repo #294001 by Robin Kauffman. + +*grub-1.97.1 (11 Nov 2009) + + 11 Nov 2009; Mike Frysinger +grub-1.97.1.ebuild: + Version bump #292677 by Hanno Boeck. + + 01 Nov 2009; Mike Frysinger grub-1.97.ebuild, + grub-9999.ebuild: + Enable epatch_user for easier patch hooking. + +*grub-1.97 (26 Oct 2009) + + 26 Oct 2009; Mike Frysinger +grub-1.97.ebuild, + grub-9999.ebuild: + Version bump #290533 by Opportunist. + + 14 Oct 2009; Mike Frysinger grub-9999.ebuild: + Fix by pyon for USE=multislot and info collisions #288877. + + 30 Sep 2009; Mike Frysinger grub-9999.ebuild: + Switch to --disable-werror #285776 by David Pyke. + + 05 Jul 2009; Mike Frysinger grub-9999.ebuild: + Disable efiemu/pe2elf #276262 by Auke Booij. + + 04 Jul 2009; Robin H. Johnson grub-0.97-r9.ebuild: + Bug #255271: check for IA32_EMULATION on 64-bit, as we are building a + 32-bit binary and need to be able to run it. + + 20 Jun 2009; Mike Frysinger grub-9999.ebuild: + Enable efi/mkfont/pe2elf code and add USE=debug #273896 by John Christian + Stoddart. + + 15 May 2009; Markus Meier grub-0.97-r9.ebuild: + amd64 stable, bug #269201 + + 15 May 2009; Mike Frysinger grub-9999.ebuild: + Do not put ruby into RDEPEND and do not build with -Werror #269887 by + James Erickson. + + 14 May 2009; Christian Faulhammer grub-0.97-r9.ebuild: + x86 stable, bug 269201 + + 10 May 2009; Robin H. Johnson grub-0.97-r9.ebuild: + Bug #261857: easier install with $ROOT usage. + + 01 May 2009; grub-9999.ebuild: + Add dev-lang/ruby as a build-time DEPEND, as autogen.sh (line 9 in SVN rev + 2154) calls genmk.rb and fails without. + + 27 Apr 2009; Mike Frysinger grub-9999: + Generate autotool files now that upstream removed things from svn #267233 + by James Erickson. + + 27 Apr 2009; Mike Frysinger grub-1.96: + Disable grub-mkconfig as older versions didnt have it #266675 by Mikhail. + + 14 Mar 2009; Mike Frysinger + +files/grub-1.96-genkernel.patch, grub-9999.ebuild: + Locate kernels made by genkernel #256335 and mark Gentoo as the distro. + + 28 Feb 2009; Markus Meier metadata.xml: + custom-cflags is a global USE-flag + +*grub-0.97-r9 (02 Jan 2009) + + 02 Jan 2009; Robin H. Johnson +grub-0.97-r9.ebuild: + Ext4 funtime for grub-0.97 series. Remember to reinstall it in your MBR. + + 31 Dec 2008; Mike Frysinger grub-1.96.ebuild, + grub-9999.ebuild: + Drop multilib stuff as the binaries that run on the host system. + + 30 Dec 2008; Mike Frysinger metadata.xml, + grub-1.96.ebuild, grub-9999.ebuild: + Fix install paths and add support for USE=multislot so people can toy with + grub2 while keeping grub1. + + 30 Dec 2008; Mike Frysinger grub-1.96.ebuild, + grub-9999.ebuild: + Fix by roger for SRC_URI setting with ebuild unification. + +*grub-9999 (30 Dec 2008) + + 30 Dec 2008; Mike Frysinger grub-1.96.ebuild, + +grub-9999.ebuild: + Add a live svn ebuild by roger #252769. This also fixes stripping issues + #231935 by Alexey Shvetsov. + + 10 Nov 2008; Mike Frysinger grub-1.96.ebuild: + Drop USE=netboot and fixup DEPEND #234182. + + 07 Nov 2008; Robin H. Johnson Manifest: + It does fix bug 218611, and bug 231684 is now an upstream/non-critical + issue. + +*grub-0.97-r8 (05 Nov 2008) + + 05 Nov 2008; Robin H. Johnson +grub-0.97-r8.ebuild: + Patchset version bump, fixes bugs 220687, 245741, 218611 (maybe), 231684 + (maybe). In package.mask still, careful testing needed. + + 01 Nov 2008; Robin H. Johnson grub-0.97-r6.ebuild: + Add a magic flag GRUB_STATIC_PACKAGE_BUILDING which along with USE=static + -ncurses is used to build grub-static tarballs from now on. + + 16 Aug 2008; Mike Frysinger grub-1.96.ebuild: + Require lzo-1 #234182 by Kyle Elbert. + + 05 Aug 2008; Ulrich Mueller metadata.xml: + Add USE flag description to metadata wrt GLEP 56. + + 07 Jul 2008; Robin H. Johnson grub-0.97-r6.ebuild: + Update the pkg_postinst message again, so that anybody with + DONT_MOUNT_BOOT gets reminded to run emerge --config as well, so + everything is in sync. + + 06 Jul 2008; Christian Faulhammer grub-0.97-r6.ebuild: + stable x86, bug 230836 + + 06 Jul 2008; Robin H. Johnson grub-0.97-r6.ebuild: + Fix typo that got earn in the output. + + 06 Jul 2008; Robin H. Johnson grub-0.97-r6.ebuild: + Bug #230976, include some helpful text for upgrading the MBR copy. + + 05 Jul 2008; Thomas Anderson grub-0.97-r6.ebuild: + stable amd64, bug 230836 + + 05 Jul 2008; Robin H. Johnson files/grub.conf.gentoo, + grub-0.97-r6.ebuild: + Support for non-interactive from wolf31o2 per bug #228677. + +*grub-0.97-r6 (04 Jun 2008) + + 04 Jun 2008; Robin H. Johnson + +files/grub.conf.gentoo, +grub-0.97-r6.ebuild: + Improve the Grub /boot setup procedure, to support people with more + unusual grub setups where the default config file may not be suitable to + pass into the grub shell, per bug #218599. Include a stock grub.conf for + Gentoo users. Install the splashimage to /usr and copy to /boot later + rather than direct to /boot. + + 10 May 2008; Mike Frysinger grub-0.97-r5.ebuild: + Restore menu.lst symlink #220737 / #221055. + + 06 May 2008; Christian Faulhammer grub-0.97-r5.ebuild: + stable x86, bug 220069 + + 05 May 2008; Markus Meier grub-0.97-r5.ebuild: + amd64 stable, bug #220069 + + 02 May 2008; Robin H. Johnson grub-0.97-r5.ebuild: + amd64+static together blow up. + + 07 Apr 2008; Robin H. Johnson grub-0.97-r5.ebuild: + Bump of patchset only to fix bug #216307. Revbump will happen when I have + finished tracing the pager bug. + + 06 Apr 2008; Mike Frysinger grub-0.97-r5.ebuild: + Create /boot/boot symlink for people #194201, and dont bother creating + menu.lst symlink. + + 30 Mar 2008; Robin H. Johnson grub-0.97-r5.ebuild: + Bring in the warning from bug #98768, as it's now important with the new + Grub patches. + + 30 Mar 2008; Robin H. Johnson grub-0.97-r5.ebuild: + Per bug #160801, Grub needs modification to support kernels larger than + 3Mb. However, this may have negative consequences, so the actual value is + configurable at compile-time via the GRUB_MAX_KERNEL_SIZE environment + variable. + + 29 Mar 2008; Mike Frysinger grub-0.97-r5.ebuild: + Pull in app-emulation/emul-linux-x86-baselibs for USE=ncurses on amd64 #128249. + + 28 Mar 2008; Mike Frysinger grub-0.97-r5.ebuild: + Make ncurses optional. + +*grub-0.97-r5 (25 Mar 2008) + + 25 Mar 2008; Robin H. Johnson +grub-0.97-r5.ebuild: + New version of the Gentoo grub patchset. Provides support for 256-byte + ext3 inodes per bug #214563. Fixes unhide bugs with GPT patch per bug + #211584. Long commandlines per bug #183443. Xen memorysize fix per bug + #188312. + + 21 Mar 2008; Stefan Schweizer grub-1.96.ebuild: + fails to build with two threads + + 09 Mar 2008; Mike Frysinger grub-0.97-r4.ebuild: + Clean up the /boot update code a bit and generate the "default" file by + default so people dont have to painfully debug this failure themselves. + + 25 Feb 2008; Steve Dibb grub-0.97-r4.ebuild: + amd64 stable, bug 211419 + + 25 Feb 2008; Christian Faulhammer grub-0.97-r4.ebuild: + stable x86, bug 211419 + + 25 Feb 2008; Robin H. Johnson grub-0.92-r1.ebuild, + grub-0.94-r1.ebuild, grub-0.96-r1.ebuild, grub-0.96-r2.ebuild, + grub-0.96-r3.ebuild, grub-0.97.ebuild, grub-0.97-r2.ebuild, + grub-0.97-r3.ebuild, grub-0.97-r4.ebuild: + Fix up all quoting to make repoman happy. + +*grub-0.97-r4 (24 Feb 2008) + + 25 Feb 2008; Robin H. Johnson grub-0.97-r4.ebuild: + Bug #178586, include support for booting from a GPT-style disk. + +*grub-1.96 (16 Feb 2008) + + 16 Feb 2008; Mike Frysinger +grub-1.96.ebuild: + Version bump #210403 by Leonardo Valeri Manera. + + 25 Aug 2007; Mike Frysinger + +files/grub-1.95-build.patch, grub-1.95.ebuild: + Fix from Kevin Lacquement for building in parallel #185361. + + 24 Jun 2007; Piotr Jaroszyński grub-1.95.ebuild: + (QA) Don't use KEYWORDS="-*". bug #160519. + + 04 Apr 2007; Markus Ullmann grub-0.97-r3.ebuild: + testing on fbsd for ufs-aware grub + + 15 Jan 2007; Luis Medinas grub-0.97-r3.ebuild: + Stable on amd64. Bug #159636. + + 02 Jan 2007; Andrej Kacian grub-0.97-r3.ebuild: + Stable on x86, bug #159636. + + 03 Dec 2006; Mike Frysinger grub-0.97-r3.ebuild: + Fix running with newer autotools (need AC_PROG_AS) #156524. + +*grub-1.95 (21 Oct 2006) + + 21 Oct 2006; Mike Frysinger +grub-1.95.ebuild: + Version bump #152232 by Arthur Koziel. + +*grub-0.97-r3 (08 Sep 2006) + + 08 Sep 2006; Mike Frysinger +grub-0.97-r3.ebuild: + Grab a bunch of patches from Debian. + + 30 Aug 2006; Joshua Jackson grub-0.97-r2.ebuild: + Stable x86; bug #144998 + + 25 Aug 2006; Luis Medinas grub-0.97-r2.ebuild: + Stable on amd64. + +*grub-1.94 (18 Jun 2006) + + 18 Jun 2006; Mike Frysinger +grub-1.94.ebuild: + Version bump. + + 13 May 2006; Mike Frysinger grub-0.97-r2.ebuild: + Add a pkg_config() by Petteri Räty for users to configure other devices + #133129. + + 27 Apr 2006; Alec Warner files/digest-grub-0.92-r1, + files/digest-grub-0.94-r1, files/digest-grub-0.96-r1, Manifest: + Fixing SHA256 digest, pass four + +*grub-1.93 (21 Apr 2006) + + 21 Apr 2006; Mike Frysinger +grub-1.93.ebuild: + Version bump #130586 by Anthony Red. + + 22 Mar 2006; Mike Frysinger grub-0.97-r2.ebuild: + Fix building netbot with gcc-4 #112713. + + 05 Feb 2006; Simon Stelling grub-1.92.ebuild: + remove old 2004.3 multilib checks + +*grub-1.92 (16 Jan 2006) + + 16 Jan 2006; Mike Frysinger +grub-1.92.ebuild: + Version bump and add lzo to DEPEND as noted by Ron in #119149. + +*grub-1.91 (25 Nov 2005) + + 25 Nov 2005; Mike Frysinger +grub-1.91.ebuild: + Version bump #113556 by Thomas Bettler. + +*grub-0.97-r2 (10 Nov 2005) + + 10 Nov 2005; Mike Frysinger -grub-0.97-r1.ebuild, + +grub-0.97-r2.ebuild: + Punt reiser4 patch since it breaks booting for some #111885. + +*grub-0.97-r1 (08 Nov 2005) + + 08 Nov 2005; Mike Frysinger +grub-0.97-r1.ebuild: + Fixes by Jon Bernard/Roy Walker for address checks on machines with lots of + ram #99897 and add support for Reiser4 #69590. + + 21 Aug 2005; Mike Frysinger grub-0.94-r1.ebuild, + grub-0.96-r1.ebuild, grub-0.96-r2.ebuild, grub-0.96-r3.ebuild, + grub-0.97.ebuild: + Make sure netboot files are installed into /usr/lib/grub/${CHOST}/ so the + pkg_postinst step works #103084 by Thomas Schweikle. + +*grub-0.97 (20 Aug 2005) + + 20 Aug 2005; Mike Frysinger grub-0.96-r1.ebuild, + grub-0.96-r2.ebuild, grub-0.96-r3.ebuild, +grub-0.97.ebuild: + Version bump #91959 by R Hill. + + 20 Aug 2005; Mike Frysinger grub-0.96-r1.ebuild, + grub-0.96-r2.ebuild, grub-0.96-r3.ebuild: + Add support for USE=custom-cflags #72196 by basic. + +*grub-0.96-r3 (03 Aug 2005) + + 03 Aug 2005; Mike Frysinger +grub-0.96-r3.ebuild: + Add patch from upstream cvs to fix #83287 by Martin Mokrejs / David James. + + 01 Aug 2005; Simon Stelling grub-0.96-r2.ebuild: + stable on amd64 + + 28 Jul 2005; Seemant Kulleen + -files/grub-0.93-gcc3.3.diff, -files/grub-0.94-gcc3.4.patch, + -files/grub-0.94-grub.conf.patch, + -files/grub-0.95.20040823-warnings.patch, -files/grub-0.96-PIC.patch, + -files/grub-0.96-bounced-checks.patch, -files/grub-0.96-gcc2.patch, + -files/grub-0.96-gcc4.patch, -files/grub-0.96-i2o-raid.patch, + -files/grub-0.96-netboot-pic.patch, -files/grub-0.96-nxstack.patch, + -files/grub-0.96-r1-gcc4.patch, + -files/grub-0.96-xfs-writable-string.patch, -files/splash.xpm.gz, + grub-0.92-r1.ebuild, grub-0.94-r1.ebuild, grub-0.96-r1.ebuild, + grub-0.96-r2.ebuild: + patches, configs, splash screens are all now on mirrors and being tracked in + gentoo/src/patchsets/grub + + 28 Jul 2005; Seemant Kulleen +grub-0.92-r1.ebuild, + +grub-0.94-r1.ebuild: + add back 92 and 94 for vapier + + 28 Jul 2005; Seemant Kulleen -grub-0.92-r1.ebuild, + -grub-0.93.20030118.ebuild, -grub-0.94-r1.ebuild, -grub-0.94-r2.ebuild, + -grub-0.95.20040823.ebuild, -grub-0.96.ebuild: + remove cruft ebuilds + + 24 Jul 2005; Martin Schlemmer + +files/grub-0.96-gcc2.patch, grub-0.96-r2.ebuild: + Fix building with gcc2. + + 04 Jul 2005; Sven Wegener grub-0.95.20040823.ebuild, + grub-0.96.ebuild, grub-0.96-r1.ebuild, grub-0.96-r2.ebuild: + Updated the postinst message for bug #97882. + + 01 Jul 2005; Sven Wegener grub-0.96-r2.ebuild: + Stable on x86 to make the XFS writable-string fix available for all users. + + 30 May 2005; Sven Wegener grub-0.92-r1.ebuild, + grub-0.94-r1.ebuild, grub-0.94-r2.ebuild, grub-0.95.20040823.ebuild, + grub-0.96.ebuild: + Moved from gcc.eclass to toolchain-funcs.eclass, bug #92745. + + 29 May 2005; Marcus D. Hanwell grub-0.96-r1.ebuild: + Stable on amd64. + + 09 May 2005; Mike Frysinger + +files/grub-0.96-netboot-pic.patch, grub-0.96-r2.ebuild: + Add patch by the PaX Team to fix PIC/PIE issues in the netboot code and + remove the chpax/paxctl stuff since the nxstack patch fixes hardened issues. + +*grub-0.96-r2 (08 May 2005) + + 08 May 2005; Sven Wegener + +files/grub-0.96-xfs-writable-string.patch, +grub-0.96-r2.ebuild: + Revision bump to pull in my writable-string patch I submitted to upstream. + Closes bug #90845. + + 20 Apr 2005; Stephen Bennett grub-0.96-r1.ebuild: + Stable x86; older versions break with hardened gcc. + + 06 Apr 2005; Mark Loeser + +files/grub-0.96-r1-gcc4.patch, grub-0.96-r1.ebuild: + Updated gcc4 patch to apply to grub-0.96-r1 + + 05 Apr 2005; Mark Loeser +files/grub-0.96-gcc4.patch, + grub-0.96.ebuild: + Backported fixes for GCC4. Fixes bug #85016 + + 15 Mar 2005; Jeremy Huddleston + grub-0.94-r1.ebuild, grub-0.94-r2.ebuild, grub-0.95.20040823.ebuild, + grub-0.96.ebuild, grub-0.96-r1.ebuild: + Putting ABI stuff inside an 'if use amd64' block. + +*grub-0.96-r1 (11 Mar 2005) + + 11 Mar 2005; Mike Frysinger + +files/grub-0.96-PIC.patch, +files/grub-0.96-i2o-raid.patch, + +files/grub-0.96-nxstack.patch, +grub-0.96-r1.ebuild: + Add patches/fixes for a bunch of bugs ... basically lets fix i2o-raid + support, NX segfaults on amd64, PIC build failures, and hardened objcopy + funk. Thanks to Ryan Hill and everyone on #80693. + +*grub-0.96 (05 Mar 2005) + + 05 Mar 2005; Martin Schlemmer +grub-0.96.ebuild: + Update version. Some cleanups. + + 03 Feb 2005; Jeremy Huddleston + grub-0.94-r1.ebuild, grub-0.94-r2.ebuild, grub-0.95.20040823.ebuild: + Multilib fixes. + + 20 Jan 2005; Jeremy Huddleston + grub-0.94-r1.ebuild, grub-0.94-r2.ebuild, grub-0.95.20040823.ebuild: + Updates to work with amd64's 2005.0. + + 20 Dec 2004; Simon Stelling grub-0.95.20040823.ebuild: + changed WANT_AUTOMAKE to 1.8 + + 07 Dec 2004; Robin H. Johnson + grub-0.95.20040823.ebuild: + Bug #70111, fix tc-getCC invocation. + + 30 Nov 2004; Michael Sterrett + grub-0.95.20040823.ebuild: + fix use invocation + + 22 Nov 2004; + +files/grub-0.95.20040823-warnings.patch, grub-0.95.20040823.ebuild: + USE flagging the network booting stuff with a new local "netboot" USE flag. + Adding ~amd64. General tidying up of the ebuild. Adding a patch to prevent + use of -fwritable-strings, which doesn't do anything but throw up warnings. + Adding a comment to explain that FFS and UFS2 support is broken still. + Fixing the amd64 installation procedure. + + 13 Oct 2004; Travis Tilley grub-0.94-r1.ebuild: + stable on amd64 + + 12 Sep 2004; grub-0.94-r1.ebuild, grub-0.94-r2.ebuild, + grub-0.95.20040823.ebuild: + Adding >=automake-1.7 dep for grub-0.9{4,5} as per bug 63509. + + 05 Sep 2004; grub-0.95.20040823.ebuild: + The grub binary is in /sbin, not /usr/sbin. Fixing. + + 26 Aug 2004; grub-0.95.20040823.ebuild: + gnuconfig belongs in src_unpack, not src_compile. Thanks tigger :-) + + 24 Aug 2004; grub-0.95.20040823.ebuild: + Marking ~x86 after some overnight testing. + +*grub-0.95.20040823 (24 Aug 2004) + + 24 Aug 2004; metadata.xml, +grub-0.95.20040823.ebuild: + Initial commit of grub-0.95 with CVS snapshot update. Supports (amongst other + things) savedefault (server-friendly feature) and uclibc (I hope...). + +*grub-0.94-r2 (22 Aug 2004) + + 22 Aug 2004; +files/grub-0.94-grub.conf.patch, + +grub-0.94-r2.ebuild: + Trying to get rid of the need for that filthy menu.lst -> grub.conf symlink. + + 10 Jun 2004; Travis Tilley grub-0.94-r1.ebuild: + fixed multilib check + + 09 Jun 2004; Travis Tilley grub-0.94-r1.ebuild: + added multilib check and ~amd64 keyword + + 12 May 2004; Alexander Gabert grub-0.94-r1.ebuild: + added new hardened PIE SSP switches + + 12 May 2004; Alexander Gabert grub-0.93.20030118.ebuild: + removed hardened-gcc logic, added logic for suppressing PIE and SSP + + 06 May 2004; Mike Frysinger + +files/grub-0.94-gcc3.4.patch, grub-0.94-r1.ebuild: + add gcc-3.4 patch #49558 by Robert Moss + ecco@piggy.demon.nl + + 14 Apr 2004; Scott W Taylor : + Cleanup checks for hardened + + 06 Apr 2004; grub-0.94-r1.ebuild: + stable on x86 + + 17 Mar 2004; grub-0.94-r1.ebuild: + grub will end up with a 100+ meg stage2 file if the user has LDFLAGS=-pie, so + lets filter that flag out in the src_compile + + 25 Feb 2004; Seemant Kulleen grub-0.92-r1.ebuild: + global scope fixing + +*grub-0.94-r1 (25 Feb 2004) + + 25 Feb 2004; Seemant Kulleen grub-0.93.20031222.ebuild, + grub-0.93.20040125.ebuild, grub-0.94-r1.ebuild, grub-0.94.ebuild: + revision bump for spock's change + + 15 Feb 2004; Michal Januszewski grub-0.94.ebuild: + Added the 'grubsplash' patch, closes #40827. + +*grub-0.94 (02 Feb 2004) + + 02 Feb 2004; Brandon Low grub-0.94.ebuild: + This ebuild isn't perfect yet, but it is better than the last few versions, + still no splash image, but now at least it uses the config. It appears that + menu.lst is back in style or something + +*grub-0.93.20031222 (25 Jan 2004) + + 25 Jan 2004; Seemant Kulleen grub-0.93.20031222.ebuild, + grub-0.93.20040125.ebuild: + new cvs snapshots of grub. Both have the acl/ext2 and acl/ext3 issues sorted + out. I'll be adding another snapshot to take advantage of the SuSE prettiness + capabilities to grub. This should close bug #30859 by Chris PeBenito + + + 15 Dec 2003; Seemant Kulleen grub-0.93.20030118.ebuild: + Added autoconf to compile dependencies, closing bug #33321 by Scott Taylor + + + 15 Dec 2003; Seemant Kulleen grub-0.92-r1.ebuild, + grub-0.93.20030118.ebuild, + files/grub-0.92/grub-0.5.96.1-special-raid-devices.patch, + files/grub-0.92/grub-0.90-addsyncs.patch, + files/grub-0.92/grub-0.90-append.patch, + files/grub-0.92/grub-0.90-configfile.patch, + files/grub-0.92/grub-0.90-install.in.patch, + files/grub-0.92/grub-0.90-installcopyonly.patch, + files/grub-0.92/grub-0.90-passwordprompt.patch, + files/grub-0.92/grub-0.90-staticcurses.patch, + files/grub-0.92/grub-0.90-symlinkmenulst.patch, + files/grub-0.92/grub-0.90-vga16-keypressclear.patch, + files/grub-0.92/grub-0.91-bootonce.patch, + files/grub-0.92/grub-0.91-splashimagehelp.patch, + files/grub-0.92/grub-0.91-vga16-serial.patch, + files/grub-0.92/grub-0.92-automake16.patch, + files/grub-0.92/grub-0.92-nodeprecatedflags.patch, + files/grub-0.92/grub-0.92-usbfix.patch, + files/grub-0.92/grub-0.92-vga16.patch: + move the patches to the mirrors isntead, and add the gcc3.3 patch to 0.92 as + well + +*grub-0.93.20030118 (08 Dec 2003) + + 08 Dec 2003; Seemant Kulleen grub-0.92-r1.ebuild, + grub-0.93.20030118.ebuild, metadata.xml, files/grub-0.93-gcc3.3.diff, + files/splash.xpm.gz, + files/grub-0.92/grub-0.5.96.1-special-raid-devices.patch, + files/grub-0.92/grub-0.90-addsyncs.patch, + files/grub-0.92/grub-0.90-append.patch, + files/grub-0.92/grub-0.90-configfile.patch, + files/grub-0.92/grub-0.90-install.in.patch, + files/grub-0.92/grub-0.90-installcopyonly.patch, + files/grub-0.92/grub-0.90-passwordprompt.patch, + files/grub-0.92/grub-0.90-staticcurses.patch, + files/grub-0.92/grub-0.90-symlinkmenulst.patch, + files/grub-0.92/grub-0.90-vga16-keypressclear.patch, + files/grub-0.92/grub-0.91-bootonce.patch, + files/grub-0.92/grub-0.91-splashimagehelp.patch, + files/grub-0.92/grub-0.91-vga16-serial.patch, + files/grub-0.92/grub-0.92-automake16.patch, + files/grub-0.92/grub-0.92-nodeprecatedflags.patch, + files/grub-0.92/grub-0.92-usbfix.patch, + files/grub-0.92/grub-0.92-vga16.patch: + moved from sys-apps to sys-boot + + 01 Dec 2003; Alexander Gabert grub-0.93.20030118.ebuild: + added CC -yno_propolice because configure has problems with -nostdlib + requesting __guard symbol but cannot be resolved, future releases of + hardened-gcc will honour this behaviour + + 07 Sep 2003; Alexander Gabert grub-0.93.20030118.ebuild: + added hardened-gcc excludes + + 14 Sep 2003; John Mylchreest ; grub-0.93.20030118.ebuild, + files/grub-0.93-gcc3.3.diff: + Updating for gcc 3.3 compat + + 27 Jul 2003; Olivier Crete grub-0.93.20030118.ebuild: + Added support for static building + + 24 Jan 2002; *.ebuild : Reorder mount-boot.eclass + function, clean some fluff. + +*grub-0.93.20030118 (18 Jan 2003) + + 11 Apr 2003; Joshua Brindle grub-0.92-r1.ebuild, + grub-0.93.20030118.ebuild: + Added filter-flags -fstack-protector + + 24 Feb 2003; Nicholas Wourms grub-0.93.20030118.ebuild : + This is definitely not for mips. Maybe sometime in the future... + + 18 Jan 2003; Donny Davies grub-0.93.20030118.ebuild : + New testing release; closing #11821, #13242, #9180. See the ebuild + for the detailed patch list. + +*grub-0.92-r1 (02 Oct 2002) + + 10 Mar 2003; Seemant Kulleen grub-0.92-r1.ebuild: + change to use epatch instead, much prettier output + + 24 Feb 2003; Nicholas Wourms grub-0.92-r1.ebuild : + This is definitely not for mips. Maybe sometime in the future... + + 06 Jan 2002; Seemant Kulleen *.ebuild : + PROVIDE virtual/bootloader + + 06 Dec 2002; Rodney Rees : changed sparc ~sparc keywords + + 02 Oct 2002; Donny Davies : + Merge changes from Markus Krainer to fix: + bootlogo; #6820. menu.lst was renamed to grub.conf; #6300. + +*grub-0.92 (25 Jun 2002) + + 29 Sep 2002; Donny Davies grub-0.92.ebuild : + Now uses mount-boot eclass; from #7903. + + 13 Aug 2002; Joachim Blaabjerg grub-0.92.ebuild : + Added grub-0.92-usbfix.patch to hopefully fix bug #6372. It still compiles! + + 14 Jul 2002; phoen][x grub-0.92.ebuild : + Added KEYWORDS. + + 25 Jun 2002; Martin Schlemmer : + Add the latest version thanks to good work from (bug #4020) + Markus Krainer . Slotified the lot, + as well as move splash.xpm.gz to ${FILESDIR}/, as having three + seems a bit much. + +*grub-0.90-r7 (14 July 2002) + + 29 Sep 2002; Donny Davies grub-0.90-r7.ebuild : + Now uses mount-boot eclass; from #7903. + + 21 Jul 2002; Mark Guertin : + updated keywords (-ppc -sparc -sparc64) + + 14 Jul 2002; phoen][x grub-0.90-r7.ebuild : + Added KEYWORDS. + +*grub-0.90-r4 (8 Mar 2002) +*grub-0.91-r3 (8 Mar 2002) + + 29 Sep 2002; Donny Davies grub-0.91-r3.ebuild : + Now uses mount-boot eclass; from #7903. + + 19 Aug 2002; Sascha Schwabbauer grub-0.91-r3.ebuild : + Added -ppc to keywords + + 14 Jul 2002; phoen][x grub-0.91-r3.ebuild : + Added KEYWORDS. + + 8 Mar 2002; Bruce A. Locke : grub-0.90-r4.ebuild, + grub-0.91-r3.ebuild: made check of /etc/fstab not match on commented out + entries and added a notice telling users to remove invalid /boot entries + from their /etc/fstab (a user had this problem while installing) + +*grub-0.90-r6 (4 Feb 2002) +*grub-0.91-r1 (4 Feb 2002) + + 4 Feb 2002; Daniel Robbins : grub-0.90-r6.ebuild, + grub-0.91-r1.ebuild: unset CFLAGS to ensure that GRUB code is i486-compatible, + a good thing for a boot loader. Upgraded /boot mounting code to be compatible + with systems without a dedicated /boot filesystem. Tweaked GRUB installation + so that the /boot/grub/*stage* files don't get overwritten, since this could + mess up the currently-in-the-MBR GRUB. These fixes also close bug #527. + +*grub-0.90-r5 (4 Feb 2002) + + 4 Feb 2002; G.Bevin grub-0.90-r5.ebuild, grub-0.91.ebuild : + Added new setup function which detects if /boot is mounted or not, in case + it's not mounted it will try to do it automatically and in case of a failure + exit with an error message. + +*grub-0.90-r4 (1 Feb 2002) + + 1 Feb 2002; G.Bevin ChangeLog : + Added initial ChangeLog which should be updated whenever the package is + updated in any way. This changelog is targetted to users. This means that the + comments should well explained and written in clean English. The details about + writing correct changelogs are explained in the skel.ChangeLog file which you + can find in the root directory of the portage repository. diff --git a/sdk_container/src/third_party/portage-stable/sys-boot/grub/Manifest b/sdk_container/src/third_party/portage-stable/sys-boot/grub/Manifest index 9b2edc4f4b..30277c0e76 100644 --- a/sdk_container/src/third_party/portage-stable/sys-boot/grub/Manifest +++ b/sdk_container/src/third_party/portage-stable/sys-boot/grub/Manifest @@ -1 +1,73 @@ -DIST grub-1.99.tar.xz 2639224 RMD160 d59a47fa40b2be0d5ea5b2b00ff5538cfa147747 SHA1 a5ae9558f30ce7757a76aa130088b053a87e2fb6 SHA256 f308148d4c83c6f16a73b58a0cd39381656edb740929028cae7ad5f0d651021b +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + +AUX 1.99-call_proper_grub_probe.patch 536 SHA256 0e27b4ba6a0deedef2f65822e3b76aea4a817cb7219b01c29c8f682c450bd5e8 SHA512 db4188ed7e5ed3a736580cb17b3a41b984e81d65036254e699a3cba409cfdcbe342341a467c2e01d351800f70ec1b4c61c0fd23c2c4c5fbdf9949a16b43c4d4b WHIRLPOOL eda7dece32b1c3f74227b4f0e53e8846e30f0d56239c512ae17d852fa36825294b314d2c1af8d10807cf345201e31e37762fd556f2c2390ae9de9327129a8df0 +AUX 1.99-do_not_stat_so_often.patch 1731 SHA256 a33fdbcab7fa4ad66b26598d9a6f1703f419229058c1e9c9c14edb6272783727 SHA512 66c0e7ea45228b1b58fd842316c35ce708a4fc3170f255165dc90073ea109a7e7f34a0673bca3f8228c392fbd9470cf36984e9e3d9de59c4cd6974ddf05da1b5 WHIRLPOOL bb8e382e4822a03028340092e67ccfc84f5608a4600b329b85c1b325b01d6c0476223e0e102b0948e4ea4cf7cbf310c56468f3c703a72edb5383b8eda30f7f8d +AUX 1.99-improve_devmapper.patch 7134 SHA256 b12624944d129820966146d55693b325d48d5d56901727142e386be082661778 SHA512 21d73e2d7f6e065f254a1cc55675e45fe5d1e345f44d8de648395bcd41750324641e84c807839aa06261095ec229a8928290f609d0558d7c897764881305de46 WHIRLPOOL 5e168f740d81e20122acbe1cbfb37cbcb09ba27d1ed2edc537825664107aa416aae5d87ffb96207768a186ba2309e64925a9b9d0f67163fcee7568408e4bac59 +AUX 1.99-stat_root_device_properly-p1.patch 698 SHA256 1facf84e5195eb98b390e43e0a0d6f791e9500ef678b025e95f96d5a2769da5a SHA512 bb2b88d9c5ff6a37292c98ddc1e655076781ac485a5625d09f3cac596ba3aac4b06f9fb0fd250146dd3be1f9e0328085d3a6c52137a4ab5dd3961c53ba87e0ec WHIRLPOOL 92e0cd474b2277876037e602ed47b76b62fe2becc98a0704c9de7ca318f97d89c5a137473fbc558eeea7fed907e49293a61ae3c0a914ec365b2558db37cd4e04 +AUX 1.99-stat_root_device_properly-p2.patch 621 SHA256 431876459562c0aae6e854a97eeaf0cacdad8ceb5477788a4d691e4e6fa613eb SHA512 6953a5a7c48cd38ab41f60d3c4ef8fbeb413408fc749feca7cfffa0413e370c298f3fe3b6a01e457ec376524c9d40536258f7c0fde1e76991774291571117f76 WHIRLPOOL b94e253e2169e8b3a958cb49db81a86aa7d35de29b3fdfc9c58121f18496dcf440b4abe7b07c6d952f3f2172155958100b60795d96485108f874fa163d8c1883 +AUX grub-0.97-gpt.patch 10682 SHA256 5e38046cfb727420e5b4b19d71c7fb4ddff22cbcc356c9f888763b0c1963d389 SHA512 2fe10c839c4c575750f7eeb29953c00f232771a3143687aac21e3b90585ec59d6f7c0346db80c0aa3c18d27799d301711d6f995f6781ce8a148c7ce59004e1aa WHIRLPOOL 22b3d12124115ec78fff2b3699c44d3b2c0bb84bec673e36d66e73c9da89137d237b1c7681b671ce89b06b2f4d78f9999eca98f43aa284d2b610713fc4161226 +AUX grub-2.00-compression.patch 2051 SHA256 003cc6b8762adbff14c1d0f7a0c2ddb145e80d73e899439fb8ab12e133a60feb SHA512 2b57ddb395cb5aa37bc3d721f3d4c527a1d5165c0b5e1c2efec7d169ae2438ad063ee67da68eff4069f0451983e599ec40ed92a0bc33348a21ad622738bbc213 WHIRLPOOL 2c61bfd65ed1d53e42a1ec881f3a7e42904924097460f692952a0fbfa46cfbb029374a2e6cfdcb1f2eb1216e994b56265e6e0e72912ecda7de90daddc03931c2 +AUX grub-2.00-config-quoting.patch 3934 SHA256 4f1bc29429a864731edf4a5a5fa53004dc67bf1225bd8fa81cb58b197df12510 SHA512 bed0fb1a8589c1979cf7162599e041c8b8eaa66bff3e8fa4a8b9929c8e8191ec1f85c129bcf2f7c9dcc75d5ea50330067ffd519835308460f7a194aab40bfc13 WHIRLPOOL 979234f1d3e1282d1e6d3ac4aa1e01c86082a3883abd452f0f1886181a6d46ccccd8e6b59628acfa8dc375ad9db1b35037d9483f87df2893a7398402dc7cb51a +AUX grub-2.00-freebsd.patch 16465 SHA256 5464dda43bed28634e406a3b182db1d76e70059e0a3b3c276ee91ff27ca78cbd SHA512 d0fecaf83796971ef6f2cd43cab4c89faf1496d4241e249467d7839b366c616e15a8c6961d9224ed0e139d018d5d9f354cf59ddf2ef5e915a4b03e11dbdf568e WHIRLPOOL 963c61923503a57894634f0b3431e8e701a83f6514e5829f0ed91fc3c9011fa39870c319e1cbfee62341f1d37dfd0fdadcd4a028b725bb65d2f06fbedfd31166 +AUX grub-2.00-hardcoded-awk.patch 599 SHA256 438c7357a632c7c9efe406b1d7cbb2524694e68c5783b401d3dd17ae0aba6816 SHA512 f47b742b9fa4c57e36e767ace6e14318678cc429ae88cd275e07d95abbc8d3d01d831058da2f6f91662bfdfc4396aed5417198245534488359a43023459d1a1f WHIRLPOOL 17be198f854466ff8a50c5b7d46eaf7883a4ce8cbe3a89cbc0e62d75ae71e94ce863341c0650b113bbee4415220da38896da73177ab59d2b53d3bde7ec9809ba +AUX grub-2.00-no-gets.patch 805 SHA256 054d85619905055a0ea0e5f9d27eb8c8596959598ac9a5bae7e82543c19adeaf SHA512 8b89fa40efe232474e7bb03d12542030d40fea1fe0839a9493f6704fbe6de77516b5976841bf652c7236104513f427750efc668248c71ba0ea7f676557e8c9e3 WHIRLPOOL 796a7bc4583829abd1a552f7d16d6cc4f2999707af1ae0b5231fa53e87ce22a265a35a3d0f486fcac2e74dbed5fd54e3a572186cc2ba1a849433adc021a0a65b +AUX grub-2.00-parallel-make.patch 1907 SHA256 7d8eda92eeeeb87001bc44dd1390b96c927c45542af2984c5d80f9ca3a552362 SHA512 cc2c47858ca2fa76b081ca78b6090fe61f0b41d6aad21f07e269dd9f98355b7c148f62659418257c24aa370634060ead2c3a612aae07c6f53e9ba13a25a1d7fc WHIRLPOOL 9b5aad7db3ec5c60151984861690b64e90d6adbeb1dec4257d33873156ae6ce6ded432377520cfb9cbbbbf2f30e69e134d6dbc0007355cfa74521042500d844e +AUX grub-2.00-tftp-endian.patch 728 SHA256 4806fb14471fe6547cb69e6fab97e66c8245654acbc4738071cf2717368de458 SHA512 8fee95b06b50f8721d7013ecf8fb954e9b1ba83f99790e165ec334dfcd41fe7655f37868069a315acd4af97d3c4466aa36e0ab5a8b767faf862f1d71f88b3252 WHIRLPOOL 53779e4952049f069824eefcaaaa0e46fc9a7036ed0f9b67008e523f618105d760300ffcd315f861de786c63de02b2753d3ed14637b39fd7af47aadd02355695 +AUX grub-2.00-zfs-feature-flag-support.patch 31186 SHA256 596d509a22d1f3c2bf27864ff285d7ae8e39b3912347163a14afb36812de8605 SHA512 e262f33de0e3ef97c9bcfc294ba40638dd66b369a4a72bcee42c2d5aafa223eec96b1ed841b97c09b40db798dec38504397ad6000eb3b98eb8b29457e0dfefa3 WHIRLPOOL 70314defe1fc0704a2e3ff2579916a8a206b9437517096b3b1129991dd3364a994991f6bed0d5ace51b78c9ba469afeb4de88d445600783c91456a1278c9ac23 +AUX grub.conf.gentoo 627 SHA256 914b15af252210a32776196437cd8013e10e57d5780e66877ef3fe9a2b4b9776 SHA512 5ee586c151b025a153867d2854b73e2e18a6af38e9d65069b7114a55af776803ba947b4901b0806e79fa8f36aeac90daad608b9ec2a4a8526301d1beb36e4ef3 WHIRLPOOL fcaef85cd7c2c446c882874cf4ec8a2241d1fc97720973a0a0cd1add259da599d4dae4d0b429ba2dff0307ed2d4598d5939cbc1b11127a0dedb3a54249ec9f81 +AUX grub.default 1254 SHA256 181bdb7433ebcbde635e7058a1febaf0100e4e9c83ea4fd222d7010c375882d8 SHA512 1cdce5d9c606a2cba29ec859df96de9e8c292301ee3f26dff848816cda950088c0660dbd3401eec97b15841a2544116664eeda6cb0be753f6d160a7e62578dbc WHIRLPOOL 03514e95078f4f4d176e85ba3a739105a7cbf58a6c3e2ba4a2c660c48329dcc78b968391ecb2d9821084ba4ddddbe03e41d9d6c36685f1db1d4a1f00a1e5d393 +AUX grub.default-2 1470 SHA256 fcef668c1316a38f6a1c784c489c2052b23b8e2b79dc1a940b5bda831947af74 SHA512 5c331323ef17683fdfc59b0057a6e89a451039febc4ff6242c17cd3aeda0ef60930a79dc52e180bf534f94867a8b4545655808ae5a7362643542fea42b6a0d91 WHIRLPOOL 5f8a1192763ee9089e48a7eff13ef75947e7f4db20ff873ae86fd99920b107de827588558bdc26d2bf5ee3da4f51a44d53470aa65bf73ab565cf23e84097de5c +DIST grub-0.92-gentoo-0.2.tar.bz2 21727 SHA256 f579b49b2d24702905c333ce2b6170a554ce26d0232c65478a21a1fd2eb8b8fe SHA512 ac90f58913203b970808e3a6e20ce367af1d6a262eba5f229d080c7f5eebd228bd9add9a423d642f8a53d915930921975af1d45116f18bc0be982320b898ef1d WHIRLPOOL 2bbfddab5da2e786047e25d95c0c8c6cb70f5174df5991db3b09657bc15802af81bcb124bf7723fca3c2016eb42d9f06ef2b8500920ae15de3624ae87c8d3d51 +DIST grub-0.92.tar.gz 877112 SHA256 197e690faed45bcbf854ab5dc591053d6f6ed1a5b8e5596c4ba27d6f0d50eb37 SHA512 11750f4dc6606e354acc7f459416f0a2efaedcd6e60ab85c708de0d04eb7876a899292067c651cc857db30a7a533714f21719a9eb65c14aef9306c5187843bee WHIRLPOOL be47d1ff182dc8305d748b2e6bcf0c6796019eb1f59abfb042ad3bb4c0922c25b5420ce8c6bfe2c098ef120088866b9623e85e47902f8441e061a13c65b58ae1 +DIST grub-0.94-gentoo-0.1.tar.bz2 40585 SHA256 6f5ac30e0495917cd062c48568bab582f68f288bb3fe4fb968869fdefcd012e3 SHA512 c24e5b394a12c557bb023ace27975415540c0a6386a57fcd966c3acc15284e76163bdac4a2878cdae217c4ee276860691dfe7e061b734adf2c493ac3be66fb37 WHIRLPOOL 78abf4a7211a246e99eb30bf74df7a016fdcc66e3bbd2e3abc847e000896723c144f9a0b96d707149ed0cc230d01effad9d4001ad9dc7d4d2ae44a53476b6afb +DIST grub-0.94.tar.gz 923518 SHA256 010d15c823cbccc7b5943735799bf8412ae18391307d4c2d5f8dbed158cc4a1b SHA512 71892db0cfcff3dd3a38ebcbb062419ca9757f0335a26f67a31cb2dd3782f68424753103ea2cb22edf41c2f03d6df28b94828704176ad4ac1c97d836a518798c WHIRLPOOL df4a0cbe1a563f508fae74ad3192348456459962c1fd7d5fa110b7c4f7b8d96033942f4a0f95ead439bc7976b92bd5926482ab35bc9428fdb1c6c1fffc97aee0 +DIST grub-0.96-patches-1.0.tar.bz2 49828 SHA256 3d31cab8131d728673d1b866890a54f7652cab23dc2c4b9499e1f51f0ea6e956 SHA512 8749085473b2064bd051bf79a7026f172b8d87df31c0e9fa1a109410373d15a0c13ccffb92b396fa592a9c0fa1bf37abd1132aec94db30de253715ed668d561d WHIRLPOOL 3db4930c68d2f6f067ce09e990faa6763d148348cfaddd8add2a1988e9727bb69bddbb0a8a5711887df1e8eba69aa96af0b2f4487319cdc240818ebb939c7825 +DIST grub-0.96-r1-gentoo-0.1.tar.bz2 47051 SHA256 3457a18707a0c733cc9e6caea5b41ce182b55add08bc69aa5b4e2fb92676431e SHA512 71a4245bb063cbb98e1735a0520d7d626a763dbf2683980e4695fe45972552de671ea563a1a4cb2acc260eb243825e5d58365f22014902de7d720306251763df WHIRLPOOL 81505f373fca5312a843e6a100a74827b55dd3a226c4a11b53f956e20012e09a1ae96891618f597b921c615d9a2846419f1959935e615969924ddeaf5e5b85a7 +DIST grub-0.96-r2-gentoo-0.1.tar.bz2 47639 SHA256 78fabb16c53518a3e96b9984ee49258ed5cdf23b8c33591c38ddf84912ea7e6c SHA512 6e01f951e3321b0f0ecc6f935e2d9e1bd766f46ecbd46de4921bb6050b4d690f8ff8c9bab627ae48826cee40605a75b5fd9afc6bc56e4af74c6501e8a6057c62 WHIRLPOOL 69d1b4a84c0afbc2a717beb1407957104e1699262bef2e4ad4400e18dccb110f59aae55ea528a78c87dd7bb070be93768e0002c56c4810d1f943c1feefc16e2e +DIST grub-0.96.tar.gz 985761 SHA256 58ba90b7256b1d2a920a7d89eac73ccab01916745f698cbe4fe1c853637ab9ba SHA512 98be0be057fd67f0ced212576de98907d39863d45ffd53a8a8576de05f71e7b28d97be4e544bf7257f0c1b43839945f06fc2a57bac7b7c973cb5a868cc78e1f7 WHIRLPOOL 477ab4234967026e7db253b66b05b5b0ecb1f70090587a992cc5c977b37645f61e9610c9ac21c1fe4a9a4d72e532369b49824dc3c388ede334276ac63defe1b6 +DIST grub-0.97-patches-1.0.tar.bz2 46259 SHA256 b3b9f1998e42684b452cf9793523a1654af8fdf82ab208a8731a32c8eeaacb8f SHA512 de545e96ea0d6e47cbf7e38001f625a43b2d032d4a4a5b4866af99b970f0c6100c8486b68dcddc8ee5768fc0d3999c668d765d4498233ef12c6c202ff4d0339c WHIRLPOOL ebe66e7a814a58185baff0dc862839e96520c5aa33aa38b7ef5b3d46a5a8505afc22580134baba64ba295b037cb7b72f93303ee235e04a166c64dd63fa4a14cb +DIST grub-0.97-patches-1.12.tar.bz2 55811 SHA256 80cedf74d29e334182d8fb906035d2c365b96b6e8a09bbe800f44f98c828ac97 SHA512 c823f01953da5067217c635cf919379d7e3b21929dc2b71463ece6d35b51905c03d361353066eb3ff56cb30460336b6a420889eb007c5a37be66bb7222981460 WHIRLPOOL afffebb1650c50b4bfe33146553c16223d71ba887ecaa9cd985b47f83b2023b691d79f86f5b52475b7799e1d7a11979503ff86d25e9108fd4fa3dcf6aeae7fcf +DIST grub-0.97-patches-1.13.tar.bz2 56412 SHA256 765a7f0bd3ba65d27413794e75deef2c0e76a788dacd0b5387bad21da4bab94f SHA512 9b5d0ab54a839a96c695871fb44605d49ae42be8c31545da6ddf4703ccc45efd2cbe7babb7d6f680ef24bef586ee8d9df83a942208784b9a0d77f79d0f0456f8 WHIRLPOOL e5e09e9ed6734c837453919a767cd5c5c431b4513b25b8454dbdaaa03fa6606de57d1627ae5216fcacc97693ebf6f604fddc3cc6a5afc8111da8fa51a220edf2 +DIST grub-0.97-patches-1.14.tar.bz2 52916 SHA256 5c7ca31fd9b2123471daf2e46a1936c4044ad0c12e353d9d3d8c3f83a1c7a0e5 SHA512 d9a8d420fd5a36f181ca608f9b70be90f9d82cee66c8484636fda5085290586071b5d9379d917e8141b993ffc4777859cd02971c916d6167dca6f50d83282c26 WHIRLPOOL 60abd5087e85d9969784b9f5a100934606a76da03b665533d9d4d1d13f4e2d15de233a71e67a32d18a5fbfe128c2c8bf04c0d4451de24e6ca4fbd8dd862e23ea +DIST grub-0.97-patches-1.2.tar.bz2 20872 SHA256 0a41e076ce1c1dd92b4eaac2905ebd5624162b5258ed0cb234889fa8beb38049 SHA512 2f1402c5c2b32e9b3b492cf58bb2ea952b726fcfbb4104134e667dbfd076509b27228af1a4ce86f36eb3cff7c47b10887f56a25dde3313defa83bd815b90f072 WHIRLPOOL 99d5c5bc91d56c6376673b2d4c1f5bca70ea2a0b005ed7abcf46ecdf0475a2e4b875131b5b38c6330f1c662f389edf9ee57716bd1b7d3adca629782d12d7cabf +DIST grub-0.97-patches-1.4.tar.bz2 24693 SHA256 290dd96fdeb9471c516f061f4949ccda33f8d03ab81a6e2beb5005b3022e71da SHA512 349a3fcba0f56f4c54aed4d51c8ff91e66c410135e05743bb0762f2e4db62048621d0f722311336d8e29e550ab6c1192eeb6b2aaaed7413c174c5c07bcab7446 WHIRLPOOL 5f2ec0f44f8dc274652cdb00270785742740a24a1507854235804537b95d96f327c10b787f084369807bb4fb6393c29e72d55c4d4075f31feaa6cf6f5f83be87 +DIST grub-0.97-patches-1.7.tar.bz2 31190 SHA256 6dfb17ff874ce8f737211a728c319a133b90e3633a80daf5ef370c15ee625389 SHA512 5e2cb9d28797b110014d1b15d1554963b1a7c5d98bf8218673de40ddfdd125789a1f9b635b29592f35616ec8b00ac32e84bc7a49801b02361a7e1f125274d1ce WHIRLPOOL b1333cd1af1a375d374404ba48dde76f1c8cf36a44692f44af45a3b483f765e466e4b4ba7f11c160f621331d7cae54db93aa255fad347af2ab5ee361b6874a89 +DIST grub-0.97-patches-1.8.tar.bz2 48274 SHA256 fcd16e6def8ace7bb5928c2d16ddb032a57a5df24a69f9cfae5ce6292785318b SHA512 43c86ef66cb7cf72e48a198caaaf036df2a989c9f2f6d9e0ca7b25fee59bb1926ff1ac22cc56bc94d0927b468844fc96c4ebb70e02a1bec5648b31244498f166 WHIRLPOOL ce8835b7d41b1c84efd8b175f12d72efe36c22ba5deb8ea3d18a5c4255136d23e1cc036b888fe71759bf8e3e6a0f9e47481b4afb7255ccb5232b248995ff0b93 +DIST grub-0.97-patches-1.9.tar.bz2 51809 SHA256 6b8445c9260803f059031cbe7475a45fee6499fc2dbd911288af6169455c4028 SHA512 b639bc7a42212a4d6ca106f3a6acf18aac88494bd5d29f872e530af0ac9552a9fadf34d9197c8335922dc19684cd2866a3648ce828862c540380e052e88c2c25 WHIRLPOOL 6ada276e2cd3aeb2792219d79ddebdaf6237b21b7bed86a42ec1c11374d42d2072a19959ff657ee865c9ee563ab3a157da983d320f002a1e8d8681d01d84b6de +DIST grub-0.97.tar.gz 971783 SHA256 4e1d15d12dbd3e9208111d6b806ad5a9857ca8850c47877d36575b904559260b SHA512 c2bc9ffc8583aeae71cee9ddcc4418969768d4e3764d47307da54f93981c0109fb07d84b061b3a3628bd00ba4d14a54742bc04848110eb3ae8ca25dbfbaabadb WHIRLPOOL 0ad7f5dc035e2a3ad5fd29b6388f06fd12a8cc694117b4cbd42b5302433aa522db23566222d35219fe17fb95edb5090553156198507f70208eda5d858fd52dd5 +DIST grub-1.99.tar.xz 2639224 SHA256 f308148d4c83c6f16a73b58a0cd39381656edb740929028cae7ad5f0d651021b SHA512 604b931eef3781cdfbd9589ed76c96d6bc9fd9d6429a7a32c94ab1ea5dc2b2e1e26b60c93353763831bddbe071368779bab8564234139cb5eb6cbc3c88395ff4 WHIRLPOOL 68d9de328eb492b9dc1771db6a356de9af5d0bbceb1e187c0aea48f117c94b492c721e773e715664d3e431bda7f0ff5d63774184d2f2c413a08554a91c13dde4 +DIST grub-2.00.tar.xz 5136412 SHA256 784ec38e7edc32239ad75b8e66df04dc8bfb26d88681bc9f627133a6eb85c458 SHA512 f0dbfc90639491e5c671d2df206dec0139171bf096a99ee236f7ebf21cdafc6e6d39a9607e14ad2a6aee7c199ecc63f0a39573d969318e1a0cd32f989aa6b44a WHIRLPOOL b9690c023ab507926b8615ce28bf9de82b793ebd02126a5ecd52a130ab4bc52e2ae650b02ae2d784d4089e2981be944ba8b4800cde742aab793ff0d9029843c8 +DIST grub-2.00~beta6.tar.xz 5122792 SHA256 e58f5ae62b3384ccb75ea9709c85f344b68823e422fd3dea127b1dc28c08abfc SHA512 e37e40f888c962c561a47c459b7d2a6e8b38d736169750199656fae72e227472695bf820267cbe9f73635cbd07d1ae2dfc967c3e18d17e4d595ba4ebcfac8e8a WHIRLPOOL c7074824bc369ef5179418acf222204ba35e87d7a582cd0e03abeca4fdff4b5a2ad89480069297da5ffd9d37cbc5941a5c38f7b7bd533860ce8a001432144862 +DIST splash.xpm.gz 33856 SHA256 b95600f777331b0dd31d51c68f60f0e846e4c8b628857a41165f4e6b30e6acaf SHA512 5ae1f786f7d46a95a7061068d5b2b3ad64607c7b190d6f28379508c5dce67e26308325bfd637542a84855dfcf1ea3d143947326fdb189a6a8972208d3ead23da WHIRLPOOL d95b7b588ea8ac7c2c8c53eb8057aef21c825da6411afe3b7e864c606aeffaaebce8ae41ce3e979f277bd6b48a9e82a1f2ea8afc836213b56523d8a854227d7b +EBUILD grub-0.92-r1.ebuild 2605 SHA256 cd42e232b3d1e3ce99fa391907df1019f38a853f574cfb812346d9b1db0c7596 SHA512 8e1f79d34e3398be574d83a3b6a28ba1adad2ff80fdeadf6bb13cf3d77d73224372161a27f3f079e01aa4b564395473fa658eb52a38c3e3fba937557c0c1b41a WHIRLPOOL 090466918d908b36416a48f8b5109b8042bebae5fd5769a8b27ff3cb6f80dd769ee7960e4981da7ef82f9243a945ec6397e3aa70e958423adf530baedb6731c2 +EBUILD grub-0.94-r1.ebuild 3340 SHA256 d9d07a2c87d1d6656e42559244e1c4f06e47aa7dfdbc644f2a3eeefabf3b784e SHA512 ee66f414607b9d2a14cf8b3e7af5b3614836f35417a45e1eebf3ba2e450818dc6704f80e6b62108697f99b84c3052c9b9dd0bd0a45b021de1b614106cf10641f WHIRLPOOL a538c069f51d9a12b24a083f8223907bd4c1a2ca10b1632db94dc795450739d069095f20c59c6d73528d23d22e288c36f0ca38783104b0eba5588fc9cb3aebf0 +EBUILD grub-0.96-r1.ebuild 4459 SHA256 f7fa0fc99b2554897cb1ac437a49c64231cc0d1513b0a89d9fab78e61af08b4b SHA512 35c917af6d71b6f3f9428628b5673f1ee892c2f7c2d8fd6f8c7ba7605d8c674ff46bebaa7fe9c0815d4b6af92118669d01678e197e066c806690510171adab47 WHIRLPOOL a80d3ca9d42c412f5526cb1927d939c33b15230589eae9a79a10a2db87f41eb2921f848ffc9f1ba08ad7a989bf8419fd4af861024c9d6fc13991a0d9fdaa3184 +EBUILD grub-0.96-r2.ebuild 4315 SHA256 47a243f251180b5e4a8695db5d81eceb90f4a3116c4abc088a1ed656ceadec9a SHA512 542b6a4f3f63e2c5b5072e4cd6b205b572d29b734f0a928330e77bcd5e0b26489eee8af26a6a29eb22f75dd69949f1a640e5a9c1a05b329ae9874f885f0bf291 WHIRLPOOL 5bd5b47084103148bd281f55866547ad337da2eea9112a27b3f6dde583733a9eff7680cb495376defdd6b02afb394a7d515d313d84a2378c5c46ff8cda5323c9 +EBUILD grub-0.96-r3.ebuild 4291 SHA256 ce7a2a810dc1df885b6df4ba6e4bdb9e2db68954bd49ba7259b8e7a7532a49b2 SHA512 21014ad6e31d1cf6186aaead0825b1932d3e7027a7e58520cb9a6f16ca146eae54b9bbb63f5543f93ec80395f8bf5a819159c9b690090b3459db8c8ad2b27aea WHIRLPOOL e78f6ef6fe7ee056ae2b4f6142e106ad3bace7f37a6b2ea32b094d286df5ae250c5506ab75fa7a1d5469e0871229a2b481aa995d65a8b9a721318b4a2817d687 +EBUILD grub-0.97-r10.ebuild 9459 SHA256 86413acb2ff57ab54b2f53499ccef341fc734edda73506ac56063667e473fec6 SHA512 c5d6a183140e1637300db264068c08347145d2808df0206e775458a9ccdc7f2a76c48b76545d563a27f141c8bcace0f17ef71e99e3d8e1de0c5cd6d45ac8b18d WHIRLPOOL 16ef1de80a08205af1be71b3cfe4b0959591f8827bc26a138a8a92e173944f0589df7e466263c074c96ab1e25eb7dc7669f352526d3a6f433581218812aa004d +EBUILD grub-0.97-r11.ebuild 9460 SHA256 adab9a8ca3381cc500b81f48315a7ccdc01aff8bab661a498357b28df580c1e5 SHA512 c5314029baba3a32d805c5ab55d8f9d886cd6954610b7989df30bf0272412c9b1fca734c968e7462cee9d17e46c8a6a2e3144ed09ea8f41cbbf6b02217ad3dde WHIRLPOOL 64b82c6aee372085aefb530d248d192e61fe05e29ed1b577c9c7923caaba18ff309a904fca4ba813e9e5505eaf8b57b3b8ced3c0acd91a4f556e7a546407be46 +EBUILD grub-0.97-r12.ebuild 9233 SHA256 d5486666e1f8339a8308489607c9108cd34e8ebc696a956e2ff8dafad1c71815 SHA512 332a89395331ef04654345f960f2939340ce9b47ae6ac755e54f4ecc85f6243060890e7553b515468aaffd8346bbb5a0b7fbd26d23911b847f12c557854e96f1 WHIRLPOOL 1a20c9df999954ce431ca50eaaa5651721c939229b3a55d820445620218ffa64d43ba6251e88b1df6f54163f6914265596698db513a47d3c415ccaa01b51e61d +EBUILD grub-0.97-r13.ebuild 9384 SHA256 c694ab37f477548da2b98c9beb2c5432ddd799e40fcbf82273cd2da3fdb072e1 SHA512 615e4d11ba91c7bc2fcb926bfc791d1aa3151a06dd336f9597ccc5b22a4b6a1bbffde5f7622ec6cc4c04216c63d99becfc9cf38bcf8fed476773bd3b7930fad2 WHIRLPOOL 91d94e1f90393bb5137b791bfa2d73b418938091d81ec44b783d749ea08ee3a615a5ca4d07a841c66429f6ff7d480ae2ad4f0626576ddaab459f111106160761 +EBUILD grub-0.97-r2.ebuild 4820 SHA256 e76d0df0f865851a7ed5aba91b4f275ad099d9dd61f897c8a27ac0df31880a2d SHA512 c021917b2b54ed54205dd9d0c74be86882367e04f94e69460cb5c44cc15d05a2762140d286823b8abe8650ae72c0f85c646225d8c463ecadca9742b0ea391a23 WHIRLPOOL 4c741c97cec4820bfd7db26da9fd2d07722c2dc68ecee0388a34cf284c401dfe47700e517c427a55a76644f3cfdf52cb5bf47f7ff3e2a229cd6a07e4dab21f23 +EBUILD grub-0.97-r3.ebuild 4697 SHA256 fc6caf4957afda2029324f73403248c2916e5736a0e779fe1492d0c69fb8d358 SHA512 255f3628d98d4e0f9ecb17bb7e1f09c256abd5da2388034374a80700d7c8d0fb016e69b5fedc109e1bd2bef0e49e090612e77ae5531552252dc35f7110b026b8 WHIRLPOOL 7ef1de92ab6ecfdfdf3b1e64f50924de3702e37c0c142120b3898ba58eebaf15ca42d65aa63c5972acc8124d2e0196503e4cdde00545ab64a7185ffdd6e066d7 +EBUILD grub-0.97-r4.ebuild 4942 SHA256 28e7599759c86df56eedb0390553c85cd5b59ca4188cac2af7d9024b2d8743d4 SHA512 939469c8504dc60a56846d8a5a329673b363feef3e41b54c43b178bb254a3d24f1667b0bde738dbd04a3e5499060def55d758a49110bd89caeb9d388526448ac WHIRLPOOL 9187ee32dc340a66ebdcb9775fda2be3bb6990ae9352b34b0c5c6381c425a3b26140ed2e39fb9832e7fbc9643364392f116a0d1030dbcf6f616b87fabefeeb07 +EBUILD grub-0.97-r5.ebuild 6855 SHA256 3ac1983105be92f0fa20b22ea422391860dcec6975e2278878329532be3596ef SHA512 e770c35e5b91ce9d93c8957394f8a579e333bfd9b209358f0fb05c892eded8cf42acb040c92d4a24f991714ba8658f87a7d62e7dd41c0f7ff524d2915b14392b WHIRLPOOL 10886d92a05480b957f8f565d2b852ccc3da386eb7d0d78fc98238526b3dadfd692dc84036b88341374f1b92e913acfb48592e27d45ce595c7c33d1533982c45 +EBUILD grub-0.97-r6.ebuild 8808 SHA256 2a425bfcd935f7e3d16ba4949067445f851a46bf837a903a2822f7a319bcb407 SHA512 409a7f3f4dca29d76b9a8d6193614c0a801abe196fc096b7dab8db2b8fbe2dbd89ce3f91db576e2c988be36cf06253fad17f93a9807d0a90a4bedb5e6a0228b9 WHIRLPOOL 5d86053fa3be9450004c7637d2677b92eeee7059de2020d0fb509f0034f9b0c1ea56e400bc29489c503f6b7a5bfd59e13f92197f1d37d5c7aaf600be2583aea5 +EBUILD grub-0.97-r8.ebuild 8948 SHA256 3eb9b11beeae64c986c9d27233f79525f271d0362fba66c8eccf6b2a62fc7463 SHA512 0d1ecf0fa67d282d01932683aa722028cf42c0197695a19d2e11d793604b2a275a6bbcd968b1f6d3281a1d258bfd674fab6cbbd704e7e4f73721948b68e34c1b WHIRLPOOL d7bf10cc21047f2d05e6a49d8de0923f4cc5e009f27ccea9f574165afec01e3b6a4e4d55f69b5ccf0652ce4a34918992f1533f0facc18660864313af3dbe47c8 +EBUILD grub-0.97-r9.ebuild 9053 SHA256 b6411eb5c379cc6b9120f1f727733d9724c4257405c3a7a1935b2aa573085726 SHA512 ddcf78c3d72f1bd854ed44753f4870fc9efd0cf69a28efb24423863c6ad740657affa74eff403484b4f30046e338d4a506a71e5d6b1818022377a1a77880b004 WHIRLPOOL 13d3adafd3814259081dd783067c077fbaebfa2974214d5b0249c818aa3cc004cb2bd526b18f1c1a46dfc0641325a92b87c8f73608972061c52c7ded99e95fe0 +EBUILD grub-0.97.ebuild 4238 SHA256 d93dd5dca80c822e0659007b827966fb69c7f702b13ba672b4c3f486af54cee1 SHA512 46d72cfaa5735d0b3d2d89a8e6ce83745e4645370cdbbfcffc37d1413ffeb2b1caafac8c7cc712925ffc09411870b06467eb50bc475997508e7beea8fa5172d7 WHIRLPOOL 4b6fe9a7300baf6364555858a49ae2775ea0da27291d5d48fa634097531ae3b6da445ee2f959ef584bf4c913aad5e689b77e7326af257549ef107704dc0d202e +EBUILD grub-1.99-r2.ebuild 8413 SHA256 13a1281843b801804a5f2dc491cd21d6ac4d068c59e739015dc949a51011f585 SHA512 520bd623cfaf70451b4331f2dc464982f4de1b0c070ee8c0b336c9d16589aaa96924ea923f4c47ccb07d3c8f6da987a89ed285f1f4fa8f922465ab912e8940bd WHIRLPOOL 5abb91bf54a5024b225e7c3891b884827b31e6e8e380db9aa37fd520c55cd2e94ce1e7545271d52a58baab63446906cb69440177a4678000ac519088b9ae6966 +EBUILD grub-2.00-r1.ebuild 8862 SHA256 c88e12c0de910726920616a0fb9fecd1dab504532287d9742015faab713268ab SHA512 2589fb92dee5d6a25af6a9584ccb45c6b019d219fde0c3dbde1e35abc8a82e7ce8793375e694c30372ea98da9e7383db98b6639c8ee93d23dfb0b9cb6f0cc838 WHIRLPOOL 06f3d43667856a0d6c2fe6ebf3b89930171f047e66ed9df5d766b8851b9bb5ae0db7f72a6d319d16db18a1968b6a4d6c4bcf1b8532df168141bb9c9f0733d24a +EBUILD grub-2.00-r2.ebuild 8674 SHA256 371eef0156015ab5216baaafbc5faef833c83048e8dc8fc0434f4358dd3a13a0 SHA512 4b461bfb162a43d98bdccdd8927949f7b2073684e9a6af7becf8dd328c0abc939946117ad5044db4baa233000d9db525e71246708f345774ddd81c1c7aba5242 WHIRLPOOL 2f6f4eebfda762159e6bd136ef0838dc1c3aff631af750708f74a91fe3ba3f2045710ad6b48294d10f5fbdc7ef125cbe0641ec3364f373ef143042d3b6084cb8 +EBUILD grub-2.00_beta6.ebuild 7140 SHA256 8026d9d32d21863e5427cac5b641fbc5f799662437bd9a40daa3f9a377a0de68 SHA512 35b5a7aa5224ba1f0d3dabaeb03d915b86a3c16419f6ef012c8092b198e8bbc054f22e4658930f704402066622b98c67c869f0c9cf5d74637c34ae786b0861fa WHIRLPOOL 54839cae4be956d12f8c62524923e9087f76c5e2c3c7db7cca074084deba71cd870238e514227a73a1131748fac501566afe29866231b68e4bbddbf2b465a71b +EBUILD grub-9999.ebuild 8605 SHA256 506e79cb8de178641162809a15b2656d771af197cb8bc4dbe83754ac99234cdb SHA512 3dcda4d909ab6f37e9e9db5951d4bad076b42e6a38a5e28431b7e5cd801c2c3e569966a5a16ce6031acec03a05005ac8dee1c5a12305fac88e38c3554afa68b8 WHIRLPOOL da73ca55e91e5e303e5f0254197722a0ff05ef223d5fc70305d6d215ef36879232350734b7c92851608989ae97d4e3c71bedb6e64557f2b93b98ac47655483f2 +MISC ChangeLog 48389 SHA256 40e61650279307893f5b1d3b67088a5e75beafe4178a90dfc782ba73a6611d51 SHA512 6abbd2a4df86f9931a6d698bcf22ad6550d4e34d6f5cff96b815c9d91eb5e3f8e3c17c274a699dd53b0a227454509f8611ed3c19cb51bfce60a7603143d5b71c WHIRLPOOL bbb9140139bdc778fe0413598328afc00cd877abbe3945d3b873ed93dd9e5e5bd5565b1afd78f3b6162599f79be5b9c750370fc5dcaee23d47db84b31f454d44 +MISC metadata.xml 673 SHA256 e14e5e46b726a3645b85217a2afbd5b04adb54990c7db837e01a50a8322d81b9 SHA512 9df3d519f0aa3e53304c956638acb927224f3ca83ba1959f089852ee7c822ca3cae99d3da0efcbfeedd99dbe630aa0b39d6f9b61d0cad8e72c155f7253c7d8cc WHIRLPOOL ed7bc1f5c8f84ef6fb18143163f239d9f47e8fd88c3fd521f625b2191349d7520bf4c6a7e6c7e3eef73a0af43faa6814e591c983cc29298bf88e7c42df3c69d2 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.19 (GNU/Linux) + +iF4EAREIAAYFAlEO5zYACgkQC77qH+pIQ6S5lwEApR9Z4NKa3N1pra7I83ciCi72 +6wbYIx273E9gt/J38jUA/ippKNu3lNUJwIdcD6LEpuVHKwvOueV5KQ5r+nJDApUT +=201N +-----END PGP SIGNATURE----- diff --git a/sdk_container/src/third_party/portage-stable/sys-boot/grub/files/grub-0.97-gpt.patch b/sdk_container/src/third_party/portage-stable/sys-boot/grub/files/grub-0.97-gpt.patch new file mode 100644 index 0000000000..7b1a55cd89 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-boot/grub/files/grub-0.97-gpt.patch @@ -0,0 +1,315 @@ +diff -ruBbd --unidirectional-new-file grub-0.96/stage2/builtins.c grub-0.96-patched/stage2/builtins.c +--- grub-0.96/stage2/builtins.c 2004-06-20 09:33:04.000000000 -0400 ++++ grub-0.96-patched/stage2/builtins.c 2007-01-04 13:56:06.000000000 -0500 +@@ -1229,14 +1229,15 @@ + for (drive = 0x80; drive < 0x88; drive++) + { + unsigned long part = 0xFFFFFF; +- unsigned long start, len, offset, ext_offset; +- int type, entry; ++ unsigned long start, len, offset, ext_offset, gpt_offset; ++ int type, entry, gpt_count, gpt_size; + char buf[SECTOR_SIZE]; + + current_drive = drive; + while (next_partition (drive, 0xFFFFFF, &part, &type, + &start, &len, &offset, &entry, +- &ext_offset, buf)) ++ &ext_offset, &gpt_offset, ++ &gpt_count, &gpt_size, buf)) + { + if (type != PC_SLICE_TYPE_NONE + && ! IS_PC_SLICE_TYPE_BSD (type) +@@ -2806,8 +2807,8 @@ + { + int new_type; + unsigned long part = 0xFFFFFF; +- unsigned long start, len, offset, ext_offset; +- int entry, type; ++ unsigned long start, len, offset, ext_offset, gpt_offset; ++ int entry, type, gpt_count, gpt_size; + char mbr[512]; + + /* Get the drive and the partition. */ +@@ -2844,7 +2845,14 @@ + /* Look for the partition. */ + while (next_partition (current_drive, 0xFFFFFF, &part, &type, + &start, &len, &offset, &entry, +- &ext_offset, mbr)) ++ &ext_offset, &gpt_offset, &gpt_count, &gpt_size, mbr)) ++ /* The partition may not be a GPT partition. */ ++ if (gpt_offset != 0) ++ { ++ errnum = ERR_BAD_ARGUMENT; ++ return 1; ++ } ++ + { + if (part == current_partition) + { +diff -ruBbd --unidirectional-new-file grub-0.96/stage2/disk_io.c grub-0.96-patched/stage2/disk_io.c +--- grub-0.96/stage2/disk_io.c 2004-05-23 12:35:24.000000000 -0400 ++++ grub-0.96-patched/stage2/disk_io.c 2007-01-04 14:01:08.000000000 -0500 +@@ -21,6 +21,7 @@ + + #include + #include ++#include + + #ifdef SUPPORT_NETBOOT + # define GRUB 1 +@@ -502,8 +503,8 @@ + set_partition_hidden_flag (int hidden) + { + unsigned long part = 0xFFFFFF; +- unsigned long start, len, offset, ext_offset; +- int entry, type; ++ unsigned long start, len, offset, ext_offset, gpt_offset; ++ int entry, type, gpt_count, gpt_size; + char mbr[512]; + + /* The drive must be a hard disk. */ +@@ -524,7 +525,14 @@ + /* Look for the partition. */ + while (next_partition (current_drive, 0xFFFFFF, &part, &type, + &start, &len, &offset, &entry, +- &ext_offset, mbr)) ++ &ext_offset, &gpt_offset, &gpt_count, &gpt_size, mbr)) ++ /* The partition may not be a GPT partition. */ ++ if (gpt_offset != 0) ++ { ++ errnum = ERR_BAD_ARGUMENT; ++ return 1; ++ } ++ + { + if (part == current_partition) + { +@@ -577,11 +585,14 @@ + unsigned long *partition, int *type, + unsigned long *start, unsigned long *len, + unsigned long *offset, int *entry, +- unsigned long *ext_offset, char *buf) ++ unsigned long *ext_offset, ++ unsigned long *gpt_offset, int *gpt_count, ++ int *gpt_size, char *buf) + { + /* Forward declarations. */ + auto int next_bsd_partition (void); + auto int next_pc_slice (void); ++ auto int next_gpt_slice(void); + + /* Get next BSD partition in current PC slice. */ + int next_bsd_partition (void) +@@ -666,6 +677,40 @@ + return 0; + } + ++ /* If this is a GPT partition table, read it as such. */ ++ if (*entry == -1 && *offset == 0 && PC_SLICE_TYPE (buf, 0) == PC_SLICE_TYPE_GPT) ++ { ++ struct grub_gpt_header *hdr = (struct grub_gpt_header *) buf; ++ ++ /* Read in the GPT Partition table header. */ ++ if (! rawread (drive, 1, 0, SECTOR_SIZE, buf)) ++ return 0; ++ ++ if (hdr->magic == GPT_HEADER_MAGIC && hdr->version == 0x10000) ++ { ++ /* Let gpt_offset point to the first entry in the GPT ++ partition table. This can also be used by callers of ++ next_partition to determine if a entry comes from a ++ GPT partition table or not. */ ++ *gpt_offset = hdr->partitions; ++ *gpt_count = hdr->maxpart; ++ *gpt_size = hdr->partentry_size; ++ ++ return next_gpt_slice(); ++ } ++ else ++ { ++ /* This is not a valid header for a GPT partition table. ++ Re-read the MBR or the boot sector of the extended ++ partition. */ ++ if (! rawread (drive, *offset, 0, SECTOR_SIZE, buf)) ++ return 0; ++ } ++ } ++ ++ /* Not a GPT partition. */ ++ *gpt_offset = 0; ++ + /* Increase the entry number. */ + (*entry)++; + +@@ -710,6 +755,43 @@ + return 1; + } + ++ /* Get the next GPT slice. */ ++ int next_gpt_slice (void) ++ { ++ struct grub_gpt_partentry *gptentry = (struct grub_gpt_partentry *) buf; ++ /* Make GPT partitions show up as PC slices. */ ++ int pc_slice_no = (*partition & 0xFF0000) >> 16; ++ ++ /* If this is the first time... */ ++ if (pc_slice_no == 0xFF) ++ { ++ pc_slice_no = -1; ++ *entry = -1; ++ } ++ ++ do { ++ (*entry)++; ++ ++ if (*entry >= *gpt_count) ++ { ++ errnum = ERR_NO_PART; ++ return 0; ++ } ++ /* Read in the GPT Partition table entry. */ ++ if (! rawread (drive, (*gpt_offset) + GPT_ENTRY_SECTOR (*gpt_size, *entry), GPT_ENTRY_INDEX (*gpt_size, *entry), *gpt_size, buf)) ++ return 0; ++ } while (! (gptentry->type1 && gptentry->type2)); ++ ++ pc_slice_no++; ++ *start = gptentry->start; ++ *len = gptentry->end - gptentry->start + 1; ++ *type = PC_SLICE_TYPE_EXT2FS; ++ *entry = pc_slice_no; ++ *partition = (*entry << 16) | 0xFFFF; ++ ++ return 1; ++ } ++ + /* Start the body of this function. */ + + #ifndef STAGE1_5 +@@ -717,6 +799,9 @@ + return 0; + #endif + ++ if (*partition != 0xFFFFFF && *gpt_offset != 0) ++ return next_gpt_slice (); ++ + /* If previous partition is a BSD partition or a PC slice which + contains BSD partitions... */ + if ((*partition != 0xFFFFFF && IS_PC_SLICE_TYPE_BSD (*type & 0xff)) +@@ -755,6 +840,9 @@ + unsigned long dest_partition = current_partition; + unsigned long part_offset; + unsigned long ext_offset; ++ unsigned long gpt_offset; ++ int gpt_count; ++ int gpt_size; + int entry; + char buf[SECTOR_SIZE]; + int bsd_part, pc_slice; +@@ -766,7 +854,8 @@ + int ret = next_partition (current_drive, dest_partition, + ¤t_partition, ¤t_slice, + &part_start, &part_length, +- &part_offset, &entry, &ext_offset, buf); ++ &part_offset, &entry, &ext_offset, ++ &gpt_offset, &gpt_count, &gpt_size, buf); + bsd_part = (current_partition >> 8) & 0xFF; + pc_slice = current_partition >> 16; + return ret; +diff -ruBbd --unidirectional-new-file grub-0.96/stage2/gpt.h grub-0.96-patched/stage2/gpt.h +--- grub-0.96/stage2/gpt.h 1969-12-31 19:00:00.000000000 -0500 ++++ grub-0.96-patched/stage2/gpt.h 2007-01-04 13:52:14.000000000 -0500 +@@ -0,0 +1,68 @@ ++/* ++ * GRUB -- GRand Unified Bootloader ++ * Copyright (C) 2002,2005,2006 Free Software Foundation, Inc. ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ */ ++ ++#ifndef _GPT_H ++#define _GPT_H ++ ++typedef signed char grub_int8_t; ++typedef signed short grub_int16_t; ++typedef signed int grub_int32_t; ++typedef signed long long int grub_int64_t; ++typedef unsigned char grub_uint8_t; ++typedef unsigned short grub_uint16_t; ++typedef unsigned int grub_uint32_t; ++typedef unsigned long long int grub_uint64_t; ++ ++struct grub_gpt_header ++{ ++ grub_uint64_t magic; ++ grub_uint32_t version; ++ grub_uint32_t headersize; ++ grub_uint32_t crc32; ++ grub_uint32_t unused1; ++ grub_uint64_t primary; ++ grub_uint64_t backup; ++ grub_uint64_t start; ++ grub_uint64_t end; ++ grub_uint8_t guid[16]; ++ grub_uint64_t partitions; ++ grub_uint32_t maxpart; ++ grub_uint32_t partentry_size; ++ grub_uint32_t partentry_crc32; ++} __attribute__ ((packed)); ++ ++struct grub_gpt_partentry ++{ ++ grub_uint64_t type1; ++ grub_uint64_t type2; ++ grub_uint8_t guid[16]; ++ grub_uint64_t start; ++ grub_uint64_t end; ++ grub_uint8_t attrib; ++ char name[72]; ++} __attribute__ ((packed)); ++ ++#define GPT_HEADER_MAGIC 0x5452415020494645UL ++ ++#define GPT_ENTRY_SECTOR(size,entry) \ ++ ((((entry) * (size) + 1) & ~(SECTOR_SIZE - 1)) >> SECTOR_BITS) ++#define GPT_ENTRY_INDEX(size,entry) \ ++ ((((entry) * (size) + 1) & (SECTOR_SIZE - 1)) - 1) ++ ++#endif /* _GPT_H */ +diff -ruBbd --unidirectional-new-file grub-0.96/stage2/pc_slice.h grub-0.96-patched/stage2/pc_slice.h +--- grub-0.96/stage2/pc_slice.h 2003-07-09 07:45:53.000000000 -0400 ++++ grub-0.96-patched/stage2/pc_slice.h 2007-01-04 13:52:14.000000000 -0500 +@@ -115,6 +115,7 @@ + #define PC_SLICE_TYPE_LINUX_EXTENDED 0x85 + #define PC_SLICE_TYPE_VSTAFS 0x9e + #define PC_SLICE_TYPE_DELL_UTIL 0xde ++#define PC_SLICE_TYPE_GPT 0xee + #define PC_SLICE_TYPE_LINUX_RAID 0xfd + + +diff -ruBbd --unidirectional-new-file grub-0.96/stage2/shared.h grub-0.96-patched/stage2/shared.h +--- grub-0.96/stage2/shared.h 2004-06-19 12:40:09.000000000 -0400 ++++ grub-0.96-patched/stage2/shared.h 2007-01-04 13:52:15.000000000 -0500 +@@ -934,7 +934,9 @@ + unsigned long *partition, int *type, + unsigned long *start, unsigned long *len, + unsigned long *offset, int *entry, +- unsigned long *ext_offset, char *buf); ++ unsigned long *ext_offset, ++ unsigned long *gpt_offset, int *gpt_count, ++ int *gpt_size, char *buf); + + /* Sets device to the one represented by the SAVED_* parameters. */ + int make_saved_active (void); diff --git a/sdk_container/src/third_party/portage-stable/sys-boot/grub/files/grub-2.00-compression.patch b/sdk_container/src/third_party/portage-stable/sys-boot/grub/files/grub-2.00-compression.patch new file mode 100644 index 0000000000..58bc1f9327 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-boot/grub/files/grub-2.00-compression.patch @@ -0,0 +1,84 @@ +https://bugs.gentoo.org/show_bug.cgi?id=424527 +https://savannah.gnu.org/bugs/index.php?36770 + +=== modified file 'grub-core/lib/xzembed/xz_dec_stream.c' +--- grub-core/lib/xzembed/xz_dec_stream.c 2012-02-29 13:56:51 +0000 ++++ grub-core/lib/xzembed/xz_dec_stream.c 2012-07-22 14:27:03 +0000 +@@ -403,18 +403,25 @@ + } + #endif + +- do { ++ if (b->in_pos == b->in_size) ++ return XZ_OK; ++ ++ if (!crc32 && s->hash_size == 0) ++ s->pos += 8; ++ ++ while (s->pos < (crc32 ? 32 : s->hash_size * 8)) { + if (b->in_pos == b->in_size) + return XZ_OK; + + #ifndef GRUB_EMBED_DECOMPRESSOR +- if (hash && s->hash_value[s->pos / 8] != b->in[b->in_pos++]) ++ if (hash && s->hash_value[s->pos / 8] != b->in[b->in_pos]) + return XZ_DATA_ERROR; + #endif ++ b->in_pos++; + + s->pos += 8; + +- } while (s->pos < (crc32 ? 32 : s->hash_size * 8)); ++ } + + #ifndef GRUB_EMBED_DECOMPRESSOR + if (s->hash) +@@ -529,8 +536,6 @@ + s->hash->init(s->index.hash.hash_context); + s->hash->init(s->block.hash.hash_context); + } +- if (!s->hash) +- return XZ_OPTIONS_ERROR; + #endif + } + else + +=== modified file 'grub-core/normal/autofs.c' +--- grub-core/normal/autofs.c 2012-05-01 13:26:36 +0000 ++++ grub-core/normal/autofs.c 2012-07-22 14:23:46 +0000 +@@ -32,11 +32,21 @@ + autoload_fs_module (void) + { + grub_named_list_t p; ++ int ret = 0; ++ grub_file_filter_t grub_file_filters_was[GRUB_FILE_FILTER_MAX]; ++ ++ grub_memcpy (grub_file_filters_was, grub_file_filters_enabled, ++ sizeof (grub_file_filters_enabled)); ++ grub_memcpy (grub_file_filters_enabled, grub_file_filters_all, ++ sizeof (grub_file_filters_enabled)); + + while ((p = fs_module_list) != NULL) + { + if (! grub_dl_get (p->name) && grub_dl_load (p->name)) +- return 1; ++ { ++ ret = 1; ++ break; ++ } + + if (grub_errno) + grub_print_error (); +@@ -46,7 +56,10 @@ + grub_free (p); + } + +- return 0; ++ grub_memcpy (grub_file_filters_enabled, grub_file_filters_was, ++ sizeof (grub_file_filters_enabled)); ++ ++ return ret; + } + + /* Read the file fs.lst for auto-loading. */ + diff --git a/sdk_container/src/third_party/portage-stable/sys-boot/grub/files/grub-2.00-config-quoting.patch b/sdk_container/src/third_party/portage-stable/sys-boot/grub/files/grub-2.00-config-quoting.patch new file mode 100644 index 0000000000..3b031c6264 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-boot/grub/files/grub-2.00-config-quoting.patch @@ -0,0 +1,113 @@ +https://bugs.gentoo.org/show_bug.cgi?id=426364 +https://savannah.gnu.org/bugs/index.php?36839 +--- util/grub-mkconfig_lib.in ++++ util/grub-mkconfig_lib.in +@@ -255,19 +255,19 @@ + echo "$version_find_latest_a" + } + +-# One layer of quotation is eaten by "", the second by sed, and the third by +-# printf; so this turns ' into \'. Note that you must use the output of ++# One layer of quotation is eaten by "" and the second by ++# sed; so this turns ' into \'. Note that you must use the output of + # this function in a printf format string. + + grub_quote () { +- sed "s/'/'\\\\\\\\''/g" ++ sed "s/'/'\\\\''/g" + } + + gettext_quoted () { +- gettext "$@" | sed "s/'/'\\\\\\\\''/g" ++ gettext "$@" | grub_quote + } + +-# Run the first argument through gettext_quoted, and then pass that and all ++# Run the first argument through gettext, and then pass that and all + # remaining arguments to printf. This is a useful abbreviation and tends to + # be easier to type. + gettext_printf () { + +=== modified file 'util/grub.d/10_hurd.in' +--- util/grub.d/10_hurd.in ++++ util/grub.d/10_hurd.in +@@ -117,7 +117,7 @@ + opts= + fi + sed "s/^/$submenu_indentation/" << EOF +- echo '$message' ++ echo '$(echo "$message" | grub_quote)' + multiboot ${kernel} root=device:${GRUB_DEVICE#/dev/} $opts ${GRUB_CMDLINE_GNUMACH} + EOF + +@@ -133,7 +133,7 @@ + fi + + sed "s/^/$submenu_indentation/" << EOF +- echo '$message' ++ echo '$(echo "$message" | grub_quote)' + module /hurd/${hurd_fs}.static ${hurd_fs} $opts \\ + --multiboot-command-line='\${kernel-command-line}' \\ + --host-priv-port='\${host-port}' \\ +--- util/grub.d/10_illumos.in ++++ util/grub.d/10_illumos.in +@@ -46,6 +46,7 @@ + ISADIR= + fi + zfs-bootfs $($grub_mkrelpath /) ZFS_BOOTFS ++ echo '$(echo "$message" | grub_quote)' + multiboot $($grub_mkrelpath /platform/i86pc/kernel)/\$ISADIR/unix /platform/i86pc/kernel/\$ISADIR/unix -B \$ZFS_BOOTFS,console=text + module $($grub_mkrelpath /platform/i86pc)/\$ISADIR/boot_archive /platform/i86pc/\$ISADIR/boot_archive + } +--- util/grub.d/10_kfreebsd.in ++++ util/grub.d/10_kfreebsd.in +@@ -100,7 +100,7 @@ + printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/" + message="$(gettext_printf "Loading kernel of FreeBSD %s ..." ${version})" + sed "s/^/$submenu_indentation/" << EOF +- echo '$message' ++ echo '$(echo "$message" | grub_quote)' + kfreebsd ${rel_dirname}/${basename} ${args} + EOF + +--- util/grub.d/10_linux.in ++++ util/grub.d/10_linux.in +@@ -134,14 +134,14 @@ + fi + message="$(gettext_printf "Loading Linux %s ..." ${version})" + sed "s/^/$submenu_indentation/" << EOF +- echo '$message' ++ echo '$(echo "$message" | grub_quote)' + linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args} + EOF + if test -n "${initrd}" ; then + # TRANSLATORS: ramdisk isn't identifier. Should be translated. + message="$(gettext_printf "Loading initial ramdisk ...")" + sed "s/^/$submenu_indentation/" << EOF +- echo '$message' ++ echo '$(echo "$message" | grub_quote)' + initrd ${rel_dirname}/${initrd} + EOF + fi +--- util/grub.d/20_linux_xen.in ++++ util/grub.d/20_linux_xen.in +@@ -120,16 +120,16 @@ + xmessage="$(gettext_printf "Loading Xen %s ..." ${xen_version})" + lmessage="$(gettext_printf "Loading Linux %s ..." ${version})" + sed "s/^/$submenu_indentation/" << EOF +- echo '$xmessage' ++ echo '$(echo "$xmessage" | grub_quote)' + multiboot ${rel_xen_dirname}/${xen_basename} placeholder ${xen_args} +- echo '$lmessage' ++ echo '$(echo "$lmessage" | grub_quote)' + module ${rel_dirname}/${basename} placeholder root=${linux_root_device_thisversion} ro ${args} + EOF + if test -n "${initrd}" ; then + # TRANSLATORS: ramdisk isn't identifier. Should be translated. + message="$(gettext_printf "Loading initial ramdisk ...")" + sed "s/^/$submenu_indentation/" << EOF +- echo '$message' ++ echo '$(echo "$message" | grub_quote)' + module ${rel_dirname}/${initrd} + EOF + fi diff --git a/sdk_container/src/third_party/portage-stable/sys-boot/grub/files/grub-2.00-freebsd.patch b/sdk_container/src/third_party/portage-stable/sys-boot/grub/files/grub-2.00-freebsd.patch new file mode 100644 index 0000000000..bcfbf2633c --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-boot/grub/files/grub-2.00-freebsd.patch @@ -0,0 +1,382 @@ +Taken from +http://bzr.savannah.gnu.org/lh/grub/trunk/grub/revision/4556 +http://bzr.savannah.gnu.org/lh/grub/trunk/grub/revision/4584 +http://bzr.savannah.gnu.org/lh/grub/trunk/grub/revision/4624 +http://bzr.savannah.gnu.org/lh/grub/trunk/grub/revision/4625 + +diff -Nur grub-2.00.orig/grub-core/loader/i386/bsd.c grub-2.00/grub-core/loader/i386/bsd.c +--- grub-2.00.orig/grub-core/loader/i386/bsd.c 2012-06-07 22:06:00.000000000 +0900 ++++ grub-2.00/grub-core/loader/i386/bsd.c 2013-01-04 19:50:55.000000000 +0900 +@@ -1309,7 +1309,7 @@ + && phdr->p_type != PT_DYNAMIC) + return 0; + +- paddr = phdr->p_paddr & 0xFFFFFF; ++ paddr = phdr->p_paddr & 0xFFFFFFF; + + if (paddr < kern_start) + kern_start = paddr; +@@ -1333,7 +1333,7 @@ + } + + *do_load = 1; +- phdr->p_paddr &= 0xFFFFFF; ++ phdr->p_paddr &= 0xFFFFFFF; + paddr = phdr->p_paddr; + + *addr = (grub_addr_t) (paddr - kern_start + (grub_uint8_t *) kern_chunk_src); +@@ -1351,7 +1351,7 @@ + && phdr->p_type != PT_DYNAMIC) + return 0; + +- paddr = phdr->p_paddr & 0xffffff; ++ paddr = phdr->p_paddr & 0xfffffff; + + if (paddr < kern_start) + kern_start = paddr; +@@ -1375,7 +1375,7 @@ + } + + *do_load = 1; +- paddr = phdr->p_paddr & 0xffffff; ++ paddr = phdr->p_paddr & 0xfffffff; + + *addr = (grub_addr_t) (paddr - kern_start + (grub_uint8_t *) kern_chunk_src); + +@@ -1394,7 +1394,7 @@ + { + grub_relocator_chunk_t ch; + +- entry = elf->ehdr.ehdr32.e_entry & 0xFFFFFF; ++ entry = elf->ehdr.ehdr32.e_entry & 0xFFFFFFF; + err = grub_elf32_phdr_iterate (elf, filename, + grub_bsd_elf32_size_hook, NULL); + if (err) +diff -Nur grub-2.00.orig/util/grub-mkconfig_lib.in grub-2.00/util/grub-mkconfig_lib.in +--- grub-2.00.orig/util/grub-mkconfig_lib.in 2012-06-28 00:27:53.000000000 +0900 ++++ grub-2.00/util/grub-mkconfig_lib.in 2013-01-04 19:50:55.000000000 +0900 +@@ -349,3 +349,10 @@ + cat + fi + } ++ ++grub_tab=" " ++ ++grub_add_tab () { ++ sed -e "s/^/$grub_tab/" ++} ++ +diff -Nur grub-2.00.orig/util/grub.d/10_hurd.in grub-2.00/util/grub.d/10_hurd.in +--- grub-2.00.orig/util/grub.d/10_hurd.in 2012-03-05 05:10:04.000000000 +0900 ++++ grub-2.00/util/grub.d/10_hurd.in 2013-01-04 19:50:55.000000000 +0900 +@@ -108,7 +108,7 @@ + EOF + fi + +- prepare_grub_to_access_device "${GRUB_DEVICE_BOOT}" | sed -e "s/^/\t/"|sed "s/^/$submenu_indentation/" ++ prepare_grub_to_access_device "${GRUB_DEVICE_BOOT}" | grub_add_tab|sed "s/^/$submenu_indentation/" + message="$(gettext_printf "Loading GNU Mach ...")" + + if [ x$type = xrecovery ] ; then +@@ -122,9 +122,9 @@ + EOF + + if [ x$type != xrecovery ] ; then +- save_default_entry | sed -e "s/^/\t/"| sed "s/^/$submenu_indentation/" ++ save_default_entry | grub_add_tab| sed "s/^/$submenu_indentation/" + fi +- prepare_grub_to_access_device "${GRUB_DEVICE}" | sed -e "s/^/\t/"| sed "s/^/$submenu_indentation/" ++ prepare_grub_to_access_device "${GRUB_DEVICE}" | grub_add_tab| sed "s/^/$submenu_indentation/" + message="$(gettext_printf "Loading the Hurd ...")" + if [ x$type = xrecovery ] ; then + opts= +@@ -158,7 +158,7 @@ + + if [ "x$is_first_entry" = xtrue ]; then + hurd_entry "$kernel" simple +- submenu_indentation="\t" ++ submenu_indentation="$grub_tab" + + # TRANSLATORS: %s is replaced with an OS name + echo "submenu '$(gettext_printf "Advanced options for %s" "${OS}" | grub_quote)' \$menuentry_id_option 'gnuhurd-advanced-$(grub_get_device_id "${GRUB_DEVICE_BOOT}")' {" +diff -Nur grub-2.00.orig/util/grub.d/10_illumos.in grub-2.00/util/grub.d/10_illumos.in +--- grub-2.00.orig/util/grub.d/10_illumos.in 2012-03-05 04:03:38.000000000 +0900 ++++ grub-2.00/util/grub.d/10_illumos.in 2013-01-04 19:50:55.000000000 +0900 +@@ -35,8 +35,8 @@ + esac + + echo "menuentry '$(echo "$OS" | grub_quote)' ${CLASS} \$menuentry_id_option 'illumos-$(grub_get_device_id "${GRUB_DEVICE_BOOT}")' {" +-save_default_entry | sed -e "s/^/\t/" +-prepare_grub_to_access_device "${GRUB_DEVICE_BOOT}" | sed -e "s/^/\t/" ++save_default_entry | grub_add_tab ++prepare_grub_to_access_device "${GRUB_DEVICE_BOOT}" | grub_add_tab + message="$(gettext_printf "Loading kernel of Illumos ...")" + cat << EOF + insmod gzio +diff -Nur grub-2.00.orig/util/grub.d/10_kfreebsd.in grub-2.00/util/grub.d/10_kfreebsd.in +--- grub-2.00.orig/util/grub.d/10_kfreebsd.in 2012-03-05 06:02:30.000000000 +0900 ++++ grub-2.00/util/grub.d/10_kfreebsd.in 2013-01-04 19:50:55.000000000 +0900 +@@ -54,7 +54,7 @@ + fi + + if [ -z "${prepare_module_dir_cache}" ]; then +- prepare_module_dir_cache="$(prepare_grub_to_access_device $(grub-probe -t device "${module_dir}") | sed -e "s/^/\t/")" ++ prepare_module_dir_cache="$(prepare_grub_to_access_device $(${grub_probe} -t device "${module_dir}") | grub_add_tab)" + fi + + printf '%s\n' "${prepare_module_dir_cache}" +@@ -91,10 +91,10 @@ + echo "menuentry '$(echo "$OS" | grub_quote)' ${CLASS} \$menuentry_id_option 'kfreebsd-simple-$boot_device_id' {" | sed "s/^/$submenu_indentation/" + fi + if [ x$type != xrecovery ] ; then +- save_default_entry | sed -e "s/^/\t/" | sed "s/^/$submenu_indentation/" ++ save_default_entry | grub_add_tab | sed "s/^/$submenu_indentation/" + fi + if [ -z "${prepare_boot_cache}" ]; then +- prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")" ++ prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | grub_add_tab)" + fi + + printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/" +@@ -112,7 +112,7 @@ + + load_kfreebsd_module acpi true + +- for abstraction in dummy $(grub-probe -t abstraction --device ${GRUB_DEVICE}) ; do ++ for abstraction in dummy $(${grub_probe} -t abstraction --device ${GRUB_DEVICE}) ; do + case $abstraction in + lvm) load_kfreebsd_module geom_linux_lvm false ;; + esac +@@ -122,10 +122,10 @@ + zfs) + load_kfreebsd_module opensolaris false + +- ls "${dirname}/zfs/zpool.cache" > /dev/null ++ ls "/boot/zfs/zpool.cache" > /dev/null + printf '%s\n' "${prepare_boot_cache}" + sed "s/^/$submenu_indentation/" << EOF +- kfreebsd_module ${rel_dirname}/zfs/zpool.cache type=/boot/zfs/zpool.cache ++ kfreebsd_module $(make_system_path_relative_to_its_root /boot)/zfs/zpool.cache type=/boot/zfs/zpool.cache + EOF + ;; + esac +@@ -179,7 +179,7 @@ + case ${GRUB_FS} in + zfs) + # zpool name +- kfreebsd_device=$(grub-probe -t fs_label --device ${GRUB_DEVICE}) ++ kfreebsd_device=$(${grub_probe} -t fs_label --device ${GRUB_DEVICE}) + # filesystem name (empty string for the main filesystem) + kfreebsd_device="${kfreebsd_device}$(${grub_mkrelpath} / | sed -e "s,/*@$,,")" + ;; +@@ -213,7 +213,7 @@ + + if [ "x$is_first_entry" = xtrue ]; then + kfreebsd_entry "${OS}" "${version}" simple +- submenu_indentation="\t" ++ submenu_indentation="$grub_tab" + + if [ -z "$boot_device_id" ]; then + boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")" +diff -Nur grub-2.00.orig/util/grub.d/10_linux.in grub-2.00/util/grub.d/10_linux.in +--- grub-2.00.orig/util/grub.d/10_linux.in 2012-04-19 06:24:38.000000000 +0900 ++++ grub-2.00/util/grub.d/10_linux.in 2013-01-04 19:50:55.000000000 +0900 +@@ -101,7 +101,7 @@ + echo "menuentry '$(echo "$os" | grub_quote)' ${CLASS} \$menuentry_id_option 'gnulinux-simple-$boot_device_id' {" | sed "s/^/$submenu_indentation/" + fi + if [ x$type != xrecovery ] ; then +- save_default_entry | sed -e "s/^/\t/" ++ save_default_entry | grub_add_tab + fi + + # Use ELILO's generic "efifb" when it's known to be available. +@@ -123,12 +123,12 @@ + + if [ x$dirname = x/ ]; then + if [ -z "${prepare_root_cache}" ]; then +- prepare_root_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE} | sed -e "s/^/\t/")" ++ prepare_root_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE} | grub_add_tab)" + fi + printf '%s\n' "${prepare_root_cache}" | sed "s/^/$submenu_indentation/" + else + if [ -z "${prepare_boot_cache}" ]; then +- prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")" ++ prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | grub_add_tab)" + fi + printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/" + fi +@@ -230,7 +230,7 @@ + linux_entry "${OS}" "${version}" simple \ + "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" + +- submenu_indentation="\t" ++ submenu_indentation="$grub_tab" + + if [ -z "$boot_device_id" ]; then + boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")" +diff -Nur grub-2.00.orig/util/grub.d/10_netbsd.in grub-2.00/util/grub.d/10_netbsd.in +--- grub-2.00.orig/util/grub.d/10_netbsd.in 2012-03-05 04:47:35.000000000 +0900 ++++ grub-2.00/util/grub.d/10_netbsd.in 2013-01-04 19:50:55.000000000 +0900 +@@ -77,10 +77,10 @@ + prepare_grub_to_access_device $(${grub_probe} -t device "${kmodule}") | sed -e 's,^, ,' + case "${loader}" in + knetbsd) +- printf "\tknetbsd_module_elf %s\n" "${kmodule_rel}" ++ printf "$grub_tabknetbsd_module_elf %s\n" "${kmodule_rel}" + ;; + multiboot) +- printf "\tmodule %s\n" "${kmodule_rel}" ++ printf "$grub_tabmodule %s\n" "${kmodule_rel}" + ;; + esac + } +@@ -121,11 +121,11 @@ + printf "%s\n" "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/" + case "${loader}" in + knetbsd) +- printf "\tknetbsd %s -r %s %s\n" \ ++ printf "$grub_tabknetbsd %s -r %s %s\n" \ + "${kernel}" "${kroot_device}" "${GRUB_CMDLINE_NETBSD} ${args}" | sed "s/^/$submenu_indentation/" + ;; + multiboot) +- printf "\tmultiboot %s %s root=%s %s\n" \ ++ printf "$grub_tabmultiboot %s %s root=%s %s\n" \ + "${kernel}" "${kernel}" "${kroot_device}" "${GRUB_CMDLINE_NETBSD} ${args}" | sed "s/^/$submenu_indentation/" + ;; + esac +@@ -159,7 +159,7 @@ + + if [ "x$is_first_entry" = xtrue ]; then + netbsd_entry "knetbsd" "$k" simple "${GRUB_CMDLINE_NETBSD_DEFAULT}" +- submenu_indentation="\t" ++ submenu_indentation="$grub_tab" + + if [ -z "$boot_device_id" ]; then + boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")" +diff -Nur grub-2.00.orig/util/grub.d/10_windows.in grub-2.00/util/grub.d/10_windows.in +--- grub-2.00.orig/util/grub.d/10_windows.in 2012-03-05 06:11:43.000000000 +0900 ++++ grub-2.00/util/grub.d/10_windows.in 2013-01-04 19:50:55.000000000 +0900 +@@ -45,7 +45,7 @@ + sort | uniq | wc -l`" = 1 || return 1 + + # Search 'default=PARTITION' +- get_os_name_from_boot_ini_part=`sed -n 's,^default=,,p' "$1" | sed 's,\\\\,/,g;s,[ \t\r]*$,,;1q'` ++ get_os_name_from_boot_ini_part=`sed -n 's,^default=,,p' "$1" | sed 's,\\\\,/,g;s,[ $grub_tab\r]*$,,;1q'` + test -n "$get_os_name_from_boot_ini_part" || return 1 + + # Search 'PARTITION="NAME" ...' +@@ -87,8 +87,8 @@ + menuentry '$(echo "$OS" | grub_quote)' \$menuentry_id_option '$osid-$(grub_get_device_id "${dev}")' { + EOF + +- save_default_entry | sed -e 's,^,\t,' +- prepare_grub_to_access_device "$dev" | sed 's,^,\t,' ++ save_default_entry | sed -e 's,^,$grub_tab,' ++ prepare_grub_to_access_device "$dev" | sed 's,^,$grub_tab,' + test -z "$needmap" || cat < $@ || (rm -f $@; exit 1) ++ cat $< | sort | $(AWK) -f $(srcdir)/genmoddep.awk > $@ || (rm -f $@; exit 1) + platform_DATA += moddep.lst + CLEANFILES += config.log syminfo.lst moddep.lst + + diff --git a/sdk_container/src/third_party/portage-stable/sys-boot/grub/files/grub-2.00-no-gets.patch b/sdk_container/src/third_party/portage-stable/sys-boot/grub/files/grub-2.00-no-gets.patch new file mode 100644 index 0000000000..c21d4b976e --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-boot/grub/files/grub-2.00-no-gets.patch @@ -0,0 +1,22 @@ +hack until gzip pulls a newer gnulib version + +From 66712c23388e93e5c518ebc8515140fa0c807348 Mon Sep 17 00:00:00 2001 +From: Eric Blake +Date: Thu, 29 Mar 2012 13:30:41 -0600 +Subject: [PATCH] stdio: don't assume gets any more + +Gnulib intentionally does not have a gets module, and now that C11 +and glibc have dropped it, we should be more proactive about warning +any user on a platform that still has a declaration of this dangerous +interface. + +--- a/grub-core/gnulib/stdio.in.h ++++ b/grub-core/gnulib/stdio.in.h +@@ -125,7 +125,6 @@ + so any use of gets warrants an unconditional warning. Assume it is + always declared, since it is required by C89. */ + #undef gets +-_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); + + #if @GNULIB_FOPEN@ + # if @REPLACE_FOPEN@ diff --git a/sdk_container/src/third_party/portage-stable/sys-boot/grub/files/grub-2.00-parallel-make.patch b/sdk_container/src/third_party/portage-stable/sys-boot/grub/files/grub-2.00-parallel-make.patch new file mode 100644 index 0000000000..03d634bb64 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-boot/grub/files/grub-2.00-parallel-make.patch @@ -0,0 +1,46 @@ +Fix parallel make problems. +Upstream changesets 4547, 4552, 4578. +--- gentpl.py ++++ gentpl.py +@@ -484,10 +484,10 @@ + def installdir(default="bin"): + return "[+ IF installdir +][+ installdir +][+ ELSE +]" + default + "[+ ENDIF +]" + +-def manpage(): ++def manpage(adddeps): + r = "if COND_MAN_PAGES\n" + r += gvar_add("man_MANS", "[+ name +].[+ mansection +]\n") +- r += rule("[+ name +].[+ mansection +]", "[+ name +]", """ ++ r += rule("[+ name +].[+ mansection +]", "[+ name +] " + adddeps, """ + chmod a+x [+ name +] + PATH=$(builddir):$$PATH pkgdatadir=$(builddir) $(HELP2MAN) --section=[+ mansection +] -i $(top_srcdir)/docs/man/[+ name +].h2m -o $@ [+ name +] + """) +@@ -503,7 +503,7 @@ + r += gvar_add("TESTS", "[+ name +]") + r += "[+ ELSE +]" + r += var_add(installdir() + "_PROGRAMS", "[+ name +]") +- r += "[+ IF mansection +]" + manpage() + "[+ ENDIF +]" ++ r += "[+ IF mansection +]" + manpage("") + "[+ ENDIF +]" + r += "[+ ENDIF +]" + + r += var_set(cname() + "_SOURCES", platform_sources(platform)) +@@ -532,7 +532,7 @@ + r += gvar_add ("TESTS", "[+ name +]") + r += "[+ ELSE +]" + r += var_add(installdir() + "_SCRIPTS", "[+ name +]") +- r += "[+ IF mansection +]" + manpage() + "[+ ENDIF +]" ++ r += "[+ IF mansection +]" + manpage("grub-mkconfig_lib") + "[+ ENDIF +]" + r += "[+ ENDIF +]" + + r += rule("[+ name +]", platform_sources(platform) + " $(top_builddir)/config.status", """ +--- grub-core/Makefile.am ++++ grub-core/Makefile.am +@@ -63,7 +63,7 @@ + rs_decoder.S: $(srcdir)/lib/reed_solomon.c + $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -Os -I$(top_builddir) -S -DSTANDALONE -o $@ $< -g0 -mregparm=3 -ffreestanding + +-kern/i386/pc/startup.S: $(builddir)/rs_decoder.S ++boot/i386/pc/startup_raw.S: $(builddir)/rs_decoder.S + boot/mips/loongson/fwstart.S: $(builddir)/sm712_start.S + + CLEANFILES += grub_script.yy.c grub_script.yy.h diff --git a/sdk_container/src/third_party/portage-stable/sys-boot/grub/files/grub-2.00-tftp-endian.patch b/sdk_container/src/third_party/portage-stable/sys-boot/grub/files/grub-2.00-tftp-endian.patch new file mode 100644 index 0000000000..f4e56445dd --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-boot/grub/files/grub-2.00-tftp-endian.patch @@ -0,0 +1,24 @@ +https://bugs.gentoo.org/show_bug.cgi?id=438612 + +=== modified file 'grub-core/net/tftp.c' +--- grub-core/net/tftp.c 2012-06-22 20:04:16 +0000 ++++ grub-core/net/tftp.c 2012-07-02 09:22:50 +0000 +@@ -143,7 +143,7 @@ + + tftph_ack = (struct tftphdr *) nb_ack.data; + tftph_ack->opcode = grub_cpu_to_be16 (TFTP_ACK); +- tftph_ack->u.ack.block = block; ++ tftph_ack->u.ack.block = grub_cpu_to_be16 (block); + + err = grub_net_send_udp_packet (data->sock, &nb_ack); + if (err) +@@ -225,7 +225,7 @@ + grub_priority_queue_pop (data->pq); + + if (file->device->net->packs.count < 50) +- err = ack (data, tftph->u.data.block); ++ err = ack (data, data->block + 1); + else + { + file->device->net->stall = 1; + diff --git a/sdk_container/src/third_party/portage-stable/sys-boot/grub/files/grub-2.00-zfs-feature-flag-support.patch b/sdk_container/src/third_party/portage-stable/sys-boot/grub/files/grub-2.00-zfs-feature-flag-support.patch new file mode 100644 index 0000000000..998dc07336 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-boot/grub/files/grub-2.00-zfs-feature-flag-support.patch @@ -0,0 +1,1017 @@ +ZFS Feature Flag Support + +This is a monolithic version of the following commits: + +https://github.com/maxximino/grub2/commit/31a32560fd7948ae5ff5c63105d7c068de7890c8 +https://github.com/maxximino/grub2/commit/595d76e8ca0690a963f5533689de8db54ef07e75 +https://github.com/maxximino/grub2/commit/58344034e40218b20500fa2936eb4d7d019e1e88 +https://github.com/maxximino/grub2/commit/f98cb078abab2c14bb0766b5a0ceb055683dab81 +https://github.com/maxximino/grub2/commit/f12806f43a969a654dee7bb89b2e8fd5c42f0e2e + +A minor change was made to account for d8a0feb6 from upstream. This change +prevents a compile time failure that is caused by a change in the callback +interface used by mzap_interate(). + +The initial feature flag support patches were written by Delphix while the LZ4 +support was written by Saso Kiselkov. The work porting this to GRUB2 was done +by Massimo Maggi, while the adaption to Gentoo's GRUB2 package was done by +Richard Yao. + +diff --git a/Makefile.util.def b/Makefile.util.def +index b80187c..1bf3038 100644 +--- a/Makefile.util.def ++++ b/Makefile.util.def +@@ -95,6 +95,7 @@ library = { + common = grub-core/fs/zfs/zfs.c; + common = grub-core/fs/zfs/zfsinfo.c; + common = grub-core/fs/zfs/zfs_lzjb.c; ++ common = grub-core/fs/zfs/zfs_lz4.c; + common = grub-core/fs/zfs/zfs_sha256.c; + common = grub-core/fs/zfs/zfs_fletcher.c; + common = grub-core/lib/envblk.c; +diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def +index 39e77a4..1550b90 100644 +--- a/grub-core/Makefile.core.def ++++ b/grub-core/Makefile.core.def +@@ -1186,6 +1186,7 @@ module = { + name = zfs; + common = fs/zfs/zfs.c; + common = fs/zfs/zfs_lzjb.c; ++ common = fs/zfs/zfs_lz4.c; + common = fs/zfs/zfs_sha256.c; + common = fs/zfs/zfs_fletcher.c; + }; +diff --git a/grub-core/fs/zfs/zfs.c b/grub-core/fs/zfs/zfs.c +index ba0554a..de31e6c 100644 +--- a/grub-core/fs/zfs/zfs.c ++++ b/grub-core/fs/zfs/zfs.c +@@ -2,6 +2,7 @@ + * GRUB -- GRand Unified Bootloader + * Copyright (C) 1999,2000,2001,2002,2003,2004,2009,2010,2011 Free Software Foundation, Inc. + * Copyright 2010 Sun Microsystems, Inc. ++ * Copyright (c) 2012 by Delphix. All rights reserved. + * + * GRUB is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +@@ -153,11 +154,13 @@ ZAP_LEAF_ENTRY(zap_leaf_phys_t *l, int bs, int idx) + + + /* +- * Decompression Entry - lzjb ++ * Decompression Entry - lzjb & lz4 + */ + + extern grub_err_t lzjb_decompress (void *, void *, grub_size_t, grub_size_t); + ++extern grub_err_t lz4_decompress (void *, void *, grub_size_t, grub_size_t); ++ + typedef grub_err_t zfs_decomp_func_t (void *s_start, void *d_start, + grub_size_t s_len, grub_size_t d_len); + typedef struct decomp_entry +@@ -263,6 +266,19 @@ grub_crypto_cipher_handle_t (*grub_zfs_load_key) (const struct grub_zfs_key *key + grub_size_t keysize, + grub_uint64_t salt, + grub_uint64_t algo) = NULL; ++/* ++ * List of pool features that the grub implementation of ZFS supports for ++ * read. Note that features that are only required for write do not need ++ * to be listed here since grub opens pools in read-only mode. ++ */ ++static const char *spa_feature_names[] = { ++ "org.illumos:lz4_compress",NULL ++}; ++ ++static int ++check_feature(const char *name, grub_uint64_t val); ++static int ++check_mos_features(dnode_phys_t *mosmdn_phys,grub_zfs_endian_t endian,struct grub_zfs_data* data ); + + static grub_err_t + zlib_decompress (void *s, void *d, +@@ -322,6 +338,7 @@ static decomp_entry_t decomp_table[ZIO_COMPRESS_FUNCTIONS] = { + {"gzip-8", zlib_decompress}, /* ZIO_COMPRESS_GZIP8 */ + {"gzip-9", zlib_decompress}, /* ZIO_COMPRESS_GZIP9 */ + {"zle", zle_decompress}, /* ZIO_COMPRESS_ZLE */ ++ {"lz4", lz4_decompress}, /* ZIO_COMPRESS_LZ4 */ + }; + + static grub_err_t zio_read_data (blkptr_t * bp, grub_zfs_endian_t endian, +@@ -482,15 +499,11 @@ uberblock_verify (uberblock_phys_t * ub, grub_uint64_t offset, + + if (grub_zfs_to_cpu64 (uber->ub_magic, GRUB_ZFS_LITTLE_ENDIAN) + == UBERBLOCK_MAGIC +- && grub_zfs_to_cpu64 (uber->ub_version, GRUB_ZFS_LITTLE_ENDIAN) > 0 +- && grub_zfs_to_cpu64 (uber->ub_version, GRUB_ZFS_LITTLE_ENDIAN) +- <= SPA_VERSION) +- endian = GRUB_ZFS_LITTLE_ENDIAN; ++ && SPA_VERSION_IS_SUPPORTED(grub_zfs_to_cpu64 (uber->ub_version, GRUB_ZFS_LITTLE_ENDIAN))) ++ endian = GRUB_ZFS_LITTLE_ENDIAN; + + if (grub_zfs_to_cpu64 (uber->ub_magic, GRUB_ZFS_BIG_ENDIAN) == UBERBLOCK_MAGIC +- && grub_zfs_to_cpu64 (uber->ub_version, GRUB_ZFS_BIG_ENDIAN) > 0 +- && grub_zfs_to_cpu64 (uber->ub_version, GRUB_ZFS_BIG_ENDIAN) +- <= SPA_VERSION) ++ && SPA_VERSION_IS_SUPPORTED(grub_zfs_to_cpu64 (uber->ub_version, GRUB_ZFS_BIG_ENDIAN))) + endian = GRUB_ZFS_BIG_ENDIAN; + + if (endian == GRUB_ZFS_UNKNOWN_ENDIAN) +@@ -764,6 +777,155 @@ fill_vdev_info (struct grub_zfs_data *data, + } + + /* ++ * For a given XDR packed nvlist, verify the first 4 bytes and move on. ++ * ++ * An XDR packed nvlist is encoded as (comments from nvs_xdr_create) : ++ * ++ * encoding method/host endian (4 bytes) ++ * nvl_version (4 bytes) ++ * nvl_nvflag (4 bytes) ++ * encoded nvpairs: ++ * encoded size of the nvpair (4 bytes) ++ * decoded size of the nvpair (4 bytes) ++ * name string size (4 bytes) ++ * name string data (sizeof(NV_ALIGN4(string)) ++ * data type (4 bytes) ++ * # of elements in the nvpair (4 bytes) ++ * data ++ * 2 zero's for the last nvpair ++ * (end of the entire list) (8 bytes) ++ * ++ */ ++ ++/* ++ * The nvlist_next_nvpair() function returns a handle to the next nvpair in the ++ * list following nvpair. If nvpair is NULL, the first pair is returned. If ++ * nvpair is the last pair in the nvlist, NULL is returned. ++ */ ++static const char * ++nvlist_next_nvpair(const char *nvl, const char *nvpair) ++{ ++ const char *nvp; ++ int encode_size; ++ int name_len; ++ if (nvl == NULL) ++ return (NULL); ++ ++ if (nvpair == NULL) { ++ /* skip over header, nvl_version and nvl_nvflag */ ++ nvpair = nvl + 4 * 3; ++ } else { ++ /* skip to the next nvpair */ ++ encode_size = grub_be_to_cpu32 (grub_get_unaligned32(nvpair)); ++ nvpair += encode_size; ++ } ++ /* 8 bytes of 0 marks the end of the list */ ++ if (*(grub_uint64_t*)nvpair == 0) ++ return (NULL); ++ /*consistency checks*/ ++ if (nvpair + 4 * 3 >= nvl + VDEV_PHYS_SIZE) ++ { ++ grub_dprintf ("zfs", "nvlist overflow\n"); ++ grub_error (GRUB_ERR_BAD_FS, "incorrect nvlist"); ++ return (NULL); ++ } ++ encode_size = grub_be_to_cpu32 (grub_get_unaligned32(nvpair)); ++ ++ nvp = nvpair + 4*2; ++ name_len = grub_be_to_cpu32 (grub_get_unaligned32 (nvp)); ++ nvp += 4; ++ ++ nvp = nvp + ((name_len + 3) & ~3); // align ++ if (nvp + 4 >= nvl + VDEV_PHYS_SIZE ++ || encode_size < 0 ++ || nvp + 4 + encode_size > nvl + VDEV_PHYS_SIZE) ++ { ++ grub_dprintf ("zfs", "nvlist overflow\n"); ++ grub_error (GRUB_ERR_BAD_FS, "incorrect nvlist"); ++ return (NULL); ++ } ++ /* end consistency checks */ ++ ++ return (nvpair); ++} ++/* ++ * This function returns 0 on success and 1 on failure. On success, a string ++ * containing the name of nvpair is saved in buf. ++ */ ++static int ++nvpair_name(const char *nvp, char **buf, int* buflen) ++{ ++ int len; ++ ++ /* skip over encode/decode size */ ++ nvp += 4 * 2; ++ ++ len = grub_be_to_cpu32 (grub_get_unaligned32 (nvp)); ++ nvp=nvp+4; ++ ++ *buf=(char*)nvp; ++ *buflen=len; ++ ++ return (0); ++} ++/* ++ * This function retrieves the value of the nvpair in the form of enumerated ++ * type data_type_t. ++ */ ++static int ++nvpair_type(const char *nvp) ++{ ++ int name_len, type; ++ ++ /* skip over encode/decode size */ ++ nvp += 4 * 2; ++ ++ /* skip over name_len */ ++ name_len = grub_be_to_cpu32 (grub_get_unaligned32 (nvp)); ++ nvp += 4; ++ ++ /* skip over name */ ++ nvp = nvp + ((name_len + 3) & ~3); /* align */ ++ ++ type = grub_be_to_cpu32 (grub_get_unaligned32 (nvp)); ++ ++ return (type); ++} ++static int ++nvpair_value(const char *nvp,char **val, ++ grub_size_t *size_out, grub_size_t *nelm_out) ++{ ++ int name_len,nelm,encode_size; ++ ++ /* skip over encode/decode size */ ++ encode_size = grub_be_to_cpu32 (grub_get_unaligned32(nvp)); ++ nvp += 8; ++ ++ /* skip over name_len */ ++ name_len = grub_be_to_cpu32 (grub_get_unaligned32 (nvp)); ++ nvp += 4; ++ ++ /* skip over name */ ++ nvp = nvp + ((name_len + 3) & ~3); /* align */ ++ ++ /* skip over type */ ++ nvp += 4; ++ nelm = grub_be_to_cpu32 (grub_get_unaligned32 (nvp)); ++ nvp +=4; ++ if (nelm < 1) ++ { ++ grub_error (GRUB_ERR_BAD_FS, "empty nvpair"); ++ return 0; ++ } ++ *val = (char *) nvp; ++ *size_out = encode_size; ++ if (nelm_out) ++ *nelm_out = nelm; ++ ++ return 1; ++} ++ ++/* + * Check the disk label information and retrieve needed vdev name-value pairs. + * + */ +@@ -773,7 +935,7 @@ check_pool_label (struct grub_zfs_data *data, + int *inserted) + { + grub_uint64_t pool_state, txg = 0; +- char *nvlist; ++ char *nvlist,*features; + #if 0 + char *nv; + #endif +@@ -837,13 +999,13 @@ check_pool_label (struct grub_zfs_data *data, + } + grub_dprintf ("zfs", "check 8 passed\n"); + +- if (version > SPA_VERSION) ++ if (!SPA_VERSION_IS_SUPPORTED(version)) + { + grub_free (nvlist); + return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET, + "too new version %llu > %llu", + (unsigned long long) version, +- (unsigned long long) SPA_VERSION); ++ (unsigned long long) SPA_VERSION_BEFORE_FEATURES); + } + grub_dprintf ("zfs", "check 9 passed\n"); + +@@ -893,7 +1055,30 @@ check_pool_label (struct grub_zfs_data *data, + grub_free (nv); + } + grub_dprintf ("zfs", "check 10 passed\n"); +- ++ if ((features=grub_zfs_nvlist_lookup_nvlist(nvlist, ZPOOL_CONFIG_FEATURES_FOR_READ))) ++ { ++ const char *nvp=NULL; ++ char *name = grub_zalloc(51); ++ char *nameptr; ++ int namelen; ++ while ((nvp = nvlist_next_nvpair(features, nvp)) != NULL) ++ { ++ nvpair_name(nvp, &nameptr,&namelen); ++ if(namelen > 50){namelen=50;} ++ grub_strncpy(name,nameptr,namelen); ++ name[namelen]=0; ++ grub_dprintf("zfs","namelen=%u str=%s\n",namelen,name); ++ if (check_feature(name,1) != 0) ++ { ++ grub_dprintf("zfs","feature missing in check_pool_label:%s\n",name); ++ err= grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET," check_pool_label missing feature '%s' for read",name); ++ grub_free(name); ++ return err; ++ } ++ } ++ grub_free(name); ++ } ++ grub_dprintf ("zfs", "check 12 passed (feature flags)\n"); + grub_free (nvlist); + + return GRUB_ERR_NONE; +@@ -3034,34 +3219,14 @@ dnode_get_fullpath (const char *fullpath, struct subvolume *subvol, + return err; + } + +-/* +- * For a given XDR packed nvlist, verify the first 4 bytes and move on. +- * +- * An XDR packed nvlist is encoded as (comments from nvs_xdr_create) : +- * +- * encoding method/host endian (4 bytes) +- * nvl_version (4 bytes) +- * nvl_nvflag (4 bytes) +- * encoded nvpairs: +- * encoded size of the nvpair (4 bytes) +- * decoded size of the nvpair (4 bytes) +- * name string size (4 bytes) +- * name string data (sizeof(NV_ALIGN4(string)) +- * data type (4 bytes) +- * # of elements in the nvpair (4 bytes) +- * data +- * 2 zero's for the last nvpair +- * (end of the entire list) (8 bytes) +- * +- */ +- + static int + nvlist_find_value (const char *nvlist_in, const char *name, + int valtype, char **val, + grub_size_t *size_out, grub_size_t *nelm_out) + { +- int name_len, type, encode_size; +- const char *nvpair, *nvp_name, *nvlist = nvlist_in; ++ int name_len, type ; ++ const char *nvpair=NULL,*nvlist=nvlist_in; ++ char *nvp_name; + + /* Verify if the 1st and 2nd byte in the nvlist are valid. */ + /* NOTE: independently of what endianness header announces all +@@ -3074,62 +3239,18 @@ nvlist_find_value (const char *nvlist_in, const char *name, + return 0; + } + +- /* skip the header, nvl_version, and nvl_nvflag */ +- nvlist = nvlist + 4 * 3; + /* + * Loop thru the nvpair list + * The XDR representation of an integer is in big-endian byte order. + */ +- while ((encode_size = grub_be_to_cpu32 (grub_get_unaligned32 (nvlist)))) ++ while ((nvpair=nvlist_next_nvpair(nvlist,nvpair))) + { +- int nelm; +- +- if (nvlist + 4 * 4 >= nvlist_in + VDEV_PHYS_SIZE) +- { +- grub_dprintf ("zfs", "nvlist overflow\n"); +- grub_error (GRUB_ERR_BAD_FS, "incorrect nvlist"); +- return 0; +- } +- +- nvpair = nvlist + 4 * 2; /* skip the encode/decode size */ +- +- name_len = grub_be_to_cpu32 (grub_get_unaligned32 (nvpair)); +- nvpair += 4; +- +- nvp_name = nvpair; +- nvpair = nvpair + ((name_len + 3) & ~3); /* align */ +- +- if (nvpair + 8 >= nvlist_in + VDEV_PHYS_SIZE +- || encode_size < 0 +- || nvpair + 8 + encode_size > nvlist_in + VDEV_PHYS_SIZE) ++ nvpair_name(nvpair,&nvp_name,&name_len); ++ type = nvpair_type(nvpair); ++ if ((grub_strncmp (nvp_name, name, grub_strlen(name)) == 0) && type == valtype) + { +- grub_dprintf ("zfs", "nvlist overflow\n"); +- grub_error (GRUB_ERR_BAD_FS, "incorrect nvlist"); +- return 0; ++ return nvpair_value(nvpair,val,size_out,nelm_out); + } +- +- type = grub_be_to_cpu32 (grub_get_unaligned32 (nvpair)); +- nvpair += 4; +- +- nelm = grub_be_to_cpu32 (grub_get_unaligned32 (nvpair)); +- if (nelm < 1) +- { +- grub_error (GRUB_ERR_BAD_FS, "empty nvpair"); +- return 0; +- } +- +- nvpair += 4; +- +- if ((grub_strncmp (nvp_name, name, name_len) == 0) && type == valtype) +- { +- *val = (char *) nvpair; +- *size_out = encode_size; +- if (nelm_out) +- *nelm_out = nelm; +- return 1; +- } +- +- nvlist += encode_size; /* goto the next nvpair */ + } + return 0; + } +@@ -3386,6 +3507,10 @@ zfs_mount (grub_device_t dev) + return NULL; + } + ++ if (ub->ub_version >= SPA_VERSION_FEATURES && ++ check_mos_features(&((objset_phys_t *) osp)->os_meta_dnode,ub_endian, data) != 0) ++ return NULL; ++ + /* Got the MOS. Save it at the memory addr MOS. */ + grub_memmove (&(data->mos.dn), &((objset_phys_t *) osp)->os_meta_dnode, + DNODE_SIZE); +@@ -3910,6 +4035,64 @@ grub_zfs_dir (grub_device_t device, const char *path, + return grub_errno; + } + ++static int ++check_feature(const char *name, grub_uint64_t val) ++{ ++ int i; ++ if(val ==0) return 0; ++ if(*name==0) return 0; ++ for (i = 0; spa_feature_names[i] != NULL; i++) ++ { ++ if (grub_strcmp(name, spa_feature_names[i]) == 0) ++ return 0; ++ } ++ grub_printf("missing feature for read '%s'\n",name); ++ return 1; ++} ++ ++/* ++ * Checks whether the MOS features that are active are supported by this ++ * (GRUB's) implementation of ZFS. ++ * ++ * Return: ++ * 0: Success. ++ * errnum: Failure. ++ */ ++ ++static int ++check_mos_features(dnode_phys_t *mosmdn_phys,grub_zfs_endian_t endian,struct grub_zfs_data* data ) ++{ ++ grub_uint64_t objnum; ++ grub_uint8_t errnum = 0; ++ dnode_end_t dn,mosmdn; ++ mzap_phys_t* mzp; ++ grub_zfs_endian_t endianzap; ++ int size; ++ grub_memmove(&(mosmdn.dn),mosmdn_phys,sizeof(dnode_phys_t)); ++ mosmdn.endian=endian; ++ if ((errnum = dnode_get(&mosmdn, DMU_POOL_DIRECTORY_OBJECT, ++ DMU_OT_OBJECT_DIRECTORY, &dn,data)) != 0) ++ return (errnum); ++ ++ /* ++ * Find the object number for 'features_for_read' and retrieve its ++ * corresponding dnode. Note that we don't check features_for_write ++ * because GRUB is not opening the pool for write. ++ */ ++ if ((errnum = zap_lookup(&dn, DMU_POOL_FEATURES_FOR_READ, &objnum, data,0)) != 0) ++ return (errnum); ++ ++ if ((errnum = dnode_get(&mosmdn, objnum, DMU_OTN_ZAP_METADATA, &dn, data)) != 0) ++ return (errnum); ++ ++ if ((errnum = dmu_read(&dn, 0, (void**)&mzp, &endianzap,data)) != 0) ++ return (errnum); ++ ++ size = grub_zfs_to_cpu16 (dn.dn.dn_datablkszsec, dn.endian) << SPA_MINBLOCKSHIFT; ++ return (mzap_iterate(mzp,endianzap, size, check_feature)); ++} ++ ++ + #ifdef GRUB_UTIL + static grub_err_t + grub_zfs_embed (grub_device_t device __attribute__ ((unused)), +diff --git a/grub-core/fs/zfs/zfs_lz4.c b/grub-core/fs/zfs/zfs_lz4.c +new file mode 100644 +index 0000000..f199434 +--- /dev/null ++++ b/grub-core/fs/zfs/zfs_lz4.c +@@ -0,0 +1,321 @@ ++/* ++ * LZ4 - Fast LZ compression algorithm ++ * Header File ++ * Copyright (C) 2011-2013, Yann Collet. ++ * BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are ++ * met: ++ * ++ * * Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * * Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following disclaimer ++ * in the documentation and/or other materials provided with the ++ * distribution. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ++ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ++ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ++ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ++ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ++ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ++ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ++ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ++ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ++ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ * ++ * You can contact the author at : ++ * - LZ4 homepage : http://fastcompression.blogspot.com/p/lz4.html ++ * - LZ4 source repository : http://code.google.com/p/lz4/ ++ */ ++ ++#include ++#include ++#include ++#include ++ ++static int LZ4_uncompress_unknownOutputSize(const char *source, char *dest, ++ int isize, int maxOutputSize); ++ ++/* ++ * CPU Feature Detection ++ */ ++ ++/* 32 or 64 bits ? */ ++#if (defined(__x86_64__) || defined(__x86_64) || defined(__amd64__) || \ ++ defined(__amd64) || defined(__ppc64__) || defined(_WIN64) || \ ++ defined(__LP64__) || defined(_LP64)) ++#define LZ4_ARCH64 1 ++#else ++#define LZ4_ARCH64 0 ++#endif ++ ++/* ++ * Little Endian or Big Endian? ++ * Note: overwrite the below #define if you know your architecture endianess. ++ */ ++#if (defined(__BIG_ENDIAN__) || defined(__BIG_ENDIAN) || \ ++ defined(_BIG_ENDIAN) || defined(_ARCH_PPC) || defined(__PPC__) || \ ++ defined(__PPC) || defined(PPC) || defined(__powerpc__) || \ ++ defined(__powerpc) || defined(powerpc) || \ ++ ((defined(__BYTE_ORDER__)&&(__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)))) ++#define LZ4_BIG_ENDIAN 1 ++#else ++ /* ++ * Little Endian assumed. PDP Endian and other very rare endian format ++ * are unsupported. ++ */ ++#endif ++ ++/* ++ * Compiler Options ++ */ ++ ++#if __STDC_VERSION__ >= 199901L /* C99 */ ++/* "restrict" is a known keyword */ ++#else ++/* Disable restrict */ ++#ifndef restrict ++#define restrict /* Only if somebody already didn't take care of that.*/ ++#endif ++#endif ++ ++#define GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__) ++ ++#define lz4_bswap16(x) ((unsigned short int) ((((x) >> 8) & 0xffu) \ ++ | (((x) & 0xffu) << 8))) ++ ++#if (GCC_VERSION >= 302) || (__INTEL_COMPILER >= 800) || defined(__clang__) ++#define expect(expr, value) (__builtin_expect((expr), (value))) ++#else ++#define expect(expr, value) (expr) ++#endif ++ ++#define likely(expr) expect((expr) != 0, 1) ++#define unlikely(expr) expect((expr) != 0, 0) ++ ++/* Basic types */ ++#define BYTE grub_uint8_t ++#define U16 grub_uint16_t ++#define U32 grub_uint32_t ++#define S32 grub_int32_t ++#define U64 grub_uint64_t ++typedef grub_size_t size_t; ++ ++typedef struct _U16_S { ++ U16 v; ++} U16_S; ++typedef struct _U32_S { ++ U32 v; ++} U32_S; ++typedef struct _U64_S { ++ U64 v; ++} U64_S; ++ ++#define A64(x) (((U64_S *)(x))->v) ++#define A32(x) (((U32_S *)(x))->v) ++#define A16(x) (((U16_S *)(x))->v) ++ ++/* ++ * Constants ++ */ ++#define MINMATCH 4 ++ ++#define COPYLENGTH 8 ++#define LASTLITERALS 5 ++ ++#define ML_BITS 4 ++#define ML_MASK ((1U< s_len) ++ return grub_error(GRUB_ERR_BAD_FS,"lz4 decompression failed."); ++ ++ /* ++ * Returns 0 on success (decompression function returned non-negative) ++ * and appropriate error on failure (decompression function returned negative). ++ */ ++ return (LZ4_uncompress_unknownOutputSize((char*)s_start + 4, d_start, bufsiz, ++ d_len) < 0)?grub_error(GRUB_ERR_BAD_FS,"lz4 decompression failed."):0; ++} ++ ++static int ++LZ4_uncompress_unknownOutputSize(const char *source, ++ char *dest, int isize, int maxOutputSize) ++{ ++ /* Local Variables */ ++ const BYTE *restrict ip = (const BYTE *) source; ++ const BYTE *const iend = ip + isize; ++ const BYTE *restrict ref; ++ ++ BYTE *restrict op = (BYTE *) dest; ++ BYTE *const oend = op + maxOutputSize; ++ BYTE *cpy; ++ ++ size_t dec[] = { 0, 3, 2, 3, 0, 0, 0, 0 }; ++ ++ /* Main Loop */ ++ while (ip < iend) { ++ BYTE token; ++ int length; ++ ++ /* get runlength */ ++ token = *ip++; ++ if ((length = (token >> ML_BITS)) == RUN_MASK) { ++ int s = 255; ++ while ((ip < iend) && (s == 255)) { ++ s = *ip++; ++ length += s; ++ } ++ } ++ /* copy literals */ ++ cpy = op + length; ++ if ((cpy > oend - COPYLENGTH) || ++ (ip + length > iend - COPYLENGTH)) { ++ if (cpy > oend) ++ /* ++ * Error: request to write beyond destination ++ * buffer. ++ */ ++ goto _output_error; ++ if (ip + length > iend) ++ /* ++ * Error : request to read beyond source ++ * buffer. ++ */ ++ goto _output_error; ++ grub_memcpy(op, ip, length); ++ op += length; ++ ip += length; ++ if (ip < iend) ++ /* Error : LZ4 format violation */ ++ goto _output_error; ++ /* Necessarily EOF, due to parsing restrictions. */ ++ break; ++ } ++ LZ4_WILDCOPY(ip, op, cpy); ++ ip -= (op - cpy); ++ op = cpy; ++ ++ /* get offset */ ++ LZ4_READ_LITTLEENDIAN_16(ref, cpy, ip); ++ ip += 2; ++ if (ref < (BYTE * const) dest) ++ /* ++ * Error: offset creates reference outside of ++ * destination buffer. ++ */ ++ goto _output_error; ++ ++ /* get matchlength */ ++ if ((length = (token & ML_MASK)) == ML_MASK) { ++ while (ip < iend) { ++ int s = *ip++; ++ length += s; ++ if (s == 255) ++ continue; ++ break; ++ } ++ } ++ /* copy repeated sequence */ ++ if unlikely(op - ref < STEPSIZE) { ++#if LZ4_ARCH64 ++ size_t dec2table[] = { 0, 0, 0, -1, 0, 1, 2, 3 }; ++ size_t dec2 = dec2table[op - ref]; ++#else ++ const int dec2 = 0; ++#endif ++ *op++ = *ref++; ++ *op++ = *ref++; ++ *op++ = *ref++; ++ *op++ = *ref++; ++ ref -= dec[op - ref]; ++ A32(op) = A32(ref); ++ op += STEPSIZE - 4; ++ ref -= dec2; ++ } else { ++ LZ4_COPYSTEP(ref, op); ++ } ++ cpy = op + length - (STEPSIZE - 4); ++ if (cpy > oend - COPYLENGTH) { ++ if (cpy > oend) ++ /* ++ * Error: request to write outside of ++ * destination buffer. ++ */ ++ goto _output_error; ++ LZ4_SECURECOPY(ref, op, (oend - COPYLENGTH)); ++ while (op < cpy) ++ *op++ = *ref++; ++ op = cpy; ++ if (op == oend) ++ /* ++ * Check EOF (should never happen, since last ++ * 5 bytes are supposed to be literals). ++ */ ++ break; ++ continue; ++ } ++ LZ4_SECURECOPY(ref, op, cpy); ++ op = cpy; /* correction */ ++ } ++ ++ /* end of decoding */ ++ return (int)(((char *)op) - dest); ++ ++ /* write overflow error detected */ ++ _output_error: ++ return (int)(-(((char *)ip) - source)); ++} +diff --git a/grub-core/fs/zfs/zfsinfo.c b/grub-core/fs/zfs/zfsinfo.c +index fdb587a..c96bf21 100644 +--- a/grub-core/fs/zfs/zfsinfo.c ++++ b/grub-core/fs/zfs/zfsinfo.c +@@ -132,21 +132,31 @@ print_vdev_info (char *nvlist, int tab) + grub_free (path); + return GRUB_ERR_NONE; + } ++ char is_mirror=(grub_strcmp(type,VDEV_TYPE_MIRROR) == 0); ++ char is_raidz=(grub_strcmp(type,VDEV_TYPE_RAIDZ) == 0); + +- if (grub_strcmp (type, VDEV_TYPE_MIRROR) == 0) ++ if (is_mirror || is_raidz) + { + int nelm, i; + + nelm = grub_zfs_nvlist_lookup_nvlist_array_get_nelm + (nvlist, ZPOOL_CONFIG_CHILDREN); + ++ if(is_mirror){ ++ grub_puts_ (N_("This VDEV is a mirror")); ++ } ++ else if(is_raidz){ ++ grub_uint64_t parity; ++ grub_zfs_nvlist_lookup_uint64(nvlist,"nparity",&parity); ++ grub_printf_ (N_("This VDEV is a RAIDZ%llu\n"),(unsigned long long)parity); ++ } + print_tabs (tab); + if (nelm <= 0) + { +- grub_puts_ (N_("Incorrect mirror")); ++ grub_puts_ (N_("Incorrect VDEV")); + return GRUB_ERR_NONE; + } +- grub_printf_ (N_("Mirror with %d children\n"), nelm); ++ grub_printf_ (N_("VDEV with %d children\n"), nelm); + print_state (nvlist, tab); + for (i = 0; i < nelm; i++) + { +@@ -162,14 +172,14 @@ print_vdev_info (char *nvlist, int tab) + total element number. And the number itself is fine, + only the element isn't. + */ +- grub_printf_ (N_("Mirror element number %d isn't correct\n"), i); ++ grub_printf_ (N_("VDEV element number %d isn't correct\n"), i); + continue; + } + + /* TRANSLATORS: it's the element carying the number %d, not + total element number. This is used in enumeration + "Element number 1", "Element number 2", ... */ +- grub_printf_ (N_("Mirror element number %d:\n"), i); ++ grub_printf_ (N_("VDEV element number %d:\n"), i); + print_vdev_info (child, tab + 1); + + grub_free (child); +diff --git a/include/grub/zfs/dmu.h b/include/grub/zfs/dmu.h +index 8fc6dc5..4ad616c 100644 +--- a/include/grub/zfs/dmu.h ++++ b/include/grub/zfs/dmu.h +@@ -22,6 +22,39 @@ + + #ifndef _SYS_DMU_H + #define _SYS_DMU_H ++#define B_FALSE 0 ++#define B_TRUE 1 ++ ++#define DMU_OT_NEWTYPE 0x80 ++#define DMU_OT_METADATA 0x40 ++#define DMU_OT_BYTESWAP_MASK 0x3f ++ ++#define DMU_OT(byteswap, metadata) \ ++ (DMU_OT_NEWTYPE | \ ++ ((metadata) ? DMU_OT_METADATA : 0) | \ ++ ((byteswap) & DMU_OT_BYTESWAP_MASK)) ++ ++#define DMU_OT_IS_VALID(ot) (((ot) & DMU_OT_NEWTYPE) ? \ ++ ((ot) & DMU_OT_BYTESWAP_MASK) < DMU_BSWAP_NUMFUNCS : \ ++ (ot) < DMU_OT_NUMTYPES) ++ ++#define DMU_OT_IS_METADATA(ot) (((ot) & DMU_OT_NEWTYPE) ? \ ++ ((ot) & DMU_OT_METADATA) : \ ++ dmu_ot[(ot)].ot_metadata) ++ ++typedef enum dmu_object_byteswap { ++ DMU_BSWAP_UINT8, ++ DMU_BSWAP_UINT16, ++ DMU_BSWAP_UINT32, ++ DMU_BSWAP_UINT64, ++ DMU_BSWAP_ZAP, ++ DMU_BSWAP_DNODE, ++ DMU_BSWAP_OBJSET, ++ DMU_BSWAP_ZNODE, ++ DMU_BSWAP_OLDACL, ++ DMU_BSWAP_ACL, ++ DMU_BSWAP_NUMFUNCS ++} dmu_object_byteswap_t; + + /* + * This file describes the interface that the DMU provides for its +@@ -89,7 +122,17 @@ typedef enum dmu_object_type { + DMU_OT_SA_ATTR_REGISTRATION, /* ZAP */ + DMU_OT_SA_ATTR_LAYOUTS, /* ZAP */ + DMU_OT_DSL_KEYCHAIN = 54, +- DMU_OT_NUMTYPES ++ DMU_OT_NUMTYPES, ++ DMU_OTN_UINT8_DATA = DMU_OT(DMU_BSWAP_UINT8, B_FALSE), ++ DMU_OTN_UINT8_METADATA = DMU_OT(DMU_BSWAP_UINT8, B_TRUE), ++ DMU_OTN_UINT16_DATA = DMU_OT(DMU_BSWAP_UINT16, B_FALSE), ++ DMU_OTN_UINT16_METADATA = DMU_OT(DMU_BSWAP_UINT16, B_TRUE), ++ DMU_OTN_UINT32_DATA = DMU_OT(DMU_BSWAP_UINT32, B_FALSE), ++ DMU_OTN_UINT32_METADATA = DMU_OT(DMU_BSWAP_UINT32, B_TRUE), ++ DMU_OTN_UINT64_DATA = DMU_OT(DMU_BSWAP_UINT64, B_FALSE), ++ DMU_OTN_UINT64_METADATA = DMU_OT(DMU_BSWAP_UINT64, B_TRUE), ++ DMU_OTN_ZAP_DATA = DMU_OT(DMU_BSWAP_ZAP, B_FALSE), ++ DMU_OTN_ZAP_METADATA = DMU_OT(DMU_BSWAP_ZAP, B_TRUE), + } dmu_object_type_t; + + typedef enum dmu_objset_type { +@@ -116,5 +159,6 @@ typedef enum dmu_objset_type { + #define DMU_POOL_HISTORY "history" + #define DMU_POOL_PROPS "pool_props" + #define DMU_POOL_L2CACHE "l2cache" ++#define DMU_POOL_FEATURES_FOR_READ "features_for_read" + + #endif /* _SYS_DMU_H */ +diff --git a/include/grub/zfs/zfs.h b/include/grub/zfs/zfs.h +index e326c8b..761ade7 100644 +--- a/include/grub/zfs/zfs.h ++++ b/include/grub/zfs/zfs.h +@@ -36,8 +36,13 @@ typedef enum grub_zfs_endian + /* + * On-disk version number. + */ +-#define SPA_VERSION 33ULL +- ++#define SPA_VERSION_INITIAL 1ULL ++#define SPA_VERSION_BEFORE_FEATURES 33ULL ++#define SPA_VERSION 5000ULL ++#define SPA_VERSION_FEATURES 5000ULL ++#define SPA_VERSION_IS_SUPPORTED(v) \ ++ (((v) >= SPA_VERSION_INITIAL && (v) <= SPA_VERSION_BEFORE_FEATURES) || \ ++ ((v) >= SPA_VERSION_FEATURES && (v) <= SPA_VERSION)) + /* + * The following are configuration names used in the nvlist describing a pool's + * configuration. +@@ -76,6 +81,7 @@ typedef enum grub_zfs_endian + #define ZPOOL_CONFIG_DDT_HISTOGRAM "ddt_histogram" + #define ZPOOL_CONFIG_DDT_OBJ_STATS "ddt_object_stats" + #define ZPOOL_CONFIG_DDT_STATS "ddt_stats" ++#define ZPOOL_CONFIG_FEATURES_FOR_READ "features_for_read" + /* + * The persistent vdev state is stored as separate values rather than a single + * 'vdev_state' entry. This is because a device can be in multiple states, such +diff --git a/include/grub/zfs/zio.h b/include/grub/zfs/zio.h +index b1c46da..8fad2cc 100644 +--- a/include/grub/zfs/zio.h ++++ b/include/grub/zfs/zio.h +@@ -88,6 +88,7 @@ enum zio_compress { + ZIO_COMPRESS_GZIP8, + ZIO_COMPRESS_GZIP9, + ZIO_COMPRESS_ZLE, ++ ZIO_COMPRESS_LZ4, + ZIO_COMPRESS_FUNCTIONS + }; + +diff --git a/po/POTFILES.in b/po/POTFILES.in +index 987b37a..c55d9e3 100644 +--- a/po/POTFILES.in ++++ b/po/POTFILES.in +@@ -173,6 +173,7 @@ + ./grub-core/fs/zfs/zfs_fletcher.c + ./grub-core/fs/zfs/zfsinfo.c + ./grub-core/fs/zfs/zfs_lzjb.c ++./grub-core/fs/zfs/zfs_lz4.c + ./grub-core/fs/zfs/zfs_sha256.c + ./grub-core/gdb/cstub.c + ./grub-core/gdb/gdb.c diff --git a/sdk_container/src/third_party/portage-stable/sys-boot/grub/files/grub.default b/sdk_container/src/third_party/portage-stable/sys-boot/grub/files/grub.default index 580d27580f..061e4d1b9d 100644 --- a/sdk_container/src/third_party/portage-stable/sys-boot/grub/files/grub.default +++ b/sdk_container/src/third_party/portage-stable/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/sdk_container/src/third_party/portage-stable/sys-boot/grub/files/grub.default-2 b/sdk_container/src/third_party/portage-stable/sys-boot/grub/files/grub.default-2 new file mode 100644 index 0000000000..392a3ae20e --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-boot/grub/files/grub.default-2 @@ -0,0 +1,43 @@ +# 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-2,v 1.2 2012/06/28 22:36:53 floppym 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_DISTRIBUTOR="Gentoo" + +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 + +# Path to theme spec txt file. +# The starfield is by default provided with use truetype. +# NOTE: when enabling custom theme, ensure you have required font/etc. +#GRUB_THEME="/boot/grub2/themes/starfield/theme.txt" + +# 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 kernel +#GRUB_DISABLE_LINUX_UUID=true + +# Uncomment to disable generation of recovery mode menu entries +#GRUB_DISABLE_RECOVERY=true diff --git a/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-0.92-r1.ebuild b/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-0.92-r1.ebuild new file mode 100644 index 0000000000..0e3d55851e --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-0.92-r1.ebuild @@ -0,0 +1,95 @@ +# 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.92-r1.ebuild,v 1.16 2012/02/29 23:09:30 floppym Exp $ + +inherit mount-boot eutils flag-o-matic toolchain-funcs + +PATCHVER=0.2 +DESCRIPTION="GNU GRUB boot loader" +HOMEPAGE="http://www.gnu.org/software/grub/" +SRC_URI="mirror://gnu-alpha/grub/${P}.tar.gz + http://dev.gentoo.org/~seemant/distfiles/${P}-gentoo-${PATCHVER}.tar.bz2 + http://dev.gentoo.org/~seemant/distfiles/splash.xpm.gz + mirror://gentoo/splash.xpm.gz + mirror://gentoo/${P}-gentoo-${PATCHVER}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="-* x86" +IUSE="" + +DEPEND=">=sys-libs/ncurses-5.2-r5" + +PATCHDIR="${WORKDIR}/gentoo" + +src_unpack() { + unpack ${A} ; cd "${S}" + + EPATCH_SUFFIX="patch" + + epatch "${PATCHDIR}" + + if [ "`gcc-version`" = "3.3" ] + then + epatch "${PATCHDIR}"/gcc-3.3 + fi +} + +src_compile() { + filter-flags "-fstack-protector" + + 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. + unset CFLAGS + ./configure --prefix=/usr \ + --sbindir=/sbin \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --disable-auto-linux-mem-opt \ + || die "Configuration of package failed." + + #the vga16.patch changes configure.in but not configure so + #--enable-vga16 doesnt work. config.h gets overwritten by make. + echo "#define VGA16 1" >> config.h.in + + emake || die "Building failed!" +} + +src_install() { + make \ + prefix="${D}"/usr \ + sbindir="${D}"/sbin \ + mandir="${D}"/usr/share/man \ + infodir="${D}"/usr/share/info \ + install || die "Installation failed." + + insinto /boot/grub + doins "${DISTDIR}"/splash.xpm.gz + dodoc AUTHORS BUGS ChangeLog NEWS README THANKS TODO +} + +pkg_postinst() { + [ "$ROOT" != "/" ] && return 0 + if [ ! -e /boot/grub/stage1 ] + then + #if the boot loader files aren't in place, copy them over. + cd /usr/share/grub/i386-pc + cp stage1 stage2 *stage1_5 /boot/grub + else + einfo '*** A new GRUB has been installed. If you need to reinstall' + einfo '*** GRUB to a boot record on your drive, please remember to' + einfo '*** "cp /usr/share/grub/i386-pc/*stage* /boot/grub" first.' + einfo "*** If you're using XFS, unmount and remount /boot as well." + fi + + # change menu.lst to grub.conf + if [ ! -e /boot/grub/grub.conf -a -e /boot/grub/menu.lst ] + then + mv /boot/grub/menu.lst /boot/grub/grub.conf + ln -s grub.conf /boot/grub/menu.lst + einfo "*** IMPORTANT NOTE: menu.lst has been renamed to grub.conf" + fi +} diff --git a/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-0.94-r1.ebuild b/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-0.94-r1.ebuild new file mode 100644 index 0000000000..2e736f6efe --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-0.94-r1.ebuild @@ -0,0 +1,131 @@ +# 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.94-r1.ebuild,v 1.28 2012/02/29 23:09:30 floppym Exp $ + +inherit mount-boot eutils flag-o-matic toolchain-funcs + +PATCHVER=0.1 +DESCRIPTION="GNU GRUB boot loader" +HOMEPAGE="http://www.gnu.org/software/grub/" +SRC_URI="mirror://gnu-alpha/grub/${P}.tar.gz + http://dev.gentoo.org/~seemant/distfiles/${P}-gentoo-${PATCHVER}.tar.bz2 + http://dev.gentoo.org/~seemant/distfiles/splash.xpm.gz + mirror://gentoo/splash.xpm.gz + mirror://gentoo/${P}-gentoo-${PATCHVER}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="-* x86 amd64" +IUSE="static" + +RDEPEND=">=sys-libs/ncurses-5.2-r5" +DEPEND="${RDEPEND} + >=sys-devel/automake-1.7 + >=sys-devel/autoconf-2.5" + +PATCHDIR="${WORKDIR}/gentoo" + +pkg_setup() { + if use amd64; then + ABI_ALLOW="x86" + ABI="x86" + fi +} + +src_unpack() { + unpack ${A}; cd "${S}" + + EPATCH_SUFFIX="patch" + + epatch "${PATCHDIR}" +} + +src_compile() { + 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. + unset CFLAGS + + filter-ldflags -pie + append-flags -DNDEBUG + [ `gcc-major-version` -eq 3 ] && append-flags -minline-all-stringops + use static && append-ldflags -static + + autoconf || die + aclocal || die + WANT_AUTOMAKE=1.7 automake || die + + # build the net-bootable grub first + CFLAGS="" \ + 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 + + emake w89c840_o_CFLAGS="-O" || die "making netboot stuff" + + mv stage2/{nbgrub,pxegrub} "${S}" + mv stage2/stage2 stage2/stage2.netboot + + make clean || die + + # now build the regular grub + CFLAGS="${CFLAGS}" \ + econf \ + --libdir=/lib \ + --datadir=/usr/lib/grub \ + --exec-prefix=/ \ + --disable-auto-linux-mem-opt || die + emake || die "making regular stuff" +} + +src_install() { + make DESTDIR="${D}" install || die + exeinto /usr/lib/grub/${CHOST} + doexe nbgrub pxegrub stage2/stage2 stage2/stage2.netboot + + insinto /boot/grub + doins "${DISTDIR}"/splash.xpm.gz + newins docs/menu.lst grub.conf.sample + + dodoc AUTHORS BUGS ChangeLog NEWS README THANKS TODO + newdoc docs/menu.lst grub.conf.sample + + docinto gentoo + dodoc "${PATCHDIR}"/README* +} + +pkg_postinst() { + [ "$ROOT" != "/" ] && return 0 + + # change menu.lst to grub.conf + if [ ! -e /boot/grub/grub.conf -a -e /boot/grub/menu.lst ] + then + mv /boot/grub/menu.lst /boot/grub/grub.conf + ewarn + ewarn "*** IMPORTANT NOTE: menu.lst has been renamed to grub.conf" + ewarn + fi + einfo "Linking from new grub.conf name to menu.lst" + ln -s grub.conf /boot/grub/menu.lst + + [ -e /boot/grub/stage2 ] && mv /boot/grub/stage2{,.old} + + einfo "Copying files from /usr/lib/grub to /boot" + cp -p /usr/lib/grub/* /boot/grub + cp -p /usr/lib/grub/grub/*/* /boot/grub + + [ -e /boot/grub/grub.conf ] \ + && /usr/sbin/grub \ + --batch \ + --device-map=/boot/grub/device.map \ + < /boot/grub/grub.conf > /dev/null 2>&1 +} diff --git a/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-0.96-r1.ebuild b/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-0.96-r1.ebuild new file mode 100644 index 0000000000..88c4932d66 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-0.96-r1.ebuild @@ -0,0 +1,150 @@ +# 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.96-r1.ebuild,v 1.19 2012/02/29 23:09:30 floppym Exp $ + +inherit mount-boot eutils flag-o-matic toolchain-funcs + +PATCHVER=0.1 +DESCRIPTION="GNU GRUB boot loader" +HOMEPAGE="http://www.gnu.org/software/grub/" +SRC_URI="mirror://gentoo/${P}.tar.gz + mirror://gnu-alpha/${PN}/${P}.tar.gz + http://dev.gentoo.org/~seemant/distfiles/${PF}-gentoo-${PATCHVER}.tar.bz2 + http://dev.gentoo.org/~seemant/distfiles/splash.xpm.gz + mirror://gentoo/splash.xpm.gz + mirror://gentoo/${PF}-gentoo-${PATCHVER}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="static netboot custom-cflags" + +RDEPEND=">=sys-libs/ncurses-5.2-r5" +DEPEND="${RDEPEND} + >=sys-devel/automake-1.7 + >=sys-devel/autoconf-2.5" + +PATCHDIR="${WORKDIR}/gentoo" + +pkg_setup() { + if use amd64; then + ABI_ALLOW="x86" + ABI="x86" + fi +} + +src_unpack() { + unpack ${A} ; cd "${S}" + + EPATCH_SUFFIX="patch" + epatch "${PATCHDIR}" + + # a bunch of patches apply to raw autotool files + autoconf || die "autoconf failed" + aclocal || die "aclocal failed" + automake || die "automake failed" +} + +src_compile() { + 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 + + # 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 || die "econf failed" + 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() { + make DESTDIR="${D}" install || die + exeinto /usr/lib/grub/${CHOST} + use netboot && doexe nbgrub pxegrub stage2/stage2.netboot + + insinto /boot/grub + doins "${DISTDIR}"/splash.xpm.gz + newins docs/menu.lst grub.conf.sample + + dodoc AUTHORS BUGS ChangeLog NEWS README THANKS TODO + newdoc docs/menu.lst grub.conf.sample + + docinto gentoo + dodoc "${PATCHDIR}"/README.Gentoo.patches +} + +pkg_postinst() { + [[ "${ROOT}" != "/" ]] && return 0 + + # change menu.lst to grub.conf + if [[ ! -e /boot/grub/grub.conf && -e /boot/grub/menu.lst ]] ; then + mv -f /boot/grub/menu.lst /boot/grub/grub.conf + ewarn + ewarn "*** IMPORTANT NOTE: menu.lst has been renamed to grub.conf" + ewarn + fi + einfo "Linking from new grub.conf name to menu.lst" + [[ ! -e /boot/grub/menu.lst ]] && ln -snf grub.conf /boot/grub/menu.lst + + [[ -e /boot/grub/stage2 ]] && mv /boot/grub/stage2{,.old} + + einfo "Copying files from /lib/grub and /usr/lib/grub to /boot" + for x in /lib/grub/*/* /usr/lib/grub/*/* ; do + [[ -f "${x}" ]] && cp -p "${x}" /boot/grub + done + + # hardened voodoo + [[ -x /sbin/chpax ]] && /sbin/chpax -spme /sbin/grub + [[ -x /sbin/paxctl ]] && /sbin/paxctl -spme /sbin/grub + + [[ -e /boot/grub/grub.conf ]] \ + && /sbin/grub \ + --batch \ + --device-map=/boot/grub/device.map \ + < /boot/grub/grub.conf > /dev/null 2>&1 +} diff --git a/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-0.96-r2.ebuild b/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-0.96-r2.ebuild new file mode 100644 index 0000000000..4c30e9a3f0 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-0.96-r2.ebuild @@ -0,0 +1,146 @@ +# 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.96-r2.ebuild,v 1.13 2012/02/29 23:09:30 floppym Exp $ + +inherit mount-boot eutils flag-o-matic toolchain-funcs + +PATCHVER=0.1 +DESCRIPTION="GNU GRUB boot loader" +HOMEPAGE="http://www.gnu.org/software/grub/" +SRC_URI="mirror://gentoo/${P}.tar.gz + mirror://gnu-alpha/${PN}/${P}.tar.gz + http://dev.gentoo.org/~seemant/distfiles/${PF}-gentoo-${PATCHVER}.tar.bz2 + http://dev.gentoo.org/~seemant/distfiles/splash.xpm.gz + mirror://gentoo/splash.xpm.gz + mirror://gentoo/${PF}-gentoo-${PATCHVER}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="static netboot custom-cflags" + +RDEPEND=">=sys-libs/ncurses-5.2-r5" +DEPEND="${RDEPEND} + >=sys-devel/automake-1.7 + >=sys-devel/autoconf-2.5" + +PATCHDIR="${WORKDIR}/gentoo" + +pkg_setup() { + if use amd64; then + ABI_ALLOW="x86" + ABI="x86" + fi +} + +src_unpack() { + unpack ${A} ; cd "${S}" + + EPATCH_SUFFIX="patch" + epatch "${PATCHDIR}" + + # a bunch of patches apply to raw autotool files + autoconf || die "autoconf failed" + aclocal || die "aclocal failed" + automake || die "automake failed" +} + +src_compile() { + 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 + + # 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 || die "econf failed" + 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() { + make DESTDIR="${D}" install || die + exeinto /usr/lib/grub/${CHOST} + use netboot && doexe nbgrub pxegrub stage2/stage2.netboot + + insinto /boot/grub + doins "${DISTDIR}"/splash.xpm.gz + newins docs/menu.lst grub.conf.sample + + dodoc AUTHORS BUGS ChangeLog NEWS README THANKS TODO + newdoc docs/menu.lst grub.conf.sample + + docinto gentoo + dodoc "${PATCHDIR}"/README* +} + +pkg_postinst() { + [[ "${ROOT}" != "/" ]] && return 0 + + # change menu.lst to grub.conf + if [[ ! -e /boot/grub/grub.conf && -e /boot/grub/menu.lst ]] ; then + mv -f /boot/grub/menu.lst /boot/grub/grub.conf + ewarn + ewarn "*** IMPORTANT NOTE: menu.lst has been renamed to grub.conf" + ewarn + fi + einfo "Linking from new grub.conf name to menu.lst" + [[ ! -e /boot/grub/menu.lst ]] && ln -snf grub.conf /boot/grub/menu.lst + + [[ -e /boot/grub/stage2 ]] && mv /boot/grub/stage2{,.old} + + einfo "Copying files from /lib/grub and /usr/lib/grub to /boot" + for x in /lib/grub/*/* /usr/lib/grub/*/* ; do + [[ -f "${x}" ]] && cp -p "${x}" /boot/grub + done + + [[ -e /boot/grub/grub.conf ]] \ + && /sbin/grub \ + --batch \ + --device-map=/boot/grub/device.map \ + < /boot/grub/grub.conf > /dev/null 2>&1 +} diff --git a/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-0.96-r3.ebuild b/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-0.96-r3.ebuild new file mode 100644 index 0000000000..84ab941791 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-0.96-r3.ebuild @@ -0,0 +1,145 @@ +# 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.96-r3.ebuild,v 1.7 2012/02/29 23:09:30 floppym Exp $ + +inherit mount-boot eutils flag-o-matic toolchain-funcs + +PATCHVER=1.0 +DESCRIPTION="GNU GRUB boot loader" +HOMEPAGE="http://www.gnu.org/software/grub/" +SRC_URI="mirror://gentoo/${P}.tar.gz + mirror://gnu-alpha/${PN}/${P}.tar.gz + http://dev.gentoo.org/~seemant/distfiles/${P}-patches-${PATCHVER}.tar.bz2 + http://dev.gentoo.org/~seemant/distfiles/splash.xpm.gz + mirror://gentoo/splash.xpm.gz + mirror://gentoo/${P}-patches-${PATCHVER}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="static netboot custom-cflags" + +RDEPEND=">=sys-libs/ncurses-5.2-r5" +DEPEND="${RDEPEND} + >=sys-devel/automake-1.7 + >=sys-devel/autoconf-2.5" + +pkg_setup() { + if use amd64 ; then + ABI_ALLOW="x86" + ABI="x86" + fi +} + +src_unpack() { + unpack ${A} + cd "${S}" + + EPATCH_SUFFIX="patch" + epatch "${WORKDIR}"/patch + + # a bunch of patches apply to raw autotool files + autoconf || die "autoconf failed" + aclocal || die "aclocal failed" + automake || die "automake failed" +} + +src_compile() { + 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 + + # 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 || die "econf failed" + 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() { + make DESTDIR="${D}" install || die + exeinto /usr/lib/grub/${CHOST} + use netboot && doexe nbgrub pxegrub stage2/stage2.netboot + + insinto /boot/grub + doins "${DISTDIR}"/splash.xpm.gz + newins docs/menu.lst grub.conf.sample + + dodoc AUTHORS BUGS ChangeLog NEWS README THANKS TODO + newdoc docs/menu.lst grub.conf.sample + + docinto gentoo + dodoc "${PATCHDIR}"/README* +} + +pkg_postinst() { + [[ "${ROOT}" != "/" ]] && return 0 + + # change menu.lst to grub.conf + if [[ ! -e /boot/grub/grub.conf && -e /boot/grub/menu.lst ]] ; then + mv -f /boot/grub/menu.lst /boot/grub/grub.conf + ewarn + ewarn "*** IMPORTANT NOTE: menu.lst has been renamed to grub.conf" + ewarn + fi + einfo "Linking from new grub.conf name to menu.lst" + [[ ! -e /boot/grub/menu.lst ]] && ln -snf grub.conf /boot/grub/menu.lst + + [[ -e /boot/grub/stage2 ]] && mv /boot/grub/stage2{,.old} + + einfo "Copying files from /lib/grub and /usr/lib/grub to /boot" + for x in /lib/grub/*/* /usr/lib/grub/*/* ; do + [[ -f "${x}" ]] && cp -p "${x}" /boot/grub + done + + [[ -e /boot/grub/grub.conf ]] \ + && /sbin/grub \ + --batch \ + --device-map=/boot/grub/device.map \ + < /boot/grub/grub.conf > /dev/null 2>&1 +} diff --git a/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-0.97-r10.ebuild b/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-0.97-r10.ebuild new file mode 100644 index 0000000000..2f15235574 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-0.97-r10.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-r10.ebuild,v 1.14 2012/05/31 00:01:18 vapier 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 - 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 multilib + +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}" +} diff --git a/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-0.97-r11.ebuild b/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-0.97-r11.ebuild new file mode 100644 index 0000000000..74d4128314 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/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.3 2012/05/31 00:01:18 vapier 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 - 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 multilib + +PATCHVER="1.13" # 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}" +} diff --git a/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-0.97-r12.ebuild b/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-0.97-r12.ebuild new file mode 100644 index 0000000000..e5937d8c0c --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-0.97-r12.ebuild @@ -0,0 +1,286 @@ +# 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-r12.ebuild,v 1.5 2012/08/07 21:00:21 hwoarang 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 - 29 Nov 2010 +# FEATURES='-noauto -noinfo -nodoc -noman -splitdebug nostrip' \ +# USE='static -ncurses -netboot -custom-cflags' \ +# PORTAGE_COMPRESS=true GRUB_STATIC_PACKAGE_BUILDING=1 ebuild \ +# grub-${PVR}.ebuild clean package && \ +# qtbz2 -s -j ${PKGDIR}/${CAT}/${PF}.tbz2 && \ +# mv ${PF}.tar.bz2 ${DISTDIR}/grub-static-${PVR}.tar.bz2 + +inherit mount-boot eutils flag-o-matic toolchain-funcs autotools linux-info pax-utils + +PATCHVER="1.14" # 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() { + case $(tc-arch) in + amd64) CONFIG_CHECK='~IA32_EMULATION' check_extra_config ;; + esac +} + +src_unpack() { + unpack ${A} + cd "${S}" + + # 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 + + 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} + + emake w89c840_o_CFLAGS="-O" || die + + mv -f stage2/{nbgrub,pxegrub} "${S}"/ + mv -f stage2/stage2 stage2/stage2.netboot + + emake -j1 clean || die + 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) + + # 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 + emake -j1 check || die +} + +src_install() { + emake DESTDIR="${D}" install || die + if use netboot ; then + exeinto /usr/lib/grub/${CHOST} + doexe nbgrub pxegrub stage2/stage2.netboot || die + 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 + 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 and /usr/share/grub to ${dir}" + for x in \ + "${ROOT}"/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}" +} diff --git a/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-0.97-r13.ebuild b/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-0.97-r13.ebuild new file mode 100644 index 0000000000..382bbfc45e --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-0.97-r13.ebuild @@ -0,0 +1,292 @@ +# 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-r13.ebuild,v 1.3 2012/07/24 15:49:35 vapier 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 - 29 Nov 2010 +# FEATURES='-noauto -noinfo -nodoc -noman -splitdebug nostrip' \ +# USE='static -ncurses -netboot -custom-cflags' \ +# PORTAGE_COMPRESS=true GRUB_STATIC_PACKAGE_BUILDING=1 ebuild \ +# grub-${PVR}.ebuild clean package && \ +# qtbz2 -s -j ${PKGDIR}/${CAT}/${PF}.tbz2 && \ +# mv ${PF}.tar.bz2 ${DISTDIR}/grub-static-${PVR}.tar.bz2 + +EAPI="4" + +inherit eutils mount-boot toolchain-funcs linux-info flag-o-matic autotools pax-utils multiprocessing + +PATCHVER="1.14" # 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" + +LIB_DEPEND="ncurses? ( + >=sys-libs/ncurses-5.2-r5[static-libs(+)] + amd64? ( app-emulation/emul-linux-x86-baselibs ) + )" +RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )" +DEPEND="${RDEPEND} + static? ( ${LIB_DEPEND} )" + +pkg_setup() { + case $(tc-arch) in + amd64) CONFIG_CHECK='~IA32_EMULATION' check_extra_config ;; + esac +} + +src_prepare() { + # 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 + + if [[ -n ${PATCHVER} ]] ; then + EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch + eautoreconf + fi +} + +src_configure() { + 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." + fi + fi + + multijob_init + + # build the net-bootable grub first, but only if "netboot" is set + if use netboot ; then + ( + multijob_child_init + mkdir -p "${WORKDIR}"/netboot + pushd "${WORKDIR}"/netboot >/dev/null + ECONF_SOURCE=${S} \ + 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} + popd >/dev/null + ) & + multijob_post_fork + 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) + + # sanity check due to common failure + use ncurses && ! grep -qs "HAVE_LIBCURSES.*1" config.h && die "USE=ncurses but curses not found" + + multijob_finish +} + +src_compile() { + use netboot && emake -C "${WORKDIR}"/netboot w89c840_o_CFLAGS="-O" + emake +} + +src_test() { + # non-default block size also give false pass/fails. + unset BLOCK_SIZE + emake -j1 check +} + +src_install() { + default + if use netboot ; then + exeinto /usr/lib/grub/${CHOST} + doexe "${WORKDIR}"/netboot/stage2/{nbgrub,pxegrub} + newexe "${WORKDIR}"/netboot/stage2/stage2 stage2.netboot + fi + + pax-mark -m "${D}"/sbin/grub #330745 + + newdoc docs/menu.lst grub.conf.sample + dodoc "${FILESDIR}"/grub.conf.gentoo + + [[ -n ${GRUB_STATIC_PACKAGE_BUILDING} ]] && \ + mv "${D}"/usr/share/doc/{${PF},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 + 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 "*** IMPORTANT NOTE: menu.lst has been renamed to grub.conf" + echo + 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 + ewarn "This means you must use either grub-install or perform" + ewarn "root/setup manually." + ewarn + ewarn "For more help, see the handbook:" + ewarn "http://www.gentoo.org/doc/en/handbook/handbook-${ARCH}.xml?part=1&chap=10#grub-install-auto" + echo + fi + + einfo "Copying files from /lib/grub and /usr/share/grub to ${dir}" + for x in \ + "${ROOT}"/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}" +} diff --git a/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-0.97-r2.ebuild b/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-0.97-r2.ebuild new file mode 100644 index 0000000000..369d2bef37 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-0.97-r2.ebuild @@ -0,0 +1,168 @@ +# 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-r2.ebuild,v 1.13 2012/02/29 23:09:30 floppym Exp $ + +inherit mount-boot eutils flag-o-matic toolchain-funcs + +PATCHVER="1.2" +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" +IUSE="static netboot custom-cflags" + +RDEPEND=">=sys-libs/ncurses-5.2-r5" +DEPEND="${RDEPEND} + =sys-devel/automake-1.9* + >=sys-devel/autoconf-2.5" + +pkg_setup() { + if use amd64 ; then + ABI_ALLOW="x86" + ABI="x86" + fi +} + +src_unpack() { + unpack ${A} + cd "${S}" + + # patch breaks booting for some people #111885 + rm "${WORKDIR}"/patch/400_* + + if [[ -n ${PATCHVER} ]] ; then + EPATCH_SUFFIX="patch" + epatch "${WORKDIR}"/patch + + # a bunch of patches apply to raw autotool files + autoconf || die "autoconf failed" + aclocal || die "aclocal failed" + automake || die "automake failed" + fi +} + +src_compile() { + 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 + + # 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 || die "econf failed" + 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() { + make DESTDIR="${D}" install || die + if use netboot ; then + exeinto /usr/lib/grub/${CHOST} + doexe nbgrub pxegrub stage2/stage2.netboot || die "netboot install" + fi + + insinto /boot/grub + doins "${DISTDIR}"/splash.xpm.gz + newins docs/menu.lst grub.conf.sample + + dodoc AUTHORS BUGS ChangeLog NEWS README THANKS TODO + newdoc docs/menu.lst grub.conf.sample +} + +setup_boot_dir() { + local dir="${1}" + + [[ ! -e "${dir}" ]] && die "${dir} does not exist!" + [[ ! -e "${dir}"/grub ]] && mkdir "${dir}/grub" + + # change menu.lst to grub.conf + if [[ ! -e "${dir}"/grub/grub.conf ]] && [[ -e "${dir}"/grub/menu.lst ]] ; then + mv -f "${dir}"/grub/menu.lst "${dir}"/grub/grub.conf + ewarn + ewarn "*** IMPORTANT NOTE: menu.lst has been renamed to grub.conf" + ewarn + fi + + if [[ ! -e "${dir}"/grub/menu.lst ]]; then + einfo "Linking from new grub.conf name to menu.lst" + ln -snf grub.conf "${dir}/grub/menu.lst" + fi + + [[ -e "${dir}"/grub/stage2 ]] && mv "${dir}"/grub/stage2{,.old} + + einfo "Copying files from /lib/grub and /usr/lib/grub to "${dir}"" + for x in /lib*/grub/*/* /usr/lib*/grub/*/* ; do + [[ -f "${x}" ]] && cp -p "${x}" "${dir}"/grub/ + done + + if [[ -e "${dir}"/grub/grub.conf ]] ; then + egrep -v '^[[:space:]]*(#|$|default|fallback|splashimage|timeout|title)' "${dir}"/grub/grub.conf | \ + /sbin/grub --batch \ + --device-map="${dir}"/grub/device.map \ + > /dev/null + fi +} + +pkg_postinst() { + [[ "${ROOT}" != "/" ]] && return 0 + setup_boot_dir /boot + einfo "To install grub files to another device (like a usb stick), just run:" + einfo " emerge --config =${PF}" +} + +pkg_config() { + local dir + einfo "Enter the directory where you want to setup grub:" + read dir + setup_boot_dir "${dir}" +} diff --git a/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-0.97-r3.ebuild b/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-0.97-r3.ebuild new file mode 100644 index 0000000000..2da2ba547d --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-0.97-r3.ebuild @@ -0,0 +1,161 @@ +# 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-r3.ebuild,v 1.14 2012/05/31 00:01:18 vapier Exp $ + +inherit mount-boot eutils flag-o-matic toolchain-funcs autotools multilib + +PATCHVER="1.4" +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="static netboot custom-cflags" + +DEPEND=">=sys-libs/ncurses-5.2-r5" + +src_unpack() { + unpack ${A} + cd "${S}" + + # patch breaks booting for some people #111885 + rm "${WORKDIR}"/patch/400_* + + 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 + + # 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 || die "econf failed" + 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() { + make DESTDIR="${D}" install || die + if use netboot ; then + exeinto /usr/lib/grub/${CHOST} + doexe nbgrub pxegrub stage2/stage2.netboot || die "netboot install" + fi + + insinto /boot/grub + doins "${DISTDIR}"/splash.xpm.gz + newins docs/menu.lst grub.conf.sample + + dodoc AUTHORS BUGS ChangeLog NEWS README THANKS TODO + newdoc docs/menu.lst grub.conf.sample +} + +setup_boot_dir() { + local dir="${1}" + + [[ ! -e "${dir}" ]] && die "${dir} does not exist!" + [[ ! -e "${dir}"/grub ]] && mkdir "${dir}/grub" + + # change menu.lst to grub.conf + if [[ ! -e "${dir}"/grub/grub.conf ]] && [[ -e "${dir}"/grub/menu.lst ]] ; then + mv -f "${dir}"/grub/menu.lst "${dir}"/grub/grub.conf + ewarn + ewarn "*** IMPORTANT NOTE: menu.lst has been renamed to grub.conf" + ewarn + fi + + if [[ ! -e "${dir}"/grub/menu.lst ]]; then + einfo "Linking from new grub.conf name to menu.lst" + ln -snf grub.conf "${dir}"/grub/menu.lst + fi + + [[ -e "${dir}"/grub/stage2 ]] && mv "${dir}"/grub/stage2{,.old} + + einfo "Copying files from /lib/grub and /usr/lib/grub to ${dir}" + for x in /lib*/grub/*/* /usr/lib*/grub/*/* ; do + [[ -f "${x}" ]] && cp -p "${x}" "${dir}"/grub/ + done + + if [[ -e "${dir}"/grub/grub.conf ]] ; then + egrep \ + -v '^[[:space:]]*(#|$|default|fallback|initrd|password|splashimage|timeout|title)' \ + "${dir}"/grub/grub.conf | \ + /sbin/grub --batch \ + --device-map="${dir}"/grub/device.map \ + > /dev/null + fi +} + +pkg_postinst() { + [[ "${ROOT}" != "/" ]] && return 0 + [[ -n ${DONT_MOUNT_BOOT} ]] && return 0 + setup_boot_dir /boot + einfo "To install grub files to another device (like a usb stick), just run:" + einfo " emerge --config =${PF}" +} + +pkg_config() { + local dir + einfo "Enter the directory where you want to setup grub:" + read dir + setup_boot_dir "${dir}" +} diff --git a/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-0.97-r4.ebuild b/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-0.97-r4.ebuild new file mode 100644 index 0000000000..2c18753fba --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-0.97-r4.ebuild @@ -0,0 +1,172 @@ +# 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-r4.ebuild,v 1.8 2012/05/31 00:01:18 vapier Exp $ + +inherit mount-boot eutils flag-o-matic toolchain-funcs autotools multilib + +PATCHVER="1.4" +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="static netboot custom-cflags" + +DEPEND=">=sys-libs/ncurses-5.2-r5" + +src_unpack() { + unpack ${A} + cd "${S}" + + # patch breaks booting for some people #111885 + rm "${WORKDIR}"/patch/400_* + + epatch "${FILESDIR}"/grub-0.97-gpt.patch + + 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 + + # 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 || die "econf failed" + 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() { + make DESTDIR="${D}" install || die + if use netboot ; then + exeinto /usr/lib/grub/${CHOST} + doexe nbgrub pxegrub stage2/stage2.netboot || die "netboot install" + fi + + insinto /boot/grub + doins "${DISTDIR}"/splash.xpm.gz + newins docs/menu.lst grub.conf.sample + + dodoc AUTHORS BUGS ChangeLog NEWS README THANKS TODO + newdoc docs/menu.lst grub.conf.sample +} + +setup_boot_dir() { + local boot_dir=$1 + local dir=${boot_dir} + + [[ ! -e ${dir} ]] && die "${dir} does not exist!" + 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 + + [[ -e ${dir}/stage2 ]] && mv "${dir}"/stage2{,.old} + + einfo "Copying files from /lib/grub and /usr/lib/grub to ${dir}" + for x in "${ROOT}"/lib*/grub/*/* "${ROOT}"/usr/lib*/grub/*/* ; do + [[ -f "${x}" ]] && cp -p "${x}" "${dir}"/ + done + + if [[ -e ${dir}/grub.conf ]] ; then + egrep \ + -v '^[[:space:]]*(#|$|default|fallback|initrd|password|splashimage|timeout|title)' \ + "${dir}"/grub.conf | \ + /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 +} + +pkg_postinst() { + [[ -n ${DONT_MOUNT_BOOT} ]] && return 0 + setup_boot_dir "${ROOT}"/boot + einfo "To install grub files to another device (like a usb stick), just run:" + einfo " emerge --config =${PF}" +} + +pkg_config() { + local dir + einfo "Enter the directory where you want to setup grub: " + read dir + setup_boot_dir "${dir}" +} diff --git a/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-0.97-r5.ebuild b/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-0.97-r5.ebuild new file mode 100644 index 0000000000..9f66811928 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-0.97-r5.ebuild @@ -0,0 +1,219 @@ +# 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-r5.ebuild,v 1.15 2012/05/31 00:01:18 vapier 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 multilib + +PATCHVER="1.7" +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" + +DEPEND="ncurses? ( + >=sys-libs/ncurses-5.2-r5 + amd64? ( app-emulation/emul-linux-x86-baselibs ) + )" + +src_unpack() { + unpack ${A} + cd "${S}" + + # patch breaks booting for some people #111885 + rm "${WORKDIR}"/patch/400_* + + # 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 + die "You must use the grub-static package if you want a static Grub on amd64!" + 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 + + insinto /boot/grub + doins "${DISTDIR}"/splash.xpm.gz +} + +setup_boot_dir() { + local boot_dir=$1 + local dir=${boot_dir} + + [[ ! -e ${dir} ]] && die "${dir} does not exist!" + [[ ! -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." + ebeep + fi + + einfo "Copying files from /lib/grub and /usr/lib/grub to ${dir}" + for x in "${ROOT}"/lib*/grub/*/* "${ROOT}"/usr/lib*/grub/*/* ; do + [[ -f ${x} ]] && cp -p "${x}" "${dir}"/ + done + + if [[ -e ${dir}/grub.conf ]] ; then + egrep \ + -v '^[[:space:]]*(#|$|default|fallback|initrd|password|splashimage|timeout|title)' \ + "${dir}"/grub.conf | \ + /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 +} + +pkg_postinst() { + [[ -n ${DONT_MOUNT_BOOT} ]] && return 0 + setup_boot_dir "${ROOT}"/boot + einfo "To install grub files to another device (like a usb stick), just run:" + einfo " emerge --config =${PF}" +} + +pkg_config() { + local dir + einfo "Enter the directory where you want to setup grub:" + read dir + setup_boot_dir "${dir}" +} diff --git a/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-0.97-r6.ebuild b/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-0.97-r6.ebuild new file mode 100644 index 0000000000..ca03df3f3c --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-0.97-r6.ebuild @@ -0,0 +1,269 @@ +# 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-r6.ebuild,v 1.12 2012/05/31 00:01:18 vapier 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 multilib + +PATCHVER="1.7" +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" + +DEPEND="ncurses? ( + >=sys-libs/ncurses-5.2-r5 + amd64? ( app-emulation/emul-linux-x86-baselibs ) + )" + +src_unpack() { + unpack ${A} + cd "${S}" + + # patch breaks booting for some people #111885 + rm "${WORKDIR}"/patch/400_* + + # 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} + + [[ ! -e ${dir} ]] && die "${dir} does not exist!" + [[ ! -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}" +} diff --git a/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-0.97-r8.ebuild b/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-0.97-r8.ebuild new file mode 100644 index 0000000000..d57d39bf95 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-0.97-r8.ebuild @@ -0,0 +1,273 @@ +# 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-r8.ebuild,v 1.6 2012/05/31 00:01:18 vapier 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 multilib + +PATCHVER="1.8" # 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" + +DEPEND="ncurses? ( + >=sys-libs/ncurses-5.2-r5 + amd64? ( app-emulation/emul-linux-x86-baselibs ) + )" + +src_unpack() { + unpack ${A} + cd "${S}" + + # patch breaks booting for some people #111885 + rm "${WORKDIR}"/patch/400_* + + # 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} + + [[ ! -e ${dir} ]] && die "${dir} does not exist!" + [[ ! -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}" +} diff --git a/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-0.97-r9.ebuild b/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-0.97-r9.ebuild new file mode 100644 index 0000000000..83e98b7b01 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-0.97-r9.ebuild @@ -0,0 +1,280 @@ +# 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-r9.ebuild,v 1.10 2012/05/31 00:01:18 vapier 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 multilib + +PATCHVER="1.9" # 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" + +DEPEND="ncurses? ( + >=sys-libs/ncurses-5.2-r5 + amd64? ( app-emulation/emul-linux-x86-baselibs ) + )" + +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_* + + # 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() { + 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}" +} diff --git a/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-0.97.ebuild b/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-0.97.ebuild new file mode 100644 index 0000000000..f36bdf426b --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-0.97.ebuild @@ -0,0 +1,147 @@ +# 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.ebuild,v 1.6 2012/02/29 23:09:30 floppym Exp $ + +inherit mount-boot eutils flag-o-matic toolchain-funcs + +PATCHVER=1.0 +DESCRIPTION="GNU GRUB 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" +IUSE="static netboot custom-cflags" + +RDEPEND=">=sys-libs/ncurses-5.2-r5" +DEPEND="${RDEPEND} + >=sys-devel/automake-1.7 + >=sys-devel/autoconf-2.5" + +pkg_setup() { + if use amd64 ; then + ABI_ALLOW="x86" + ABI="x86" + fi +} + +src_unpack() { + unpack ${A} + cd "${S}" + + if [[ -n ${PATCHVER} ]] ; then + EPATCH_SUFFIX="patch" + epatch "${WORKDIR}"/patch + + # a bunch of patches apply to raw autotool files + autoconf || die "autoconf failed" + aclocal || die "aclocal failed" + automake || die "automake failed" + fi +} + +src_compile() { + 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 + + # 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 || die "econf failed" + 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() { + make DESTDIR="${D}" install || die + if use netboot ; then + exeinto /usr/lib/grub/${CHOST} + doexe nbgrub pxegrub stage2/stage2.netboot || die "netboot install" + fi + + insinto /boot/grub + doins "${DISTDIR}"/splash.xpm.gz + newins docs/menu.lst grub.conf.sample + + dodoc AUTHORS BUGS ChangeLog NEWS README THANKS TODO + newdoc docs/menu.lst grub.conf.sample + + docinto gentoo + dodoc "${PATCHDIR}"/README* +} + +pkg_postinst() { + [[ "${ROOT}" != "/" ]] && return 0 + + # change menu.lst to grub.conf + if [[ ! -e /boot/grub/grub.conf && -e /boot/grub/menu.lst ]] ; then + mv -f /boot/grub/menu.lst /boot/grub/grub.conf + ewarn + ewarn "*** IMPORTANT NOTE: menu.lst has been renamed to grub.conf" + ewarn + fi + einfo "Linking from new grub.conf name to menu.lst" + [[ ! -e /boot/grub/menu.lst ]] && ln -snf grub.conf /boot/grub/menu.lst + + [[ -e /boot/grub/stage2 ]] && mv /boot/grub/stage2{,.old} + + einfo "Copying files from /lib/grub and /usr/lib/grub to /boot" + for x in /lib/grub/*/* /usr/lib/grub/*/* ; do + [[ -f "${x}" ]] && cp -p "${x}" /boot/grub + done + + [[ -e /boot/grub/grub.conf ]] \ + && /sbin/grub \ + --batch \ + --device-map=/boot/grub/device.map \ + < /boot/grub/grub.conf > /dev/null 2>&1 +} diff --git a/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-1.99-r2.ebuild b/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-1.99-r2.ebuild index 9a542a503f..b9e7d4988a 100644 --- a/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-1.99-r2.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-1.99-r2.ebuild @@ -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/grub-1.99-r2.ebuild,v 1.8 2011/11/18 00:04:29 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-1.99-r2.ebuild,v 1.12 2012/05/31 00:01:18 vapier Exp $ EAPI=4 @@ -19,7 +19,7 @@ else S=${WORKDIR}/${MY_P} fi -inherit mount-boot eutils flag-o-matic pax-utils toolchain-funcs ${DO_AUTORECONF:+autotools} ${LIVE_ECLASS} +inherit mount-boot eutils flag-o-matic pax-utils toolchain-funcs multilib ${DO_AUTORECONF:+autotools} ${LIVE_ECLASS} unset LIVE_ECLASS DESCRIPTION="GNU GRUB boot loader" @@ -54,7 +54,9 @@ RDEPEND=" sdl? ( media-libs/libsdl ) ) device-mapper? ( >=sys-fs/lvm2-2.02.45 ) - truetype? ( media-libs/freetype >=media-fonts/unifont-5 )" + truetype? ( media-libs/freetype >=media-fonts/unifont-5 ) + ppc? ( sys-apps/ibm-powerpc-utils sys-apps/powerpc-utils ) + ppc64? ( sys-apps/ibm-powerpc-utils sys-apps/powerpc-utils )" DEPEND="${RDEPEND} >=dev-lang/python-2.5.2 sys-devel/flex @@ -249,7 +251,7 @@ src_install() { "bin/grub2-mkimage" ) for e in ${PAX[@]}; do - pax-mark -mp "${ED}/${e}" + pax-mark -mpes "${ED}/${e}" done # can't be in docs array as we use default_src_install in different builddir @@ -271,7 +273,7 @@ EOF show_doc_url() { elog elog "For informations how to configure grub-2 please refer to the guide:" - elog " http://dev.gentoo.org/~scarabeus/grub-2-guide.xml" + elog " http://wiki.gentoo.org/wiki/GRUB2" } setup_boot_dir() { diff --git a/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-2.00-r1.ebuild b/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-2.00-r1.ebuild new file mode 100644 index 0000000000..0ae5472fcd --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-2.00-r1.ebuild @@ -0,0 +1,355 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-2.00-r1.ebuild,v 1.8 2013/01/19 03:05:28 mattst88 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* || ${PV} == *_rc* ]]; then + SRC_URI="mirror://gnu-alpha/${PN}/${MY_P}.tar.xz" + else + SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.xz + mirror://gentoo/${MY_P}.tar.xz" + fi + KEYWORDS="~amd64 ~x86" + S=${WORKDIR}/${MY_P} + DO_AUTORECONF="true" +fi + +inherit eutils flag-o-matic multiprocessing 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 doc 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, ia64: + efi-64 +) +IUSE+=" ${GRUB_PLATFORMS[@]/#/grub_platforms_}" + +REQUIRED_USE="grub_platforms_qemu? ( truetype ) + grub_platforms_yeeloong? ( truetype )" + +# os-prober: Used on runtime to detect other OSes +# xorriso (dev-libs/libisoburn): Used on runtime for mkrescue +RDEPEND=" + app-arch/xz-utils + >=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/dejavu + >=media-fonts/unifont-5 + ) + ppc? ( sys-apps/ibm-powerpc-utils sys-apps/powerpc-utils ) + ppc64? ( sys-apps/ibm-powerpc-utils sys-apps/powerpc-utils ) +" +DEPEND="${RDEPEND} + >=dev-lang/python-2.5.2 + sys-devel/flex + sys-devel/bison + sys-apps/help2man + sys-apps/texinfo + static? ( + truetype? ( + app-arch/bzip2[static-libs(+)] + media-libs/freetype[static-libs(+)] + sys-libs/zlib[static-libs(+)] + ) + ) +" +RDEPEND+=" + kernel_linux? ( + grub_platforms_efi-32? ( sys-boot/efibootmgr ) + grub_platforms_efi-64? ( sys-boot/efibootmgr ) + ) +" +if [[ -n ${DO_AUTORECONF} ]] ; then + DEPEND+=" >=sys-devel/autogen-5.10" +fi +if [[ ${PV} != 9999 ]]; then + 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 with_platform= + local enable_efiemu="--disable-efiemu" + + [[ -z ${platform} ]] && die "${FUNCNAME} [platform]" + + # Used below for efi cross-building + tc-export CC NM OBJCOPY STRIP + + estack_push CTARGET "${CTARGET}" + estack_push TARGET_CC "${TARGET_CC}" + estack_push TARGET_CFLAGS "${TARGET_CFLAGS}" + estack_push TARGET_CPPFLAGS "${TARGET_CPPFLAGS}" + + case ${platform} in + efi-32) + if [[ ${CHOST} == x86_64* ]]; then + CTARGET="${CTARGET:-i386}" + TARGET_CC="${TARGET_CC:-${CC}}" + export TARGET_CC + fi + with_platform="--with-platform=efi" + ;; + efi-64) + if [[ ${CHOST} == i?86* ]]; then + CTARGET="${CTARGET:-x86_64}" + TARGET_CC="${TARGET_CC:-${CC}}" + TARGET_CFLAGS="-Os -march=x86-64 ${TARGET_CFLAGS}" + TARGET_CPPFLAGS="-march=x86-64 ${TARGET_CPPFLAGS}" + export TARGET_CC TARGET_CFLAGS TARGET_CPPFLAGS + fi + with_platform="--with-platform=efi" + ;; + guessed) ;; + *) + with_platform="--with-platform=${platform}" + case ${CTARGET:-${CHOST}} in + i?86*|x86_64*) + enable_efiemu=$(use_enable efiemu) + ;; + esac + ;; + esac + + ECONF_SOURCE="${S}" \ + econf \ + --libdir=/usr/lib \ + --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \ + --disable-werror \ + --program-prefix= \ + --program-transform-name="s,grub,grub2," \ + --with-grubdir=grub2 \ + ${with_platform} \ + $(use_enable debug mm-debug) \ + $(use_enable debug grub-emu-usb) \ + $(use_enable device-mapper) \ + ${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) + + estack_pop CTARGET CTARGET || die + estack_pop TARGET_CC TARGET_CC || die + estack_pop TARGET_CFLAGS TARGET_CFLAGS || die + estack_pop TARGET_CPPFLAGS TARGET_CPPFLAGS || die +} + +grub_src_compile() { + default_src_compile + pax-mark -mpes "${grub_binaries[@]}" +} + +grub_build_docs() { + emake -C docs html +} + +grub_src_install() { + default_src_install +} + +grub_install_docs() { + emake -C docs DESTDIR="${D}" install-html +} + +pkg_pretend() { + if [[ ${MERGE_TYPE} != binary ]]; then + # Bug 439082 + if $(tc-getLD) --version | grep -q "GNU gold"; then + eerror "GRUB does not function correctly when built with the gold linker." + eerror "Please select the bfd linker with binutils-config." + die "GNU gold detected" + fi + fi +} + +src_prepare() { + if [[ ${PV} != 9999 ]]; then + epatch "${FILESDIR}/${P}-parallel-make.patch" #424231 + epatch "${FILESDIR}/${P}-no-gets.patch" #424703 + epatch "${FILESDIR}/${P}-config-quoting.patch" #426364 + epatch "${FILESDIR}/${P}-tftp-endian.patch" # 438612 + epatch "${FILESDIR}/${P}-hardcoded-awk.patch" #424137 + epatch "${FILESDIR}/${P}-freebsd.patch" #442050 + epatch "${FILESDIR}/${P}-compression.patch" #424527 + fi + + # fix texinfo file name, bug 416035 + sed -i \ + -e 's/^\* GRUB:/* GRUB2:/' \ + -e 's/(grub)/(grub2)/' -- \ + "${S}"/docs/grub.texi + + epatch_user + + # autogen.sh does more than just run autotools + if [[ -n ${DO_AUTORECONF} ]] ; then + sed -i -e '/^autoreconf/s:^:set +e; e:' autogen.sh || die + ( + autopoint() { :; } + . ./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="" + local i + 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 CCASFLAGS CFLAGS CPPFLAGS LDFLAGS + use static && append-ldflags -static + use elibc_FreeBSD && append-cppflags "-isystem /usr/include" + + # Sandbox bug 404013. + use libzfs && addpredict /etc/dfs:/dev/zfs + + multijob_init + for i in ${GRUB_ENABLED_PLATFORMS}; do + multijob_child_init grub_run_phase ${FUNCNAME} ${i} + done + multijob_finish || die +} + +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 + + # Just build docs once + use doc && grub_run_phase build_docs ${i} +} + +src_install() { + local i + + for i in ${GRUB_ENABLED_PLATFORMS}; do + grub_run_phase ${FUNCNAME} ${i} + done + + use doc && grub_run_phase install_docs ${i} + + 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-2 grub +} + +pkg_postinst() { + # display the link to guide + elog "For information on how to configure grub-2 please refer to the guide:" + elog " http://wiki.gentoo.org/wiki/GRUB2_Quick_Start" + if ! has_version sys-boot/os-prober; then + elog "Install sys-boot/os-prober to enable detection of other operating systems using grub2-mkconfig." + fi + if ! has_version dev-libs/libisoburn; then + elog "Install dev-libs/libisoburn to enable creation of rescue media using grub2-mkrescue." + fi + if has_version sys-boot/grub:0; then + ewarn "If you want to keep GRUB Legacy (grub-0.97) installed, please run" + ewarn "the following to add sys-boot/grub:0 to your world file." + ewarn "emerge --noreplace sys-boot/grub:0" + fi +} diff --git a/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-2.00-r2.ebuild b/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-2.00-r2.ebuild new file mode 100644 index 0000000000..d8bc8a96c7 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-2.00-r2.ebuild @@ -0,0 +1,349 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-2.00-r2.ebuild,v 1.2 2013/02/03 22:39:46 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* || ${PV} == *_rc* ]]; then + SRC_URI="mirror://gnu-alpha/${PN}/${MY_P}.tar.xz" + else + SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.xz + mirror://gentoo/${MY_P}.tar.xz" + fi + KEYWORDS="~amd64 ~x86" + S=${WORKDIR}/${MY_P} + DO_AUTORECONF="true" +fi + +inherit eutils flag-o-matic multiprocessing 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 doc 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, ia64: + efi-64 +) +IUSE+=" ${GRUB_PLATFORMS[@]/#/grub_platforms_}" + +REQUIRED_USE="grub_platforms_qemu? ( truetype )" + +# os-prober: Used on runtime to detect other OSes +# xorriso (dev-libs/libisoburn): Used on runtime for mkrescue +RDEPEND=" + app-arch/xz-utils + >=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/dejavu + >=media-fonts/unifont-5 + ) + ppc? ( sys-apps/ibm-powerpc-utils sys-apps/powerpc-utils ) + ppc64? ( sys-apps/ibm-powerpc-utils sys-apps/powerpc-utils ) +" +DEPEND="${RDEPEND} + >=dev-lang/python-2.5.2 + sys-devel/flex + sys-devel/bison + sys-apps/help2man + sys-apps/texinfo + static? ( + truetype? ( + app-arch/bzip2[static-libs(+)] + media-libs/freetype[static-libs(+)] + sys-libs/zlib[static-libs(+)] + ) + ) +" +RDEPEND+=" + grub_platforms_efi-32? ( sys-boot/efibootmgr ) + grub_platforms_efi-64? ( sys-boot/efibootmgr ) +" +if [[ -n ${DO_AUTORECONF} ]] ; then + DEPEND+=" >=sys-devel/autogen-5.10" +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 with_platform= + local enable_efiemu="--disable-efiemu" + + [[ -z ${platform} ]] && die "${FUNCNAME} [platform]" + + # Used below for efi cross-building + tc-export CC NM OBJCOPY STRIP + + estack_push CTARGET "${CTARGET}" + estack_push TARGET_CC "${TARGET_CC}" + estack_push TARGET_CFLAGS "${TARGET_CFLAGS}" + estack_push TARGET_CPPFLAGS "${TARGET_CPPFLAGS}" + + case ${platform} in + efi-32) + if [[ ${CHOST} == x86_64* ]]; then + CTARGET="${CTARGET:-i386}" + TARGET_CC="${TARGET_CC:-${CC}}" + export TARGET_CC + fi + with_platform="--with-platform=efi" + ;; + efi-64) + if [[ ${CHOST} == i?86* ]]; then + CTARGET="${CTARGET:-x86_64}" + TARGET_CC="${TARGET_CC:-${CC}}" + TARGET_CFLAGS="-Os -march=x86-64 ${TARGET_CFLAGS}" + TARGET_CPPFLAGS="-march=x86-64 ${TARGET_CPPFLAGS}" + export TARGET_CC TARGET_CFLAGS TARGET_CPPFLAGS + fi + with_platform="--with-platform=efi" + ;; + guessed) ;; + *) + with_platform="--with-platform=${platform}" + case ${CTARGET:-${CHOST}} in + i?86*|x86_64*) + enable_efiemu=$(use_enable efiemu) + ;; + esac + ;; + esac + + ECONF_SOURCE="${S}" \ + econf \ + --libdir=/usr/lib \ + --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \ + --disable-werror \ + --program-prefix= \ + --program-transform-name="s,grub,grub2," \ + --with-grubdir=grub2 \ + ${with_platform} \ + $(use_enable debug mm-debug) \ + $(use_enable debug grub-emu-usb) \ + $(use_enable device-mapper) \ + ${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) + + estack_pop CTARGET CTARGET || die + estack_pop TARGET_CC TARGET_CC || die + estack_pop TARGET_CFLAGS TARGET_CFLAGS || die + estack_pop TARGET_CPPFLAGS TARGET_CPPFLAGS || die +} + +grub_src_compile() { + default_src_compile + pax-mark -mpes "${grub_binaries[@]}" +} + +grub_build_docs() { + emake -C docs html +} + +grub_src_install() { + default_src_install +} + +grub_install_docs() { + emake -C docs DESTDIR="${D}" install-html +} + +pkg_pretend() { + if [[ ${MERGE_TYPE} != binary ]]; then + # Bug 439082 + if $(tc-getLD) --version | grep -q "GNU gold"; then + eerror "GRUB does not function correctly when built with the gold linker." + eerror "Please select the bfd linker with binutils-config." + die "GNU gold detected" + fi + fi +} + +src_prepare() { + if [[ ${PV} != 9999 ]]; then + epatch "${FILESDIR}/${P}-parallel-make.patch" #424231 + epatch "${FILESDIR}/${P}-no-gets.patch" #424703 + epatch "${FILESDIR}/${P}-config-quoting.patch" #426364 + epatch "${FILESDIR}/${P}-tftp-endian.patch" # 438612 + epatch "${FILESDIR}/${P}-hardcoded-awk.patch" #424137 + epatch "${FILESDIR}/${P}-zfs-feature-flag-support.patch" #455358 + fi + + # fix texinfo file name, bug 416035 + sed -i \ + -e 's/^\* GRUB:/* GRUB2:/' \ + -e 's/(grub)/(grub2)/' -- \ + "${S}"/docs/grub.texi + + epatch_user + + # autogen.sh does more than just run autotools + if [[ -n ${DO_AUTORECONF} ]] ; then + sed -i -e '/^autoreconf/s:^:set +e; e:' autogen.sh || die + ( + autopoint() { :; } + . ./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="" + local i + 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 CCASFLAGS CFLAGS CPPFLAGS LDFLAGS + use static && append-ldflags -static + + # Sandbox bug 404013. + use libzfs && addpredict /etc/dfs:/dev/zfs + + multijob_init + for i in ${GRUB_ENABLED_PLATFORMS}; do + multijob_child_init grub_run_phase ${FUNCNAME} ${i} + done + multijob_finish || die +} + +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 + + # Just build docs once + use doc && grub_run_phase build_docs ${i} +} + +src_install() { + local i + + for i in ${GRUB_ENABLED_PLATFORMS}; do + grub_run_phase ${FUNCNAME} ${i} + done + + use doc && grub_run_phase install_docs ${i} + + 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-2 grub +} + +pkg_postinst() { + # display the link to guide + elog "For information on how to configure grub-2 please refer to the guide:" + elog " http://wiki.gentoo.org/wiki/GRUB2_Quick_Start" + if ! has_version sys-boot/os-prober; then + elog "Install sys-boot/os-prober to enable detection of other operating systems using grub2-mkconfig." + fi + if ! has_version dev-libs/libisoburn; then + elog "Install dev-libs/libisoburn to enable creation of rescue media using grub2-mkrescue." + fi + if has_version sys-boot/grub:0; then + ewarn "If you want to keep GRUB Legacy (grub-0.97) installed, please run" + ewarn "the following to add sys-boot/grub:0 to your world file." + ewarn "emerge --noreplace sys-boot/grub:0" + fi +} diff --git a/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-2.00_beta6.ebuild b/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-2.00_beta6.ebuild new file mode 100644 index 0000000000..cab3bd99ce --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-2.00_beta6.ebuild @@ -0,0 +1,292 @@ +# 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_beta6.ebuild,v 1.1 2012/06/02 16:06:48 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="mirror://gnu-alpha/${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, ia64: + 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/lzo + >=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 + ) + ppc? ( sys-apps/ibm-powerpc-utils sys-apps/powerpc-utils ) + ppc64? ( sys-apps/ibm-powerpc-utils sys-apps/powerpc-utils ) +" +DEPEND="${RDEPEND} + >=dev-lang/python-2.5.2 + sys-devel/flex + virtual/yacc + sys-apps/texinfo + static? ( + truetype? ( + app-arch/bzip2[static-libs(+)] + media-libs/freetype[static-libs(+)] + sys-libs/zlib[static-libs(+)] + ) + ) +" +RDEPEND+=" + grub_platforms_efi-32? ( sys-boot/efibootmgr ) + grub_platforms_efi-64? ( sys-boot/efibootmgr ) +" +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 with_platform= + + [[ -z ${platform} ]] && die "${FUNCNAME} [platform]" + + # Used below for efi cross-building + tc-export CC NM OBJCOPY STRIP + + estack_push CTARGET "${CTARGET}" + estack_push TARGET_CC "${TARGET_CC}" + estack_push TARGET_CFLAGS "${TARGET_CFLAGS}" + estack_push TARGET_CPPFLAGS "${TARGET_CPPFLAGS}" + + case ${platform} in + efi-32) + if [[ ${CHOST} == x86_64* ]]; then + CTARGET="${CTARGET:-i386}" + TARGET_CC="${TARGET_CC:-${CC}}" + export TARGET_CC + fi + with_platform="--with-platform=efi" + ;; + efi-64) + if [[ ${CHOST} == i?86* ]]; then + CTARGET="${CTARGET:-x86_64}" + TARGET_CC="${TARGET_CC:-${CC}}" + TARGET_CFLAGS="-Os -march=x86-64 ${TARGET_CFLAGS}" + TARGET_CPPFLAGS="-march=x86-64 ${TARGET_CPPFLAGS}" + export TARGET_CC TARGET_CFLAGS TARGET_CPPFLAGS + fi + with_platform="--with-platform=efi" + ;; + guessed) ;; + *) with_platform="--with-platform=${platform}" ;; + esac + + ECONF_SOURCE="${S}" \ + econf \ + --disable-werror \ + --program-prefix= \ + --program-transform-name="s,grub,grub2," \ + --with-grubdir=grub2 \ + ${with_platform} \ + $(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) + + estack_pop CTARGET CTARGET || die + estack_pop TARGET_CC TARGET_CC || die + estack_pop TARGET_CFLAGS TARGET_CFLAGS || die + estack_pop TARGET_CPPFLAGS TARGET_CPPFLAGS || die +} + +grub_src_compile() { + default_src_compile + pax-mark -mpes "${grub_binaries[@]}" +} + +grub_src_install() { + default_src_install +} + +src_prepare() { + local i j + + # fix texinfo file name, bug 416035 + sed -i \ + -e 's/^\* GRUB:/* GRUB2:/' \ + -e 's/(grub)/(grub2)/' -- \ + "${S}"/docs/grub.texi + + epatch_user + + # 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://wiki.gentoo.org/wiki/GRUB2_Quick_Start" + if ! has_version sys-boot/os-prober; then + elog "Install sys-boot/os-prober to enable detection of other operating systems using grub2-mkconfig." + fi + if ! has_version dev-libs/libisoburn; then + elog "Install dev-libs/libisoburn to enable creation of rescue media using grub2-mkrescue." + fi +} diff --git a/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-9999.ebuild b/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-9999.ebuild new file mode 100644 index 0000000000..db2e902b84 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-boot/grub/grub-9999.ebuild @@ -0,0 +1,348 @@ +# 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.85 2012/10/20 21:46:34 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* || ${PV} == *_rc* ]]; then + SRC_URI="mirror://gnu-alpha/${PN}/${MY_P}.tar.xz" + else + SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.xz + mirror://gentoo/${MY_P}.tar.xz" + fi + KEYWORDS="~amd64 ~x86" + S=${WORKDIR}/${MY_P} + DO_AUTORECONF="true" +fi + +inherit eutils flag-o-matic multiprocessing 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 doc 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, ia64: + efi-64 +) +IUSE+=" ${GRUB_PLATFORMS[@]/#/grub_platforms_}" + +REQUIRED_USE="grub_platforms_qemu? ( truetype )" + +# os-prober: Used on runtime to detect other OSes +# xorriso (dev-libs/libisoburn): Used on runtime for mkrescue +RDEPEND=" + app-arch/xz-utils + >=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/dejavu + >=media-fonts/unifont-5 + ) + ppc? ( sys-apps/ibm-powerpc-utils sys-apps/powerpc-utils ) + ppc64? ( sys-apps/ibm-powerpc-utils sys-apps/powerpc-utils ) +" +DEPEND="${RDEPEND} + >=dev-lang/python-2.5.2 + sys-devel/flex + sys-devel/bison + sys-apps/help2man + sys-apps/texinfo + static? ( + truetype? ( + app-arch/bzip2[static-libs(+)] + media-libs/freetype[static-libs(+)] + sys-libs/zlib[static-libs(+)] + ) + ) +" +RDEPEND+=" + grub_platforms_efi-32? ( sys-boot/efibootmgr ) + grub_platforms_efi-64? ( sys-boot/efibootmgr ) +" +if [[ -n ${DO_AUTORECONF} ]] ; then + DEPEND+=" >=sys-devel/autogen-5.10" +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 with_platform= + local enable_efiemu="--disable-efiemu" + + [[ -z ${platform} ]] && die "${FUNCNAME} [platform]" + + # Used below for efi cross-building + tc-export CC NM OBJCOPY STRIP + + estack_push CTARGET "${CTARGET}" + estack_push TARGET_CC "${TARGET_CC}" + estack_push TARGET_CFLAGS "${TARGET_CFLAGS}" + estack_push TARGET_CPPFLAGS "${TARGET_CPPFLAGS}" + + case ${platform} in + efi-32) + if [[ ${CHOST} == x86_64* ]]; then + CTARGET="${CTARGET:-i386}" + TARGET_CC="${TARGET_CC:-${CC}}" + export TARGET_CC + fi + with_platform="--with-platform=efi" + ;; + efi-64) + if [[ ${CHOST} == i?86* ]]; then + CTARGET="${CTARGET:-x86_64}" + TARGET_CC="${TARGET_CC:-${CC}}" + TARGET_CFLAGS="-Os -march=x86-64 ${TARGET_CFLAGS}" + TARGET_CPPFLAGS="-march=x86-64 ${TARGET_CPPFLAGS}" + export TARGET_CC TARGET_CFLAGS TARGET_CPPFLAGS + fi + with_platform="--with-platform=efi" + ;; + guessed) ;; + *) + with_platform="--with-platform=${platform}" + case ${CTARGET:-${CHOST}} in + i?86*|x86_64*) + enable_efiemu=$(use_enable efiemu) + ;; + esac + ;; + esac + + ECONF_SOURCE="${S}" \ + econf \ + --libdir=/usr/lib \ + --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \ + --disable-werror \ + --program-prefix= \ + --program-transform-name="s,grub,grub2," \ + --with-grubdir=grub2 \ + ${with_platform} \ + $(use_enable debug mm-debug) \ + $(use_enable debug grub-emu-usb) \ + $(use_enable device-mapper) \ + ${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) + + estack_pop CTARGET CTARGET || die + estack_pop TARGET_CC TARGET_CC || die + estack_pop TARGET_CFLAGS TARGET_CFLAGS || die + estack_pop TARGET_CPPFLAGS TARGET_CPPFLAGS || die +} + +grub_src_compile() { + default_src_compile + pax-mark -mpes "${grub_binaries[@]}" +} + +grub_build_docs() { + emake -C docs html +} + +grub_src_install() { + default_src_install +} + +grub_install_docs() { + emake -C docs DESTDIR="${D}" install-html +} + +pkg_pretend() { + if [[ ${MERGE_TYPE} != binary ]]; then + # Bug 439082 + if $(tc-getLD) --version | grep -q "GNU gold"; then + eerror "GRUB does not function correctly when built with the gold linker." + eerror "Please select the bfd linker with binutils-config." + die "GNU gold detected" + fi + fi +} + +src_prepare() { + if [[ ${PV} != 9999 ]]; then + epatch "${FILESDIR}/${P}-parallel-make.patch" #424231 + epatch "${FILESDIR}/${P}-no-gets.patch" #424703 + epatch "${FILESDIR}/${P}-config-quoting.patch" #426364 + epatch "${FILESDIR}/${P}-tftp-endian.patch" # 438612 + epatch "${FILESDIR}/${P}-hardcoded-awk.patch" #424137 + fi + + # fix texinfo file name, bug 416035 + sed -i \ + -e 's/^\* GRUB:/* GRUB2:/' \ + -e 's/(grub)/(grub2)/' -- \ + "${S}"/docs/grub.texi + + epatch_user + + # autogen.sh does more than just run autotools + if [[ -n ${DO_AUTORECONF} ]] ; then + sed -i -e '/^autoreconf/s:^:set +e; e:' autogen.sh || die + ( + autopoint() { :; } + . ./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="" + local i + 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 CCASFLAGS CFLAGS CPPFLAGS LDFLAGS + use static && append-ldflags -static + + # Sandbox bug 404013. + use libzfs && addpredict /etc/dfs:/dev/zfs + + multijob_init + for i in ${GRUB_ENABLED_PLATFORMS}; do + multijob_child_init grub_run_phase ${FUNCNAME} ${i} + done + multijob_finish || die +} + +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 + + # Just build docs once + use doc && grub_run_phase build_docs ${i} +} + +src_install() { + local i + + for i in ${GRUB_ENABLED_PLATFORMS}; do + grub_run_phase ${FUNCNAME} ${i} + done + + use doc && grub_run_phase install_docs ${i} + + 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-2 grub +} + +pkg_postinst() { + # display the link to guide + elog "For information on how to configure grub-2 please refer to the guide:" + elog " http://wiki.gentoo.org/wiki/GRUB2_Quick_Start" + if ! has_version sys-boot/os-prober; then + elog "Install sys-boot/os-prober to enable detection of other operating systems using grub2-mkconfig." + fi + if ! has_version dev-libs/libisoburn; then + elog "Install dev-libs/libisoburn to enable creation of rescue media using grub2-mkrescue." + fi + if has_version sys-boot/grub:0; then + ewarn "If you want to keep GRUB Legacy (grub-0.97) installed, please run" + ewarn "the following to add sys-boot/grub:0 to your world file." + ewarn "emerge --noreplace sys-boot/grub:0" + fi +} diff --git a/sdk_container/src/third_party/portage-stable/sys-boot/grub/metadata.xml b/sdk_container/src/third_party/portage-stable/sys-boot/grub/metadata.xml new file mode 100644 index 0000000000..2cf8c3a38a --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-boot/grub/metadata.xml @@ -0,0 +1,26 @@ + + + +base-system + + base-system@gentoo.org + + + floppym@gentoo.org + Mike Gilbert + + + + Enable support for sys-fs/device-mapper + + + Build and install the efiemu runtimes + + + Build and install the grub-mount utility + + + Enable support for sys-fs/zfs + + +