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: Sat, 05 Feb 2022 17:28:26
Message-Id: 1644082089.8a3c53a8dd45425364c48e3c1d104c9bcefb9243.mgorny@gentoo
1 commit: 8a3c53a8dd45425364c48e3c1d104c9bcefb9243
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sat Feb 5 13:53:15 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sat Feb 5 17:28:09 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8a3c53a8
7
8 sys-kernel/gentoo-kernel: Bump to 5.15.20
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.15.20.ebuild | 126 +++++++++++++++++++++
14 2 files changed, 128 insertions(+)
15
16 diff --git a/sys-kernel/gentoo-kernel/Manifest b/sys-kernel/gentoo-kernel/Manifest
17 index 1b32aba046d7..6523a3017d48 100644
18 --- a/sys-kernel/gentoo-kernel/Manifest
19 +++ b/sys-kernel/gentoo-kernel/Manifest
20 @@ -14,6 +14,8 @@ DIST genpatches-5.15-20.base.tar.xz 934800 BLAKE2B 6134e0fb2d9810d96809e5f099436
21 DIST genpatches-5.15-20.extras.tar.xz 3852 BLAKE2B 277432195bcb89cffe0fcb0ab0b2f00b889fa7c39c6178d81eb7426405f1bf5b85bc2d6bf5a69e6a0e2c18431eb768d3cae116fd8523de25f720479cc860d6d6 SHA512 e565d94865328b2296fbab040a7bb70444410d478a0b361c1b3502a0d8263ee868fbb446adb5f680716bbd189ecb42519c63849d92690c7e504975a5ff43ffe5
22 DIST genpatches-5.15-21.base.tar.xz 979868 BLAKE2B 217af3325d15020a43cc661746272b7756aa030d7e4e66d014f68e421b83f20fd6ad16cc036cf676b3719c118d4532b174a9f7b05aad730f22a13803fd621702 SHA512 5946fa7783d48d25b4f350815e645078e1629d3678aab048de1ec5c62066180de8db940b1b0e8db2062838fc2e06820a354278c20f60ec8da71f2ea686255c58
23 DIST genpatches-5.15-21.extras.tar.xz 3876 BLAKE2B 4c07b166a474bc11502de000f1bb00d8f0c25914a7877b2a94db844c694e0e7a4c757e8a10880eff40438b97214326ba50e716070d79ce1ef7f68c65d876da39 SHA512 384a2111655d8fd78a2f6165e99be0c74b36cf90333a465a4bb4cb6cda5ba32e1d435958987094a2d1407f02df7331ff2bd4fccace4f0a6ebe0c300692598f41
24 +DIST genpatches-5.15-22.base.tar.xz 986832 BLAKE2B 48fcd267e6e28850d226693b902fd66696024e75db6a75bb78ec79c7ac8afdac62643c4113ff205c301024d245f075716e0bf8083f97917dcfc8b1fcd71b674e SHA512 e8c64bd91caedc3dcd98301dbcbd2003b4aceb5a9713bd908a69448eaa2aea945fa8162e57442862b03daa0e1a4e7642e4504701b1f34a6edb127692e582e0e0
25 +DIST genpatches-5.15-22.extras.tar.xz 3876 BLAKE2B 95daac6c95b82d628c0551b4e18e7c3ad9a5722b5ab8f087889b15bdeea8c6f5e232ee8b365bfb4a7c6730207d4735a0fb648b389626f35cda2593caa83ff3e2 SHA512 0616c4a976d22a5491039a6bc3babdd7e9095a2c53e2a1530d1ecfcf50a2dbfca637c1b6771078efc92e3371ac15f332f85f653d267ea8e6262ffd305be2723a
26 DIST genpatches-5.16-6.base.tar.xz 410464 BLAKE2B 19e5c3718dc8bd9b10f42b4448da16717f95da8a5ca33145bec2703c850ecfe4978144530823319bce945287642a44d368eef24448b45b12d28f5fe450325e99 SHA512 80c38fece09b566dbb65b02beeba3b895c41f18fec08ab9b09a6200450a88be8fb10c04dd80c88dadb13e3aff56f2e5983063cd2d852d9f1fd7ed92113e74887
27 DIST genpatches-5.16-6.extras.tar.xz 3800 BLAKE2B 43e9801bfd91b817bc56eeeecf9a86c77ef00c3899a13d78b022dc119c4130d2635fb801b1e638877b68bb17c2ce57edea5d14f8a93acc165c715dc0f5615173 SHA512 cb4570ee5ff2dee8a8e992c7f9d173e4b4c7a680cc8225a53ed9e16887d7ceee3ca7a461aed80bbdbd90dc236b26b1094ee6be207afe1bd15117dbb4025b9c9f
28 DIST genpatches-5.16-7.base.tar.xz 421780 BLAKE2B a4d43c5c598c6c263330acf21502866f0d6698e409b51f48c1690e98204e786d4ca8cca252dded8ea276124e9ee0598e912d42cc458ddf096239f3b97cbf392f SHA512 e76e4ffe549b2533f8c1674963a6fe22f70ef169f46ec13681efe896f1141b6a0341f942856a6ba934e2749589fa68512870e727e2fd411b7d2f5e4cb9b86594
29
30 diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-5.15.20.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-5.15.20.ebuild
31 new file mode 100644
32 index 000000000000..1ae96dd74de4
33 --- /dev/null
34 +++ b/sys-kernel/gentoo-kernel/gentoo-kernel-5.15.20.ebuild
35 @@ -0,0 +1,126 @@
36 +# Copyright 2020-2022 Gentoo Authors
37 +# Distributed under the terms of the GNU General Public License v2
38 +
39 +EAPI=7
40 +
41 +inherit kernel-build toolchain-funcs
42 +
43 +MY_P=linux-${PV%.*}
44 +GENPATCHES_P=genpatches-${PV%.*}-$(( ${PV##*.} + 2 ))
45 +CONFIG_VER=5.15.14
46 +CONFIG_HASH=8cc461d9cfb256bb831225bb38e29fa944bd890f
47 +GENTOO_CONFIG_VER=5.15.5
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 + https://github.com/mgorny/gentoo-kernel-config/archive/v${GENTOO_CONFIG_VER}.tar.gz
55 + -> gentoo-kernel-config-${GENTOO_CONFIG_VER}.tar.gz
56 + amd64? (
57 + https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-x86_64-fedora.config
58 + -> kernel-x86_64-fedora.config.${CONFIG_VER}
59 + )
60 + arm64? (
61 + https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-aarch64-fedora.config
62 + -> kernel-aarch64-fedora.config.${CONFIG_VER}
63 + )
64 + ppc64? (
65 + https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-ppc64le-fedora.config
66 + -> kernel-ppc64le-fedora.config.${CONFIG_VER}
67 + )
68 + x86? (
69 + https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-i686-fedora.config
70 + -> kernel-i686-fedora.config.${CONFIG_VER}
71 + )"
72 +S=${WORKDIR}/${MY_P}
73 +
74 +LICENSE="GPL-2"
75 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
76 +IUSE="debug hardened"
77 +REQUIRED_USE="arm? ( savedconfig )"
78 +
79 +RDEPEND="
80 + !sys-kernel/gentoo-kernel-bin:${SLOT}"
81 +BDEPEND="
82 + debug? ( dev-util/pahole )"
83 +PDEPEND="
84 + >=virtual/dist-kernel-${PV}"
85 +
86 +QA_FLAGS_IGNORED="
87 + usr/src/linux-.*/scripts/gcc-plugins/.*.so
88 + usr/src/linux-.*/vmlinux
89 + usr/src/linux-.*/arch/powerpc/kernel/vdso.*/vdso.*.so.dbg
90 +"
91 +
92 +src_prepare() {
93 + local PATCHES=(
94 + # meh, genpatches have no directory
95 + "${WORKDIR}"/*.patch
96 + )
97 + default
98 +
99 + local biendian=false
100 +
101 + # prepare the default config
102 + case ${ARCH} in
103 + amd64)
104 + cp "${DISTDIR}/kernel-x86_64-fedora.config.${CONFIG_VER}" .config || die
105 + ;;
106 + arm)
107 + return
108 + ;;
109 + arm64)
110 + cp "${DISTDIR}/kernel-aarch64-fedora.config.${CONFIG_VER}" .config || die
111 + biendian=true
112 + ;;
113 + hppa)
114 + return
115 + ;;
116 + ppc)
117 + # assume powermac/powerbook defconfig
118 + # we still package.use.force savedconfig
119 + cp "${WORKDIR}/${MY_P}/arch/powerpc/configs/pmac32_defconfig" .config || die
120 + ;;
121 + ppc64)
122 + cp "${DISTDIR}/kernel-ppc64le-fedora.config.${CONFIG_VER}" .config || die
123 + biendian=true
124 + ;;
125 + x86)
126 + cp "${DISTDIR}/kernel-i686-fedora.config.${CONFIG_VER}" .config || die
127 + ;;
128 + *)
129 + die "Unsupported arch ${ARCH}"
130 + ;;
131 + esac
132 +
133 + local myversion="-gentoo-dist"
134 + use hardened && myversion+="-hardened"
135 + echo "CONFIG_LOCALVERSION=\"${myversion}\"" > "${T}"/version.config || die
136 + local dist_conf_path="${WORKDIR}/gentoo-kernel-config-${GENTOO_CONFIG_VER}"
137 +
138 + local merge_configs=(
139 + "${T}"/version.config
140 + "${dist_conf_path}"/base.config
141 + )
142 + use debug || merge_configs+=(
143 + "${dist_conf_path}"/no-debug.config
144 + )
145 + if use hardened; then
146 + merge_configs+=( "${dist_conf_path}"/hardened-base.config )
147 +
148 + tc-is-gcc && merge_configs+=( "${dist_conf_path}"/hardened-gcc-plugins.config )
149 +
150 + if [[ -f "${dist_conf_path}/hardened-${ARCH}.config" ]]; then
151 + merge_configs+=( "${dist_conf_path}/hardened-${ARCH}.config" )
152 + fi
153 + fi
154 +
155 + # this covers ppc64 and aarch64_be only for now
156 + if [[ ${biendian} == true && $(tc-endian) == big ]]; then
157 + merge_configs+=( "${dist_conf_path}/big-endian.config" )
158 + fi
159 +
160 + kernel-build_merge_configs "${merge_configs[@]}"
161 +}