]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # NOTE: | |
3 | # the following bcond combos will not work | |
4 | # - without_vserver and any of the following | |
5 | # - with_apparmor | |
6 | # - with_grsec_minimal | |
7 | # - with_grsec_full | |
8 | # | |
9 | # TODO: | |
10 | # - benchmark NO_HZ & HZ=1000 vs HZ=300 on i686 | |
11 | # - add a subpackage (kernel-firmware?) for ~35 firmware files | |
12 | # | |
13 | # FUTURE: | |
14 | # - pom-ng quake3-conntrack-nat -> nf_conntrack ? | |
15 | # - pom-ng talk-conntrack-nat -> nf_conntrack ? | |
16 | # - nf-hipac ? | |
17 | # - pax hooks for selinux (experimental) | |
18 | # | |
19 | # HOWTO: | |
20 | # - update main config: ./kernel-config-sort.pl ./BUILD/kernel-*/linux-2.6.29 kernel-multiarch.config | |
21 | # | |
22 | # Conditional build: | |
23 | %bcond_without source # don't build kernel-source package | |
24 | %bcond_without pcmcia # don't build pcmcia | |
25 | ||
26 | %bcond_with verbose # verbose build (V=1) | |
27 | %bcond_without reiser4 # support for reiser4 fs (experimental) | |
28 | ||
29 | %bcond_without grsecurity # don't build grsecurity nor pax at all | |
30 | %bcond_without grsec_minimal # build only minimal subset (proc,link,fifo,shm) | |
31 | %bcond_without grsec_full # build full grsecurity | |
32 | %bcond_with pax_full # build pax and full grsecurity (ie. grsec_full && pax) | |
33 | %bcond_with pax # build pax support | |
34 | ||
35 | %bcond_with fbcondecor # build fbcondecor (disable FB_TILEBLITTING and affected fb modules) | |
36 | %bcond_with pae # build PAE (HIGHMEM64G) support on uniprocessor | |
37 | %bcond_with nfsroot # build with root on NFS support | |
38 | ||
39 | %bcond_with imq # imq support | |
40 | %bcond_without wrr # wrr support | |
41 | %bcond_without esfq # esfq support | |
42 | %bcond_without ipv6 # ipv6 support | |
43 | ||
44 | %bcond_without vserver # support for VServer (enabled by default) | |
45 | %bcond_without tuxonice # support for tuxonice (ex-suspend2) (enabled by default) | |
46 | %bcond_without apparmor # build kernel with apparmor (exerimental mix) | |
47 | ||
48 | %bcond_with rescuecd # build kernel for our rescue | |
49 | ||
50 | %bcond_with myown # build with your own config (kernel-myown.config) | |
51 | ||
52 | %{?debug:%define with_verbose 1} | |
53 | ||
54 | %if %{without grsecurity} | |
55 | %undefine with_grsec_full | |
56 | %undefine with_grsec_minimal | |
57 | %undefine with_pax | |
58 | %undefine with_pax_full | |
59 | %endif | |
60 | ||
61 | %if %{with pax_full} | |
62 | %undefine with_grsec_minimal | |
63 | %define with_grsec_full 1 | |
64 | %define with_grsecurity 1 | |
65 | %define with_pax 1 | |
66 | %endif | |
67 | ||
68 | %if %{with grsec_full} | |
69 | %undefine with_grsec_minimal | |
70 | %define with_grsecurity 1 | |
71 | %if %{with pax} | |
72 | %define with_pax_full 1 | |
73 | %endif | |
74 | %endif | |
75 | ||
76 | %if %{with grsec_minimal} | |
77 | %undefine with_grsec_full | |
78 | %undefine with_pax_full | |
79 | %define with_grsecurity 1 | |
80 | %endif | |
81 | ||
82 | %define have_drm 1 | |
83 | %define have_oss 1 | |
84 | %define have_sound 1 | |
85 | %define have_pcmcia 1 | |
86 | ||
87 | %if %{with rescuecd} | |
88 | %undefine with_apparmor | |
89 | %undefine with_tuxonice | |
90 | %undefine with_grsec_full | |
91 | %undefine with_grsec_minimal | |
92 | %undefine with_pax | |
93 | %undefine with_pax_full | |
94 | %undefine with_vserver | |
95 | %define have_drm 0 | |
96 | %define have_sound 0 | |
97 | %endif | |
98 | ||
99 | %if %{with myown} | |
100 | %define have_drm 0 | |
101 | %define have_oss 0 | |
102 | %define have_sound 0 | |
103 | %define have_pcmcia 0 | |
104 | %endif | |
105 | ||
106 | %ifarch sparc sparc64 | |
107 | %undefine with_pcmcia | |
108 | %define have_drm 0 | |
109 | %define have_oss 0 | |
110 | %endif | |
111 | ||
112 | %if %{without pcmcia} | |
113 | %define have_pcmcia 0 | |
114 | %endif | |
115 | ||
116 | %define basever 2.6.30 | |
117 | %define postver .2 | |
118 | %define rel 0.1 | |
119 | ||
120 | %define _enable_debug_packages 0 | |
121 | ||
122 | %define squashfs_version 3.4 | |
123 | %define tuxonice_version 3.0.1 | |
124 | %define netfilter_snap 20070806 | |
125 | ||
126 | %if %{with myown} | |
127 | %if "%{_alt_kernel}" == "" | |
128 | %define alt_kernel myown | |
129 | %endif | |
130 | %else | |
131 | %if %{without rescuecd} | |
132 | %define __alt_kernel %{?with_pax:pax}%{!?with_grsec_full:nogrsecurity}%{!?with_apparmor:noaa}%{?with_pae:pae} | |
133 | %if "%{__alt_kernel}" != "" | |
134 | %define alt_kernel %{__alt_kernel} | |
135 | %endif | |
136 | %else | |
137 | %define alt_kernel rescuecd | |
138 | %endif | |
139 | %endif | |
140 | ||
141 | # kernel release (used in filesystem and eventually in uname -r) | |
142 | # modules will be looked from /lib/modules/%{kernel_release} | |
143 | # localversion is just that without version for "> localversion" | |
144 | %define localversion %{rel} | |
145 | %define kernel_release %{version}%{?alt_kernel:_%{alt_kernel}}-%{localversion} | |
146 | ||
147 | Summary: The Linux kernel (the core of the Linux operating system) | |
148 | Summary(de.UTF-8): Der Linux-Kernel (Kern des Linux-Betriebssystems) | |
149 | Summary(et.UTF-8): Linuxi kernel (ehk operatsioonisüsteemi tuum) | |
150 | Summary(fr.UTF-8): Le Kernel-Linux (La partie centrale du systeme) | |
151 | Summary(pl.UTF-8): JÄ…dro Linuksa | |
152 | Name: kernel%{_alt_kernel} | |
153 | Version: %{basever}%{postver} | |
154 | Release: %{rel} | |
155 | Epoch: 3 | |
156 | License: GPL v2 | |
157 | Group: Base/Kernel | |
158 | Source0: http://www.kernel.org/pub/linux/kernel/v2.6/linux-%{basever}.tar.bz2 | |
159 | # Source0-md5: 7a80058a6382e5108cdb5554d1609615 | |
160 | %if "%{postver}" != "%{nil}" | |
161 | Source1: http://www.kernel.org/pub/linux/kernel/v2.6/patch-%{version}.bz2 | |
162 | # Source1-md5: 3b566e7d970941846bcbe35cecf04e21 | |
163 | %endif | |
164 | ||
165 | Source3: kernel-autoconf.h | |
166 | Source4: kernel-config.h | |
167 | Source5: kernel-ppclibs.Makefile | |
168 | Source6: kernel-config.awk | |
169 | Source7: kernel-module-build.pl | |
170 | Source8: kernel-track-config-change.awk | |
171 | # not used by kernel.spec, but it's good to have it in SOURCES | |
172 | Source9: kernel-config-sort.pl | |
173 | Source10: kernel.make | |
174 | ||
175 | Source20: kernel-multiarch.config | |
176 | Source21: kernel-x86.config | |
177 | Source22: kernel-sparc.config | |
178 | Source23: kernel-alpha.config | |
179 | Source24: kernel-powerpc.config | |
180 | Source25: kernel-ia64.config | |
181 | ||
182 | Source40: kernel-netfilter.config | |
183 | Source41: kernel-patches.config | |
184 | Source42: kernel-tuxonice.config | |
185 | Source43: kernel-vserver.config | |
186 | Source45: kernel-grsec.config | |
187 | ||
188 | Source49: kernel-pax.config | |
189 | Source50: kernel-no-pax.config | |
190 | Source51: kernel-grsec_minimal.config | |
191 | Source55: kernel-imq.config | |
192 | Source56: kernel-reiser4.config | |
193 | Source57: kernel-wrr.config | |
194 | ||
195 | Source58: kernel-inittmpfs.config | |
196 | Source59: kernel-bzip2-lzma.config | |
197 | ||
198 | # tahoe9xx http://www.tahoe.pl/drivers/tahoe9xx-2.6.24.patch | |
199 | Patch2: kernel-tahoe9xx.patch | |
200 | ||
201 | # http://dev.gentoo.org/~spock/projects/fbcondecor/archive/fbcondecor-0.9.4-2.6.25-rc6.patch | |
202 | Patch3: kernel-fbcondecor.patch | |
203 | Patch4: kernel-fbcon-margins.patch | |
204 | ||
205 | # netfilter related stuff mostly based on patch-o-matic-ng | |
206 | # snapshot 20061213 with some fixes related to changes in | |
207 | # netfilter api in 2.6.19 up to 2.6.22. Some modules | |
208 | # were ported to nf_conntrack. Some of these are unique. | |
209 | ||
210 | Patch10: kernel-pom-ng-IPV4OPTSSTRIP.patch | |
211 | Patch11: kernel-pom-ng-ipv4options.patch | |
212 | ||
213 | Patch14: kernel-pom-ng-ROUTE.patch | |
214 | Patch16: kernel-pom-ng-mms-conntrack-nat.patch | |
215 | Patch22: kernel-pom-ng-rsh.patch | |
216 | Patch23: kernel-pom-ng-rpc.patch | |
217 | ||
218 | # based on http://mike.it-loops.com/rtsp/rtsp-2.6.26.patch | |
219 | Patch36: kernel-nf_rtsp.patch | |
220 | ||
221 | # http://ftp.linux-vserver.org/pub/people/dhozac/p/k/delta-owner-xid-feat02.diff | |
222 | Patch37: kernel-owner-xid.patch | |
223 | ||
224 | # based on http://www.svn.barbara.eu.org/ipt_account/attachment/wiki/Software/ipt_account-0.1.21-20070804164729.tar.gz?format=raw | |
225 | Patch38: kernel-ipt_account.patch | |
226 | ||
227 | # based on http://www.intra2net.com/de/produkte/opensource/ipt_account/pom-ng-ipt_ACCOUNT-1.12.tgz | |
228 | Patch39: kernel-ipt_ACCOUNT.patch | |
229 | ||
230 | # based on kernel-2.6.25-layer7-2.20.patch from | |
231 | # http://switch.dl.sourceforge.net/sourceforge/l7-filter/netfilter-layer7-v2.20.tar.gz | |
232 | Patch40: kernel-layer7.patch | |
233 | ||
234 | # http://www.ssi.bg/~ja/nfct/ipvs-nfct-2.6.28-1.diff | |
235 | Patch41: kernel-ipvs-nfct.patch | |
236 | ||
237 | ### End netfilter | |
238 | ||
239 | # http://zph.bratcheda.org/linux-2.6.26.3-zph.patch | |
240 | Patch49: kernel-zph.patch | |
241 | ||
242 | # based on http://www.linuximq.net/patchs/linux-2.6.24-imq.diff | |
243 | # some people report problems when using imq with wrr. | |
244 | # try unoficial version: http://kapturkiewicz.name/linux-2.6.25-imq1.diff | |
245 | Patch50: kernel-imq.patch | |
246 | ||
247 | # http://www.kernel.org/pub/linux/kernel/people/edward/reiser4/reiser4-for-2.6/reiser4-for-2.6.28.patch.bz2 | |
248 | Patch51: kernel-reiser4.patch | |
249 | ||
250 | # http://www.zz9.dk/patches/wrr-linux-071203-2.6.25.patch.gz | |
251 | Patch52: kernel-wrr.patch | |
252 | ||
253 | # http://fatooh.org/esfq-2.6/sfq-2.6.24.1.tar.bz2 | |
254 | Patch53: kernel-esfq.patch | |
255 | ||
256 | # http://memebeam.org/free-software/toshiba_acpi/toshiba_acpi-dev_toshiba_test5-linux_2.6.26.patch | |
257 | Patch54: kernel-toshiba_acpi.patch | |
258 | ||
259 | # by Baggins request: | |
260 | # derived from ftp://ftp.cmf.nrl.navy.mil/pub/chas/linux-atm/vbr/vbr-kernel-diffs | |
261 | Patch55: kernel-atm-vbr.patch | |
262 | Patch56: kernel-atmdd.patch | |
263 | ||
264 | # http://www.ntop.org/PF_RING.html 20070610 | |
265 | Patch58: kernel-PF_RING.patch | |
266 | ||
267 | # http://synce.svn.sourceforge.net/svnroot/synce/trunk/patches/linux-2.6.22-rndis_host-wm5.patch | |
268 | Patch59: kernel-rndis_host-wm5.patch | |
269 | ||
270 | # Project suspend2 renamed to tuxonice | |
271 | # http://www.tuxonice.net/downloads/all/current-tuxonice-for-2.6.30.patch-20090620-v1.bz2 | |
272 | Patch69: kernel-tuxonice.patch | |
273 | Patch70: kernel-tuxonice-headers.patch | |
274 | ||
275 | # adds some ids for hostap suported cards and monitor_enable from/for aircrack-ng | |
276 | # http://patches.aircrack-ng.org/hostap-kernel-2.6.18.patch | |
277 | Patch85: kernel-hostap.patch | |
278 | ||
279 | # Taken from http://download.opensuse.org/factory/repo/src-oss/suse/src/kernel-source-2.6.30-10.3.src.rpm | |
280 | Patch90: kernel-mpt-fusion.patch | |
281 | ||
282 | # based on http://vserver.13thfloor.at/Experimental/patch-2.6.30.1-vs2.3.0.36.14-pre4.diff | |
283 | Patch100: kernel-vserver-2.3.patch | |
284 | Patch101: kernel-vserver-fixes.patch | |
285 | ||
286 | # Wake-On-Lan fix for nForce drivers; using http://atlas.et.tudelft.nl/verwei90/nforce2/wol.html | |
287 | # Fix verified for that kernel version. | |
288 | Patch130: kernel-forcedeth-WON.patch | |
289 | ||
290 | # http://download.filesystems.org/unionfs/unionfs-2.x/unionfs-2.5.1_for_2.6.28.1.diff.gz | |
291 | Patch140: kernel-unionfs.patch | |
292 | ||
293 | # aufs1, http://aufs.sourceforge.net/ | |
294 | Patch145: kernel-aufs.patch | |
295 | Patch146: kernel-aufs-support.patch | |
296 | ||
297 | Patch148: kernel-aufs2.patch | |
298 | ||
299 | Patch150: kernel-ppc-crtsavres.patch | |
300 | ||
301 | Patch200: kernel-ppc-ICE-hacks.patch | |
302 | ||
303 | # The following patch extend the routing functionality in Linux | |
304 | # to support static routes (defined by user), new way to use the | |
305 | # alternative routes, the reverse path protection (rp_filter), | |
306 | # the NAT processing to use correctly the routing when multiple | |
307 | # gateways are used. | |
308 | # http://www.ssi.bg/~ja/routes-2.6.28-16.diff | |
309 | Patch300: kernel-routes.patch | |
310 | ||
311 | Patch1000: kernel-grsec-minimal.patch | |
312 | ||
313 | Patch2000: kernel-small_fixes.patch | |
314 | Patch2001: kernel-pwc-uncompress.patch | |
315 | Patch2003: kernel-regressions.patch | |
316 | ||
317 | # kill some thousands of warnings | |
318 | # (only warnings, so just remove parts of this patch if conflics) | |
319 | Patch2500: kernel-warnings.patch | |
320 | ||
321 | # git://kernel.ubuntu.com/jj/apparmor-karmic-tree.git | |
322 | # git diff 0c9f19b4dd23620fb32116922b0d93e8aca6c911..HEAD | |
323 | Patch5000: kernel-apparmor.patch | |
324 | ||
325 | # for rescuecd | |
326 | # based on http://ftp.leg.uct.ac.za/pub/linux/rip/inittmpfs-2.6.14.diff.gz | |
327 | Patch7000: kernel-inittmpfs.patch | |
328 | ||
329 | # not ready yet | |
330 | Patch9997: kernel-pax_selinux_hooks.patch | |
331 | ||
332 | # based on http://www.grsecurity.net/~paxguy1/pax-linux-2.6.24.6-test45.patch | |
333 | Patch9998: kernel-pax.patch | |
334 | ||
335 | # based on http://www.grsecurity.net/~spender/grsecurity-2.1.14-2.6.29.6-200907122214.patch | |
336 | # NOTE: put raw upstream patches on kernel-grsec_full.patch:GRSECURITY_RAW for reference | |
337 | # (since upstream deletes older patches) | |
338 | Patch9999: kernel-grsec_full.patch | |
339 | Patch10000: kernel-grsec-caps.patch | |
340 | Patch10001: kernel-grsec-common.patch | |
341 | Patch10002: kernel-grsec_fixes.patch | |
342 | Patch10003: kernel-grsec-no-stupid-SbO.patch | |
343 | ||
344 | URL: http://www.kernel.org/ | |
345 | BuildRequires: binutils >= 3:2.18 | |
346 | %ifarch sparc sparc64 | |
347 | BuildRequires: elftoaout | |
348 | %endif | |
349 | %ifarch ppc | |
350 | BuildRequires: uboot-mkimage | |
351 | %endif | |
352 | AutoReqProv: no | |
353 | BuildRequires: /sbin/depmod | |
354 | BuildRequires: gcc >= 5:3.2 | |
355 | BuildRequires: xz >= 1:4.999.7 | |
356 | # for hostname command | |
357 | BuildRequires: net-tools | |
358 | BuildRequires: perl-base | |
359 | BuildRequires: rpm-build >= 4.4.9-56 | |
360 | BuildRequires: rpmbuild(macros) >= 1.217 | |
361 | Requires(post): coreutils | |
362 | Requires(post): geninitrd >= 10000-3 | |
363 | Requires(post): module-init-tools >= 0.9.9 | |
364 | Requires: /sbin/depmod | |
365 | Requires: coreutils | |
366 | Requires: geninitrd >= 10000-3 | |
367 | Requires: module-init-tools >= 0.9.9 | |
368 | Provides: %{name}(netfilter) = %{netfilter_snap} | |
369 | Provides: %{name}(vermagic) = %{kernel_release} | |
370 | Obsoletes: kernel%{_alt_kernel}-isdn-mISDN | |
371 | Obsoletes: kernel-misc-acer_acpi | |
372 | Obsoletes: kernel-misc-fuse | |
373 | Obsoletes: kernel-misc-uvc | |
374 | Obsoletes: kernel-modules | |
375 | Obsoletes: kernel-net-ar81 | |
376 | Obsoletes: kernel-net-hostap | |
377 | Obsoletes: kernel-net-ieee80211 | |
378 | Obsoletes: kernel-net-ipp2p | |
379 | Obsoletes: kernel-net-rt61 | |
380 | Obsoletes: kernel-smp | |
381 | Conflicts: e2fsprogs < 1.29 | |
382 | Conflicts: isdn4k-utils < 3.1pre1 | |
383 | Conflicts: jfsutils < 1.1.3 | |
384 | Conflicts: module-init-tools < 0.9.10 | |
385 | Conflicts: nfs-utils < 1.0.5 | |
386 | Conflicts: oprofile < 0.9 | |
387 | Conflicts: ppp < 1:2.4.0 | |
388 | Conflicts: procps < 3.2.0 | |
389 | Conflicts: quota-tools < 3.09 | |
390 | %if %{with reiserfs4} | |
391 | Conflicts: reiser4progs < 1.0.0 | |
392 | %endif | |
393 | Conflicts: reiserfsprogs < 3.6.3 | |
394 | Conflicts: udev < 1:081 | |
395 | Conflicts: util-linux < 2.10o | |
396 | Conflicts: util-vserver < 0.30.216 | |
397 | Conflicts: xfsprogs < 2.6.0 | |
398 | %if %{with pae} | |
399 | ExcludeArch: i386 i486 i586 | |
400 | %else | |
401 | ExclusiveArch: %{ix86} %{x8664} alpha arm ia64 ppc ppc64 sparc sparc64 | |
402 | %endif | |
403 | ExclusiveOS: Linux | |
404 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
405 | ||
406 | %ifarch %{ix86} %{x8664} | |
407 | %define target_arch_dir x86 | |
408 | %endif | |
409 | %ifarch ppc ppc64 | |
410 | %define target_arch_dir powerpc | |
411 | %endif | |
412 | %ifarch sparc sparc64 | |
413 | %define target_arch_dir sparc | |
414 | %endif | |
415 | %ifnarch %{ix86} %{x8664} ppc ppc64 sparc sparc64 | |
416 | %define target_arch_dir %{_target_base_arch} | |
417 | %endif | |
418 | ||
419 | %define defconfig arch/%{target_arch_dir}/defconfig | |
420 | ||
421 | # No ELF objects there to strip (skips processing 27k files) | |
422 | %define _noautostrip .*%{_kernelsrcdir}/.* | |
423 | %define _noautochrpath .*%{_kernelsrcdir}/.* | |
424 | ||
425 | %ifarch ia64 | |
426 | %define initrd_dir /boot/efi | |
427 | %else | |
428 | %define initrd_dir /boot | |
429 | %endif | |
430 | ||
431 | %define topdir %{_builddir}/%{name}-%{version} | |
432 | %define srcdir %{topdir}/linux-%{basever} | |
433 | %define objdir %{topdir}/%{targetobj} | |
434 | %define targetobj %{_target_base_arch}-gcc-%(%{kgcc} -dumpversion) | |
435 | ||
436 | %define _kernelsrcdir /usr/src/linux%{_alt_kernel}-%{version} | |
437 | ||
438 | %if "%{_target_base_arch}" != "%{_arch}" | |
439 | %define CrossOpts ARCH=%{_target_base_arch} CROSS_COMPILE=%{_target_cpu}-pld-linux- | |
440 | %define DepMod /bin/true | |
441 | ||
442 | %if "%{_arch}" == "sparc" && "%{_target_base_arch}" == "sparc64" | |
443 | %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}" | |
444 | %define DepMod /sbin/depmod | |
445 | %endif | |
446 | ||
447 | %if "%{_arch}" == "sparc64" && "%{_target_base_arch}" == "sparc" | |
448 | %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}" | |
449 | %define DepMod /sbin/depmod | |
450 | %endif | |
451 | ||
452 | %if "%{_arch}" == "x86_64" && "%{_target_base_arch}" == "i386" | |
453 | %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}" | |
454 | %define DepMod /sbin/depmod | |
455 | %endif | |
456 | ||
457 | %if "%{_target_base_arch}" == "ppc" || "%{_target_base_arch}" == "ppc64" | |
458 | %define CrossOpts ARCH=powerpc CROSS_COMPILE=%{_target_cpu}-pld-linux- | |
459 | %endif | |
460 | %else | |
461 | %ifarch ppc ppc64 | |
462 | %define CrossOpts ARCH=powerpc CC="%{__cc}" | |
463 | %else | |
464 | %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}" | |
465 | %endif | |
466 | %define DepMod /sbin/depmod | |
467 | %endif | |
468 | %define MakeOpts %{CrossOpts} HOSTCC="%{__cc}" | |
469 | ||
470 | %define __features Netfilter module dated: %{netfilter_snap}\ | |
471 | %{?with_grsec_full:Grsecurity full support - enabled}\ | |
472 | %{?with_pax:PaX support - enabled}\ | |
473 | %{?with_fbcondecor:Fbsplash/fbcondecor - enabled }\ | |
474 | %{?with_nfsroot:Root on NFS - enabled}\ | |
475 | %{?with_apparmor:apparmor support - enabled}\ | |
476 | ||
477 | %define Features %(echo "%{__features}" | sed '/^$/d') | |
478 | ||
479 | %description | |
480 | This package contains the Linux kernel that is used to boot and run | |
481 | your system. It contains few device drivers for specific hardware. | |
482 | Most hardware is instead supported by modules loaded after booting. | |
483 | ||
484 | %{Features} | |
485 | ||
486 | %description -l de.UTF-8 | |
487 | Das Kernel-Paket enthält den Linux-Kernel (vmlinuz), den Kern des | |
488 | Linux-Betriebssystems. Der Kernel ist für grundliegende | |
489 | Systemfunktionen verantwortlich: Speicherreservierung, | |
490 | Prozeß-Management, Geräte Ein- und Ausgaben, usw. | |
491 | ||
492 | %{Features} | |
493 | ||
494 | %description -l fr.UTF-8 | |
495 | Le package kernel contient le kernel linux (vmlinuz), la partie | |
496 | centrale d'un système d'exploitation Linux. Le noyau traite les | |
497 | fonctions basiques d'un système d'exploitation: allocation mémoire, | |
498 | allocation de process, entrée/sortie de peripheriques, etc. | |
499 | ||
500 | %{Features} | |
501 | ||
502 | %description -l pl.UTF-8 | |
503 | Pakiet zawiera jądro Linuksa niezbędne do prawidłowego działania | |
504 | Twojego komputera. Zawiera w sobie sterowniki do sprzętu znajdującego | |
505 | się w komputerze, takiego jak sterowniki dysków itp. | |
506 | ||
507 | %{Features} | |
508 | ||
509 | %package vmlinux | |
510 | Summary: vmlinux - uncompressed kernel image | |
511 | Summary(de.UTF-8): vmlinux - dekompressiertes Kernel Bild | |
512 | Summary(pl.UTF-8): vmlinux - rozpakowany obraz jÄ…dra | |
513 | Group: Base/Kernel | |
514 | Obsoletes: kernel-smp-vmlinux | |
515 | ||
516 | %description vmlinux | |
517 | vmlinux - uncompressed kernel image. | |
518 | ||
519 | %description vmlinux -l de.UTF-8 | |
520 | vmlinux - dekompressiertes Kernel Bild. | |
521 | ||
522 | %description vmlinux -l pl.UTF-8 | |
523 | vmlinux - rozpakowany obraz jÄ…dra. | |
524 | ||
525 | %package dirs | |
526 | Summary: common dirs for kernel packages | |
527 | Summary(pl.UTF-8): Katalogi wspólne dla pakietów kernela | |
528 | Group: Base/Kernel | |
529 | ||
530 | %description dirs | |
531 | This package provides common dirs shared between various kernel | |
532 | packages. | |
533 | ||
534 | %description dirs -l pl.UTF-8 | |
535 | Katalog ten udostepnia katalogi współdzielone pomiędzy różnymi | |
536 | pakietami kernela. | |
537 | ||
538 | %package drm | |
539 | Summary: DRM kernel modules | |
540 | Summary(de.UTF-8): DRM Kernel Treiber | |
541 | Summary(pl.UTF-8): Sterowniki DRM | |
542 | Group: Base/Kernel | |
543 | Requires(postun): %{name} = %{epoch}:%{version}-%{release} | |
544 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
545 | Obsoletes: kernel-smp-drm | |
546 | Autoreqprov: no | |
547 | ||
548 | %description drm | |
549 | DRM kernel modules. | |
550 | ||
551 | %description drm -l de.UTF-8 | |
552 | DRM Kernel Treiber. | |
553 | ||
554 | %description drm -l pl.UTF-8 | |
555 | Sterowniki DRM. | |
556 | ||
557 | %package pcmcia | |
558 | Summary: PCMCIA modules | |
559 | Summary(de.UTF-8): PCMCIA Module | |
560 | Summary(pl.UTF-8): Moduły PCMCIA | |
561 | Group: Base/Kernel | |
562 | Requires(postun): %{name} = %{epoch}:%{version}-%{release} | |
563 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
564 | Obsoletes: kernel-smp-pcmcia | |
565 | Conflicts: pcmcia-cs < 3.1.21 | |
566 | Conflicts: pcmciautils < 004 | |
567 | Autoreqprov: no | |
568 | ||
569 | %description pcmcia | |
570 | PCMCIA modules. | |
571 | ||
572 | %description pcmcia -l de.UTF-8 | |
573 | PCMCIA Module. | |
574 | ||
575 | %description pcmcia -l pl.UTF-8 | |
576 | Moduły PCMCIA. | |
577 | ||
578 | %package libs | |
579 | Summary: Libraries for preparing bootable kernel on PowerPCs | |
580 | Summary(pl.UTF-8): Biblioteki do przygotowania bootowalnego jÄ…dra dla PowerPC | |
581 | Group: Base/Kernel | |
582 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
583 | Requires: mkvmlinuz >= 1.3 | |
584 | Obsoletes: kernel-smp-libs | |
585 | Autoreqprov: no | |
586 | ||
587 | %description libs | |
588 | Libraries for preparing bootable kernel on PowerPCs. Script called | |
589 | mkvmlinuz may be useful for this. | |
590 | ||
591 | %description libs -l pl.UTF-8 | |
592 | Biblioteki do przygotowania bootowalnego jÄ…dra dla PowerPC. Skrypt | |
593 | mkvmlinuz może być do tego przydatny. | |
594 | ||
595 | %package sound-alsa | |
596 | Summary: ALSA kernel modules | |
597 | Summary(de.UTF-8): ALSA Kernel Module | |
598 | Summary(pl.UTF-8): Sterowniki dźwięku ALSA | |
599 | Group: Base/Kernel | |
600 | Requires(postun): %{name} = %{epoch}:%{version}-%{release} | |
601 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
602 | Obsoletes: kernel-smp-sound-alsa | |
603 | Autoreqprov: no | |
604 | ||
605 | %description sound-alsa | |
606 | ALSA (Advanced Linux Sound Architecture) sound drivers. | |
607 | ||
608 | %description sound-alsa -l de.UTF-8 | |
609 | ALSA (Advanced Linux Sound Architecture) Sound-Treiber. | |
610 | ||
611 | %description sound-alsa -l pl.UTF-8 | |
612 | Sterowniki dźwięku ALSA (Advanced Linux Sound Architecture). | |
613 | ||
614 | %package sound-oss | |
615 | Summary: OSS kernel modules | |
616 | Summary(de.UTF-8): OSS Kernel Module | |
617 | Summary(pl.UTF-8): Sterowniki dźwięku OSS | |
618 | Group: Base/Kernel | |
619 | Requires(postun): %{name} = %{epoch}:%{version}-%{release} | |
620 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
621 | Obsoletes: kernel-smp-sound-oss | |
622 | Autoreqprov: no | |
623 | ||
624 | %description sound-oss | |
625 | OSS (Open Sound System) drivers. | |
626 | ||
627 | %description sound-oss -l de.UTF-8 | |
628 | OSS (Open Sound System) Treiber. | |
629 | ||
630 | %description sound-oss -l pl.UTF-8 | |
631 | Sterowniki dźwięku OSS (Open Sound System). | |
632 | ||
633 | %package headers | |
634 | Summary: Header files for the Linux kernel | |
635 | Summary(de.UTF-8): Header Dateien für den Linux-Kernel | |
636 | Summary(pl.UTF-8): Pliki nagłówkowe jądra Linuksa | |
637 | Group: Development/Building | |
638 | Provides: %{name}-headers(netfilter) = %{netfilter_snap} | |
639 | Autoreqprov: no | |
640 | ||
641 | %description headers | |
642 | These are the C header files for the Linux kernel, which define | |
643 | structures and constants that are needed when rebuilding the kernel or | |
644 | building kernel modules. | |
645 | ||
646 | %description headers -l de.UTF-8 | |
647 | Dies sind die C Header Dateien für den Linux-Kernel, die definierte | |
648 | Strukturen und Konstante beinhalten, die beim rekompilieren des | |
649 | Kernels oder bei Kernel Modul kompilationen gebraucht werden. | |
650 | ||
651 | %description headers -l pl.UTF-8 | |
652 | Pakiet zawiera pliki nagłówkowe jądra, niezbędne do rekompilacji jądra | |
653 | oraz budowania modułów jądra. | |
654 | ||
655 | %package module-build | |
656 | Summary: Development files for building kernel modules | |
657 | Summary(de.UTF-8): Development Dateien die beim Kernel Modul kompilationen gebraucht werden | |
658 | Summary(pl.UTF-8): Pliki służące do budowania modułów jądra | |
659 | Group: Development/Building | |
660 | Requires: %{name}-headers = %{epoch}:%{version}-%{release} | |
661 | Conflicts: rpmbuild(macros) < 1.321 | |
662 | Autoreqprov: no | |
663 | ||
664 | %description module-build | |
665 | Development files from kernel source tree needed to build Linux kernel | |
666 | modules from external packages. | |
667 | ||
668 | %description module-build -l de.UTF-8 | |
669 | Development Dateien des Linux-Kernels die beim kompilieren externer | |
670 | Kernel Module gebraucht werden. | |
671 | ||
672 | %description module-build -l pl.UTF-8 | |
673 | Pliki ze drzewa źródeł jądra potrzebne do budowania modułów jądra | |
674 | Linuksa z zewnętrznych pakietów. | |
675 | ||
676 | %package source | |
677 | Summary: Kernel source tree | |
678 | Summary(de.UTF-8): Der Kernel Quelltext | |
679 | Summary(pl.UTF-8): Kod źródłowy jądra Linuksa | |
680 | Group: Development/Building | |
681 | Requires: %{name}-module-build = %{epoch}:%{version}-%{release} | |
682 | Autoreqprov: no | |
683 | ||
684 | %description source | |
685 | This is the source code for the Linux kernel. You can build a custom | |
686 | kernel that is better tuned to your particular hardware. | |
687 | ||
688 | %description source -l de.UTF-8 | |
689 | Das Kernel-Source-Paket enthält den source code (C/Assembler-Code) des | |
690 | Linux-Kernels. Die Source-Dateien werden gebraucht, um viele | |
691 | C-Programme zu kompilieren, da sie auf Konstanten zurückgreifen, die | |
692 | im Kernel-Source definiert sind. Die Source-Dateien können auch | |
693 | benutzt werden, um einen Kernel zu kompilieren, der besser auf Ihre | |
694 | Hardware ausgerichtet ist. | |
695 | ||
696 | %description source -l fr.UTF-8 | |
697 | Le package pour le kernel-source contient le code source pour le noyau | |
698 | linux. Ces sources sont nécessaires pour compiler la plupart des | |
699 | programmes C, car il dépend de constantes définies dans le code | |
700 | source. Les sources peuvent être aussi utilisée pour compiler un noyau | |
701 | personnalisé pour avoir de meilleures performances sur des matériels | |
702 | particuliers. | |
703 | ||
704 | %description source -l pl.UTF-8 | |
705 | Pakiet zawiera kod źródłowy jądra systemu. | |
706 | ||
707 | %package doc | |
708 | Summary: Kernel documentation | |
709 | Summary(de.UTF-8): Kernel Dokumentation | |
710 | Summary(pl.UTF-8): Dokumentacja do jÄ…dra Linuksa | |
711 | Group: Documentation | |
712 | Autoreqprov: no | |
713 | ||
714 | %description doc | |
715 | This is the documentation for the Linux kernel, as found in | |
716 | /usr/src/linux/Documentation directory. | |
717 | ||
718 | %description doc -l de.UTF-8 | |
719 | Dies ist die Kernel Dokumentation wie sie im 'Documentation' | |
720 | Verzeichniss vorgefunden werden kann. | |
721 | ||
722 | %description doc -l pl.UTF-8 | |
723 | Pakiet zawiera dokumentacjÄ™ do jÄ…dra Linuksa pochodzÄ…cÄ… z katalogu | |
724 | /usr/src/linux/Documentation. | |
725 | ||
726 | %prep | |
727 | %setup -qc | |
728 | ln -s %{SOURCE7} kernel-module-build.pl | |
729 | ln -s %{SOURCE10} Makefile | |
730 | cd linux-%{basever} | |
731 | ||
732 | # hack against warning in pax/grsec | |
733 | %ifarch alpha | |
734 | sed -i 's/-Werror//' arch/alpha/kernel/Makefile | |
735 | %endif | |
736 | ||
737 | %ifarch ppc | |
738 | install %{SOURCE5} Makefile.ppclibs | |
739 | %endif | |
740 | ||
741 | %if "%{postver}" != "%{nil}" | |
742 | %{__bzip2} -dc %{SOURCE1} | patch -p1 -s | |
743 | %endif | |
744 | ||
745 | # tuxonice: | |
746 | %if %{with tuxonice} | |
747 | %patch69 -p1 | |
748 | %patch70 -p1 | |
749 | %endif | |
750 | ||
751 | # XXX: 2.6.29 - need update | |
752 | #%patch2 -p1 | |
753 | ||
754 | %if %{with fbcondecor} | |
755 | %patch3 -p1 | |
756 | %endif | |
757 | %patch4 -p1 | |
758 | ||
759 | ## netfilter | |
760 | # | |
761 | ||
762 | # kernel-pom-ng-IPV4OPTSSTRIP.patch | |
763 | %patch10 -p1 | |
764 | ||
765 | # kernel-pom-ng-ipv4options.patch | |
766 | %patch11 -p1 | |
767 | ||
768 | # kernel-pom-ng-ROUTE.patch | |
769 | %patch14 -p1 | |
770 | ||
771 | # kernel-pom-ng-mms-conntrack-nat.patch | |
772 | %patch16 -p1 | |
773 | ||
774 | # kernel-pom-ng-rsh.patch | |
775 | %patch22 -p1 | |
776 | ||
777 | # kernel-pom-ng-rpc.patch | |
778 | %patch23 -p1 | |
779 | ||
780 | # kernel-nf_rtsp.patch | |
781 | %patch36 -p1 | |
782 | ||
783 | # kernel-owner-xid.patch | |
784 | %if %{with vserver} | |
785 | %patch37 -p1 | |
786 | %endif | |
787 | ||
788 | # kernel-ipt_account.patch | |
789 | %patch38 -p1 | |
790 | ||
791 | # kernel-ipt_ACCOUNT.patch | |
792 | %patch39 -p1 | |
793 | ||
794 | # kernel-layer7.patch | |
795 | %patch40 -p1 | |
796 | ||
797 | # ipvs-nfct | |
798 | %patch41 -p1 | |
799 | ||
800 | ## | |
801 | # end of netfilter | |
802 | ||
803 | # zph | |
804 | %patch49 -p1 | |
805 | ||
806 | %if %{with imq} | |
807 | %patch50 -p1 | |
808 | %endif | |
809 | ||
810 | # reiser4 | |
811 | %if %{with reiser4} | |
812 | %patch51 -p1 | |
813 | %endif | |
814 | ||
815 | # esfq | |
816 | %if %{with esfq} | |
817 | %patch53 -p1 | |
818 | %endif | |
819 | ||
820 | %if %{with wrr} | |
821 | %patch52 -p1 | |
822 | %endif | |
823 | ||
824 | # toshiba_acpi | |
825 | %patch54 -p1 | |
826 | ||
827 | %patch55 -p1 | |
828 | %patch56 -p1 | |
829 | ||
830 | %patch58 -p1 | |
831 | ||
832 | # kernel-rndis_host-wm5.patch | |
833 | %patch59 -p1 | |
834 | ||
835 | # hostap enhancements from/for aircrack-ng | |
836 | %patch85 -p1 | |
837 | ||
838 | # LSI MPT Fusion driver update (by LSI via SUSE folks) | |
839 | # FIXME! | |
840 | #%patch90 -p1 | |
841 | ||
842 | # vserver | |
843 | %if %{with vserver} | |
844 | %patch100 -p1 | |
845 | %patch101 -p1 | |
846 | %endif | |
847 | ||
848 | # forcedeth | |
849 | %patch130 -p1 | |
850 | ||
851 | # unionfs (disabled for rescuecd - problems with aufs2) | |
852 | %if %{without rescuecd} | |
853 | %patch140 -p1 | |
854 | %endif | |
855 | ||
856 | %if %{with rescuecd} | |
857 | %patch148 -p1 | |
858 | %else | |
859 | # 2.6.29 FIXME - needs port to creds | |
860 | #%patch145 -p1 | |
861 | #%patch146 -p1 | |
862 | %endif | |
863 | ||
864 | %patch2500 -p1 | |
865 | ||
866 | %if %{with rescuecd} | |
867 | %patch7000 -p1 | |
868 | %endif | |
869 | ||
870 | # grsecurity & pax stuff | |
871 | # | |
872 | %if %{with pax_full} | |
873 | %patch9999 -p1 | |
874 | %{?with_vserver:%patch10000 -p1} | |
875 | %{?with_vserver:%patch10001 -p1} | |
876 | %{?with_vserver:%patch10002 -p1} | |
877 | %{?with_vserver:%patch10003 -p1} | |
878 | %else | |
879 | ||
880 | %if %{with grsec_full} | |
881 | %patch9999 -p1 | |
882 | %{?with_vserver:%patch10000 -p1} | |
883 | %{?with_vserver:%patch10001 -p1} | |
884 | %{?with_vserver:%patch10002 -p1} | |
885 | %{?with_vserver:%patch10003 -p1} | |
886 | %else | |
887 | %if %{with grsec_minimal} | |
888 | %patch1000 -p1 | |
889 | # remember that we have the same config file for grsec_minimal and | |
890 | # grsec_full, but the patches are different. | |
891 | %endif | |
892 | %endif | |
893 | ||
894 | %if %{with pax} | |
895 | # now we have an separate testing pax-only patch - in the future we | |
896 | # could have single grsecurity patch and will have to prepare separate | |
897 | # configs for grsec_minimal, grsec_full and pax to support such | |
898 | # configurations like pax & grsec_minimal. | |
899 | # So, in a future there could be no patch9998, but only config | |
900 | # would tell which options should be enabled. | |
901 | # The second option is to maintain separate pax-only patch. | |
902 | %patch9998 -p1 | |
903 | #patch9997 -p1 - needs update | |
904 | %endif | |
905 | ||
906 | %endif | |
907 | ||
908 | # | |
909 | # end of grsecurity & pax stuff | |
910 | ||
911 | # apparmor | |
912 | %if %{with apparmor} | |
913 | %patch5000 -p1 | |
914 | %endif | |
915 | ||
916 | %patch150 -p1 | |
917 | ||
918 | %ifarch ppc ppc64 | |
919 | #patch200 -p1 | |
920 | %endif | |
921 | ||
922 | # routes | |
923 | %patch300 -p1 | |
924 | ||
925 | # Small fixes: | |
926 | %patch2000 -p1 | |
927 | %patch2001 -p1 | |
928 | #%patch2003 -p1 | |
929 | ||
930 | # Fix EXTRAVERSION in main Makefile | |
931 | sed -i 's#EXTRAVERSION =.*#EXTRAVERSION = %{postver}%{?alt_kernel:_%{alt_kernel}}#g' Makefile | |
932 | ||
933 | # cleanup backups after patching | |
934 | find '(' -name '*~' -o -name '*.orig' -o -name '.gitignore' ')' -print0 | xargs -0 -r -l512 rm -f | |
935 | ||
936 | %build | |
937 | install -d %{objdir} | |
938 | cat > %{targetobj}.mk <<'EOF' | |
939 | # generated by %{name}.spec | |
940 | KERNELSRC := %{_builddir}/%{name}-%{version}/linux-%{basever} | |
941 | KERNELOUTPUT := %{objdir} | |
942 | ||
943 | SRCARCH := %{target_arch_dir} | |
944 | ARCH := %{_target_base_arch} | |
945 | Q := %{!?with_verbose:@} | |
946 | MAKE_OPTS := %{MakeOpts} | |
947 | DEFCONFIG := %{defconfig} | |
948 | EOF | |
949 | ||
950 | PaXconfig() { | |
951 | set -x | |
952 | cat <<-EOCONFIG > $1 | |
953 | %ifarch %{ix86} | |
954 | CONFIG_PAX_SEGMEXEC=y | |
955 | # performance impact on CPUs without NX bit | |
956 | CONFIG_PAX_PAGEEXEC=n | |
957 | # Testing KERNEXEC | |
958 | ||
959 | CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM=n | |
960 | CONFIG_PCI_BIOS=n | |
961 | CONFIG_EFI=n | |
962 | %endif | |
963 | ||
964 | %ifarch ppc64 | |
965 | CONFIG_PAX_NOELFRELOCS=n | |
966 | %endif | |
967 | %ifarch ppc | |
968 | CONFIG_PAX_EMUTRAMP=y | |
969 | CONFIG_PAX_EMUSIGRT=y | |
970 | CONFIG_PAX_EMUPLT=y | |
971 | %endif | |
972 | ||
973 | %ifarch sparc sparc64 alpha | |
974 | CONFIG_PAX_EMUPLT=y | |
975 | %endif | |
976 | ||
977 | # Now we have to check MAC system integration. Grsecurity (full) uses PAX_HAVE_ACL_FLAGS | |
978 | # setting (direct acces). grsec_minimal probably have no idea about PaX so we probably | |
979 | # could use PAX_NO_ACL_FLAGS, but for testing the hooks setting will be used | |
980 | # PAX_HOOK_ACL_FLAGS. SELinux should also be able to make PaX settings via hooks | |
981 | ||
982 | %if %{with grsec_full} | |
983 | # Hardening grsec options if with pax | |
984 | CONFIG_GRKERNSEC_PROC_MEMMAP=y | |
985 | # almost rational (see HIDESYM help) | |
986 | CONFIG_GRKERNSEC_HIDESYM=y | |
987 | ||
988 | # no change needed CONFIG=PAX_HAVE_ACL_FLAGS=y is taken from the kernel-pax.config | |
989 | %else | |
990 | # selinux or other hooks? | |
991 | CONFIG_PAX_HAVE_ACL_FLAGS=n | |
992 | CONFIG_PAX_HOOK_ACL_FLAGS=y | |
993 | %endif | |
994 | EOCONFIG | |
995 | ||
996 | return 0 | |
997 | } | |
998 | ||
999 | RescueConfig() { | |
1000 | set -x | |
1001 | cat <<-EOCONFIG > $1 | |
1002 | # CONFIG_SOUND is not set | |
1003 | # CONFIG_AUDIT is not set | |
1004 | # CONFIG_TR is not set | |
1005 | # CONFIG_BT is not set | |
1006 | # CONFIG_VIDEO_DEV is not set | |
1007 | # CONFIG_DVB_CORE is not set | |
1008 | # CONFIG_HAMRADIO is not set | |
1009 | # CONFIG_ARCNET is not set | |
1010 | # CONFIG_FB is not set | |
1011 | # CONFIG_DRM is not set | |
1012 | # CONFIG_WATCHDOG is not set | |
1013 | # CONFIG_INPUT_JOYSTICK is not set | |
1014 | # CONFIG_DEBUG_KERNEL is not set | |
1015 | # CONFIG_ISDN is not set | |
1016 | # CONFIG_AGP is not set | |
1017 | # CONFIG_SECURITY is not set | |
1018 | # CONFIG_PARIDE is not set | |
1019 | # CONFIG_CPU_FREQ is not set | |
1020 | # CONFIG_GAMEPORT is not set | |
1021 | # CONFIG_KVM is not set | |
1022 | # CONFIG_PHONE is not set | |
1023 | CONFIG_AUFS=y | |
1024 | CONFIG_AUFS_FS=y | |
1025 | CONFIG_AUFS_BR_RAMFS=y | |
1026 | CONFIG_BLK_DEV_LOOP=y | |
1027 | CONFIG_ISO9660_FS=y | |
1028 | CONFIG_NLS_UTF8=y | |
1029 | EOCONFIG | |
1030 | ||
1031 | return 0 | |
1032 | } | |
1033 | ||
1034 | BuildConfig() { | |
1035 | %{?debug:set -x} | |
1036 | set -e | |
1037 | ||
1038 | Config="kernel-%{target_arch_dir}.config" | |
1039 | echo >&2 "Building config file for %{_target_cpu} using $Config et al." | |
1040 | ||
1041 | # prepare local and important options | |
1042 | cat <<-EOCONFIG > important.config | |
1043 | LOCALVERSION="-%{localversion}" | |
1044 | ||
1045 | %if 0%{?debug:1} | |
1046 | CONFIG_DEBUG_SLAB=y | |
1047 | CONFIG_DEBUG_SLAB_LEAK=y | |
1048 | CONFIG_DEBUG_PREEMPT=y | |
1049 | CONFIG_RT_DEADLOCK_DETECT=y | |
1050 | %endif | |
1051 | ||
1052 | # apparmor, will be moved to external file if works | |
1053 | %if %{with apparmor} | |
1054 | CONFIG_SECURITY_APPARMOR=y | |
1055 | CONFIG_SECURITY_APPARMOR_BOOTPARAM_VALUE=1 | |
1056 | CONFIG_SECURITY_APPARMOR_DISABLE=n | |
1057 | CONFIG_SECURITY_APPARMOR_NETWORK=y | |
1058 | %endif | |
1059 | ||
1060 | %if %{without ipv6} | |
1061 | CONFIG_IPV6=n | |
1062 | %endif | |
1063 | ||
1064 | %ifarch i686 athlon pentium3 pentium4 | |
1065 | %if %{with pae} | |
1066 | CONFIG_HIGHMEM4G=n | |
1067 | CONFIG_HIGHMEM64G=y | |
1068 | CONFIG_X86_PAE=y | |
1069 | %endif | |
1070 | %endif | |
1071 | ||
1072 | %if %{without pcmcia} | |
1073 | CONFIG_PCMCIA=n | |
1074 | %endif | |
1075 | ||
1076 | %if %{with fbcondecor} | |
1077 | CONFIG_FB_S3=n | |
1078 | CONFIG_FB_VT8623=n | |
1079 | CONFIG_FB_ARK=n | |
1080 | CONFIG_FB_TILEBLITTING=n | |
1081 | CONFIG_FB_CON_DECOR=y | |
1082 | %endif | |
1083 | ||
1084 | %if %{with nfsroot} | |
1085 | CONFIG_NFS_FS=y | |
1086 | CONFIG_ROOT_NFS=y | |
1087 | %endif | |
1088 | ||
1089 | # Temporary disabled RELOCATABLE. Needed only on x86?? | |
1090 | %if %{with pax} || %{with grsec_full} | |
1091 | CONFIG_RELOCATABLE=n | |
1092 | %endif | |
1093 | EOCONFIG | |
1094 | ||
1095 | %if %{with rescuecd} | |
1096 | RescueConfig rescue.config | |
1097 | %endif | |
1098 | %if %{with pax_full} || %{with pax} | |
1099 | PaXconfig pax.config | |
1100 | %endif | |
1101 | ||
1102 | # prepare kernel-style config file from multiple config files | |
1103 | %{__awk} -v arch="all %{target_arch_dir} %{_target_base_arch} %{_target_cpu}" -f %{SOURCE6} \ | |
1104 | %if %{with myown} | |
1105 | $RPM_SOURCE_DIR/kernel-%{alt_kernel}.config \ | |
1106 | %endif | |
1107 | important.config \ | |
1108 | %if %{with rescuecd} | |
1109 | %{SOURCE58} \ | |
1110 | %{SOURCE59} \ | |
1111 | rescue.config \ | |
1112 | %endif | |
1113 | \ | |
1114 | %if %{with pax_full} | |
1115 | %{SOURCE45} \ | |
1116 | %{SOURCE49} \ | |
1117 | pax.config \ | |
1118 | %else | |
1119 | %if %{with grsec_full} | |
1120 | %{SOURCE45} \ | |
1121 | %{SOURCE50} \ | |
1122 | %else | |
1123 | %if %{with grsec_minimal} | |
1124 | %{SOURCE51} \ | |
1125 | %endif | |
1126 | %endif | |
1127 | %if %{with pax} | |
1128 | %{SOURCE49} \ | |
1129 | pax.config \ | |
1130 | %endif | |
1131 | %endif | |
1132 | \ | |
1133 | %if %{with reiser4} | |
1134 | %{SOURCE56} \ | |
1135 | %endif | |
1136 | %if %{with wrr} | |
1137 | %{SOURCE57} \ | |
1138 | %endif | |
1139 | %if %{with imq} | |
1140 | %{SOURCE55} \ | |
1141 | %endif | |
1142 | %if %{with vserver} | |
1143 | %{SOURCE43} \ | |
1144 | %endif | |
1145 | %if %{with tuxonice} | |
1146 | %ifarch %{ix86} %{x8664} ia64 ppc ppc64 | |
1147 | %{SOURCE42} \ | |
1148 | %endif | |
1149 | %endif | |
1150 | %{SOURCE40} %{?0:netfilter} \ | |
1151 | %{SOURCE41} %{?0:patches} \ | |
1152 | %{SOURCE20} \ | |
1153 | $RPM_SOURCE_DIR/$Config | |
1154 | } | |
1155 | ||
1156 | cd %{objdir} | |
1157 | install -d arch/%{target_arch_dir} | |
1158 | BuildConfig > %{defconfig} | |
1159 | ln -sf %{defconfig} .config | |
1160 | cd - | |
1161 | ||
1162 | %{__make} TARGETOBJ=%{targetobj} oldconfig | |
1163 | ||
1164 | %{__awk} %{?debug:-v dieOnError=1} -v infile=%{objdir}/%{defconfig} -f %{SOURCE8} %{objdir}/.config | |
1165 | ||
1166 | # build kernel | |
1167 | %{__make} TARGETOBJ=%{targetobj} all | |
1168 | ||
1169 | %install | |
1170 | rm -rf $RPM_BUILD_ROOT | |
1171 | %{__make} %{MakeOpts} %{!?with_verbose:-s} modules_install firmware_install \ | |
1172 | -C %{objdir} \ | |
1173 | %{?with_verbose:V=1} \ | |
1174 | DEPMOD=%{DepMod} \ | |
1175 | INSTALL_MOD_PATH=$RPM_BUILD_ROOT \ | |
1176 | INSTALL_FW_PATH=$RPM_BUILD_ROOT/lib/firmware/%{kernel_release} \ | |
1177 | KERNELRELEASE=%{kernel_release} | |
1178 | ||
1179 | install -d $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/misc | |
1180 | ||
1181 | %if %{with myown} | |
1182 | # create directories which may be missing, to simplyfy %files | |
1183 | install -d $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/kernel/sound | |
1184 | %endif | |
1185 | ||
1186 | # rpm obeys filelinkto checks for ghosted symlinks, convert to files | |
1187 | rm -f $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/{build,source} | |
1188 | touch $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/{build,source} | |
1189 | ||
1190 | # /boot | |
1191 | install -d $RPM_BUILD_ROOT/boot | |
1192 | cp -a %{objdir}/System.map $RPM_BUILD_ROOT/boot/System.map-%{kernel_release} | |
1193 | %ifarch %{ix86} %{x8664} | |
1194 | cp -a %{objdir}/arch/%{target_arch_dir}/boot/bzImage $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release} | |
1195 | install %{objdir}/vmlinux $RPM_BUILD_ROOT/boot/vmlinux-%{kernel_release} | |
1196 | %endif | |
1197 | %ifarch ppc ppc64 | |
1198 | install %{objdir}/vmlinux $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release} | |
1199 | install %{objdir}/vmlinux $RPM_BUILD_ROOT/boot/vmlinux-%{kernel_release} | |
1200 | %endif | |
1201 | %ifarch ia64 | |
1202 | %{__gzip} -cfv %{objdir}/vmlinux > %{objdir}/vmlinuz | |
1203 | cp -a %{objdir}/vmlinuz $RPM_BUILD_ROOT/boot/efi/vmlinuz-%{kernel_release} | |
1204 | ln -sf efi/vmlinuz-%{kernel_release} $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release} | |
1205 | %endif | |
1206 | %ifarch alpha sparc sparc64 | |
1207 | %{__gzip} -cfv %{objdir}/vmlinux > %{objdir}/vmlinuz | |
1208 | cp -a %{objdir}/vmlinuz $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release} | |
1209 | install %{objdir}/vmlinux $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release} | |
1210 | %ifarch sparc | |
1211 | elftoaout %{objdir}/arch/sparc/boot/image -o %{objdir}/vmlinux.aout | |
1212 | install %{objdir}/vmlinux.aout $RPM_BUILD_ROOT/boot/vmlinux.aout-%{kernel_release} | |
1213 | %endif | |
1214 | %ifarch sparc64 | |
1215 | elftoaout %{objdir}/arch/sparc64/boot/image -o %{objdir}/vmlinux.aout | |
1216 | install %{objdir}/vmlinux.aout $RPM_BUILD_ROOT/boot/vmlinux.aout-%{kernel_release} | |
1217 | %endif | |
1218 | %ifarch arm | |
1219 | install %{objdir}/arch/arm/boot/zImage $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release} | |
1220 | %endif | |
1221 | %endif | |
1222 | ||
1223 | # ghosted initrd | |
1224 | touch $RPM_BUILD_ROOT%{initrd_dir}/initrd-%{kernel_release}.gz | |
1225 | ||
1226 | %if "%{_target_base_arch}" != "%{_arch}" | |
1227 | touch $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/modules.dep | |
1228 | %endif | |
1229 | ||
1230 | # /etc/modrobe.d | |
1231 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/%{kernel_release} | |
1232 | ||
1233 | # /usr/src/linux | |
1234 | install -d $RPM_BUILD_ROOT%{_kernelsrcdir} | |
1235 | # test if we can hardlink -- %{_builddir} and $RPM_BUILD_ROOT on same partition | |
1236 | if cp -al %{srcdir}/COPYING $RPM_BUILD_ROOT/COPYING 2>/dev/null; then | |
1237 | l=l | |
1238 | rm -f $RPM_BUILD_ROOT/COPYING | |
1239 | fi | |
1240 | ||
1241 | cp -a$l %{srcdir}/* $RPM_BUILD_ROOT%{_kernelsrcdir} | |
1242 | cp -a %{objdir}/Module.symvers $RPM_BUILD_ROOT%{_kernelsrcdir}/Module.symvers-dist | |
1243 | cp -aL %{objdir}/.config $RPM_BUILD_ROOT%{_kernelsrcdir}/config-dist | |
1244 | cp -a %{objdir}/include/linux/autoconf.h $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux/autoconf-dist.h | |
1245 | cp -a %{objdir}/include/linux/{utsrelease,version}.h $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux | |
1246 | cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux/autoconf.h | |
1247 | cp -a %{SOURCE4} $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux/config.h | |
1248 | ||
1249 | # collect module-build files and directories | |
1250 | # Usage: kernel-module-build.pl $rpmdir $fileoutdir | |
1251 | fileoutdir=$(pwd) | |
1252 | cd $RPM_BUILD_ROOT%{_kernelsrcdir} | |
1253 | %{__perl} %{topdir}/kernel-module-build.pl %{_kernelsrcdir} $fileoutdir | |
1254 | cd - | |
1255 | ||
1256 | %clean | |
1257 | rm -rf $RPM_BUILD_ROOT | |
1258 | ||
1259 | %preun | |
1260 | if [ -x /sbin/new-kernel-pkg ]; then | |
1261 | /sbin/new-kernel-pkg --remove %{kernel_release} | |
1262 | fi | |
1263 | ||
1264 | %post | |
1265 | %ifarch ia64 | |
1266 | mv -f /boot/efi/vmlinuz{,.old} 2> /dev/null | |
1267 | %{?alt_kernel:mv -f /boot/efi/vmlinuz%{_alt_kernel}{,.old} 2> /dev/null} | |
1268 | ln -sf vmlinuz-%{kernel_release} /boot/efi/vmlinuz | |
1269 | %{?alt_kernel:ln -sf vmlinuz-%{kernel_release} /boot/efi/vmlinuz%{_alt_kernel}} | |
1270 | %endif | |
1271 | mv -f /boot/vmlinuz{,.old} 2> /dev/null | |
1272 | %{?alt_kernel:mv -f /boot/vmlinuz%{_alt_kernel}{,.old} 2> /dev/null} | |
1273 | mv -f /boot/System.map{,.old} 2> /dev/null | |
1274 | %{?alt_kernel:mv -f /boot/System%{_alt_kernel}.map{,.old} 2> /dev/null} | |
1275 | ln -sf vmlinuz-%{kernel_release} /boot/vmlinuz | |
1276 | %{?alt_kernel:ln -sf vmlinuz-%{kernel_release} /boot/vmlinuz%{_alt_kernel}} | |
1277 | ln -sf System.map-%{kernel_release} /boot/System.map | |
1278 | %{?alt_kernel:ln -sf System.map-%{kernel_release} /boot/System.map%{_alt_kernel}} | |
1279 | ||
1280 | %depmod %{kernel_release} | |
1281 | ||
1282 | /sbin/geninitrd -f --initrdfs=rom %{initrd_dir}/initrd-%{kernel_release}.gz %{kernel_release} | |
1283 | mv -f %{initrd_dir}/initrd{,.old} 2> /dev/null | |
1284 | %{?alt_kernel:mv -f %{initrd_dir}/initrd%{_alt_kernel}{,.old} 2> /dev/null} | |
1285 | ln -sf initrd-%{kernel_release}.gz %{initrd_dir}/initrd | |
1286 | %{?alt_kernel:ln -sf initrd-%{kernel_release}.gz %{initrd_dir}/initrd%{_alt_kernel}} | |
1287 | ||
1288 | if [ -x /sbin/new-kernel-pkg ]; then | |
1289 | /sbin/new-kernel-pkg --initrdfile=%{initrd_dir}/initrd-%{kernel_release}.gz --install %{kernel_release} --banner "PLD Linux (%{pld_release})%{?alt_kernel: / %{alt_kernel}}" | |
1290 | elif [ -x /sbin/rc-boot ]; then | |
1291 | /sbin/rc-boot 1>&2 || : | |
1292 | fi | |
1293 | ||
1294 | %post vmlinux | |
1295 | mv -f /boot/vmlinux{,.old} 2> /dev/null | |
1296 | %{?alt_kernel:mv -f /boot/vmlinux-%{alt_kernel}{,.old} 2> /dev/null} | |
1297 | ln -sf vmlinux-%{kernel_release} /boot/vmlinux | |
1298 | %{?alt_kernel:ln -sf vmlinux-%{kernel_release} /boot/vmlinux-%{alt_kernel}} | |
1299 | ||
1300 | %post libs | |
1301 | %{_sbindir}/mkvmlinuz /boot/zImage-%{kernel_release} %{kernel_release} | |
1302 | ||
1303 | %post drm | |
1304 | %depmod %{kernel_release} | |
1305 | ||
1306 | %postun drm | |
1307 | %depmod %{kernel_release} | |
1308 | ||
1309 | %post pcmcia | |
1310 | %depmod %{kernel_release} | |
1311 | ||
1312 | %postun pcmcia | |
1313 | %depmod %{kernel_release} | |
1314 | ||
1315 | %post sound-alsa | |
1316 | %depmod %{kernel_release} | |
1317 | ||
1318 | %postun sound-alsa | |
1319 | %depmod %{kernel_release} | |
1320 | ||
1321 | %post sound-oss | |
1322 | %depmod %{kernel_release} | |
1323 | ||
1324 | %postun sound-oss | |
1325 | %depmod %{kernel_release} | |
1326 | ||
1327 | %post headers | |
1328 | ln -snf %{basename:%{_kernelsrcdir}} %{_prefix}/src/linux%{_alt_kernel} | |
1329 | ||
1330 | %postun headers | |
1331 | if [ "$1" = "0" ]; then | |
1332 | if [ -L %{_prefix}/src/linux%{_alt_kernel} ]; then | |
1333 | if [ "$(readlink %{_prefix}/src/linux%{_alt_kernel})" = "linux%{_alt_kernel}-%{version}" ]; then | |
1334 | rm -f %{_prefix}/src/linux%{_alt_kernel} | |
1335 | fi | |
1336 | fi | |
1337 | fi | |
1338 | ||
1339 | %triggerin module-build -- %{name} = %{epoch}:%{version}-%{release} | |
1340 | ln -sfn %{_kernelsrcdir} /lib/modules/%{kernel_release}/build | |
1341 | ln -sfn %{_kernelsrcdir} /lib/modules/%{kernel_release}/source | |
1342 | ||
1343 | %triggerun module-build -- %{name} = %{epoch}:%{version}-%{release} | |
1344 | if [ "$1" = 0 ]; then | |
1345 | rm -f /lib/modules/%{kernel_release}/{build,source} | |
1346 | fi | |
1347 | ||
1348 | %files | |
1349 | %defattr(644,root,root,755) | |
1350 | %ifarch sparc sparc64 | |
1351 | /boot/vmlinux.aout-%{kernel_release} | |
1352 | %endif | |
1353 | %ifarch ia64 | |
1354 | /boot/efi/vmlinuz-%{kernel_release} | |
1355 | %endif | |
1356 | /boot/vmlinuz-%{kernel_release} | |
1357 | /boot/System.map-%{kernel_release} | |
1358 | %ghost %{initrd_dir}/initrd-%{kernel_release}.gz | |
1359 | /lib/firmware/%{kernel_release} | |
1360 | ||
1361 | %dir /lib/modules/%{kernel_release} | |
1362 | %dir /lib/modules/%{kernel_release}/kernel | |
1363 | %ifnarch sparc | |
1364 | /lib/modules/%{kernel_release}/kernel/arch | |
1365 | %endif | |
1366 | /lib/modules/%{kernel_release}/kernel/crypto | |
1367 | /lib/modules/%{kernel_release}/kernel/drivers | |
1368 | %if %{have_drm} | |
1369 | %exclude /lib/modules/%{kernel_release}/kernel/drivers/gpu | |
1370 | %endif | |
1371 | /lib/modules/%{kernel_release}/kernel/fs | |
1372 | /lib/modules/%{kernel_release}/kernel/kernel | |
1373 | /lib/modules/%{kernel_release}/kernel/lib | |
1374 | /lib/modules/%{kernel_release}/kernel/net | |
1375 | %if %{have_sound} | |
1376 | %dir /lib/modules/%{kernel_release}/kernel/sound | |
1377 | /lib/modules/%{kernel_release}/kernel/sound/ac97_bus.ko* | |
1378 | /lib/modules/%{kernel_release}/kernel/sound/sound*.ko* | |
1379 | %ifnarch sparc | |
1380 | %exclude /lib/modules/%{kernel_release}/kernel/drivers/media/video/cx88/cx88-alsa.ko* | |
1381 | %exclude /lib/modules/%{kernel_release}/kernel/drivers/media/video/em28xx/em28xx-alsa.ko* | |
1382 | %exclude /lib/modules/%{kernel_release}/kernel/drivers/media/video/saa7134/saa7134-alsa.ko* | |
1383 | %endif | |
1384 | %endif | |
1385 | %dir /lib/modules/%{kernel_release}/misc | |
1386 | %if %{have_pcmcia} | |
1387 | %exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/[!p]* | |
1388 | %exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/pd6729.ko* | |
1389 | %exclude /lib/modules/%{kernel_release}/kernel/drivers/*/pcmcia | |
1390 | %if %{without rescuecd} | |
1391 | %exclude /lib/modules/%{kernel_release}/kernel/drivers/ata/pata_pcmcia.ko* | |
1392 | %exclude /lib/modules/%{kernel_release}/kernel/drivers/bluetooth/*_cs.ko* | |
1393 | %exclude /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/avm_cs.ko* | |
1394 | %exclude /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/b1pcmcia.ko* | |
1395 | %exclude /lib/modules/%{kernel_release}/kernel/drivers/telephony/ixj_pcmcia.ko* | |
1396 | %exclude /lib/modules/%{kernel_release}/kernel/drivers/usb/gadget/g_midi.ko* | |
1397 | %endif | |
1398 | %exclude /lib/modules/%{kernel_release}/kernel/drivers/ide/ide-cs.ko* | |
1399 | %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/*_cs.ko* | |
1400 | %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/b43 | |
1401 | %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/hostap/hostap_cs.ko* | |
1402 | %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/libertas/*_cs.ko* | |
1403 | %exclude /lib/modules/%{kernel_release}/kernel/drivers/parport/parport_cs.ko* | |
1404 | %exclude /lib/modules/%{kernel_release}/kernel/drivers/serial/serial_cs.ko* | |
1405 | %exclude /lib/modules/%{kernel_release}/kernel/drivers/usb/host/sl811_cs.ko* | |
1406 | %endif | |
1407 | %if %{with myown} | |
1408 | /lib/modules/%{kernel_release}/kernel/sound | |
1409 | %endif | |
1410 | %ghost /lib/modules/%{kernel_release}/modules.* | |
1411 | # symlinks pointing to kernelsrcdir | |
1412 | %ghost /lib/modules/%{kernel_release}/build | |
1413 | %ghost /lib/modules/%{kernel_release}/source | |
1414 | %dir %{_sysconfdir}/modprobe.d/%{kernel_release} | |
1415 | ||
1416 | %files dirs | |
1417 | %defattr(644,root,root,755) | |
1418 | %dir %{_kernelsrcdir} | |
1419 | ||
1420 | %ifarch alpha %{ix86} %{x8664} ppc ppc64 sparc sparc64 | |
1421 | %files vmlinux | |
1422 | %defattr(644,root,root,755) | |
1423 | /boot/vmlinux-%{kernel_release} | |
1424 | %endif | |
1425 | ||
1426 | %if %{have_drm} | |
1427 | %files drm | |
1428 | %defattr(644,root,root,755) | |
1429 | /lib/modules/%{kernel_release}/kernel/drivers/gpu | |
1430 | %endif | |
1431 | ||
1432 | %if %{have_pcmcia} | |
1433 | %files pcmcia | |
1434 | %defattr(644,root,root,755) | |
1435 | /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/*ko* | |
1436 | /lib/modules/%{kernel_release}/kernel/drivers/*/pcmcia | |
1437 | %exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/pcmcia*ko* | |
1438 | %if %{without rescuecd} | |
1439 | /lib/modules/%{kernel_release}/kernel/drivers/bluetooth/*_cs.ko* | |
1440 | /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/avm_cs.ko* | |
1441 | /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/b1pcmcia.ko* | |
1442 | /lib/modules/%{kernel_release}/kernel/drivers/telephony/ixj_pcmcia.ko* | |
1443 | %endif | |
1444 | /lib/modules/%{kernel_release}/kernel/drivers/ata/pata_pcmcia.ko* | |
1445 | /lib/modules/%{kernel_release}/kernel/drivers/ide/ide-cs.ko* | |
1446 | /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/*_cs.ko* | |
1447 | /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/b43 | |
1448 | /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/hostap/hostap_cs.ko* | |
1449 | /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/libertas/*_cs.ko* | |
1450 | /lib/modules/%{kernel_release}/kernel/drivers/parport/parport_cs.ko* | |
1451 | /lib/modules/%{kernel_release}/kernel/drivers/serial/serial_cs.ko* | |
1452 | /lib/modules/%{kernel_release}/kernel/drivers/usb/host/sl811_cs.ko* | |
1453 | %endif | |
1454 | ||
1455 | %ifarch ppc-broken | |
1456 | %if "%{_arch}" == "ppc" | |
1457 | %files libs | |
1458 | %defattr(644,root,root,755) | |
1459 | %dir /boot/libs-%{kernel_release} | |
1460 | /boot/libs-%{kernel_release}/common | |
1461 | /boot/libs-%{kernel_release}/kernel | |
1462 | /boot/libs-%{kernel_release}/lib | |
1463 | /boot/libs-%{kernel_release}/of1275 | |
1464 | /boot/libs-%{kernel_release}/openfirmware | |
1465 | /boot/libs-%{kernel_release}/simple | |
1466 | %dir /boot/libs-%{kernel_release}/utils | |
1467 | %attr(755,root,root) /boot/libs-%{kernel_release}/utils/* | |
1468 | /boot/libs-%{kernel_release}/ld.script | |
1469 | %endif | |
1470 | %endif | |
1471 | ||
1472 | %if %{have_sound} | |
1473 | %files sound-alsa | |
1474 | %defattr(644,root,root,755) | |
1475 | /lib/modules/%{kernel_release}/kernel/sound | |
1476 | %exclude %dir /lib/modules/%{kernel_release}/kernel/sound | |
1477 | %exclude /lib/modules/%{kernel_release}/kernel/sound/ac97_bus.ko* | |
1478 | %exclude /lib/modules/%{kernel_release}/kernel/sound/sound*.ko* | |
1479 | %if %{have_oss} | |
1480 | %exclude /lib/modules/%{kernel_release}/kernel/sound/oss | |
1481 | %endif | |
1482 | %ifnarch sparc | |
1483 | /lib/modules/%{kernel_release}/kernel/drivers/usb/gadget/g_midi.ko* | |
1484 | /lib/modules/%{kernel_release}/kernel/drivers/media/video/cx88/cx88-alsa.ko* | |
1485 | /lib/modules/%{kernel_release}/kernel/drivers/media/video/em28xx/em28xx-alsa.ko* | |
1486 | /lib/modules/%{kernel_release}/kernel/drivers/media/video/saa7134/saa7134-alsa.ko* | |
1487 | %endif | |
1488 | ||
1489 | %if %{have_oss} | |
1490 | %files sound-oss | |
1491 | %defattr(644,root,root,755) | |
1492 | /lib/modules/%{kernel_release}/kernel/sound/oss | |
1493 | %endif | |
1494 | %endif | |
1495 | ||
1496 | %files headers | |
1497 | %defattr(644,root,root,755) | |
1498 | %{_kernelsrcdir}/include | |
1499 | %dir %{_kernelsrcdir}/arch | |
1500 | %dir %{_kernelsrcdir}/arch/[!K]* | |
1501 | %{_kernelsrcdir}/arch/*/include | |
1502 | %dir %{_kernelsrcdir}/security | |
1503 | %dir %{_kernelsrcdir}/security/selinux | |
1504 | %{_kernelsrcdir}/security/selinux/include | |
1505 | %{_kernelsrcdir}/config-dist | |
1506 | %{_kernelsrcdir}/Module.symvers-dist | |
1507 | ||
1508 | %files module-build -f aux_files | |
1509 | %defattr(644,root,root,755) | |
1510 | %ifarch ppc ppc64 | |
1511 | %{_kernelsrcdir}/arch/powerpc/lib/crtsavres.* | |
1512 | %endif | |
1513 | %{_kernelsrcdir}/arch/*/kernel/asm-offsets* | |
1514 | %{_kernelsrcdir}/arch/*/kernel/sigframe*.h | |
1515 | %{_kernelsrcdir}/drivers/lguest/lg.h | |
1516 | %{_kernelsrcdir}/kernel/bounds.c | |
1517 | %dir %{_kernelsrcdir}/scripts | |
1518 | %dir %{_kernelsrcdir}/scripts/kconfig | |
1519 | %{_kernelsrcdir}/scripts/Kbuild.include | |
1520 | %{_kernelsrcdir}/scripts/Makefile* | |
1521 | %{_kernelsrcdir}/scripts/basic | |
1522 | %{_kernelsrcdir}/scripts/mkmakefile | |
1523 | %{_kernelsrcdir}/scripts/mod | |
1524 | %{_kernelsrcdir}/scripts/setlocalversion | |
1525 | %{_kernelsrcdir}/scripts/*.c | |
1526 | %{_kernelsrcdir}/scripts/*.sh | |
1527 | %{_kernelsrcdir}/scripts/kconfig/* | |
1528 | %{_kernelsrcdir}/scripts/mkcompile_h | |
1529 | %dir %{_kernelsrcdir}/scripts/selinux | |
1530 | %{_kernelsrcdir}/scripts/selinux/Makefile | |
1531 | %dir %{_kernelsrcdir}/scripts/selinux/mdp | |
1532 | %{_kernelsrcdir}/scripts/selinux/mdp/Makefile | |
1533 | %{_kernelsrcdir}/scripts/selinux/mdp/*.c | |
1534 | ||
1535 | %files doc | |
1536 | %defattr(644,root,root,755) | |
1537 | %{_kernelsrcdir}/Documentation | |
1538 | ||
1539 | %if %{with source} | |
1540 | %files source -f aux_files_exc | |
1541 | %defattr(644,root,root,755) | |
1542 | %{_kernelsrcdir}/arch/*/[!Mik]* | |
1543 | %{_kernelsrcdir}/arch/*/kernel/[!M]* | |
1544 | %{_kernelsrcdir}/arch/ia64/ia32/[!M]* | |
1545 | %{_kernelsrcdir}/arch/ia64/install.sh | |
1546 | %{_kernelsrcdir}/arch/m68k/ifpsp060/[!M]* | |
1547 | %{_kernelsrcdir}/arch/m68k/ifpsp060/MISC | |
1548 | %{_kernelsrcdir}/arch/parisc/install.sh | |
1549 | %{_kernelsrcdir}/arch/x86/ia32/[!M]* | |
1550 | %{_kernelsrcdir}/arch/ia64/kvm | |
1551 | %{_kernelsrcdir}/arch/powerpc/kvm | |
1552 | %ifarch ppc ppc64 | |
1553 | %exclude %{_kernelsrcdir}/arch/powerpc/lib/crtsavres.* | |
1554 | %endif | |
1555 | %{_kernelsrcdir}/arch/s390/kvm | |
1556 | %{_kernelsrcdir}/arch/x86/kvm | |
1557 | %exclude %{_kernelsrcdir}/arch/*/kernel/asm-offsets* | |
1558 | %exclude %{_kernelsrcdir}/arch/*/kernel/sigframe*.h | |
1559 | %exclude %{_kernelsrcdir}/drivers/lguest/lg.h | |
1560 | %{_kernelsrcdir}/block | |
1561 | %{_kernelsrcdir}/crypto | |
1562 | %{_kernelsrcdir}/drivers | |
1563 | %{_kernelsrcdir}/firmware | |
1564 | %{_kernelsrcdir}/fs | |
1565 | %if %{with grsecurity} && %{without rescuecd} | |
1566 | %{_kernelsrcdir}/grsecurity | |
1567 | %endif | |
1568 | %{_kernelsrcdir}/init | |
1569 | %{_kernelsrcdir}/ipc | |
1570 | %{_kernelsrcdir}/kernel | |
1571 | %exclude %{_kernelsrcdir}/kernel/bounds.c | |
1572 | %{_kernelsrcdir}/lib | |
1573 | %{_kernelsrcdir}/mm | |
1574 | %{_kernelsrcdir}/net | |
1575 | %{_kernelsrcdir}/virt | |
1576 | %{_kernelsrcdir}/samples | |
1577 | %{_kernelsrcdir}/scripts/* | |
1578 | %exclude %{_kernelsrcdir}/scripts/Kbuild.include | |
1579 | %exclude %{_kernelsrcdir}/scripts/Makefile* | |
1580 | %exclude %{_kernelsrcdir}/scripts/basic | |
1581 | %exclude %{_kernelsrcdir}/scripts/kconfig | |
1582 | %exclude %{_kernelsrcdir}/scripts/mkmakefile | |
1583 | %exclude %{_kernelsrcdir}/scripts/mod | |
1584 | %exclude %{_kernelsrcdir}/scripts/setlocalversion | |
1585 | %exclude %{_kernelsrcdir}/scripts/*.c | |
1586 | %exclude %{_kernelsrcdir}/scripts/*.sh | |
1587 | %{_kernelsrcdir}/sound | |
1588 | %{_kernelsrcdir}/security | |
1589 | %exclude %{_kernelsrcdir}/security/selinux/include | |
1590 | %{_kernelsrcdir}/usr | |
1591 | %{_kernelsrcdir}/COPYING | |
1592 | %{_kernelsrcdir}/CREDITS | |
1593 | %{_kernelsrcdir}/MAINTAINERS | |
1594 | %{_kernelsrcdir}/README | |
1595 | %{_kernelsrcdir}/REPORTING-BUGS | |
1596 | %endif |