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