diff options
Diffstat (limited to 'sys-apps/kexec-tools/kexec-tools-9999.ebuild')
-rw-r--r-- | sys-apps/kexec-tools/kexec-tools-9999.ebuild | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/sys-apps/kexec-tools/kexec-tools-9999.ebuild b/sys-apps/kexec-tools/kexec-tools-9999.ebuild index 86b8d9fc9789..c8af4693cfed 100644 --- a/sys-apps/kexec-tools/kexec-tools-9999.ebuild +++ b/sys-apps/kexec-tools/kexec-tools-9999.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 inherit libtool linux-info systemd @@ -17,18 +17,22 @@ fi DESCRIPTION="Load another kernel from the currently executing Linux kernel" HOMEPAGE="https://kernel.org/pub/linux/utils/kernel/kexec/" +S="${WORKDIR}/${P/_/-}" + LICENSE="GPL-2" SLOT="0" -IUSE="booke lzma xen zlib" +IUSE="booke lzma selinux xen zlib" REQUIRED_USE="lzma? ( zlib )" DEPEND=" lzma? ( app-arch/xz-utils ) - zlib? ( sys-libs/zlib )" -RDEPEND="${DEPEND}" - -S="${WORKDIR}/${P/_/-}" + zlib? ( sys-libs/zlib ) +" +RDEPEND=" + ${DEPEND} + selinux? ( sec-policy/selinux-kdump ) +" CONFIG_CHECK="~KEXEC" @@ -88,24 +92,16 @@ src_install() { dodoc "${FILESDIR}"/README.Gentoo newinitd "${FILESDIR}"/kexec-r2.init kexec - newconfd "${FILESDIR}"/kexec.conf-2.0.4 kexec insinto /etc doins "${FILESDIR}"/kexec.conf + dosym ../kexec.conf /etc/conf.d/kexec - insinto /etc/kernel/postinst.d - doins "${FILESDIR}"/90_kexec - - systemd_dounit "${FILESDIR}"/kexec.service + dosbin "${FILESDIR}"/kexec-auto-load + systemd_newunit "${FILESDIR}"/kexec.service-r1 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 @@ -114,7 +110,7 @@ pkg_postinst() { fi fi - if [[ ${n_root_args} > 1 && "${has_rootpart_set}" == "no" ]]; then + if [[ ${n_root_args} -gt 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" |