summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys-kernel/vanilla-kernel/Manifest2
-rw-r--r--sys-kernel/vanilla-kernel/vanilla-kernel-5.4.151.ebuild108
2 files changed, 110 insertions, 0 deletions
diff --git a/sys-kernel/vanilla-kernel/Manifest b/sys-kernel/vanilla-kernel/Manifest
index e978375e0799..89bcee645060 100644
--- a/sys-kernel/vanilla-kernel/Manifest
+++ b/sys-kernel/vanilla-kernel/Manifest
@@ -39,3 +39,5 @@ DIST linux-5.4.149.tar.sign 991 BLAKE2B 879b5dc9582b207bcc3c7f596cd69b16b0aeae26
DIST linux-5.4.149.tar.xz 109157092 BLAKE2B ae84c14229bb8b60d6e471b9ec5d972c7b25ffc1ed50763d8c2a3b5862adfa1deab28a7cdbcb06741e61fa6b6217d2392855d3a7e84c9313a9d07bfba16e426c SHA512 74cab8eeb345da9842ad87ea92563c928cb91b94bd056a250adf5b07f68f2ab28bce2f09a80e9ba3b1b6833807350f01a7661066cb08015d814a6886cca46783
DIST linux-5.4.150.tar.sign 991 BLAKE2B 6292a8c6bc16f62201d95a170e5df7b1edd9f33ee4274a3ebaf908cabcabee740e376f92eefbcf36efbbca6200682622a80f573cf7f872978d263d2dd44595eb SHA512 cf6925f0f9307ec7ebb4345c84a74fdf98102e0a3866dc997c765f7f836be5101ae34d0655a4c5c1c632182da962ea49389056358661763eeacb4ed5814a094c
DIST linux-5.4.150.tar.xz 109155076 BLAKE2B e34c474778d2ba1a619551fdb6c81be01ed0d155ab447bfcbe497c2258637b939fc1dda7d7161d8782e38d8c84e9fc94043d62a43698258594fdd6cfea8ac79b SHA512 5f6cc5852cb1e881027b8724920dd03b96f3ce2a58353ada6f7cf5bb0bffb3a8d4ded708f50963074ff41236e8c0aeaa7f81df0ac8e4f1147a7c4a0160c2c543
+DIST linux-5.4.151.tar.sign 991 BLAKE2B 26cc28a8ea886acbd2bf16e23be6e5368958a91f2e3d403ce7a90f94c427ffc05a3edb670367f4f3934cca31b0213b85743f98554fda6b1a7b50577cad90b391 SHA512 95fded48c138d70f5c7df0828c23b2575fed66fb703128b61e8f59de282569aab7f45bae6f2ba9f1dec256a96cda987023246b53f42102ac339b418b63e67be6
+DIST linux-5.4.151.tar.xz 109163992 BLAKE2B 12c2d24acab896ccf0d6edeea3d38fbfecda4621dddce4d5ef916b6face70a509cde8ae35ada5a65eb08c79afdbe4c84544a63e52c712d8d42682dd8559df296 SHA512 e210b9cdb47e5dc294688e23dffdd853bca96bdd613d6f476c291e1c949e185be2047735c69c01602c46d0bf767367975bf08b7b6976297b6a486529b0418982
diff --git a/sys-kernel/vanilla-kernel/vanilla-kernel-5.4.151.ebuild b/sys-kernel/vanilla-kernel/vanilla-kernel-5.4.151.ebuild
new file mode 100644
index 000000000000..dc33930084ad
--- /dev/null
+++ b/sys-kernel/vanilla-kernel/vanilla-kernel-5.4.151.ebuild
@@ -0,0 +1,108 @@
+# Copyright 2020-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit kernel-build verify-sig
+
+MY_P=linux-${PV}
+# https://koji.fedoraproject.org/koji/packageinfo?packageID=8
+CONFIG_VER=5.4.21
+CONFIG_HASH=2809b7faa6a8cb232cd825096c146b7bdc1e08ea
+GENTOO_CONFIG_VER=5.4.114
+
+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.config
+ -> kernel-x86_64.config.${CONFIG_VER}
+ )
+ arm64? (
+ https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-aarch64.config
+ -> kernel-aarch64.config.${CONFIG_VER}
+ )
+ ppc64? (
+ https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-ppc64le.config
+ -> kernel-ppc64le.config.${CONFIG_VER}
+ )
+ x86? (
+ https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-i686.config
+ -> kernel-i686.config.${CONFIG_VER}
+ )"
+S=${WORKDIR}/${MY_P}
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~arm64 ~x86"
+IUSE="debug"
+
+RDEPEND="
+ !sys-kernel/vanilla-kernel-bin:${SLOT}"
+BDEPEND="
+ debug? ( dev-util/pahole )
+ verify-sig? ( app-crypt/openpgp-keys-kernel )"
+PDEPEND="
+ >=virtual/dist-kernel-${PV}"
+
+VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/kernel.org.asc
+
+pkg_pretend() {
+ ewarn "Starting with 5.4.52, Distribution Kernels are switching from Arch"
+ ewarn "Linux configs to Fedora. Please keep a backup kernel just in case."
+
+ kernel-install_pkg_pretend
+}
+
+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
+
+ # prepare the default config
+ case ${ARCH} in
+ amd64)
+ cp "${DISTDIR}/kernel-x86_64.config.${CONFIG_VER}" .config || die
+ ;;
+ arm64)
+ cp "${DISTDIR}/kernel-aarch64.config.${CONFIG_VER}" .config || die
+ ;;
+ ppc64)
+ cp "${DISTDIR}/kernel-ppc64le.config.${CONFIG_VER}" .config || die
+ ;;
+ x86)
+ cp "${DISTDIR}/kernel-i686.config.${CONFIG_VER}" .config || die
+ ;;
+ *)
+ die "Unsupported arch ${ARCH}"
+ ;;
+ esac
+
+ echo 'CONFIG_LOCALVERSION="-dist"' > "${T}"/version.config || die
+ local merge_configs=(
+ "${T}"/version.config
+ "${WORKDIR}/gentoo-kernel-config-${GENTOO_CONFIG_VER}"/base.config
+ )
+ use debug || merge_configs+=(
+ "${WORKDIR}/gentoo-kernel-config-${GENTOO_CONFIG_VER}"/no-debug.config
+ )
+ [[ ${ARCH} == x86 ]] && merge_configs+=(
+ "${WORKDIR}/gentoo-kernel-config-${GENTOO_CONFIG_VER}"/32-bit.config
+ )
+
+ kernel-build_merge_configs "${merge_configs[@]}"
+}