mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-30 18:12:08 +02:00
sys-apps/kexec-tools: update to 2.0.22
Update sys-apps/kexec-tools to 2.0.22, as needed by gcc 10. Without that update, build fails like: ``` /usr/libexec/gcc/x86_64-cros-linux-gnu/ld: kexec/arch/x86_64/kexec-bzImage64.o:.../kexec/arch/x86_64/kexec-bzImage64.c:45: multiple definition of `bzImage_support_efi_boot'; kexec/arch/i386/kexec-bzImage.o:.../kexec/arch/i386/kexec-bzImage.c:43: first defined here ```
This commit is contained in:
parent
6fe0a4ccd4
commit
97396c4c19
@ -1,3 +1,2 @@
|
||||
DIST kexec-tools-2.0.14.tar.xz 283640 BLAKE2B f84b5485904c0d4bbe5f7fdae391a4fb0b2a7436e078f23de649e79aaa7dfcdeff99139230a299bf2b9b0554ac13fa833e31211682c92f07cd6b8072907e35aa SHA512 8c1f9d1f4bb69a621961d45091f9c8349535ae69b80168423663685b44d89e1b9324d5cd11c83e86d805a3371f4f1600b0def551c52efb3c6cf020e9c11c273f
|
||||
DIST kexec-tools-2.0.16.tar.xz 287888 BLAKE2B 7e7bbe11dc2792be3cab6318c12b6866bf6b373fb7bf2d7601ef68a39dd5882aceab7c8905ce0d9b0af1da2072b3f3d2677bd9e006676c484e1d6506ac7036fa SHA512 f2f06e7702fef20c8d7d6aabe1b264e2e2689e5c38cc00dbc2186dd7fa0479edb2dc9e307dd2ad7f03db47015e966e577f11576172604ef01c1bcca471fe2c24
|
||||
DIST kexec-tools-2.0.17.tar.xz 290612 BLAKE2B 57ec5b5ed33a5c5bbe433099d6e80663717c8a086bdb8b95f4a1d81fd7e546619c0064698454dc79f489313f98696ee6dee4cafbc8b1b93db5c7909cdf7a6234 SHA512 e0f254ca2b26fa02cb61ba9a0735423b26bac2693fbd920eaf7cc2822c298de958bd65f7c37947ca1f6811a3752a58f7cf8aa903494f0109ea76b7159a037fa6
|
||||
DIST kexec-tools-2.0.22.tar.xz 303564 BLAKE2B 977c741eabf9b6b882550713ba59b18289b4f997fb382e96338efce6d04a9390fea952fc46ca72fd0a0b782261841ab2002da84b1819f955e63996eac900b0f7 SHA512 7580860f272eee5af52139809f12961e5a5d3a65f4e191183ca9c845410425d25818945ac14ed04a60e6ce474dc2656fc6a14041177b0bf703f450820c7d6aba
|
||||
DIST kexec-tools-2.0.23.tar.xz 304024 BLAKE2B 0150985093dc0012d3870c127ac5eab81d4cc839c0a79ff20224d1a409462a194d7e304f54ed8f0952e4d325dbff11bcbe1565b2c57c45c212302810dc06ed62 SHA512 b6e3b967cacc31c434b185d25da4d53c822ae4bbcec26ef9d6cb171f294fdcc80913d381e686a0a41e025187835f4dc088052ff88efe75a021d7624c8b1a1ed8
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# Set up some defaults.
|
||||
@ -38,8 +38,11 @@ image_path() {
|
||||
local gkarch="$(get_genkernel_arch $karch)"
|
||||
for x in \
|
||||
"bzImage" \
|
||||
"vmlinux" \
|
||||
"vmlinuz" \
|
||||
"kernel" \
|
||||
"bzImage-${kver}" \
|
||||
"vmlinux-${kver}" \
|
||||
"vmlinuz-${kver}" \
|
||||
"kernel-genkernel-${karch}-${kver}" \
|
||||
"kernel-genkernel-${gkarch}-${kver}" \
|
||||
@ -65,6 +68,7 @@ initrd_path() {
|
||||
local gkarch="$(get_genkernel_arch $karch)"
|
||||
for x in \
|
||||
"initrd" \
|
||||
"initramfs" \
|
||||
"initrd.img-${kver}" \
|
||||
"initrd-${kver}.img" \
|
||||
"initrd-${kver}" \
|
||||
@ -115,12 +119,22 @@ load_image() {
|
||||
fi
|
||||
fi
|
||||
|
||||
local is_rootpart_autodetected=no
|
||||
if [ -z "${ROOTPART}" ]; then
|
||||
ROOTPART="$(readlink -f "$(sed -n '/^\/[^ ]* \/ / s,^\([^ ]*\).*,\1,p' /proc/mounts)")"
|
||||
is_rootpart_autodetected=yes
|
||||
fi
|
||||
|
||||
local is_reusing_cmdline=no
|
||||
if [ -z "${KPARAM}" ]; then
|
||||
kparamopt="--reuse-cmdline"
|
||||
is_reusing_cmdline=yes
|
||||
fi
|
||||
|
||||
if ! yesno "${is_rootpart_autodetected}" || ! yesno "${is_reusing_cmdline}"; then
|
||||
# Only append root when explicit set in config or
|
||||
# if we aren't re-using kernel cmdline
|
||||
KPARAM="${KPARAM:+"${KPARAM} "}root=${ROOTPART}"
|
||||
fi
|
||||
|
||||
if [ -n "${initrd}" ]; then
|
||||
@ -133,7 +147,7 @@ load_image() {
|
||||
ebegin "Using kernel image ${img}${msg} for kexec"
|
||||
|
||||
kexec ${KEXEC_OPT_ARGS} ${kparamopt} \
|
||||
-l "${img}" --append="root=${ROOTPART} ${KPARAM}" ${initrdopt}
|
||||
-l "${img}" ${KPARAM:+--append="${KPARAM}"} ${initrdopt}
|
||||
local ret=$?
|
||||
|
||||
${mounted} && umount "${BOOTPART}"
|
@ -1,38 +0,0 @@
|
||||
From b9de21ef51a7ceab7122a707c188602eae22c4ee Mon Sep 17 00:00:00 2001
|
||||
From: Chris Clayton <chris2553@googlemail.com>
|
||||
Date: Mon, 20 Aug 2018 12:00:31 +0100
|
||||
Subject: kexec: fix for "Unhandled rela relocation: R_X86_64_PLT32" error
|
||||
|
||||
In response to a change in binutils, commit b21ebf2fb4c
|
||||
(x86: Treat R_X86_64_PLT32 as R_X86_64_PC32) was applied to
|
||||
the linux kernel during the 4.16 development cycle and has
|
||||
since been backported to earlier stable kernel series. The
|
||||
change results in the failure message in $SUBJECT when
|
||||
rebooting via kexec.
|
||||
|
||||
Fix this by replicating the change in kexec.
|
||||
|
||||
Signed-off-by: Chris Clayton <chris2553@googlemail.com>
|
||||
Acked-by: Baoquan He <bhe@redhat.com>
|
||||
Tested-by: Bhupesh Sharma <bhsharma@redhat.com>
|
||||
Acked-by: Bhupesh Sharma <bhsharma@redhat.com>
|
||||
Signed-off-by: Simon Horman <horms@verge.net.au>
|
||||
---
|
||||
kexec/arch/x86_64/kexec-elf-rel-x86_64.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/kexec/arch/x86_64/kexec-elf-rel-x86_64.c b/kexec/arch/x86_64/kexec-elf-rel-x86_64.c
|
||||
index 7fdde73..db85b44 100644
|
||||
--- a/kexec/arch/x86_64/kexec-elf-rel-x86_64.c
|
||||
+++ b/kexec/arch/x86_64/kexec-elf-rel-x86_64.c
|
||||
@@ -79,6 +79,7 @@ void machine_apply_elf_rel(struct mem_ehdr *UNUSED(ehdr),
|
||||
goto overflow;
|
||||
break;
|
||||
case R_X86_64_PC32:
|
||||
+ case R_X86_64_PLT32:
|
||||
*(uint32_t *)location = value - address;
|
||||
break;
|
||||
default:
|
||||
--
|
||||
cgit 1.2-0.3.lf.el7
|
||||
|
@ -1,76 +0,0 @@
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="5"
|
||||
|
||||
if [[ ${PV} == "9999" ]] ; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git"
|
||||
AUTOTOOLS_AUTORECONF=true
|
||||
else
|
||||
SRC_URI="https://www.kernel.org/pub/linux/utils/kernel/kexec/${P}.tar.xz"
|
||||
KEYWORDS="amd64 ~arm64 x86"
|
||||
fi
|
||||
|
||||
inherit autotools-utils linux-info systemd
|
||||
|
||||
DESCRIPTION="Load another kernel from the currently executing Linux kernel"
|
||||
HOMEPAGE="https://kernel.org/pub/linux/utils/kernel/kexec/"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
IUSE="booke lzma xen zlib"
|
||||
|
||||
REQUIRED_USE="lzma? ( zlib )"
|
||||
|
||||
DEPEND="
|
||||
lzma? ( app-arch/xz-utils )
|
||||
zlib? ( sys-libs/zlib )"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
CONFIG_CHECK="~KEXEC"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-2.0.4-disable-kexec-test.patch
|
||||
"${FILESDIR}"/${PN}-2.0.4-out-of-source.patch
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
# GNU Make's $(COMPILE.S) passes ASFLAGS to $(CCAS), CCAS=$(CC)
|
||||
export ASFLAGS="${CCASFLAGS}"
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myeconfargs=(
|
||||
$(use_with booke)
|
||||
$(use_with lzma)
|
||||
$(use_with xen)
|
||||
$(use_with zlib)
|
||||
)
|
||||
autotools-utils_src_configure
|
||||
}
|
||||
|
||||
src_install() {
|
||||
autotools-utils_src_install
|
||||
|
||||
dodoc "${FILESDIR}"/README.Gentoo
|
||||
|
||||
newinitd "${FILESDIR}"/kexec.init-2.0.13-r1 kexec
|
||||
newconfd "${FILESDIR}"/kexec.conf-2.0.4 kexec
|
||||
|
||||
insinto /etc
|
||||
doins "${FILESDIR}"/kexec.conf
|
||||
|
||||
insinto /etc/kernel/postinst.d
|
||||
doins "${FILESDIR}"/90_kexec
|
||||
|
||||
systemd_dounit "${FILESDIR}"/kexec.service
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if systemd_is_booted || has_version sys-apps/systemd; then
|
||||
elog "For systemd support the new config file is"
|
||||
elog " /etc/kexec.conf"
|
||||
elog "Please adopt it to your needs as there is no autoconfig anymore"
|
||||
fi
|
||||
}
|
@ -1,82 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
if [[ ${PV} == "9999" ]] ; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git"
|
||||
AUTOTOOLS_AUTORECONF=true
|
||||
else
|
||||
SRC_URI="https://www.kernel.org/pub/linux/utils/kernel/kexec/${P}.tar.xz"
|
||||
KEYWORDS="~amd64 ~arm64 ~x86"
|
||||
fi
|
||||
|
||||
inherit flag-o-matic libtool linux-info systemd
|
||||
|
||||
DESCRIPTION="Load another kernel from the currently executing Linux kernel"
|
||||
HOMEPAGE="https://kernel.org/pub/linux/utils/kernel/kexec/"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
IUSE="booke lzma xen zlib"
|
||||
|
||||
REQUIRED_USE="lzma? ( zlib )"
|
||||
|
||||
DEPEND="
|
||||
lzma? ( app-arch/xz-utils )
|
||||
zlib? ( sys-libs/zlib )"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
CONFIG_CHECK="~KEXEC"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-2.0.4-disable-kexec-test.patch
|
||||
"${FILESDIR}"/${PN}-2.0.4-out-of-source.patch
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
# GNU Make's $(COMPILE.S) passes ASFLAGS to $(CCAS), CCAS=$(CC)
|
||||
export ASFLAGS="${CCASFLAGS}"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
elibtoolize
|
||||
filter-flags '-mindirect-branch=thunk*'
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myeconfargs=(
|
||||
$(use_with booke)
|
||||
$(use_with lzma)
|
||||
$(use_with xen)
|
||||
$(use_with zlib)
|
||||
)
|
||||
econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
dodoc "${FILESDIR}"/README.Gentoo
|
||||
|
||||
newinitd "${FILESDIR}"/kexec.init-2.0.13-r1 kexec
|
||||
newconfd "${FILESDIR}"/kexec.conf-2.0.4 kexec
|
||||
|
||||
insinto /etc
|
||||
doins "${FILESDIR}"/kexec.conf
|
||||
|
||||
insinto /etc/kernel/postinst.d
|
||||
doins "${FILESDIR}"/90_kexec
|
||||
|
||||
systemd_dounit "${FILESDIR}"/kexec.service
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if systemd_is_booted || has_version sys-apps/systemd; then
|
||||
elog "For systemd support the new config file is"
|
||||
elog " /etc/kexec.conf"
|
||||
elog "Please adopt it to your needs as there is no autoconfig anymore"
|
||||
fi
|
||||
}
|
@ -1,86 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
if [[ ${PV} == "9999" ]] ; then
|
||||
inherit git-r3 autotools
|
||||
EGIT_REPO_URI="https://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git"
|
||||
else
|
||||
SRC_URI="https://www.kernel.org/pub/linux/utils/kernel/kexec/${P}.tar.xz"
|
||||
KEYWORDS="amd64 ~arm64 x86"
|
||||
fi
|
||||
|
||||
inherit flag-o-matic libtool linux-info systemd
|
||||
|
||||
DESCRIPTION="Load another kernel from the currently executing Linux kernel"
|
||||
HOMEPAGE="https://kernel.org/pub/linux/utils/kernel/kexec/"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
IUSE="booke lzma xen zlib"
|
||||
|
||||
REQUIRED_USE="lzma? ( zlib )"
|
||||
|
||||
DEPEND="
|
||||
lzma? ( app-arch/xz-utils )
|
||||
zlib? ( sys-libs/zlib )"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
CONFIG_CHECK="~KEXEC"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-2.0.4-disable-kexec-test.patch
|
||||
"${FILESDIR}"/${PN}-2.0.4-out-of-source.patch
|
||||
"${FILESDIR}"/${P}-fix-unhandled-rela-relocation-R_X86_64_PLT32-error.patch
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
# GNU Make's $(COMPILE.S) passes ASFLAGS to $(CCAS), CCAS=$(CC)
|
||||
export ASFLAGS="${CCASFLAGS}"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
if [[ ${PV} == "9999" ]] ; then
|
||||
eautoreconf
|
||||
else
|
||||
elibtoolize
|
||||
fi
|
||||
filter-flags '-mindirect-branch=thunk*'
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myeconfargs=(
|
||||
$(use_with booke)
|
||||
$(use_with lzma)
|
||||
$(use_with xen)
|
||||
$(use_with zlib)
|
||||
)
|
||||
econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
dodoc "${FILESDIR}"/README.Gentoo
|
||||
|
||||
newinitd "${FILESDIR}"/kexec.init-2.0.13-r1 kexec
|
||||
newconfd "${FILESDIR}"/kexec.conf-2.0.4 kexec
|
||||
|
||||
insinto /etc
|
||||
doins "${FILESDIR}"/kexec.conf
|
||||
|
||||
insinto /etc/kernel/postinst.d
|
||||
doins "${FILESDIR}"/90_kexec
|
||||
|
||||
systemd_dounit "${FILESDIR}"/kexec.service
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if systemd_is_booted || has_version sys-apps/systemd; then
|
||||
elog "For systemd support the new config file is"
|
||||
elog " /etc/kexec.conf"
|
||||
elog "Please adopt it to your needs as there is no autoconfig anymore"
|
||||
fi
|
||||
}
|
@ -1,85 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
if [[ ${PV} == "9999" ]] ; then
|
||||
inherit git-r3 autotools
|
||||
EGIT_REPO_URI="https://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git"
|
||||
else
|
||||
SRC_URI="https://www.kernel.org/pub/linux/utils/kernel/kexec/${P}.tar.xz"
|
||||
KEYWORDS="~amd64 ~arm64 ~x86"
|
||||
fi
|
||||
|
||||
inherit flag-o-matic libtool linux-info systemd
|
||||
|
||||
DESCRIPTION="Load another kernel from the currently executing Linux kernel"
|
||||
HOMEPAGE="https://kernel.org/pub/linux/utils/kernel/kexec/"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
IUSE="booke lzma xen zlib"
|
||||
|
||||
REQUIRED_USE="lzma? ( zlib )"
|
||||
|
||||
DEPEND="
|
||||
lzma? ( app-arch/xz-utils )
|
||||
zlib? ( sys-libs/zlib )"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
CONFIG_CHECK="~KEXEC"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-2.0.4-disable-kexec-test.patch
|
||||
"${FILESDIR}"/${PN}-2.0.4-out-of-source.patch
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
# GNU Make's $(COMPILE.S) passes ASFLAGS to $(CCAS), CCAS=$(CC)
|
||||
export ASFLAGS="${CCASFLAGS}"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
if [[ ${PV} == "9999" ]] ; then
|
||||
eautoreconf
|
||||
else
|
||||
elibtoolize
|
||||
fi
|
||||
filter-flags '-mindirect-branch=thunk*'
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myeconfargs=(
|
||||
$(use_with booke)
|
||||
$(use_with lzma)
|
||||
$(use_with xen)
|
||||
$(use_with zlib)
|
||||
)
|
||||
econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
dodoc "${FILESDIR}"/README.Gentoo
|
||||
|
||||
newinitd "${FILESDIR}"/kexec.init-2.0.13-r1 kexec
|
||||
newconfd "${FILESDIR}"/kexec.conf-2.0.4 kexec
|
||||
|
||||
insinto /etc
|
||||
doins "${FILESDIR}"/kexec.conf
|
||||
|
||||
insinto /etc/kernel/postinst.d
|
||||
doins "${FILESDIR}"/90_kexec
|
||||
|
||||
systemd_dounit "${FILESDIR}"/kexec.service
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if systemd_is_booted || has_version sys-apps/systemd; then
|
||||
elog "For systemd support the new config file is"
|
||||
elog " /etc/kexec.conf"
|
||||
elog "Please adopt it to your needs as there is no autoconfig anymore"
|
||||
fi
|
||||
}
|
124
sdk_container/src/third_party/portage-stable/sys-apps/kexec-tools/kexec-tools-2.0.22.ebuild
vendored
Normal file
124
sdk_container/src/third_party/portage-stable/sys-apps/kexec-tools/kexec-tools-2.0.22.ebuild
vendored
Normal file
@ -0,0 +1,124 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit libtool linux-info systemd
|
||||
|
||||
if [[ ${PV} == "9999" ]] ; then
|
||||
inherit git-r3 autotools
|
||||
EGIT_REPO_URI="https://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git"
|
||||
else
|
||||
SRC_URI="https://www.kernel.org/pub/linux/utils/kernel/kexec/${P/_/-}.tar.xz"
|
||||
[[ "${PV}" == *_rc* ]] || \
|
||||
KEYWORDS="amd64 ~arm64 ~ppc64 x86"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Load another kernel from the currently executing Linux kernel"
|
||||
HOMEPAGE="https://kernel.org/pub/linux/utils/kernel/kexec/"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
IUSE="booke lzma xen zlib"
|
||||
|
||||
REQUIRED_USE="lzma? ( zlib )"
|
||||
|
||||
DEPEND="
|
||||
lzma? ( app-arch/xz-utils )
|
||||
zlib? ( sys-libs/zlib )"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
S="${WORKDIR}/${P/_/-}"
|
||||
|
||||
CONFIG_CHECK="~KEXEC"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-2.0.4-disable-kexec-test.patch
|
||||
"${FILESDIR}"/${PN}-2.0.4-out-of-source.patch
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
# GNU Make's $(COMPILE.S) passes ASFLAGS to $(CCAS), CCAS=$(CC)
|
||||
export ASFLAGS="${CCASFLAGS}"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# Append PURGATORY_EXTRA_CFLAGS flags set by configure, instead of overriding them completely.
|
||||
sed -e "/^PURGATORY_EXTRA_CFLAGS =/s/=/+=/" -i Makefile.in || die
|
||||
|
||||
if [[ "${PV}" == 9999 ]] ; then
|
||||
eautoreconf
|
||||
else
|
||||
elibtoolize
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myeconfargs=(
|
||||
$(use_with booke)
|
||||
$(use_with lzma)
|
||||
$(use_with xen)
|
||||
$(use_with zlib)
|
||||
)
|
||||
econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# Respect CFLAGS for purgatory.
|
||||
# purgatory/Makefile uses PURGATORY_EXTRA_CFLAGS variable.
|
||||
# -mfunction-return=thunk and -mindirect-branch=thunk conflict with
|
||||
# -mcmodel=large which is added by build system.
|
||||
# Replace them with -mfunction-return=thunk-inline and -mindirect-branch=thunk-inline.
|
||||
local flag flags=()
|
||||
for flag in ${CFLAGS}; do
|
||||
[[ ${flag} == -mfunction-return=thunk ]] && flag="-mfunction-return=thunk-inline"
|
||||
[[ ${flag} == -mindirect-branch=thunk ]] && flag="-mindirect-branch=thunk-inline"
|
||||
flags+=("${flag}")
|
||||
done
|
||||
local -x PURGATORY_EXTRA_CFLAGS="${flags[*]}"
|
||||
|
||||
default
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
dodoc "${FILESDIR}"/README.Gentoo
|
||||
|
||||
newinitd "${FILESDIR}"/kexec-r2.init kexec
|
||||
newconfd "${FILESDIR}"/kexec.conf-2.0.4 kexec
|
||||
|
||||
insinto /etc
|
||||
doins "${FILESDIR}"/kexec.conf
|
||||
|
||||
insinto /etc/kernel/postinst.d
|
||||
doins "${FILESDIR}"/90_kexec
|
||||
|
||||
systemd_dounit "${FILESDIR}"/kexec.service
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if systemd_is_booted || has_version sys-apps/systemd; then
|
||||
elog "For systemd support the new config file is"
|
||||
elog " /etc/kexec.conf"
|
||||
elog "Please adopt it to your needs as there is no autoconfig anymore"
|
||||
fi
|
||||
|
||||
local n_root_args=$(grep -o -- '\<root=' /proc/cmdline 2>/dev/null | wc -l)
|
||||
local has_rootpart_set=no
|
||||
if [[ -f "${EROOT}/etc/conf.d/kexec" ]]; then
|
||||
if grep -q -E -- '^ROOTPART=' "${EROOT}/etc/conf.d/kexec" 2>/dev/null; then
|
||||
has_rootpart_set=yes
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ${n_root_args} > 1 && "${has_rootpart_set}" == "no" ]]; then
|
||||
ewarn "WARNING: Multiple root arguments (root=) on kernel command-line detected!"
|
||||
ewarn "This was probably caused by a previous version of ${PN}."
|
||||
ewarn "Please reboot system once *without* kexec to avoid boot problems"
|
||||
ewarn "in case running system and initramfs do not agree on detected"
|
||||
ewarn "root device name!"
|
||||
fi
|
||||
}
|
124
sdk_container/src/third_party/portage-stable/sys-apps/kexec-tools/kexec-tools-2.0.23.ebuild
vendored
Normal file
124
sdk_container/src/third_party/portage-stable/sys-apps/kexec-tools/kexec-tools-2.0.23.ebuild
vendored
Normal file
@ -0,0 +1,124 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit libtool linux-info systemd
|
||||
|
||||
if [[ ${PV} == "9999" ]] ; then
|
||||
inherit git-r3 autotools
|
||||
EGIT_REPO_URI="https://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git"
|
||||
else
|
||||
SRC_URI="https://www.kernel.org/pub/linux/utils/kernel/kexec/${P/_/-}.tar.xz"
|
||||
[[ "${PV}" == *_rc* ]] || \
|
||||
KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Load another kernel from the currently executing Linux kernel"
|
||||
HOMEPAGE="https://kernel.org/pub/linux/utils/kernel/kexec/"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
IUSE="booke lzma xen zlib"
|
||||
|
||||
REQUIRED_USE="lzma? ( zlib )"
|
||||
|
||||
DEPEND="
|
||||
lzma? ( app-arch/xz-utils )
|
||||
zlib? ( sys-libs/zlib )"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
S="${WORKDIR}/${P/_/-}"
|
||||
|
||||
CONFIG_CHECK="~KEXEC"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-2.0.4-disable-kexec-test.patch
|
||||
"${FILESDIR}"/${PN}-2.0.4-out-of-source.patch
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
# GNU Make's $(COMPILE.S) passes ASFLAGS to $(CCAS), CCAS=$(CC)
|
||||
export ASFLAGS="${CCASFLAGS}"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# Append PURGATORY_EXTRA_CFLAGS flags set by configure, instead of overriding them completely.
|
||||
sed -e "/^PURGATORY_EXTRA_CFLAGS =/s/=/+=/" -i Makefile.in || die
|
||||
|
||||
if [[ "${PV}" == 9999 ]] ; then
|
||||
eautoreconf
|
||||
else
|
||||
elibtoolize
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myeconfargs=(
|
||||
$(use_with booke)
|
||||
$(use_with lzma)
|
||||
$(use_with xen)
|
||||
$(use_with zlib)
|
||||
)
|
||||
econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# Respect CFLAGS for purgatory.
|
||||
# purgatory/Makefile uses PURGATORY_EXTRA_CFLAGS variable.
|
||||
# -mfunction-return=thunk and -mindirect-branch=thunk conflict with
|
||||
# -mcmodel=large which is added by build system.
|
||||
# Replace them with -mfunction-return=thunk-inline and -mindirect-branch=thunk-inline.
|
||||
local flag flags=()
|
||||
for flag in ${CFLAGS}; do
|
||||
[[ ${flag} == -mfunction-return=thunk ]] && flag="-mfunction-return=thunk-inline"
|
||||
[[ ${flag} == -mindirect-branch=thunk ]] && flag="-mindirect-branch=thunk-inline"
|
||||
flags+=("${flag}")
|
||||
done
|
||||
local -x PURGATORY_EXTRA_CFLAGS="${flags[*]}"
|
||||
|
||||
default
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
dodoc "${FILESDIR}"/README.Gentoo
|
||||
|
||||
newinitd "${FILESDIR}"/kexec-r2.init kexec
|
||||
newconfd "${FILESDIR}"/kexec.conf-2.0.4 kexec
|
||||
|
||||
insinto /etc
|
||||
doins "${FILESDIR}"/kexec.conf
|
||||
|
||||
insinto /etc/kernel/postinst.d
|
||||
doins "${FILESDIR}"/90_kexec
|
||||
|
||||
systemd_dounit "${FILESDIR}"/kexec.service
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if systemd_is_booted || has_version sys-apps/systemd; then
|
||||
elog "For systemd support the new config file is"
|
||||
elog " /etc/kexec.conf"
|
||||
elog "Please adopt it to your needs as there is no autoconfig anymore"
|
||||
fi
|
||||
|
||||
local n_root_args=$(grep -o -- '\<root=' /proc/cmdline 2>/dev/null | wc -l)
|
||||
local has_rootpart_set=no
|
||||
if [[ -f "${EROOT}/etc/conf.d/kexec" ]]; then
|
||||
if grep -q -E -- '^ROOTPART=' "${EROOT}/etc/conf.d/kexec" 2>/dev/null; then
|
||||
has_rootpart_set=yes
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ${n_root_args} > 1 && "${has_rootpart_set}" == "no" ]]; then
|
||||
ewarn "WARNING: Multiple root arguments (root=) on kernel command-line detected!"
|
||||
ewarn "This was probably caused by a previous version of ${PN}."
|
||||
ewarn "Please reboot system once *without* kexec to avoid boot problems"
|
||||
ewarn "in case running system and initramfs do not agree on detected"
|
||||
ewarn "root device name!"
|
||||
fi
|
||||
}
|
@ -1,18 +1,19 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
EAPI=7
|
||||
|
||||
inherit libtool linux-info systemd
|
||||
|
||||
if [[ ${PV} == "9999" ]] ; then
|
||||
inherit git-r3 autotools
|
||||
EGIT_REPO_URI="https://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git"
|
||||
else
|
||||
SRC_URI="https://www.kernel.org/pub/linux/utils/kernel/kexec/${P}.tar.xz"
|
||||
KEYWORDS="~amd64 ~arm64 ~x86"
|
||||
SRC_URI="https://www.kernel.org/pub/linux/utils/kernel/kexec/${P/_/-}.tar.xz"
|
||||
[[ "${PV}" == *_rc* ]] || \
|
||||
KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
|
||||
fi
|
||||
|
||||
inherit flag-o-matic libtool linux-info systemd
|
||||
|
||||
DESCRIPTION="Load another kernel from the currently executing Linux kernel"
|
||||
HOMEPAGE="https://kernel.org/pub/linux/utils/kernel/kexec/"
|
||||
|
||||
@ -27,6 +28,8 @@ DEPEND="
|
||||
zlib? ( sys-libs/zlib )"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
S="${WORKDIR}/${P/_/-}"
|
||||
|
||||
CONFIG_CHECK="~KEXEC"
|
||||
|
||||
PATCHES=(
|
||||
@ -41,12 +44,15 @@ pkg_setup() {
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
if [[ ${PV} == "9999" ]] ; then
|
||||
|
||||
# Append PURGATORY_EXTRA_CFLAGS flags set by configure, instead of overriding them completely.
|
||||
sed -e "/^PURGATORY_EXTRA_CFLAGS =/s/=/+=/" -i Makefile.in || die
|
||||
|
||||
if [[ "${PV}" == 9999 ]] ; then
|
||||
eautoreconf
|
||||
else
|
||||
elibtoolize
|
||||
fi
|
||||
filter-flags '-mindirect-branch=thunk*'
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
@ -59,12 +65,29 @@ src_configure() {
|
||||
econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# Respect CFLAGS for purgatory.
|
||||
# purgatory/Makefile uses PURGATORY_EXTRA_CFLAGS variable.
|
||||
# -mfunction-return=thunk and -mindirect-branch=thunk conflict with
|
||||
# -mcmodel=large which is added by build system.
|
||||
# Replace them with -mfunction-return=thunk-inline and -mindirect-branch=thunk-inline.
|
||||
local flag flags=()
|
||||
for flag in ${CFLAGS}; do
|
||||
[[ ${flag} == -mfunction-return=thunk ]] && flag="-mfunction-return=thunk-inline"
|
||||
[[ ${flag} == -mindirect-branch=thunk ]] && flag="-mindirect-branch=thunk-inline"
|
||||
flags+=("${flag}")
|
||||
done
|
||||
local -x PURGATORY_EXTRA_CFLAGS="${flags[*]}"
|
||||
|
||||
default
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
dodoc "${FILESDIR}"/README.Gentoo
|
||||
|
||||
newinitd "${FILESDIR}"/kexec.init-2.0.13-r1 kexec
|
||||
newinitd "${FILESDIR}"/kexec-r2.init kexec
|
||||
newconfd "${FILESDIR}"/kexec.conf-2.0.4 kexec
|
||||
|
||||
insinto /etc
|
||||
@ -82,4 +105,20 @@ pkg_postinst() {
|
||||
elog " /etc/kexec.conf"
|
||||
elog "Please adopt it to your needs as there is no autoconfig anymore"
|
||||
fi
|
||||
|
||||
local n_root_args=$(grep -o -- '\<root=' /proc/cmdline 2>/dev/null | wc -l)
|
||||
local has_rootpart_set=no
|
||||
if [[ -f "${EROOT}/etc/conf.d/kexec" ]]; then
|
||||
if grep -q -E -- '^ROOTPART=' "${EROOT}/etc/conf.d/kexec" 2>/dev/null; then
|
||||
has_rootpart_set=yes
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ${n_root_args} > 1 && "${has_rootpart_set}" == "no" ]]; then
|
||||
ewarn "WARNING: Multiple root arguments (root=) on kernel command-line detected!"
|
||||
ewarn "This was probably caused by a previous version of ${PN}."
|
||||
ewarn "Please reboot system once *without* kexec to avoid boot problems"
|
||||
ewarn "in case running system and initramfs do not agree on detected"
|
||||
ewarn "root device name!"
|
||||
fi
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="project">
|
||||
<email>base-system@gentoo.org</email>
|
||||
|
Loading…
x
Reference in New Issue
Block a user