summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys-kernel/vanilla-kernel/Manifest2
-rw-r--r--sys-kernel/vanilla-kernel/vanilla-kernel-5.16.7.ebuild132
2 files changed, 134 insertions, 0 deletions
diff --git a/sys-kernel/vanilla-kernel/Manifest b/sys-kernel/vanilla-kernel/Manifest
index 2001fac7336a..fbbbbd3c0090 100644
--- a/sys-kernel/vanilla-kernel/Manifest
+++ b/sys-kernel/vanilla-kernel/Manifest
@@ -28,6 +28,8 @@ DIST linux-5.16.5.tar.sign 989 BLAKE2B a55d8da745785fb479519fd9daf745bae4be54e2b
DIST linux-5.16.5.tar.xz 127552076 BLAKE2B 9eccc20c59a93aa21349ce99b88638de8bb0589037e91143d23932cb5312878bac7ae95adfd0f95b79ad0085f74109577427675320e4a2548f8762661dcdc8e4 SHA512 bb87573623a275a8860728e9586f0e63aba7bd868de55ce27871f615e9b174aeb18c3faefc41e3d656bc998768fa3e3c6097e9d39c32fea48d3769f46c48a2f2
DIST linux-5.16.6.tar.sign 989 BLAKE2B 49eab210f7029b8a24cbaec467cd5b1ead4b22a00d3132fcc619aa9c0ed126cbf3f763f8af49447a4a258d990a5a707880e2b5705b4310c066aaf41a54086384 SHA512 b1f241b097bb7678b06b361f35060c1d0846d5a3001b98238b7a81c3fa965b9eb8af13144bd6f4914fc47b16f2810ddc7b25c60605aeb99fa03a705f5c024b2e
DIST linux-5.16.6.tar.xz 127541436 BLAKE2B ad852ae600f033fbdec4d507a523dc12d0b230c9c498d5147d39c707516b6bccc15fc23bca75c6b1ca17a02647de3074b1a8d03fc62ac8081ff78c1507e7f504 SHA512 5fd0b2f0ff7d8f6f96f0b979b391baae97488385ef92cbb1d86bd49471ecc5c08e543f01b760f30df4a5b5551889b1aa3a3b801f97fef9230d65d17470f64c48
+DIST linux-5.16.7.tar.sign 989 BLAKE2B 0680d8209777e1f9a9fd596409600d014f69038f8c4ace91371513e5ebca31233c88a238961f4815faa9861bc424369d7abb7488fc3881e9945aaf3e2a1d18b4 SHA512 8cc4ca11663de4a466192307c38e7d97661ed6e55a0512fa02dc74184e939bbbedf40ab014517c85d06f5ddb481d705367233cdff6baa9cdac15eda587c6e672
+DIST linux-5.16.7.tar.xz 127547880 BLAKE2B 3b77442d05fe1550f608f8e715e99eba099270b409f2a0adf4acf5298b75c3bf4087f730174b3f4b3fc31214ccc62dd80d194e78d9b906e1fc8e06227f933225 SHA512 db21a01720921ebca5d462b828c661be3edcd0c6f62e20a187aff95b1f8579b119cc7d5443fac14f9372dba41764cf01b50a484eabfad33dcb6b06d2e1268a17
DIST linux-5.4.176.tar.sign 991 BLAKE2B 6eda9712c42bcd44a52f6ac603bb0d4c2698583b18de38d845a22ad0e11ef3d59f415d2bd45ca3cc2cba6a46da72b91dbf45e9d444e97bac710f3a3a9339ed9e SHA512 7482201bba56cd484a1d4b0fd8c27d5fe59202197a4e4c38324fafe79695216ad4f0e3c4cd5e0f3f9a4c5834ba0796c332cdfcefe91036d28ca4637672afe2d7
DIST linux-5.4.176.tar.xz 112880184 BLAKE2B af66cb30d3f9ff38f6e11cec51f355a4c3decec22f5227e3c0b095b09c735a239fdf1c2b3c5af557d7c642e6c25840986e115260049cf2287ef0d70fd1d35a4a SHA512 99b489523813446007f3bff117cf12a0c3f6f09c00bbeb2cb825c1ea56aef3f2f10d6f2a9454679b35a3024f8dff4e00ac8da480e35a29c7d9775b9ecda6445c
DIST linux-5.4.177.tar.sign 991 BLAKE2B d285ee715f43e2fe7aee5556baec4355a479dd14020a0a1753d9f5e541e50a24714563dd5de2e535df20f608c39d1bcbaf55b422208d9280ced2772e25115a7f SHA512 e9f38cbd706aa0df45d30e3c5d8f3b79843cd29f362ceed4ed2dfc868b64285da3e679640ca50670b80b6dcfe9144903f504ccaa4f4c70f3b5e5311b29ad509e
diff --git a/sys-kernel/vanilla-kernel/vanilla-kernel-5.16.7.ebuild b/sys-kernel/vanilla-kernel/vanilla-kernel-5.16.7.ebuild
new file mode 100644
index 000000000000..c18c2d7a260e
--- /dev/null
+++ b/sys-kernel/vanilla-kernel/vanilla-kernel-5.16.7.ebuild
@@ -0,0 +1,132 @@
+# Copyright 2020-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit kernel-build toolchain-funcs verify-sig
+
+MY_P=linux-${PV}
+# https://koji.fedoraproject.org/koji/packageinfo?packageID=8
+CONFIG_VER=5.16.5
+CONFIG_HASH=07359bfbe209ebc2bf6ff2f7b52eb69cc36e21fb
+GENTOO_CONFIG_VER=5.15.5
+
+DESCRIPTION="Linux kernel built from vanilla upstream sources"
+HOMEPAGE="https://www.kernel.org/"
+SRC_URI+=" https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/${MY_P}.tar.xz
+ https://github.com/mgorny/gentoo-kernel-config/archive/v${GENTOO_CONFIG_VER}.tar.gz
+ -> gentoo-kernel-config-${GENTOO_CONFIG_VER}.tar.gz
+ verify-sig? (
+ https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/${MY_P}.tar.sign
+ )
+ amd64? (
+ https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-x86_64-fedora.config
+ -> kernel-x86_64-fedora.config.${CONFIG_VER}
+ )
+ arm64? (
+ https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-aarch64-fedora.config
+ -> kernel-aarch64-fedora.config.${CONFIG_VER}
+ )
+ ppc64? (
+ https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-ppc64le-fedora.config
+ -> kernel-ppc64le-fedora.config.${CONFIG_VER}
+ )
+ x86? (
+ https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-i686-fedora.config
+ -> kernel-i686-fedora.config.${CONFIG_VER}
+ )"
+S=${WORKDIR}/${MY_P}
+
+LICENSE="GPL-2"
+KEYWORDS="~arm64"
+IUSE="debug hardened"
+REQUIRED_USE="arm? ( savedconfig )"
+
+RDEPEND="
+ !sys-kernel/vanilla-kernel-bin:${SLOT}"
+BDEPEND="
+ debug? ( dev-util/pahole )
+ verify-sig? ( sec-keys/openpgp-keys-kernel )"
+PDEPEND="
+ >=virtual/dist-kernel-${PV}"
+
+VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/kernel.org.asc
+
+src_unpack() {
+ if use verify-sig; then
+ einfo "Unpacking linux-${PV}.tar.xz ..."
+ verify-sig_verify_detached - "${DISTDIR}"/linux-${PV}.tar.sign \
+ < <(xz -cd "${DISTDIR}"/linux-${PV}.tar.xz | tee >(tar -x))
+ assert "Unpack failed"
+ unpack "gentoo-kernel-config-${GENTOO_CONFIG_VER}.tar.gz"
+ else
+ default
+ fi
+}
+
+src_prepare() {
+ default
+
+ local biendian=false
+
+ # prepare the default config
+ case ${ARCH} in
+ amd64)
+ cp "${DISTDIR}/kernel-x86_64-fedora.config.${CONFIG_VER}" .config || die
+ ;;
+ arm)
+ return
+ ;;
+ arm64)
+ cp "${DISTDIR}/kernel-aarch64-fedora.config.${CONFIG_VER}" .config || die
+ biendian=true
+ ;;
+ hppa)
+ return
+ ;;
+ ppc)
+ # assume powermac/powerbook defconfig
+ # we still package.use.force savedconfig
+ cp "${WORKDIR}/${MY_P}/arch/powerpc/configs/pmac32_defconfig" .config || die
+ ;;
+ ppc64)
+ cp "${DISTDIR}/kernel-ppc64le-fedora.config.${CONFIG_VER}" .config || die
+ biendian=true
+ ;;
+ x86)
+ cp "${DISTDIR}/kernel-i686-fedora.config.${CONFIG_VER}" .config || die
+ ;;
+ *)
+ die "Unsupported arch ${ARCH}"
+ ;;
+ esac
+
+ local myversion="-dist"
+ use hardened && myversion+="-hardened"
+ echo "CONFIG_LOCALVERSION=\"${myversion}\"" > "${T}"/version.config || die
+ local dist_conf_path="${WORKDIR}/gentoo-kernel-config-${GENTOO_CONFIG_VER}"
+
+ local merge_configs=(
+ "${T}"/version.config
+ "${dist_conf_path}"/base.config
+ )
+ use debug || merge_configs+=(
+ "${dist_conf_path}"/no-debug.config
+ )
+ if use hardened; then
+ merge_configs+=( "${dist_conf_path}"/hardened-base.config )
+
+ tc-is-gcc && merge_configs+=( "${dist_conf_path}"/hardened-gcc-plugins.config )
+
+ if [[ -f "${dist_conf_path}/hardened-${ARCH}.config" ]]; then
+ merge_configs+=( "${dist_conf_path}/hardened-${ARCH}.config" )
+ fi
+ fi
+
+ # this covers ppc64 and aarch64_be only for now
+ if [[ ${biendian} == true && $(tc-endian) == big ]]; then
+ merge_configs+=( "${dist_conf_path}/big-endian.config" )
+ fi
+
+ kernel-build_merge_configs "${merge_configs[@]}"
+}