diff options
author | Michał Górny <mgorny@gentoo.org> | 2020-11-11 18:09:40 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2020-11-11 19:53:06 +0100 |
commit | 9cf28c549729bdaaf35d0c3a10aa426052ce175c (patch) | |
tree | 2e68d6e461e97ef1f1498aebad2cf257ac4fd112 /sys-kernel | |
parent | sys-kernel/vanilla-kernel: Bump to 5.4.77 (diff) | |
download | gentoo-9cf28c549729bdaaf35d0c3a10aa426052ce175c.tar.gz gentoo-9cf28c549729bdaaf35d0c3a10aa426052ce175c.tar.bz2 gentoo-9cf28c549729bdaaf35d0c3a10aa426052ce175c.zip |
sys-kernel/gentoo-kernel: Bump to 5.4.77
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'sys-kernel')
-rw-r--r-- | sys-kernel/gentoo-kernel/Manifest | 2 | ||||
-rw-r--r-- | sys-kernel/gentoo-kernel/gentoo-kernel-5.4.77.ebuild | 137 |
2 files changed, 139 insertions, 0 deletions
diff --git a/sys-kernel/gentoo-kernel/Manifest b/sys-kernel/gentoo-kernel/Manifest index 4545b9389197..c074333b3277 100644 --- a/sys-kernel/gentoo-kernel/Manifest +++ b/sys-kernel/gentoo-kernel/Manifest @@ -8,6 +8,8 @@ DIST genpatches-5.4-76.base.tar.xz 2688764 BLAKE2B 1beffb1043246ec2e855e472da7c0 DIST genpatches-5.4-76.extras.tar.xz 1772 BLAKE2B e03408c3e8d8549ac150268df059c8a12c30bd80c591fa2fb3e9672d0a5df74c8d277ba4e2ca9afbd361fc9a59fc3cf934c634af4a56fb7d4c6c347d6e6efb71 SHA512 19c050f98ff36e27faf5404aea25b5d6fa8e4762a9ac69cee9e177a6e056f53c566dea44860e0428b833b48ff6ee4bae95a2057af4564f2877a4f1a6d2909830 DIST genpatches-5.4-77.base.tar.xz 2712444 BLAKE2B 358bea510b894012d40bc4992ff04698c1bc5a9b3baf5eef7aee28bbafa8b8774f46d113134774f183d10e18ff7d57998989f11da068a06f0bbb4e437a8e6137 SHA512 a3fed2a4c2a547a7a97af94b68dc426e709bd1e7780fdaaf7d3167f81052062a6c9cd40bd6b78e4c97cecac1f3e02b1097a268f39453eed46a5f2dd85d06b11d DIST genpatches-5.4-77.extras.tar.xz 1772 BLAKE2B 8a33792ed12e88de1eac2908f0bbfb71085a1a6a5daa35e0904f23cab1ccbfff1ebead1b0a8c66331aef787aacd8d96765dbd5dde5de840a882012386b3646ef SHA512 69e36e134a9b635dd1b7eda48eb87eaf1f85456b7090bb7dc9e0cdd7cc80b1a840a68a77f0e42189fb3c9c584c64a0a58d6b8d1ed1c5eeb197df78b06744d2fb +DIST genpatches-5.4-78.base.tar.xz 2710752 BLAKE2B caf08c588198fa9a364ec299c9918ef6cc51495df40cc875b0e60c4abd6f3195fcb67581b276cea0ed8150220f8b84c04344acbee71c26598cc1871e6520c1e2 SHA512 fc4bc267a20e8c7f5326893d89e45d064c9ca7372d13657a443432e47a34c4b835de885c8f3d93ee1aced43d5016886b774d55c29d6839921089bacc40a742c3 +DIST genpatches-5.4-78.extras.tar.xz 1772 BLAKE2B 2b1790308dfe3bcfbd74ff7293fb0819e3949f0eb3d6ee448e4f7770d9e282505238dfbf4cfc5fcd144df7091816cb7f1c7d3514e9f9741ce4891539ca63fa8c SHA512 1d5814c23702f562b2207a95901b9ac4c5160508a0ac4dfb45468e6500f0a750c7ac4982d86ebd9de8acd26e23974f2893b3961d9aaa30fcaa3be2a217bbe80b DIST genpatches-5.8-19.base.tar.xz 596728 BLAKE2B ceb6cd57b593b5a2c02f00cefc61035ea765c9bb2bb2f9f8721e7503a149c8ad2ee6b1b3765b6d038e5d34bef2f0e0278acb7f3a8168d31d341ac0a9b58b8590 SHA512 f36c11a008e7965e0e113c3a7d87dbf40b87d87c7a801970a73367dcaaa07e7fc3356a114d339d68f16342d9f3c6601cf4746b9aa96d01d0c5efe2dbfaafabff 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 diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-5.4.77.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-5.4.77.ebuild new file mode 100644 index 000000000000..ff0e401cd76a --- /dev/null +++ b/sys-kernel/gentoo-kernel/gentoo-kernel-5.4.77.ebuild @@ -0,0 +1,137 @@ +# 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.4.21 +CONFIG_HASH=2809b7faa6a8cb232cd825096c146b7bdc1e08ea + +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.config + -> kernel-x86_64.config.${CONFIG_VER} + ) + arm64? ( + https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-aarch64.config + -> kernel-aarch64.config.${CONFIG_VER} + ) + ppc64? ( + https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-ppc64le.config + -> kernel-ppc64le.config.${CONFIG_VER} + ) + x86? ( + https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-i686.config + -> kernel-i686.config.${CONFIG_VER} + )" +S=${WORKDIR}/${MY_P} + +LICENSE="GPL-2" +KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86" +IUSE="debug" + +RDEPEND=" + !sys-kernel/vanilla-kernel:${SLOT} + !sys-kernel/vanilla-kernel-bin:${SLOT}" +BDEPEND=" + debug? ( dev-util/dwarves )" + +pkg_pretend() { + ewarn "Starting with 5.4.52, 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.config.${CONFIG_VER}" .config || die + ;; + arm64) + cp "${DISTDIR}/kernel-aarch64.config.${CONFIG_VER}" .config || die + ;; + ppc64) + cp "${DISTDIR}/kernel-ppc64le.config.${CONFIG_VER}" .config || die + ;; + x86) + cp "${DISTDIR}/kernel-i686.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:' + # WireGuard was backported to 5.4 but we use old configs (#739128) + -e '$aCONFIG_WIREGUARD=m' + ) + 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' + ) + [[ ${ARCH} == x86 ]] && config_tweaks+=( + # fix autoenabling 64bit + -e '2i\ +# CONFIG_64BIT is not set' + ) + sed -i "${config_tweaks[@]}" .config || die +} |