summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-10-15 03:52:28 +0200
committerMichał Górny <mgorny@gentoo.org>2020-10-15 14:39:20 +0200
commit9630d0315a890c6c0bcfe1488c645700d715b627 (patch)
tree4ffca11faf2b5cbd306666acd2127e7c8674b20a /sys-kernel
parentsys-kernel/vanilla-kernel: Bump to 5.8.15 (diff)
downloadgentoo-9630d0315a890c6c0bcfe1488c645700d715b627.tar.gz
gentoo-9630d0315a890c6c0bcfe1488c645700d715b627.tar.bz2
gentoo-9630d0315a890c6c0bcfe1488c645700d715b627.zip
sys-kernel/gentoo-kernel: Bump to 5.8.15
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.8.15.ebuild134
2 files changed, 136 insertions, 0 deletions
diff --git a/sys-kernel/gentoo-kernel/Manifest b/sys-kernel/gentoo-kernel/Manifest
index fd37348dd3f9..41398b4af2f7 100644
--- a/sys-kernel/gentoo-kernel/Manifest
+++ b/sys-kernel/gentoo-kernel/Manifest
@@ -16,6 +16,8 @@ DIST genpatches-5.8-16.base.tar.xz 525416 BLAKE2B 53b0e2548b25b93999650cdf8eb920
DIST genpatches-5.8-16.extras.tar.xz 1772 BLAKE2B 60238a48924010a7ebe1214de7835522ad1ad5b156dd3bba13d315ad753f69ce7b82a5265bd4f8d8631699304526fd44279ba27413f10cc4f19e1a60880cf30b SHA512 f9760259d90cae491252c409c6521ca5285bc0f7655795055db8bbf7c5e2ca65948ffc5541d2c4499f6255e4462884a90cc3b2db485f37e6133ba03c1a519751
DIST genpatches-5.8-17.base.tar.xz 547680 BLAKE2B ea21c869fba01bfa213444c19deb4e8c3bf312746ec0b17e6f407dac00e8c19c6d60e4e243ff5e16605b413c3aa763db9a8d91907fbd57c7443ef48b7f93a344 SHA512 7d66e6cad6a4aea50fb996608c45896c52cfb1797da24a486c9cfd0afd3121886fdba4ba91a044af2774c92805232ce988bd0b82cea0618c29c17f2cc3407905
DIST genpatches-5.8-17.extras.tar.xz 1768 BLAKE2B 937be9f6fb92f23e8604b609de34c6f51e8e873203c9f7e6dea545f213d4be90e3d0c173b703bb6956c6d79097ea0f25528bb249a22d7edcfaec1be8f2ca636e SHA512 3409282b77cad9c06d13f814d1904819ea967b2c499c64a03bc188ca31aee991b7100946324c719d35cd4e5e30072f33e9e7ebb70986e1d4d386c47ab0ce8577
+DIST genpatches-5.8-18.base.tar.xz 592676 BLAKE2B 1379f3d881dbb85cb8306e4b1bfbabb298435728d5e8c76dd6955aa88fd2b464f2d58b27a7afc07f7eba06f057fd03b225e3d85da6e0555dc2c47389597ca1fb SHA512 da23d12de59794f57c466f0e28603da3674770c40c59afe3688882ece1d537c1b11eb0f6c4732e5afebf46f921642a3925f7361532720cb26fcbd4de42064207
+DIST genpatches-5.8-18.extras.tar.xz 1772 BLAKE2B fece8aa842736f29f1ca6b3317ff60be6243ab2610fcc3b8e102bae44831f0801b977a42dcdff6b8ae1af32f43a312962865c282f48e087bae163d18d2d6c328 SHA512 ac9cf075daa86b7033cecd753959058031bd8856db5bb7aebb8426eff7ffc28b2e03e656ae679d8f6bdb628b1ae9ca79bae7317564a3737fa02f0ebdc11db284
DIST genpatches-5.9-1.base.tar.xz 4004 BLAKE2B 8a4577d42262fa901186acc60d28221d00e5c9140886705f018d9989f818d96ee4d9a6586b292e7b1d945bea9e2408e3161a73e0999defe1b7f99d0a339eb7be SHA512 d6ba1051f9561aa30d7b196336c34930285d613e8119b152f1d6cc447cb22db5ac07c25f89d4ceddf58c9370c42699d0250a31449be2da3c591896b0c87d8718
DIST genpatches-5.9-1.extras.tar.xz 1764 BLAKE2B 32d29f0448aef113ba9c9591c5d3b671d00d07abde9f35f365b48168887913bb2da95a8a52b852453307cabb111115a26178be4cbcc016e53a26a31f783a9df7 SHA512 df007dc98c1acdd31773f7dcf8aeb22812aa55e5593e8509b6a8762f2dcf06c95d69ad7cdce992e7a5fe730754bef26242acdc4e4da51ee29206fabb86c9cb0e
DIST kernel-aarch64-fedora.config.5.8.5 215148 BLAKE2B c71380f46c1b37e9e17bab6d78907114369b377bcbdb54afa2c35b6a222937fd061f25309d8de0cc78ef2329ede7192722270acceeaa3da4629a5f58d8fee809 SHA512 e86e2c60e88b1ea5968db1a471d7d928ccb3146fe850f8f2813ef315f2de0cbfa0daa2f6828dee71acb2299f65f05fc0b6f1572a82fb146ae9f53a905fe94e97
diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-5.8.15.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-5.8.15.ebuild
new file mode 100644
index 000000000000..1527024779c4
--- /dev/null
+++ b/sys-kernel/gentoo-kernel/gentoo-kernel-5.8.15.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
+}