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, 01 Feb 2023 15:01:07
Message-Id: 1675263216.0e71eaf7408f0b4cc8f48e19887e3cfed1566175.mgorny@gentoo
1 commit: 0e71eaf7408f0b4cc8f48e19887e3cfed1566175
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Wed Feb 1 11:15:36 2023 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Wed Feb 1 14:53:36 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0e71eaf7
7
8 sys-kernel/gentoo-kernel: Bump to 6.1.9
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-6.1.9.ebuild | 140 +++++++++++++++++++++
14 2 files changed, 142 insertions(+)
15
16 diff --git a/sys-kernel/gentoo-kernel/Manifest b/sys-kernel/gentoo-kernel/Manifest
17 index 1cc74dc8561b..03f6daf37c8c 100644
18 --- a/sys-kernel/gentoo-kernel/Manifest
19 +++ b/sys-kernel/gentoo-kernel/Manifest
20 @@ -18,6 +18,8 @@ DIST genpatches-5.4-235.base.tar.xz 5437324 BLAKE2B 16a5f67224b3bc10792945ef3798
21 DIST genpatches-5.4-235.extras.tar.xz 1812 BLAKE2B bc1b83082a60463da80236c4eb42590981905e35f653ab2976c9f31f4879446f65d0f123f11e45bd583fc0ef788898f38a6534e66d1a028716954020427736f4 SHA512 515331c1ce6d7ce76f946ab6b8443afdf47f829bdf8e486ca733854d5c984c0c99a36611cc82418b0155f9ce1276b702affec04b65c4699cd4bf796d3ef6a7d9
22 DIST genpatches-6.1-10.base.tar.xz 591388 BLAKE2B 5352d923a1df59c38cd1061ea9454041143a9786e4c81c195edb0e50ae9490f9629f2806482246c417db294a2ad9b643c9a6b38403c46c1b135c73a94506e6f2 SHA512 5ed3ea65e2ad63f4d59241b8e11f4de068564e5079c7fd6d511e9636867843e517b662f744577b615cbd572fa7313af260fb07c5c4e39e0cd114e4f315d3d777
23 DIST genpatches-6.1-10.extras.tar.xz 3804 BLAKE2B 2a713dcd63d5946368d0bf88fee904b05f3fceac266173aa3016c528cfb40eff98f7aeaca2fd67e52a02a39b80b430fd55c8abd65ff5e61dbb6e6cd6ee757282 SHA512 152c134efcd7ceeb233bd7d9211a871d6b4f633e4782ac73657d583e4f149763e37ad7cf0f19efbf1c4c25fc50f3c67167b15f024eabfcfcb016b1cb23c36ae0
24 +DIST genpatches-6.1-11.base.tar.xz 672088 BLAKE2B 29cabedf32ea3f8cb1ca75bde23955e4cc23c54ac93f8dbe66adbca1b1af4e5c6b54e60b84ee95bf48f9432a844aea279e89acb3a15cd8ab67e5453fb179c9d4 SHA512 a840a15204d1f1fd9f809cabe01cb0e37756cf1ac89181b29306e6a3b0ea3ce5e8b48b2402804b096106d0c4a0eb2b318e4ad3eadfeee4f266e6c3b6c259a6d2
25 +DIST genpatches-6.1-11.extras.tar.xz 3804 BLAKE2B 9ecd609350e0ad98aedd70e1bd6838fd2d933576dd2236bc111c13b46623adba926bb1547349a1e9e35f3e90e0ef0b29fdc10bd38e3c4c5aeb3cf92b2cef9ff6 SHA512 f8aa9ac57c51f229a8a940ca57b401ca7c5b46cf40cbc1ccb427b341082c2f52e5cd945c548b2fe809935ffb94d4c8275fa4011510239d38ae13b338d568253e
26 DIST genpatches-6.1-8.base.tar.xz 477364 BLAKE2B 29fa8d45feed6333883e1f4733ace6ed52b5424aeeada3e71917a0e3d85f87a7b99f0863ff468e678ee5631c6e0f0dd7c3a0115a58d80512ac1a27d58a2df149 SHA512 d1f32215ced0ed39cc1c6d224b1a12ae3f80bcc19f1ea23189e853367ebc661c74d17d335bd615c2fc1f3c21271f6f170a35caa38194b2dfd09f78e405739ae0
27 DIST genpatches-6.1-8.extras.tar.xz 3808 BLAKE2B af83b01895f1b3af4c0220a89b0dabc3642e578920475402c02dbe0300c520dbc621a2245eb66842addac48565c8b612198138c49491dca7909d594a9d2ef818 SHA512 22f9378bc7b4413d60672656c2e73bfbcc6debd10179a0eb2b523bceb5f3adeacecbd433ede3aa057143163a9cc2971d5023d73ac8187eaad59508dd229feba7
28 DIST genpatches-6.1-9.base.tar.xz 544936 BLAKE2B 9152c33c4145f99daff4f436afcb621883d21fb05be5821a045b47be2880250d3ccf1210f3ecec0241ac41f57581da737053b86852760cd11efc524719fd0f6b SHA512 88b6bd131dfe53a51a9a0dab13ef2bfaa4818d4b0ab93e485346f96fe58a64b7338d9aa4483c751d9d1886818ee8700918721037b03f868a3b2cd9d5ecdd7799
29
30 diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-6.1.9.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-6.1.9.ebuild
31 new file mode 100644
32 index 000000000000..2f4b85038768
33 --- /dev/null
34 +++ b/sys-kernel/gentoo-kernel/gentoo-kernel-6.1.9.ebuild
35 @@ -0,0 +1,140 @@
36 +# Copyright 2020-2023 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=6.1.7-gentoo
48 +GENTOO_CONFIG_VER=g6
49 +
50 +DESCRIPTION="Linux kernel built with Gentoo patches"
51 +HOMEPAGE="
52 + https://wiki.gentoo.org/wiki/Project:Distribution_Kernel
53 + https://www.kernel.org/
54 +"
55 +SRC_URI+="
56 + https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/${MY_P}.tar.xz
57 + https://dev.gentoo.org/~alicef/dist/genpatches/${GENPATCHES_P}.base.tar.xz
58 + https://dev.gentoo.org/~alicef/dist/genpatches/${GENPATCHES_P}.extras.tar.xz
59 + https://github.com/projg2/gentoo-kernel-config/archive/${GENTOO_CONFIG_VER}.tar.gz
60 + -> gentoo-kernel-config-${GENTOO_CONFIG_VER}.tar.gz
61 + amd64? (
62 + https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-x86_64-fedora.config
63 + -> kernel-x86_64-fedora.config.${CONFIG_VER}
64 + )
65 + arm64? (
66 + https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-aarch64-fedora.config
67 + -> kernel-aarch64-fedora.config.${CONFIG_VER}
68 + )
69 + ppc64? (
70 + https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-ppc64le-fedora.config
71 + -> kernel-ppc64le-fedora.config.${CONFIG_VER}
72 + )
73 + x86? (
74 + https://raw.githubusercontent.com/projg2/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-i686-fedora.config
75 + -> kernel-i686-fedora.config.${CONFIG_VER}
76 + )
77 +"
78 +S=${WORKDIR}/${MY_P}
79 +
80 +LICENSE="GPL-2"
81 +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~x86"
82 +IUSE="debug hardened"
83 +REQUIRED_USE="arm? ( savedconfig )
84 + hppa? ( savedconfig )
85 + riscv? ( savedconfig )"
86 +
87 +RDEPEND="
88 + !sys-kernel/gentoo-kernel-bin:${SLOT}
89 +"
90 +BDEPEND="
91 + debug? ( dev-util/pahole )
92 +"
93 +PDEPEND="
94 + >=virtual/dist-kernel-${PV}
95 +"
96 +
97 +QA_FLAGS_IGNORED="
98 + usr/src/linux-.*/scripts/gcc-plugins/.*.so
99 + usr/src/linux-.*/vmlinux
100 + usr/src/linux-.*/arch/powerpc/kernel/vdso.*/vdso.*.so.dbg
101 +"
102 +
103 +src_prepare() {
104 + local PATCHES=(
105 + # meh, genpatches have no directory
106 + "${WORKDIR}"/*.patch
107 + )
108 + default
109 +
110 + local biendian=false
111 +
112 + # prepare the default config
113 + case ${ARCH} in
114 + amd64)
115 + cp "${DISTDIR}/kernel-x86_64-fedora.config.${CONFIG_VER}" .config || die
116 + ;;
117 + arm)
118 + return
119 + ;;
120 + arm64)
121 + cp "${DISTDIR}/kernel-aarch64-fedora.config.${CONFIG_VER}" .config || die
122 + biendian=true
123 + ;;
124 + hppa)
125 + return
126 + ;;
127 + ppc)
128 + # assume powermac/powerbook defconfig
129 + # we still package.use.force savedconfig
130 + cp "${WORKDIR}/${MY_P}/arch/powerpc/configs/pmac32_defconfig" .config || die
131 + ;;
132 + ppc64)
133 + cp "${DISTDIR}/kernel-ppc64le-fedora.config.${CONFIG_VER}" .config || die
134 + biendian=true
135 + ;;
136 + riscv)
137 + return
138 + ;;
139 + x86)
140 + cp "${DISTDIR}/kernel-i686-fedora.config.${CONFIG_VER}" .config || die
141 + ;;
142 + *)
143 + die "Unsupported arch ${ARCH}"
144 + ;;
145 + esac
146 +
147 + local myversion="-gentoo-dist"
148 + use hardened && myversion+="-hardened"
149 + echo "CONFIG_LOCALVERSION=\"${myversion}\"" > "${T}"/version.config || die
150 + local dist_conf_path="${WORKDIR}/gentoo-kernel-config-${GENTOO_CONFIG_VER}"
151 +
152 + local merge_configs=(
153 + "${T}"/version.config
154 + "${dist_conf_path}"/base.config
155 + )
156 + use debug || merge_configs+=(
157 + "${dist_conf_path}"/no-debug.config
158 + )
159 + if use hardened; then
160 + merge_configs+=( "${dist_conf_path}"/hardened-base.config )
161 +
162 + tc-is-gcc && merge_configs+=( "${dist_conf_path}"/hardened-gcc-plugins.config )
163 +
164 + if [[ -f "${dist_conf_path}/hardened-${ARCH}.config" ]]; then
165 + merge_configs+=( "${dist_conf_path}/hardened-${ARCH}.config" )
166 + fi
167 + fi
168 +
169 + # this covers ppc64 and aarch64_be only for now
170 + if [[ ${biendian} == true && $(tc-endian) == big ]]; then
171 + merge_configs+=( "${dist_conf_path}/big-endian.config" )
172 + fi
173 +
174 + kernel-build_merge_configs "${merge_configs[@]}"
175 +}