1 |
commit: 1dec5aaf4f0da04b09a3f23201a21d4ac4b5d92a |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jun 26 04:05:52 2022 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jun 26 09:08:22 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1dec5aaf |
7 |
|
8 |
sys-kernel/gentoo-kernel: Bump to 5.18.7 |
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.18.7.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 91f50f763851..414e26321a02 100644 |
18 |
--- a/sys-kernel/gentoo-kernel/Manifest |
19 |
+++ b/sys-kernel/gentoo-kernel/Manifest |
20 |
@@ -10,6 +10,8 @@ DIST genpatches-5.15-53.base.tar.xz 2200544 BLAKE2B a6f1e11186e771abe56bb453d45f |
21 |
DIST genpatches-5.15-53.extras.tar.xz 3932 BLAKE2B ade13a83b27b14cf19f455539599aff1db3bc6caf99d07e746b292be702c49591519b63f754c4651ac3e0e867412cb5ffb588d5056cf6066c193e09a0c3feaf2 SHA512 438905963b586148d6385f24549343a6fc4d623f24aea089f52af44f772eaa62f0602d729b0232620d8ca08d440210dc7dbe7b5259a3fc232d603f574b5bf714 |
22 |
DIST genpatches-5.15-54.base.tar.xz 2203912 BLAKE2B 36e27d2734e9a62b1900907ea3722a522ddc61c991b5c751dd09d055b9da0fa92bd0de3eeee8b1560ff9a60c8d80181904dd14b7db7878b499a07bb31b0b5f90 SHA512 e751fbd89b91dc59dd0ac87f906ad1c4ae69ccfcad97db616bddd0d25184c133cba8af1141f5e32f690199d6196d0a5035941b70576cd4dd80aea750d1ce0c27 |
23 |
DIST genpatches-5.15-54.extras.tar.xz 3936 BLAKE2B 259497959ac6cd96036809fbc1634fa174e611f626b0f36c8003587ec0825fd75431b34329ecf4a9d9aeda3803986b2e3987f27d37e0fddf27eb83509c248548 SHA512 7c85e42f6195f6a0bdafbf0be5fbbab1b7a634a922c5233d1dfc2c29842fe4617888cdd7769584d2e918457bdd1a295b8761e354772d78b05cd1e917e9f71abb |
24 |
+DIST genpatches-5.18-10.base.tar.xz 500696 BLAKE2B e6dfe7b2f752aa0cadb2de11ed7e9e77935abf4d61c99fdb4f6790853364c8b8b189d25b2190b3c85b51ef355b085d1ab740599a920843534f0d4a840fbe8733 SHA512 d425826ca98a5600262485aae057401c131e63b2b84ef6eaea287a433acd4b0f98e3899bd931ac73eda5651c57bcc4bec730469655d54aa1f176ebfda6724aa6 |
25 |
+DIST genpatches-5.18-10.extras.tar.xz 3924 BLAKE2B ea024b19777b6fd59ad5505eaff41db7dc793f5f29beca1d70c2ab60829f5864f1b78f9b809fa9443f995f70df82746d33ac9ce9453a564b77c3964b49afe822 SHA512 7468faea1020335f546c69d331aa864400687056a01cb54a888f3d4bbe6c9061fc2a5d519f93aa362b87df953bb13c06ea2dda403e48f63ca259a6990120ff5f |
26 |
DIST genpatches-5.18-8.base.tar.xz 440848 BLAKE2B 8a965867409cc340b13687eec9c7391bbaf26b770ba8d4b657b923226a539b7b68eabab6f12bae4bed09a0d198917373a6ab4f707831c652e2461a49f8dd4981 SHA512 057a00d62f4d8ba7be4ea26aeaa4bfbd5581b22ded85dae71aaa693621eda17532ac00bbeaaea1689f552ce2b95a04e9aade603f6236c2a265aa8fea8231c5d0 |
27 |
DIST genpatches-5.18-8.extras.tar.xz 3924 BLAKE2B 3f575b12166621c67c9cf6ee15a76af551a039d142a85678abc10829e9a573641be8557b9b606352d46fa4d123e95071b2946447a6f53afef5b37eec5f342cf7 SHA512 7aab8d9d18dfb6129ee0e995450c9d9d759545a9fa2cde1d26dfc03d677b9133a310f3943cd77b5981830a6a1cff59463e85759ef5cd68bcb2838dd96104f590 |
28 |
DIST genpatches-5.18-9.base.tar.xz 495452 BLAKE2B 244e049522e9b8586081b9eac59fec51184c532bca70fc1d451af1ded646df9bdc7e047cea0963fd07ae8aa04bd4158d64854a2d790ec90be37aa467c7e8b646 SHA512 b90abf747ae92bb4ac7ef94646aedc21a89080d10f8aecae63821d59c0ac29b3b94c0fc6b862d87eb8b86442c2d41cfe16e3a1341d3c146d2b3c678c2f2cdf9a |
29 |
|
30 |
diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-5.18.7.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-5.18.7.ebuild |
31 |
new file mode 100644 |
32 |
index 000000000000..1ba27417d51c |
33 |
--- /dev/null |
34 |
+++ b/sys-kernel/gentoo-kernel/gentoo-kernel-5.18.7.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=7 |
40 |
+ |
41 |
+inherit kernel-build toolchain-funcs |
42 |
+ |
43 |
+MY_P=linux-${PV%.*} |
44 |
+GENPATCHES_P=genpatches-${PV%.*}-$(( ${PV##*.} + 3 )) |
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.18.4-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/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 ~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 |
+} |