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/vanilla-kernel/
Date: Mon, 02 Nov 2020 09:49:09
Message-Id: 1604310529.5dcf50c0cade48c0f6bdc49dbad4641a1d645725.mgorny@gentoo
1 commit: 5dcf50c0cade48c0f6bdc49dbad4641a1d645725
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sun Nov 1 22:21:11 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=5dcf50c0
7
8 sys-kernel/vanilla-kernel: Bump to 5.9.3
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 sys-kernel/vanilla-kernel/Manifest | 1 +
13 .../vanilla-kernel/vanilla-kernel-5.9.3.ebuild | 127 +++++++++++++++++++++
14 2 files changed, 128 insertions(+)
15
16 diff --git a/sys-kernel/vanilla-kernel/Manifest b/sys-kernel/vanilla-kernel/Manifest
17 index 2abc0a17116..82290313a64 100644
18 --- a/sys-kernel/vanilla-kernel/Manifest
19 +++ b/sys-kernel/vanilla-kernel/Manifest
20 @@ -22,3 +22,4 @@ DIST linux-5.8.17.tar.xz 114533684 BLAKE2B de4a89df5ad9d7624b604ae66371a0e799ef2
21 DIST linux-5.8.18.tar.xz 114530192 BLAKE2B 0c5b631b3ab1e00cbec4dc1cf477b634475ed187e19324dfc54f38c36291186a5c3e46fb7495e5421463973fccb98539e39bc06c782f11a018ca7cea21453a3f SHA512 77429204cfb88c6775d911f03b658b62095b6f592421d985daae5da25e9deef51dfb463c3394ea69e5d0861f5c7f14496037cfad3862c9445cc54a7878e9af9b
22 DIST linux-5.9.1.tar.xz 115502916 BLAKE2B 65eeccf077194ce03d5dbc1e8ea8f6022d709bc930945a49880fb87d71992e0614cf5ee92eb1b60fe2e3ed41fe17f0c176bbbad5f2cf0a2a349e1b08e6236558 SHA512 96af08c1dc964e5dbb3d221880ef8ca246f13370d2dc2f5ae64039f0352efc687c7446a2b4f86dad553b776ee75f78bbf58bb9bc845c9b57a9013ece63264874
23 DIST linux-5.9.2.tar.xz 115519708 BLAKE2B 22ba992df3a1d73fa16efb31bb0d62eacd106fb6f4d6dd1ebe522dc09b94c8df689cdb594ed105076ab5e1be4bd00eb834019dc19b6f58f6bee04f53e5de961e SHA512 98efc0d10e76685eb3280546d8d9b0251062a8ede05959d0de95df18414d2a07ced0a585ba58dd5aad188ad2761d7c5150cd8a8435a6bb53d692702f434732a9
24 +DIST linux-5.9.3.tar.xz 115525348 BLAKE2B 9f739fe4eb5d6ba38df54cee41d7342076fbd757fd25f50614ff3681ec9ed9afd9a5e134831a64e1fbcf4c31d2436ad2892cd6e9c50f664abbe6dbaa7ef2856e SHA512 5207dfb30803e1daeb4025dbf2887ebd4fa37f1b5ddadb2dda1f2ab1815309ec9d4a9fad61922b0ce28c422f61ef94b88de16c911956734634cc47c4f5031b3d
25
26 diff --git a/sys-kernel/vanilla-kernel/vanilla-kernel-5.9.3.ebuild b/sys-kernel/vanilla-kernel/vanilla-kernel-5.9.3.ebuild
27 new file mode 100644
28 index 00000000000..634d6fe9b8e
29 --- /dev/null
30 +++ b/sys-kernel/vanilla-kernel/vanilla-kernel-5.9.3.ebuild
31 @@ -0,0 +1,127 @@
32 +# Copyright 2020 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=7
36 +
37 +inherit kernel-build
38 +
39 +MY_P=linux-${PV}
40 +# https://koji.fedoraproject.org/koji/packageinfo?packageID=8
41 +CONFIG_VER=5.9.2
42 +CONFIG_HASH=94a4277f8827d1b2c911deabe56e7d929dc93146
43 +
44 +DESCRIPTION="Linux kernel built from vanilla upstream sources"
45 +HOMEPAGE="https://www.kernel.org/"
46 +SRC_URI+=" https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/${MY_P}.tar.xz
47 + amd64? (
48 + https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-x86_64-fedora.config
49 + -> kernel-x86_64-fedora.config.${CONFIG_VER}
50 + )
51 + arm64? (
52 + https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-aarch64-fedora.config
53 + -> kernel-aarch64-fedora.config.${CONFIG_VER}
54 + )
55 + ppc64? (
56 + https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-ppc64le-fedora.config
57 + -> kernel-ppc64le-fedora.config.${CONFIG_VER}
58 + )
59 + x86? (
60 + https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-i686-fedora.config
61 + -> kernel-i686-fedora.config.${CONFIG_VER}
62 + )"
63 +S=${WORKDIR}/${MY_P}
64 +
65 +LICENSE="GPL-2"
66 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
67 +IUSE="debug"
68 +REQUIRED_USE="
69 + arm? ( savedconfig )"
70 +
71 +RDEPEND="
72 + !sys-kernel/vanilla-kernel-bin:${SLOT}"
73 +BDEPEND="
74 + debug? ( dev-util/dwarves )"
75 +
76 +pkg_pretend() {
77 + ewarn "Starting with 5.7.9, Distribution Kernels are switching from Arch"
78 + ewarn "Linux configs to Fedora. Please keep a backup kernel just in case."
79 +
80 + kernel-install_pkg_pretend
81 +}
82 +
83 +src_prepare() {
84 + default
85 +
86 + # prepare the default config
87 + case ${ARCH} in
88 + amd64)
89 + cp "${DISTDIR}/kernel-x86_64-fedora.config.${CONFIG_VER}" .config || die
90 + ;;
91 + arm)
92 + return
93 + ;;
94 + arm64)
95 + cp "${DISTDIR}/kernel-aarch64-fedora.config.${CONFIG_VER}" .config || die
96 + ;;
97 + ppc64)
98 + cp "${DISTDIR}/kernel-ppc64le-fedora.config.${CONFIG_VER}" .config || die
99 + ;;
100 + x86)
101 + cp "${DISTDIR}/kernel-i686-fedora.config.${CONFIG_VER}" .config || die
102 + ;;
103 + *)
104 + die "Unsupported arch ${ARCH}"
105 + ;;
106 + esac
107 +
108 + local config_tweaks=(
109 + # replace (none) with gentoo
110 + -e 's:^CONFIG_DEFAULT_HOSTNAME=:&"gentoo":'
111 + # we do support x32
112 + -e '/CONFIG_X86_X32/s:.*:CONFIG_X86_X32=y:'
113 + # disable signatures
114 + -e '/CONFIG_MODULE_SIG/d'
115 + -e '/CONFIG_SECURITY_LOCKDOWN/d'
116 + -e '/CONFIG_KEXEC_SIG/d'
117 + -e '/CONFIG_KEXEC_BZIMAGE_VERIFY_SIG/d'
118 + -e '/CONFIG_SYSTEM_EXTRA_CERTIFICATE/d'
119 + -e '/CONFIG_SIGNATURE/d'
120 + # remove massive array of LSMs
121 + -e 's/CONFIG_LSM=.*/CONFIG_LSM="yama"/'
122 + -e 's/CONFIG_DEFAULT_SECURITY_SELINUX=y/CONFIG_DEFAULT_SECURITY_DAC=y/'
123 + # nobody actually wants fips
124 + -e '/CONFIG_CRYPTO_FIPS/d'
125 + # these tests are really not necessary
126 + -e 's/.*CONFIG_CRYPTO_MANAGER_DISABLE_TESTS.*/CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y/'
127 + # probably not needed by anybody but developers
128 + -e '/CONFIG_CRYPTO_STATS/d'
129 + # 1000hz is excessive for laptops
130 + -e 's/CONFIG_HZ_1000=y/CONFIG_HZ_300=y/'
131 + # nobody is using this kernel on insane super computers
132 + -e 's/CONFIG_NR_CPUS=.*/CONFIG_NR_CPUS=512/'
133 + # we're not actually producing live patches for folks
134 + -e 's/CONFIG_LIVEPATCH=y/CONFIG_LIVEPATCH=n/'
135 + # this slows down networking in general
136 + -e 's/CONFIG_IP_FIB_TRIE_STATS=y/CONFIG_IP_FIB_TRIE_STATS=n/'
137 + # include font for normal and hidpi screens
138 + -e 's/.*CONFIG_FONTS.*/CONFIG_FONTS=y\nCONFIG_FONT_8x16=y\nCONFIG_FONT_TER16x32=y/'
139 + # we don't need to actually install system headers from this ebuild
140 + -e '/CONFIG_HEADERS_INSTALL/d'
141 + # enable /proc/config.gz, used by linux-info.eclass
142 + -e '/CONFIG_IKCONFIG/s:.*:CONFIG_IKCONFIG=y\nCONFIG_IKCONFIG_PROC=y:'
143 + )
144 + use debug || config_tweaks+=(
145 + -e '/CONFIG_DEBUG_INFO/d'
146 + -e '/CONFIG_DEBUG_RODATA_TEST/d'
147 + -e '/CONFIG_DEBUG_VM/d'
148 + -e '/CONFIG_DEBUG_SHIRQ/d'
149 + -e '/CONFIG_DEBUG_LIST/d'
150 + -e '/CONFIG_BUG_ON_DATA_CORRUPTION/d'
151 + -e '/CONFIG_TORTURE_TEST/d'
152 + -e '/CONFIG_BOOTTIME_TRACING/d'
153 + -e '/CONFIG_RING_BUFFER_BENCHMARK/d'
154 + -e '/CONFIG_X86_DECODER_SELFTEST/d'
155 + -e '/CONFIG_KGDB/d'
156 + )
157 + sed -i "${config_tweaks[@]}" .config || die
158 +}