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, 08 Oct 2020 15:36:22
Message-Id: 1602171371.e4bc9bc7a0e04497f7442d78839b616370111a50.mgorny@gentoo
1 commit: e4bc9bc7a0e04497f7442d78839b616370111a50
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Thu Oct 8 10:32:32 2020 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Thu Oct 8 15:36:11 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e4bc9bc7
7
8 sys-kernel/gentoo-kernel: Bump to 5.4.70
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.70.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 4b0c2f24632..1236c61c278 100644
18 --- a/sys-kernel/gentoo-kernel/Manifest
19 +++ b/sys-kernel/gentoo-kernel/Manifest
20 @@ -6,6 +6,8 @@ DIST genpatches-5.4-69.base.tar.xz 2362320 BLAKE2B 5f0a1f950d6b4edd2eb2189256e12
21 DIST genpatches-5.4-69.extras.tar.xz 1768 BLAKE2B ab83c9bd71bb08d7356aa93c27c3596911fe67fcadfe97a80313d2a038001be7ccada663ab25aee1d5cc348b220d3c82970d08bd3ebd538a729918a7487e0a1a SHA512 6a780c1a4ab2d2acd313e45c3fca0ae013104e916961855c76b4bc2c4f732f8eec27240b728677bf8e3c0042694605f477e672af41e5e4e50e266320d126fc32
22 DIST genpatches-5.4-70.base.tar.xz 2483716 BLAKE2B ec87f655614a22728baa721a291616f3c5f0516ec25dfcfba74ce72a8236e132dc2c66bc8b551cdac6cdd170d29a54545b05fec5d853afba33e70b23b7dd50da SHA512 246f449d7720de05a8527ce19ea47ebf79dfe970d87087674630416b438d31fe499b8fd053b7ea19ad81248435345b56544774eeb6298475145ae59b9ef718ae
23 DIST genpatches-5.4-70.extras.tar.xz 1772 BLAKE2B b7dcaf96dabb3dcb2ffac6532b59b9eff8e9e55e309b02b4d774a3c665e4499f0353bfb91ed81f1cbc73b852f0de50adc6a03dc36e8e7beb88f0cf62a5fd9a42 SHA512 3fedd41a60c6941f9ee18485c92b67c3dc69d0b36a134adb89c246106d043e10afcc9114f5448ea4164b956934e2dc9efb1f3af95c2bd1a67eaeef5253b07630
24 +DIST genpatches-5.4-71.base.tar.xz 2499052 BLAKE2B f19927e24c884ed8849b9572b5d199d8e9d1ad57137af70658016cee341e4a45d0e974996138c61880c39adb83616d6399e798e5fdd020c6275becd57a9d56b3 SHA512 dad3be3fa63d809458b08b7da7f45c2a0c126ca1df75ed156b2f54a93204b4504d42e678a74df79618e137b7b565fbc97e108e2807c97cd1b4a8d0bec69151a4
25 +DIST genpatches-5.4-71.extras.tar.xz 1772 BLAKE2B e462c7bf461058db545a11d05d6f6de16d0868a4f162874682425424f07e6b78019ce65ba9bd51aa413433894cea8561cba33837b66dd600351f36c563a0edb0 SHA512 ba9930a24342f7ccb5514688913e2517c726137317563ce301dbf383d484a6243c04e4d7e6ba427c0269009f979aea8c623e677e9d7f763275c1e299519d2ee4
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 genpatches-5.8-16.base.tar.xz 525416 BLAKE2B 53b0e2548b25b93999650cdf8eb920447367305049349a468b954f84368f803d2e1fd591fe4c01722515568257f1457a7480650a2debb1e9196bc41cebc07b5c SHA512 b708d0ad5303cabd7ba73b28391c138bf443c0af1dfc8296eb528e1a16cf00763a5a36aec1cb7bd0b0e9c9b0d844d4a135e2f1f5cf4ddbfa9742d7e05e0a4c0d
29
30 diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-5.4.70.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-5.4.70.ebuild
31 new file mode 100644
32 index 00000000000..ff0e401cd76
33 --- /dev/null
34 +++ b/sys-kernel/gentoo-kernel/gentoo-kernel-5.4.70.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 +}