diff --git a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.use b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.use index 10ac33cbb7..064cd58fe7 100644 --- a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.use +++ b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.use @@ -59,7 +59,7 @@ dev-lang/spidermonkey minimal dev-libs/glib -mime # keep grub build simple -sys-boot/grub -multislot -nls +sys-boot/grub -multislot -nls -themes # disable "high performance ssh" patch, turn on kerberos net-misc/openssh -hpn kerberos diff --git a/sdk_container/src/third_party/coreos-overlay/sys-boot/grub/Manifest b/sdk_container/src/third_party/coreos-overlay/sys-boot/grub/Manifest index 684b061769..1717bac8ab 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-boot/grub/Manifest +++ b/sdk_container/src/third_party/coreos-overlay/sys-boot/grub/Manifest @@ -1,3 +1,2 @@ -DIST dejavu-sans-ttf-2.34.zip 406977 SHA256 242e8c1cb2bdc7458bece02cca898f962c2bc919dcf67d97428149228290184d SHA512 dcd802b9c83cfa749b7542d0855eb1facb665a035af8c05f58830fce3ce37ba8d4a6f0353c07ae924c7fc25460d330b7312cbaffd34a2cb314a8e222de385c1b WHIRLPOOL d8b3289997cc39aca1c909ac1cae79727a19932f07b116a4a0bcc83e4a2f136d05d18c8ef2b05504a2f1f65eba85f93d61d52b0c913be7bb3e23f6a403eb6a82 -DIST grub-2.02~beta2_p20140825.tar.gz 6747194 SHA256 b867af0d7a6ba5848a2d1b24a654303739896e87e96f6a4e8ec6ebcfaa505bbc SHA512 c6a8b72848530c33dea005d045f583ad352b7a59a0af75bc85954441849959c217ed285e9404522ea4c46d9c28e276c2f0d48343e5f6f169eb8eed7135049e54 WHIRLPOOL b6cbca1d3da979fa17d530e7a7de7a9bc0fa32c14e69f8ad217542b248a32dcc1212e604e5784f15663b6b9e5be3933d9cd8c99b183ff2245efa49c2862c3aa2 -DIST unifont-7.0.05.pcf.gz 1359030 SHA256 c897bc3796b1c460d13fbed1d6d800027886405efa3715a31275183d3f85ce91 SHA512 d75d810521306e912228e10d7e08749392ade4b9f35199fa43694c57779054f152ba9b30ce6c3b3bd9bb925f60aebbb99f00d3448ed039e748e0353c787d9336 WHIRLPOOL 1af9cb9b6b3a4c46e596228d3231ef160300b0a5545c3e091eaceeb2b522ac1b25721f17f7f2f742a5a1ab92ccedebf4fe2649260284ab208dbd8696fa69594c +DIST dejavu-sans-ttf-2.37.zip 417746 SHA256 5c6e497a2f36552cb5ffb112c413a6af39c0f3c47653662b90b4fa6499822fd7 SHA512 ede5899daa1984c5aa8cacb1c850eb53f189dddef3d9bb78bf9774d8976b7c0d6eb0bcf86237cd7d11f5b36cf5b5058d42cd94d3bd76f2bd0931c7ceb1271fae WHIRLPOOL 6f19280e76ea3efe265db09236e94bdd00268c5d8742c191100b8eb19faa532289fb03d838e33aa3c501d8a3243db248648af8929d5d5dba1bfd2ea2c10358cd +DIST unifont-9.0.06.pcf.gz 1360354 SHA256 6d23e82ea3fd3d79849d675c0c30129b62a3973a83b4cdc05f9994efef773b86 SHA512 dd0a1afa72f5204c62055d83f22750c74af38ffafdb8eda8e1f1cf7292e572a14969b8a9a6a2cb336d5bed4ab633f6b5a962c59117a590e4238788959cb82774 WHIRLPOOL 3153fe2a254cffa5aac6c5915468262bf60f993ce5a2aa47885ccef2a6714e205724b01fd9d26d499b9efbc5213e3cea0037c91f17fb2ae780ee289cab0de69b diff --git a/sdk_container/src/third_party/coreos-overlay/sys-boot/grub/grub-2.02.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-boot/grub/grub-2.02-r1.ebuild similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/sys-boot/grub/grub-2.02.ebuild rename to sdk_container/src/third_party/coreos-overlay/sys-boot/grub/grub-2.02-r1.ebuild diff --git a/sdk_container/src/third_party/coreos-overlay/sys-boot/grub/grub-9999.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-boot/grub/grub-9999.ebuild index c7602cd7d0..e02f36f0fd 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-boot/grub/grub-9999.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/sys-boot/grub/grub-9999.ebuild @@ -1,52 +1,51 @@ -# Copyright 1999-2014 Gentoo Foundation +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-9999-r1.ebuild,v 1.21 2014/10/19 01:51:58 floppym Exp $ -EAPI=5 +EAPI=6 + CROS_WORKON_PROJECT="coreos/grub" CROS_WORKON_REPO="git://github.com" -AUTOTOOLS_AUTORECONF=1 -GRUB_AUTOGEN=1 -PYTHON_COMPAT=( python{2_6,2_7,3_2,3_3,3_4} ) +GRUB_AUTOGEN=1 # We start from Git, so always autogen. -if [[ "${PV}" == 9999 ]]; then +if [[ ${PV} == 9999 ]]; then KEYWORDS="~amd64 ~arm64 ~x86" else - CROS_WORKON_COMMIT="6782f6d431d22b4e9ab14e94d263795c7991e160" + CROS_WORKON_COMMIT="84a4fd2f4c35a45b66a6ca4ef455d999f8b05b55" KEYWORDS="amd64 arm64 x86" fi +inherit cros-workon -inherit cros-workon autotools-utils bash-completion-r1 eutils flag-o-matic mount-boot multibuild pax-utils python-any-r1 toolchain-funcs versionator +if [[ -n ${GRUB_AUTOGEN} ]]; then + PYTHON_COMPAT=( python{2_7,3_3,3_4,3_5} ) + WANT_LIBTOOL=none + inherit autotools python-any-r1 +fi -DEJAVU=dejavu-sans-ttf-2.34 -UNIFONT=unifont-7.0.05 -SRC_URI+=" mirror://gnu/unifont/${UNIFONT}/${UNIFONT}.pcf.gz - truetype? ( mirror://sourceforge/dejavu/${DEJAVU}.zip )" +inherit autotools bash-completion-r1 flag-o-matic multibuild pax-utils toolchain-funcs versionator +DEJAVU=dejavu-sans-ttf-2.37 +UNIFONT=unifont-9.0.06 +SRC_URI+=" fonts? ( mirror://gnu/unifont/${UNIFONT}/${UNIFONT}.pcf.gz ) + themes? ( mirror://sourceforge/dejavu/${DEJAVU}.zip )" DESCRIPTION="GNU GRUB boot loader" -HOMEPAGE="http://www.gnu.org/software/grub/" +HOMEPAGE="https://www.gnu.org/software/grub/" # Includes licenses for dejavu and unifont -LICENSE="GPL-3 truetype? ( BitstreamVera GPL-2-with-font-exception )" +LICENSE="GPL-3 fonts? ( GPL-2-with-font-exception ) themes? ( BitstreamVera )" SLOT="2/${PVR}" -IUSE="debug device-mapper doc efiemu mount +multislot nls static sdl test truetype libzfs" +IUSE="debug device-mapper doc efiemu +fonts mount multislot nls static sdl test +themes truetype libzfs" -GRUB_ALL_PLATFORMS=( - # everywhere: - emu - # mips only: - qemu-mips loongson - # amd64, x86, ppc, ppc64: - ieee1275 - # amd64, x86: - coreboot multiboot efi-32 pc qemu xen - # amd64, ia64: - efi-64 - # arm64: - arm64 -) +GRUB_ALL_PLATFORMS=( coreboot efi-32 efi-64 emu ieee1275 loongson multiboot qemu qemu-mips pc uboot xen xen-32 ) +GRUB_ALL_PLATFORMS+=( arm64 ) # Tack on arm64 for pulling in the cross-compiler. IUSE+=" ${GRUB_ALL_PLATFORMS[@]/#/grub_platforms_}" +REQUIRED_USE=" + grub_platforms_coreboot? ( fonts ) + grub_platforms_qemu? ( fonts ) + grub_platforms_ieee1275? ( fonts ) + grub_platforms_loongson? ( fonts ) +" + # os-prober: Used on runtime to detect other OSes # xorriso (dev-libs/libisoburn): Used on runtime for mkrescue RDEPEND=" @@ -69,10 +68,6 @@ DEPEND="${RDEPEND} sys-devel/bison sys-apps/help2man sys-apps/texinfo - grub_platforms_coreboot? ( media-libs/freetype:2 ) - grub_platforms_qemu? ( media-libs/freetype:2 ) - grub_platforms_ieee1275? ( media-libs/freetype:2 ) - grub_platforms_loongson? ( media-libs/freetype:2 ) grub_platforms_arm64? ( cross-aarch64-cros-linux-gnu/gcc ) static? ( app-arch/xz-utils[static-libs(+)] @@ -83,59 +78,42 @@ DEPEND="${RDEPEND} ) ) test? ( - dev-libs/libisoburn - sys-fs/squashfs-tools[lzo,xz] + app-admin/genromfs + app-arch/cpio + app-arch/lzop grub_platforms_efi-64? ( app-emulation/qemu[qemu_softmmu_targets_x86_64] ) grub_platforms_pc? ( app-emulation/qemu[qemu_softmmu_targets_i386] ) grub_platforms_arm64? ( app-emulation/qemu[qemu_softmmu_targets_aarch64] ) + dev-libs/libisoburn + sys-apps/miscfiles + sys-block/parted + sys-fs/squashfs-tools[lzo,xz] + ) + themes? ( + app-arch/unzip + media-libs/freetype:2 ) - truetype? ( app-arch/unzip ) " RDEPEND+=" kernel_linux? ( grub_platforms_efi-32? ( sys-boot/efibootmgr ) grub_platforms_efi-64? ( sys-boot/efibootmgr ) ) - !multislot? ( !sys-boot/grub:0 ) + !multislot? ( !sys-boot/grub:0 !sys-boot/grub-static ) nls? ( sys-devel/gettext ) " -STRIP_MASK="*/grub/*/*.{mod,img}" -RESTRICT="test" +DEPEND+=" !!=media-libs/freetype-2.5.4" -QA_EXECSTACK=" - usr/bin/grub*-emu* - usr/lib*/grub/*/*.mod - usr/lib*/grub/*/*.module - usr/lib*/grub/*/kernel.exec - usr/lib*/grub/*/kernel.img -" +RESTRICT="strip !test? ( test )" -QA_WX_LOAD=" - usr/lib*/grub/*/kernel.exec - usr/lib*/grub/*/kernel.img - usr/lib*/grub/*/*.image -" - -QA_PRESTRIPPED=" - usr/lib.*/grub/.*/kernel.img -" - -pkg_pretend() { - if [[ ${MERGE_TYPE} != binary ]]; then - # Bug 439082 - if ! version_is_at_least 4.8 "$(gcc-version)" && - $(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 -} +QA_EXECSTACK="usr/bin/grub*-emu* usr/lib/grub/*" +QA_WX_LOAD="usr/lib/grub/*" +QA_MULTILIB_PATHS="usr/lib/grub/.*" src_unpack() { cros-workon_src_unpack - default_src_unpack + default } src_prepare() { @@ -146,51 +124,56 @@ src_prepare() { sed -i -e 's/^\* GRUB:/* GRUB2:/' -e 's/(grub)/(grub2)/' docs/grub.texi || die fi - epatch_user + # Nothing in Gentoo packages 'american-english' in the exact path + # wanted for the test, but all that is needed is a compressible text + # file, and we do have 'words' from miscfiles in the same path. + sed -i \ + -e '/CFILESSRC.*=/s,american-english,words,' \ + tests/util/grub-fs-tester.in \ + || die + + eapply_user if [[ -n ${GRUB_AUTOGEN} ]]; then python_setup bash autogen.sh || die - fi - - if [[ -n ${AUTOTOOLS_AUTORECONF} ]]; then - autopoint() { return 0; } + autopoint() { :; } eautoreconf fi } -setup_fonts() { - ln -s "${WORKDIR}/${UNIFONT}.pcf" unifont.pcf || die - if use truetype; then - ln -s "${WORKDIR}/${DEJAVU}/ttf/DejaVuSans.ttf" DejaVuSans.ttf || die - fi +grub_do() { + multibuild_foreach_variant run_in_build_dir "$@" +} + +grub_do_once() { + multibuild_for_best_variant run_in_build_dir "$@" } grub_configure() { local platform case ${MULTIBUILD_VARIANT} in - efi-32) - platform=efi + efi*) platform=efi ;; + xen*) platform=xen ;; + arm64) platform=efi ;; + guessed) ;; + *) platform=${MULTIBUILD_VARIANT} ;; + esac + + case ${MULTIBUILD_VARIANT} in + *-32) if [[ ${CTARGET:-${CHOST}} == x86_64* ]]; then local CTARGET=${CTARGET:-i386} fi ;; - efi-64) - platform=efi + *-64) if [[ ${CTARGET:-${CHOST}} == i?86* ]]; then local CTARGET=${CTARGET:-x86_64} - local TARGET_CFLAGS="-Os -march=x86-64 ${TARGET_CFLAGS}" - local TARGET_CPPFLAGS="-march=x86-64 ${TARGET_CPPFLAGS}" - export TARGET_CFLAGS TARGET_CPPFLAGS + local -x TARGET_CFLAGS="-Os -march=x86-64 ${TARGET_CFLAGS}" + local -x TARGET_CPPFLAGS="-march=x86-64 ${TARGET_CPPFLAGS}" fi ;; arm64) - # FIXME(andrejro): mixed architecture binaries are generated - # while prepallstrip uses the native strip executable. This - # causes errors trying to strip aarch64 grub modules. - platform=efi local CTARGET=aarch64-cros-linux-gnu ;; - guessed) ;; - *) platform=${MULTIBUILD_VARIANT} ;; esac local myeconfargs=( @@ -202,6 +185,7 @@ grub_configure() { $(use_enable device-mapper) $(use_enable mount grub-mount) $(use_enable nls) + $(use_enable themes grub-themes) $(use_enable truetype grub-mkfont) $(use_enable libzfs) $(use sdl && use_enable debug grub-emu-sdl) @@ -215,10 +199,14 @@ grub_configure() { myeconfargs+=( --program-transform-name="s,grub,grub2," ) fi - mkdir -p "${BUILD_DIR}" || die - run_in_build_dir setup_fonts + # Set up font symlinks + ln -s "${WORKDIR}/${UNIFONT}.pcf" unifont.pcf || die + if use themes; then + ln -s "${WORKDIR}/${DEJAVU}/ttf/DejaVuSans.ttf" DejaVuSans.ttf || die + fi - autotools-utils_src_configure + local ECONF_SOURCE="${S}" + econf "${myeconfargs[@]}" } src_configure() { @@ -234,40 +222,41 @@ src_configure() { use static && HOST_LDFLAGS+=" -static" - if version_is_at_least 4.8 "$(gcc-version)"; then - export TARGET_LDFLAGS+=" -fuse-ld=bfd" - fi + tc-ld-disable-gold #439082 #466536 #526348 + export TARGET_LDFLAGS="${TARGET_LDFLAGS} ${LDFLAGS}" + unset LDFLAGS - tc-export CC NM OBJCOPY STRIP + tc-export CC NM OBJCOPY RANLIB STRIP tc-export BUILD_CC # Bug 485592 - # Portage will take care of cleaning up GRUB_PLATFORMS - MULTIBUILD_VARIANTS=( ${GRUB_PLATFORMS:-guessed} ) - multibuild_parallel_foreach_variant grub_configure + MULTIBUILD_VARIANTS=() + local p + for p in "${GRUB_ALL_PLATFORMS[@]}"; do + use "grub_platforms_${p}" && MULTIBUILD_VARIANTS+=( "${p}" ) + done + [[ ${#MULTIBUILD_VARIANTS[@]} -eq 0 ]] && MULTIBUILD_VARIANTS=( guessed ) + grub_do grub_configure } src_compile() { # Sandbox bug 404013. use libzfs && addpredict /etc/dfs:/dev/zfs - multibuild_foreach_variant autotools-utils_src_compile - - use doc && multibuild_for_best_variant \ - autotools-utils_src_compile -C docs html + grub_do emake + use doc && grub_do_once emake -C docs html } src_test() { # The qemu dependency is a bit complex. # You will need to adjust QEMU_SOFTMMU_TARGETS to match the cpu/platform. - multibuild_foreach_variant autotools-utils_src_test + grub_do emake check } src_install() { - multibuild_foreach_variant autotools-utils_src_install \ - bashcompletiondir="$(get_bashcompdir)" + grub_do emake install DESTDIR="${D}" bashcompletiondir="$(get_bashcompdir)" + use doc && grub_do_once emake -C docs install-html DESTDIR="${D}" - use doc && multibuild_for_best_variant run_in_build_dir \ - emake -C docs DESTDIR="${D}" install-html + einstalldocs if use multislot; then mv "${ED%/}"/usr/share/info/grub{,2}.info || die @@ -278,34 +267,19 @@ src_install() { } pkg_postinst() { - mount-boot_mount_boot_partition - - if [[ -e "${ROOT%/}/boot/grub2/grub.cfg" ]]; then - ewarn "The grub directory has changed from /boot/grub2 to /boot/grub." - ewarn "Please run grub2-install and grub2-mkconfig -o /boot/grub/grub.cfg." - - if [[ ! -e "${ROOT%/}/boot/grub/grub.cfg" ]]; then - mkdir -p "${ROOT%/}/boot/grub" - ln -s ../grub2/grub.cfg "${ROOT%/}/boot/grub/grub.cfg" - fi - fi - - mount-boot_pkg_postinst - elog "For information on how to configure GRUB2 please refer to the guide:" - elog " http://wiki.gentoo.org/wiki/GRUB2_Quick_Start" + elog " https://wiki.gentoo.org/wiki/GRUB2_Quick_Start" if has_version 'sys-boot/grub:0'; then elog "A migration guide for GRUB Legacy users is available:" - elog " http://www.gentoo.org/doc/en/grub2-migration.xml" + elog " https://wiki.gentoo.org/wiki/GRUB2_Migration" fi if [[ -z ${REPLACING_VERSIONS} ]]; then - 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 + elog + elog "You may consider installing the following optional packages:" + optfeature "Detect other operating systems (grub-mkconfig)" sys-boot/os-prober + optfeature "Create rescue media (grub-mkrescue)" dev-libs/libisoburn + optfeature "Enable RAID device detection" sys-fs/mdadm fi } diff --git a/sdk_container/src/third_party/coreos-overlay/sys-boot/grub/metadata.xml b/sdk_container/src/third_party/coreos-overlay/sys-boot/grub/metadata.xml index 1df6b40378..9070bcc550 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-boot/grub/metadata.xml +++ b/sdk_container/src/third_party/coreos-overlay/sys-boot/grub/metadata.xml @@ -1,36 +1,42 @@ - base-system - - base-system@gentoo.org - - - floppym@gentoo.org - Mike Gilbert - - - + + floppym@gentoo.org + Mike Gilbert + GRUB2 only - do not assign bugs related to GRUB Legacy (0.97) + + + axs@gentoo.org + Ian Stakenvicius + GRUB-Legacy only - do not assign bugs related to GRUB2 + + + base-system@gentoo.org + Gentoo Base System + + + Enable support for device-mapper from sys-fs/lvm2 - + Build and install the efiemu runtimes - Build and install fonts for the gfxterm module - + Build and install fonts for the gfxterm module + Build and install the grub-mount utility - + Enable support for sys-fs/zfs - - Allow concurrent installation of sys-boot/grub:0 and - sys-boot/grub:2 by renaming all programs. + + Allow concurrent installation of sys-boot/grub SLOT 0 and + sys-boot/grub SLOT 2 by renaming all programs. - Build and install GRUB themes (starfield) - Build and install grub-mkfont conversion utility - - - dejavu - + Build and install GRUB themes (starfield) + Build and install grub-mkfont conversion utility + + + dejavu +