summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-09-27 06:23:28 +0200
committerMichał Górny <mgorny@gentoo.org>2020-09-27 08:16:58 +0200
commit1d8c58f5ebd7eef10c9c62ed3db4f4a6bcd05514 (patch)
tree93adb95422ac621475624bb11fae383d7710519f
parentsys-kernel/vanilla-kernel: Bump to 5.8.12 (diff)
downloadgentoo-1d8c58f5ebd7eef10c9c62ed3db4f4a6bcd05514.tar.gz
gentoo-1d8c58f5ebd7eef10c9c62ed3db4f4a6bcd05514.tar.bz2
gentoo-1d8c58f5ebd7eef10c9c62ed3db4f4a6bcd05514.zip
sys-kernel/gentoo-kernel: Bump to 5.8.12
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.12.ebuild134
2 files changed, 136 insertions, 0 deletions
diff --git a/sys-kernel/gentoo-kernel/Manifest b/sys-kernel/gentoo-kernel/Manifest
index 904913624b38..09d174c54641 100644
--- a/sys-kernel/gentoo-kernel/Manifest
+++ b/sys-kernel/gentoo-kernel/Manifest
@@ -32,6 +32,8 @@ DIST genpatches-5.8-13.base.tar.xz 453844 BLAKE2B 4d6bb86ba3238f969784a2496799f5
DIST genpatches-5.8-13.extras.tar.xz 1768 BLAKE2B 7b70ebda93c52dc86d61e8040a48278a4cd61dc4e6a1317afb3bcc33a25fcc63dd3bbeb966244910cc38ef5d5a02be9875b5b1f8b7ed8ae9d1c46d7e00348146 SHA512 a36406969d495057e7685743b74379e88688861a3db1f0bc870ec9d7860a08f61f9dc4840742f69223198bbdf4597f9a96e3b3997b44d5b65cc2dc1afcfb7d71
DIST genpatches-5.8-14.base.tar.xz 482452 BLAKE2B a9b6d3be1666d75d95b4e7d12679c70df363e0d264255e8f49282a478f13c1a716dd9e6d66dd589fe997eb8271736fe562b731dc1185b0bcf2f420b9ed942e7a SHA512 b5a553daf43fd4c315b03ffbe12cfdbffa31c5c9030d41a9fb33214332db734a640b66dc552a33098831e8dc274c41248119ae2ecc5cfc1fcccffbc36f5d23d7
DIST genpatches-5.8-14.extras.tar.xz 1768 BLAKE2B b6373b4b1c04b177c0200ce1cb0cbef6e130a449cf38dc4900502479f646994509f044a784db2642008f9e66885ff97c2a2bbbfb124642269675b54269ec644e SHA512 3b34181e5a3af01cfc602cee52979f7592ad92c2f6cb715482344e99b591841e41cecc620871dd0147c8c60e7412c539ea85da26280449eeb5dfad961470acd5
+DIST genpatches-5.8-15.base.tar.xz 498912 BLAKE2B 429c079f836b9dc6d2086fe818f4e705264f002bcfcf4e5bdbe144af53aca53c8bfc1c0ac23aa33939bc59111e2194747088bbccff61015fd59ac0e3150aab62 SHA512 936414eaaa159a84bf016080332a8ba29c2024c02e5b83ed559df7b1a910ba405093e5ed36d54a346091a534f1389eba99b95852b23328a92e2f7ba5b07723ee
+DIST genpatches-5.8-15.extras.tar.xz 1772 BLAKE2B 690935cb537f442dd48dea34000bc444b9c2861b259ebb156722f1027ba281111b037fafe4cfdb71e68c40603f2dcb27d2639d949d4e4fbada8811fce2716329 SHA512 8dcc4ebb194603036323dcc559b5827d02c6a678b2f162191e306fe6ae52cc860e651937962ac8b52e2a4e229b1326a2cb24f938638556b0ddf4369f140f997b
DIST genpatches-5.8-5.base.tar.xz 216176 BLAKE2B 8c57c2b91b6a395b490fedcee8e0f5ba8c7698903d0e1017fb66bb3d5ced1c6675fcd6e7ecc2405ccd237fd9ef4c641b10a0b4c32403c757ada5ccec3dbf0f26 SHA512 64bf8a331ba97a1d86159dff23c46c94c63f07158e66f9e86b02de6cc1a4476064fb6a924573c93fa117ea88bf6d6bb05f89c82c1883700af9fcdbbfaa5b72bc
DIST genpatches-5.8-5.extras.tar.xz 1768 BLAKE2B b49e51d13c594029950911a1c7689b13710b8102330a475edb774f967b6162a036cb830b3cc25187e0ee3ec577d607baae036d136111ae1c64b7bebf1f544fe0 SHA512 a3fa7af02966567b5a2f4caab584ae19d7a1b955d2c8e599355b1ee5f3aed8971c26ecca6ab453280ea7bd8c9c004b53045848934d121f52474046293a2f554d
DIST genpatches-5.8-6.base.tar.xz 253496 BLAKE2B 691638688887676a60639683b75a51a281642bb7cdf51439dc2871a72e8e9fbd3121a93767ccd0f17e95627eba5876e3f119905c3fb93292b16393f3736d2a4c SHA512 352c4f32780e24e4e9721e3792377070806cc756dc68f3266ad3140f5508c303c52c6573736915dfc27f92501a5b56f0fcb25e76916f338e5e737bf75fbb939d
diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-5.8.12.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-5.8.12.ebuild
new file mode 100644
index 000000000000..1527024779c4
--- /dev/null
+++ b/sys-kernel/gentoo-kernel/gentoo-kernel-5.8.12.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
+}