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:44
Message-Id: 1650989068.db556d8d0788a52c3e5a50debf34f50e602108d9.mgorny@gentoo
1 commit: db556d8d0788a52c3e5a50debf34f50e602108d9
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Tue Apr 26 12:52:19 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Tue Apr 26 16:04:28 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=db556d8d
7
8 sys-kernel/gentoo-kernel: Bump to 5.17.4-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.17.4-r1.ebuild | 132 +++++++++++++++++++++
14 2 files changed, 134 insertions(+)
15
16 diff --git a/sys-kernel/gentoo-kernel/Manifest b/sys-kernel/gentoo-kernel/Manifest
17 index 410f1ba53fc5..95360d7a712d 100644
18 --- a/sys-kernel/gentoo-kernel/Manifest
19 +++ b/sys-kernel/gentoo-kernel/Manifest
20 @@ -24,6 +24,8 @@ DIST genpatches-5.17-5.base.tar.xz 498648 BLAKE2B 07dde85c14b37b5b2e7716de408247
21 DIST genpatches-5.17-5.extras.tar.xz 3800 BLAKE2B 84ff6d95364da66b1ea0a8cb830e855aa4bf262768385607d4ca59c09dd5159073a33f414facce97f3b1a90ec3f055adf03d48f3fae9d05609b75351375af422 SHA512 e4bf053bea92bf10d62dd4a7d07b9f135d540996f3f503da07af9259f6f1f86e17c00d0d1c955b5bb339a29b577de1df9936515e7e0c617847187d77c3b37bef
22 DIST genpatches-5.17-6.base.tar.xz 557368 BLAKE2B 7d9668f583167cb46a87a451416a69e1f1042bff745cca1394e83649580f920fd18aa030f558975f9ac4e256f70336ffd3b238616fd58697f9370753d7753d22 SHA512 3164fe7a6907bc7ceaf48dbc474c8d3807aa7499cb2a706995d3c27da89a19b34990d9b981d5d0e583ce23973a9a4dd2ad251d44c1f8d539dfd6e64d93416d28
23 DIST genpatches-5.17-6.extras.tar.xz 3796 BLAKE2B 6921f442b3c5a3d1f5d437504668488c96879cfcbbfc096275afccab4664d01a0748b0a72e4bbcc1f1564829eeb8346402a14120d79a7be923cf08c0ecacf385 SHA512 8049dfa5390180a9d0cad7d18ea13cf2620e9883d733d8d5e2a09c11b26e4afd8ae28f81872e7e16bd6107205f0bf17edb475b390384fb4989d688b7b49630ae
24 +DIST genpatches-5.17-8.base.tar.xz 558192 BLAKE2B 8135b5dbc28154d346f1e24d915e1d80098764186a28638a147d3f840c431c7a44b00f80166d1acbf4181ce295c2655be4b7939919158ff2fd65174bba7bdd7d SHA512 3577093fa8b8961fdee9e52e67c0681055f26db4e5861ddeba8146cab3e63a1ca97287114feb79deb8a82518d7915cd213af01c18735207bdb705985f276dd5f
25 +DIST genpatches-5.17-8.extras.tar.xz 3796 BLAKE2B 149f398df8860fae67cea4431affaf4a8ef5bfbe570434e5c7878c3bc1f8fdf8a56fb069ec79bc1fa65a5e0189a302162a1cc44865739e52a1af6db74cfb86b4 SHA512 14a850ca0481eb66da3419841b5c80b25bd00da30454b3101990399bd9f8551682ea82006b3a223fe91ca2c977a45aba983914943d375ae4c73904a2f5a318c2
26 DIST genpatches-5.4-192.base.tar.xz 4516512 BLAKE2B dd316606186f305369ea67348acf0b6afbe2eacc16564851a1eb94224afcbdc066f920578092a15bacc7abb7a8f659aa44bde26859aae2525eaa84e8cd0447f1 SHA512 28bed80b1bfa457d24f8367a3a76460e569f7c8eb4f0a6b632f1898615ccb4da4c2fbba95dcfd1cce5675fe6151cee4c0df6bc0fdb158c25c25cf71a9397127b
27 DIST genpatches-5.4-192.extras.tar.xz 1816 BLAKE2B 2d6760ff367ee0ba6ff8d56f81c7c3587ccd8c4f8fb952e3380148b2f3532a19cd614f352241134eb3256f8e59c000806f3d1eb33caa582e0c4be813d3275672 SHA512 f8d43a3a80abd947cbd667b3ed449215d98967fa8dc2200efbba86db946a04dc7dc971d74afe1aa6b923ea3f9914b28c3bcb9f6ec205b1bfb0cd60c0ae57758a
28 DIST genpatches-5.4-193.base.tar.xz 4614484 BLAKE2B 94f35c7399a4912dc546f80271989f63bf0c838d953bfcc05cdf3240b7d88e0ce542b44000b21af0b88871d8933e637855b0f42bf3efe523eba2e93933958381 SHA512 9f3d60740388b4947d039f218b5f9e886cdfbe3e781109b6c24cea67d29408fb8f49f5a92fb6bde31bfdd131f6fd329ca2a867819d4dda7666ed84aebce2d5a3
29
30 diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-5.17.4-r1.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-5.17.4-r1.ebuild
31 new file mode 100644
32 index 000000000000..2517fa519fc8
33 --- /dev/null
34 +++ b/sys-kernel/gentoo-kernel/gentoo-kernel-5.17.4-r1.ebuild
35 @@ -0,0 +1,132 @@
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 +# https://koji.fedoraproject.org/koji/packageinfo?packageID=8
46 +# forked to https://github.com/mgorny/fedora-kernel-config-for-gentoo
47 +CONFIG_VER=5.17.3-gentoo
48 +GENTOO_CONFIG_VER=g1
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/mgorny/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/mgorny/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/mgorny/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/mgorny/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/mgorny/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 ~x86"
79 +IUSE="debug hardened"
80 +REQUIRED_USE="arm? ( savedconfig )"
81 +
82 +RDEPEND="
83 + !sys-kernel/gentoo-kernel-bin:${SLOT}
84 +"
85 +BDEPEND="
86 + debug? ( dev-util/pahole )
87 +"
88 +PDEPEND="
89 + >=virtual/dist-kernel-${PV}
90 +"
91 +
92 +QA_FLAGS_IGNORED="
93 + usr/src/linux-.*/scripts/gcc-plugins/.*.so
94 + usr/src/linux-.*/vmlinux
95 + usr/src/linux-.*/arch/powerpc/kernel/vdso.*/vdso.*.so.dbg
96 +"
97 +
98 +src_prepare() {
99 + local PATCHES=(
100 + # meh, genpatches have no directory
101 + "${WORKDIR}"/*.patch
102 + )
103 + default
104 +
105 + local biendian=false
106 +
107 + # prepare the default config
108 + case ${ARCH} in
109 + amd64)
110 + cp "${DISTDIR}/kernel-x86_64-fedora.config.${CONFIG_VER}" .config || die
111 + ;;
112 + arm)
113 + return
114 + ;;
115 + arm64)
116 + cp "${DISTDIR}/kernel-aarch64-fedora.config.${CONFIG_VER}" .config || die
117 + biendian=true
118 + ;;
119 + hppa)
120 + return
121 + ;;
122 + ppc)
123 + # assume powermac/powerbook defconfig
124 + # we still package.use.force savedconfig
125 + cp "${WORKDIR}/${MY_P}/arch/powerpc/configs/pmac32_defconfig" .config || die
126 + ;;
127 + ppc64)
128 + cp "${DISTDIR}/kernel-ppc64le-fedora.config.${CONFIG_VER}" .config || die
129 + biendian=true
130 + ;;
131 + x86)
132 + cp "${DISTDIR}/kernel-i686-fedora.config.${CONFIG_VER}" .config || die
133 + ;;
134 + *)
135 + die "Unsupported arch ${ARCH}"
136 + ;;
137 + esac
138 +
139 + local myversion="-gentoo-dist"
140 + use hardened && myversion+="-hardened"
141 + echo "CONFIG_LOCALVERSION=\"${myversion}\"" > "${T}"/version.config || die
142 + local dist_conf_path="${WORKDIR}/gentoo-kernel-config-${GENTOO_CONFIG_VER}"
143 +
144 + local merge_configs=(
145 + "${T}"/version.config
146 + "${dist_conf_path}"/base.config
147 + )
148 + use debug || merge_configs+=(
149 + "${dist_conf_path}"/no-debug.config
150 + )
151 + if use hardened; then
152 + merge_configs+=( "${dist_conf_path}"/hardened-base.config )
153 +
154 + tc-is-gcc && merge_configs+=( "${dist_conf_path}"/hardened-gcc-plugins.config )
155 +
156 + if [[ -f "${dist_conf_path}/hardened-${ARCH}.config" ]]; then
157 + merge_configs+=( "${dist_conf_path}/hardened-${ARCH}.config" )
158 + fi
159 + fi
160 +
161 + # this covers ppc64 and aarch64_be only for now
162 + if [[ ${biendian} == true && $(tc-endian) == big ]]; then
163 + merge_configs+=( "${dist_conf_path}/big-endian.config" )
164 + fi
165 +
166 + kernel-build_merge_configs "${merge_configs[@]}"
167 +}