diff options
author | Michał Górny <mgorny@gentoo.org> | 2020-11-01 23:15:55 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2020-11-02 10:48:46 +0100 |
commit | a754976ebc408cca9c2db04231bcfe4cd9ddc71d (patch) | |
tree | 9fd2ac885cfc353e94f4cfa22d406e6afd9e5ce9 | |
parent | sys-kernel/vanilla-kernel: Bump to 5.4.74 (diff) | |
download | gentoo-a754976ebc408cca9c2db04231bcfe4cd9ddc71d.tar.gz gentoo-a754976ebc408cca9c2db04231bcfe4cd9ddc71d.tar.bz2 gentoo-a754976ebc408cca9c2db04231bcfe4cd9ddc71d.zip |
sys-kernel/gentoo-kernel: Bump to 5.4.74
Signed-off-by: Michał Górny <mgorny@gentoo.org>
-rw-r--r-- | sys-kernel/gentoo-kernel/Manifest | 2 | ||||
-rw-r--r-- | sys-kernel/gentoo-kernel/gentoo-kernel-5.4.74.ebuild | 137 |
2 files changed, 139 insertions, 0 deletions
diff --git a/sys-kernel/gentoo-kernel/Manifest b/sys-kernel/gentoo-kernel/Manifest index 0803b0bc2a77..0504bd59886e 100644 --- a/sys-kernel/gentoo-kernel/Manifest +++ b/sys-kernel/gentoo-kernel/Manifest @@ -2,6 +2,8 @@ DIST genpatches-5.4-73.base.tar.xz 2527064 BLAKE2B 6e0b392681d6e5e709a02c1c8f15f DIST genpatches-5.4-73.extras.tar.xz 1772 BLAKE2B 7475a0907f287fef28ee8bf220932528107bbac0d612dc05de6ca8b2dd86ddf37d9acea31ab2977a677f6ea3a19c594737b23e504da405fa811c4d0faf00b94a SHA512 751898547b1f60070f1d8431cd89daff55e33473c8fe68415a15e3b8079ae2d3e44318815ba47a1ce9750feb1cac1812eb8eb7765426b204eb1357993cc68cb0 DIST genpatches-5.4-74.base.tar.xz 2616380 BLAKE2B d79290a1a6aa3464fcb5ea31d5ec28adc3b9275b7240627e431a9cbc69735426434345f0259e08efdf10e3660d60f3d4b6f22e7883cca39c8136f2ee39fad646 SHA512 ac5df7e61f00659c01ad90a6e52e20a9860f154e899aaef7179d28d3fc311ec804d34c9ef15bf22903e0c0783d00d375019e7dbca58b94ab5c09da0b8a8214a8 DIST genpatches-5.4-74.extras.tar.xz 1772 BLAKE2B 02086dddbfb1c41c2f0e0f693469ed18a870dfee1eb7305c464668a63fc29262e976c79078339691df1493280b8aececadb9bbf8398bf47d339ff06c14271c07 SHA512 ea43bb8a42dbcd63982a4350d287e222a945596f31a513cf6c61711e0e9d586171d8c319a51e63a465cc4fd69ff3fcfa36816d552d09dcd5831ea59473a73a0e +DIST genpatches-5.4-75.base.tar.xz 2626680 BLAKE2B ff32045765e11e01c26a3a11d095940c94fc1774734104c73b0a014401464b97ca623f354e62fc46f8427ae440149e5738741c78e79dc014d4e12ca24470384d SHA512 8c5bc194525e352f4b2a7fd6f92a5344a8036f60440bdbcde0fcf0ed401c191921fa15066aeb368c91d40fb6d166c7bec1ea55f01e5c8ffc3e296c9dc0ee1e2d +DIST genpatches-5.4-75.extras.tar.xz 1772 BLAKE2B 64073a8352dcd26668abacb591afc4f9452d071682619ad335cd77a71c6a82875a189e3d1e5a005da63b81038fe5b7667b282301b3d97f8f218c9ab7d37c02d7 SHA512 b43853961b1b60de1f1577de46d4bf1f650ffc96e46a64d6a37fbdebfd76cd5edc2847ae350ed6eb463f29cb55846cc322744918d5a59a21814c4a7c41b0d795 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.74.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-5.4.74.ebuild new file mode 100644 index 000000000000..ff0e401cd76a --- /dev/null +++ b/sys-kernel/gentoo-kernel/gentoo-kernel-5.4.74.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 +} |