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: Tue, 26 Apr 2022 16:04:46
Message-Id: 1650989069.1be78685833e6477ab63226f36fee23224ae8b47.mgorny@gentoo
1 commit: 1be78685833e6477ab63226f36fee23224ae8b47
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Tue Apr 26 12:53:08 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Tue Apr 26 16:04:29 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1be78685
7
8 sys-kernel/gentoo-kernel: Bump to 5.15.35-r1
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.35-r1.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 95360d7a712d..9b0102b221af 100644
18 --- a/sys-kernel/gentoo-kernel/Manifest
19 +++ b/sys-kernel/gentoo-kernel/Manifest
20 @@ -14,6 +14,8 @@ DIST genpatches-5.15-37.base.tar.xz 1619460 BLAKE2B 56c3671c4d6915ca183f92b19b7f
21 DIST genpatches-5.15-37.extras.tar.xz 3868 BLAKE2B 11ac96d133b2c44ca77eb51cab739195e9fb252a2a3e6e2ad241f9ef6568ae1cf3dad9b7411522253c1e779c048807d478d6bac71d7aab9a147dac5dd81f77a9 SHA512 f8f0b48e170f5170d44947e52d548fb66f302bd97e7414cfb7e4668b2af76b48be0d0d2552345f397ff830246472193deac056020f128d98fafe04128d1c195f
22 DIST genpatches-5.15-38.base.tar.xz 1659188 BLAKE2B 782c4471d6e2cd69db1320e1f13caa438a9b535bc91710ce46c22c06a48effb07ce5bcd023b7ab25f3a7ac48bfe92352ecea46449dc7fb2557c10fbf9d9b8b5d SHA512 4a5f8ecd7557fb9040b8a7d151cd2afcd3f8b15f4b8c1a7cc9d56c18ef21f900603a80d7d155e7981ba780597766f8612e45ffe3f1906104b478f49b9b5135f9
23 DIST genpatches-5.15-38.extras.tar.xz 3868 BLAKE2B 8e23e08f6c89179b1ebc9d6727e1292c012a495588ef298d3b0a9c2372a90c54683314e5975f9ec9ee2539ab6f4b03e33a37793ab5b2a7205feee416558d9ee8 SHA512 77077a57146e44f9b038e56e4f21c1fe0eb903bd415c037546f72106a8e7545085405cf15d8f31c7a318113ae1104e84c0bfe6015778fe482f822e671e14d002
24 +DIST genpatches-5.15-39.base.tar.xz 1659952 BLAKE2B f40154102f23ab2b7774a998c75633598ce83daafe720930ce151a4af2a6e3647da249ffa299c7abc95c7644f51b044c4e6ea7a2378deedbf09638243c6cd30d SHA512 7646cc2f7b9467cc56bcc3e0e80475f3137eca6633800a8160d66cc81aaa87968f9f5fa6b3760a1c0ff7351d77582776a2c1a24875933ec0001ec0caad8818ea
25 +DIST genpatches-5.15-39.extras.tar.xz 3868 BLAKE2B 155eed40c9018ae6629513a2db645f535c3917422cb5b48acc7b93a565a1de5916d81182db5beb8975478f317388ab81afc74d77abf73bf071df7e474abeaddf SHA512 bbb69afead295c9eb059fab679599950f3ae71741a8a6695241e00969259f99a1f51eb859497d1beb73813adb9693c19d21025daca529b17a962fbbb7bfc88a4
26 DIST genpatches-5.16-20.base.tar.xz 772164 BLAKE2B f29e052926e6c72417d93b7e114f7dd688def99891508b358414ea3930e3761d6e79e7d09722c4479ab7e0d495d53cbc1084270f8782a579d4ed56f58caa157c SHA512 00a034d6a2a79daf856c0cf8e6dd30753d89b95fb9de9a5aff4f5a0dad651eb53eea24aef7c582f866749ad3fc533ed7087f7dfd11600fef8cebf85d2cc9c58b
27 DIST genpatches-5.16-20.extras.tar.xz 3800 BLAKE2B c815ea22d067c98f82650726a6c8a2e937c7bddb8b941e9d54c3014f4d8ea173cb1e54e76e23b6f767ae247fafbe02a8def6f39e5c6523e8c8cb12f098b8a34e SHA512 788ad08dfb0639c5ad42bb761d99bb534fdc5a9be54e9cededf90e0da34f13089b82609d8c7ccddc6fc1a28b913d4012c0e44b6768c84927e582f3a04be7ae55
28 DIST genpatches-5.16-21.base.tar.xz 1076736 BLAKE2B a5c6a42aba796d3f6fac0bdff544ee952d1cb63374864fca43a4fe57efb09407b8aafb54a692298173b66b5d267b9a8fdbafe614f48c1af4b4ecea2e951db975 SHA512 3a2df76cefcb1c8b6b4e65c82328a499757db5e50a33e9fd68b7d6044981f73f7cd0427b582b4477d1207898e3e2344d2c4c1afafdef17dfccf9e787a17b6dba
29
30 diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-5.15.35-r1.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-5.15.35-r1.ebuild
31 new file mode 100644
32 index 000000000000..3e9875ab5936
33 --- /dev/null
34 +++ b/sys-kernel/gentoo-kernel/gentoo-kernel-5.15.35-r1.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 +}