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: Wed, 27 Apr 2022 17:07:09
Message-Id: 1651079215.b6e3cd61501769245a7c59dc6e771771f198177c.mgorny@gentoo
1 commit: b6e3cd61501769245a7c59dc6e771771f198177c
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Wed Apr 27 14:38:56 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Wed Apr 27 17:06:55 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b6e3cd61
7
8 sys-kernel/gentoo-kernel: Bump to 5.15.36
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.36.ebuild | 131 +++++++++++++++++++++
14 2 files changed, 133 insertions(+)
15
16 diff --git a/sys-kernel/gentoo-kernel/Manifest b/sys-kernel/gentoo-kernel/Manifest
17 index 95a753d94c23..49e20b8a0d29 100644
18 --- a/sys-kernel/gentoo-kernel/Manifest
19 +++ b/sys-kernel/gentoo-kernel/Manifest
20 @@ -8,6 +8,8 @@ DIST genpatches-5.15-35.base.tar.xz 1306764 BLAKE2B 5ea5655e825b9196663a7bb830ef
21 DIST genpatches-5.15-35.extras.tar.xz 3876 BLAKE2B 5b14c88d66ede25e8417bdebc3c822d2f3755a13f21cef8a95088c97bba42a44357c98d13ce5a40e3aeb128ec0716540e893b108bf1f73256cb45250cd7ef43c SHA512 bdd8c5a700e9902cb7db17094fcc220eaca4774639d73e8496ac061fbba9fb80f6aa136aa9e87331a636af6146737fdec3c21249da7a18b5fec4d82de559e24f
22 DIST genpatches-5.15-39.base.tar.xz 1659952 BLAKE2B f40154102f23ab2b7774a998c75633598ce83daafe720930ce151a4af2a6e3647da249ffa299c7abc95c7644f51b044c4e6ea7a2378deedbf09638243c6cd30d SHA512 7646cc2f7b9467cc56bcc3e0e80475f3137eca6633800a8160d66cc81aaa87968f9f5fa6b3760a1c0ff7351d77582776a2c1a24875933ec0001ec0caad8818ea
23 DIST genpatches-5.15-39.extras.tar.xz 3868 BLAKE2B 155eed40c9018ae6629513a2db645f535c3917422cb5b48acc7b93a565a1de5916d81182db5beb8975478f317388ab81afc74d77abf73bf071df7e474abeaddf SHA512 bbb69afead295c9eb059fab679599950f3ae71741a8a6695241e00969259f99a1f51eb859497d1beb73813adb9693c19d21025daca529b17a962fbbb7bfc88a4
24 +DIST genpatches-5.15-40.base.tar.xz 1691504 BLAKE2B 167dac62ff702ca7c72e5bd12afaa4c9e0fde9b07f1feb8d7450752d77677749013ced38b850ade4318d2063044eaaee8abf2bfd69d42c60b7c26739732d3828 SHA512 3c58f992406e559a7d6ea8bb7c4bf5487588a0ecc68cf56d6a0727f31a1f03712637932b2c189e05f77a8faf312af5fbcd11570ca80c8550e766e51057b04ce3
25 +DIST genpatches-5.15-40.extras.tar.xz 3868 BLAKE2B 220c0f4eddf1c94cc1ffa86c8552fdad587b8cbce3275daca39e1e27d9aff1335fd714a4f618670f9fc1567c57211fe737a7e9ad43850dc15d3f35912bd7b781 SHA512 c0b8e136ec05007e3d90c185d14ecfe104558013e940d954243605d55768ef97605d7992596483f8614f4e800a95b191bd845644ae3e5a2379b4f74ed106a6a1
26 DIST genpatches-5.17-8.base.tar.xz 558192 BLAKE2B 8135b5dbc28154d346f1e24d915e1d80098764186a28638a147d3f840c431c7a44b00f80166d1acbf4181ce295c2655be4b7939919158ff2fd65174bba7bdd7d SHA512 3577093fa8b8961fdee9e52e67c0681055f26db4e5861ddeba8146cab3e63a1ca97287114feb79deb8a82518d7915cd213af01c18735207bdb705985f276dd5f
27 DIST genpatches-5.17-8.extras.tar.xz 3796 BLAKE2B 149f398df8860fae67cea4431affaf4a8ef5bfbe570434e5c7878c3bc1f8fdf8a56fb069ec79bc1fa65a5e0189a302162a1cc44865739e52a1af6db74cfb86b4 SHA512 14a850ca0481eb66da3419841b5c80b25bd00da30454b3101990399bd9f8551682ea82006b3a223fe91ca2c977a45aba983914943d375ae4c73904a2f5a318c2
28 DIST genpatches-5.17-9.base.tar.xz 594204 BLAKE2B 56e2423bb67d9e0fca4d065fb3ff02fa68ba3ef62769f14f7add89cbe8f637dcf3fb3acf7442369204588419989a4111d0fc0b245638f692495b51d3d769e73f SHA512 0cc46ba8854b2a0f949a827e67edbe4d941eafd76ae86ffdeb485d5800ad40c560a3130ca9f050336762157dc61bca22d39b82f3d769a3b434a32f028ebf4b21
29
30 diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-5.15.36.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-5.15.36.ebuild
31 new file mode 100644
32 index 000000000000..3e9875ab5936
33 --- /dev/null
34 +++ b/sys-kernel/gentoo-kernel/gentoo-kernel-5.15.36.ebuild
35 @@ -0,0 +1,131 @@
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##*.} + 4 ))
45 +CONFIG_VER=5.15.19
46 +CONFIG_HASH=ec69da7a42b5b7c3da91572ef22097b069ddbd01
47 +GENTOO_CONFIG_VER=g1
48 +
49 +DESCRIPTION="Linux kernel built with Gentoo patches"
50 +HOMEPAGE="https://www.kernel.org/"
51 +SRC_URI+="
52 + https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/${MY_P}.tar.xz
53 + https://dev.gentoo.org/~mpagano/dist/genpatches/${GENPATCHES_P}.base.tar.xz
54 + https://dev.gentoo.org/~mpagano/dist/genpatches/${GENPATCHES_P}.extras.tar.xz
55 + https://github.com/mgorny/gentoo-kernel-config/archive/${GENTOO_CONFIG_VER}.tar.gz
56 + -> gentoo-kernel-config-${GENTOO_CONFIG_VER}.tar.gz
57 + amd64? (
58 + https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-x86_64-fedora.config
59 + -> kernel-x86_64-fedora.config.${CONFIG_VER}
60 + )
61 + arm64? (
62 + https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-aarch64-fedora.config
63 + -> kernel-aarch64-fedora.config.${CONFIG_VER}
64 + )
65 + ppc64? (
66 + https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-ppc64le-fedora.config
67 + -> kernel-ppc64le-fedora.config.${CONFIG_VER}
68 + )
69 + x86? (
70 + https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-i686-fedora.config
71 + -> kernel-i686-fedora.config.${CONFIG_VER}
72 + )
73 +"
74 +S=${WORKDIR}/${MY_P}
75 +
76 +LICENSE="GPL-2"
77 +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86"
78 +IUSE="debug hardened"
79 +REQUIRED_USE="arm? ( savedconfig )"
80 +
81 +RDEPEND="
82 + !sys-kernel/gentoo-kernel-bin:${SLOT}
83 +"
84 +BDEPEND="
85 + debug? ( dev-util/pahole )
86 +"
87 +PDEPEND="
88 + >=virtual/dist-kernel-${PV}
89 +"
90 +
91 +QA_FLAGS_IGNORED="
92 + usr/src/linux-.*/scripts/gcc-plugins/.*.so
93 + usr/src/linux-.*/vmlinux
94 + usr/src/linux-.*/arch/powerpc/kernel/vdso.*/vdso.*.so.dbg
95 +"
96 +
97 +src_prepare() {
98 + local PATCHES=(
99 + # meh, genpatches have no directory
100 + "${WORKDIR}"/*.patch
101 + )
102 + default
103 +
104 + local biendian=false
105 +
106 + # prepare the default config
107 + case ${ARCH} in
108 + amd64)
109 + cp "${DISTDIR}/kernel-x86_64-fedora.config.${CONFIG_VER}" .config || die
110 + ;;
111 + arm)
112 + return
113 + ;;
114 + arm64)
115 + cp "${DISTDIR}/kernel-aarch64-fedora.config.${CONFIG_VER}" .config || die
116 + biendian=true
117 + ;;
118 + hppa)
119 + return
120 + ;;
121 + ppc)
122 + # assume powermac/powerbook defconfig
123 + # we still package.use.force savedconfig
124 + cp "${WORKDIR}/${MY_P}/arch/powerpc/configs/pmac32_defconfig" .config || die
125 + ;;
126 + ppc64)
127 + cp "${DISTDIR}/kernel-ppc64le-fedora.config.${CONFIG_VER}" .config || die
128 + biendian=true
129 + ;;
130 + x86)
131 + cp "${DISTDIR}/kernel-i686-fedora.config.${CONFIG_VER}" .config || die
132 + ;;
133 + *)
134 + die "Unsupported arch ${ARCH}"
135 + ;;
136 + esac
137 +
138 + local myversion="-gentoo-dist"
139 + use hardened && myversion+="-hardened"
140 + echo "CONFIG_LOCALVERSION=\"${myversion}\"" > "${T}"/version.config || die
141 + local dist_conf_path="${WORKDIR}/gentoo-kernel-config-${GENTOO_CONFIG_VER}"
142 +
143 + local merge_configs=(
144 + "${T}"/version.config
145 + "${dist_conf_path}"/base.config
146 + )
147 + use debug || merge_configs+=(
148 + "${dist_conf_path}"/no-debug.config
149 + )
150 + if use hardened; then
151 + merge_configs+=( "${dist_conf_path}"/hardened-base.config )
152 +
153 + tc-is-gcc && merge_configs+=( "${dist_conf_path}"/hardened-gcc-plugins.config )
154 +
155 + if [[ -f "${dist_conf_path}/hardened-${ARCH}.config" ]]; then
156 + merge_configs+=( "${dist_conf_path}/hardened-${ARCH}.config" )
157 + fi
158 + fi
159 +
160 + # this covers ppc64 and aarch64_be only for now
161 + if [[ ${biendian} == true && $(tc-endian) == big ]]; then
162 + merge_configs+=( "${dist_conf_path}/big-endian.config" )
163 + fi
164 +
165 + kernel-build_merge_configs "${merge_configs[@]}"
166 +}