summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys-kernel/gentoo-kernel/Manifest2
-rw-r--r--sys-kernel/gentoo-kernel/gentoo-kernel-5.7.13.ebuild85
2 files changed, 87 insertions, 0 deletions
diff --git a/sys-kernel/gentoo-kernel/Manifest b/sys-kernel/gentoo-kernel/Manifest
index 41860c07bab3..81793877eb80 100644
--- a/sys-kernel/gentoo-kernel/Manifest
+++ b/sys-kernel/gentoo-kernel/Manifest
@@ -12,6 +12,8 @@ DIST genpatches-5.7-11.base.tar.xz 532736 BLAKE2B 9f5b5d8304c22cac1e081be759a673
DIST genpatches-5.7-11.extras.tar.xz 1764 BLAKE2B 655bba046d32ee61d8b026f462e35c4e58536afbfdb37de32380a253fedceeac2da42a1366ecbe0b7e156f25319f67ad61a5eb51ba762fd8958068f1f1c0d0bf SHA512 b26c720473ffdef3ac40955692660ee4645a93e2cb86a76d1583d878c3832f3c8bdcbdc23bc6838c1d0255ec86a5671d4e205cb6e99dd5a1d64405fe0081a355
DIST genpatches-5.7-13.base.tar.xz 581360 BLAKE2B 16841cdedf5ac9fd897e6c3ea6f428a4bbde48dca1c5f6d432d1c63248d6cec9157d4f0680cf340cc08703715afb32db342aa837a978c29b1874917d13454dd6 SHA512 aa15be557a74258476d777575cbe98148bb99104f221206e5d1589dfee89ab7ed2637a4e6dd044f477e3c5b0388faf399dc7241951c37a1df405981927f9973c
DIST genpatches-5.7-13.extras.tar.xz 1768 BLAKE2B 49f3af716da6e9029ca774056259e2f4521dbbcde9d453c71987d105b628934738eb96cd622ec92d338ed7fd9c17b0f99d82154b240258c299f1e55ecee938e3 SHA512 0cb1d9affd59a93596ea0c41f888a451440b6efd0788b47cfecbf6ee41b24685cf0b7c9ac43a0cb1375086809fc1423c3c2ef1bffa93eb60c4f653d473441d66
+DIST genpatches-5.7-14.base.tar.xz 608144 BLAKE2B 735617575780177615b76e35674d86e7e67b063e3582e4d71d0935ce0db603f2186c24c6b520d2c88f8279ae64b36b85c1d5ae177219dc1d2940d6af7ff6791e SHA512 001465ca190d3b222faa3084c600706d6f7a5646cfd6d4283354df298e6f715b68dfd64ba2b7315e7c852448b5071dcca9621c559adc58a93935963dd4c2e74e
+DIST genpatches-5.7-14.extras.tar.xz 1768 BLAKE2B 864a38c040d786d53eda128ca9fdb1ea51b28f2391b5eded178836469779baf282577e8ef6855616eae740f355230b9c3fa19f6da4885f210efb552cdf720cd7 SHA512 c1fe586202bfb1ccf6ae06bbf8a175bbe19ab21f6582b4ccae551d904e6c09e13faf9d938ebe78e910db9a6903135e413e3521e633d4cfa61ab93e34a5896175
DIST kernel-i686-fedora.config.5.7.8 191864 BLAKE2B 217857254ffd12e987a5bd573e2520508bc70764b6363fc2c6bda1e5be46b70528616b26167150cba32f9e57fe17883c455fed34615a216b2398017d307971db SHA512 b90c6f2cdb55bcb115d7b92752a6efd8fdc09f68acbf365b08c9ff89732745f26d2644e18cb097ffd92d75cff07dbd98a9723179a35dc72ce01a732bdd632592
DIST kernel-i686.config.5.4.21 183910 BLAKE2B 185126ffb85718bb73761d01683def80b6f002d7a7a6eddd8e858a30d8eadc863fb378d83a1cd2ed82b3540337fa66ae44475e31fb41ebc46d77005b6f54e5c0 SHA512 6307afc2295902e44fe65b1cccaa7a0260b295a5f21f1d67ec66197bd972bd3f5675b624f08d9da8b224cb3ec987d5c21cbd743599aeab9ac6214bc651f43476
DIST kernel-x86_64-fedora.config.5.7.8 192882 BLAKE2B 23044bd3625d1ced686950c1322e91dd99eddb3128ab830c8862f5c949b66df67bc9ce38b810f4d54a35f9b9f11feb58d01450593ec513e132d789e3a50ac48b SHA512 b7770da1f608e8f0ec227dbeaf66491815e9fc4f8f08f01d2ad5877dd1946e73b315e8834f35cb5fc035fc3ac52ede8365107515d54b0792f326ad937d901625
diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-5.7.13.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-5.7.13.ebuild
new file mode 100644
index 000000000000..f0988ba69fb4
--- /dev/null
+++ b/sys-kernel/gentoo-kernel/gentoo-kernel-5.7.13.ebuild
@@ -0,0 +1,85 @@
+# Copyright 2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit kernel-build
+
+MY_P=linux-${PV%.*}
+GENPATCHES_P=genpatches-${PV%.*}-$(( ${PV##*.} + 1 ))
+# https://koji.fedoraproject.org/koji/packageinfo?packageID=8
+CONFIG_VER=5.7.8
+CONFIG_HASH=14d239184a721485a823f30f5aede1c6190558ad
+
+DESCRIPTION="Linux kernel built with Gentoo patches"
+HOMEPAGE="https://www.kernel.org/"
+SRC_URI+=" https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/${MY_P}.tar.xz
+ https://dev.gentoo.org/~mpagano/dist/genpatches/${GENPATCHES_P}.base.tar.xz
+ https://dev.gentoo.org/~mpagano/dist/genpatches/${GENPATCHES_P}.extras.tar.xz
+ amd64? (
+ https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-x86_64-fedora.config
+ -> kernel-x86_64-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="~amd64 ~arm ~arm64 ~x86"
+IUSE="debug"
+REQUIRED_USE="
+ arm? ( savedconfig )
+ arm64? ( savedconfig )"
+
+RDEPEND="
+ !sys-kernel/vanilla-kernel:${SLOT}
+ !sys-kernel/vanilla-kernel-bin:${SLOT}"
+BDEPEND="
+ debug? ( dev-util/dwarves )"
+
+pkg_pretend() {
+ ewarn "Starting with 5.7.9, Distribution Kernels are switching from Arch"
+ ewarn "Linux configs to Fedora. Please keep a backup kernel just in case."
+
+ kernel-install_pkg_pretend
+}
+
+src_prepare() {
+ local PATCHES=(
+ # meh, genpatches have no directory
+ "${WORKDIR}"/*.patch
+ )
+ default
+
+ # prepare the default config
+ case ${ARCH} in
+ amd64)
+ cp "${DISTDIR}/kernel-x86_64-fedora.config.${CONFIG_VER}" .config || die
+ ;;
+ x86)
+ cp "${DISTDIR}/kernel-i686-fedora.config.${CONFIG_VER}" .config || die
+ ;;
+ arm|arm64)
+ return
+ ;;
+ *)
+ die "Unsupported arch ${ARCH}"
+ ;;
+ esac
+
+ local config_tweaks=(
+ # shove arch under the carpet!
+ -e 's:^CONFIG_DEFAULT_HOSTNAME=:&"gentoo":'
+ # we do support x32
+ -e '/CONFIG_X86_X32/s:.*:CONFIG_X86_X32=y:'
+ # disable signatures
+ -e '/CONFIG_MODULE_SIG/d'
+ -e '/CONFIG_SECURITY_LOCKDOWN/d'
+ )
+ use debug || config_tweaks+=(
+ -e '/CONFIG_DEBUG_INFO/d'
+ )
+ sed -i "${config_tweaks[@]}" .config || die
+}