summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys-kernel/vanilla-kernel/Manifest2
-rw-r--r--sys-kernel/vanilla-kernel/vanilla-kernel-5.19.4.ebuild134
2 files changed, 136 insertions, 0 deletions
diff --git a/sys-kernel/vanilla-kernel/Manifest b/sys-kernel/vanilla-kernel/Manifest
index 703ef4d0873c..170979b949ce 100644
--- a/sys-kernel/vanilla-kernel/Manifest
+++ b/sys-kernel/vanilla-kernel/Manifest
@@ -52,6 +52,8 @@ DIST linux-5.18.19.tar.sign 991 BLAKE2B e4bff93a2fb9c06613f0aefb27e159e9ae0526c2
DIST linux-5.18.19.tar.xz 129890668 BLAKE2B c02d07137bb30b429ea3c822efa1a995271cc7c07d7ea8df460e9024f66ba372d1e1fc30d80fe7f7dbab77f0c9a3821aeb2b777d2b0de161c94b46a18fb25184 SHA512 a80445c6195a9cb7922b47e0874ad1f495ecb76a28edb4b7026cb2790154d60042521a182785a2ccb83200c9ee37f38c97bd4566dcf74aa9f961c75dcc1dfa65
DIST linux-5.19.3.tar.sign 989 BLAKE2B c8540a09a15411516d75742f453e208c9a809a914e66823a42ca34038dfab6956a6a903a3b2143be4411e586ca8ed72028cb121c15dba1f7bc740ce1887fa52d SHA512 d334f567f5dd137824e8539913c97f83eb971f8179201d12c96a140519c4b3a59763516a2d7a053ac649ba4e8db5a26c948e1a51e07f0ce87e6d1d8c009b346e
DIST linux-5.19.3.tar.xz 131620076 BLAKE2B ed63387074e82e68b3433d8dcd1531aa22e1d0465729a67ff60d542597c84045af222cdead648b9de780b81efd6c421e66d1832bb204aec4a725cbd0aae93699 SHA512 a652ebf9cd2ae98a8363ac7bb0b856d8571818dadcb71ad6fcbd2b0053ac0cf4bd1361b3a6ca42330600e88a0aac60b3cfdaef0c9c7f485404a1009c1e76de92
+DIST linux-5.19.4.tar.sign 989 BLAKE2B ba3eaa69dc251491815722f35100e17ac5920d02e15bac9a5cc7151a36b3f0d6a0fd42c17854940496e3479c2c0a8d66f799b51ec81b6a517bf5a639fa9913bf SHA512 35b17075b3d620666f199ec72b3b4389e5d5f31380b80aa58036840ab9e9ecc403ccd5169f2a75642563900c97bc253b483f74ab4891236131fa78169f33c47d
+DIST linux-5.19.4.tar.xz 131611920 BLAKE2B c6c13b1b6abc8e19fc8d668b751fff395b745b3a82aecb0b95f4fcfe98bd68d8958e438d57741b18a777008ac5296b08df3418d081e807c4e8d87185b0a8a90f SHA512 1d03f5b1ecb61adb52fcb2222b4d21548ca65e9fc0dc768d7b63c984644c9998bebab78cff4ec37af0fa15e4add84bb3fbd6c1e69d4aeac39dd0c59afa9f5e62
DIST linux-5.4.203.tar.sign 991 BLAKE2B 4e13305b908e1e158c61ae0667186cfd42e7dac237624cc871f584efc68c53d5de3a90379e801f5e26655293c584ab84e16c5f87d503c1e5381b6b9e8634d8d4 SHA512 867b1ac576df3db177f8c684291aed7a2094405a8c9f18c49c2f5f1e4c68b6fe4dbd211d65cdeb07db3522a6f485c03ce4993c687c0d93d85dd8af31b60fdb4f
DIST linux-5.4.203.tar.xz 112925472 BLAKE2B 90467bcc6ca564affaa57adb0b0e0f7358dfedcb5d53309b987b239acadf6f9b5c77c4f265c7d5f8e6a6a42e9e5ed5a16cc17baeae004e2b55470c9d786de6ae SHA512 a7c7373cf5abe9ee48920b3f314020c9c552a8cd4e2eff67a32ef2f8300a789e7a7e9b78fd1a57b8a017ccc37a2d970b4abde5a85a7bd01766fc89af64cdbb69
DIST linux-5.4.209.tar.sign 991 BLAKE2B e750fa4ffd74c55e555201c23c961bb056171bd009131132868a1d0af0fe878bc798d805461162e40009014661ce91f9da2aee863286bd82b27b359c701e8beb SHA512 6647e67a9515f5ea7cff75fb6e451475ca8115223d73eadd6762fd1874f51834f63d3b03c24895db25da9b635abc583651962bafdec4ba0e2dcf22ccc9609bba
diff --git a/sys-kernel/vanilla-kernel/vanilla-kernel-5.19.4.ebuild b/sys-kernel/vanilla-kernel/vanilla-kernel-5.19.4.ebuild
new file mode 100644
index 000000000000..7d4d9d893827
--- /dev/null
+++ b/sys-kernel/vanilla-kernel/vanilla-kernel-5.19.4.ebuild
@@ -0,0 +1,134 @@
+# 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
+# forked to https://github.com/projg2/fedora-kernel-config-for-gentoo
+CONFIG_VER=5.19.3-gentoo
+GENTOO_CONFIG_VER=g2
+
+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/projg2/gentoo-kernel-config/archive/${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://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-x86_64-fedora.config
+ -> kernel-x86_64-fedora.config.${CONFIG_VER}
+ )
+ arm64? (
+ https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-aarch64-fedora.config
+ -> kernel-aarch64-fedora.config.${CONFIG_VER}
+ )
+ ppc64? (
+ https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-ppc64le-fedora.config
+ -> kernel-ppc64le-fedora.config.${CONFIG_VER}
+ )
+ x86? (
+ https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-i686-fedora.config
+ -> kernel-i686-fedora.config.${CONFIG_VER}
+ )
+"
+S=${WORKDIR}/${MY_P}
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86"
+IUSE="debug hardened"
+REQUIRED_USE="arm? ( savedconfig )"
+
+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[@]}"
+}