summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-11-01 23:16:45 +0100
committerMichał Górny <mgorny@gentoo.org>2020-11-02 10:48:48 +0100
commit4b6d4bf4e72bd36b32d9fff83b666221bdcf6f23 (patch)
treeaa926b8284df111680cec68c911371bdb08ef9dd
parentsys-kernel/vanilla-kernel: Bump to 5.8.18 (diff)
downloadgentoo-4b6d4bf4e72bd36b32d9fff83b666221bdcf6f23.tar.gz
gentoo-4b6d4bf4e72bd36b32d9fff83b666221bdcf6f23.tar.bz2
gentoo-4b6d4bf4e72bd36b32d9fff83b666221bdcf6f23.zip
sys-kernel/gentoo-kernel: Bump to 5.8.18
Signed-off-by: Michał Górny <mgorny@gentoo.org>
-rw-r--r--sys-kernel/gentoo-kernel/Manifest2
-rw-r--r--sys-kernel/gentoo-kernel/gentoo-kernel-5.8.18.ebuild134
2 files changed, 136 insertions, 0 deletions
diff --git a/sys-kernel/gentoo-kernel/Manifest b/sys-kernel/gentoo-kernel/Manifest
index 0504bd59886e..552813b25f91 100644
--- a/sys-kernel/gentoo-kernel/Manifest
+++ b/sys-kernel/gentoo-kernel/Manifest
@@ -8,6 +8,8 @@ DIST genpatches-5.8-19.base.tar.xz 596728 BLAKE2B ceb6cd57b593b5a2c02f00cefc6103
DIST genpatches-5.8-19.extras.tar.xz 1772 BLAKE2B c42390c17040a6557054835df177fe87ee124bcdcea91e1a63d50ed8e07a10044d639616497e02082fbb67a708ed408bd1e94a3c9d5b7c7b0c7daeca2bfc65df SHA512 3ba07566f1e721521676b862ca51654638400eeda4f216cdfb860b0639b7a611b2ff2e9659007486841e9a1afa8c05a9454abae87abbc7dff8af396bd0d7100a
DIST genpatches-5.8-20.base.tar.xz 752808 BLAKE2B 6997bcd2b7dcf27f894e521fd95a77fc774ed23c3bf515a4dd3f633aa0d91feaf6f59850d56063bdb07ec7e01a720f17b61b6d32639d6c7b7cebd5cfb722b41e SHA512 59bdfcb2b74c343d673b14a1ede1bd8e726430fccc5b4f87d9edcd8986c5de7d8f473e10713fec5d922ba3949c9ce794438885b00cb125dd896f8e66eefe71ff
DIST genpatches-5.8-20.extras.tar.xz 1772 BLAKE2B 2870067f79484d9c308dcc313ab38add3c577cdd29a718c5798ef3bf84867fe9dac12006bbc9343e82b08425aeb2100df44a9c607c4a28293c1c986683085384 SHA512 96bf218671a1fa8865e040cb9d5433b638f16689e975f892cff8c687f8963377d1c6d7e1face94bed8d3b21e2f87f28fbd55dcf027d185239721330b326c8aa3
+DIST genpatches-5.8-21.base.tar.xz 783528 BLAKE2B 8b4e64de64d97f069014d353e45aab7900b37f508ed8e99eb469797df4780f715e0c038fbeff4b8ebb34e81c935dfd7df3eb63324121e31c1dd07591b3159a3a SHA512 4485056f47723e14f5248854edcd4353562c5ec6cb95c926310815e5bf5514d5d8edce16a241dc3d881c57832333f950562b092c21f2555a6838b9106ff329a4
+DIST genpatches-5.8-21.extras.tar.xz 1768 BLAKE2B 238c16ed6628c2fd379fa46cf700038c08358e26af5fd4e7f1037626e2057fcbf224df72a6bd1df4b95fa896793539108294d3523118ee7a6cb7e39604e91112 SHA512 c14b718bf292707472edff04b022c722f45330b7750dd4b7b507347b0a9a29ebd236e16f01c03b6aa85bacc9220b420f5108f7728e88e6566dbb888efdbce714
DIST genpatches-5.9-2.base.tar.xz 9332 BLAKE2B cfccc2ebc7e067c7326f95627470a01f818f3c64db87ca26406bd3fa71429593a4460cf82d5891961eee69cbce667c850439f512650131013025491804486510 SHA512 af9c158cf65c5aa5d678d4ffeb7395051a9706521684f3a984f47d6ad581652978eb8f0a4de0132a3603b63fa7f34fb8b18a76bca5d4d312672c89f3fa221fa8
DIST genpatches-5.9-2.extras.tar.xz 1768 BLAKE2B 1e9312bc96d30b85ff628a67bed4bf2ded3eb2231d804158d343d64ce6a1be3d313bcdf84406cfa34045df9aa239ae1ed476f838ff466e0df96b60b28caa15b8 SHA512 58b19bd67b573657c44861d65792fb7fed0c430a554e95b2dc41a3f53ec8a50e68f89130a68ae0167de9ba98076326ae843264d76a178efaecece90121d0f337
DIST genpatches-5.9-3.base.tar.xz 237460 BLAKE2B 44d94786733cb0b016448002e5ed8792285d7b53751d460d735f5175491f6530b15144daca1cf599a4cb492244eb74e252563433a1bc77dca34000e26a736c71 SHA512 84a0311d6c1c53c73d79409d43e6aebe600ffca76da077885d76ea7fced2c23f30cf06a5c60d8d8657d3e5988cc5cd0192f68d582f458ff3de3a90744e8d31b7
diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-5.8.18.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-5.8.18.ebuild
new file mode 100644
index 000000000000..1527024779c4
--- /dev/null
+++ b/sys-kernel/gentoo-kernel/gentoo-kernel-5.8.18.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##*.} + 3 ))
+# https://koji.fedoraproject.org/koji/packageinfo?packageID=8
+CONFIG_VER=5.8.5
+CONFIG_HASH=af8da8d54d21231fd8c7b943216bb985f0a4e223
+
+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
+}