summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-kernel/vanilla-kernel')
-rw-r--r--sys-kernel/vanilla-kernel/Manifest2
-rw-r--r--sys-kernel/vanilla-kernel/vanilla-kernel-5.19.16.ebuild134
2 files changed, 136 insertions, 0 deletions
diff --git a/sys-kernel/vanilla-kernel/Manifest b/sys-kernel/vanilla-kernel/Manifest
index 2108ccb04d2d..e8085b93936b 100644
--- a/sys-kernel/vanilla-kernel/Manifest
+++ b/sys-kernel/vanilla-kernel/Manifest
@@ -36,6 +36,8 @@ DIST linux-5.19.14.tar.sign 991 BLAKE2B 33280f855e00b93f803e6f982b129e199748925f
DIST linux-5.19.14.tar.xz 131644196 BLAKE2B 459f07c79b36b9edaff06f4fb183bd209af2e51c968b2ee2883f9664eac1cf569b59e3fb9b943c1eef50362af3a41603ce367df1895a1f77571ba491160131fe SHA512 19e584735009f0cedd08c94b2cc75cb6b0706a5aacd13a57995cab4f4a304bec42e9f0151bac1712d117b88c211fb84092b6eda723f9ab06289f37930ce1079a
DIST linux-5.19.15.tar.sign 991 BLAKE2B aede577f11f17168beb5a24e45cbc3f4ade60c9d7df70d7584d829577b5f55e34cac4b546e3f36b8284e011e410c127928970386b2e14993b0e92352c9d2996e SHA512 a7a94b95d1dc5b3f9fd8448cd8ee4c48671cca724aad3cfbec60bde36ade6c0abebaa392f35f4f2c0530914c1a9b63f5df351a072c21ef8b3dc450cd0c2b7c7c
DIST linux-5.19.15.tar.xz 131651164 BLAKE2B 1115c4b6d279d89b8abdbe847a748e89ebcbe127ad99465190e10fe7f72a9546f42c0b627f0633b99ded6a23e22ca696bbd92f4387b43b5beaebc2f894d3ffab SHA512 55c208be24d4851a939fd91285b05e968a7c8be5aa29a92f0b2df5622b4a05ffd43a158f92f6f5f872119ea99b9ed67286c225f6dab3b9765672f7475ece686d
+DIST linux-5.19.16.tar.sign 991 BLAKE2B eed8ba71c0c0247a125d8f9babec75d0f9ead0b034123862e0c1ad8a5513ff1ce045cdb3fac7c822bd97b5926c068849aa647fd8d414f3f236baca8825ccd4d0 SHA512 f89d029af39a5b70b37465f91f04915493d3b1a0f2fa42160e7b63261b1639d2b75e395200c5443676b3f2f619014e46fd715ea0f2a1f2f9a2a6c22df73fc972
+DIST linux-5.19.16.tar.xz 131631784 BLAKE2B 401e87fc4172c597228a3d58d95d89a8ce015662928a60bd527e2040786ab368b5b6d9d7f3dfa177f7608baea3b49f786c1d0efd93bb25d642d557b93f3d29c8 SHA512 1ff662424830fbd48ac1d8c1aabd4d11a8eabc284c4fe3fdf803064d4f56d9c1b631a0fb60679bac40a4e05b77d5e6706a8fd52a5e025ef4f1231a6cc84bbbde
DIST linux-5.4.217.tar.sign 991 BLAKE2B e013f0bdc76cd45a30b9868daffea48537cf6c11479cf1622cf062f52400b4c9b02aa7f963ec7f8d977c32a012d2d99cb8c78e7c07f165b4479b5f4c306ae70e SHA512 99e380d449b8005c721d6150b42f8424a4b034ed61c21c3c6c5dd488f42837d064690e448c3ea03aa08928597602605b560d629d44bac44f09b67f129b7e4866
DIST linux-5.4.217.tar.xz 112963732 BLAKE2B 42e028707aaee1526e5d608173206c386bc02c130410a7127efe7b97a3af8dc98ddb25688cc894df2c1124b81924471a764202d53a35b4177beafef21396fe68 SHA512 f2f7c0843f73dad58d00a283327bbf1aa4c103db7b8b7060ab58013e084601a4603632d6e43a4ea2d2958a5ae20fcafa6b5ae14a11da00b4185028b50c427909
DIST linux-5.4.218.tar.sign 991 BLAKE2B 821db66087ca8264ce3499cae2113868341f8ee176964b8dac7a156a62ce399b3dfc1ea4a199a7bb3e2f8d509087397dfb3981bde83226557529af835fcab512 SHA512 3eb5ec1f2ee535c3c6ec9c9ac021d3339a953cbc97bddba178491267a7ff19f2c73d89aa9b7c1dc2b851e27e83e4c5bbe1c67b66ab8a1059bb851cf178fa4af6
diff --git a/sys-kernel/vanilla-kernel/vanilla-kernel-5.19.16.ebuild b/sys-kernel/vanilla-kernel/vanilla-kernel-5.19.16.ebuild
new file mode 100644
index 000000000000..43e75eed5fa0
--- /dev/null
+++ b/sys-kernel/vanilla-kernel/vanilla-kernel-5.19.16.ebuild
@@ -0,0 +1,134 @@
+# Copyright 2020-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+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.13-gentoo
+GENTOO_CONFIG_VER=g3
+
+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[@]}"
+}