summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2013-12-28 20:16:29 +0000
committerJustin Lecher <jlec@gentoo.org>2013-12-28 20:16:29 +0000
commitdf20c658ba7e72844485b75335e7dc08448f3568 (patch)
tree5edb300677ffc2097b78ca3c49ab8071f22d5107 /sys-apps
parentalpha stable wrt bug #492078 (diff)
downloadgentoo-2-df20c658ba7e72844485b75335e7dc08448f3568.tar.gz
gentoo-2-df20c658ba7e72844485b75335e7dc08448f3568.tar.bz2
gentoo-2-df20c658ba7e72844485b75335e7dc08448f3568.zip
sys-apps/kexec-tools: Add postinst script for installkernel(8), #491044
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key B9D4F231BD1558AB!)
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/kexec-tools/ChangeLog8
-rw-r--r--sys-apps/kexec-tools/files/90_kexec9
-rw-r--r--sys-apps/kexec-tools/kexec-tools-2.0.4-r3.ebuild76
3 files changed, 92 insertions, 1 deletions
diff --git a/sys-apps/kexec-tools/ChangeLog b/sys-apps/kexec-tools/ChangeLog
index bee44758928d..af73398a0148 100644
--- a/sys-apps/kexec-tools/ChangeLog
+++ b/sys-apps/kexec-tools/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-apps/kexec-tools
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/kexec-tools/ChangeLog,v 1.59 2013/11/12 09:09:20 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/kexec-tools/ChangeLog,v 1.60 2013/12/28 20:16:29 jlec Exp $
+
+*kexec-tools-2.0.4-r3 (28 Dec 2013)
+
+ 28 Dec 2013; Justin Lecher <jlec@gentoo.org> +kexec-tools-2.0.4-r3.ebuild,
+ +files/90_kexec:
+ Add postinst script for installkernel(8), #491044
12 Nov 2013; Justin Lecher <jlec@gentoo.org> kexec-tools-2.0.4-r1.ebuild,
kexec-tools-2.0.4-r2.ebuild, kexec-tools-9999.ebuild:
diff --git a/sys-apps/kexec-tools/files/90_kexec b/sys-apps/kexec-tools/files/90_kexec
new file mode 100644
index 000000000000..40bad423955d
--- /dev/null
+++ b/sys-apps/kexec-tools/files/90_kexec
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+version="$1" ; shift
+image="$1" ; shift
+
+exec sed \
+ -e "s:\"vmlinuz-.*\":\"vmlinuz-${version}\":" \
+ -e "s:/boot/initramfs-.*\.img:/boot/initramfs-${version}\.img:" \
+ -i /etc/kexec.conf
diff --git a/sys-apps/kexec-tools/kexec-tools-2.0.4-r3.ebuild b/sys-apps/kexec-tools/kexec-tools-2.0.4-r3.ebuild
new file mode 100644
index 000000000000..54f24630ae87
--- /dev/null
+++ b/sys-apps/kexec-tools/kexec-tools-2.0.4-r3.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/kexec-tools/kexec-tools-2.0.4-r3.ebuild,v 1.1 2013/12/28 20:16:29 jlec Exp $
+
+EAPI=5
+
+inherit autotools-utils flag-o-matic linux-info systemd
+
+DESCRIPTION="Load another kernel from the currently executing Linux kernel"
+HOMEPAGE="http://kernel.org/pub/linux/utils/kernel/kexec/"
+SRC_URI="mirror://kernel/linux/utils/kernel/kexec/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+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.0-respect-LDFLAGS.patch
+ "${FILESDIR}"/${P}-disable-kexec-test.patch
+ "${FILESDIR}"/${P}-out-of-source.patch
+ )
+
+pkg_setup() {
+ # GNU Make's $(COMPILE.S) passes ASFLAGS to $(CCAS), CCAS=$(CC)
+ export ASFLAGS="${CCASFLAGS}"
+ # to disable the -fPIE -pie in the hardened compiler
+ if gcc-specs-pie ; then
+ filter-flags -fPIE
+ append-ldflags -nopie
+ fi
+}
+
+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-${PV}-r2 kexec
+ newconfd "${FILESDIR}"/kexec.conf-${PV} 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
+}