3 # the following bcond combos will not work
4 # - without_vserver and any of the following
9 # LATEST VERSION CHECKER:
10 # # curl -s http://www.kernel.org/kdist/finger_banner
13 # - benchmark NO_HZ & HZ=1000 vs HZ=300 on i686
14 # - update or remove tahoe9xx patch2
15 # - update or remove mpt-fusion patch90
16 # - update grsec_minimal patch1000:
17 # fs/proc/base.c:1484: error: 'struct task_struct' has no member named 'uid'
19 # HOWTO update configuration files:
21 # - add new options to proper config (kernel-multiarch.config, kernel-x86.config, kernel-powerpc.config etc)
22 # - sort configuration files using:
23 # ./kernel-config-sort.pl ~/rpm/BUILD/kernel-%{version}/linux-%{version}/ -a x86 kernel-x86_84.config
24 # ./kernel-config-sort.pl ~/rpm/BUILD/kernel-%{version}/linux-%{version} kernel-multiarch.config
27 %bcond_without source # don't build kernel-source package
28 %bcond_without doc # don't build kernel-doc package
29 %bcond_without pcmcia # don't build pcmcia
31 %bcond_with verbose # verbose build (V=1)
32 %bcond_without reiser4 # support for reiser4 fs (experimental)
34 %bcond_without grsecurity # don't build grsecurity nor pax at all
35 %bcond_without grsec_full # build full grsecurity
36 %bcond_with grsec_minimal # build only minimal subset (proc,link,fifo,shm)
37 %bcond_with pax # build pax and full grsecurity (ie. grsec_full && pax)
39 %bcond_with fbcondecor # build fbcondecor (disable FB_TILEBLITTING and affected fb modules)
40 %bcond_with pae # build PAE (HIGHMEM64G) support on uniprocessor
41 %bcond_with nfsroot # build with root on NFS support
43 %bcond_without imq # imq support
44 %bcond_without wrr # wrr support
45 %bcond_without esfq # esfq support
46 %bcond_without ipv6 # ipv6 support
48 %bcond_without vserver # support for VServer (enabled by default)
49 %bcond_without tuxonice # support for tuxonice (ex-suspend2) (enabled by default)
50 %bcond_without apparmor # build kernel with apparmor (exerimental mix)
52 %bcond_with rescuecd # build kernel for our rescue
54 %bcond_with myown # build with your own config (kernel-myown.config)
56 %{?debug:%define with_verbose 1}
58 %if %{without grsecurity}
59 %unglobal with_grsec_full
60 %unglobal with_grsec_minimal
65 %unglobal with_grsec_minimal
66 %define with_grsec_full 1
67 %define with_grsecurity 1
71 %if %{with grsec_minimal}
73 %unglobal with_grsec_full
74 %define with_grsecurity 1
77 %if %{with grsec_full}
78 %unglobal with_grsec_minimal
79 %define with_grsecurity 1
88 %unglobal with_apparmor
89 %unglobal with_tuxonice
90 %unglobal with_grsecurity
91 %unglobal with_grsec_full
92 %unglobal with_grsec_minimal
94 %unglobal with_vserver
103 %define have_pcmcia 0
106 %ifarch sparc sparc64
107 %unglobal with_pcmcia
112 %if %{without pcmcia}
113 %define have_pcmcia 0
116 %define basever 2.6.32
120 %define _enable_debug_packages 0
122 %define tuxonice_version 3.0.1
123 %define netfilter_snap 20070806
126 %if "%{_alt_kernel}" == ""
127 %define alt_kernel myown
130 %if %{without rescuecd}
131 %define __alt_kernel %{?with_pax:pax}%{!?with_grsec_full:nogrsecurity}%{!?with_apparmor:noaa}%{?with_pae:pae}
132 %if "%{__alt_kernel}" != ""
133 %define alt_kernel %{__alt_kernel}
136 %define alt_kernel rescuecd
140 # kernel release (used in filesystem and eventually in uname -r)
141 # modules will be looked from /lib/modules/%{kernel_release}
142 # localversion is just that without version for "> localversion"
143 %define localversion %{rel}
144 %define kernel_release %{version}%{?alt_kernel:_%{alt_kernel}}-%{localversion}
146 Summary: The Linux kernel (the core of the Linux operating system)
147 Summary(de.UTF-8): Der Linux-Kernel (Kern des Linux-Betriebssystems)
148 Summary(et.UTF-8): Linuxi kernel (ehk operatsioonisüsteemi tuum)
149 Summary(fr.UTF-8): Le Kernel-Linux (La partie centrale du systeme)
150 Summary(pl.UTF-8): JÄ…dro Linuksa
151 Name: kernel%{_alt_kernel}
152 Version: %{basever}%{postver}
157 Source0: http://www.kernel.org/pub/linux/kernel/v2.6/linux-%{basever}.tar.bz2
158 # Source0-md5: 260551284ac224c3a43c4adac7df4879
159 %if "%{postver}" != "%{nil}"
160 Source1: http://www.kernel.org/pub/linux/kernel/v2.6/patch-%{version}.bz2
161 # Source1-md5: eabf01da4c72f7ea5b4e4bf8e8535e5f
164 Source3: kernel-autoconf.h
165 Source4: kernel-config.h
166 Source6: kernel-config.awk
167 Source7: kernel-module-build.pl
168 Source8: kernel-track-config-change.awk
169 # not used by kernel.spec, but it's good to have it in SOURCES
170 Source9: kernel-config-sort.pl
171 Source10: kernel.make
173 Source20: kernel-multiarch.config
174 Source21: kernel-x86.config
175 Source22: kernel-sparc.config
176 Source23: kernel-alpha.config
177 Source24: kernel-powerpc.config
178 Source25: kernel-ia64.config
180 Source40: kernel-netfilter.config
181 Source41: kernel-patches.config
182 Source42: kernel-tuxonice.config
183 Source43: kernel-vserver.config
184 Source45: kernel-grsec.config
186 Source49: kernel-pax.config
187 Source50: kernel-no-pax.config
188 Source51: kernel-grsec_minimal.config
189 Source55: kernel-imq.config
190 Source56: kernel-reiser4.config
191 Source57: kernel-wrr.config
193 Source58: kernel-inittmpfs.config
194 Source59: kernel-bzip2-lzma.config
196 # tahoe9xx http://www.tahoe.pl/drivers/tahoe9xx-2.6.24.patch
197 Patch2: kernel-tahoe9xx.patch
199 # http://dev.gentoo.org/~spock/projects/fbcondecor/archive/fbcondecor-0.9.4-2.6.25-rc6.patch
200 Patch3: kernel-fbcondecor.patch
201 Patch4: kernel-fbcon-margins.patch
203 # netfilter related stuff mostly based on patch-o-matic-ng
204 # snapshot 20070806 with some fixes. Some modules
205 # were ported to nf_conntrack.
207 Patch10: kernel-pom-ng-IPV4OPTSSTRIP.patch
208 Patch11: kernel-pom-ng-ipv4options.patch
210 Patch14: kernel-pom-ng-ROUTE.patch
211 Patch16: kernel-pom-ng-mms-conntrack-nat.patch
212 Patch22: kernel-pom-ng-rsh.patch
213 Patch23: kernel-pom-ng-rpc.patch
215 # based on http://mike.it-loops.com/rtsp/rtsp-2.6.26.patch
216 Patch36: kernel-nf_rtsp.patch
218 # http://ftp.linux-vserver.org/pub/people/dhozac/p/k/delta-owner-xid-feat02.diff
219 Patch37: kernel-owner-xid.patch
221 # based on http://www.svn.barbara.eu.org/ipt_account/attachment/wiki/Software/ipt_account-0.1.21-20070804164729.tar.gz?format=raw
222 Patch38: kernel-ipt_account.patch
224 # based on http://www.intra2net.com/de/produkte/opensource/ipt_account/pom-ng-ipt_ACCOUNT-1.12.tgz
225 Patch39: kernel-ipt_ACCOUNT.patch
227 # based on kernel-2.6.25-layer7-2.20.patch from
228 # http://switch.dl.sourceforge.net/sourceforge/l7-filter/netfilter-layer7-v2.20.tar.gz
229 Patch40: kernel-layer7.patch
231 # http://www.ssi.bg/~ja/nfct/ipvs-nfct-2.6.28-1.diff
232 Patch41: kernel-ipvs-nfct.patch
236 # http://zph.bratcheda.org/linux-2.6.26.3-zph.patch
237 Patch49: kernel-zph.patch
239 # http://www.linuximq.net/patchs/linux-2.6.32-imq-test2.diff
240 Patch50: kernel-imq.patch
242 # http://www.kernel.org/pub/linux/kernel/people/edward/reiser4/reiser4-for-2.6/reiser4-for-2.6.28.patch.bz2
243 Patch51: kernel-reiser4.patch
245 # http://www.zz9.dk/patches/wrr-linux-071203-2.6.25.patch.gz
246 Patch52: kernel-wrr.patch
248 # http://fatooh.org/esfq-2.6/sfq-2.6.24.1.tar.bz2
249 Patch53: kernel-esfq.patch
251 # http://memebeam.org/free-software/toshiba_acpi/toshiba_acpi-dev_toshiba_test5-linux_2.6.26.patch
252 Patch54: kernel-toshiba_acpi.patch
254 # by Baggins request:
255 # derived from ftp://ftp.cmf.nrl.navy.mil/pub/chas/linux-atm/vbr/vbr-kernel-diffs
256 Patch55: kernel-atm-vbr.patch
257 Patch56: kernel-atmdd.patch
259 # http://synce.svn.sourceforge.net/svnroot/synce/trunk/patches/linux-2.6.22-rndis_host-wm5.patch
260 Patch59: kernel-rndis_host-wm5.patch
262 # Project suspend2 renamed to tuxonice
263 # http://www.tuxonice.net/downloads/all/tuxonice-3.0.99.32-for-2.6.32.patch.bz2
264 Patch69: kernel-tuxonice.patch
265 Patch70: kernel-tuxonice-headers.patch
267 # adds some ids for hostap suported cards and monitor_enable from/for aircrack-ng
268 # http://patches.aircrack-ng.org/hostap-kernel-2.6.18.patch
269 Patch85: kernel-hostap.patch
271 # Taken from http://download.opensuse.org/factory/repo/src-oss/suse/src/kernel-source-2.6.30-10.3.src.rpm
272 Patch90: kernel-mpt-fusion.patch
274 # based on http://vserver.13thfloor.at/Experimental/patch-2.6.32.6-vs2.3.0.36.28.diff
275 Patch100: kernel-vserver-2.3.patch
276 Patch101: kernel-vserver-fixes.patch
278 # Wake-On-Lan fix for nForce drivers; using http://atlas.et.tudelft.nl/verwei90/nforce2/wol.html
279 # Fix verified for that kernel version.
280 Patch130: kernel-forcedeth-WON.patch
282 # http://download.filesystems.org/unionfs/unionfs-2.x/unionfs-2.5.3_for_2.6.31.diff.gz
283 Patch140: kernel-unionfs.patch
285 # aufs1, http://aufs.sourceforge.net/
286 # aufs1 is NOT maintained since Jan 2009.
287 Patch145: kernel-aufs.patch
288 Patch146: kernel-aufs-support.patch
290 Patch148: kernel-aufs2.patch
292 Patch150: kernel-ppc-crtsavres.patch
294 # git://git.kernel.org/pub/scm/linux/kernel/git/pkl/squashfs-devel.git
295 Patch160: kernel-squashfs-lzma.patch
297 Patch200: kernel-ppc-ICE-hacks.patch
299 # The following patch extend the routing functionality in Linux
300 # to support static routes (defined by user), new way to use the
301 # alternative routes, the reverse path protection (rp_filter),
302 # the NAT processing to use correctly the routing when multiple
304 # http://www.ssi.bg/~ja/routes-2.6.28-16.diff
305 Patch300: kernel-routes.patch
307 Patch1000: kernel-grsec-minimal.patch
309 Patch2000: kernel-small_fixes.patch
310 Patch2001: kernel-pwc-uncompress.patch
311 Patch2003: kernel-regressions.patch
313 # kill some thousands of warnings
314 # (only warnings, so just remove parts of this patch if conflics)
315 Patch2500: kernel-warnings.patch
317 # git://kernel.ubuntu.com/ubuntu/ubuntu-karmic.git
318 # see ubuntu/apparmor dir
319 Patch5000: kernel-apparmor.patch
322 # based on http://ftp.leg.uct.ac.za/pub/linux/rip/inittmpfs-2.6.14.diff.gz
323 Patch7000: kernel-inittmpfs.patch
325 # based on http://www.grsecurity.net/~spender/grsecurity-2.1.14-2.6.32.7-201001291848.patch kernel-grsec_full.patch
326 # NOTE: put raw upstream patches on kernel-grsec_full.patch:GRSECURITY_RAW for reference
327 # (since upstream deletes older patches)
328 Patch9999: kernel-grsec_full.patch
329 Patch10000: kernel-grsec-caps.patch
330 Patch10001: kernel-grsec-common.patch
331 Patch10002: kernel-grsec_fixes.patch
333 URL: http://www.kernel.org/
334 BuildRequires: binutils >= 3:2.18
335 %ifarch sparc sparc64
336 BuildRequires: elftoaout
339 BuildRequires: uboot-mkimage
341 BuildRequires: /sbin/depmod
342 BuildRequires: gcc >= 5:3.2
343 BuildRequires: xz >= 1:4.999.7
345 # for hostname command
346 BuildRequires: net-tools
347 BuildRequires: perl-base
348 BuildRequires: rpm-build >= 4.5-24
349 BuildRequires: rpmbuild(macros) >= 1.217
350 Requires(post): coreutils
351 Requires(post): geninitrd >= 10000-3
352 Requires(post): module-init-tools >= 0.9.9
353 Requires: /sbin/depmod
355 Requires: geninitrd >= 10000-3
356 Requires: module-init-tools >= 0.9.9
357 Suggests: %{name}-firmware = %{kernel_release}
358 Provides: %{name}(netfilter) = %{netfilter_snap}
359 Provides: %{name}(vermagic) = %{kernel_release}
360 Obsoletes: kernel%{_alt_kernel}-isdn-mISDN
361 Obsoletes: kernel-misc-acer_acpi
362 Obsoletes: kernel-misc-fuse
363 Obsoletes: kernel-misc-uvc
364 Obsoletes: kernel-modules
365 Obsoletes: kernel-net-ar81
366 Obsoletes: kernel-net-hostap
367 Obsoletes: kernel-net-ieee80211
368 Obsoletes: kernel-net-ipp2p
369 Obsoletes: kernel-net-rt61
370 Obsoletes: kernel-smp
371 Conflicts: e2fsprogs < 1.29
372 Conflicts: isdn4k-utils < 3.1pre1
373 Conflicts: jfsutils < 1.1.3
374 Conflicts: module-init-tools < 0.9.10
375 Conflicts: nfs-utils < 1.0.5
376 Conflicts: oprofile < 0.9
377 Conflicts: ppp < 1:2.4.0
378 Conflicts: procps < 3.2.0
379 Conflicts: quota-tools < 3.09
380 %if %{with reiserfs4}
381 Conflicts: reiser4progs < 1.0.0
383 Conflicts: reiserfsprogs < 3.6.3
384 Conflicts: udev < 1:081
385 Conflicts: util-linux < 2.10o
386 Conflicts: util-vserver < 0.30.216
387 Conflicts: xfsprogs < 2.6.0
389 ExcludeArch: i386 i486 i586
391 ExclusiveArch: %{ix86} %{x8664} alpha arm ia64 ppc ppc64 sparc sparc64
394 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
396 %ifarch %{ix86} %{x8664}
397 %define target_arch_dir x86
400 %define target_arch_dir powerpc
402 %ifarch sparc sparc64
403 %define target_arch_dir sparc
405 %ifnarch %{ix86} %{x8664} ppc ppc64 sparc sparc64
406 %define target_arch_dir %{_target_base_arch}
409 %define defconfig arch/%{target_arch_dir}/defconfig
411 # No ELF objects there to strip (skips processing 27k files)
412 %define _noautostrip \\(.*%{_kernelsrcdir}/.*\\|.*/vmlinux.*\\)
413 %define _noautochrpath .*%{_kernelsrcdir}/.*
416 %define initrd_dir /boot/efi
418 %define initrd_dir /boot
421 %define topdir %{_builddir}/%{name}-%{version}
422 %define srcdir %{topdir}/linux-%{basever}
423 %define objdir %{topdir}/%{targetobj}
424 %define targetobj %{_target_base_arch}-gcc-%(%{kgcc} -dumpversion)
426 %define _kernelsrcdir /usr/src/linux%{_alt_kernel}-%{version}
428 %if "%{_target_base_arch}" != "%{_arch}"
429 %define CrossOpts ARCH=%{_target_base_arch} CROSS_COMPILE=%{_target_cpu}-pld-linux-
430 %define DepMod /bin/true
432 %if "%{_arch}" == "sparc" && "%{_target_base_arch}" == "sparc64"
433 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
434 %define DepMod /sbin/depmod
437 %if "%{_arch}" == "sparc64" && "%{_target_base_arch}" == "sparc"
438 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
439 %define DepMod /sbin/depmod
442 %if "%{_arch}" == "x86_64" && "%{_target_base_arch}" == "i386"
443 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
444 %define DepMod /sbin/depmod
447 %if "%{_target_base_arch}" == "ppc" || "%{_target_base_arch}" == "ppc64"
448 %define CrossOpts ARCH=powerpc CROSS_COMPILE=%{_target_cpu}-pld-linux-
452 %define CrossOpts ARCH=powerpc CC="%{__cc}"
454 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
456 %define DepMod /sbin/depmod
458 %define MakeOpts %{CrossOpts} HOSTCC="%{__cc}"
460 %define __features Netfilter module dated: %{netfilter_snap}\
461 %{?with_grsec_full:Grsecurity support - enabled}\
462 %{?with_grsec_minimal:Grsecurity minimal support /proc,link,fifo,shm/ - enabled}\
463 %{?with_pax:PaX support - enabled}\
464 %{?with_fbcondecor:Fbsplash/fbcondecor - enabled }\
465 %{?with_nfsroot:Root on NFS - enabled}\
466 %{?with_apparmor:apparmor support - enabled}\
468 %define Features %(echo "%{__features}" | sed '/^$/d')
471 This package contains the Linux kernel that is used to boot and run
472 your system. It contains few device drivers for specific hardware.
473 Most hardware is instead supported by modules loaded after booting.
477 %description -l de.UTF-8
478 Das Kernel-Paket enthält den Linux-Kernel (vmlinuz), den Kern des
479 Linux-Betriebssystems. Der Kernel ist für grundliegende
480 Systemfunktionen verantwortlich: Speicherreservierung,
481 Prozeß-Management, Geräte Ein- und Ausgaben, usw.
485 %description -l fr.UTF-8
486 Le package kernel contient le kernel linux (vmlinuz), la partie
487 centrale d'un système d'exploitation Linux. Le noyau traite les
488 fonctions basiques d'un système d'exploitation: allocation mémoire,
489 allocation de process, entrée/sortie de peripheriques, etc.
493 %description -l pl.UTF-8
494 Pakiet zawiera jądro Linuksa niezbędne do prawidłowego działania
495 Twojego komputera. Zawiera w sobie sterowniki do sprzętu znajdującego
496 się w komputerze, takiego jak sterowniki dysków itp.
501 Summary: vmlinux - uncompressed kernel image
502 Summary(de.UTF-8): vmlinux - dekompressiertes Kernel Bild
503 Summary(pl.UTF-8): vmlinux - rozpakowany obraz jÄ…dra
505 Obsoletes: kernel-smp-vmlinux
508 vmlinux - uncompressed kernel image.
510 %description vmlinux -l de.UTF-8
511 vmlinux - dekompressiertes Kernel Bild.
513 %description vmlinux -l pl.UTF-8
514 vmlinux - rozpakowany obraz jÄ…dra.
517 Summary: DRM kernel modules
518 Summary(de.UTF-8): DRM Kernel Treiber
519 Summary(pl.UTF-8): Sterowniki DRM
521 Requires(postun): %{name} = %{epoch}:%{version}-%{release}
522 Requires: %{name} = %{epoch}:%{version}-%{release}
523 Obsoletes: kernel-smp-drm
529 %description drm -l de.UTF-8
532 %description drm -l pl.UTF-8
536 Summary: PCMCIA modules
537 Summary(de.UTF-8): PCMCIA Module
538 Summary(pl.UTF-8): Moduły PCMCIA
540 Requires(postun): %{name} = %{epoch}:%{version}-%{release}
541 Requires: %{name} = %{epoch}:%{version}-%{release}
542 Obsoletes: kernel-smp-pcmcia
543 Conflicts: pcmcia-cs < 3.1.21
544 Conflicts: pcmciautils < 004
550 %description pcmcia -l de.UTF-8
553 %description pcmcia -l pl.UTF-8
557 Summary: Firmware files used by the Linux kernel
559 # This is... complicated.
560 # Look at the WHENCE file.
561 License: GPL+ and GPLv2+ and MIT and Redistributable, no modification permitted
563 %description firmware
564 Kernel-firmware includes firmware files required for some devices to
568 Summary: ALSA kernel modules
569 Summary(de.UTF-8): ALSA Kernel Module
570 Summary(pl.UTF-8): Sterowniki dźwięku ALSA
572 Requires(postun): %{name} = %{epoch}:%{version}-%{release}
573 Requires: %{name} = %{epoch}:%{version}-%{release}
574 Obsoletes: kernel-smp-sound-alsa
577 %description sound-alsa
578 ALSA (Advanced Linux Sound Architecture) sound drivers.
580 %description sound-alsa -l de.UTF-8
581 ALSA (Advanced Linux Sound Architecture) Sound-Treiber.
583 %description sound-alsa -l pl.UTF-8
584 Sterowniki dźwięku ALSA (Advanced Linux Sound Architecture).
587 Summary: OSS kernel modules
588 Summary(de.UTF-8): OSS Kernel Module
589 Summary(pl.UTF-8): Sterowniki dźwięku OSS
591 Requires(postun): %{name} = %{epoch}:%{version}-%{release}
592 Requires: %{name} = %{epoch}:%{version}-%{release}
593 Obsoletes: kernel-smp-sound-oss
596 %description sound-oss
597 OSS (Open Sound System) drivers.
599 %description sound-oss -l de.UTF-8
600 OSS (Open Sound System) Treiber.
602 %description sound-oss -l pl.UTF-8
603 Sterowniki dźwięku OSS (Open Sound System).
606 Summary: Header files for the Linux kernel
607 Summary(de.UTF-8): Header Dateien für den Linux-Kernel
608 Summary(pl.UTF-8): Pliki nagłówkowe jądra Linuksa
609 Group: Development/Building
610 Provides: %{name}-headers(netfilter) = %{netfilter_snap}
614 These are the C header files for the Linux kernel, which define
615 structures and constants that are needed when rebuilding the kernel or
616 building kernel modules.
618 %description headers -l de.UTF-8
619 Dies sind die C Header Dateien für den Linux-Kernel, die definierte
620 Strukturen und Konstante beinhalten, die beim rekompilieren des
621 Kernels oder bei Kernel Modul kompilationen gebraucht werden.
623 %description headers -l pl.UTF-8
624 Pakiet zawiera pliki nagłówkowe jądra, niezbędne do rekompilacji jądra
625 oraz budowania modułów jądra.
627 %package module-build
628 Summary: Development files for building kernel modules
629 Summary(de.UTF-8): Development Dateien die beim Kernel Modul kompilationen gebraucht werden
630 Summary(pl.UTF-8): Pliki służące do budowania modułów jądra
631 Group: Development/Building
632 Requires: %{name}-headers = %{epoch}:%{version}-%{release}
633 Conflicts: rpmbuild(macros) < 1.321
636 %description module-build
637 Development files from kernel source tree needed to build Linux kernel
638 modules from external packages.
640 %description module-build -l de.UTF-8
641 Development Dateien des Linux-Kernels die beim kompilieren externer
642 Kernel Module gebraucht werden.
644 %description module-build -l pl.UTF-8
645 Pliki ze drzewa źródeł jądra potrzebne do budowania modułów jądra
646 Linuksa z zewnętrznych pakietów.
649 Summary: Kernel source tree
650 Summary(de.UTF-8): Der Kernel Quelltext
651 Summary(pl.UTF-8): Kod źródłowy jądra Linuksa
652 Group: Development/Building
653 Requires: %{name}-module-build = %{epoch}:%{version}-%{release}
657 This is the source code for the Linux kernel. You can build a custom
658 kernel that is better tuned to your particular hardware.
660 %description source -l de.UTF-8
661 Das Kernel-Source-Paket enthält den source code (C/Assembler-Code) des
662 Linux-Kernels. Die Source-Dateien werden gebraucht, um viele
663 C-Programme zu kompilieren, da sie auf Konstanten zurückgreifen, die
664 im Kernel-Source definiert sind. Die Source-Dateien können auch
665 benutzt werden, um einen Kernel zu kompilieren, der besser auf Ihre
666 Hardware ausgerichtet ist.
668 %description source -l fr.UTF-8
669 Le package pour le kernel-source contient le code source pour le noyau
670 linux. Ces sources sont nécessaires pour compiler la plupart des
671 programmes C, car il dépend de constantes définies dans le code
672 source. Les sources peuvent être aussi utilisée pour compiler un noyau
673 personnalisé pour avoir de meilleures performances sur des matériels
676 %description source -l pl.UTF-8
677 Pakiet zawiera kod źródłowy jądra systemu.
680 Summary: Kernel documentation
681 Summary(de.UTF-8): Kernel Dokumentation
682 Summary(pl.UTF-8): Dokumentacja do jÄ…dra Linuksa
687 This is the documentation for the Linux kernel, as found in
688 /usr/src/linux/Documentation directory.
690 %description doc -l de.UTF-8
691 Dies ist die Kernel Dokumentation wie sie im 'Documentation'
692 Verzeichniss vorgefunden werden kann.
694 %description doc -l pl.UTF-8
695 Pakiet zawiera dokumentacjÄ™ do jÄ…dra Linuksa pochodzÄ…cÄ… z katalogu
696 /usr/src/linux/Documentation.
700 ln -s %{SOURCE7} kernel-module-build.pl
701 ln -s %{SOURCE10} Makefile
704 # hack against warning in pax/grsec
705 sed -i 's/-Werror//' arch/alpha/kernel/Makefile
707 %if "%{postver}" != "%{nil}"
708 %{__bzip2} -dc %{SOURCE1} | patch -p1 -s
717 # tahoe9xx: 2.6.29 - need update
720 %if %{with fbcondecor}
728 # kernel-pom-ng-IPV4OPTSSTRIP.patch
731 # kernel-pom-ng-ipv4options.patch
734 # kernel-pom-ng-ROUTE.patch
737 # kernel-pom-ng-mms-conntrack-nat.patch
740 # kernel-pom-ng-rsh.patch
743 # kernel-pom-ng-rpc.patch
746 # kernel-nf_rtsp.patch
749 # kernel-owner-xid.patch
754 # kernel-ipt_account.patch
757 # kernel-ipt_ACCOUNT.patch
760 # kernel-layer7.patch
796 # kernel-rndis_host-wm5.patch
799 # hostap enhancements from/for aircrack-ng
802 # LSI MPT Fusion driver update (by LSI via SUSE folks)
815 # unionfs (problems with aufs2, needed for aufs1 patch)
816 %if %{without rescuecd}
835 # grsecurity & pax stuff
838 # remember that we have the same config file for grsec_minimal and
839 # grsec_full, but the patches are different.
841 %if %{with grsecurity}
842 %if %{with grsec_minimal}
845 # grsec_full and/or pax
847 %{?with_vserver:%patch10000 -p1}
848 %{?with_vserver:%patch10001 -p1}
849 %{?with_vserver:%patch10002 -p1}
853 # end of grsecurity & pax stuff
877 # Fix EXTRAVERSION in main Makefile
878 sed -i 's#EXTRAVERSION =.*#EXTRAVERSION = %{postver}%{?alt_kernel:_%{alt_kernel}}#g' Makefile
880 # cleanup backups after patching
881 find '(' -name '*~' -o -name '*.orig' -o -name '.gitignore' ')' -print0 | xargs -0 -r -l512 rm -f
885 cat > %{targetobj}.mk <<'EOF'
886 # generated by %{name}.spec
887 KERNELSRC := %{_builddir}/%{name}-%{version}/linux-%{basever}
888 KERNELOUTPUT := %{objdir}
890 SRCARCH := %{target_arch_dir}
891 ARCH := %{_target_base_arch}
892 Q := %{!?with_verbose:@}
893 MAKE_OPTS := %{MakeOpts}
894 DEFCONFIG := %{defconfig}
901 CONFIG_PAX_SEGMEXEC=y
902 # performance impact on CPUs without NX bit
903 CONFIG_PAX_PAGEEXEC=n
906 CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM=n
912 CONFIG_PAX_NOELFRELOCS=n
915 CONFIG_PAX_EMUTRAMP=y
916 CONFIG_PAX_EMUSIGRT=y
920 %ifarch sparc sparc64 alpha
924 # Now we have to check MAC system integration. Grsecurity (full) uses PAX_HAVE_ACL_FLAGS
925 # setting (direct acces). grsec_minimal probably have no idea about PaX so we probably
926 # could use PAX_NO_ACL_FLAGS, but for testing the hooks setting will be used
927 # PAX_HOOK_ACL_FLAGS.
929 %if %{with grsec_full}
930 # Hardening grsec options if with pax
931 CONFIG_GRKERNSEC_PROC_MEMMAP=y
932 # almost rational (see HIDESYM help)
933 CONFIG_GRKERNSEC_HIDESYM=y
935 # no change needed CONFIG=PAX_HAVE_ACL_FLAGS=y is taken from the kernel-pax.config
937 CONFIG_PAX_HAVE_ACL_FLAGS=n
938 CONFIG_PAX_HOOK_ACL_FLAGS=y
948 # CONFIG_SOUND is not set
949 # CONFIG_AUDIT is not set
950 # CONFIG_TR is not set
951 # CONFIG_BT is not set
952 # CONFIG_VIDEO_DEV is not set
953 # CONFIG_DVB_CORE is not set
954 # CONFIG_HAMRADIO is not set
955 # CONFIG_ARCNET is not set
956 # CONFIG_FB is not set
957 # CONFIG_DRM is not set
958 # CONFIG_WATCHDOG is not set
959 # CONFIG_INPUT_JOYSTICK is not set
960 # CONFIG_DEBUG_KERNEL is not set
961 # CONFIG_ISDN is not set
962 # CONFIG_AGP is not set
963 # CONFIG_SECURITY is not set
964 # CONFIG_PARIDE is not set
965 # CONFIG_CPU_FREQ is not set
966 # CONFIG_GAMEPORT is not set
967 # CONFIG_KVM is not set
968 # CONFIG_PHONE is not set
969 # CONFIG_STRICT_DEVMEM is not set
970 # CONFIG_IMA is not set
973 CONFIG_AUFS_BR_RAMFS=y
975 CONFIG_BLK_DEV_LOOP=y
987 Config="kernel-%{target_arch_dir}.config"
988 echo >&2 "Building config file for %{_target_cpu} using $Config et al."
990 # prepare local and important options
991 cat <<-EOCONFIG > important.config
992 LOCALVERSION="-%{localversion}"
996 CONFIG_DEBUG_SLAB_LEAK=y
997 CONFIG_DEBUG_PREEMPT=y
998 CONFIG_RT_DEADLOCK_DETECT=y
1001 # apparmor, will be moved to external file if works
1002 %if %{with apparmor}
1003 CONFIG_SECURITY_APPARMOR=y
1004 CONFIG_SECURITY_APPARMOR_BOOTPARAM_VALUE=1
1005 CONFIG_SECURITY_APPARMOR_DISABLE=n
1006 CONFIG_SECURITY_APPARMOR_NETWORK=y
1013 %ifarch i686 athlon pentium3 pentium4
1022 %if %{without pcmcia}
1026 %if %{with fbcondecor}
1030 CONFIG_FB_TILEBLITTING=n
1031 CONFIG_FB_CON_DECOR=y
1039 # Temporary disabled RELOCATABLE. Needed only on x86??
1040 %if %{with pax} || %{with grsec_full}
1041 CONFIG_RELOCATABLE=n
1045 %if %{with rescuecd}
1046 RescueConfig rescue.config
1049 PaXconfig pax.config
1052 # prepare kernel-style config file from multiple config files
1053 %{__awk} -v arch="all %{target_arch_dir} %{_target_base_arch} %{_target_cpu}" -f %{SOURCE6} \
1055 $RPM_SOURCE_DIR/kernel-%{alt_kernel}.config \
1058 %if %{with rescuecd}
1069 %if %{with grsec_full}
1073 %if %{with grsec_minimal}
1091 %if %{with tuxonice}
1092 %ifarch %{ix86} %{x8664} ia64 ppc ppc64
1096 %{SOURCE40} %{?0:netfilter} \
1097 %{SOURCE41} %{?0:patches} \
1099 $RPM_SOURCE_DIR/$Config
1103 install -d arch/%{target_arch_dir}
1104 BuildConfig > %{defconfig}
1105 ln -sf %{defconfig} .config
1109 TARGETOBJ=%{targetobj} \
1110 %{?with_verbose:V=1} \
1113 %{__awk} %{?debug:-v dieOnError=1} -v infile=%{objdir}/%{defconfig} -f %{SOURCE8} %{objdir}/.config
1117 TARGETOBJ=%{targetobj} \
1118 %{?with_verbose:V=1} \
1122 rm -rf $RPM_BUILD_ROOT
1123 %{__make} %{MakeOpts} %{!?with_verbose:-s} modules_install firmware_install \
1125 %{?with_verbose:V=1} \
1127 INSTALL_MOD_PATH=$RPM_BUILD_ROOT \
1128 INSTALL_FW_PATH=$RPM_BUILD_ROOT/lib/firmware/%{kernel_release} \
1129 KERNELRELEASE=%{kernel_release}
1131 install -d $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/misc
1133 # create directories which may be missing, to simplyfy %files
1134 install -d $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/kernel/{arch,sound,mm}
1136 # rpm obeys filelinkto checks for ghosted symlinks, convert to files
1137 rm -f $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/{build,source}
1138 touch $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/{build,source}
1140 # no point embed content for %ghost files. empty them
1145 {pci,usb,ccw,isapnp,input,ieee1394,serio,of}map \
1147 > $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/modules.$a
1151 install -d $RPM_BUILD_ROOT/boot
1152 cp -a %{objdir}/System.map $RPM_BUILD_ROOT/boot/System.map-%{kernel_release}
1153 %ifarch %{ix86} %{x8664}
1154 cp -a %{objdir}/arch/%{target_arch_dir}/boot/bzImage $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release}
1155 install %{objdir}/vmlinux $RPM_BUILD_ROOT/boot/vmlinux-%{kernel_release}
1158 install %{objdir}/vmlinux $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release}
1159 install %{objdir}/vmlinux $RPM_BUILD_ROOT/boot/vmlinux-%{kernel_release}
1162 %{__gzip} -cfv %{objdir}/vmlinux > %{objdir}/vmlinuz
1163 cp -a %{objdir}/vmlinuz $RPM_BUILD_ROOT/boot/efi/vmlinuz-%{kernel_release}
1164 ln -sf efi/vmlinuz-%{kernel_release} $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release}
1166 %ifarch alpha sparc sparc64
1167 %{__gzip} -cfv %{objdir}/vmlinux > %{objdir}/vmlinuz
1168 cp -a %{objdir}/vmlinuz $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release}
1169 install %{objdir}/vmlinux $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release}
1171 elftoaout %{objdir}/arch/sparc/boot/image -o %{objdir}/vmlinux.aout
1172 install %{objdir}/vmlinux.aout $RPM_BUILD_ROOT/boot/vmlinux.aout-%{kernel_release}
1175 elftoaout %{objdir}/arch/sparc64/boot/image -o %{objdir}/vmlinux.aout
1176 install %{objdir}/vmlinux.aout $RPM_BUILD_ROOT/boot/vmlinux.aout-%{kernel_release}
1179 install %{objdir}/arch/arm/boot/zImage $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release}
1184 touch $RPM_BUILD_ROOT%{initrd_dir}/initrd-%{kernel_release}.gz
1186 %if "%{_target_base_arch}" != "%{_arch}"
1187 touch $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/modules.dep
1191 install -d $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/%{kernel_release}
1194 install -d $RPM_BUILD_ROOT%{_kernelsrcdir}
1195 # test if we can hardlink -- %{_builddir} and $RPM_BUILD_ROOT on same partition
1196 if cp -al %{srcdir}/COPYING $RPM_BUILD_ROOT/COPYING 2>/dev/null; then
1198 rm -f $RPM_BUILD_ROOT/COPYING
1201 cp -a$l %{srcdir}/* $RPM_BUILD_ROOT%{_kernelsrcdir}
1202 cp -a %{objdir}/Module.symvers $RPM_BUILD_ROOT%{_kernelsrcdir}/Module.symvers-dist
1203 cp -aL %{objdir}/.config $RPM_BUILD_ROOT%{_kernelsrcdir}/config-dist
1204 cp -a %{objdir}/include/linux/autoconf.h $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux/autoconf-dist.h
1205 cp -a %{objdir}/include/linux/{utsrelease,version}.h $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux
1206 cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux/autoconf.h
1207 cp -a %{SOURCE4} $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux/config.h
1209 # collect module-build files and directories
1210 # Usage: kernel-module-build.pl $rpmdir $fileoutdir
1212 cd $RPM_BUILD_ROOT%{_kernelsrcdir}
1213 %{__perl} %{topdir}/kernel-module-build.pl %{_kernelsrcdir} $fileoutdir
1216 # move to %{_docdir} so we wouldn't depend on any kernel package for dirs
1217 install -d $RPM_BUILD_ROOT%{_docdir}
1218 mv $RPM_BUILD_ROOT{%{_kernelsrcdir}/Documentation,%{_docdir}/%{name}-%{version}}
1220 rm -f $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/dontdiff
1221 rm -f $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/Makefile
1222 rm -f $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/*/Makefile
1223 rm -f $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/*/*/Makefile
1226 rm -rf $RPM_BUILD_ROOT
1229 if [ -x /sbin/new-kernel-pkg ]; then
1230 /sbin/new-kernel-pkg --remove %{kernel_release}
1235 mv -f /boot/efi/vmlinuz{,.old} 2> /dev/null
1236 %{?alt_kernel:mv -f /boot/efi/vmlinuz%{_alt_kernel}{,.old} 2> /dev/null}
1237 ln -sf vmlinuz-%{kernel_release} /boot/efi/vmlinuz
1238 %{?alt_kernel:ln -sf vmlinuz-%{kernel_release} /boot/efi/vmlinuz%{_alt_kernel}}
1240 mv -f /boot/vmlinuz{,.old} 2> /dev/null
1241 %{?alt_kernel:mv -f /boot/vmlinuz%{_alt_kernel}{,.old} 2> /dev/null}
1242 mv -f /boot/System.map{,.old} 2> /dev/null
1243 %{?alt_kernel:mv -f /boot/System%{_alt_kernel}.map{,.old} 2> /dev/null}
1244 ln -sf vmlinuz-%{kernel_release} /boot/vmlinuz
1245 %{?alt_kernel:ln -sf vmlinuz-%{kernel_release} /boot/vmlinuz%{_alt_kernel}}
1246 ln -sf System.map-%{kernel_release} /boot/System.map
1247 %{?alt_kernel:ln -sf System.map-%{kernel_release} /boot/System.map%{_alt_kernel}}
1249 %depmod %{kernel_release}
1251 /sbin/geninitrd -f --initrdfs=rom %{initrd_dir}/initrd-%{kernel_release}.gz %{kernel_release}
1252 mv -f %{initrd_dir}/initrd{,.old} 2> /dev/null
1253 %{?alt_kernel:mv -f %{initrd_dir}/initrd%{_alt_kernel}{,.old} 2> /dev/null}
1254 ln -sf initrd-%{kernel_release}.gz %{initrd_dir}/initrd
1255 %{?alt_kernel:ln -sf initrd-%{kernel_release}.gz %{initrd_dir}/initrd%{_alt_kernel}}
1257 if [ -x /sbin/update-grub ]; then
1258 /sbin/update-grub >/dev/null 2>&1
1260 if [ -x /sbin/new-kernel-pkg ]; then
1261 /sbin/new-kernel-pkg --initrdfile=%{initrd_dir}/initrd-%{kernel_release}.gz --install %{kernel_release} --banner "PLD Linux (%{pld_release})%{?alt_kernel: / %{alt_kernel}}"
1263 if [ -x /sbin/rc-boot ]; then
1264 /sbin/rc-boot 1>&2 || :
1268 mv -f /boot/vmlinux{,.old} 2> /dev/null
1269 %{?alt_kernel:mv -f /boot/vmlinux-%{alt_kernel}{,.old} 2> /dev/null}
1270 ln -sf vmlinux-%{kernel_release} /boot/vmlinux
1271 %{?alt_kernel:ln -sf vmlinux-%{kernel_release} /boot/vmlinux-%{alt_kernel}}
1274 %depmod %{kernel_release}
1277 %depmod %{kernel_release}
1280 %depmod %{kernel_release}
1283 %depmod %{kernel_release}
1286 %depmod %{kernel_release}
1289 %depmod %{kernel_release}
1292 %depmod %{kernel_release}
1295 %depmod %{kernel_release}
1298 ln -snf %{basename:%{_kernelsrcdir}} %{_prefix}/src/linux%{_alt_kernel}
1301 if [ "$1" = "0" ]; then
1302 if [ -L %{_prefix}/src/linux%{_alt_kernel} ]; then
1303 if [ "$(readlink %{_prefix}/src/linux%{_alt_kernel})" = "linux%{_alt_kernel}-%{version}" ]; then
1304 rm -f %{_prefix}/src/linux%{_alt_kernel}
1309 %triggerin module-build -- %{name} = %{epoch}:%{version}-%{release}
1310 ln -sfn %{_kernelsrcdir} /lib/modules/%{kernel_release}/build
1311 ln -sfn %{_kernelsrcdir} /lib/modules/%{kernel_release}/source
1313 %triggerun module-build -- %{name} = %{epoch}:%{version}-%{release}
1314 if [ "$1" = 0 ]; then
1315 rm -f /lib/modules/%{kernel_release}/{build,source}
1319 %defattr(644,root,root,755)
1320 %ifarch sparc sparc64
1321 /boot/vmlinux.aout-%{kernel_release}
1324 /boot/efi/vmlinuz-%{kernel_release}
1326 /boot/vmlinuz-%{kernel_release}
1327 /boot/System.map-%{kernel_release}
1328 %ghost %{initrd_dir}/initrd-%{kernel_release}.gz
1330 %dir /lib/modules/%{kernel_release}
1331 %dir /lib/modules/%{kernel_release}/kernel
1332 /lib/modules/%{kernel_release}/kernel/arch
1333 /lib/modules/%{kernel_release}/kernel/crypto
1334 /lib/modules/%{kernel_release}/kernel/drivers
1336 %exclude /lib/modules/%{kernel_release}/kernel/drivers/gpu
1338 /lib/modules/%{kernel_release}/kernel/fs
1339 /lib/modules/%{kernel_release}/kernel/kernel
1340 /lib/modules/%{kernel_release}/kernel/lib
1341 /lib/modules/%{kernel_release}/kernel/net
1342 /lib/modules/%{kernel_release}/kernel/mm
1344 %dir /lib/modules/%{kernel_release}/kernel/sound
1345 /lib/modules/%{kernel_release}/kernel/sound/ac97_bus.ko*
1346 /lib/modules/%{kernel_release}/kernel/sound/sound*.ko*
1348 %exclude /lib/modules/%{kernel_release}/kernel/drivers/media/video/cx88/cx88-alsa.ko*
1349 %exclude /lib/modules/%{kernel_release}/kernel/drivers/media/video/em28xx/em28xx-alsa.ko*
1350 %exclude /lib/modules/%{kernel_release}/kernel/drivers/media/video/saa7134/saa7134-alsa.ko*
1353 %dir /lib/modules/%{kernel_release}/misc
1355 %exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/[!p]*
1356 %exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/pd6729.ko*
1357 %exclude /lib/modules/%{kernel_release}/kernel/drivers/*/pcmcia
1358 %if %{without rescuecd}
1359 %exclude /lib/modules/%{kernel_release}/kernel/drivers/ata/pata_pcmcia.ko*
1360 %exclude /lib/modules/%{kernel_release}/kernel/drivers/bluetooth/*_cs.ko*
1361 %exclude /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/avm_cs.ko*
1362 %exclude /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/b1pcmcia.ko*
1363 %exclude /lib/modules/%{kernel_release}/kernel/drivers/telephony/ixj_pcmcia.ko*
1364 %exclude /lib/modules/%{kernel_release}/kernel/drivers/usb/gadget/g_midi.ko*
1366 %exclude /lib/modules/%{kernel_release}/kernel/drivers/ide/ide-cs.ko*
1367 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/*_cs.ko*
1368 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/b43
1369 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/hostap/hostap_cs.ko*
1370 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/libertas/*_cs.ko*
1371 %exclude /lib/modules/%{kernel_release}/kernel/drivers/parport/parport_cs.ko*
1372 %exclude /lib/modules/%{kernel_release}/kernel/drivers/serial/serial_cs.ko*
1373 %exclude /lib/modules/%{kernel_release}/kernel/drivers/usb/host/sl811_cs.ko*
1376 /lib/modules/%{kernel_release}/kernel/sound
1379 %dir %{_sysconfdir}/modprobe.d/%{kernel_release}
1382 /lib/modules/%{kernel_release}/modules.order
1384 # rest modules.* are ghost (regenerated by post depmod -a invocation)
1385 %ghost /lib/modules/%{kernel_release}/modules.alias
1386 %ghost /lib/modules/%{kernel_release}/modules.alias.bin
1387 %ghost /lib/modules/%{kernel_release}/modules.ccwmap
1388 %ghost /lib/modules/%{kernel_release}/modules.dep
1389 %ghost /lib/modules/%{kernel_release}/modules.dep.bin
1390 %ghost /lib/modules/%{kernel_release}/modules.ieee1394map
1391 %ghost /lib/modules/%{kernel_release}/modules.inputmap
1392 %ghost /lib/modules/%{kernel_release}/modules.isapnpmap
1393 %ghost /lib/modules/%{kernel_release}/modules.ofmap
1394 %ghost /lib/modules/%{kernel_release}/modules.pcimap
1395 %ghost /lib/modules/%{kernel_release}/modules.seriomap
1396 %ghost /lib/modules/%{kernel_release}/modules.symbols
1397 %ghost /lib/modules/%{kernel_release}/modules.symbols.bin
1398 %ghost /lib/modules/%{kernel_release}/modules.usbmap
1400 # symlinks pointing to kernelsrcdir
1401 %ghost /lib/modules/%{kernel_release}/build
1402 %ghost /lib/modules/%{kernel_release}/source
1404 %ifarch alpha %{ix86} %{x8664} ppc ppc64 sparc sparc64
1406 %defattr(644,root,root,755)
1407 /boot/vmlinux-%{kernel_release}
1411 %defattr(644,root,root,755)
1412 #%doc Documentation/WHENCE
1413 /lib/firmware/%{kernel_release}
1417 %defattr(644,root,root,755)
1418 /lib/modules/%{kernel_release}/kernel/drivers/gpu
1423 %defattr(644,root,root,755)
1424 /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/*ko*
1425 /lib/modules/%{kernel_release}/kernel/drivers/*/pcmcia
1426 %exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/pcmcia*ko*
1427 %if %{without rescuecd}
1428 /lib/modules/%{kernel_release}/kernel/drivers/bluetooth/*_cs.ko*
1429 /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/avm_cs.ko*
1430 /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/b1pcmcia.ko*
1431 /lib/modules/%{kernel_release}/kernel/drivers/telephony/ixj_pcmcia.ko*
1433 /lib/modules/%{kernel_release}/kernel/drivers/ata/pata_pcmcia.ko*
1434 /lib/modules/%{kernel_release}/kernel/drivers/ide/ide-cs.ko*
1435 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/*_cs.ko*
1436 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/b43
1437 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/hostap/hostap_cs.ko*
1438 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/libertas/*_cs.ko*
1439 /lib/modules/%{kernel_release}/kernel/drivers/parport/parport_cs.ko*
1440 /lib/modules/%{kernel_release}/kernel/drivers/serial/serial_cs.ko*
1441 /lib/modules/%{kernel_release}/kernel/drivers/usb/host/sl811_cs.ko*
1446 %defattr(644,root,root,755)
1447 /lib/modules/%{kernel_release}/kernel/sound
1448 %exclude %dir /lib/modules/%{kernel_release}/kernel/sound
1449 %exclude /lib/modules/%{kernel_release}/kernel/sound/ac97_bus.ko*
1450 %exclude /lib/modules/%{kernel_release}/kernel/sound/sound*.ko*
1452 %exclude /lib/modules/%{kernel_release}/kernel/sound/oss
1455 /lib/modules/%{kernel_release}/kernel/drivers/usb/gadget/g_midi.ko*
1456 /lib/modules/%{kernel_release}/kernel/drivers/media/video/cx88/cx88-alsa.ko*
1457 /lib/modules/%{kernel_release}/kernel/drivers/media/video/em28xx/em28xx-alsa.ko*
1458 /lib/modules/%{kernel_release}/kernel/drivers/media/video/saa7134/saa7134-alsa.ko*
1463 %defattr(644,root,root,755)
1464 /lib/modules/%{kernel_release}/kernel/sound/oss
1468 %files headers -f files.headers_exclude_kbuild
1469 %defattr(644,root,root,755)
1470 %dir %{_kernelsrcdir}
1471 %{_kernelsrcdir}/include
1472 %dir %{_kernelsrcdir}/arch
1473 %dir %{_kernelsrcdir}/arch/[!K]*
1474 %{_kernelsrcdir}/arch/*/include
1475 %dir %{_kernelsrcdir}/security
1476 %dir %{_kernelsrcdir}/security/selinux
1477 %{_kernelsrcdir}/security/selinux/include
1478 %{_kernelsrcdir}/config-dist
1479 %{_kernelsrcdir}/Module.symvers-dist
1481 %files module-build -f files.mb_include_modulebuild_and_dirs
1482 %defattr(644,root,root,755)
1484 %{_kernelsrcdir}/arch/powerpc/lib/crtsavres.*
1486 %exclude %dir %{_kernelsrcdir}/arch/m68knommu
1487 %exclude %dir %{_kernelsrcdir}/arch/um
1488 %{_kernelsrcdir}/arch/*/kernel/asm-offsets*
1489 %{_kernelsrcdir}/arch/*/kernel/sigframe*.h
1490 %{_kernelsrcdir}/drivers/lguest/lg.h
1491 %{_kernelsrcdir}/kernel/bounds.c
1492 %dir %{_kernelsrcdir}/scripts
1493 %{_kernelsrcdir}/scripts/Kbuild.include
1494 %{_kernelsrcdir}/scripts/Makefile*
1495 %{_kernelsrcdir}/scripts/basic
1496 %{_kernelsrcdir}/scripts/kconfig
1497 %{_kernelsrcdir}/scripts/mkcompile_h
1498 %{_kernelsrcdir}/scripts/mkmakefile
1499 %{_kernelsrcdir}/scripts/mod
1500 %{_kernelsrcdir}/scripts/module-common.lds
1501 %{_kernelsrcdir}/scripts/setlocalversion
1502 %{_kernelsrcdir}/scripts/*.c
1503 %{_kernelsrcdir}/scripts/*.sh
1504 %dir %{_kernelsrcdir}/scripts/selinux
1505 %{_kernelsrcdir}/scripts/selinux/Makefile
1506 %dir %{_kernelsrcdir}/scripts/selinux/mdp
1507 %{_kernelsrcdir}/scripts/selinux/mdp/Makefile
1508 %{_kernelsrcdir}/scripts/selinux/mdp/*.c
1509 %exclude %dir %{_kernelsrcdir}/security
1510 %exclude %dir %{_kernelsrcdir}/security/selinux
1514 %defattr(644,root,root,755)
1515 %dir %{_docdir}/%{name}-%{version}
1517 %{_docdir}/%{name}-%{version}/[!jkz]*
1518 %{_docdir}/%{name}-%{version}/[jkz]*.txt
1519 %{_docdir}/%{name}-%{version}/kbuild
1520 %{_docdir}/%{name}-%{version}/kdump
1521 %{_docdir}/%{name}-%{version}/kvm
1522 %lang(ja) %{_docdir}/%{name}-%{version}/ja_JP
1523 %lang(ko) %{_docdir}/%{name}-%{version}/ko_KR
1524 %lang(zh_CN) %{_docdir}/%{name}-%{version}/zh_CN
1528 %files source -f files.source_exclude_modulebuild_and_dirs
1529 %defattr(644,root,root,755)
1530 %{_kernelsrcdir}/arch/*/[!Mik]*
1531 %{_kernelsrcdir}/arch/*/kernel/[!M]*
1532 %{_kernelsrcdir}/arch/ia64/ia32/[!M]*
1533 %{_kernelsrcdir}/arch/ia64/install.sh
1534 %{_kernelsrcdir}/arch/m68k/ifpsp060/[!M]*
1535 %{_kernelsrcdir}/arch/m68k/ifpsp060/MISC
1536 %{_kernelsrcdir}/arch/m68k/install.sh
1537 %{_kernelsrcdir}/arch/parisc/install.sh
1538 %{_kernelsrcdir}/arch/x86/ia32/[!M]*
1539 %{_kernelsrcdir}/arch/ia64/kvm
1540 %{_kernelsrcdir}/arch/powerpc/kvm
1542 %exclude %{_kernelsrcdir}/arch/powerpc/lib/crtsavres.*
1544 %{_kernelsrcdir}/arch/s390/kvm
1545 %{_kernelsrcdir}/arch/x86/kvm
1546 %exclude %{_kernelsrcdir}/arch/*/kernel/asm-offsets*
1547 %exclude %{_kernelsrcdir}/arch/*/kernel/sigframe*.h
1548 %exclude %{_kernelsrcdir}/drivers/lguest/lg.h
1549 %{_kernelsrcdir}/block
1550 %{_kernelsrcdir}/crypto
1551 %{_kernelsrcdir}/drivers
1552 %{_kernelsrcdir}/firmware
1554 %if %{with grsecurity} && %{without rescuecd}
1555 %{_kernelsrcdir}/grsecurity
1557 %{_kernelsrcdir}/init
1558 %{_kernelsrcdir}/ipc
1559 %{_kernelsrcdir}/kernel
1560 %exclude %{_kernelsrcdir}/kernel/bounds.c
1561 %{_kernelsrcdir}/lib
1563 %{_kernelsrcdir}/net
1564 %{_kernelsrcdir}/virt
1565 %{_kernelsrcdir}/samples
1566 %{_kernelsrcdir}/scripts/*
1567 %exclude %{_kernelsrcdir}/scripts/Kbuild.include
1568 %exclude %{_kernelsrcdir}/scripts/Makefile*
1569 %exclude %{_kernelsrcdir}/scripts/basic
1570 %exclude %{_kernelsrcdir}/scripts/kconfig
1571 %exclude %{_kernelsrcdir}/scripts/mkcompile_h
1572 %exclude %{_kernelsrcdir}/scripts/mkmakefile
1573 %exclude %{_kernelsrcdir}/scripts/mod
1574 %exclude %{_kernelsrcdir}/scripts/module-common.lds
1575 %exclude %{_kernelsrcdir}/scripts/setlocalversion
1576 %exclude %{_kernelsrcdir}/scripts/*.c
1577 %exclude %{_kernelsrcdir}/scripts/*.sh
1578 %exclude %dir %{_kernelsrcdir}/scripts/selinux
1579 %exclude %{_kernelsrcdir}/scripts/selinux/Makefile
1580 %exclude %dir %{_kernelsrcdir}/scripts/selinux/mdp
1581 %exclude %{_kernelsrcdir}/scripts/selinux/mdp/Makefile
1582 %exclude %{_kernelsrcdir}/scripts/selinux/mdp/*.c
1583 %{_kernelsrcdir}/sound
1584 %{_kernelsrcdir}/security
1585 %exclude %{_kernelsrcdir}/security/selinux/include
1586 %{_kernelsrcdir}/tools
1587 %{_kernelsrcdir}/usr
1588 %{_kernelsrcdir}/COPYING
1589 %{_kernelsrcdir}/CREDITS
1590 %{_kernelsrcdir}/MAINTAINERS
1591 %{_kernelsrcdir}/README
1592 %{_kernelsrcdir}/REPORTING-BUGS