mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-22 06:51:26 +02:00
sys-boot/grub: Sync and bump
This syncs the ebuild with Gentoo, while preserving cros_workon and cross-compiler targets. It also bumps the commit to include a fix for a use-after-free issue.
This commit is contained in:
parent
d757194f05
commit
11cfdef901
@ -59,7 +59,7 @@ dev-lang/spidermonkey minimal
|
|||||||
dev-libs/glib -mime
|
dev-libs/glib -mime
|
||||||
|
|
||||||
# keep grub build simple
|
# keep grub build simple
|
||||||
sys-boot/grub -multislot -nls
|
sys-boot/grub -multislot -nls -themes
|
||||||
|
|
||||||
# disable "high performance ssh" patch, turn on kerberos
|
# disable "high performance ssh" patch, turn on kerberos
|
||||||
net-misc/openssh -hpn kerberos
|
net-misc/openssh -hpn kerberos
|
||||||
|
@ -1,3 +1,2 @@
|
|||||||
DIST dejavu-sans-ttf-2.34.zip 406977 SHA256 242e8c1cb2bdc7458bece02cca898f962c2bc919dcf67d97428149228290184d SHA512 dcd802b9c83cfa749b7542d0855eb1facb665a035af8c05f58830fce3ce37ba8d4a6f0353c07ae924c7fc25460d330b7312cbaffd34a2cb314a8e222de385c1b WHIRLPOOL d8b3289997cc39aca1c909ac1cae79727a19932f07b116a4a0bcc83e4a2f136d05d18c8ef2b05504a2f1f65eba85f93d61d52b0c913be7bb3e23f6a403eb6a82
|
DIST dejavu-sans-ttf-2.37.zip 417746 SHA256 5c6e497a2f36552cb5ffb112c413a6af39c0f3c47653662b90b4fa6499822fd7 SHA512 ede5899daa1984c5aa8cacb1c850eb53f189dddef3d9bb78bf9774d8976b7c0d6eb0bcf86237cd7d11f5b36cf5b5058d42cd94d3bd76f2bd0931c7ceb1271fae WHIRLPOOL 6f19280e76ea3efe265db09236e94bdd00268c5d8742c191100b8eb19faa532289fb03d838e33aa3c501d8a3243db248648af8929d5d5dba1bfd2ea2c10358cd
|
||||||
DIST grub-2.02~beta2_p20140825.tar.gz 6747194 SHA256 b867af0d7a6ba5848a2d1b24a654303739896e87e96f6a4e8ec6ebcfaa505bbc SHA512 c6a8b72848530c33dea005d045f583ad352b7a59a0af75bc85954441849959c217ed285e9404522ea4c46d9c28e276c2f0d48343e5f6f169eb8eed7135049e54 WHIRLPOOL b6cbca1d3da979fa17d530e7a7de7a9bc0fa32c14e69f8ad217542b248a32dcc1212e604e5784f15663b6b9e5be3933d9cd8c99b183ff2245efa49c2862c3aa2
|
DIST unifont-9.0.06.pcf.gz 1360354 SHA256 6d23e82ea3fd3d79849d675c0c30129b62a3973a83b4cdc05f9994efef773b86 SHA512 dd0a1afa72f5204c62055d83f22750c74af38ffafdb8eda8e1f1cf7292e572a14969b8a9a6a2cb336d5bed4ab633f6b5a962c59117a590e4238788959cb82774 WHIRLPOOL 3153fe2a254cffa5aac6c5915468262bf60f993ce5a2aa47885ccef2a6714e205724b01fd9d26d499b9efbc5213e3cea0037c91f17fb2ae780ee289cab0de69b
|
||||||
DIST unifont-7.0.05.pcf.gz 1359030 SHA256 c897bc3796b1c460d13fbed1d6d800027886405efa3715a31275183d3f85ce91 SHA512 d75d810521306e912228e10d7e08749392ade4b9f35199fa43694c57779054f152ba9b30ce6c3b3bd9bb925f60aebbb99f00d3448ed039e748e0353c787d9336 WHIRLPOOL 1af9cb9b6b3a4c46e596228d3231ef160300b0a5545c3e091eaceeb2b522ac1b25721f17f7f2f742a5a1ab92ccedebf4fe2649260284ab208dbd8696fa69594c
|
|
||||||
|
@ -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
|
# 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_PROJECT="coreos/grub"
|
||||||
CROS_WORKON_REPO="git://github.com"
|
CROS_WORKON_REPO="git://github.com"
|
||||||
AUTOTOOLS_AUTORECONF=1
|
GRUB_AUTOGEN=1 # We start from Git, so always autogen.
|
||||||
GRUB_AUTOGEN=1
|
|
||||||
PYTHON_COMPAT=( python{2_6,2_7,3_2,3_3,3_4} )
|
|
||||||
|
|
||||||
if [[ "${PV}" == 9999 ]]; then
|
if [[ ${PV} == 9999 ]]; then
|
||||||
KEYWORDS="~amd64 ~arm64 ~x86"
|
KEYWORDS="~amd64 ~arm64 ~x86"
|
||||||
else
|
else
|
||||||
CROS_WORKON_COMMIT="6782f6d431d22b4e9ab14e94d263795c7991e160"
|
CROS_WORKON_COMMIT="84a4fd2f4c35a45b66a6ca4ef455d999f8b05b55"
|
||||||
KEYWORDS="amd64 arm64 x86"
|
KEYWORDS="amd64 arm64 x86"
|
||||||
fi
|
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
|
inherit autotools bash-completion-r1 flag-o-matic multibuild pax-utils toolchain-funcs versionator
|
||||||
UNIFONT=unifont-7.0.05
|
DEJAVU=dejavu-sans-ttf-2.37
|
||||||
SRC_URI+=" mirror://gnu/unifont/${UNIFONT}/${UNIFONT}.pcf.gz
|
UNIFONT=unifont-9.0.06
|
||||||
truetype? ( mirror://sourceforge/dejavu/${DEJAVU}.zip )"
|
SRC_URI+=" fonts? ( mirror://gnu/unifont/${UNIFONT}/${UNIFONT}.pcf.gz )
|
||||||
|
themes? ( mirror://sourceforge/dejavu/${DEJAVU}.zip )"
|
||||||
|
|
||||||
DESCRIPTION="GNU GRUB boot loader"
|
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
|
# 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}"
|
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=(
|
GRUB_ALL_PLATFORMS=( coreboot efi-32 efi-64 emu ieee1275 loongson multiboot qemu qemu-mips pc uboot xen xen-32 )
|
||||||
# everywhere:
|
GRUB_ALL_PLATFORMS+=( arm64 ) # Tack on arm64 for pulling in the cross-compiler.
|
||||||
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
|
|
||||||
)
|
|
||||||
IUSE+=" ${GRUB_ALL_PLATFORMS[@]/#/grub_platforms_}"
|
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
|
# os-prober: Used on runtime to detect other OSes
|
||||||
# xorriso (dev-libs/libisoburn): Used on runtime for mkrescue
|
# xorriso (dev-libs/libisoburn): Used on runtime for mkrescue
|
||||||
RDEPEND="
|
RDEPEND="
|
||||||
@ -69,10 +68,6 @@ DEPEND="${RDEPEND}
|
|||||||
sys-devel/bison
|
sys-devel/bison
|
||||||
sys-apps/help2man
|
sys-apps/help2man
|
||||||
sys-apps/texinfo
|
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 )
|
grub_platforms_arm64? ( cross-aarch64-cros-linux-gnu/gcc )
|
||||||
static? (
|
static? (
|
||||||
app-arch/xz-utils[static-libs(+)]
|
app-arch/xz-utils[static-libs(+)]
|
||||||
@ -83,59 +78,42 @@ DEPEND="${RDEPEND}
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
test? (
|
test? (
|
||||||
dev-libs/libisoburn
|
app-admin/genromfs
|
||||||
sys-fs/squashfs-tools[lzo,xz]
|
app-arch/cpio
|
||||||
|
app-arch/lzop
|
||||||
grub_platforms_efi-64? ( app-emulation/qemu[qemu_softmmu_targets_x86_64] )
|
grub_platforms_efi-64? ( app-emulation/qemu[qemu_softmmu_targets_x86_64] )
|
||||||
grub_platforms_pc? ( app-emulation/qemu[qemu_softmmu_targets_i386] )
|
grub_platforms_pc? ( app-emulation/qemu[qemu_softmmu_targets_i386] )
|
||||||
grub_platforms_arm64? ( app-emulation/qemu[qemu_softmmu_targets_aarch64] )
|
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+="
|
RDEPEND+="
|
||||||
kernel_linux? (
|
kernel_linux? (
|
||||||
grub_platforms_efi-32? ( sys-boot/efibootmgr )
|
grub_platforms_efi-32? ( sys-boot/efibootmgr )
|
||||||
grub_platforms_efi-64? ( 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 )
|
nls? ( sys-devel/gettext )
|
||||||
"
|
"
|
||||||
|
|
||||||
STRIP_MASK="*/grub/*/*.{mod,img}"
|
DEPEND+=" !!=media-libs/freetype-2.5.4"
|
||||||
RESTRICT="test"
|
|
||||||
|
|
||||||
QA_EXECSTACK="
|
RESTRICT="strip !test? ( test )"
|
||||||
usr/bin/grub*-emu*
|
|
||||||
usr/lib*/grub/*/*.mod
|
|
||||||
usr/lib*/grub/*/*.module
|
|
||||||
usr/lib*/grub/*/kernel.exec
|
|
||||||
usr/lib*/grub/*/kernel.img
|
|
||||||
"
|
|
||||||
|
|
||||||
QA_WX_LOAD="
|
QA_EXECSTACK="usr/bin/grub*-emu* usr/lib/grub/*"
|
||||||
usr/lib*/grub/*/kernel.exec
|
QA_WX_LOAD="usr/lib/grub/*"
|
||||||
usr/lib*/grub/*/kernel.img
|
QA_MULTILIB_PATHS="usr/lib/grub/.*"
|
||||||
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
|
|
||||||
}
|
|
||||||
|
|
||||||
src_unpack() {
|
src_unpack() {
|
||||||
cros-workon_src_unpack
|
cros-workon_src_unpack
|
||||||
default_src_unpack
|
default
|
||||||
}
|
}
|
||||||
|
|
||||||
src_prepare() {
|
src_prepare() {
|
||||||
@ -146,51 +124,56 @@ src_prepare() {
|
|||||||
sed -i -e 's/^\* GRUB:/* GRUB2:/' -e 's/(grub)/(grub2)/' docs/grub.texi || die
|
sed -i -e 's/^\* GRUB:/* GRUB2:/' -e 's/(grub)/(grub2)/' docs/grub.texi || die
|
||||||
fi
|
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
|
if [[ -n ${GRUB_AUTOGEN} ]]; then
|
||||||
python_setup
|
python_setup
|
||||||
bash autogen.sh || die
|
bash autogen.sh || die
|
||||||
fi
|
autopoint() { :; }
|
||||||
|
|
||||||
if [[ -n ${AUTOTOOLS_AUTORECONF} ]]; then
|
|
||||||
autopoint() { return 0; }
|
|
||||||
eautoreconf
|
eautoreconf
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
setup_fonts() {
|
grub_do() {
|
||||||
ln -s "${WORKDIR}/${UNIFONT}.pcf" unifont.pcf || die
|
multibuild_foreach_variant run_in_build_dir "$@"
|
||||||
if use truetype; then
|
}
|
||||||
ln -s "${WORKDIR}/${DEJAVU}/ttf/DejaVuSans.ttf" DejaVuSans.ttf || die
|
|
||||||
fi
|
grub_do_once() {
|
||||||
|
multibuild_for_best_variant run_in_build_dir "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
grub_configure() {
|
grub_configure() {
|
||||||
local platform
|
local platform
|
||||||
|
|
||||||
case ${MULTIBUILD_VARIANT} in
|
case ${MULTIBUILD_VARIANT} in
|
||||||
efi-32)
|
efi*) platform=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
|
if [[ ${CTARGET:-${CHOST}} == x86_64* ]]; then
|
||||||
local CTARGET=${CTARGET:-i386}
|
local CTARGET=${CTARGET:-i386}
|
||||||
fi ;;
|
fi ;;
|
||||||
efi-64)
|
*-64)
|
||||||
platform=efi
|
|
||||||
if [[ ${CTARGET:-${CHOST}} == i?86* ]]; then
|
if [[ ${CTARGET:-${CHOST}} == i?86* ]]; then
|
||||||
local CTARGET=${CTARGET:-x86_64}
|
local CTARGET=${CTARGET:-x86_64}
|
||||||
local TARGET_CFLAGS="-Os -march=x86-64 ${TARGET_CFLAGS}"
|
local -x TARGET_CFLAGS="-Os -march=x86-64 ${TARGET_CFLAGS}"
|
||||||
local TARGET_CPPFLAGS="-march=x86-64 ${TARGET_CPPFLAGS}"
|
local -x TARGET_CPPFLAGS="-march=x86-64 ${TARGET_CPPFLAGS}"
|
||||||
export TARGET_CFLAGS TARGET_CPPFLAGS
|
|
||||||
fi ;;
|
fi ;;
|
||||||
arm64)
|
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 ;;
|
local CTARGET=aarch64-cros-linux-gnu ;;
|
||||||
guessed) ;;
|
|
||||||
*) platform=${MULTIBUILD_VARIANT} ;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
local myeconfargs=(
|
local myeconfargs=(
|
||||||
@ -202,6 +185,7 @@ grub_configure() {
|
|||||||
$(use_enable device-mapper)
|
$(use_enable device-mapper)
|
||||||
$(use_enable mount grub-mount)
|
$(use_enable mount grub-mount)
|
||||||
$(use_enable nls)
|
$(use_enable nls)
|
||||||
|
$(use_enable themes grub-themes)
|
||||||
$(use_enable truetype grub-mkfont)
|
$(use_enable truetype grub-mkfont)
|
||||||
$(use_enable libzfs)
|
$(use_enable libzfs)
|
||||||
$(use sdl && use_enable debug grub-emu-sdl)
|
$(use sdl && use_enable debug grub-emu-sdl)
|
||||||
@ -215,10 +199,14 @@ grub_configure() {
|
|||||||
myeconfargs+=( --program-transform-name="s,grub,grub2," )
|
myeconfargs+=( --program-transform-name="s,grub,grub2," )
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p "${BUILD_DIR}" || die
|
# Set up font symlinks
|
||||||
run_in_build_dir setup_fonts
|
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() {
|
src_configure() {
|
||||||
@ -234,40 +222,41 @@ src_configure() {
|
|||||||
|
|
||||||
use static && HOST_LDFLAGS+=" -static"
|
use static && HOST_LDFLAGS+=" -static"
|
||||||
|
|
||||||
if version_is_at_least 4.8 "$(gcc-version)"; then
|
tc-ld-disable-gold #439082 #466536 #526348
|
||||||
export TARGET_LDFLAGS+=" -fuse-ld=bfd"
|
export TARGET_LDFLAGS="${TARGET_LDFLAGS} ${LDFLAGS}"
|
||||||
fi
|
unset LDFLAGS
|
||||||
|
|
||||||
tc-export CC NM OBJCOPY STRIP
|
tc-export CC NM OBJCOPY RANLIB STRIP
|
||||||
tc-export BUILD_CC # Bug 485592
|
tc-export BUILD_CC # Bug 485592
|
||||||
|
|
||||||
# Portage will take care of cleaning up GRUB_PLATFORMS
|
MULTIBUILD_VARIANTS=()
|
||||||
MULTIBUILD_VARIANTS=( ${GRUB_PLATFORMS:-guessed} )
|
local p
|
||||||
multibuild_parallel_foreach_variant grub_configure
|
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() {
|
src_compile() {
|
||||||
# Sandbox bug 404013.
|
# Sandbox bug 404013.
|
||||||
use libzfs && addpredict /etc/dfs:/dev/zfs
|
use libzfs && addpredict /etc/dfs:/dev/zfs
|
||||||
|
|
||||||
multibuild_foreach_variant autotools-utils_src_compile
|
grub_do emake
|
||||||
|
use doc && grub_do_once emake -C docs html
|
||||||
use doc && multibuild_for_best_variant \
|
|
||||||
autotools-utils_src_compile -C docs html
|
|
||||||
}
|
}
|
||||||
|
|
||||||
src_test() {
|
src_test() {
|
||||||
# The qemu dependency is a bit complex.
|
# The qemu dependency is a bit complex.
|
||||||
# You will need to adjust QEMU_SOFTMMU_TARGETS to match the cpu/platform.
|
# 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() {
|
src_install() {
|
||||||
multibuild_foreach_variant autotools-utils_src_install \
|
grub_do emake install DESTDIR="${D}" bashcompletiondir="$(get_bashcompdir)"
|
||||||
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 \
|
einstalldocs
|
||||||
emake -C docs DESTDIR="${D}" install-html
|
|
||||||
|
|
||||||
if use multislot; then
|
if use multislot; then
|
||||||
mv "${ED%/}"/usr/share/info/grub{,2}.info || die
|
mv "${ED%/}"/usr/share/info/grub{,2}.info || die
|
||||||
@ -278,34 +267,19 @@ src_install() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pkg_postinst() {
|
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 "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
|
if has_version 'sys-boot/grub:0'; then
|
||||||
elog "A migration guide for GRUB Legacy users is available:"
|
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
|
fi
|
||||||
|
|
||||||
if [[ -z ${REPLACING_VERSIONS} ]]; then
|
if [[ -z ${REPLACING_VERSIONS} ]]; then
|
||||||
if ! has_version sys-boot/os-prober; then
|
elog
|
||||||
elog "Install sys-boot/os-prober to enable detection of other operating systems using grub2-mkconfig."
|
elog "You may consider installing the following optional packages:"
|
||||||
fi
|
optfeature "Detect other operating systems (grub-mkconfig)" sys-boot/os-prober
|
||||||
if ! has_version dev-libs/libisoburn; then
|
optfeature "Create rescue media (grub-mkrescue)" dev-libs/libisoburn
|
||||||
elog "Install dev-libs/libisoburn to enable creation of rescue media using grub2-mkrescue."
|
optfeature "Enable RAID device detection" sys-fs/mdadm
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,19 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||||
<pkgmetadata>
|
<pkgmetadata>
|
||||||
<herd>base-system</herd>
|
<maintainer restrict=">=sys-boot/grub-2" type="person">
|
||||||
<maintainer>
|
|
||||||
<email>base-system@gentoo.org</email>
|
|
||||||
</maintainer>
|
|
||||||
<maintainer restrict=">=sys-boot/grub-2">
|
|
||||||
<email>floppym@gentoo.org</email>
|
<email>floppym@gentoo.org</email>
|
||||||
<name>Mike Gilbert</name>
|
<name>Mike Gilbert</name>
|
||||||
|
<description>GRUB2 only - do not assign bugs related to GRUB Legacy (0.97)</description>
|
||||||
|
</maintainer>
|
||||||
|
<maintainer restrict="<sys-boot/grub-1" type="person">
|
||||||
|
<email>axs@gentoo.org</email>
|
||||||
|
<name>Ian Stakenvicius</name>
|
||||||
|
<description>GRUB-Legacy only - do not assign bugs related to GRUB2</description>
|
||||||
|
</maintainer>
|
||||||
|
<maintainer type="project">
|
||||||
|
<email>base-system@gentoo.org</email>
|
||||||
|
<name>Gentoo Base System</name>
|
||||||
</maintainer>
|
</maintainer>
|
||||||
<use>
|
<use>
|
||||||
<flag name="device-mapper">
|
<flag name="device-mapper">
|
||||||
@ -24,8 +30,8 @@
|
|||||||
Enable support for <pkg>sys-fs/zfs</pkg>
|
Enable support for <pkg>sys-fs/zfs</pkg>
|
||||||
</flag>
|
</flag>
|
||||||
<flag name="multislot">
|
<flag name="multislot">
|
||||||
Allow concurrent installation of <pkg>sys-boot/grub:0</pkg> and
|
Allow concurrent installation of <pkg>sys-boot/grub</pkg> SLOT 0 and
|
||||||
<pkg>sys-boot/grub:2</pkg> by renaming all programs.
|
<pkg>sys-boot/grub</pkg> SLOT 2 by renaming all programs.
|
||||||
</flag>
|
</flag>
|
||||||
<flag name="themes">Build and install GRUB themes (starfield)</flag>
|
<flag name="themes">Build and install GRUB themes (starfield)</flag>
|
||||||
<flag name="truetype">Build and install grub-mkfont conversion utility</flag>
|
<flag name="truetype">Build and install grub-mkfont conversion utility</flag>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user