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: Thu, 27 Jan 2022 15:06:21
Message-Id: 1643295966.a2697c1dc74694c5cdddc19371b25c663b9c62dc.mgorny@gentoo
1 commit: a2697c1dc74694c5cdddc19371b25c663b9c62dc
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jan 27 12:36:40 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Thu Jan 27 15:06:06 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a2697c1d
7
8 sys-kernel/gentoo-kernel: Bump to 5.10.94
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.10.94.ebuild | 127 +++++++++++++++++++++
14 2 files changed, 129 insertions(+)
15
16 diff --git a/sys-kernel/gentoo-kernel/Manifest b/sys-kernel/gentoo-kernel/Manifest
17 index 1633d10c4839..4d888ef7d2e0 100644
18 --- a/sys-kernel/gentoo-kernel/Manifest
19 +++ b/sys-kernel/gentoo-kernel/Manifest
20 @@ -1,5 +1,7 @@
21 DIST genpatches-5.10-100.base.tar.xz 2822696 BLAKE2B 8958af480d9babf927d8b1ac5ff0198549b6052b1c2b4cfad900c63e50b8ac7c396b3a8d3cec59406192f578eb871ba580b14398a5b6ad4ccb9d2f379d181b8a SHA512 27fed61b21ebf39e7c16d2d0a447160d0abf0ac50fbfcb924f1adb38a51d6683f70f911d3f8e62c084d2555ea14dedf8335f25ac9140066f88812c47d5f9b0ab
22 DIST genpatches-5.10-100.extras.tar.xz 3852 BLAKE2B 7ac718b6080adb6a641ef7b976185b09ddf7f225fcaede25afbf6a15bf855eb6dbbe44416fcddf1ea466c36433e04736c68f032a1c79bde858434427c6658a1b SHA512 558c9fc3279d7fb507ac8251369966dd40282776890da045d96eab328fd7300a93dab12afbfabc3dd52f61d49c0020b87cd4087d4c8f840f3443ed8ffe89c81d
23 +DIST genpatches-5.10-101.base.tar.xz 2955936 BLAKE2B 3370c569b41cace5d3a2712ade28dfe0abb2be3e4a5578356a6c53dc241a38eaf402900a1c1c1598dbad32f304244a286b538f98318f4cf6e66c18b74ec5bb7e SHA512 901de3d038a85c673a1645e5e58ab5ac195cfb1b449dbf424410db22e5855dadcb75f70b406bfee37220652f300db3a8588d093db9da3d011e2d5f100486d184
24 +DIST genpatches-5.10-101.extras.tar.xz 3852 BLAKE2B dbf3e7e310992dbaf119a9f9e0784e63bc9a37588ffda6f532fb70c798ab50ca97e5083d3e63451d33d67ff46229b7c67ee0e92fc1d72d96f4a64cb605a232fc SHA512 31ca45cb7b38203f39e1b10d5e23835e226b3adcfe83fef0d9a6cf9d7fce88c1249f25aa19188d39042e44d733ab4a6cfab1ac37b5f945488e81e157a1b9cd8c
25 DIST genpatches-5.15-18.base.tar.xz 697228 BLAKE2B 01a377a9c1f2709ad2cde18e3094d37ba2414c7c3d949f236d41f5d36e8c4513331c4859740ec34bc8418d6fb2457fbb7d9f7c64f6f596795e1abc9a02c9e340 SHA512 14a652cf64e8e22539a61f14af715fd1a59644875a8a61473b5eb66bcc7b5f4bb34602463b208114bb4dbb73f159932983d48c0567a44b5090b9ff8f52920eaf
26 DIST genpatches-5.15-18.extras.tar.xz 3852 BLAKE2B d3521142bf5ece893429ec7e1b6aec724fff15fbba2f80e9fb092af4d40bc258e034226989d2502ee258faa0c7e0aacd885499d22f4317060d61cd916e00e7fa SHA512 f1a98d3875541ec4b8f3461c1af8a9b37fd4f5a64e7d717e906f851bf4e976e4509df4b8cb67b9e210215cc33924d039599cecc8f4892dcbed510e00f8119df8
27 DIST genpatches-5.15-19.base.tar.xz 925776 BLAKE2B 040a1cabc9217a91e8bae89ef7878e61056f3eccc97472a27dd2b3c695b2bce59c487ff303048d1f98553349c0b6227d0a3dfa837ccfd6cfd7b1147606b4703f SHA512 b2facd0ba66001ce9327ef2d037097e78e4b9c8e02eb5b66f9ab9bacc6af5800ccfe576ca4383c263c597a67e92b96bb0287140396a602f15fbec403a4173a53
28
29 diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-5.10.94.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-5.10.94.ebuild
30 new file mode 100644
31 index 000000000000..98f0c8eaf074
32 --- /dev/null
33 +++ b/sys-kernel/gentoo-kernel/gentoo-kernel-5.10.94.ebuild
34 @@ -0,0 +1,127 @@
35 +# Copyright 2020-2022 Gentoo Authors
36 +# Distributed under the terms of the GNU General Public License v2
37 +
38 +EAPI=7
39 +
40 +inherit kernel-build toolchain-funcs
41 +
42 +MY_P=linux-${PV%.*}
43 +GENPATCHES_P=genpatches-${PV%.*}-$(( ${PV##*.} + 7 ))
44 +# https://koji.fedoraproject.org/koji/packageinfo?packageID=8
45 +CONFIG_VER=5.10.12
46 +CONFIG_HASH=836165dd2dff34e4f2c47ca8f9c803002c1e6530
47 +GENTOO_CONFIG_VER=5.15.5
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/v${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 +S=${WORKDIR}/${MY_P}
74 +
75 +LICENSE="GPL-2"
76 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
77 +IUSE="debug hardened"
78 +REQUIRED_USE="arm? ( savedconfig )"
79 +
80 +RDEPEND="
81 + !sys-kernel/gentoo-kernel-bin:${SLOT}"
82 +BDEPEND="
83 + debug? ( dev-util/pahole )"
84 +PDEPEND="
85 + >=virtual/dist-kernel-${PV}"
86 +
87 +QA_FLAGS_IGNORED="
88 + usr/src/linux-.*/scripts/gcc-plugins/.*.so
89 + usr/src/linux-.*/vmlinux
90 +"
91 +
92 +src_prepare() {
93 + local PATCHES=(
94 + # meh, genpatches have no directory
95 + "${WORKDIR}"/*.patch
96 + )
97 + default
98 +
99 + local biendian=false
100 +
101 + # prepare the default config
102 + case ${ARCH} in
103 + amd64)
104 + cp "${DISTDIR}/kernel-x86_64-fedora.config.${CONFIG_VER}" .config || die
105 + ;;
106 + arm)
107 + return
108 + ;;
109 + arm64)
110 + cp "${DISTDIR}/kernel-aarch64-fedora.config.${CONFIG_VER}" .config || die
111 + biendian=true
112 + ;;
113 + hppa)
114 + return
115 + ;;
116 + ppc)
117 + # assume powermac/powerbook defconfig
118 + # we still package.use.force savedconfig
119 + cp "${WORKDIR}/${MY_P}/arch/powerpc/configs/pmac32_defconfig" .config || die
120 + ;;
121 + ppc64)
122 + cp "${DISTDIR}/kernel-ppc64le-fedora.config.${CONFIG_VER}" .config || die
123 + biendian=true
124 + ;;
125 + x86)
126 + cp "${DISTDIR}/kernel-i686-fedora.config.${CONFIG_VER}" .config || die
127 + ;;
128 + *)
129 + die "Unsupported arch ${ARCH}"
130 + ;;
131 + esac
132 +
133 + local myversion="-gentoo-dist"
134 + use hardened && myversion+="-hardened"
135 + echo "CONFIG_LOCALVERSION=\"${myversion}\"" > "${T}"/version.config || die
136 + local dist_conf_path="${WORKDIR}/gentoo-kernel-config-${GENTOO_CONFIG_VER}"
137 +
138 + local merge_configs=(
139 + "${T}"/version.config
140 + "${dist_conf_path}"/base.config
141 + )
142 + use debug || merge_configs+=(
143 + "${dist_conf_path}"/no-debug.config
144 + )
145 + if use hardened; then
146 + merge_configs+=( "${dist_conf_path}"/hardened-base.config )
147 +
148 + tc-is-gcc && merge_configs+=( "${dist_conf_path}"/hardened-gcc-plugins.config )
149 +
150 + if [[ -f "${dist_conf_path}/hardened-${ARCH}.config" ]]; then
151 + merge_configs+=( "${dist_conf_path}/hardened-${ARCH}.config" )
152 + fi
153 + fi
154 +
155 + # this covers ppc64 and aarch64_be only for now
156 + if [[ ${biendian} == true && $(tc-endian) == big ]]; then
157 + merge_configs+=( "${dist_conf_path}/big-endian.config" )
158 + fi
159 +
160 + kernel-build_merge_configs "${merge_configs[@]}"
161 +}