summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-11-11 18:12:17 +0100
committerMichał Górny <mgorny@gentoo.org>2020-11-11 19:53:08 +0100
commit9be7fde0b667b2da5dd22b35ed30d9b192311468 (patch)
treec63faa1a255b7ff63192db12c479b9c8fa4f037a /sys-kernel
parentsys-kernel/vanilla-kernel: Bump to 5.9.8 (diff)
downloadgentoo-9be7fde0b667b2da5dd22b35ed30d9b192311468.tar.gz
gentoo-9be7fde0b667b2da5dd22b35ed30d9b192311468.tar.bz2
gentoo-9be7fde0b667b2da5dd22b35ed30d9b192311468.zip
sys-kernel/gentoo-kernel: Bump to 5.9.8
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'sys-kernel')
-rw-r--r--sys-kernel/gentoo-kernel/Manifest2
-rw-r--r--sys-kernel/gentoo-kernel/gentoo-kernel-5.9.8.ebuild134
2 files changed, 136 insertions, 0 deletions
diff --git a/sys-kernel/gentoo-kernel/Manifest b/sys-kernel/gentoo-kernel/Manifest
index c074333b3277..e71fe65c4674 100644
--- a/sys-kernel/gentoo-kernel/Manifest
+++ b/sys-kernel/gentoo-kernel/Manifest
@@ -28,6 +28,8 @@ DIST genpatches-5.9-6.base.tar.xz 406744 BLAKE2B 79052b91967819329a94b796ad72d6b
DIST genpatches-5.9-6.extras.tar.xz 1764 BLAKE2B 3ea79d40f67a97fe14c5adc7c0f5bab19ab28bf37778a334c50852cbbdd91f32ff696e65e9a8f703c8573be7714447a75913c1783118d7b8acaaedab8518075b SHA512 d0f470637202283ae8295bf822b86609f426023fa6f0c00b1a3c0cce461d005c3804bfc7cdbcf965ef9d6a2e68917c2fdbcd30329e551b91d50055106c4f5cc8
DIST genpatches-5.9-7.base.tar.xz 442956 BLAKE2B 7ec729466553d58b07b6abd4c1aacf237c05e3993fe29f07c75e0800e2f7c7d821543bf39d6c31353b15107f645f60eebe6411507cc5eef414d1abcf0017a165 SHA512 980ff432cf5bafb6e0749bee0b0917e988b658575b60393b8074f70ceaa410950d01ee394f8f55a9d5a48fa75da619b9298e8810d6d3f28d809c067b9dbc3d25
DIST genpatches-5.9-7.extras.tar.xz 1764 BLAKE2B c39d139cf19dd6b1af3f196d25c1d4840536c1f390d950a19489be11a45ef4c0ca26fcb0d516a6901c9e128c070f18ec46508ff2c60c8015159edf6b34fc057b SHA512 4c817a1969cd5efac3bced43c09ba206dfa6475e0ba3923bae7a0cd4d90127480acff8ac22703dcad33d43f78a60b3e5919891d1c9eae6597330f30028bfdf66
+DIST genpatches-5.9-8.base.tar.xz 443192 BLAKE2B 48c79a97fe1201bab87ba601feac1e05ce12f2db155e53e0a543c7994ba8dfcac75b17e315929c0b68b8136913fdf93005690ccb260640ccc31527088beb326b SHA512 c365018bcfe84ff64a8171951fd4f97bb89044633df137926d22bedc738cd17ebe72c26800eaf30171c3495ce2b1bfdc93866112756bdd2207e6e184b5f1fb6f
+DIST genpatches-5.9-8.extras.tar.xz 1768 BLAKE2B 96413f75c606fe4515d0facb8f0ca784702bb5d83591af87fb4bcf2b6c5e135eabcc55e0e84be9ecd3854ec108b8ed93cff11c41e7efba8c45aadefa291cacff SHA512 646efb1f6e0b9252b0220aa5922b0c0d8f093dba8edb7e40e127680c8a471aa49724f9591a3147925d7a4084af8d5e1cc5f78b0e72297072fd15bd13d1c93e40
DIST kernel-aarch64-fedora.config.5.8.5 215148 BLAKE2B c71380f46c1b37e9e17bab6d78907114369b377bcbdb54afa2c35b6a222937fd061f25309d8de0cc78ef2329ede7192722270acceeaa3da4629a5f58d8fee809 SHA512 e86e2c60e88b1ea5968db1a471d7d928ccb3146fe850f8f2813ef315f2de0cbfa0daa2f6828dee71acb2299f65f05fc0b6f1572a82fb146ae9f53a905fe94e97
DIST kernel-aarch64-fedora.config.5.9.0 217558 BLAKE2B 38e3c31b710c30d29dbf0b5304c2b9e0615af08ec11a01318bc0c4811b91a0803a96483e986f3dd83369b14e9329bdeb0e0d834761af9a644d831eba43eb910d SHA512 d38d05aef2a809207a186eacc365118d68e7ef82939b45ac5b9038cb493c771f8fa10009a0082f36c79c2e6b5b2ec193a6b1f50bc51a6190b77f57ab7cf237a1
DIST kernel-aarch64-fedora.config.5.9.2 217893 BLAKE2B 03a36c1fe81a16b434cd94bad3984bf8984808b2e7092089f9a23a565c6d9bc8a512baa4e5754633783ef47feb6cc67010a0093f096e5a15db0f13aaaf6d6426 SHA512 ebe29150ae625cf2f285649984c27246ef85cc13f0b5d4e40dd3ef479489aaa09b6ee4aee859d6e4361dd7e7b4432db8aec077a099a25e90609b9eac2d42802d
diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-5.9.8.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-5.9.8.ebuild
new file mode 100644
index 000000000000..7c6993768c3c
--- /dev/null
+++ b/sys-kernel/gentoo-kernel/gentoo-kernel-5.9.8.ebuild
@@ -0,0 +1,134 @@
+# 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##*.}
+# https://koji.fedoraproject.org/koji/packageinfo?packageID=8
+CONFIG_VER=5.9.2
+CONFIG_HASH=94a4277f8827d1b2c911deabe56e7d929dc93146
+
+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}
+ )
+ 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="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+IUSE="debug"
+REQUIRED_USE="arm? ( 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
+ ;;
+ arm)
+ return
+ ;;
+ arm64)
+ cp "${DISTDIR}/kernel-aarch64-fedora.config.${CONFIG_VER}" .config || die
+ ;;
+ ppc64)
+ cp "${DISTDIR}/kernel-ppc64le-fedora.config.${CONFIG_VER}" .config || die
+ ;;
+ x86)
+ cp "${DISTDIR}/kernel-i686-fedora.config.${CONFIG_VER}" .config || die
+ ;;
+ *)
+ die "Unsupported arch ${ARCH}"
+ ;;
+ esac
+
+ local config_tweaks=(
+ # replace (none) with gentoo
+ -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'
+ -e '/CONFIG_KEXEC_SIG/d'
+ -e '/CONFIG_KEXEC_BZIMAGE_VERIFY_SIG/d'
+ -e '/CONFIG_SYSTEM_EXTRA_CERTIFICATE/d'
+ -e '/CONFIG_SIGNATURE/d'
+ # remove massive array of LSMs
+ -e 's/CONFIG_LSM=.*/CONFIG_LSM="yama"/'
+ -e 's/CONFIG_DEFAULT_SECURITY_SELINUX=y/CONFIG_DEFAULT_SECURITY_DAC=y/'
+ # nobody actually wants fips
+ -e '/CONFIG_CRYPTO_FIPS/d'
+ # these tests are really not necessary
+ -e 's/.*CONFIG_CRYPTO_MANAGER_DISABLE_TESTS.*/CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y/'
+ # probably not needed by anybody but developers
+ -e '/CONFIG_CRYPTO_STATS/d'
+ # 1000hz is excessive for laptops
+ -e 's/CONFIG_HZ_1000=y/CONFIG_HZ_300=y/'
+ # nobody is using this kernel on insane super computers
+ -e 's/CONFIG_NR_CPUS=.*/CONFIG_NR_CPUS=512/'
+ # we're not actually producing live patches for folks
+ -e 's/CONFIG_LIVEPATCH=y/CONFIG_LIVEPATCH=n/'
+ # this slows down networking in general
+ -e 's/CONFIG_IP_FIB_TRIE_STATS=y/CONFIG_IP_FIB_TRIE_STATS=n/'
+ # include font for normal and hidpi screens
+ -e 's/.*CONFIG_FONTS.*/CONFIG_FONTS=y\nCONFIG_FONT_8x16=y\nCONFIG_FONT_TER16x32=y/'
+ # we don't need to actually install system headers from this ebuild
+ -e '/CONFIG_HEADERS_INSTALL/d'
+ # enable /proc/config.gz, used by linux-info.eclass
+ -e '/CONFIG_IKCONFIG/s:.*:CONFIG_IKCONFIG=y\nCONFIG_IKCONFIG_PROC=y:'
+ )
+ use debug || config_tweaks+=(
+ -e '/CONFIG_DEBUG_INFO/d'
+ -e '/CONFIG_DEBUG_RODATA_TEST/d'
+ -e '/CONFIG_DEBUG_VM/d'
+ -e '/CONFIG_DEBUG_SHIRQ/d'
+ -e '/CONFIG_DEBUG_LIST/d'
+ -e '/CONFIG_BUG_ON_DATA_CORRUPTION/d'
+ -e '/CONFIG_TORTURE_TEST/d'
+ -e '/CONFIG_BOOTTIME_TRACING/d'
+ -e '/CONFIG_RING_BUFFER_BENCHMARK/d'
+ -e '/CONFIG_X86_DECODER_SELFTEST/d'
+ -e '/CONFIG_KGDB/d'
+ )
+ sed -i "${config_tweaks[@]}" .config || die
+}