diff --git a/sys-kernel/hardened-kernel/Manifest b/sys-kernel/hardened-kernel/Manifest new file mode 100644 index 0000000..d204c2c --- /dev/null +++ b/sys-kernel/hardened-kernel/Manifest @@ -0,0 +1,3 @@ +DIST kernel-5.4.28.a-hardened.x86_64.rpm 61861019 BLAKE2B fd8687154a045d24c7dbb8afc92f19df116291a7640da2a874822804901fba874ad0501290774e018dc9db3611a7f9a0d6818e1178d51525286ca13d7b43338b SHA512 8560c690274787483f37e2bf6c2d6472ef56b446c8ea4b1119261e644137cf5924173f63e9a8e3c26d9edb72651d959c48c1cf94794739c447a9468887db8128 +DIST kernel-devel-5.4.28.a-hardened.x86_64.rpm 210645430 BLAKE2B cbd160bcb59a211e9bff8272d0d9c8c20271efd9842e35a56bbe87f98372b8cce746f035c9e482b5be1c351cad35bd28ef53faf4854b567288ff3e9471a39f6b SHA512 15c8e8429d16f8afbe634a63e1c25caefe47206f41c06e21271b56901056d4183530d91960decf5c7fed131a8ae83a504cc7be82f2997e03aad1cd699528cf6b +EBUILD hardened-kernel-5.4.28.ebuild 1604 BLAKE2B 4f46183dd20bcf80d4592e2bbe27b679ad25d56112d7f83c88059a94960e3a36ac90a32d72097b7a0a352d4b088a89772e36696fcbc9103f9325460e0189d53e SHA512 e3d79b3ace2b9a79461f782aa55027944e1b1b8cc2beabc8c27f6d46f79a2358cbd6880c3fdb8c2ee97f9f440af0b9dd38c6eab749f17295f71c76a8ddda6a4f diff --git a/sys-kernel/hardened-kernel/hardened-kernel-5.4.28.ebuild b/sys-kernel/hardened-kernel/hardened-kernel-5.4.28.ebuild new file mode 100644 index 0000000..a1de7bf --- /dev/null +++ b/sys-kernel/hardened-kernel/hardened-kernel-5.4.28.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=7 + +SUFF_VER=".a-hardened" +MY_PV="${PVR}${SUFF_VER}" + +inherit rpm kernel-install + +DESCRIPTION="Precompiled hardened kernel image with modules" +HOMEPAGE="http://www.gentoo.org/proj/en/hardened/" +SRC_URI="https://localhost/kernel-${MY_PV}.x86_64.rpm + kernel-devel-${MY_PV}.x86_64.rpm" + +S=${WORKDIR} + +LICENSE="GPL-2" +SLOT="${PVR}" +KEYWORDS="amd64 -*" +IUSE="" + +DEPEND="" +RDEPEND="" + +QA_PREBUILT='*' + +RESTRICT="strip" + +src_install() { + mkdir -p "${ED}"/usr/src "${ED}"/lib/modules + mv lib/modules/${MY_PV} "${ED}"/lib/modules/${MY_PV} || die + mv usr/src/${MY_PV} "${ED}"/usr/src/linux-${MY_PV} || die +} + +pkg_postinst() { + if [[ -z ${ROOT} ]]; then + mount-boot_pkg_preinst + + local image_path=$(kernel-install_get_image_path) + if use initramfs; then + # putting it alongside kernel image as 'initrd' makes + # kernel-install happier + kernel-install_build_initramfs \ + "${EROOT}/usr/src/linux-${MY_PV}/${image_path%/*}/initrd" \ + "${MY_PV}" + fi + + kernel-install_install_kernel "${MY_PV}" \ + "${EROOT}/usr/src/linux-${MY_PV}/${image_path}" \ + "${EROOT}/usr/src/linux-${MY_PV}/System.map" + fi + + kernel-install_update_symlink "${EROOT}/usr/src/linux" "${MY_PV}" +} + +pkg_postrm() { + if [[ -z ${ROOT} ]] && use initramfs; then + local image_path=$(kernel-install_get_image_path) + ebegin "Removing initramfs" + rm -f "${EROOT}/usr/src/linux-${MY_PV}/${image_path%/*}/initrd" && + find "${EROOT}/usr/src/linux-${MY_PV}" -depth -type d -empty -delete + eend ${?} + fi +}