Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-kernel/gentoo-kernel/
Date: Thu, 29 Oct 2020 20:25:23
Message-Id: 1604003111.5dcb79af5cdb8eac6000221e67f89f24c5da366f.mgorny@gentoo
1 commit: 5dcb79af5cdb8eac6000221e67f89f24c5da366f
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Thu Oct 29 16:39:41 2020 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Thu Oct 29 20:25:11 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5dcb79af
7
8 sys-kernel/gentoo-kernel: Bump to 5.8.17
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 sys-kernel/gentoo-kernel/Manifest | 2 +
13 .../gentoo-kernel/gentoo-kernel-5.8.17.ebuild | 134 +++++++++++++++++++++
14 2 files changed, 136 insertions(+)
15
16 diff --git a/sys-kernel/gentoo-kernel/Manifest b/sys-kernel/gentoo-kernel/Manifest
17 index 13ba4eff71d..0c92b7a1a3f 100644
18 --- a/sys-kernel/gentoo-kernel/Manifest
19 +++ b/sys-kernel/gentoo-kernel/Manifest
20 @@ -4,6 +4,8 @@ DIST genpatches-5.4-74.base.tar.xz 2616380 BLAKE2B d79290a1a6aa3464fcb5ea31d5ec2
21 DIST genpatches-5.4-74.extras.tar.xz 1772 BLAKE2B 02086dddbfb1c41c2f0e0f693469ed18a870dfee1eb7305c464668a63fc29262e976c79078339691df1493280b8aececadb9bbf8398bf47d339ff06c14271c07 SHA512 ea43bb8a42dbcd63982a4350d287e222a945596f31a513cf6c61711e0e9d586171d8c319a51e63a465cc4fd69ff3fcfa36816d552d09dcd5831ea59473a73a0e
22 DIST genpatches-5.8-19.base.tar.xz 596728 BLAKE2B ceb6cd57b593b5a2c02f00cefc61035ea765c9bb2bb2f9f8721e7503a149c8ad2ee6b1b3765b6d038e5d34bef2f0e0278acb7f3a8168d31d341ac0a9b58b8590 SHA512 f36c11a008e7965e0e113c3a7d87dbf40b87d87c7a801970a73367dcaaa07e7fc3356a114d339d68f16342d9f3c6601cf4746b9aa96d01d0c5efe2dbfaafabff
23 DIST genpatches-5.8-19.extras.tar.xz 1772 BLAKE2B c42390c17040a6557054835df177fe87ee124bcdcea91e1a63d50ed8e07a10044d639616497e02082fbb67a708ed408bd1e94a3c9d5b7c7b0c7daeca2bfc65df SHA512 3ba07566f1e721521676b862ca51654638400eeda4f216cdfb860b0639b7a611b2ff2e9659007486841e9a1afa8c05a9454abae87abbc7dff8af396bd0d7100a
24 +DIST genpatches-5.8-20.base.tar.xz 752808 BLAKE2B 6997bcd2b7dcf27f894e521fd95a77fc774ed23c3bf515a4dd3f633aa0d91feaf6f59850d56063bdb07ec7e01a720f17b61b6d32639d6c7b7cebd5cfb722b41e SHA512 59bdfcb2b74c343d673b14a1ede1bd8e726430fccc5b4f87d9edcd8986c5de7d8f473e10713fec5d922ba3949c9ce794438885b00cb125dd896f8e66eefe71ff
25 +DIST genpatches-5.8-20.extras.tar.xz 1772 BLAKE2B 2870067f79484d9c308dcc313ab38add3c577cdd29a718c5798ef3bf84867fe9dac12006bbc9343e82b08425aeb2100df44a9c607c4a28293c1c986683085384 SHA512 96bf218671a1fa8865e040cb9d5433b638f16689e975f892cff8c687f8963377d1c6d7e1face94bed8d3b21e2f87f28fbd55dcf027d185239721330b326c8aa3
26 DIST genpatches-5.9-2.base.tar.xz 9332 BLAKE2B cfccc2ebc7e067c7326f95627470a01f818f3c64db87ca26406bd3fa71429593a4460cf82d5891961eee69cbce667c850439f512650131013025491804486510 SHA512 af9c158cf65c5aa5d678d4ffeb7395051a9706521684f3a984f47d6ad581652978eb8f0a4de0132a3603b63fa7f34fb8b18a76bca5d4d312672c89f3fa221fa8
27 DIST genpatches-5.9-2.extras.tar.xz 1768 BLAKE2B 1e9312bc96d30b85ff628a67bed4bf2ded3eb2231d804158d343d64ce6a1be3d313bcdf84406cfa34045df9aa239ae1ed476f838ff466e0df96b60b28caa15b8 SHA512 58b19bd67b573657c44861d65792fb7fed0c430a554e95b2dc41a3f53ec8a50e68f89130a68ae0167de9ba98076326ae843264d76a178efaecece90121d0f337
28 DIST kernel-aarch64-fedora.config.5.8.5 215148 BLAKE2B c71380f46c1b37e9e17bab6d78907114369b377bcbdb54afa2c35b6a222937fd061f25309d8de0cc78ef2329ede7192722270acceeaa3da4629a5f58d8fee809 SHA512 e86e2c60e88b1ea5968db1a471d7d928ccb3146fe850f8f2813ef315f2de0cbfa0daa2f6828dee71acb2299f65f05fc0b6f1572a82fb146ae9f53a905fe94e97
29
30 diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-5.8.17.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-5.8.17.ebuild
31 new file mode 100644
32 index 00000000000..1527024779c
33 --- /dev/null
34 +++ b/sys-kernel/gentoo-kernel/gentoo-kernel-5.8.17.ebuild
35 @@ -0,0 +1,134 @@
36 +# Copyright 2020 Gentoo Authors
37 +# Distributed under the terms of the GNU General Public License v2
38 +
39 +EAPI=7
40 +
41 +inherit kernel-build
42 +
43 +MY_P=linux-${PV%.*}
44 +GENPATCHES_P=genpatches-${PV%.*}-$(( ${PV##*.} + 3 ))
45 +# https://koji.fedoraproject.org/koji/packageinfo?packageID=8
46 +CONFIG_VER=5.8.5
47 +CONFIG_HASH=af8da8d54d21231fd8c7b943216bb985f0a4e223
48 +
49 +DESCRIPTION="Linux kernel built with Gentoo patches"
50 +HOMEPAGE="https://www.kernel.org/"
51 +SRC_URI+=" https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/${MY_P}.tar.xz
52 + https://dev.gentoo.org/~mpagano/dist/genpatches/${GENPATCHES_P}.base.tar.xz
53 + https://dev.gentoo.org/~mpagano/dist/genpatches/${GENPATCHES_P}.extras.tar.xz
54 + amd64? (
55 + https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-x86_64-fedora.config
56 + -> kernel-x86_64-fedora.config.${CONFIG_VER}
57 + )
58 + arm64? (
59 + https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-aarch64-fedora.config
60 + -> kernel-aarch64-fedora.config.${CONFIG_VER}
61 + )
62 + ppc64? (
63 + https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-ppc64le-fedora.config
64 + -> kernel-ppc64le-fedora.config.${CONFIG_VER}
65 + )
66 + x86? (
67 + https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-i686-fedora.config
68 + -> kernel-i686-fedora.config.${CONFIG_VER}
69 + )"
70 +S=${WORKDIR}/${MY_P}
71 +
72 +LICENSE="GPL-2"
73 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
74 +IUSE="debug"
75 +REQUIRED_USE="arm? ( savedconfig )"
76 +
77 +RDEPEND="
78 + !sys-kernel/vanilla-kernel:${SLOT}
79 + !sys-kernel/vanilla-kernel-bin:${SLOT}"
80 +BDEPEND="
81 + debug? ( dev-util/dwarves )"
82 +
83 +pkg_pretend() {
84 + ewarn "Starting with 5.7.9, Distribution Kernels are switching from Arch"
85 + ewarn "Linux configs to Fedora. Please keep a backup kernel just in case."
86 +
87 + kernel-install_pkg_pretend
88 +}
89 +
90 +src_prepare() {
91 + local PATCHES=(
92 + # meh, genpatches have no directory
93 + "${WORKDIR}"/*.patch
94 + )
95 + default
96 +
97 + # prepare the default config
98 + case ${ARCH} in
99 + amd64)
100 + cp "${DISTDIR}/kernel-x86_64-fedora.config.${CONFIG_VER}" .config || die
101 + ;;
102 + arm)
103 + return
104 + ;;
105 + arm64)
106 + cp "${DISTDIR}/kernel-aarch64-fedora.config.${CONFIG_VER}" .config || die
107 + ;;
108 + ppc64)
109 + cp "${DISTDIR}/kernel-ppc64le-fedora.config.${CONFIG_VER}" .config || die
110 + ;;
111 + x86)
112 + cp "${DISTDIR}/kernel-i686-fedora.config.${CONFIG_VER}" .config || die
113 + ;;
114 + *)
115 + die "Unsupported arch ${ARCH}"
116 + ;;
117 + esac
118 +
119 + local config_tweaks=(
120 + # replace (none) with gentoo
121 + -e 's:^CONFIG_DEFAULT_HOSTNAME=:&"gentoo":'
122 + # we do support x32
123 + -e '/CONFIG_X86_X32/s:.*:CONFIG_X86_X32=y:'
124 + # disable signatures
125 + -e '/CONFIG_MODULE_SIG/d'
126 + -e '/CONFIG_SECURITY_LOCKDOWN/d'
127 + -e '/CONFIG_KEXEC_SIG/d'
128 + -e '/CONFIG_KEXEC_BZIMAGE_VERIFY_SIG/d'
129 + -e '/CONFIG_SYSTEM_EXTRA_CERTIFICATE/d'
130 + -e '/CONFIG_SIGNATURE/d'
131 + # remove massive array of LSMs
132 + -e 's/CONFIG_LSM=.*/CONFIG_LSM="yama"/'
133 + -e 's/CONFIG_DEFAULT_SECURITY_SELINUX=y/CONFIG_DEFAULT_SECURITY_DAC=y/'
134 + # nobody actually wants fips
135 + -e '/CONFIG_CRYPTO_FIPS/d'
136 + # these tests are really not necessary
137 + -e 's/.*CONFIG_CRYPTO_MANAGER_DISABLE_TESTS.*/CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y/'
138 + # probably not needed by anybody but developers
139 + -e '/CONFIG_CRYPTO_STATS/d'
140 + # 1000hz is excessive for laptops
141 + -e 's/CONFIG_HZ_1000=y/CONFIG_HZ_300=y/'
142 + # nobody is using this kernel on insane super computers
143 + -e 's/CONFIG_NR_CPUS=.*/CONFIG_NR_CPUS=512/'
144 + # we're not actually producing live patches for folks
145 + -e 's/CONFIG_LIVEPATCH=y/CONFIG_LIVEPATCH=n/'
146 + # this slows down networking in general
147 + -e 's/CONFIG_IP_FIB_TRIE_STATS=y/CONFIG_IP_FIB_TRIE_STATS=n/'
148 + # include font for normal and hidpi screens
149 + -e 's/.*CONFIG_FONTS.*/CONFIG_FONTS=y\nCONFIG_FONT_8x16=y\nCONFIG_FONT_TER16x32=y/'
150 + # we don't need to actually install system headers from this ebuild
151 + -e '/CONFIG_HEADERS_INSTALL/d'
152 + # enable /proc/config.gz, used by linux-info.eclass
153 + -e '/CONFIG_IKCONFIG/s:.*:CONFIG_IKCONFIG=y\nCONFIG_IKCONFIG_PROC=y:'
154 + )
155 + use debug || config_tweaks+=(
156 + -e '/CONFIG_DEBUG_INFO/d'
157 + -e '/CONFIG_DEBUG_RODATA_TEST/d'
158 + -e '/CONFIG_DEBUG_VM/d'
159 + -e '/CONFIG_DEBUG_SHIRQ/d'
160 + -e '/CONFIG_DEBUG_LIST/d'
161 + -e '/CONFIG_BUG_ON_DATA_CORRUPTION/d'
162 + -e '/CONFIG_TORTURE_TEST/d'
163 + -e '/CONFIG_BOOTTIME_TRACING/d'
164 + -e '/CONFIG_RING_BUFFER_BENCHMARK/d'
165 + -e '/CONFIG_X86_DECODER_SELFTEST/d'
166 + -e '/CONFIG_KGDB/d'
167 + )
168 + sed -i "${config_tweaks[@]}" .config || die
169 +}