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: Fri, 23 Sep 2022 16:39:57
Message-Id: 1663951175.2d83c7995ca44e48df634bca0324085184d2dec0.mgorny@gentoo
1 commit: 2d83c7995ca44e48df634bca0324085184d2dec0
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Fri Sep 23 13:53:49 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 23 16:39:35 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2d83c799
7
8 sys-kernel/gentoo-kernel: Bump to 5.19.11
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.19.11.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 826427b02a03..95853f383bdc 100644
18 --- a/sys-kernel/gentoo-kernel/Manifest
19 +++ b/sys-kernel/gentoo-kernel/Manifest
20 @@ -14,6 +14,8 @@ DIST genpatches-5.19-11.base.tar.xz 766852 BLAKE2B bc8fa5969dd4c75920a094b5135f6
21 DIST genpatches-5.19-11.extras.tar.xz 3804 BLAKE2B 3186d10e8a31ca501f36ae3e7945acbba7a17cd7d006b51a7a4136d2c1064efb070fb7870f4b1959eb87456131608b5d31a91987c79f8720b267537a38643211 SHA512 10c4b7c51bf4a891ee04826df0da29096e31601126435bcde168f7c3d32416395844e03d3fd55b9b225c7c8dc0216ae8691705c53786f06e0350f6fb1ec03f69
22 DIST genpatches-5.19-12.base.tar.xz 780072 BLAKE2B fe63576626355f3fa1638ca4de11e63342b6302c068401bd6990b56ab96d28f7bfe3066dbacd28022e5117347980e19df06dce20b021d67fe5830c71bc722470 SHA512 ae55b6c32eabe68ea2a1d4a319b0ecd5204be1236275b6d113c9fb44ff449df61e9a10c28399b4c1853763779145c71708f67206e98ca51fa535a90e3b316ebb
23 DIST genpatches-5.19-12.extras.tar.xz 3808 BLAKE2B 29b7c4bea18c4c56ca2944282ef1153d5394150029f680712c08b6bb41af8d8a44337768835561f90294f06635951d8dff2d56261e85c875aaabd395d39485c2 SHA512 0a30f8b0a70c9c0b6b87595236a08de5ce1b5d55df88c9878e23b3e87d7d22128da4302ea18f83ac83b66d647c0ad304a65c3c74e9084f555844bb276607a922
24 +DIST genpatches-5.19-13.base.tar.xz 787224 BLAKE2B 9f8827743838c34ab47c6cf820f2541473a3d5a1067cd2af6e689ea1e38fd52c1fc73eaaf594e91fc58519ca725ad7523b93a121543123bb6e8278b4b3315682 SHA512 4fc67150171ada40f582707822dae5f18596bafdb0f42e0040ba9d0a5a3ca1df7e785c993ecc3a1938a333bc13cabd854d6c11adb8f841387631e9b6ad212043
25 +DIST genpatches-5.19-13.extras.tar.xz 3808 BLAKE2B c1a811ab0ab52d422fd5b8ca3d7e19a3474fabefc4d9805251af7aee3315988471c1dc5058a95878b5d261e891ead328a0c7694e4b28a06a2b76c6917e16aa81 SHA512 ce4a80b99e3e4147d0785e246e72be90c87585795d0f2122141efa929d54c6d48e33e979b5614eef19427d4897e6ec26ed73a6e6decb308c345c9c52d1428588
26 DIST genpatches-5.4-218.base.tar.xz 5055868 BLAKE2B 2dde93f13540d5268d3855b6c4b57f3746badb0db68564bd9f0a5b80cf63138dfb77a1d60be7c9256a36a7685e90299a8e28690debe2e8bad9e23e2d31dbe470 SHA512 884f469ef288aedaa2e9271fce5cbce8254247b64cc4e4594fd176b62f65133910f8e50d2458f8c822db5683beb02316b71c71e69c71ae2331baafe1d421f347
27 DIST genpatches-5.4-218.extras.tar.xz 1812 BLAKE2B 3d98f3ae24c5612a9427c88943474b1ca8efbba31bf5e0c0f012b4bc41d1ed980042221a77374a19813d2ba02eab944343aebe2b45aac893352a27e6330dd74f SHA512 31a3790fc98eadb717e9dd9ae9a3c0f4d8d36a2fd9023f407c6c5cc8e4018f89c74535c44f7fda34e3f7b48a0116c4bd1a4770bb98bc60a264e9c541cb767d8b
28 DIST genpatches-5.4-219.base.tar.xz 5057112 BLAKE2B 2abaf4161586e089d1993edee6339b471a92dd08631bfbd7180219156417cdfc870163d5089a9185ed49b9a1eea37c9488316e239d67f469fc2f5b177a71e93c SHA512 37af5774e68df5bed8c13c516b245bb23abf0f6e93c369ca6937b1e6787445f0b3b27b8a5d325866f643896166d9ea5b8b8aad535f7c3afb5a45e8245355021e
29
30 diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-5.19.11.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-5.19.11.ebuild
31 new file mode 100644
32 index 000000000000..70b88ba40c72
33 --- /dev/null
34 +++ b/sys-kernel/gentoo-kernel/gentoo-kernel-5.19.11.ebuild
35 @@ -0,0 +1,137 @@
36 +# Copyright 2020-2022 Gentoo Authors
37 +# Distributed under the terms of the GNU General Public License v2
38 +
39 +EAPI=8
40 +
41 +inherit kernel-build toolchain-funcs
42 +
43 +MY_P=linux-${PV%.*}
44 +GENPATCHES_P=genpatches-${PV%.*}-$(( ${PV##*.} + 2 ))
45 +# https://koji.fedoraproject.org/koji/packageinfo?packageID=8
46 +# forked to https://github.com/projg2/fedora-kernel-config-for-gentoo
47 +CONFIG_VER=5.19.9-gentoo
48 +GENTOO_CONFIG_VER=g2
49 +
50 +DESCRIPTION="Linux kernel built with Gentoo patches"
51 +HOMEPAGE="https://www.kernel.org/"
52 +SRC_URI+="
53 + https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/${MY_P}.tar.xz
54 + https://dev.gentoo.org/~mpagano/dist/genpatches/${GENPATCHES_P}.base.tar.xz
55 + https://dev.gentoo.org/~mpagano/dist/genpatches/${GENPATCHES_P}.extras.tar.xz
56 + https://github.com/projg2/gentoo-kernel-config/archive/${GENTOO_CONFIG_VER}.tar.gz
57 + -> gentoo-kernel-config-${GENTOO_CONFIG_VER}.tar.gz
58 + amd64? (
59 + https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-x86_64-fedora.config
60 + -> kernel-x86_64-fedora.config.${CONFIG_VER}
61 + )
62 + arm64? (
63 + https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-aarch64-fedora.config
64 + -> kernel-aarch64-fedora.config.${CONFIG_VER}
65 + )
66 + ppc64? (
67 + https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-ppc64le-fedora.config
68 + -> kernel-ppc64le-fedora.config.${CONFIG_VER}
69 + )
70 + x86? (
71 + https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-i686-fedora.config
72 + -> kernel-i686-fedora.config.${CONFIG_VER}
73 + )
74 +"
75 +S=${WORKDIR}/${MY_P}
76 +
77 +LICENSE="GPL-2"
78 +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~x86"
79 +IUSE="debug hardened"
80 +REQUIRED_USE="arm? ( savedconfig )
81 + hppa? ( savedconfig )
82 + riscv? ( savedconfig )"
83 +
84 +RDEPEND="
85 + !sys-kernel/gentoo-kernel-bin:${SLOT}
86 +"
87 +BDEPEND="
88 + debug? ( dev-util/pahole )
89 +"
90 +PDEPEND="
91 + >=virtual/dist-kernel-${PV}
92 +"
93 +
94 +QA_FLAGS_IGNORED="
95 + usr/src/linux-.*/scripts/gcc-plugins/.*.so
96 + usr/src/linux-.*/vmlinux
97 + usr/src/linux-.*/arch/powerpc/kernel/vdso.*/vdso.*.so.dbg
98 +"
99 +
100 +src_prepare() {
101 + local PATCHES=(
102 + # meh, genpatches have no directory
103 + "${WORKDIR}"/*.patch
104 + )
105 + default
106 +
107 + local biendian=false
108 +
109 + # prepare the default config
110 + case ${ARCH} in
111 + amd64)
112 + cp "${DISTDIR}/kernel-x86_64-fedora.config.${CONFIG_VER}" .config || die
113 + ;;
114 + arm)
115 + return
116 + ;;
117 + arm64)
118 + cp "${DISTDIR}/kernel-aarch64-fedora.config.${CONFIG_VER}" .config || die
119 + biendian=true
120 + ;;
121 + hppa)
122 + return
123 + ;;
124 + ppc)
125 + # assume powermac/powerbook defconfig
126 + # we still package.use.force savedconfig
127 + cp "${WORKDIR}/${MY_P}/arch/powerpc/configs/pmac32_defconfig" .config || die
128 + ;;
129 + ppc64)
130 + cp "${DISTDIR}/kernel-ppc64le-fedora.config.${CONFIG_VER}" .config || die
131 + biendian=true
132 + ;;
133 + riscv)
134 + return
135 + ;;
136 + x86)
137 + cp "${DISTDIR}/kernel-i686-fedora.config.${CONFIG_VER}" .config || die
138 + ;;
139 + *)
140 + die "Unsupported arch ${ARCH}"
141 + ;;
142 + esac
143 +
144 + local myversion="-gentoo-dist"
145 + use hardened && myversion+="-hardened"
146 + echo "CONFIG_LOCALVERSION=\"${myversion}\"" > "${T}"/version.config || die
147 + local dist_conf_path="${WORKDIR}/gentoo-kernel-config-${GENTOO_CONFIG_VER}"
148 +
149 + local merge_configs=(
150 + "${T}"/version.config
151 + "${dist_conf_path}"/base.config
152 + )
153 + use debug || merge_configs+=(
154 + "${dist_conf_path}"/no-debug.config
155 + )
156 + if use hardened; then
157 + merge_configs+=( "${dist_conf_path}"/hardened-base.config )
158 +
159 + tc-is-gcc && merge_configs+=( "${dist_conf_path}"/hardened-gcc-plugins.config )
160 +
161 + if [[ -f "${dist_conf_path}/hardened-${ARCH}.config" ]]; then
162 + merge_configs+=( "${dist_conf_path}/hardened-${ARCH}.config" )
163 + fi
164 + fi
165 +
166 + # this covers ppc64 and aarch64_be only for now
167 + if [[ ${biendian} == true && $(tc-endian) == big ]]; then
168 + merge_configs+=( "${dist_conf_path}/big-endian.config" )
169 + fi
170 +
171 + kernel-build_merge_configs "${merge_configs[@]}"
172 +}