/[gentoo-x86]/eclass/kernel-2.eclass
Gentoo

Contents of /eclass/kernel-2.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.282 - (hide annotations) (download)
Wed Apr 17 13:52:17 2013 UTC (6 years, 6 months ago) by tomwij
Branch: MAIN
Changes since 1.281: +33 -14 lines
Fixes for bugs 421721, 445110, 436402, 336732 and 301478. See ChangeLog for details.

1 mpagano 1.278 # Copyright 1999-2013 Gentoo Foundation
2 johnm 1.13 # Distributed under the terms of the GNU General Public License v2
3 tomwij 1.282 # $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.281 2013/03/20 16:45:56 tomwij Exp $
4 johnm 1.13
5 johnm 1.54 # Description: kernel.eclass rewrite for a clean base regarding the 2.6
6     # series of kernel with back-compatibility for 2.4
7 johnm 1.3 #
8 phreak 1.206 # Original author: John Mylchreest <johnm@gentoo.org>
9     # Maintainer: kernel-misc@gentoo.org
10 johnm 1.3 #
11     # Please direct your bugs to the current eclass maintainer :)
12 johnm 1.1
13     # added functionality:
14     # unipatch - a flexible, singular method to extract, add and remove patches.
15    
16 johnm 1.54 # A Couple of env vars are available to effect usage of this eclass
17 johnm 1.1 # These are as follows:
18     #
19 johnm 1.93 # K_USEPV - When setting the EXTRAVERSION variable, it should
20     # add PV to the end.
21     # this is useful for thigns like wolk. IE:
22     # EXTRAVERSION would be something like : -wolk-4.19-r1
23 johnm 1.55 # K_NOSETEXTRAVERSION - if this is set then EXTRAVERSION will not be
24     # automatically set within the kernel Makefile
25     # K_NOUSENAME - if this is set then EXTRAVERSION will not include the
26     # first part of ${PN} in EXTRAVERSION
27 robbat2 1.163 # K_NOUSEPR - if this is set then EXTRAVERSION will not include the
28     # anything based on ${PR}.
29 lu_zero 1.62 # K_PREPATCHED - if the patchset is prepatched (ie: mm-sources,
30     # ck-sources, ac-sources) it will use PR (ie: -r5) as
31     # the patchset version for
32 johnm 1.93 # and not use it as a true package revision
33 johnm 1.55 # K_EXTRAEINFO - this is a new-line seperated list of einfo displays in
34 lu_zero 1.62 # postinst and can be used to carry additional postinst
35 johnm 1.55 # messages
36 zlin 1.208 # K_EXTRAELOG - same as K_EXTRAEINFO except using elog instead of einfo
37     # K_EXTRAEWARN - same as K_EXTRAEINFO except using ewarn instead of einfo
38 johnm 1.107 # K_SYMLINK - if this is set, then forcably create symlink anyway
39 plasmaroo 1.105 #
40 johnm 1.108 # K_DEFCONFIG - Allow specifying a different defconfig target.
41     # If length zero, defaults to "defconfig".
42 dsd 1.126 # K_WANT_GENPATCHES - Apply genpatches to kernel source. Provide any
43     # combination of "base" and "extras"
44     # K_GENPATCHES_VER - The version of the genpatches tarball(s) to apply.
45     # A value of "5" would apply genpatches-2.6.12-5 to
46     # my-sources-2.6.12.ebuild
47 dsd 1.200 # K_SECURITY_UNSUPPORTED- If set, this kernel is unsupported by Gentoo Security
48 robbat2 1.230 # K_DEBLOB_AVAILABLE - A value of "0" will disable all of the optional deblob
49     # code. If empty, will be set to "1" if deblobbing is
50     # possible. Test ONLY for "1".
51     # K_PREDEBLOBBED - This kernel was already deblobbed elsewhere.
52     # If false, either optional deblobbing will be available
53     # or the license will note the inclusion of freedist
54     # code.
55 mpagano 1.244 # K_LONGTERM - If set, the eclass will search for the kernel source
56 ulm 1.249 # in the long term directories on the upstream servers
57 mpagano 1.244 # as the location has been changed by upstream
58 johnm 1.55 # H_SUPPORTEDARCH - this should be a space separated list of ARCH's which
59     # can be supported by the headers ebuild
60    
61     # UNIPATCH_LIST - space delimetered list of patches to be applied to the
62     # kernel
63     # UNIPATCH_EXCLUDE - an addition var to support exlusion based completely
64     # on "<passedstring>*" and not "<passedno#>_*"
65 lu_zero 1.62 # - this should _NOT_ be used from the ebuild as this is
66 johnm 1.55 # reserved for end users passing excludes from the cli
67 lu_zero 1.62 # UNIPATCH_DOCS - space delimemeted list of docs to be installed to
68 johnm 1.55 # the doc dir
69 lu_zero 1.62 # UNIPATCH_STRICTORDER - if this is set places patches into directories of
70 johnm 1.55 # order, so they are applied in the order passed
71 johnm 1.1
72 tomwij 1.282 # Changing any other variable in this eclass is not supported; you can request
73     # for additional variables to be added by contacting the current maintainer.
74     # If you do change them, there is a chance that we will not fix resulting bugs;
75     # that of course does not mean we're not willing to help.
76    
77 phreak 1.192 inherit eutils toolchain-funcs versionator multilib
78 mpagano 1.256 EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_test src_install pkg_preinst pkg_postinst pkg_postrm
79 johnm 1.1
80 dostrow 1.132 # Added by Daniel Ostrow <dostrow@gentoo.org>
81     # This is an ugly hack to get around an issue with a 32-bit userland on ppc64.
82     # I will remove it when I come up with something more reasonable.
83 vapier 1.189 [[ ${PROFILE_ARCH} == "ppc64" ]] && CHOST="powerpc64-${CHOST#*-}"
84 dostrow 1.132
85 vapier 1.75 export CTARGET=${CTARGET:-${CHOST}}
86 hollow 1.96 if [[ ${CTARGET} == ${CHOST} && ${CATEGORY/cross-} != ${CATEGORY} ]]; then
87 hollow 1.95 export CTARGET=${CATEGORY/cross-}
88 vapier 1.75 fi
89 vapier 1.60
90 phreak 1.181 HOMEPAGE="http://www.kernel.org/ http://www.gentoo.org/ ${HOMEPAGE}"
91 vapier 1.267 : ${LICENSE:="GPL-2"}
92 johnm 1.1
93 robbat2 1.231 # This is the latest KV_PATCH of the deblob tool available from the
94 robbat2 1.243 # libre-sources upstream. If you bump this, you MUST regenerate the Manifests
95     # for ALL kernel-2 consumer packages where deblob is available.
96 vapier 1.267 : ${DEBLOB_MAX_VERSION:=38}
97 robbat2 1.231
98 brix 1.178 # No need to run scanelf/strip on kernel sources/headers (bug #134453).
99     RESTRICT="binchecks strip"
100    
101 johnm 1.18 # set LINUX_HOSTCFLAGS if not already set
102 vapier 1.267 : ${LINUX_HOSTCFLAGS:="-Wall -Wstrict-prototypes -Os -fomit-frame-pointer -I${S}/include"}
103 johnm 1.18
104 robbat2 1.163 # debugging functions
105     #==============================================================
106     # this function exists only to help debug kernel-2.eclass
107     # if you are adding new functionality in, put a call to it
108     # at the start of src_unpack, or during SRC_URI/dep generation.
109     debug-print-kernel2-variables() {
110 robbat2 1.228 for v in PVR CKV OKV KV KV_FULL KV_MAJOR KV_MINOR KV_PATCH RELEASETYPE \
111     RELEASE UNIPATCH_LIST_DEFAULT UNIPATCH_LIST_GENPATCHES \
112 mpagano 1.259 UNIPATCH_LIST S KERNEL_URI K_WANT_GENPATCHES ; do
113 robbat2 1.228 debug-print "${v}: ${!v}"
114     done
115 robbat2 1.163 }
116    
117 johnm 1.54 #Eclass functions only from here onwards ...
118 plasmaroo 1.33 #==============================================================
119 dsd 1.126 handle_genpatches() {
120     local tarball
121 vapier 1.218 [[ -z ${K_WANT_GENPATCHES} || -z ${K_GENPATCHES_VER} ]] && return 1
122 dsd 1.126
123 mpagano 1.254 debug-print "Inside handle_genpatches"
124 vapier 1.266 local OKV_ARRAY
125     IFS="." read -r -a OKV_ARRAY <<<"${OKV}"
126 mpagano 1.254
127     # for > 3.0 kernels, handle genpatches tarball name
128     # genpatches for 3.0 and 3.0.1 might be named
129 tomwij 1.279 # genpatches-3.0-1.base.tar.xz and genpatches-3.0-2.base.tar.xz
130 mpagano 1.254 # respectively. Handle this.
131    
132 dsd 1.126 for i in ${K_WANT_GENPATCHES} ; do
133 mpagano 1.254 if [[ ${KV_MAJOR} -ge 3 ]]; then
134     if [[ ${#OKV_ARRAY[@]} -ge 3 ]]; then
135 tomwij 1.279 tarball="genpatches-${KV_MAJOR}.${KV_MINOR}-${K_GENPATCHES_VER}.${i}.tar.xz"
136 mpagano 1.254 else
137 tomwij 1.279 tarball="genpatches-${KV_MAJOR}.${KV_PATCH}-${K_GENPATCHES_VER}.${i}.tar.xz"
138 mpagano 1.254 fi
139     else
140 tomwij 1.279 tarball="genpatches-${OKV}-${K_GENPATCHES_VER}.${i}.tar.xz"
141 mpagano 1.254 fi
142     debug-print "genpatches tarball: $tarball"
143     GENPATCHES_URI="${GENPATCHES_URI} mirror://gentoo/${tarball}"
144     UNIPATCH_LIST_GENPATCHES="${UNIPATCH_LIST_GENPATCHES} ${DISTDIR}/${tarball}"
145 dsd 1.126 done
146     }
147    
148 johnm 1.117 detect_version() {
149     # this function will detect and set
150     # - OKV: Original Kernel Version (2.6.0/2.6.0-test11)
151     # - KV: Kernel Version (2.6.0-gentoo/2.6.0-test11-gentoo-r1)
152     # - EXTRAVERSION: The additional version appended to OKV (-gentoo/-gentoo-r1)
153    
154 vapier 1.272 # We've already run, so nothing to do here.
155     [[ -n ${KV_FULL} ]] && return 0
156 johnm 1.117
157     # CKV is used as a comparison kernel version, which is used when
158     # PV doesnt reflect the genuine kernel version.
159     # this gets set to the portage style versioning. ie:
160     # CKV=2.6.11_rc4
161     CKV=${CKV:-${PV}}
162     OKV=${OKV:-${CKV}}
163     OKV=${OKV/_beta/-test}
164     OKV=${OKV/_rc/-rc}
165     OKV=${OKV/-r*}
166     OKV=${OKV/_p*}
167    
168     KV_MAJOR=$(get_version_component_range 1 ${OKV})
169 mpagano 1.254 # handle if OKV is X.Y or X.Y.Z (e.g. 3.0 or 3.0.1)
170 vapier 1.266 local OKV_ARRAY
171     IFS="." read -r -a OKV_ARRAY <<<"${OKV}"
172 johnm 1.117
173 mpagano 1.252 # if KV_MAJOR >= 3, then we have no more KV_MINOR
174 mpagano 1.254 #if [[ ${KV_MAJOR} -lt 3 ]]; then
175     if [[ ${#OKV_ARRAY[@]} -ge 3 ]]; then
176 mpagano 1.253 KV_MINOR=$(get_version_component_range 2 ${OKV})
177 mpagano 1.252 KV_PATCH=$(get_version_component_range 3 ${OKV})
178     if [[ ${KV_MAJOR}${KV_MINOR}${KV_PATCH} -ge 269 ]]; then
179     KV_EXTRA=$(get_version_component_range 4- ${OKV})
180     KV_EXTRA=${KV_EXTRA/[-_]*}
181     else
182     KV_PATCH=$(get_version_component_range 3- ${OKV})
183     fi
184     else
185     KV_PATCH=$(get_version_component_range 2 ${OKV})
186     KV_EXTRA=$(get_version_component_range 3- ${OKV})
187 johnm 1.117 KV_EXTRA=${KV_EXTRA/[-_]*}
188     fi
189 mpagano 1.252
190 mpagano 1.254 debug-print "KV_EXTRA is ${KV_EXTRA}"
191    
192 johnm 1.117 KV_PATCH=${KV_PATCH/[-_]*}
193 ulm 1.249
194 robbat2 1.234 local v n=0 missing
195 mpagano 1.254 #if [[ ${KV_MAJOR} -lt 3 ]]; then
196     if [[ ${#OKV_ARRAY[@]} -ge 3 ]]; then
197 mpagano 1.252 for v in CKV OKV KV_{MAJOR,MINOR,PATCH} ; do
198     [[ -z ${!v} ]] && n=1 && missing="${missing}${v} ";
199     done
200     else
201     for v in CKV OKV KV_{MAJOR,PATCH} ; do
202     [[ -z ${!v} ]] && n=1 && missing="${missing}${v} ";
203     done
204     fi
205    
206 robbat2 1.234 [[ $n -eq 1 ]] && \
207     eerror "Missing variables: ${missing}" && \
208 ulm 1.249 die "Failed to extract kernel version (try explicit CKV in ebuild)!"
209 robbat2 1.234 unset v n missing
210 johnm 1.117
211 mpagano 1.254 # if [[ ${KV_MAJOR} -ge 3 ]]; then
212     if [[ ${#OKV_ARRAY[@]} -lt 3 ]]; then
213 mpagano 1.252 KV_PATCH_ARR=(${KV_PATCH//\./ })
214 mpagano 1.254
215 mpagano 1.275 # at this point 031412, Linus is putting all 3.x kernels in a
216     # 3.x directory, may need to revisit when 4.x is released
217     KERNEL_BASE_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.x"
218    
219 mpagano 1.252 [[ -n "${K_LONGTERM}" ]] &&
220     KERNEL_BASE_URI="${KERNEL_BASE_URI}/longterm/v${KV_MAJOR}.${KV_PATCH_ARR}"
221     else
222 mpagano 1.257 #KERNEL_BASE_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.0"
223 mpagano 1.261 #KERNEL_BASE_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}"
224 mpagano 1.262 if [[ ${KV_MAJOR} -ge 3 ]]; then
225     KERNEL_BASE_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.x"
226     else
227     KERNEL_BASE_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}"
228     fi
229    
230 mpagano 1.252 [[ -n "${K_LONGTERM}" ]] &&
231 psomas 1.274 #KERNEL_BASE_URI="${KERNEL_BASE_URI}/longterm"
232     KERNEL_BASE_URI="${KERNEL_BASE_URI}/longterm/v${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
233 mpagano 1.252 fi
234 mpagano 1.244
235 mpagano 1.257 debug-print "KERNEL_BASE_URI is ${KERNEL_BASE_URI}"
236    
237 mpagano 1.254 if [[ ${#OKV_ARRAY[@]} -ge 3 ]] && [[ ${KV_MAJOR} -ge 3 ]]; then
238 mpagano 1.259 # handle non genpatch using sources correctly
239     if [[ -z ${K_WANT_GENPATCHES} && -z ${K_GENPATCHES_VER} && ${KV_PATCH} -gt 0 ]]; then
240 tomwij 1.279 KERNEL_URI="${KERNEL_BASE_URI}/patch-${OKV}.xz"
241     UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${CKV}.xz"
242 mpagano 1.254 fi
243 tomwij 1.279 KERNEL_URI="${KERNEL_URI} ${KERNEL_BASE_URI}/linux-${KV_MAJOR}.${KV_MINOR}.tar.xz"
244 mpagano 1.254 else
245 tomwij 1.279 KERNEL_URI="${KERNEL_BASE_URI}/linux-${OKV}.tar.xz"
246 mpagano 1.254 fi
247 johnm 1.117
248     RELEASE=${CKV/${OKV}}
249     RELEASE=${RELEASE/_beta}
250     RELEASE=${RELEASE/_rc/-rc}
251     RELEASE=${RELEASE/_pre/-pre}
252 robbat2 1.234 # We cannot trivally call kernel_is here, because it calls us to detect the
253     # version
254     #kernel_is ge 2 6 && RELEASE=${RELEASE/-pre/-git}
255 mpagano 1.252 [ $(($KV_MAJOR * 1000 + ${KV_MINOR:-0})) -ge 2006 ] && RELEASE=${RELEASE/-pre/-git}
256 johnm 1.117 RELEASETYPE=${RELEASE//[0-9]}
257    
258 gregkh 1.156 # Now we know that RELEASE is the -rc/-git
259 johnm 1.117 # and RELEASETYPE is the same but with its numerics stripped
260     # we can work on better sorting EXTRAVERSION.
261     # first of all, we add the release
262     EXTRAVERSION="${RELEASE}"
263 robbat2 1.163 debug-print "0 EXTRAVERSION:${EXTRAVERSION}"
264 mpagano 1.254 [[ -n ${KV_EXTRA} ]] && [[ ${KV_MAJOR} -lt 3 ]] && EXTRAVERSION=".${KV_EXTRA}${EXTRAVERSION}"
265 johnm 1.117
266 robbat2 1.163 debug-print "1 EXTRAVERSION:${EXTRAVERSION}"
267     if [[ -n "${K_NOUSEPR}" ]]; then
268     # Don't add anything based on PR to EXTRAVERSION
269     debug-print "1.0 EXTRAVERSION:${EXTRAVERSION}"
270     elif [[ -n ${K_PREPATCHED} ]]; then
271     debug-print "1.1 EXTRAVERSION:${EXTRAVERSION}"
272 johnm 1.117 EXTRAVERSION="${EXTRAVERSION}-${PN/-*}${PR/r}"
273     elif [[ "${ETYPE}" = "sources" ]]; then
274 robbat2 1.163 debug-print "1.2 EXTRAVERSION:${EXTRAVERSION}"
275 johnm 1.117 # For some sources we want to use the PV in the extra version
276     # This is because upstream releases with a completely different
277     # versioning scheme.
278     case ${PN/-*} in
279     wolk) K_USEPV=1;;
280     vserver) K_USEPV=1;;
281     esac
282    
283 robbat2 1.163 [[ -z "${K_NOUSENAME}" ]] && EXTRAVERSION="${EXTRAVERSION}-${PN/-*}"
284     [[ -n "${K_USEPV}" ]] && EXTRAVERSION="${EXTRAVERSION}-${PV//_/-}"
285     [[ -n "${PR//r0}" ]] && EXTRAVERSION="${EXTRAVERSION}-${PR}"
286 johnm 1.117 fi
287 robbat2 1.163 debug-print "2 EXTRAVERSION:${EXTRAVERSION}"
288 johnm 1.117
289 johnm 1.120 # The only messing around which should actually effect this is for KV_EXTRA
290     # since this has to limit OKV to MAJ.MIN.PAT and strip EXTRA off else
291     # KV_FULL evaluates to MAJ.MIN.PAT.EXT.EXT after EXTRAVERSION
292 mpagano 1.252
293 johnm 1.120 if [[ -n ${KV_EXTRA} ]]; then
294 mpagano 1.252 if [[ -n ${KV_MINOR} ]]; then
295     OKV="${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
296     else
297     OKV="${KV_MAJOR}.${KV_PATCH}"
298     fi
299 tomwij 1.279 KERNEL_URI="${KERNEL_BASE_URI}/patch-${CKV}.xz
300     ${KERNEL_BASE_URI}/linux-${OKV}.tar.xz"
301     UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${CKV}.xz"
302 johnm 1.120 fi
303 swegener 1.135
304 johnm 1.118 # We need to set this using OKV, but we need to set it before we do any
305     # messing around with OKV based on RELEASETYPE
306     KV_FULL=${OKV}${EXTRAVERSION}
307    
308     # we will set this for backwards compatibility.
309     S=${WORKDIR}/linux-${KV_FULL}
310     KV=${KV_FULL}
311    
312 gregkh 1.156 # -rc-git pulls can be achieved by specifying CKV
313 johnm 1.117 # for example:
314     # CKV="2.6.11_rc3_pre2"
315     # will pull:
316 tomwij 1.279 # linux-2.6.10.tar.xz & patch-2.6.11-rc3.xz & patch-2.6.11-rc3-git2.xz
317 johnm 1.117
318 mpagano 1.252 if [[ ${KV_MAJOR}${KV_MINOR} -eq 26 ]]; then
319    
320     if [[ ${RELEASETYPE} == -rc ]] || [[ ${RELEASETYPE} == -pre ]]; then
321     OKV="${KV_MAJOR}.${KV_MINOR}.$((${KV_PATCH} - 1))"
322 tomwij 1.279 KERNEL_URI="${KERNEL_BASE_URI}/testing/patch-${CKV//_/-}.xz
323     ${KERNEL_BASE_URI}/linux-${OKV}.tar.xz"
324     UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${CKV//_/-}.xz"
325 mpagano 1.252 fi
326    
327     if [[ ${RELEASETYPE} == -git ]]; then
328 tomwij 1.279 KERNEL_URI="${KERNEL_BASE_URI}/snapshots/patch-${OKV}${RELEASE}.xz
329     ${KERNEL_BASE_URI}/linux-${OKV}.tar.xz"
330     UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${OKV}${RELEASE}.xz"
331 mpagano 1.252 fi
332    
333     if [[ ${RELEASETYPE} == -rc-git ]]; then
334     OKV="${KV_MAJOR}.${KV_MINOR}.$((${KV_PATCH} - 1))"
335 tomwij 1.279 KERNEL_URI="${KERNEL_BASE_URI}/snapshots/patch-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${RELEASE}.xz
336     ${KERNEL_BASE_URI}/testing/patch-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${RELEASE/-git*}.xz
337     ${KERNEL_BASE_URI}/linux-${OKV}.tar.xz"
338 mpagano 1.252
339 tomwij 1.279 UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${RELEASE/-git*}.xz ${DISTDIR}/patch-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${RELEASE}.xz"
340 mpagano 1.252 fi
341     else
342     if [[ ${RELEASETYPE} == -rc ]] || [[ ${RELEASETYPE} == -pre ]]; then
343     if [[ ${KV_MAJOR}${KV_PATCH} -eq 30 ]]; then
344     OKV="2.6.39"
345     else
346     KV_PATCH_ARR=(${KV_PATCH//\./ })
347     OKV="${KV_MAJOR}.$((${KV_PATCH_ARR} - 1))"
348     fi
349 tomwij 1.279 KERNEL_URI="${KERNEL_BASE_URI}/testing/patch-${CKV//_/-}.xz
350     ${KERNEL_BASE_URI}/linux-${OKV}.tar.xz"
351     UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${CKV//_/-}.xz"
352 mpagano 1.252 fi
353    
354     if [[ ${RELEASETYPE} == -git ]]; then
355 tomwij 1.279 KERNEL_URI="${KERNEL_BASE_URI}/snapshots/patch-${OKV}${RELEASE}.xz
356     ${KERNEL_BASE_URI}/linux-${OKV}.tar.xz"
357     UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${OKV}${RELEASE}.xz"
358 mpagano 1.252 fi
359    
360     if [[ ${RELEASETYPE} == -rc-git ]]; then
361     if [[ ${KV_MAJOR}${KV_PATCH} -eq 30 ]]; then
362     OKV="2.6.39"
363     else
364     KV_PATCH_ARR=(${KV_PATCH//\./ })
365     OKV="${KV_MAJOR}.$((${KV_PATCH_ARR} - 1))"
366     fi
367 tomwij 1.279 KERNEL_URI="${KERNEL_BASE_URI}/snapshots/patch-${KV_MAJOR}.${KV_PATCH}${RELEASE}.xz
368     ${KERNEL_BASE_URI}/testing/patch-${KV_MAJOR}.${KV_PATCH}${RELEASE/-git*}.xz
369     ${KERNEL_BASE_URI}/linux-${OKV}.tar.xz"
370 johnm 1.117
371 tomwij 1.279 UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${KV_MAJOR}.${KV_PATCH}${RELEASE/-git*}.xz ${DISTDIR}/patch-${KV_MAJOR}.${KV_PATCH}${RELEASE}.xz"
372 mpagano 1.252 fi
373 johnm 1.117
374 mpagano 1.244
375 johnm 1.117 fi
376 dsd 1.126
377 mpagano 1.252
378 swegener 1.165 debug-print-kernel2-variables
379 robbat2 1.163
380 dsd 1.126 handle_genpatches
381 johnm 1.117 }
382    
383 vapier 1.273 # Note: duplicated in linux-info.eclass
384 plasmaroo 1.33 kernel_is() {
385 robbat2 1.226 # ALL of these should be set before we can safely continue this function.
386     # some of the sources have in the past had only one set.
387     local v n=0
388     for v in OKV KV_{MAJOR,MINOR,PATCH} ; do [[ -z ${!v} ]] && n=1 ; done
389     [[ $n -eq 1 ]] && detect_version
390     unset v n
391    
392     # Now we can continue
393 vapier 1.269 local operator test value
394 johnm 1.67
395 vapier 1.273 case ${1#-} in
396 johnm 1.93 lt) operator="-lt"; shift;;
397     gt) operator="-gt"; shift;;
398     le) operator="-le"; shift;;
399     ge) operator="-ge"; shift;;
400     eq) operator="-eq"; shift;;
401     *) operator="-eq";;
402     esac
403 vapier 1.269 [[ $# -gt 3 ]] && die "Error in kernel-2_kernel_is(): too many parameters"
404 johnm 1.93
405 vapier 1.270 : $(( test = (KV_MAJOR << 16) + (KV_MINOR << 8) + KV_PATCH ))
406     : $(( value = (${1:-${KV_MAJOR}} << 16) + (${2:-${KV_MINOR}} << 8) + ${3:-${KV_PATCH}} ))
407 vapier 1.269 [ ${test} ${operator} ${value} ]
408 plasmaroo 1.33 }
409 johnm 1.18
410     kernel_is_2_4() {
411 johnm 1.56 kernel_is 2 4
412 johnm 1.18 }
413    
414     kernel_is_2_6() {
415 johnm 1.78 kernel_is 2 6 || kernel_is 2 5
416 johnm 1.18 }
417    
418 plasmaroo 1.33 # Capture the sources type and set DEPENDs
419 hollow 1.95 if [[ ${ETYPE} == sources ]]; then
420 johnm 1.1 DEPEND="!build? ( sys-apps/sed
421 dsd 1.183 >=sys-devel/binutils-2.11.90.0.31 )"
422 johnm 1.147 RDEPEND="!build? ( >=sys-libs/ncurses-5.2
423 mpagano 1.277 sys-devel/make
424 tomwij 1.280 dev-lang/perl
425     sys-devel/bc )"
426 robbat2 1.222 PDEPEND="!build? ( virtual/dev-manager )"
427 lu_zero 1.62
428 johnm 1.72 SLOT="${PVR}"
429 tomwij 1.282 DESCRIPTION="Sources based on the Linux Kernel."
430 dsd 1.183 IUSE="symlink build"
431 robbat2 1.229
432     # Bug #266157, deblob for libre support
433 robbat2 1.230 if [[ -z ${K_PREDEBLOBBED} ]] ; then
434 mpagano 1.250 # Bug #359865, force a call to detect_version if needed
435     kernel_is ge 2 6 27 && \
436     [[ -z "${K_DEBLOB_AVAILABLE}" ]] && \
437 robbat2 1.231 kernel_is le 2 6 ${DEBLOB_MAX_VERSION} && \
438 mpagano 1.250 K_DEBLOB_AVAILABLE=1
439 robbat2 1.231 if [[ ${K_DEBLOB_AVAILABLE} == "1" ]] ; then
440 robbat2 1.229 IUSE="${IUSE} deblob"
441     # Reflect that kernels contain firmware blobs unless otherwise
442     # stripped
443     LICENSE="${LICENSE} !deblob? ( freedist )"
444    
445 mpagano 1.252 if [[ -n KV_MINOR ]]; then
446     DEBLOB_PV="${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
447     else
448     DEBLOB_PV="${KV_MAJOR}.${KV_PATCH}"
449     fi
450    
451 mpagano 1.255 if [[ ${KV_MAJOR} -ge 3 ]]; then
452     DEBLOB_PV="${KV_MAJOR}.${KV_MINOR}"
453     fi
454    
455 robbat2 1.229 DEBLOB_A="deblob-${DEBLOB_PV}"
456 robbat2 1.239 DEBLOB_CHECK_A="deblob-check-${DEBLOB_PV}"
457 robbat2 1.229 DEBLOB_HOMEPAGE="http://www.fsfla.org/svnwiki/selibre/linux-libre/"
458 robbat2 1.239 DEBLOB_URI_PATH="download/releases/LATEST-${DEBLOB_PV}.N"
459     if ! has "${EAPI:-0}" 0 1 ; then
460     DEBLOB_CHECK_URI="${DEBLOB_HOMEPAGE}/${DEBLOB_URI_PATH}/deblob-check -> ${DEBLOB_CHECK_A}"
461     else
462     DEBLOB_CHECK_URI="mirror://gentoo/${DEBLOB_CHECK_A}"
463     fi
464     DEBLOB_URI="${DEBLOB_HOMEPAGE}/${DEBLOB_URI_PATH}/${DEBLOB_A}"
465 robbat2 1.229 HOMEPAGE="${HOMEPAGE} ${DEBLOB_HOMEPAGE}"
466 ulm 1.249
467 mpagano 1.278 DEPEND+=" deblob? ( =dev-lang/python-2* )"
468 robbat2 1.229 KERNEL_URI="${KERNEL_URI}
469     deblob? (
470 robbat2 1.239 ${DEBLOB_URI}
471     ${DEBLOB_CHECK_URI}
472 robbat2 1.229 )"
473     else
474     # We have no way to deblob older kernels, so just mark them as
475     # tainted with non-libre materials.
476     LICENSE="${LICENSE} freedist"
477     fi
478     fi
479    
480 hollow 1.95 elif [[ ${ETYPE} == headers ]]; then
481 johnm 1.72 DESCRIPTION="Linux system headers"
482 swegener 1.135
483 johnm 1.174 # Since we should NOT honour KBUILD_OUTPUT in headers
484     # lets unset it here.
485     unset KBUILD_OUTPUT
486    
487 vapier 1.265 SLOT="0"
488 johnm 1.1 else
489 johnm 1.55 eerror "Unknown ETYPE=\"${ETYPE}\", must be \"sources\" or \"headers\""
490 johnm 1.93 die "Unknown ETYPE=\"${ETYPE}\", must be \"sources\" or \"headers\""
491 johnm 1.1 fi
492    
493 vapier 1.153 # Cross-compile support functions
494 johnm 1.1 #==============================================================
495 vapier 1.153 kernel_header_destdir() {
496     [[ ${CTARGET} == ${CHOST} ]] \
497     && echo /usr/include \
498 vapier 1.168 || echo /usr/${CTARGET}/usr/include
499 vapier 1.153 }
500    
501     cross_pre_c_headers() {
502 kugelfang 1.187 use crosscompile_opts_headers-only && [[ ${CHOST} != ${CTARGET} ]]
503 vapier 1.153 }
504    
505     env_setup_xmakeopts() {
506 johnm 1.117 # Kernel ARCH != portage ARCH
507 vapier 1.153 export KARCH=$(tc-arch-kernel)
508 johnm 1.117
509 vapier 1.136 # When cross-compiling, we need to set the ARCH/CROSS_COMPILE
510     # variables properly or bad things happen !
511 vapier 1.153 xmakeopts="ARCH=${KARCH}"
512     if [[ ${CTARGET} != ${CHOST} ]] && ! cross_pre_c_headers ; then
513 vapier 1.136 xmakeopts="${xmakeopts} CROSS_COMPILE=${CTARGET}-"
514 vapier 1.151 elif type -p ${CHOST}-ar > /dev/null ; then
515 vapier 1.136 xmakeopts="${xmakeopts} CROSS_COMPILE=${CHOST}-"
516     fi
517 vapier 1.153 export xmakeopts
518     }
519    
520     # Unpack functions
521     #==============================================================
522     unpack_2_4() {
523 lu_zero 1.62 # this file is required for other things to build properly,
524 johnm 1.1 # so we autogenerate it
525 vapier 1.145 make -s mrproper ${xmakeopts} || die "make mrproper failed"
526     make -s symlinks ${xmakeopts} || die "make symlinks failed"
527     make -s include/linux/version.h ${xmakeopts} || die "make include/linux/version.h failed"
528 johnm 1.1 echo ">>> version.h compiled successfully."
529     }
530    
531 vapier 1.153 unpack_2_6() {
532     # this file is required for other things to build properly, so we
533 johnm 1.172 # autogenerate it ... generate a .config to keep version.h build from
534 vapier 1.153 # spitting out an annoying warning
535 johnm 1.177 make -s mrproper ${xmakeopts} 2>/dev/null \
536     || die "make mrproper failed"
537    
538     # quick fix for bug #132152 which triggers when it cannot include linux
539     # headers (ie, we have not installed it yet)
540 vapier 1.188 if ! make -s defconfig ${xmakeopts} &>/dev/null 2>&1 ; then
541 johnm 1.177 touch .config
542     eerror "make defconfig failed."
543     eerror "assuming you dont have any headers installed yet and continuing"
544     epause 5
545     fi
546    
547     make -s include/linux/version.h ${xmakeopts} 2>/dev/null \
548     || die "make include/linux/version.h failed"
549 swegener 1.179 rm -f .config >/dev/null
550 vapier 1.153 }
551    
552 johnm 1.1 universal_unpack() {
553 mpagano 1.254 debug-print "Inside universal_unpack"
554    
555 vapier 1.266 local OKV_ARRAY
556     IFS="." read -r -a OKV_ARRAY <<<"${OKV}"
557 mpagano 1.254
558 mpagano 1.223 cd "${WORKDIR}"
559 mpagano 1.254 if [[ ${#OKV_ARRAY[@]} -ge 3 ]] && [[ ${KV_MAJOR} -ge 3 ]]; then
560 tomwij 1.279 unpack linux-${KV_MAJOR}.${KV_MINOR}.tar.xz
561 mpagano 1.254 else
562 tomwij 1.279 unpack linux-${OKV}.tar.xz
563 mpagano 1.254 fi
564    
565 johnm 1.175 if [[ -d "linux" ]]; then
566 mpagano 1.254 debug-print "Moving linux to linux-${KV_FULL}"
567 johnm 1.175 mv linux linux-${KV_FULL} \
568     || die "Unable to move source tree to ${KV_FULL}."
569     elif [[ "${OKV}" != "${KV_FULL}" ]]; then
570 mpagano 1.254 if [[ ${#OKV_ARRAY[@]} -ge 3 ]] && [[ ${KV_MAJOR} -ge 3 ]] &&
571     [[ "${ETYPE}" = "sources" ]]; then
572     debug-print "moving linux-${KV_MAJOR}.${KV_MINOR} to linux-${KV_FULL} "
573     mv linux-${KV_MAJOR}.${KV_MINOR} linux-${KV_FULL} \
574     || die "Unable to move source tree to ${KV_FULL}."
575     else
576     debug-print "moving linux-${OKV} to linux-${KV_FULL} "
577     mv linux-${OKV} linux-${KV_FULL} \
578     || die "Unable to move source tree to ${KV_FULL}."
579     fi
580     elif [[ ${#OKV_ARRAY[@]} -ge 3 ]] && [[ ${KV_MAJOR} -ge 3 ]]; then
581     mv linux-${KV_MAJOR}.${KV_MINOR} linux-${KV_FULL} \
582 johnm 1.55 || die "Unable to move source tree to ${KV_FULL}."
583 hollow 1.98 fi
584 vapier 1.136 cd "${S}"
585 lu_zero 1.62
586 johnm 1.1 # remove all backup files
587     find . -iname "*~" -exec rm {} \; 2> /dev/null
588    
589     }
590    
591     unpack_set_extraversion() {
592 vapier 1.136 cd "${S}"
593 dsd 1.104 sed -i -e "s:^\(EXTRAVERSION =\).*:\1 ${EXTRAVERSION}:" Makefile
594 vapier 1.185 cd "${OLDPWD}"
595 johnm 1.1 }
596    
597 dsd 1.104 # Should be done after patches have been applied
598     # Otherwise patches that modify the same area of Makefile will fail
599     unpack_fix_install_path() {
600 vapier 1.136 cd "${S}"
601 dsd 1.104 sed -i -e 's:#export\tINSTALL_PATH:export\tINSTALL_PATH:' Makefile
602     }
603    
604 johnm 1.1 # Compile Functions
605     #==============================================================
606     compile_headers() {
607 vapier 1.153 env_setup_xmakeopts
608    
609 swegener 1.135 # if we couldnt obtain HOSTCFLAGS from the Makefile,
610 vapier 1.75 # then set it to something sane
611 vapier 1.136 local HOSTCFLAGS=$(getfilevar HOSTCFLAGS "${S}"/Makefile)
612 vapier 1.75 HOSTCFLAGS=${HOSTCFLAGS:--Wall -Wstrict-prototypes -O2 -fomit-frame-pointer}
613    
614 johnm 1.93 if kernel_is 2 4; then
615 vapier 1.75 yes "" | make oldconfig ${xmakeopts}
616 johnm 1.72 echo ">>> make oldconfig complete"
617 vapier 1.152 make dep ${xmakeopts}
618 hollow 1.95 elif kernel_is 2 6; then
619 vapier 1.193 # 2.6.18 introduces headers_install which means we dont need any
620     # of this crap anymore :D
621     kernel_is ge 2 6 18 && return 0
622    
623 johnm 1.72 # autoconf.h isnt generated unless it already exists. plus, we have
624     # no guarantee that any headers are installed on the system...
625 vapier 1.75 [[ -f ${ROOT}/usr/include/linux/autoconf.h ]] \
626 johnm 1.72 || touch include/linux/autoconf.h
627    
628 plasmaroo 1.105 # if K_DEFCONFIG isn't set, force to "defconfig"
629     # needed by mips
630     if [[ -z ${K_DEFCONFIG} ]]; then
631 dostrow 1.194 if [[ $(KV_to_int ${KV}) -ge $(KV_to_int 2.6.16) ]]; then
632     case ${CTARGET} in
633     powerpc64*) K_DEFCONFIG="ppc64_defconfig";;
634     powerpc*) K_DEFCONFIG="pmac32_defconfig";;
635     *) K_DEFCONFIG="defconfig";;
636     esac
637     else
638     K_DEFCONFIG="defconfig"
639     fi
640 plasmaroo 1.105 fi
641    
642 johnm 1.72 # if there arent any installed headers, then there also isnt an asm
643     # symlink in /usr/include/, and make defconfig will fail, so we have
644     # to force an include path with $S.
645 vapier 1.75 HOSTCFLAGS="${HOSTCFLAGS} -I${S}/include/"
646     ln -sf asm-${KARCH} "${S}"/include/asm
647 vapier 1.153 cross_pre_c_headers && return 0
648    
649 vapier 1.170 make ${K_DEFCONFIG} HOSTCFLAGS="${HOSTCFLAGS}" ${xmakeopts} || die "defconfig failed (${K_DEFCONFIG})"
650     if compile_headers_tweak_config ; then
651     yes "" | make oldconfig HOSTCFLAGS="${HOSTCFLAGS}" ${xmakeopts} || die "2nd oldconfig failed"
652     fi
653 vapier 1.75 make prepare HOSTCFLAGS="${HOSTCFLAGS}" ${xmakeopts} || die "prepare failed"
654 eradicator 1.100 make prepare-all HOSTCFLAGS="${HOSTCFLAGS}" ${xmakeopts} || die "prepare failed"
655 johnm 1.72 fi
656 johnm 1.1 }
657    
658 vapier 1.170 compile_headers_tweak_config() {
659     # some targets can be very very picky, so let's finesse the
660     # .config based upon any info we may have
661     case ${CTARGET} in
662     sh*)
663     sed -i '/CONFIG_CPU_SH/d' .config
664     echo "CONFIG_CPU_SH${CTARGET:2:1}=y" >> .config
665     return 0;;
666     esac
667    
668     # no changes, so lets do nothing
669     return 1
670     }
671    
672 johnm 1.1 # install functions
673     #==============================================================
674     install_universal() {
675 tomwij 1.281 # Fix silly permissions in tarball
676 mpagano 1.223 cd "${WORKDIR}"
677 tomwij 1.281 chown -R 0:0 * >& /dev/null
678 johnm 1.1 chmod -R a+r-w+X,u+w *
679 johnm 1.93 cd ${OLDPWD}
680 johnm 1.1 }
681    
682     install_headers() {
683 vapier 1.195 local ddir=$(kernel_header_destdir)
684    
685 vapier 1.193 # 2.6.18 introduces headers_install which means we dont need any
686     # of this crap anymore :D
687     if kernel_is ge 2 6 18 ; then
688     env_setup_xmakeopts
689 vapier 1.195 emake headers_install INSTALL_HDR_PATH="${D}"/${ddir}/.. ${xmakeopts} || die
690 vapier 1.196
691     # let other packages install some of these headers
692     rm -rf "${D}"/${ddir}/sound #alsa-headers
693     rm -rf "${D}"/${ddir}/scsi #glibc/uclibc/etc...
694 vapier 1.193 return 0
695     fi
696    
697 vapier 1.198 # Do not use "linux/*" as that can cause problems with very long
698     # $S values where the cmdline to cp is too long
699 vapier 1.245 pushd "${S}" >/dev/null
700 vapier 1.60 dodir ${ddir}/linux
701 vapier 1.198 cp -pPR "${S}"/include/linux "${D}"/${ddir}/ || die
702     rm -rf "${D}"/${ddir}/linux/modules
703 lu_zero 1.62
704 vapier 1.245 dodir ${ddir}/asm
705     cp -pPR "${S}"/include/asm/* "${D}"/${ddir}/asm
706 vapier 1.137
707 vapier 1.245 if kernel_is 2 6 ; then
708 vapier 1.60 dodir ${ddir}/asm-generic
709 mpagano 1.223 cp -pPR "${S}"/include/asm-generic/* "${D}"/${ddir}/asm-generic
710 johnm 1.12 fi
711 eradicator 1.99
712 vapier 1.103 # clean up
713     find "${D}" -name '*.orig' -exec rm -f {} \;
714    
715 vapier 1.245 popd >/dev/null
716 johnm 1.1 }
717    
718     install_sources() {
719 dsd 1.183 local file
720 johnm 1.1
721 vapier 1.136 cd "${S}"
722 johnm 1.12 dodir /usr/src
723 johnm 1.54 echo ">>> Copying sources ..."
724 johnm 1.93
725 johnm 1.27 file="$(find ${WORKDIR} -iname "docs" -type d)"
726 johnm 1.93 if [[ -n ${file} ]]; then
727     for file in $(find ${file} -type f); do
728 vapier 1.136 echo "${file//*docs\/}" >> "${S}"/patches.txt
729     echo "===================================================" >> "${S}"/patches.txt
730     cat ${file} >> "${S}"/patches.txt
731     echo "===================================================" >> "${S}"/patches.txt
732     echo "" >> "${S}"/patches.txt
733 johnm 1.1 done
734 johnm 1.12 fi
735 johnm 1.1
736 johnm 1.93 if [[ ! -f ${S}/patches.txt ]]; then
737 johnm 1.12 # patches.txt is empty so lets use our ChangeLog
738 johnm 1.93 [[ -f ${FILESDIR}/../ChangeLog ]] && \
739     echo "Please check the ebuild ChangeLog for more details." \
740 vapier 1.136 > "${S}"/patches.txt
741 johnm 1.12 fi
742    
743 mpagano 1.223 mv ${WORKDIR}/linux* "${D}"/usr/src
744 tomwij 1.282
745     if [[ -z ${UNIPATCH_DOCS} ]] ; then
746     dodoc ${UNIPATCH_DOCS}
747     fi
748 johnm 1.1 }
749    
750     # pkg_preinst functions
751     #==============================================================
752     preinst_headers() {
753 vapier 1.60 local ddir=$(kernel_header_destdir)
754 johnm 1.72 [[ -L ${ddir}/linux ]] && rm ${ddir}/linux
755     [[ -L ${ddir}/asm ]] && rm ${ddir}/asm
756 johnm 1.1 }
757    
758     # pkg_postinst functions
759     #==============================================================
760     postinst_sources() {
761 vapier 1.80 local MAKELINK=0
762 swegener 1.135
763 johnm 1.84 # if we have USE=symlink, then force K_SYMLINK=1
764     use symlink && K_SYMLINK=1
765    
766 robbat2 1.229 # if we're using a deblobbed kernel, it's not supported
767 robbat2 1.230 [[ $K_DEBLOB_AVAILABLE == 1 ]] && \
768 robbat2 1.229 use deblob && \
769 robbat2 1.232 K_SECURITY_UNSUPPORTED=deblob
770 robbat2 1.229
771 johnm 1.78 # if we are to forcably symlink, delete it if it already exists first.
772 johnm 1.166 if [[ ${K_SYMLINK} > 0 ]]; then
773 vapier 1.80 [[ -h ${ROOT}usr/src/linux ]] && rm ${ROOT}usr/src/linux
774 johnm 1.78 MAKELINK=1
775     fi
776 swegener 1.135
777 johnm 1.78 # if the link doesnt exist, lets create it
778 vapier 1.80 [[ ! -h ${ROOT}usr/src/linux ]] && MAKELINK=1
779 swegener 1.135
780 johnm 1.93 if [[ ${MAKELINK} == 1 ]]; then
781 mpagano 1.223 cd "${ROOT}"usr/src
782 johnm 1.89 ln -sf linux-${KV_FULL} linux
783     cd ${OLDPWD}
784     fi
785 johnm 1.1
786     # Don't forget to make directory for sysfs
787 johnm 1.111 [[ ! -d ${ROOT}sys ]] && kernel_is 2 6 && mkdir ${ROOT}sys
788 johnm 1.1
789     echo
790 zlin 1.208 elog "If you are upgrading from a previous kernel, you may be interested"
791 mpagano 1.213 elog "in the following document:"
792 zlin 1.208 elog " - General upgrade guide: http://www.gentoo.org/doc/en/kernel-upgrade.xml"
793 r3pek 1.113 echo
794 lu_zero 1.62
795 johnm 1.2 # if K_EXTRAEINFO is set then lets display it now
796 hollow 1.95 if [[ -n ${K_EXTRAEINFO} ]]; then
797 johnm 1.2 echo ${K_EXTRAEINFO} | fmt |
798 hollow 1.95 while read -s ELINE; do einfo "${ELINE}"; done
799 plasmaroo 1.33 fi
800    
801 zlin 1.208 # if K_EXTRAELOG is set then lets display it now
802     if [[ -n ${K_EXTRAELOG} ]]; then
803     echo ${K_EXTRAELOG} | fmt |
804     while read -s ELINE; do elog "${ELINE}"; done
805     fi
806    
807 iggy 1.7 # if K_EXTRAEWARN is set then lets display it now
808 hollow 1.95 if [[ -n ${K_EXTRAEWARN} ]]; then
809 iggy 1.7 echo ${K_EXTRAEWARN} | fmt |
810 hollow 1.95 while read -s ELINE; do ewarn "${ELINE}"; done
811 iggy 1.7 fi
812 dsd 1.200
813     # optionally display security unsupported message
814 robbat2 1.232 # Start with why
815     if [[ ${K_SECURITY_UNSUPPORTED} = deblob ]]; then
816 ulm 1.233 ewarn "Deblobbed kernels are UNSUPPORTED by Gentoo Security."
817 robbat2 1.232 elif [[ -n ${K_SECURITY_UNSUPPORTED} ]]; then
818     ewarn "${PN} is UNSUPPORTED by Gentoo Security."
819     fi
820     # And now the general message.
821 dsd 1.200 if [[ -n ${K_SECURITY_UNSUPPORTED} ]]; then
822     ewarn "This means that it is likely to be vulnerable to recent security issues."
823     ewarn "For specific information on why this kernel is unsupported, please read:"
824     ewarn "http://www.gentoo.org/proj/en/security/kernel.xml"
825     fi
826 bluebird 1.214
827     # warn sparc users that they need to do cross-compiling with >= 2.6.25(bug #214765)
828     KV_MAJOR=$(get_version_component_range 1 ${OKV})
829     KV_MINOR=$(get_version_component_range 2 ${OKV})
830     KV_PATCH=$(get_version_component_range 3 ${OKV})
831 mpagano 1.252 if [[ "$(tc-arch)" = "sparc" ]]; then
832     if [[ ${KV_MAJOR} -ge 3 || ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH} > 2.6.24 ]]
833     then
834     echo
835     elog "NOTE: Since 2.6.25 the kernel Makefile has changed in a way that"
836     elog "you now need to do"
837     elog " make CROSS_COMPILE=sparc64-unknown-linux-gnu-"
838     elog "instead of just"
839     elog " make"
840     elog "to compile the kernel. For more information please browse to"
841     elog "https://bugs.gentoo.org/show_bug.cgi?id=214765"
842     echo
843     fi
844 bluebird 1.214 fi
845 johnm 1.1 }
846    
847 johnm 1.12 # pkg_setup functions
848     #==============================================================
849     setup_headers() {
850 vapier 1.86 [[ -z ${H_SUPPORTEDARCH} ]] && H_SUPPORTEDARCH=${PN/-*/}
851 hollow 1.95 for i in ${H_SUPPORTEDARCH}; do
852 vapier 1.87 [[ $(tc-arch) == "${i}" ]] && H_ACCEPT_ARCH="yes"
853 johnm 1.12 done
854 lu_zero 1.62
855 johnm 1.93 if [[ ${H_ACCEPT_ARCH} != "yes" ]]; then
856 johnm 1.12 echo
857 vapier 1.106 eerror "This version of ${PN} does not support $(tc-arch)."
858 johnm 1.12 eerror "Please merge the appropriate sources, in most cases"
859 vapier 1.106 eerror "(but not all) this will be called $(tc-arch)-headers."
860     die "Package unsupported for $(tc-arch)"
861 johnm 1.12 fi
862     }
863    
864 johnm 1.1 # unipatch
865     #==============================================================
866     unipatch() {
867 johnm 1.108 local i x y z extention PIPE_CMD UNIPATCH_DROP KPATCH_DIR PATCH_DEPTH ELINE
868 mpagano 1.238 local STRICT_COUNT PATCH_LEVEL myLC_ALL myLANG
869 swegener 1.135
870 johnm 1.78 # set to a standard locale to ensure sorts are ordered properly.
871     myLC_ALL="${LC_ALL}"
872 johnm 1.122 myLANG="${LANG}"
873 johnm 1.78 LC_ALL="C"
874 johnm 1.122 LANG=""
875 johnm 1.1
876     [ -z "${KPATCH_DIR}" ] && KPATCH_DIR="${WORKDIR}/patches/"
877     [ ! -d ${KPATCH_DIR} ] && mkdir -p ${KPATCH_DIR}
878    
879 johnm 1.41 # We're gonna need it when doing patches with a predefined patchlevel
880 mpagano 1.238 eshopts_push -s extglob
881 johnm 1.41
882 johnm 1.54 # This function will unpack all passed tarballs, add any passed patches, and remove any passed patchnumbers
883 johnm 1.1 # usage can be either via an env var or by params
884 johnm 1.54 # although due to the nature we pass this within this eclass
885     # it shall be by param only.
886     # -z "${UNIPATCH_LIST}" ] && UNIPATCH_LIST="${@}"
887     UNIPATCH_LIST="${@}"
888 johnm 1.1
889     #unpack any passed tarballs
890 hollow 1.95 for i in ${UNIPATCH_LIST}; do
891 vapier 1.210 if echo ${i} | grep -qs -e "\.tar" -e "\.tbz" -e "\.tgz" ; then
892 hollow 1.95 if [ -n "${UNIPATCH_STRICTORDER}" ]; then
893 johnm 1.110 unset z
894 johnm 1.121 STRICT_COUNT=$((10#${STRICT_COUNT} + 1))
895 johnm 1.108 for((y=0; y<$((6 - ${#STRICT_COUNT})); y++));
896     do z="${z}0";
897     done
898 r3pek 1.112 PATCH_ORDER="${z}${STRICT_COUNT}"
899 johnm 1.108
900 vapier 1.210 mkdir -p "${KPATCH_DIR}/${PATCH_ORDER}"
901     pushd "${KPATCH_DIR}/${PATCH_ORDER}" >/dev/null
902     unpack ${i##*/}
903     popd >/dev/null
904 johnm 1.16 else
905 vapier 1.210 pushd "${KPATCH_DIR}" >/dev/null
906     unpack ${i##*/}
907     popd >/dev/null
908 johnm 1.16 fi
909    
910 vapier 1.210 [[ ${i} == *:* ]] && echo ">>> Strict patch levels not currently supported for tarballed patchsets"
911 johnm 1.16 else
912 johnm 1.25 extention=${i/*./}
913 johnm 1.41 extention=${extention/:*/}
914 johnm 1.25 PIPE_CMD=""
915     case ${extention} in
916 vapier 1.236 xz) PIPE_CMD="xz -dc";;
917     lzma) PIPE_CMD="lzma -dc";;
918 johnm 1.25 bz2) PIPE_CMD="bzip2 -dc";;
919     patch) PIPE_CMD="cat";;
920     diff) PIPE_CMD="cat";;
921     gz|Z|z) PIPE_CMD="gzip -dc";;
922     ZIP|zip) PIPE_CMD="unzip -p";;
923 johnm 1.41 *) UNIPATCH_DROP="${UNIPATCH_DROP} ${i/:*/}";;
924 johnm 1.25 esac
925 johnm 1.41
926     PATCH_LEVEL=${i/*([^:])?(:)}
927     i=${i/:*/}
928 johnm 1.25 x=${i/*\//}
929     x=${x/\.${extention}/}
930 lu_zero 1.62
931 hollow 1.95 if [ -n "${PIPE_CMD}" ]; then
932     if [ ! -r "${i}" ]; then
933 johnm 1.29 echo
934     eerror "FATAL: unable to locate:"
935     eerror "${i}"
936 johnm 1.54 eerror "for read-only. The file either has incorrect permissions"
937     eerror "or does not exist."
938 johnm 1.29 die Unable to locate ${i}
939     fi
940 lu_zero 1.62
941 hollow 1.95 if [ -n "${UNIPATCH_STRICTORDER}" ]; then
942 johnm 1.110 unset z
943 johnm 1.121 STRICT_COUNT=$((10#${STRICT_COUNT} + 1))
944 johnm 1.108 for((y=0; y<$((6 - ${#STRICT_COUNT})); y++));
945     do z="${z}0";
946     done
947 r3pek 1.112 PATCH_ORDER="${z}${STRICT_COUNT}"
948 johnm 1.108
949 r3pek 1.112 mkdir -p ${KPATCH_DIR}/${PATCH_ORDER}/
950 scarabeus 1.241 $(${PIPE_CMD} ${i} > ${KPATCH_DIR}/${PATCH_ORDER}/${x}.patch${PATCH_LEVEL}) || die "uncompressing patch failed"
951 johnm 1.29 else
952 scarabeus 1.241 $(${PIPE_CMD} ${i} > ${KPATCH_DIR}/${x}.patch${PATCH_LEVEL}) || die "uncompressing patch failed"
953 johnm 1.29 fi
954 johnm 1.25 fi
955 johnm 1.16 fi
956 johnm 1.1 done
957    
958     #populate KPATCH_DIRS so we know where to look to remove the excludes
959     x=${KPATCH_DIR}
960     KPATCH_DIR=""
961 hollow 1.95 for i in $(find ${x} -type d | sort -n); do
962 johnm 1.1 KPATCH_DIR="${KPATCH_DIR} ${i}"
963     done
964    
965 mpagano 1.219 # do not apply fbcondecor patch to sparc/sparc64 as it breaks boot
966     # bug #272676
967 maekke 1.220 if [[ "$(tc-arch)" = "sparc" || "$(tc-arch)" = "sparc64" ]]; then
968 mpagano 1.252 if [[ ${KV_MAJOR} -ge 3 || ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH} > 2.6.28 ]]; then
969 mpagano 1.219 UNIPATCH_DROP="${UNIPATCH_DROP} *_fbcondecor-0.9.6.patch"
970     echo
971     ewarn "fbcondecor currently prevents sparc/sparc64 from booting"
972     ewarn "for kernel versions >= 2.6.29. Removing fbcondecor patch."
973     ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=272676 for details"
974     echo
975     fi
976     fi
977    
978 johnm 1.1 #so now lets get rid of the patchno's we want to exclude
979 johnm 1.19 UNIPATCH_DROP="${UNIPATCH_EXCLUDE} ${UNIPATCH_DROP}"
980 hollow 1.95 for i in ${UNIPATCH_DROP}; do
981 johnm 1.55 ebegin "Excluding Patch #${i}"
982 hollow 1.95 for x in ${KPATCH_DIR}; do rm -f ${x}/${i}* 2>/dev/null; done
983 johnm 1.55 eend $?
984 johnm 1.1 done
985    
986     # and now, finally, we patch it :)
987 hollow 1.95 for x in ${KPATCH_DIR}; do
988     for i in $(find ${x} -maxdepth 1 -iname "*.patch*" -or -iname "*.diff*" | sort -n); do
989 johnm 1.25 STDERR_T="${T}/${i/*\//}"
990 johnm 1.41 STDERR_T="${STDERR_T/.patch*/.err}"
991    
992 lu_zero 1.62 [ -z ${i/*.patch*/} ] && PATCH_DEPTH=${i/*.patch/}
993 r3pek 1.112 #[ -z ${i/*.diff*/} ] && PATCH_DEPTH=${i/*.diff/}
994 johnm 1.41
995 hollow 1.96 if [ -z "${PATCH_DEPTH}" ]; then PATCH_DEPTH=0; fi
996 johnm 1.41
997 hollow 1.95 while [ ${PATCH_DEPTH} -lt 5 ]; do
998 plasmaroo 1.33 echo "Attempting Dry-run:" >> ${STDERR_T}
999 robbat2 1.204 echo "cmd: patch -p${PATCH_DEPTH} --no-backup-if-mismatch --dry-run -f < ${i}" >> ${STDERR_T}
1000 johnm 1.54 echo "=======================================================" >> ${STDERR_T}
1001 robbat2 1.204 if [ $(patch -p${PATCH_DEPTH} --no-backup-if-mismatch --dry-run -f < ${i} >> ${STDERR_T}) $? -eq 0 ]; then
1002 tomwij 1.282 ebegin "Applying ${i/*\//} (-p${PATCH_DEPTH})"
1003 johnm 1.25 echo "Attempting patch:" > ${STDERR_T}
1004 robbat2 1.204 echo "cmd: patch -p${PATCH_DEPTH} --no-backup-if-mismatch -f < ${i}" >> ${STDERR_T}
1005 johnm 1.54 echo "=======================================================" >> ${STDERR_T}
1006 robbat2 1.204 if [ $(patch -p${PATCH_DEPTH} --no-backup-if-mismatch -f < ${i} >> ${STDERR_T}) "$?" -eq 0 ]; then
1007 johnm 1.1 eend 0
1008 johnm 1.25 rm ${STDERR_T}
1009 johnm 1.1 break
1010     else
1011     eend 1
1012     eerror "Failed to apply patch ${i/*\//}"
1013 johnm 1.54 eerror "Please attach ${STDERR_T} to any bug you may post."
1014 mpagano 1.238 eshopts_pop
1015 tomwij 1.282 die "Failed to apply ${i/*\//} on patch depth ${PATCH_DEPTH}."
1016 johnm 1.1 fi
1017     else
1018     PATCH_DEPTH=$((${PATCH_DEPTH} + 1))
1019     fi
1020     done
1021 hollow 1.95 if [ ${PATCH_DEPTH} -eq 5 ]; then
1022 tomwij 1.282 eerror "Failed to dry-run patch ${i/*\//}"
1023 johnm 1.54 eerror "Please attach ${STDERR_T} to any bug you may post."
1024 mpagano 1.238 eshopts_pop
1025 tomwij 1.282 die "Unable to dry-run patch on any patch depth lower than 5."
1026 johnm 1.1 fi
1027     done
1028     done
1029 johnm 1.43
1030 tomwij 1.282 # When genpatches is used, we want to install 0000_README which documents
1031     # the patches that were used; such that the user can see them, bug #301478.
1032     if [[ ! -z ${K_WANT_GENPATCHES} ]] ; then
1033     UNIPATCH_DOCS="${UNIPATCH_DOCS} 0000_README"
1034     fi
1035    
1036     # When files listed in UNIPATCH_DOCS are found in KPATCH_DIR's, we copy it
1037     # to the temporary directory and remember them in UNIPATCH_DOCS to install
1038     # them during the install phase.
1039 johnm 1.144 local tmp
1040 tomwij 1.282 for x in ${KPATCH_DIR}; do
1041     for i in ${UNIPATCH_DOCS}; do
1042     if [[ -f "${x}/${i}" ]] ; then
1043     tmp="${tmp} \"${T}/${i}\""
1044     cp -f "${x}/${i}" "${T}"/
1045     fi
1046     done
1047 johnm 1.144 done
1048     UNIPATCH_DOCS="${tmp}"
1049 swegener 1.146
1050 johnm 1.43 # clean up KPATCH_DIR's - fixes bug #53610
1051 hollow 1.95 for x in ${KPATCH_DIR}; do rm -Rf ${x}; done
1052 swegener 1.135
1053 johnm 1.78 LC_ALL="${myLC_ALL}"
1054 johnm 1.122 LANG="${myLANG}"
1055 mpagano 1.238 eshopts_pop
1056 johnm 1.1 }
1057    
1058 johnm 1.74 # getfilevar accepts 2 vars as follows:
1059     # getfilevar <VARIABLE> <CONFIGFILE>
1060     # pulled from linux-info
1061    
1062     getfilevar() {
1063 johnm 1.93 local workingdir basefname basedname xarch=$(tc-arch-kernel)
1064 johnm 1.74
1065 johnm 1.93 if [[ -z ${1} ]] && [[ ! -f ${2} ]]; then
1066 johnm 1.74 echo -e "\n"
1067     eerror "getfilevar requires 2 variables, with the second a valid file."
1068     eerror " getfilevar <VARIABLE> <CONFIGFILE>"
1069     else
1070     workingdir=${PWD}
1071     basefname=$(basename ${2})
1072     basedname=$(dirname ${2})
1073     unset ARCH
1074 swegener 1.135
1075 johnm 1.74 cd ${basedname}
1076     echo -e "include ${basefname}\ne:\n\t@echo \$(${1})" | \
1077 johnm 1.119 make ${BUILD_FIXES} -s -f - e 2>/dev/null
1078 johnm 1.74 cd ${workingdir}
1079 swegener 1.135
1080 johnm 1.74 ARCH=${xarch}
1081     fi
1082     }
1083    
1084 johnm 1.28 detect_arch() {
1085     # This function sets ARCH_URI and ARCH_PATCH
1086     # with the neccessary info for the arch sepecific compatibility
1087     # patchsets.
1088 lu_zero 1.62
1089 johnm 1.93 local ALL_ARCH LOOP_ARCH COMPAT_URI i
1090 plasmaroo 1.33
1091     # COMPAT_URI is the contents of ${ARCH}_URI
1092     # ARCH_URI is the URI for all the ${ARCH}_URI patches
1093     # ARCH_PATCH is ARCH_URI broken into files for UNIPATCH
1094    
1095     ARCH_URI=""
1096     ARCH_PATCH=""
1097 vapier 1.145 ALL_ARCH="ALPHA AMD64 ARM HPPA IA64 M68K MIPS PPC PPC64 S390 SH SPARC X86"
1098 johnm 1.31
1099 hollow 1.95 for LOOP_ARCH in ${ALL_ARCH}; do
1100 johnm 1.31 COMPAT_URI="${LOOP_ARCH}_URI"
1101     COMPAT_URI="${!COMPAT_URI}"
1102 lu_zero 1.62
1103 vapier 1.86 [[ -n ${COMPAT_URI} ]] && \
1104 johnm 1.55 ARCH_URI="${ARCH_URI} $(echo ${LOOP_ARCH} | tr '[:upper:]' '[:lower:]')? ( ${COMPAT_URI} )"
1105 lu_zero 1.62
1106 johnm 1.93 if [[ ${LOOP_ARCH} == "$(echo $(tc-arch-kernel) | tr '[:lower:]' '[:upper:]')" ]]; then
1107     for i in ${COMPAT_URI}; do
1108 plasmaroo 1.33 ARCH_PATCH="${ARCH_PATCH} ${DISTDIR}/${i/*\//}"
1109     done
1110     fi
1111 johnm 1.31 done
1112 johnm 1.28 }
1113    
1114 johnm 1.89 headers___fix() {
1115 plasmaroo 1.88 # Voodoo to partially fix broken upstream headers.
1116 vapier 1.205 # note: do not put inline/asm/volatile together (breaks "inline asm volatile")
1117 johnm 1.72 sed -i \
1118 plasmaroo 1.186 -e '/^\#define.*_TYPES_H/{:loop n; bloop}' \
1119 plasmaroo 1.184 -e 's:\<\([us]\(8\|16\|32\|64\)\)\>:__\1:g' \
1120 vapier 1.205 -e "s/\([[:space:]]\)inline\([[:space:](]\)/\1__inline__\2/g" \
1121     -e "s/\([[:space:]]\)asm\([[:space:](]\)/\1__asm__\2/g" \
1122     -e "s/\([[:space:]]\)volatile\([[:space:](]\)/\1__volatile__\2/g" \
1123 johnm 1.72 "$@"
1124     }
1125 johnm 1.28
1126 johnm 1.1 # common functions
1127     #==============================================================
1128 plasmaroo 1.33 kernel-2_src_unpack() {
1129 johnm 1.1 universal_unpack
1130 robbat2 1.163 debug-print "Doing unipatch"
1131 lu_zero 1.62
1132 dsd 1.126 [[ -n ${UNIPATCH_LIST} || -n ${UNIPATCH_LIST_DEFAULT} || -n ${UNIPATCH_LIST_GENPATCHES} ]] && \
1133     unipatch "${UNIPATCH_LIST_DEFAULT} ${UNIPATCH_LIST_GENPATCHES} ${UNIPATCH_LIST}"
1134 swegener 1.165
1135 robbat2 1.163 debug-print "Doing premake"
1136 lu_zero 1.62
1137 vapier 1.157 # allow ebuilds to massage the source tree after patching but before
1138     # we run misc `make` functions below
1139 vapier 1.158 [[ $(type -t kernel-2_hook_premake) == "function" ]] && kernel-2_hook_premake
1140 swegener 1.165
1141 mpagano 1.224 debug-print "Doing epatch_user"
1142     epatch_user
1143    
1144 robbat2 1.163 debug-print "Doing unpack_set_extraversion"
1145 vapier 1.157
1146 johnm 1.107 [[ -z ${K_NOSETEXTRAVERSION} ]] && unpack_set_extraversion
1147 dsd 1.104 unpack_fix_install_path
1148    
1149 johnm 1.172 # Setup xmakeopts and cd into sourcetree.
1150     env_setup_xmakeopts
1151     cd "${S}"
1152    
1153     # We dont need a version.h for anything other than headers
1154     # at least, I should hope we dont. If this causes problems
1155     # take out the if/fi block and inform me please.
1156     # unpack_2_6 should now be 2.6.17 safe anyways
1157     if [[ ${ETYPE} == headers ]]; then
1158     kernel_is 2 4 && unpack_2_4
1159     kernel_is 2 6 && unpack_2_6
1160     fi
1161 robbat2 1.229
1162 robbat2 1.230 if [[ $K_DEBLOB_AVAILABLE == 1 ]] && use deblob ; then
1163 robbat2 1.239 cp "${DISTDIR}/${DEBLOB_A}" "${T}" || die "cp ${DEBLOB_A} failed"
1164     cp "${DISTDIR}/${DEBLOB_CHECK_A}" "${T}/deblob-check" || die "cp ${DEBLOB_CHECK_A} failed"
1165     chmod +x "${T}/${DEBLOB_A}" "${T}/deblob-check" || die "chmod deblob scripts failed"
1166 robbat2 1.229 fi
1167 mpagano 1.276
1168     # fix a problem on ppc where TOUT writes to /usr/src/linux breaking sandbox
1169     # only do this for kernel < 2.6.27 since this file does not exist in later
1170     # kernels
1171     if [[ -n ${KV_MINOR} && ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH} < 2.6.27 ]]
1172     then
1173     sed -i \
1174 tomwij 1.282 -e "s|TOUT := .tmp_gas_check|TOUT := \"${T}\"/.tmp_gas_check|" \
1175 mpagano 1.276 "${S}"/arch/ppc/Makefile
1176     else
1177     sed -i \
1178 tomwij 1.282 -e "s|TOUT := .tmp_gas_check|TOUT := \"${T}\"/.tmp_gas_check|" \
1179 mpagano 1.276 "${S}"/arch/powerpc/Makefile
1180     fi
1181 johnm 1.1 }
1182    
1183 plasmaroo 1.33 kernel-2_src_compile() {
1184 vapier 1.136 cd "${S}"
1185 johnm 1.93 [[ ${ETYPE} == headers ]] && compile_headers
1186 robbat2 1.229
1187 robbat2 1.230 if [[ $K_DEBLOB_AVAILABLE == 1 ]] && use deblob ; then
1188 robbat2 1.229 echo ">>> Running deblob script ..."
1189 mpagano 1.278 EPYTHON="python2" sh "${T}/${DEBLOB_A}" --force || die "Deblob script failed to run!!!"
1190 robbat2 1.229 fi
1191 johnm 1.1 }
1192    
1193 robbat2 1.240 # if you leave it to the default src_test, it will run make to
1194     # find whether test/check targets are present; since "make test"
1195     # actually produces a few support files, they are installed even
1196     # though the package is binchecks-restricted.
1197     #
1198     # Avoid this altogether by making the function moot.
1199     kernel-2_src_test() { :; }
1200    
1201 plasmaroo 1.33 kernel-2_pkg_preinst() {
1202 johnm 1.93 [[ ${ETYPE} == headers ]] && preinst_headers
1203 johnm 1.1 }
1204    
1205 plasmaroo 1.33 kernel-2_src_install() {
1206 johnm 1.1 install_universal
1207 johnm 1.93 [[ ${ETYPE} == headers ]] && install_headers
1208     [[ ${ETYPE} == sources ]] && install_sources
1209 johnm 1.1 }
1210    
1211 plasmaroo 1.33 kernel-2_pkg_postinst() {
1212 johnm 1.93 [[ ${ETYPE} == sources ]] && postinst_sources
1213 johnm 1.1 }
1214 johnm 1.12
1215 plasmaroo 1.33 kernel-2_pkg_setup() {
1216 phreak 1.192 if kernel_is 2 4; then
1217 vapier 1.264 if [[ $(gcc-major-version) -ge 4 ]] ; then
1218 phreak 1.192 echo
1219     ewarn "Be warned !! >=sys-devel/gcc-4.0.0 isn't supported with linux-2.4!"
1220     ewarn "Either switch to another gcc-version (via gcc-config) or use a"
1221     ewarn "newer kernel that supports gcc-4."
1222     echo
1223     ewarn "Also be aware that bugreports about gcc-4 not working"
1224     ewarn "with linux-2.4 based ebuilds will be closed as INVALID!"
1225     echo
1226     epause 10
1227     fi
1228     fi
1229    
1230 blubb 1.167 ABI="${KERNEL_ABI}"
1231 johnm 1.93 [[ ${ETYPE} == headers ]] && setup_headers
1232     [[ ${ETYPE} == sources ]] && echo ">>> Preparing to unpack ..."
1233 johnm 1.12 }
1234 mpagano 1.256
1235     kernel-2_pkg_postrm() {
1236 vapier 1.263 # This warning only makes sense for kernel sources.
1237     [[ ${ETYPE} == headers ]] && return 0
1238 vapier 1.271
1239     # If there isn't anything left behind, then don't complain.
1240     [[ -e ${ROOT}usr/src/linux-${KV_FULL} ]] || return 0
1241 mpagano 1.256 echo
1242     ewarn "Note: Even though you have successfully unmerged "
1243     ewarn "your kernel package, directories in kernel source location: "
1244     ewarn "${ROOT}usr/src/linux-${KV_FULL}"
1245     ewarn "with modified files will remain behind. By design, package managers"
1246     ewarn "will not remove these modified files and the directories they reside in."
1247     echo
1248     }

  ViewVC Help
Powered by ViewVC 1.1.20