Lines 55-60
Link Here
|
55 |
# K_LONGTERM - If set, the eclass will search for the kernel source |
55 |
# K_LONGTERM - If set, the eclass will search for the kernel source |
56 |
# in the long term directories on the upstream servers |
56 |
# in the long term directories on the upstream servers |
57 |
# as the location has been changed by upstream |
57 |
# as the location has been changed by upstream |
|
|
58 |
# K_TARBALL_EXT - If set, the default kernel sources and genpatches tarball extension will |
59 |
# be overridden by K_TARBALL_EXT. You can set it to something |
60 |
# like "gz" or "bz2". |
58 |
# H_SUPPORTEDARCH - this should be a space separated list of ARCH's which |
61 |
# H_SUPPORTEDARCH - this should be a space separated list of ARCH's which |
59 |
# can be supported by the headers ebuild |
62 |
# can be supported by the headers ebuild |
60 |
|
63 |
|
Lines 96-101
Link Here
|
96 |
# set LINUX_HOSTCFLAGS if not already set |
99 |
# set LINUX_HOSTCFLAGS if not already set |
97 |
: ${LINUX_HOSTCFLAGS:="-Wall -Wstrict-prototypes -Os -fomit-frame-pointer -I${S}/include"} |
100 |
: ${LINUX_HOSTCFLAGS:="-Wall -Wstrict-prototypes -Os -fomit-frame-pointer -I${S}/include"} |
98 |
|
101 |
|
|
|
102 |
# set K_TARBALL_EXT to "xz" if not already set. |
103 |
# See bug #421721 |
104 |
: ${K_TARBALL_EXT:="xz"} |
105 |
|
99 |
# debugging functions |
106 |
# debugging functions |
100 |
#============================================================== |
107 |
#============================================================== |
101 |
# this function exists only to help debug kernel-2.eclass |
108 |
# this function exists only to help debug kernel-2.eclass |
Lines 121-138
Link Here
|
121 |
|
128 |
|
122 |
# for > 3.0 kernels, handle genpatches tarball name |
129 |
# for > 3.0 kernels, handle genpatches tarball name |
123 |
# genpatches for 3.0 and 3.0.1 might be named |
130 |
# genpatches for 3.0 and 3.0.1 might be named |
124 |
# genpatches-3.0-1.base.tar.xz and genpatches-3.0-2.base.tar.xz |
131 |
# genpatches-3.0-1.base.tar.${K_TARBALL_EXT} and genpatches-3.0-2.base.tar.${K_TARBALL_EXT} |
125 |
# respectively. Handle this. |
132 |
# respectively. Handle this. |
126 |
|
133 |
|
127 |
for i in ${K_WANT_GENPATCHES} ; do |
134 |
for i in ${K_WANT_GENPATCHES} ; do |
128 |
if [[ ${KV_MAJOR} -ge 3 ]]; then |
135 |
if [[ ${KV_MAJOR} -ge 3 ]]; then |
129 |
if [[ ${#OKV_ARRAY[@]} -ge 3 ]]; then |
136 |
if [[ ${#OKV_ARRAY[@]} -ge 3 ]]; then |
130 |
tarball="genpatches-${KV_MAJOR}.${KV_MINOR}-${K_GENPATCHES_VER}.${i}.tar.xz" |
137 |
tarball="genpatches-${KV_MAJOR}.${KV_MINOR}-${K_GENPATCHES_VER}.${i}.tar.${K_TARBALL_EXT}" |
131 |
else |
138 |
else |
132 |
tarball="genpatches-${KV_MAJOR}.${KV_PATCH}-${K_GENPATCHES_VER}.${i}.tar.xz" |
139 |
tarball="genpatches-${KV_MAJOR}.${KV_PATCH}-${K_GENPATCHES_VER}.${i}.tar.${K_TARBALL_EXT}" |
133 |
fi |
140 |
fi |
134 |
else |
141 |
else |
135 |
tarball="genpatches-${OKV}-${K_GENPATCHES_VER}.${i}.tar.xz" |
142 |
tarball="genpatches-${OKV}-${K_GENPATCHES_VER}.${i}.tar.${K_TARBALL_EXT}" |
136 |
fi |
143 |
fi |
137 |
debug-print "genpatches tarball: $tarball" |
144 |
debug-print "genpatches tarball: $tarball" |
138 |
GENPATCHES_URI="${GENPATCHES_URI} mirror://gentoo/${tarball}" |
145 |
GENPATCHES_URI="${GENPATCHES_URI} mirror://gentoo/${tarball}" |
Lines 232-243
Link Here
|
232 |
if [[ ${#OKV_ARRAY[@]} -ge 3 ]] && [[ ${KV_MAJOR} -ge 3 ]]; then |
239 |
if [[ ${#OKV_ARRAY[@]} -ge 3 ]] && [[ ${KV_MAJOR} -ge 3 ]]; then |
233 |
# handle non genpatch using sources correctly |
240 |
# handle non genpatch using sources correctly |
234 |
if [[ -z ${K_WANT_GENPATCHES} && -z ${K_GENPATCHES_VER} && ${KV_PATCH} -gt 0 ]]; then |
241 |
if [[ -z ${K_WANT_GENPATCHES} && -z ${K_GENPATCHES_VER} && ${KV_PATCH} -gt 0 ]]; then |
235 |
KERNEL_URI="${KERNEL_BASE_URI}/patch-${OKV}.xz" |
242 |
KERNEL_URI="${KERNEL_BASE_URI}/patch-${OKV}.${K_TARBALL_EXT}" |
236 |
UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${CKV}.xz" |
243 |
UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${CKV}.${K_TARBALL_EXT}" |
237 |
fi |
244 |
fi |
238 |
KERNEL_URI="${KERNEL_URI} ${KERNEL_BASE_URI}/linux-${KV_MAJOR}.${KV_MINOR}.tar.xz" |
245 |
KERNEL_URI="${KERNEL_URI} ${KERNEL_BASE_URI}/linux-${KV_MAJOR}.${KV_MINOR}.tar.${K_TARBALL_EXT}" |
239 |
else |
246 |
else |
240 |
KERNEL_URI="${KERNEL_BASE_URI}/linux-${OKV}.tar.xz" |
247 |
KERNEL_URI="${KERNEL_BASE_URI}/linux-${OKV}.tar.${K_TARBALL_EXT}" |
241 |
fi |
248 |
fi |
242 |
|
249 |
|
243 |
RELEASE=${CKV/${OKV}} |
250 |
RELEASE=${CKV/${OKV}} |
Lines 291-299
Link Here
|
291 |
else |
298 |
else |
292 |
OKV="${KV_MAJOR}.${KV_PATCH}" |
299 |
OKV="${KV_MAJOR}.${KV_PATCH}" |
293 |
fi |
300 |
fi |
294 |
KERNEL_URI="${KERNEL_BASE_URI}/patch-${CKV}.xz |
301 |
KERNEL_URI="${KERNEL_BASE_URI}/patch-${CKV}.${K_TARBALL_EXT} |
295 |
${KERNEL_BASE_URI}/linux-${OKV}.tar.xz" |
302 |
${KERNEL_BASE_URI}/linux-${OKV}.tar.${K_TARBALL_EXT}" |
296 |
UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${CKV}.xz" |
303 |
UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${CKV}.${K_TARBALL_EXT}" |
297 |
fi |
304 |
fi |
298 |
|
305 |
|
299 |
# We need to set this using OKV, but we need to set it before we do any |
306 |
# We need to set this using OKV, but we need to set it before we do any |
Lines 308-337
Link Here
|
308 |
# for example: |
315 |
# for example: |
309 |
# CKV="2.6.11_rc3_pre2" |
316 |
# CKV="2.6.11_rc3_pre2" |
310 |
# will pull: |
317 |
# will pull: |
311 |
# linux-2.6.10.tar.xz & patch-2.6.11-rc3.xz & patch-2.6.11-rc3-git2.xz |
318 |
# linux-2.6.10.tar.${K_TARBALL_EXT} & patch-2.6.11-rc3.${K_TARBALL_EXT} & patch-2.6.11-rc3-git2.${K_TARBALL_EXT} |
312 |
|
319 |
|
313 |
if [[ ${KV_MAJOR}${KV_MINOR} -eq 26 ]]; then |
320 |
if [[ ${KV_MAJOR}${KV_MINOR} -eq 26 ]]; then |
314 |
|
321 |
|
315 |
if [[ ${RELEASETYPE} == -rc ]] || [[ ${RELEASETYPE} == -pre ]]; then |
322 |
if [[ ${RELEASETYPE} == -rc ]] || [[ ${RELEASETYPE} == -pre ]]; then |
316 |
OKV="${KV_MAJOR}.${KV_MINOR}.$((${KV_PATCH} - 1))" |
323 |
OKV="${KV_MAJOR}.${KV_MINOR}.$((${KV_PATCH} - 1))" |
317 |
KERNEL_URI="${KERNEL_BASE_URI}/testing/patch-${CKV//_/-}.xz |
324 |
KERNEL_URI="${KERNEL_BASE_URI}/testing/patch-${CKV//_/-}.${K_TARBALL_EXT} |
318 |
${KERNEL_BASE_URI}/linux-${OKV}.tar.xz" |
325 |
${KERNEL_BASE_URI}/linux-${OKV}.tar.${K_TARBALL_EXT}" |
319 |
UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${CKV//_/-}.xz" |
326 |
UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${CKV//_/-}.${K_TARBALL_EXT}" |
320 |
fi |
327 |
fi |
321 |
|
328 |
|
322 |
if [[ ${RELEASETYPE} == -git ]]; then |
329 |
if [[ ${RELEASETYPE} == -git ]]; then |
323 |
KERNEL_URI="${KERNEL_BASE_URI}/snapshots/patch-${OKV}${RELEASE}.xz |
330 |
KERNEL_URI="${KERNEL_BASE_URI}/snapshots/patch-${OKV}${RELEASE}.${K_TARBALL_EXT} |
324 |
${KERNEL_BASE_URI}/linux-${OKV}.tar.xz" |
331 |
${KERNEL_BASE_URI}/linux-${OKV}.tar.${K_TARBALL_EXT}" |
325 |
UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${OKV}${RELEASE}.xz" |
332 |
UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${OKV}${RELEASE}.${K_TARBALL_EXT}" |
326 |
fi |
333 |
fi |
327 |
|
334 |
|
328 |
if [[ ${RELEASETYPE} == -rc-git ]]; then |
335 |
if [[ ${RELEASETYPE} == -rc-git ]]; then |
329 |
OKV="${KV_MAJOR}.${KV_MINOR}.$((${KV_PATCH} - 1))" |
336 |
OKV="${KV_MAJOR}.${KV_MINOR}.$((${KV_PATCH} - 1))" |
330 |
KERNEL_URI="${KERNEL_BASE_URI}/snapshots/patch-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${RELEASE}.xz |
337 |
KERNEL_URI="${KERNEL_BASE_URI}/snapshots/patch-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${RELEASE}.${K_TARBALL_EXT} |
331 |
${KERNEL_BASE_URI}/testing/patch-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${RELEASE/-git*}.xz |
338 |
${KERNEL_BASE_URI}/testing/patch-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${RELEASE/-git*}.${K_TARBALL_EXT} |
332 |
${KERNEL_BASE_URI}/linux-${OKV}.tar.xz" |
339 |
${KERNEL_BASE_URI}/linux-${OKV}.tar.${K_TARBALL_EXT}" |
333 |
|
340 |
|
334 |
UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${RELEASE/-git*}.xz ${DISTDIR}/patch-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${RELEASE}.xz" |
341 |
UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${RELEASE/-git*}.${K_TARBALL_EXT} ${DISTDIR}/patch-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${RELEASE}.${K_TARBALL_EXT}" |
335 |
fi |
342 |
fi |
336 |
else |
343 |
else |
337 |
if [[ ${RELEASETYPE} == -rc ]] || [[ ${RELEASETYPE} == -pre ]]; then |
344 |
if [[ ${RELEASETYPE} == -rc ]] || [[ ${RELEASETYPE} == -pre ]]; then |
Lines 341-355
Link Here
|
341 |
KV_PATCH_ARR=(${KV_PATCH//\./ }) |
348 |
KV_PATCH_ARR=(${KV_PATCH//\./ }) |
342 |
OKV="${KV_MAJOR}.$((${KV_PATCH_ARR} - 1))" |
349 |
OKV="${KV_MAJOR}.$((${KV_PATCH_ARR} - 1))" |
343 |
fi |
350 |
fi |
344 |
KERNEL_URI="${KERNEL_BASE_URI}/testing/patch-${CKV//_/-}.xz |
351 |
KERNEL_URI="${KERNEL_BASE_URI}/testing/patch-${CKV//_/-}.${K_TARBALL_EXT} |
345 |
${KERNEL_BASE_URI}/linux-${OKV}.tar.xz" |
352 |
${KERNEL_BASE_URI}/linux-${OKV}.tar.${K_TARBALL_EXT}" |
346 |
UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${CKV//_/-}.xz" |
353 |
UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${CKV//_/-}.${K_TARBALL_EXT}" |
347 |
fi |
354 |
fi |
348 |
|
355 |
|
349 |
if [[ ${RELEASETYPE} == -git ]]; then |
356 |
if [[ ${RELEASETYPE} == -git ]]; then |
350 |
KERNEL_URI="${KERNEL_BASE_URI}/snapshots/patch-${OKV}${RELEASE}.xz |
357 |
KERNEL_URI="${KERNEL_BASE_URI}/snapshots/patch-${OKV}${RELEASE}.${K_TARBALL_EXT} |
351 |
${KERNEL_BASE_URI}/linux-${OKV}.tar.xz" |
358 |
${KERNEL_BASE_URI}/linux-${OKV}.tar.${K_TARBALL_EXT}" |
352 |
UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${OKV}${RELEASE}.xz" |
359 |
UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${OKV}${RELEASE}.${K_TARBALL_EXT}" |
353 |
fi |
360 |
fi |
354 |
|
361 |
|
355 |
if [[ ${RELEASETYPE} == -rc-git ]]; then |
362 |
if [[ ${RELEASETYPE} == -rc-git ]]; then |
Lines 359-369
Link Here
|
359 |
KV_PATCH_ARR=(${KV_PATCH//\./ }) |
366 |
KV_PATCH_ARR=(${KV_PATCH//\./ }) |
360 |
OKV="${KV_MAJOR}.$((${KV_PATCH_ARR} - 1))" |
367 |
OKV="${KV_MAJOR}.$((${KV_PATCH_ARR} - 1))" |
361 |
fi |
368 |
fi |
362 |
KERNEL_URI="${KERNEL_BASE_URI}/snapshots/patch-${KV_MAJOR}.${KV_PATCH}${RELEASE}.xz |
369 |
KERNEL_URI="${KERNEL_BASE_URI}/snapshots/patch-${KV_MAJOR}.${KV_PATCH}${RELEASE}.${K_TARBALL_EXT} |
363 |
${KERNEL_BASE_URI}/testing/patch-${KV_MAJOR}.${KV_PATCH}${RELEASE/-git*}.xz |
370 |
${KERNEL_BASE_URI}/testing/patch-${KV_MAJOR}.${KV_PATCH}${RELEASE/-git*}.${K_TARBALL_EXT} |
364 |
${KERNEL_BASE_URI}/linux-${OKV}.tar.xz" |
371 |
${KERNEL_BASE_URI}/linux-${OKV}.tar.${K_TARBALL_EXT}" |
365 |
|
372 |
|
366 |
UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${KV_MAJOR}.${KV_PATCH}${RELEASE/-git*}.xz ${DISTDIR}/patch-${KV_MAJOR}.${KV_PATCH}${RELEASE}.xz" |
373 |
UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${KV_MAJOR}.${KV_PATCH}${RELEASE/-git*}.${K_TARBALL_EXT} ${DISTDIR}/patch-${KV_MAJOR}.${KV_PATCH}${RELEASE}.${K_TARBALL_EXT}" |
367 |
fi |
374 |
fi |
368 |
|
375 |
|
369 |
|
376 |
|
Lines 551-559
Link Here
|
551 |
|
558 |
|
552 |
cd "${WORKDIR}" |
559 |
cd "${WORKDIR}" |
553 |
if [[ ${#OKV_ARRAY[@]} -ge 3 ]] && [[ ${KV_MAJOR} -ge 3 ]]; then |
560 |
if [[ ${#OKV_ARRAY[@]} -ge 3 ]] && [[ ${KV_MAJOR} -ge 3 ]]; then |
554 |
unpack linux-${KV_MAJOR}.${KV_MINOR}.tar.xz |
561 |
unpack linux-${KV_MAJOR}.${KV_MINOR}.tar.${K_TARBALL_EXT} |
555 |
else |
562 |
else |
556 |
unpack linux-${OKV}.tar.xz |
563 |
unpack linux-${OKV}.tar.${K_TARBALL_EXT} |
557 |
fi |
564 |
fi |
558 |
|
565 |
|
559 |
if [[ -d "linux" ]]; then |
566 |
if [[ -d "linux" ]]; then |