1 |
commit: c74c95c92654e67090e1813c4b067d0260bcc238 |
2 |
Author: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Feb 20 18:59:55 2022 +0000 |
4 |
Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Feb 20 18:59:55 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c74c95c9 |
7 |
|
8 |
kernel-2.eclass: Document variables, minor style clean-up |
9 |
|
10 |
Document variables in the eclass, reorder alphabetically. |
11 |
Make spacing consistent in comment lines. |
12 |
|
13 |
Closes: https://bugs.gentoo.org/833188 |
14 |
|
15 |
Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org> |
16 |
|
17 |
eclass/kernel-2.eclass | 243 +++++++++++++++++++++++++++++++++---------------- |
18 |
1 file changed, 163 insertions(+), 80 deletions(-) |
19 |
|
20 |
diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass |
21 |
index f1c27a36d99b..9ec3d18d17c5 100644 |
22 |
--- a/eclass/kernel-2.eclass |
23 |
+++ b/eclass/kernel-2.eclass |
24 |
@@ -17,164 +17,238 @@ |
25 |
# added functionality: |
26 |
# unipatch - a flexible, singular method to extract, add and remove patches. |
27 |
|
28 |
-# @ECLASS-VARIABLE: K_USEPV |
29 |
+# @ECLASS-VARIABLE: CTARGET |
30 |
+# @INTERNAL |
31 |
+# @DESCRIPTION: |
32 |
+# Utilized for 32-bit userland on ppc64. |
33 |
+ |
34 |
+# @ECLASS-VARIABLE: CKV |
35 |
# @DEFAULT_UNSET |
36 |
# @DESCRIPTION: |
37 |
-# When setting the EXTRAVERSION variable, it should |
38 |
-# add PV to the end. |
39 |
-# this is useful for things like wolk. IE: |
40 |
-# EXTRAVERSION would be something like : -wolk-4.19-r1 |
41 |
+# Used as a comparison kernel version, which is used when |
42 |
+# PV doesnt reflect the genuine kernel version. |
43 |
+# This gets set to the portage style versioning. ie: |
44 |
+# CKV=2.6.11_rc4 |
45 |
|
46 |
-# @ECLASS-VARIABLE: K_NODRYRUN |
47 |
+# @ECLASS-VARIABLE: EXTRAVERSION |
48 |
# @DEFAULT_UNSET |
49 |
# @DESCRIPTION: |
50 |
-# if this is set then patch --dry-run will not |
51 |
-# be run. Certain patches will fail with this parameter |
52 |
-# See bug #507656 |
53 |
+# The additional version appended to OKV (-gentoo/-gentoo-r1) |
54 |
|
55 |
-# @ECLASS-VARIABLE: K_NOSETEXTRAVERSION |
56 |
+# @ECLASS-VARIABLE: H_SUPPORTEDARCH |
57 |
# @DEFAULT_UNSET |
58 |
# @DESCRIPTION: |
59 |
-# if this is set then EXTRAVERSION will not be |
60 |
-# automatically set within the kernel Makefile |
61 |
+# this should be a space separated list of ARCH's which |
62 |
+# can be supported by the headers ebuild |
63 |
|
64 |
-# @ECLASS-VARIABLE: K_NOUSENAME |
65 |
+# @ECLASS-VARIABLE: K_BASE_VER |
66 |
# @DEFAULT_UNSET |
67 |
# @DESCRIPTION: |
68 |
-# if this is set then EXTRAVERSION will not include the |
69 |
-# first part of ${PN} in EXTRAVERSION |
70 |
+# for git-sources, declare the base version this patch is |
71 |
+# based off of. |
72 |
|
73 |
-# @ECLASS-VARIABLE: K_NOUSEPR |
74 |
+# @ECLASS-VARIABLE: K_DEBLOB_AVAILABLE |
75 |
# @DEFAULT_UNSET |
76 |
# @DESCRIPTION: |
77 |
-# if this is set then EXTRAVERSION will not include the |
78 |
-# anything based on ${PR}. |
79 |
+# A value of "0" will disable all of the optional deblob |
80 |
+# code. If empty, will be set to "1" if deblobbing is |
81 |
+# possible. Test ONLY for "1". |
82 |
|
83 |
-# @ECLASS-VARIABLE: K_PREPATCHED |
84 |
+# @ECLASS-VARIABLE: K_DEBLOB_TAG |
85 |
# @DEFAULT_UNSET |
86 |
# @DESCRIPTION: |
87 |
-# if the patchset is prepatched (ie: pf-sources, |
88 |
-# zen-sources etc) it will use PR (ie: -r5) as the |
89 |
-# patchset version for and not use it as a true package |
90 |
-# revision |
91 |
+# This will be the version of deblob script. It's a upstream SVN tag |
92 |
+# such asw -gnu or -gnu1. |
93 |
|
94 |
-# @ECLASS-VARIABLE: K_EXTRAEINFO |
95 |
+# @ECLASS-VARIABLE: K_DEFCONFIG |
96 |
+# @DEFAULT_UNSET |
97 |
+# @DESCRIPTION: |
98 |
+# Allow specifying a different defconfig target. |
99 |
+# If length zero, defaults to "defconfig". |
100 |
+ |
101 |
+# @ECLASS-VARIABLE: K_EXP_GENPATCHES_PULL |
102 |
+# @DEFAULT_UNSET |
103 |
+# @DESCRIPTION: |
104 |
+# If set, we pull "experimental" regardless of the USE FLAG |
105 |
+# but expect the ebuild maintainer to use K_EXP_GENPATCHES_LIST. |
106 |
+ |
107 |
+# @ECLASS-VARIABLE: K_EXP_GENPATCHES_NOUSE |
108 |
+# @DEFAULT_UNSET |
109 |
+# @DESCRIPTION: |
110 |
+# If set, no USE flag will be provided for "experimental"; |
111 |
+# as a result the user cannot choose to apply those patches. |
112 |
+ |
113 |
+# @ECLASS-VARIABLE: K_EXP_GENPATCHES_LIST |
114 |
+# @DEFAULT_UNSET |
115 |
+# @DESCRIPTION: |
116 |
+# A list of patches to pick from "experimental" to apply when |
117 |
+# the USE flag is unset and K_EXP_GENPATCHES_PULL is set. |
118 |
+ |
119 |
+# @ECLASS-VARIABLE: K_EXTRAEINFO |
120 |
# @DEFAULT_UNSET |
121 |
# @DESCRIPTION: |
122 |
# this is a new-line seperated list of einfo displays in |
123 |
# postinst and can be used to carry additional postinst |
124 |
# messages |
125 |
|
126 |
-# @ECLASS-VARIABLE: K_EXTRAELOG |
127 |
+# @ECLASS-VARIABLE: K_EXTRAELOG |
128 |
# @DEFAULT_UNSET |
129 |
# @DESCRIPTION: |
130 |
# same as K_EXTRAEINFO except using elog instead of einfo |
131 |
|
132 |
-# @ECLASS-VARIABLE: K_EXTRAEWARN |
133 |
+# @ECLASS-VARIABLE: K_EXTRAEWARN |
134 |
# @DEFAULT_UNSET |
135 |
# @DESCRIPTION: |
136 |
# same as K_EXTRAEINFO except using ewarn instead of einfo |
137 |
|
138 |
-# @ECLASS-VARIABLE: K_SYMLINK |
139 |
+# @ECLASS-VARIABLE: K_FROM_GIT |
140 |
# @DEFAULT_UNSET |
141 |
# @DESCRIPTION: |
142 |
-# if this is set, then forcably create symlink anyway |
143 |
+# If set, this variable signals that the kernel sources derives |
144 |
+# from a git tree and special handling will be applied so that |
145 |
+# any patches that are applied will actually apply. |
146 |
|
147 |
-# @ECLASS-VARIABLE: K_BASE_VER |
148 |
+# @ECLASS-VARIABLE: K_GENPATCHES_VER |
149 |
# @DEFAULT_UNSET |
150 |
# @DESCRIPTION: |
151 |
-# for git-sources, declare the base version this patch is |
152 |
-# based off of. |
153 |
+# The version of the genpatches tarball(s) to apply. |
154 |
+# A value of "5" would apply genpatches-2.6.12-5 to |
155 |
+# my-sources-2.6.12.ebuild |
156 |
|
157 |
-# @ECLASS-VARIABLE: K_DEFCONFIG |
158 |
+# @ECLASS-VARIABLE: K_LONGTERM |
159 |
# @DEFAULT_UNSET |
160 |
# @DESCRIPTION: |
161 |
-# Allow specifying a different defconfig target. |
162 |
-# If length zero, defaults to "defconfig". |
163 |
+# If set, the eclass will search for the kernel source |
164 |
+# in the long term directories on the upstream servers |
165 |
+# as the location has been changed by upstream |
166 |
|
167 |
-# @ECLASS-VARIABLE: K_WANT_GENPATCHES |
168 |
+# @ECLASS-VARIABLE: K_NODRYRUN |
169 |
# @DEFAULT_UNSET |
170 |
# @DESCRIPTION: |
171 |
-# Apply genpatches to kernel source. Provide any |
172 |
-# combination of "base", "extras" or "experimental". |
173 |
+# if this is set then patch --dry-run will not |
174 |
+# be run. Certain patches will fail with this parameter |
175 |
+# See bug #507656 |
176 |
|
177 |
-# @ECLASS-VARIABLE: K_EXP_GENPATCHES_PULL |
178 |
+# @ECLASS-VARIABLE: K_NOSETEXTRAVERSION |
179 |
# @DEFAULT_UNSET |
180 |
# @DESCRIPTION: |
181 |
-# If set, we pull "experimental" regardless of the USE FLAG |
182 |
-# but expect the ebuild maintainer to use K_EXP_GENPATCHES_LIST. |
183 |
+# if this is set then EXTRAVERSION will not be |
184 |
+# automatically set within the kernel Makefile |
185 |
|
186 |
-# @ECLASS-VARIABLE: K_EXP_GENPATCHES_NOUSE |
187 |
+# @ECLASS-VARIABLE: K_NOUSENAME |
188 |
# @DEFAULT_UNSET |
189 |
# @DESCRIPTION: |
190 |
-# If set, no USE flag will be provided for "experimental"; |
191 |
-# as a result the user cannot choose to apply those patches. |
192 |
+# if this is set then EXTRAVERSION will not include the |
193 |
+# first part of ${PN} in EXTRAVERSION |
194 |
|
195 |
-# @ECLASS-VARIABLE: K_EXP_GENPATCHES_LIST |
196 |
+# @ECLASS-VARIABLE: K_NOUSEPR |
197 |
# @DEFAULT_UNSET |
198 |
# @DESCRIPTION: |
199 |
-# A list of patches to pick from "experimental" to apply when |
200 |
-# the USE flag is unset and K_EXP_GENPATCHES_PULL is set. |
201 |
+# if this is set then EXTRAVERSION will not include the |
202 |
+# anything based on ${PR}. |
203 |
|
204 |
-# @ECLASS-VARIABLE: K_FROM_GIT |
205 |
+# @ECLASS-VARIABLE: K_PREDEBLOBBED |
206 |
# @DEFAULT_UNSET |
207 |
# @DESCRIPTION: |
208 |
-# If set, this variable signals that the kernel sources derives |
209 |
-# from a git tree and special handling will be applied so that |
210 |
-# any patches that are applied will actually apply. |
211 |
+# This kernel was already deblobbed elsewhere. |
212 |
+# If false, either optional deblobbing will be available |
213 |
+# or the license will note the inclusion of linux-firmware code. |
214 |
|
215 |
-# @ECLASS-VARIABLE: K_GENPATCHES_VER |
216 |
+# @ECLASS-VARIABLE: K_PREPATCHED |
217 |
# @DEFAULT_UNSET |
218 |
# @DESCRIPTION: |
219 |
-# The version of the genpatches tarball(s) to apply. |
220 |
-# A value of "5" would apply genpatches-2.6.12-5 to |
221 |
-# my-sources-2.6.12.ebuild |
222 |
+# if the patchset is prepatched (ie: pf-sources, |
223 |
+# zen-sources etc) it will use PR (ie: -r5) as the |
224 |
+# patchset version for and not use it as a true package |
225 |
+# revision |
226 |
|
227 |
-# @ECLASS-VARIABLE: K_SECURITY_UNSUPPORTED |
228 |
+# @ECLASS-VARIABLE: K_SECURITY_UNSUPPORTED |
229 |
# @DEFAULT_UNSET |
230 |
# @DESCRIPTION: |
231 |
# If set, this kernel is unsupported by Gentoo Security |
232 |
# to the current eclass maintainer :) |
233 |
|
234 |
-# @ECLASS-VARIABLE: K_DEBLOB_AVAILABLE |
235 |
+# @ECLASS-VARIABLE: K_SYMLINK |
236 |
# @DEFAULT_UNSET |
237 |
# @DESCRIPTION: |
238 |
-# A value of "0" will disable all of the optional deblob |
239 |
-# code. If empty, will be set to "1" if deblobbing is |
240 |
-# possible. Test ONLY for "1". |
241 |
+# if this is set, then forcably create symlink anyway |
242 |
|
243 |
-# @ECLASS-VARIABLE: K_DEBLOB_TAG |
244 |
+# @ECLASS-VARIABLE: K_USEPV |
245 |
# @DEFAULT_UNSET |
246 |
# @DESCRIPTION: |
247 |
-# This will be the version of deblob script. It's a upstream SVN tag |
248 |
-# such asw -gnu or -gnu1. |
249 |
+# When setting the EXTRAVERSION variable, it should |
250 |
+# add PV to the end. |
251 |
+# this is useful for things like wolk. IE: |
252 |
+# EXTRAVERSION would be something like : -wolk-4.19-r1 |
253 |
|
254 |
-# @ECLASS-VARIABLE: K_PREDEBLOBBED |
255 |
+# @ECLASS-VARIABLE: K_WANT_GENPATCHES |
256 |
# @DEFAULT_UNSET |
257 |
# @DESCRIPTION: |
258 |
-# This kernel was already deblobbed elsewhere. |
259 |
-# If false, either optional deblobbing will be available |
260 |
-# or the license will note the inclusion of linux-firmware code. |
261 |
+# Apply genpatches to kernel source. Provide any |
262 |
+# combination of "base", "extras" or "experimental". |
263 |
|
264 |
-# @ECLASS-VARIABLE: K_LONGTERM |
265 |
+# @ECLASS-VARIABLE: KERNEL_URI |
266 |
# @DEFAULT_UNSET |
267 |
# @DESCRIPTION: |
268 |
-# If set, the eclass will search for the kernel source |
269 |
-# in the long term directories on the upstream servers |
270 |
-# as the location has been changed by upstream |
271 |
+# Upstream kernel src URI |
272 |
|
273 |
-# @ECLASS-VARIABLE: H_SUPPORTEDARCH |
274 |
+# @ECLASS-VARIABLE: KV |
275 |
# @DEFAULT_UNSET |
276 |
+# @OUTPUT_VARIABLE |
277 |
# @DESCRIPTION: |
278 |
-# this should be a space separated list of ARCH's which |
279 |
-# can be supported by the headers ebuild |
280 |
+# Kernel Version (2.6.0-gentoo/2.6.0-test11-gentoo-r1) |
281 |
|
282 |
-# @ECLASS-VARIABLE: UNIPATCH_LIST |
283 |
+# @ECLASS-VARIABLE: KV_FULL |
284 |
# @DEFAULT_UNSET |
285 |
+# @OUTPUT_VARIABLE |
286 |
# @DESCRIPTION: |
287 |
-# space delimetered list of patches to be applied to the kernel |
288 |
+# Kernel full version |
289 |
+ |
290 |
+# @ECLASS-VARIABLE: KV_MAJOR |
291 |
+# @DEFAULT_UNSET |
292 |
+# @OUTPUT_VARIABLE |
293 |
+# @DESCRIPTION: |
294 |
+# Kernel major version from <KV_MAJOR>.<KV_MINOR>.<KV_PATCH |
295 |
+ |
296 |
+# @ECLASS-VARIABLE: KV_MINOR |
297 |
+# @DEFAULT_UNSET |
298 |
+# @OUTPUT_VARIABLE |
299 |
+# @DESCRIPTION: |
300 |
+# Kernel minor version from <KV_MAJOR>.<KV_MINOR>.<KV_PATCH |
301 |
+ |
302 |
+# @ECLASS-VARIABLE: KV_PATCH |
303 |
+# @DEFAULT_UNSET |
304 |
+# @OUTPUT_VARIABLE |
305 |
+# @DESCRIPTION: |
306 |
+# Kernel patch version from <KV_MAJOR>.<KV_MINOR>.<KV_PATCH |
307 |
+ |
308 |
+# @ECLASS-VARIABLE: LINUX_HOSTCFLAGS |
309 |
+# @DEFAULT_UNSET |
310 |
+# @DESCRIPTION: |
311 |
+# Default cflags if not already set |
312 |
+ |
313 |
+# @ECLASS-VARIABLE: OKV |
314 |
+# @DEFAULT_UNSET |
315 |
+# @DESCRIPTION: |
316 |
+# Original Kernel Version (2.6.0/2.6.0-test11) |
317 |
+ |
318 |
+# @ECLASS-VARIABLE: RELEASE |
319 |
+# @DEFAULT_UNSET |
320 |
+# @DESCRIPTION: |
321 |
+# Representative of the kernel release tag (-rc3/-git3) |
322 |
+ |
323 |
+# @ECLASS-VARIABLE: RELEASETYPE |
324 |
+# @DEFAULT_UNSET |
325 |
+# @DESCRIPTION: |
326 |
+# The same as RELEASE but with its numerics stripped (-rc/-git) |
327 |
|
328 |
-# @ECLASS-VARIABLE: UNIPATCH_EXCLUDE |
329 |
+# @ECLASS-VARIABLE: UNIPATCH_DOCS |
330 |
+# @DEFAULT_UNSET |
331 |
+# @DESCRIPTION: |
332 |
+# space delimemeted list of docs to be installed to |
333 |
+# the doc dir |
334 |
+ |
335 |
+# @ECLASS-VARIABLE: UNIPATCH_EXCLUDE |
336 |
# @DEFAULT_UNSET |
337 |
# @DESCRIPTION: |
338 |
# An addition var to support exlusion based completely |
339 |
@@ -182,13 +256,22 @@ |
340 |
# this should _NOT_ be used from the ebuild as this is |
341 |
# reserved for end users passing excludes from the cli |
342 |
|
343 |
-# @ECLASS-VARIABLE: UNIPATCH_DOCS |
344 |
+# @ECLASS-VARIABLE: UNIPATCH_LIST |
345 |
# @DEFAULT_UNSET |
346 |
# @DESCRIPTION: |
347 |
-# space delimemeted list of docs to be installed to |
348 |
-# the doc dir |
349 |
+# space delimetered list of patches to be applied to the kernel |
350 |
+ |
351 |
+# @ECLASS-VARIABLE: UNIPATCH_LIST_DEFAULT |
352 |
+# @INTERNAL |
353 |
+# @DESCRIPTION: |
354 |
+# Upstream kernel patch archive |
355 |
+ |
356 |
+# @ECLASS-VARIABLE: UNIPATCH_LIST_GENPATCHES |
357 |
+# @INTERNAL |
358 |
+# @DESCRIPTION: |
359 |
+# List of genpatches archives to apply to the kernel |
360 |
|
361 |
-# @ECLASS-VARIABLE: UNIPATCH_STRICTORDER |
362 |
+# @ECLASS-VARIABLE: UNIPATCH_STRICTORDER |
363 |
# @DEFAULT_UNSET |
364 |
# @DESCRIPTION: |
365 |
# if this is set places patches into directories of |