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, 01 Oct 2020 15:13:18
Message-Id: 1601565169.7445206292d83387e338aabd4fc2d993745fd202.mgorny@gentoo
1 commit: 7445206292d83387e338aabd4fc2d993745fd202
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Thu Oct 1 15:02:02 2020 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Thu Oct 1 15:12:49 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=74452062
7
8 sys-kernel/gentoo-kernel: Bump to 5.4.69
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.4.69.ebuild | 137 +++++++++++++++++++++
14 2 files changed, 139 insertions(+)
15
16 diff --git a/sys-kernel/gentoo-kernel/Manifest b/sys-kernel/gentoo-kernel/Manifest
17 index edf7e36cd59..5e53caac5fb 100644
18 --- a/sys-kernel/gentoo-kernel/Manifest
19 +++ b/sys-kernel/gentoo-kernel/Manifest
20 @@ -4,6 +4,8 @@ DIST genpatches-5.4-67.base.tar.xz 2335352 BLAKE2B ae98701f88da8c3ab823499c6d568
21 DIST genpatches-5.4-67.extras.tar.xz 1768 BLAKE2B 6e6718c80465485c0271d46231d45412e4bb7e713caed3a333b27f1a655048c2ccea871d5331fc4d6413ddbeb2776df02acf00ad1c399a1d86e65615f05d5c69 SHA512 7da85f2ff8f50f43ae1eb814e34402fa8a55629c7b8e9b362ad657974be2ac60489157adf474f91c05587475d89deb1cb1511c5241b80885d695651bfb122af3
22 DIST genpatches-5.4-69.base.tar.xz 2362320 BLAKE2B 5f0a1f950d6b4edd2eb2189256e128350df0d9682c218527e8f2c8283cdebefddaddaabb7d77e3f8bc8a09d4fb23fea37a9208ffe3c3bbf748eb5e05df85ba28 SHA512 d323506ceb6d8cdb01ff7be8ee80d6b7d5a72fc7a2411d96a84f58ae12392f2f72565413878cc7b4abf9221bdcd0b505d8dc5ee5920945aebbe6984250f13d88
23 DIST genpatches-5.4-69.extras.tar.xz 1768 BLAKE2B ab83c9bd71bb08d7356aa93c27c3596911fe67fcadfe97a80313d2a038001be7ccada663ab25aee1d5cc348b220d3c82970d08bd3ebd538a729918a7487e0a1a SHA512 6a780c1a4ab2d2acd313e45c3fca0ae013104e916961855c76b4bc2c4f732f8eec27240b728677bf8e3c0042694605f477e672af41e5e4e50e266320d126fc32
24 +DIST genpatches-5.4-70.base.tar.xz 2483716 BLAKE2B ec87f655614a22728baa721a291616f3c5f0516ec25dfcfba74ce72a8236e132dc2c66bc8b551cdac6cdd170d29a54545b05fec5d853afba33e70b23b7dd50da SHA512 246f449d7720de05a8527ce19ea47ebf79dfe970d87087674630416b438d31fe499b8fd053b7ea19ad81248435345b56544774eeb6298475145ae59b9ef718ae
25 +DIST genpatches-5.4-70.extras.tar.xz 1772 BLAKE2B b7dcaf96dabb3dcb2ffac6532b59b9eff8e9e55e309b02b4d774a3c665e4499f0353bfb91ed81f1cbc73b852f0de50adc6a03dc36e8e7beb88f0cf62a5fd9a42 SHA512 3fedd41a60c6941f9ee18485c92b67c3dc69d0b36a134adb89c246106d043e10afcc9114f5448ea4164b956934e2dc9efb1f3af95c2bd1a67eaeef5253b07630
26 DIST genpatches-5.8-15.base.tar.xz 498912 BLAKE2B 429c079f836b9dc6d2086fe818f4e705264f002bcfcf4e5bdbe144af53aca53c8bfc1c0ac23aa33939bc59111e2194747088bbccff61015fd59ac0e3150aab62 SHA512 936414eaaa159a84bf016080332a8ba29c2024c02e5b83ed559df7b1a910ba405093e5ed36d54a346091a534f1389eba99b95852b23328a92e2f7ba5b07723ee
27 DIST genpatches-5.8-15.extras.tar.xz 1772 BLAKE2B 690935cb537f442dd48dea34000bc444b9c2861b259ebb156722f1027ba281111b037fafe4cfdb71e68c40603f2dcb27d2639d949d4e4fbada8811fce2716329 SHA512 8dcc4ebb194603036323dcc559b5827d02c6a678b2f162191e306fe6ae52cc860e651937962ac8b52e2a4e229b1326a2cb24f938638556b0ddf4369f140f997b
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.4.69.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-5.4.69.ebuild
31 new file mode 100644
32 index 00000000000..ff0e401cd76
33 --- /dev/null
34 +++ b/sys-kernel/gentoo-kernel/gentoo-kernel-5.4.69.ebuild
35 @@ -0,0 +1,137 @@
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.4.21
47 +CONFIG_HASH=2809b7faa6a8cb232cd825096c146b7bdc1e08ea
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.config
56 + -> kernel-x86_64.config.${CONFIG_VER}
57 + )
58 + arm64? (
59 + https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-aarch64.config
60 + -> kernel-aarch64.config.${CONFIG_VER}
61 + )
62 + ppc64? (
63 + https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-ppc64le.config
64 + -> kernel-ppc64le.config.${CONFIG_VER}
65 + )
66 + x86? (
67 + https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-i686.config
68 + -> kernel-i686.config.${CONFIG_VER}
69 + )"
70 +S=${WORKDIR}/${MY_P}
71 +
72 +LICENSE="GPL-2"
73 +KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
74 +IUSE="debug"
75 +
76 +RDEPEND="
77 + !sys-kernel/vanilla-kernel:${SLOT}
78 + !sys-kernel/vanilla-kernel-bin:${SLOT}"
79 +BDEPEND="
80 + debug? ( dev-util/dwarves )"
81 +
82 +pkg_pretend() {
83 + ewarn "Starting with 5.4.52, Distribution Kernels are switching from Arch"
84 + ewarn "Linux configs to Fedora. Please keep a backup kernel just in case."
85 +
86 + kernel-install_pkg_pretend
87 +}
88 +
89 +src_prepare() {
90 + local PATCHES=(
91 + # meh, genpatches have no directory
92 + "${WORKDIR}"/*.patch
93 + )
94 + default
95 +
96 + # prepare the default config
97 + case ${ARCH} in
98 + amd64)
99 + cp "${DISTDIR}/kernel-x86_64.config.${CONFIG_VER}" .config || die
100 + ;;
101 + arm64)
102 + cp "${DISTDIR}/kernel-aarch64.config.${CONFIG_VER}" .config || die
103 + ;;
104 + ppc64)
105 + cp "${DISTDIR}/kernel-ppc64le.config.${CONFIG_VER}" .config || die
106 + ;;
107 + x86)
108 + cp "${DISTDIR}/kernel-i686.config.${CONFIG_VER}" .config || die
109 + ;;
110 + *)
111 + die "Unsupported arch ${ARCH}"
112 + ;;
113 + esac
114 +
115 + local config_tweaks=(
116 + # replace (none) with gentoo
117 + -e 's:^CONFIG_DEFAULT_HOSTNAME=:&"gentoo":'
118 + # we do support x32
119 + -e '/CONFIG_X86_X32/s:.*:CONFIG_X86_X32=y:'
120 + # disable signatures
121 + -e '/CONFIG_MODULE_SIG/d'
122 + -e '/CONFIG_SECURITY_LOCKDOWN/d'
123 + -e '/CONFIG_KEXEC_SIG/d'
124 + -e '/CONFIG_KEXEC_BZIMAGE_VERIFY_SIG/d'
125 + -e '/CONFIG_SYSTEM_EXTRA_CERTIFICATE/d'
126 + -e '/CONFIG_SIGNATURE/d'
127 + # remove massive array of LSMs
128 + -e 's/CONFIG_LSM=.*/CONFIG_LSM="yama"/'
129 + -e 's/CONFIG_DEFAULT_SECURITY_SELINUX=y/CONFIG_DEFAULT_SECURITY_DAC=y/'
130 + # nobody actually wants fips
131 + -e '/CONFIG_CRYPTO_FIPS/d'
132 + # these tests are really not necessary
133 + -e 's/.*CONFIG_CRYPTO_MANAGER_DISABLE_TESTS.*/CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y/'
134 + # probably not needed by anybody but developers
135 + -e '/CONFIG_CRYPTO_STATS/d'
136 + # 1000hz is excessive for laptops
137 + -e 's/CONFIG_HZ_1000=y/CONFIG_HZ_300=y/'
138 + # nobody is using this kernel on insane super computers
139 + -e 's/CONFIG_NR_CPUS=.*/CONFIG_NR_CPUS=512/'
140 + # we're not actually producing live patches for folks
141 + -e 's/CONFIG_LIVEPATCH=y/CONFIG_LIVEPATCH=n/'
142 + # this slows down networking in general
143 + -e 's/CONFIG_IP_FIB_TRIE_STATS=y/CONFIG_IP_FIB_TRIE_STATS=n/'
144 + # include font for normal and hidpi screens
145 + -e 's/.*CONFIG_FONTS.*/CONFIG_FONTS=y\nCONFIG_FONT_8x16=y\nCONFIG_FONT_TER16x32=y/'
146 + # we don't need to actually install system headers from this ebuild
147 + -e '/CONFIG_HEADERS_INSTALL/d'
148 + # enable /proc/config.gz, used by linux-info.eclass
149 + -e '/CONFIG_IKCONFIG/s:.*:CONFIG_IKCONFIG=y\nCONFIG_IKCONFIG_PROC=y:'
150 + # WireGuard was backported to 5.4 but we use old configs (#739128)
151 + -e '$aCONFIG_WIREGUARD=m'
152 + )
153 + use debug || config_tweaks+=(
154 + -e '/CONFIG_DEBUG_INFO/d'
155 + -e '/CONFIG_DEBUG_RODATA_TEST/d'
156 + -e '/CONFIG_DEBUG_VM/d'
157 + -e '/CONFIG_DEBUG_SHIRQ/d'
158 + -e '/CONFIG_DEBUG_LIST/d'
159 + -e '/CONFIG_BUG_ON_DATA_CORRUPTION/d'
160 + -e '/CONFIG_TORTURE_TEST/d'
161 + -e '/CONFIG_BOOTTIME_TRACING/d'
162 + -e '/CONFIG_RING_BUFFER_BENCHMARK/d'
163 + -e '/CONFIG_X86_DECODER_SELFTEST/d'
164 + -e '/CONFIG_KGDB/d'
165 + )
166 + [[ ${ARCH} == x86 ]] && config_tweaks+=(
167 + # fix autoenabling 64bit
168 + -e '2i\
169 +# CONFIG_64BIT is not set'
170 + )
171 + sed -i "${config_tweaks[@]}" .config || die
172 +}