commit:     b1a88ae02783abecb6491ec0c192ba0e5c5f83b9
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 10 17:15:22 2020 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Nov 10 19:20:04 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b1a88ae0

sys-kernel/gentoo-kernel: Bump to 5.4.76

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 sys-kernel/gentoo-kernel/Manifest                  |   2 +
 .../gentoo-kernel/gentoo-kernel-5.4.76.ebuild      | 137 +++++++++++++++++++++
 2 files changed, 139 insertions(+)

diff --git a/sys-kernel/gentoo-kernel/Manifest 
b/sys-kernel/gentoo-kernel/Manifest
index 647197c2554..9aeb5414f11 100644
--- a/sys-kernel/gentoo-kernel/Manifest
+++ b/sys-kernel/gentoo-kernel/Manifest
@@ -6,6 +6,8 @@ DIST genpatches-5.4-75.base.tar.xz 2626680 BLAKE2B 
ff32045765e11e01c26a3a11d0959
 DIST genpatches-5.4-75.extras.tar.xz 1772 BLAKE2B 
64073a8352dcd26668abacb591afc4f9452d071682619ad335cd77a71c6a82875a189e3d1e5a005da63b81038fe5b7667b282301b3d97f8f218c9ab7d37c02d7
 SHA512 
b43853961b1b60de1f1577de46d4bf1f650ffc96e46a64d6a37fbdebfd76cd5edc2847ae350ed6eb463f29cb55846cc322744918d5a59a21814c4a7c41b0d795
 DIST genpatches-5.4-76.base.tar.xz 2688764 BLAKE2B 
1beffb1043246ec2e855e472da7c038b8a0d1a0e2dbf2b3a41e3139297d0fddffd31cba5338abb8494981f90f963a5f39623a3f638f85d1f10d8fe3901069bae
 SHA512 
da3757d7a831cd9693a06bab9d0df4e9ab02d95fd8ad28ff725798a58a3b06aa036e3d9664ec1dc6f44bdc1292d0c77b57c75a1efceb63059a6640ae8c963bd6
 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.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.76.ebuild 
b/sys-kernel/gentoo-kernel/gentoo-kernel-5.4.76.ebuild
new file mode 100644
index 00000000000..ff0e401cd76
--- /dev/null
+++ b/sys-kernel/gentoo-kernel/gentoo-kernel-5.4.76.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
+}

Reply via email to