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: Mon, 02 Nov 2020 09:49:10
Message-Id: 1604310529.3caeb17bfa0d10d805711369a18d3873a3f2981e.mgorny@gentoo
1 commit: 3caeb17bfa0d10d805711369a18d3873a3f2981e
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sun Nov 1 22:21:20 2020 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Mon Nov 2 09:48:49 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3caeb17b
7
8 sys-kernel/gentoo-kernel: Bump to 5.9.3
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.9.3.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 552813b25f9..461a052a96e 100644
18 --- a/sys-kernel/gentoo-kernel/Manifest
19 +++ b/sys-kernel/gentoo-kernel/Manifest
20 @@ -14,6 +14,8 @@ DIST genpatches-5.9-2.base.tar.xz 9332 BLAKE2B cfccc2ebc7e067c7326f95627470a01f8
21 DIST genpatches-5.9-2.extras.tar.xz 1768 BLAKE2B 1e9312bc96d30b85ff628a67bed4bf2ded3eb2231d804158d343d64ce6a1be3d313bcdf84406cfa34045df9aa239ae1ed476f838ff466e0df96b60b28caa15b8 SHA512 58b19bd67b573657c44861d65792fb7fed0c430a554e95b2dc41a3f53ec8a50e68f89130a68ae0167de9ba98076326ae843264d76a178efaecece90121d0f337
22 DIST genpatches-5.9-3.base.tar.xz 237460 BLAKE2B 44d94786733cb0b016448002e5ed8792285d7b53751d460d735f5175491f6530b15144daca1cf599a4cb492244eb74e252563433a1bc77dca34000e26a736c71 SHA512 84a0311d6c1c53c73d79409d43e6aebe600ffca76da077885d76ea7fced2c23f30cf06a5c60d8d8657d3e5988cc5cd0192f68d582f458ff3de3a90744e8d31b7
23 DIST genpatches-5.9-3.extras.tar.xz 1768 BLAKE2B 4e2b8011a4c40878fa51b3155fc734c0b5bfc0db25c384d9e2b2f3136dc29c24c0ce547bdc304eec096f8350ba2e0775c501d5dd94d85ca8335deb5517f9b772 SHA512 6bd79230e0b7e1119cad942d74876d736140a4e3d228fbbbb736da5ac97977fb08720345c0de93b7cd03670d8cb074a0de44ec0a2fc4cf8d8befa408fe716bd0
24 +DIST genpatches-5.9-4.base.tar.xz 272152 BLAKE2B a923a35de860d55673d357ad03f8836096d91b5444b79d725c681d901b627a7ea8330ebff03475d404d50684ffa1cf7f36c23b91fb4a015dc6043b6486596c2a SHA512 77e52da63576dd3dd3ce56edd2f178a841697da1290136aec7d35487a37724add5058c94ba01400d06a54ab687e261a49bd94c74d38fd73cd62b2c81b5ccd35b
25 +DIST genpatches-5.9-4.extras.tar.xz 1768 BLAKE2B fd99486c51dbcdac888ea137885945f7a468886a47e3931ebe26ace3ca922c83e7081267804a6938d76d1e65335d431bcd6b06f6118901699f1ab17c109814a0 SHA512 c5c5265b0a61ef24dc2a596280c026a98b1898ac8dc535abbd213496a16afbca255955ab546a86527c6cddb693c491f5b108b1993297d1b768badd0157cd3b07
26 DIST kernel-aarch64-fedora.config.5.8.5 215148 BLAKE2B c71380f46c1b37e9e17bab6d78907114369b377bcbdb54afa2c35b6a222937fd061f25309d8de0cc78ef2329ede7192722270acceeaa3da4629a5f58d8fee809 SHA512 e86e2c60e88b1ea5968db1a471d7d928ccb3146fe850f8f2813ef315f2de0cbfa0daa2f6828dee71acb2299f65f05fc0b6f1572a82fb146ae9f53a905fe94e97
27 DIST kernel-aarch64-fedora.config.5.9.0 217558 BLAKE2B 38e3c31b710c30d29dbf0b5304c2b9e0615af08ec11a01318bc0c4811b91a0803a96483e986f3dd83369b14e9329bdeb0e0d834761af9a644d831eba43eb910d SHA512 d38d05aef2a809207a186eacc365118d68e7ef82939b45ac5b9038cb493c771f8fa10009a0082f36c79c2e6b5b2ec193a6b1f50bc51a6190b77f57ab7cf237a1
28 DIST kernel-aarch64-fedora.config.5.9.2 217893 BLAKE2B 03a36c1fe81a16b434cd94bad3984bf8984808b2e7092089f9a23a565c6d9bc8a512baa4e5754633783ef47feb6cc67010a0093f096e5a15db0f13aaaf6d6426 SHA512 ebe29150ae625cf2f285649984c27246ef85cc13f0b5d4e40dd3ef479489aaa09b6ee4aee859d6e4361dd7e7b4432db8aec077a099a25e90609b9eac2d42802d
29
30 diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-5.9.3.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-5.9.3.ebuild
31 new file mode 100644
32 index 00000000000..97741279d4b
33 --- /dev/null
34 +++ b/sys-kernel/gentoo-kernel/gentoo-kernel-5.9.3.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##*.} + 1 ))
45 +# https://koji.fedoraproject.org/koji/packageinfo?packageID=8
46 +CONFIG_VER=5.9.2
47 +CONFIG_HASH=94a4277f8827d1b2c911deabe56e7d929dc93146
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 +}