3 # the following bcond combos will not work
4 # - without_vserver and any of the following
10 # - benchmark NO_HZ & HZ=1000 vs HZ=300 on i686
11 # - add a subpackage (kernel-firmware?) for ~35 firmware files
12 # - update or remove tahoe9xx patch2
13 # - update or remove mpt-fusion patch90
14 # - update grsec_minimal patch1000:
15 # fs/proc/base.c:1484: error: 'struct task_struct' has no member named 'uid'
17 # HOWTO update configuration files:
19 # - add new options to proper config (kernel-multiarch.config, kernel-x86.config, kernel-powerpc.config etc)
20 # - sort configuration files using:
21 # ./kernel-config-sort.pl ~/rpm/BUILD/kernel-%{version}/linux-%{version}/ -a x86 kernel-x86_84.config
22 # ./kernel-config-sort.pl ~/rpm/BUILD/kernel-%{version}/linux-%{version} kernel-multiarch.config
25 %bcond_without source # don't build kernel-source package
26 %bcond_without doc # don't build kernel-doc package
27 %bcond_without pcmcia # don't build pcmcia
29 %bcond_with verbose # verbose build (V=1)
30 %bcond_without reiser4 # support for reiser4 fs (experimental)
32 %bcond_without grsecurity # don't build grsecurity nor pax at all
33 %bcond_without grsec_full # build full grsecurity
34 %bcond_with grsec_minimal # build only minimal subset (proc,link,fifo,shm)
35 %bcond_with pax # build pax and full grsecurity (ie. grsec_full && pax)
37 %bcond_with fbcondecor # build fbcondecor (disable FB_TILEBLITTING and affected fb modules)
38 %bcond_with pae # build PAE (HIGHMEM64G) support on uniprocessor
39 %bcond_with nfsroot # build with root on NFS support
41 %bcond_without imq # imq support
42 %bcond_without wrr # wrr support
43 %bcond_without esfq # esfq support
44 %bcond_without ipv6 # ipv6 support
46 %bcond_without vserver # support for VServer (enabled by default)
47 %bcond_without tuxonice # support for tuxonice (ex-suspend2) (enabled by default)
48 %bcond_without apparmor # build kernel with apparmor (exerimental mix)
50 %bcond_with rescuecd # build kernel for our rescue
52 %bcond_with myown # build with your own config (kernel-myown.config)
54 %{?debug:%define with_verbose 1}
56 %if %{without grsecurity}
57 %unglobal with_grsec_full
58 %unglobal with_grsec_minimal
63 %unglobal with_grsec_minimal
64 %define with_grsec_full 1
65 %define with_grsecurity 1
69 %if %{with grsec_minimal}
71 %unglobal with_grsec_full
72 %define with_grsecurity 1
75 %if %{with grsec_full}
76 %unglobal with_grsec_minimal
77 %define with_grsecurity 1
86 %unglobal with_apparmor
87 %unglobal with_tuxonice
88 %unglobal with_grsecurity
89 %unglobal with_grsec_full
90 %unglobal with_grsec_minimal
92 %unglobal with_vserver
101 %define have_pcmcia 0
104 %ifarch sparc sparc64
105 %unglobal with_pcmcia
110 %if %{without pcmcia}
111 %define have_pcmcia 0
114 %define basever 2.6.32
118 %define _enable_debug_packages 0
120 %define tuxonice_version 3.0.1
121 %define netfilter_snap 20070806
124 %if "%{_alt_kernel}" == ""
125 %define alt_kernel myown
128 %if %{without rescuecd}
129 %define __alt_kernel %{?with_pax:pax}%{!?with_grsec_full:nogrsecurity}%{!?with_apparmor:noaa}%{?with_pae:pae}
130 %if "%{__alt_kernel}" != ""
131 %define alt_kernel %{__alt_kernel}
134 %define alt_kernel rescuecd
138 # kernel release (used in filesystem and eventually in uname -r)
139 # modules will be looked from /lib/modules/%{kernel_release}
140 # localversion is just that without version for "> localversion"
141 %define localversion %{rel}
142 %define kernel_release %{version}%{?alt_kernel:_%{alt_kernel}}-%{localversion}
144 Summary: The Linux kernel (the core of the Linux operating system)
145 Summary(de.UTF-8): Der Linux-Kernel (Kern des Linux-Betriebssystems)
146 Summary(et.UTF-8): Linuxi kernel (ehk operatsioonisüsteemi tuum)
147 Summary(fr.UTF-8): Le Kernel-Linux (La partie centrale du systeme)
148 Summary(pl.UTF-8): JÄ…dro Linuksa
149 Name: kernel%{_alt_kernel}
150 Version: %{basever}%{postver}
155 Source0: http://www.kernel.org/pub/linux/kernel/v2.6/linux-%{basever}.tar.bz2
156 # Source0-md5: 260551284ac224c3a43c4adac7df4879
157 %if "%{postver}" != "%{nil}"
158 Source1: http://www.kernel.org/pub/linux/kernel/v2.6/patch-%{version}.bz2
159 # Source1-md5: 924b7aa0fcd6e54c12ecc9b3c3082f59
162 Source3: kernel-autoconf.h
163 Source4: kernel-config.h
164 Source6: kernel-config.awk
165 Source7: kernel-module-build.pl
166 Source8: kernel-track-config-change.awk
167 # not used by kernel.spec, but it's good to have it in SOURCES
168 Source9: kernel-config-sort.pl
169 Source10: kernel.make
171 Source20: kernel-multiarch.config
172 Source21: kernel-x86.config
173 Source22: kernel-sparc.config
174 Source23: kernel-alpha.config
175 Source24: kernel-powerpc.config
176 Source25: kernel-ia64.config
178 Source40: kernel-netfilter.config
179 Source41: kernel-patches.config
180 Source42: kernel-tuxonice.config
181 Source43: kernel-vserver.config
182 Source45: kernel-grsec.config
184 Source49: kernel-pax.config
185 Source50: kernel-no-pax.config
186 Source51: kernel-grsec_minimal.config
187 Source55: kernel-imq.config
188 Source56: kernel-reiser4.config
189 Source57: kernel-wrr.config
191 Source58: kernel-inittmpfs.config
192 Source59: kernel-bzip2-lzma.config
194 # tahoe9xx http://www.tahoe.pl/drivers/tahoe9xx-2.6.24.patch
195 Patch2: kernel-tahoe9xx.patch
197 # http://dev.gentoo.org/~spock/projects/fbcondecor/archive/fbcondecor-0.9.4-2.6.25-rc6.patch
198 Patch3: kernel-fbcondecor.patch
199 Patch4: kernel-fbcon-margins.patch
201 # netfilter related stuff mostly based on patch-o-matic-ng
202 # snapshot 20070806 with some fixes. Some modules
203 # were ported to nf_conntrack.
205 Patch10: kernel-pom-ng-IPV4OPTSSTRIP.patch
206 Patch11: kernel-pom-ng-ipv4options.patch
208 Patch14: kernel-pom-ng-ROUTE.patch
209 Patch16: kernel-pom-ng-mms-conntrack-nat.patch
210 Patch22: kernel-pom-ng-rsh.patch
211 Patch23: kernel-pom-ng-rpc.patch
213 # based on http://mike.it-loops.com/rtsp/rtsp-2.6.26.patch
214 Patch36: kernel-nf_rtsp.patch
216 # http://ftp.linux-vserver.org/pub/people/dhozac/p/k/delta-owner-xid-feat02.diff
217 Patch37: kernel-owner-xid.patch
219 # based on http://www.svn.barbara.eu.org/ipt_account/attachment/wiki/Software/ipt_account-0.1.21-20070804164729.tar.gz?format=raw
220 Patch38: kernel-ipt_account.patch
222 # based on http://www.intra2net.com/de/produkte/opensource/ipt_account/pom-ng-ipt_ACCOUNT-1.12.tgz
223 Patch39: kernel-ipt_ACCOUNT.patch
225 # based on kernel-2.6.25-layer7-2.20.patch from
226 # http://switch.dl.sourceforge.net/sourceforge/l7-filter/netfilter-layer7-v2.20.tar.gz
227 Patch40: kernel-layer7.patch
229 # http://www.ssi.bg/~ja/nfct/ipvs-nfct-2.6.28-1.diff
230 Patch41: kernel-ipvs-nfct.patch
234 # http://zph.bratcheda.org/linux-2.6.26.3-zph.patch
235 Patch49: kernel-zph.patch
237 # based on http://www.linuximq.net/patchs/linux-2.6.29.1-imq-test2.diff
238 Patch50: kernel-imq.patch
240 # http://www.kernel.org/pub/linux/kernel/people/edward/reiser4/reiser4-for-2.6/reiser4-for-2.6.28.patch.bz2
241 Patch51: kernel-reiser4.patch
243 # http://www.zz9.dk/patches/wrr-linux-071203-2.6.25.patch.gz
244 Patch52: kernel-wrr.patch
246 # http://fatooh.org/esfq-2.6/sfq-2.6.24.1.tar.bz2
247 Patch53: kernel-esfq.patch
249 # http://memebeam.org/free-software/toshiba_acpi/toshiba_acpi-dev_toshiba_test5-linux_2.6.26.patch
250 Patch54: kernel-toshiba_acpi.patch
252 # by Baggins request:
253 # derived from ftp://ftp.cmf.nrl.navy.mil/pub/chas/linux-atm/vbr/vbr-kernel-diffs
254 Patch55: kernel-atm-vbr.patch
255 Patch56: kernel-atmdd.patch
257 # http://synce.svn.sourceforge.net/svnroot/synce/trunk/patches/linux-2.6.22-rndis_host-wm5.patch
258 Patch59: kernel-rndis_host-wm5.patch
260 # Project suspend2 renamed to tuxonice
261 # http://www.tuxonice.net/downloads/all/tuxonice-3.0.99.32-for-2.6.32.patch.bz2
262 Patch69: kernel-tuxonice.patch
263 Patch70: kernel-tuxonice-headers.patch
265 # adds some ids for hostap suported cards and monitor_enable from/for aircrack-ng
266 # http://patches.aircrack-ng.org/hostap-kernel-2.6.18.patch
267 Patch85: kernel-hostap.patch
269 # Taken from http://download.opensuse.org/factory/repo/src-oss/suse/src/kernel-source-2.6.30-10.3.src.rpm
270 Patch90: kernel-mpt-fusion.patch
272 # based on http://vserver.13thfloor.at/Experimental/patch-2.6.32.1-vs2.3.0.36.27.diff
273 Patch100: kernel-vserver-2.3.patch
274 Patch101: kernel-vserver-fixes.patch
276 # Wake-On-Lan fix for nForce drivers; using http://atlas.et.tudelft.nl/verwei90/nforce2/wol.html
277 # Fix verified for that kernel version.
278 Patch130: kernel-forcedeth-WON.patch
280 # http://download.filesystems.org/unionfs/unionfs-2.x/unionfs-2.5.3_for_2.6.31.diff.gz
281 Patch140: kernel-unionfs.patch
283 # aufs1, http://aufs.sourceforge.net/
284 # aufs1 is NOT maintained since Jan 2009.
285 Patch145: kernel-aufs.patch
286 Patch146: kernel-aufs-support.patch
288 Patch148: kernel-aufs2.patch
290 Patch150: kernel-ppc-crtsavres.patch
292 # git://git.kernel.org/pub/scm/linux/kernel/git/pkl/squashfs-devel.git
293 Patch160: kernel-squashfs-lzma.patch
295 Patch200: kernel-ppc-ICE-hacks.patch
297 # The following patch extend the routing functionality in Linux
298 # to support static routes (defined by user), new way to use the
299 # alternative routes, the reverse path protection (rp_filter),
300 # the NAT processing to use correctly the routing when multiple
302 # http://www.ssi.bg/~ja/routes-2.6.28-16.diff
303 Patch300: kernel-routes.patch
305 Patch1000: kernel-grsec-minimal.patch
307 Patch2000: kernel-small_fixes.patch
308 Patch2001: kernel-pwc-uncompress.patch
309 Patch2003: kernel-regressions.patch
311 # kill some thousands of warnings
312 # (only warnings, so just remove parts of this patch if conflics)
313 Patch2500: kernel-warnings.patch
315 # git://kernel.ubuntu.com/ubuntu/ubuntu-karmic.git
316 # see ubuntu/apparmor dir
317 Patch5000: kernel-apparmor.patch
320 # based on http://ftp.leg.uct.ac.za/pub/linux/rip/inittmpfs-2.6.14.diff.gz
321 Patch7000: kernel-inittmpfs.patch
323 # based on http://www.grsecurity.net/~spender/grsecurity-2.1.14-2.6.32.1-200912151746.patch kernel-grsec_full.patch
324 # NOTE: put raw upstream patches on kernel-grsec_full.patch:GRSECURITY_RAW for reference
325 # (since upstream deletes older patches)
326 Patch9999: kernel-grsec_full.patch
327 Patch10000: kernel-grsec-caps.patch
328 Patch10001: kernel-grsec-common.patch
329 Patch10002: kernel-grsec_fixes.patch
331 URL: http://www.kernel.org/
332 BuildRequires: binutils >= 3:2.18
333 %ifarch sparc sparc64
334 BuildRequires: elftoaout
337 BuildRequires: uboot-mkimage
340 BuildRequires: /sbin/depmod
341 BuildRequires: gcc >= 5:3.2
342 BuildRequires: xz >= 1:4.999.7
343 # for hostname command
344 BuildRequires: net-tools
345 BuildRequires: perl-base
346 BuildRequires: rpm-build >= 4.5-24
347 BuildRequires: rpmbuild(macros) >= 1.217
348 Requires(post): coreutils
349 Requires(post): geninitrd >= 10000-3
350 Requires(post): module-init-tools >= 0.9.9
351 Requires: /sbin/depmod
353 Requires: geninitrd >= 10000-3
354 Requires: module-init-tools >= 0.9.9
355 Provides: %{name}(netfilter) = %{netfilter_snap}
356 Provides: %{name}(vermagic) = %{kernel_release}
357 Obsoletes: kernel%{_alt_kernel}-isdn-mISDN
358 Obsoletes: kernel-misc-acer_acpi
359 Obsoletes: kernel-misc-fuse
360 Obsoletes: kernel-misc-uvc
361 Obsoletes: kernel-modules
362 Obsoletes: kernel-net-ar81
363 Obsoletes: kernel-net-hostap
364 Obsoletes: kernel-net-ieee80211
365 Obsoletes: kernel-net-ipp2p
366 Obsoletes: kernel-net-rt61
367 Obsoletes: kernel-smp
368 Conflicts: e2fsprogs < 1.29
369 Conflicts: isdn4k-utils < 3.1pre1
370 Conflicts: jfsutils < 1.1.3
371 Conflicts: module-init-tools < 0.9.10
372 Conflicts: nfs-utils < 1.0.5
373 Conflicts: oprofile < 0.9
374 Conflicts: ppp < 1:2.4.0
375 Conflicts: procps < 3.2.0
376 Conflicts: quota-tools < 3.09
377 %if %{with reiserfs4}
378 Conflicts: reiser4progs < 1.0.0
380 Conflicts: reiserfsprogs < 3.6.3
381 Conflicts: udev < 1:081
382 Conflicts: util-linux < 2.10o
383 Conflicts: util-vserver < 0.30.216
384 Conflicts: xfsprogs < 2.6.0
386 ExcludeArch: i386 i486 i586
388 ExclusiveArch: %{ix86} %{x8664} alpha arm ia64 ppc ppc64 sparc sparc64
391 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
393 %ifarch %{ix86} %{x8664}
394 %define target_arch_dir x86
397 %define target_arch_dir powerpc
399 %ifarch sparc sparc64
400 %define target_arch_dir sparc
402 %ifnarch %{ix86} %{x8664} ppc ppc64 sparc sparc64
403 %define target_arch_dir %{_target_base_arch}
406 %define defconfig arch/%{target_arch_dir}/defconfig
408 # No ELF objects there to strip (skips processing 27k files)
409 %define _noautostrip '(.*%{_kernelsrcdir}/.*|.*/vmlinux.*)'
410 %define _noautochrpath .*%{_kernelsrcdir}/.*
413 %define initrd_dir /boot/efi
415 %define initrd_dir /boot
418 %define topdir %{_builddir}/%{name}-%{version}
419 %define srcdir %{topdir}/linux-%{basever}
420 %define objdir %{topdir}/%{targetobj}
421 %define targetobj %{_target_base_arch}-gcc-%(%{kgcc} -dumpversion)
423 %define _kernelsrcdir /usr/src/linux%{_alt_kernel}-%{version}
425 %if "%{_target_base_arch}" != "%{_arch}"
426 %define CrossOpts ARCH=%{_target_base_arch} CROSS_COMPILE=%{_target_cpu}-pld-linux-
427 %define DepMod /bin/true
429 %if "%{_arch}" == "sparc" && "%{_target_base_arch}" == "sparc64"
430 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
431 %define DepMod /sbin/depmod
434 %if "%{_arch}" == "sparc64" && "%{_target_base_arch}" == "sparc"
435 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
436 %define DepMod /sbin/depmod
439 %if "%{_arch}" == "x86_64" && "%{_target_base_arch}" == "i386"
440 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
441 %define DepMod /sbin/depmod
444 %if "%{_target_base_arch}" == "ppc" || "%{_target_base_arch}" == "ppc64"
445 %define CrossOpts ARCH=powerpc CROSS_COMPILE=%{_target_cpu}-pld-linux-
449 %define CrossOpts ARCH=powerpc CC="%{__cc}"
451 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
453 %define DepMod /sbin/depmod
455 %define MakeOpts %{CrossOpts} HOSTCC="%{__cc}"
457 %define __features Netfilter module dated: %{netfilter_snap}\
458 %{?with_grsec_full:Grsecurity support - enabled}\
459 %{?with_grsec_minimal:Grsecurity minimal support /proc,link,fifo,shm/ - enabled}\
460 %{?with_pax:PaX support - enabled}\
461 %{?with_fbcondecor:Fbsplash/fbcondecor - enabled }\
462 %{?with_nfsroot:Root on NFS - enabled}\
463 %{?with_apparmor:apparmor support - enabled}\
465 %define Features %(echo "%{__features}" | sed '/^$/d')
468 This package contains the Linux kernel that is used to boot and run
469 your system. It contains few device drivers for specific hardware.
470 Most hardware is instead supported by modules loaded after booting.
474 %description -l de.UTF-8
475 Das Kernel-Paket enthält den Linux-Kernel (vmlinuz), den Kern des
476 Linux-Betriebssystems. Der Kernel ist für grundliegende
477 Systemfunktionen verantwortlich: Speicherreservierung,
478 Prozeß-Management, Geräte Ein- und Ausgaben, usw.
482 %description -l fr.UTF-8
483 Le package kernel contient le kernel linux (vmlinuz), la partie
484 centrale d'un système d'exploitation Linux. Le noyau traite les
485 fonctions basiques d'un système d'exploitation: allocation mémoire,
486 allocation de process, entrée/sortie de peripheriques, etc.
490 %description -l pl.UTF-8
491 Pakiet zawiera jądro Linuksa niezbędne do prawidłowego działania
492 Twojego komputera. Zawiera w sobie sterowniki do sprzętu znajdującego
493 się w komputerze, takiego jak sterowniki dysków itp.
498 Summary: vmlinux - uncompressed kernel image
499 Summary(de.UTF-8): vmlinux - dekompressiertes Kernel Bild
500 Summary(pl.UTF-8): vmlinux - rozpakowany obraz jÄ…dra
502 Obsoletes: kernel-smp-vmlinux
505 vmlinux - uncompressed kernel image.
507 %description vmlinux -l de.UTF-8
508 vmlinux - dekompressiertes Kernel Bild.
510 %description vmlinux -l pl.UTF-8
511 vmlinux - rozpakowany obraz jÄ…dra.
514 Summary: DRM kernel modules
515 Summary(de.UTF-8): DRM Kernel Treiber
516 Summary(pl.UTF-8): Sterowniki DRM
518 Requires(postun): %{name} = %{epoch}:%{version}-%{release}
519 Requires: %{name} = %{epoch}:%{version}-%{release}
520 Obsoletes: kernel-smp-drm
526 %description drm -l de.UTF-8
529 %description drm -l pl.UTF-8
533 Summary: PCMCIA modules
534 Summary(de.UTF-8): PCMCIA Module
535 Summary(pl.UTF-8): Moduły PCMCIA
537 Requires(postun): %{name} = %{epoch}:%{version}-%{release}
538 Requires: %{name} = %{epoch}:%{version}-%{release}
539 Obsoletes: kernel-smp-pcmcia
540 Conflicts: pcmcia-cs < 3.1.21
541 Conflicts: pcmciautils < 004
547 %description pcmcia -l de.UTF-8
550 %description pcmcia -l pl.UTF-8
554 Summary: ALSA kernel modules
555 Summary(de.UTF-8): ALSA Kernel Module
556 Summary(pl.UTF-8): Sterowniki dźwięku ALSA
558 Requires(postun): %{name} = %{epoch}:%{version}-%{release}
559 Requires: %{name} = %{epoch}:%{version}-%{release}
560 Obsoletes: kernel-smp-sound-alsa
563 %description sound-alsa
564 ALSA (Advanced Linux Sound Architecture) sound drivers.
566 %description sound-alsa -l de.UTF-8
567 ALSA (Advanced Linux Sound Architecture) Sound-Treiber.
569 %description sound-alsa -l pl.UTF-8
570 Sterowniki dźwięku ALSA (Advanced Linux Sound Architecture).
573 Summary: OSS kernel modules
574 Summary(de.UTF-8): OSS Kernel Module
575 Summary(pl.UTF-8): Sterowniki dźwięku OSS
577 Requires(postun): %{name} = %{epoch}:%{version}-%{release}
578 Requires: %{name} = %{epoch}:%{version}-%{release}
579 Obsoletes: kernel-smp-sound-oss
582 %description sound-oss
583 OSS (Open Sound System) drivers.
585 %description sound-oss -l de.UTF-8
586 OSS (Open Sound System) Treiber.
588 %description sound-oss -l pl.UTF-8
589 Sterowniki dźwięku OSS (Open Sound System).
592 Summary: Header files for the Linux kernel
593 Summary(de.UTF-8): Header Dateien für den Linux-Kernel
594 Summary(pl.UTF-8): Pliki nagłówkowe jądra Linuksa
595 Group: Development/Building
596 Provides: %{name}-headers(netfilter) = %{netfilter_snap}
600 These are the C header files for the Linux kernel, which define
601 structures and constants that are needed when rebuilding the kernel or
602 building kernel modules.
604 %description headers -l de.UTF-8
605 Dies sind die C Header Dateien für den Linux-Kernel, die definierte
606 Strukturen und Konstante beinhalten, die beim rekompilieren des
607 Kernels oder bei Kernel Modul kompilationen gebraucht werden.
609 %description headers -l pl.UTF-8
610 Pakiet zawiera pliki nagłówkowe jądra, niezbędne do rekompilacji jądra
611 oraz budowania modułów jądra.
613 %package module-build
614 Summary: Development files for building kernel modules
615 Summary(de.UTF-8): Development Dateien die beim Kernel Modul kompilationen gebraucht werden
616 Summary(pl.UTF-8): Pliki służące do budowania modułów jądra
617 Group: Development/Building
618 Requires: %{name}-headers = %{epoch}:%{version}-%{release}
619 Conflicts: rpmbuild(macros) < 1.321
622 %description module-build
623 Development files from kernel source tree needed to build Linux kernel
624 modules from external packages.
626 %description module-build -l de.UTF-8
627 Development Dateien des Linux-Kernels die beim kompilieren externer
628 Kernel Module gebraucht werden.
630 %description module-build -l pl.UTF-8
631 Pliki ze drzewa źródeł jądra potrzebne do budowania modułów jądra
632 Linuksa z zewnętrznych pakietów.
635 Summary: Kernel source tree
636 Summary(de.UTF-8): Der Kernel Quelltext
637 Summary(pl.UTF-8): Kod źródłowy jądra Linuksa
638 Group: Development/Building
639 Requires: %{name}-module-build = %{epoch}:%{version}-%{release}
643 This is the source code for the Linux kernel. You can build a custom
644 kernel that is better tuned to your particular hardware.
646 %description source -l de.UTF-8
647 Das Kernel-Source-Paket enthält den source code (C/Assembler-Code) des
648 Linux-Kernels. Die Source-Dateien werden gebraucht, um viele
649 C-Programme zu kompilieren, da sie auf Konstanten zurückgreifen, die
650 im Kernel-Source definiert sind. Die Source-Dateien können auch
651 benutzt werden, um einen Kernel zu kompilieren, der besser auf Ihre
652 Hardware ausgerichtet ist.
654 %description source -l fr.UTF-8
655 Le package pour le kernel-source contient le code source pour le noyau
656 linux. Ces sources sont nécessaires pour compiler la plupart des
657 programmes C, car il dépend de constantes définies dans le code
658 source. Les sources peuvent être aussi utilisée pour compiler un noyau
659 personnalisé pour avoir de meilleures performances sur des matériels
662 %description source -l pl.UTF-8
663 Pakiet zawiera kod źródłowy jądra systemu.
666 Summary: Kernel documentation
667 Summary(de.UTF-8): Kernel Dokumentation
668 Summary(pl.UTF-8): Dokumentacja do jÄ…dra Linuksa
673 This is the documentation for the Linux kernel, as found in
674 /usr/src/linux/Documentation directory.
676 %description doc -l de.UTF-8
677 Dies ist die Kernel Dokumentation wie sie im 'Documentation'
678 Verzeichniss vorgefunden werden kann.
680 %description doc -l pl.UTF-8
681 Pakiet zawiera dokumentacjÄ™ do jÄ…dra Linuksa pochodzÄ…cÄ… z katalogu
682 /usr/src/linux/Documentation.
686 ln -s %{SOURCE7} kernel-module-build.pl
687 ln -s %{SOURCE10} Makefile
690 # hack against warning in pax/grsec
691 sed -i 's/-Werror//' arch/alpha/kernel/Makefile
693 %if "%{postver}" != "%{nil}"
694 %{__bzip2} -dc %{SOURCE1} | patch -p1 -s
703 # tahoe9xx: 2.6.29 - need update
706 %if %{with fbcondecor}
714 # kernel-pom-ng-IPV4OPTSSTRIP.patch
717 # kernel-pom-ng-ipv4options.patch
720 # kernel-pom-ng-ROUTE.patch
723 # kernel-pom-ng-mms-conntrack-nat.patch
726 # kernel-pom-ng-rsh.patch
729 # kernel-pom-ng-rpc.patch
732 # kernel-nf_rtsp.patch
735 # kernel-owner-xid.patch
740 # kernel-ipt_account.patch
743 # kernel-ipt_ACCOUNT.patch
746 # kernel-layer7.patch
782 # kernel-rndis_host-wm5.patch
785 # hostap enhancements from/for aircrack-ng
788 # LSI MPT Fusion driver update (by LSI via SUSE folks)
801 # unionfs (problems with aufs2, needed for aufs1 patch)
802 %if %{without rescuecd}
821 # grsecurity & pax stuff
824 # remember that we have the same config file for grsec_minimal and
825 # grsec_full, but the patches are different.
827 %if %{with grsecurity}
828 %if %{with grsec_minimal}
831 # grsec_full and/or pax
833 %{?with_vserver:%patch10000 -p1}
834 %{?with_vserver:%patch10001 -p1}
835 %{?with_vserver:%patch10002 -p1}
839 # end of grsecurity & pax stuff
863 # Fix EXTRAVERSION in main Makefile
864 sed -i 's#EXTRAVERSION =.*#EXTRAVERSION = %{postver}%{?alt_kernel:_%{alt_kernel}}#g' Makefile
866 # cleanup backups after patching
867 find '(' -name '*~' -o -name '*.orig' -o -name '.gitignore' ')' -print0 | xargs -0 -r -l512 rm -f
871 cat > %{targetobj}.mk <<'EOF'
872 # generated by %{name}.spec
873 KERNELSRC := %{_builddir}/%{name}-%{version}/linux-%{basever}
874 KERNELOUTPUT := %{objdir}
876 SRCARCH := %{target_arch_dir}
877 ARCH := %{_target_base_arch}
878 Q := %{!?with_verbose:@}
879 MAKE_OPTS := %{MakeOpts}
880 DEFCONFIG := %{defconfig}
887 CONFIG_PAX_SEGMEXEC=y
888 # performance impact on CPUs without NX bit
889 CONFIG_PAX_PAGEEXEC=n
892 CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM=n
898 CONFIG_PAX_NOELFRELOCS=n
901 CONFIG_PAX_EMUTRAMP=y
902 CONFIG_PAX_EMUSIGRT=y
906 %ifarch sparc sparc64 alpha
910 # Now we have to check MAC system integration. Grsecurity (full) uses PAX_HAVE_ACL_FLAGS
911 # setting (direct acces). grsec_minimal probably have no idea about PaX so we probably
912 # could use PAX_NO_ACL_FLAGS, but for testing the hooks setting will be used
913 # PAX_HOOK_ACL_FLAGS.
915 %if %{with grsec_full}
916 # Hardening grsec options if with pax
917 CONFIG_GRKERNSEC_PROC_MEMMAP=y
918 # almost rational (see HIDESYM help)
919 CONFIG_GRKERNSEC_HIDESYM=y
921 # no change needed CONFIG=PAX_HAVE_ACL_FLAGS=y is taken from the kernel-pax.config
923 CONFIG_PAX_HAVE_ACL_FLAGS=n
924 CONFIG_PAX_HOOK_ACL_FLAGS=y
934 # CONFIG_SOUND is not set
935 # CONFIG_AUDIT is not set
936 # CONFIG_TR is not set
937 # CONFIG_BT is not set
938 # CONFIG_VIDEO_DEV is not set
939 # CONFIG_DVB_CORE is not set
940 # CONFIG_HAMRADIO is not set
941 # CONFIG_ARCNET is not set
942 # CONFIG_FB is not set
943 # CONFIG_DRM is not set
944 # CONFIG_WATCHDOG is not set
945 # CONFIG_INPUT_JOYSTICK is not set
946 # CONFIG_DEBUG_KERNEL is not set
947 # CONFIG_ISDN is not set
948 # CONFIG_AGP is not set
949 # CONFIG_SECURITY is not set
950 # CONFIG_PARIDE is not set
951 # CONFIG_CPU_FREQ is not set
952 # CONFIG_GAMEPORT is not set
953 # CONFIG_KVM is not set
954 # CONFIG_PHONE is not set
955 # CONFIG_STRICT_DEVMEM is not set
956 # CONFIG_IMA is not set
959 CONFIG_AUFS_BR_RAMFS=y
961 CONFIG_BLK_DEV_LOOP=y
973 Config="kernel-%{target_arch_dir}.config"
974 echo >&2 "Building config file for %{_target_cpu} using $Config et al."
976 # prepare local and important options
977 cat <<-EOCONFIG > important.config
978 LOCALVERSION="-%{localversion}"
982 CONFIG_DEBUG_SLAB_LEAK=y
983 CONFIG_DEBUG_PREEMPT=y
984 CONFIG_RT_DEADLOCK_DETECT=y
987 # apparmor, will be moved to external file if works
989 CONFIG_SECURITY_APPARMOR=y
990 CONFIG_SECURITY_APPARMOR_BOOTPARAM_VALUE=1
991 CONFIG_SECURITY_APPARMOR_DISABLE=n
992 CONFIG_SECURITY_APPARMOR_NETWORK=y
999 %ifarch i686 athlon pentium3 pentium4
1008 %if %{without pcmcia}
1012 %if %{with fbcondecor}
1016 CONFIG_FB_TILEBLITTING=n
1017 CONFIG_FB_CON_DECOR=y
1025 # Temporary disabled RELOCATABLE. Needed only on x86??
1026 %if %{with pax} || %{with grsec_full}
1027 CONFIG_RELOCATABLE=n
1031 %if %{with rescuecd}
1032 RescueConfig rescue.config
1035 PaXconfig pax.config
1038 # prepare kernel-style config file from multiple config files
1039 %{__awk} -v arch="all %{target_arch_dir} %{_target_base_arch} %{_target_cpu}" -f %{SOURCE6} \
1041 $RPM_SOURCE_DIR/kernel-%{alt_kernel}.config \
1044 %if %{with rescuecd}
1055 %if %{with grsec_full}
1059 %if %{with grsec_minimal}
1077 %if %{with tuxonice}
1078 %ifarch %{ix86} %{x8664} ia64 ppc ppc64
1082 %{SOURCE40} %{?0:netfilter} \
1083 %{SOURCE41} %{?0:patches} \
1085 $RPM_SOURCE_DIR/$Config
1089 install -d arch/%{target_arch_dir}
1090 BuildConfig > %{defconfig}
1091 ln -sf %{defconfig} .config
1095 TARGETOBJ=%{targetobj} \
1096 %{?with_verbose:V=1} \
1099 %{__awk} %{?debug:-v dieOnError=1} -v infile=%{objdir}/%{defconfig} -f %{SOURCE8} %{objdir}/.config
1103 TARGETOBJ=%{targetobj} \
1104 %{?with_verbose:V=1} \
1108 rm -rf $RPM_BUILD_ROOT
1109 %{__make} %{MakeOpts} %{!?with_verbose:-s} modules_install firmware_install \
1111 %{?with_verbose:V=1} \
1113 INSTALL_MOD_PATH=$RPM_BUILD_ROOT \
1114 INSTALL_FW_PATH=$RPM_BUILD_ROOT/lib/firmware/%{kernel_release} \
1115 KERNELRELEASE=%{kernel_release}
1117 install -d $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/misc
1119 # create directories which may be missing, to simplyfy %files
1120 install -d $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/kernel/{arch,sound,mm}
1122 # rpm obeys filelinkto checks for ghosted symlinks, convert to files
1123 rm -f $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/{build,source}
1124 touch $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/{build,source}
1127 install -d $RPM_BUILD_ROOT/boot
1128 cp -a %{objdir}/System.map $RPM_BUILD_ROOT/boot/System.map-%{kernel_release}
1129 %ifarch %{ix86} %{x8664}
1130 cp -a %{objdir}/arch/%{target_arch_dir}/boot/bzImage $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release}
1131 install %{objdir}/vmlinux $RPM_BUILD_ROOT/boot/vmlinux-%{kernel_release}
1134 install %{objdir}/vmlinux $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release}
1135 install %{objdir}/vmlinux $RPM_BUILD_ROOT/boot/vmlinux-%{kernel_release}
1138 %{__gzip} -cfv %{objdir}/vmlinux > %{objdir}/vmlinuz
1139 cp -a %{objdir}/vmlinuz $RPM_BUILD_ROOT/boot/efi/vmlinuz-%{kernel_release}
1140 ln -sf efi/vmlinuz-%{kernel_release} $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release}
1142 %ifarch alpha sparc sparc64
1143 %{__gzip} -cfv %{objdir}/vmlinux > %{objdir}/vmlinuz
1144 cp -a %{objdir}/vmlinuz $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release}
1145 install %{objdir}/vmlinux $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release}
1147 elftoaout %{objdir}/arch/sparc/boot/image -o %{objdir}/vmlinux.aout
1148 install %{objdir}/vmlinux.aout $RPM_BUILD_ROOT/boot/vmlinux.aout-%{kernel_release}
1151 elftoaout %{objdir}/arch/sparc64/boot/image -o %{objdir}/vmlinux.aout
1152 install %{objdir}/vmlinux.aout $RPM_BUILD_ROOT/boot/vmlinux.aout-%{kernel_release}
1155 install %{objdir}/arch/arm/boot/zImage $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release}
1160 touch $RPM_BUILD_ROOT%{initrd_dir}/initrd-%{kernel_release}.gz
1162 %if "%{_target_base_arch}" != "%{_arch}"
1163 touch $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/modules.dep
1167 install -d $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/%{kernel_release}
1170 install -d $RPM_BUILD_ROOT%{_kernelsrcdir}
1171 # test if we can hardlink -- %{_builddir} and $RPM_BUILD_ROOT on same partition
1172 if cp -al %{srcdir}/COPYING $RPM_BUILD_ROOT/COPYING 2>/dev/null; then
1174 rm -f $RPM_BUILD_ROOT/COPYING
1177 cp -a$l %{srcdir}/* $RPM_BUILD_ROOT%{_kernelsrcdir}
1178 cp -a %{objdir}/Module.symvers $RPM_BUILD_ROOT%{_kernelsrcdir}/Module.symvers-dist
1179 cp -aL %{objdir}/.config $RPM_BUILD_ROOT%{_kernelsrcdir}/config-dist
1180 cp -a %{objdir}/include/linux/autoconf.h $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux/autoconf-dist.h
1181 cp -a %{objdir}/include/linux/{utsrelease,version}.h $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux
1182 cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux/autoconf.h
1183 cp -a %{SOURCE4} $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux/config.h
1185 # collect module-build files and directories
1186 # Usage: kernel-module-build.pl $rpmdir $fileoutdir
1188 cd $RPM_BUILD_ROOT%{_kernelsrcdir}
1189 %{__perl} %{topdir}/kernel-module-build.pl %{_kernelsrcdir} $fileoutdir
1192 # move to %{_docdir} so we wouldn't depend on any kernel package for dirs
1193 install -d $RPM_BUILD_ROOT%{_docdir}
1194 mv $RPM_BUILD_ROOT{%{_kernelsrcdir}/Documentation,%{_docdir}/%{name}-%{version}}
1196 rm -f $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/dontdiff
1197 rm -f $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/Makefile
1198 rm -f $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/*/Makefile
1199 rm -f $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/*/*/Makefile
1202 rm -rf $RPM_BUILD_ROOT
1205 if [ -x /sbin/new-kernel-pkg ]; then
1206 /sbin/new-kernel-pkg --remove %{kernel_release}
1211 mv -f /boot/efi/vmlinuz{,.old} 2> /dev/null
1212 %{?alt_kernel:mv -f /boot/efi/vmlinuz%{_alt_kernel}{,.old} 2> /dev/null}
1213 ln -sf vmlinuz-%{kernel_release} /boot/efi/vmlinuz
1214 %{?alt_kernel:ln -sf vmlinuz-%{kernel_release} /boot/efi/vmlinuz%{_alt_kernel}}
1216 mv -f /boot/vmlinuz{,.old} 2> /dev/null
1217 %{?alt_kernel:mv -f /boot/vmlinuz%{_alt_kernel}{,.old} 2> /dev/null}
1218 mv -f /boot/System.map{,.old} 2> /dev/null
1219 %{?alt_kernel:mv -f /boot/System%{_alt_kernel}.map{,.old} 2> /dev/null}
1220 ln -sf vmlinuz-%{kernel_release} /boot/vmlinuz
1221 %{?alt_kernel:ln -sf vmlinuz-%{kernel_release} /boot/vmlinuz%{_alt_kernel}}
1222 ln -sf System.map-%{kernel_release} /boot/System.map
1223 %{?alt_kernel:ln -sf System.map-%{kernel_release} /boot/System.map%{_alt_kernel}}
1225 %depmod %{kernel_release}
1227 /sbin/geninitrd -f --initrdfs=rom %{initrd_dir}/initrd-%{kernel_release}.gz %{kernel_release}
1228 mv -f %{initrd_dir}/initrd{,.old} 2> /dev/null
1229 %{?alt_kernel:mv -f %{initrd_dir}/initrd%{_alt_kernel}{,.old} 2> /dev/null}
1230 ln -sf initrd-%{kernel_release}.gz %{initrd_dir}/initrd
1231 %{?alt_kernel:ln -sf initrd-%{kernel_release}.gz %{initrd_dir}/initrd%{_alt_kernel}}
1233 if [ -x /sbin/new-kernel-pkg ]; then
1234 /sbin/new-kernel-pkg --initrdfile=%{initrd_dir}/initrd-%{kernel_release}.gz --install %{kernel_release} --banner "PLD Linux (%{pld_release})%{?alt_kernel: / %{alt_kernel}}"
1235 elif [ -x /sbin/rc-boot ]; then
1236 /sbin/rc-boot 1>&2 || :
1240 mv -f /boot/vmlinux{,.old} 2> /dev/null
1241 %{?alt_kernel:mv -f /boot/vmlinux-%{alt_kernel}{,.old} 2> /dev/null}
1242 ln -sf vmlinux-%{kernel_release} /boot/vmlinux
1243 %{?alt_kernel:ln -sf vmlinux-%{kernel_release} /boot/vmlinux-%{alt_kernel}}
1246 %depmod %{kernel_release}
1249 %depmod %{kernel_release}
1252 %depmod %{kernel_release}
1255 %depmod %{kernel_release}
1258 %depmod %{kernel_release}
1261 %depmod %{kernel_release}
1264 %depmod %{kernel_release}
1267 %depmod %{kernel_release}
1270 ln -snf %{basename:%{_kernelsrcdir}} %{_prefix}/src/linux%{_alt_kernel}
1273 if [ "$1" = "0" ]; then
1274 if [ -L %{_prefix}/src/linux%{_alt_kernel} ]; then
1275 if [ "$(readlink %{_prefix}/src/linux%{_alt_kernel})" = "linux%{_alt_kernel}-%{version}" ]; then
1276 rm -f %{_prefix}/src/linux%{_alt_kernel}
1281 %triggerin module-build -- %{name} = %{epoch}:%{version}-%{release}
1282 ln -sfn %{_kernelsrcdir} /lib/modules/%{kernel_release}/build
1283 ln -sfn %{_kernelsrcdir} /lib/modules/%{kernel_release}/source
1285 %triggerun module-build -- %{name} = %{epoch}:%{version}-%{release}
1286 if [ "$1" = 0 ]; then
1287 rm -f /lib/modules/%{kernel_release}/{build,source}
1291 %defattr(644,root,root,755)
1292 %ifarch sparc sparc64
1293 /boot/vmlinux.aout-%{kernel_release}
1296 /boot/efi/vmlinuz-%{kernel_release}
1298 /boot/vmlinuz-%{kernel_release}
1299 /boot/System.map-%{kernel_release}
1300 %ghost %{initrd_dir}/initrd-%{kernel_release}.gz
1301 /lib/firmware/%{kernel_release}
1303 %dir /lib/modules/%{kernel_release}
1304 %dir /lib/modules/%{kernel_release}/kernel
1305 /lib/modules/%{kernel_release}/kernel/arch
1306 /lib/modules/%{kernel_release}/kernel/crypto
1307 /lib/modules/%{kernel_release}/kernel/drivers
1309 %exclude /lib/modules/%{kernel_release}/kernel/drivers/gpu
1311 /lib/modules/%{kernel_release}/kernel/fs
1312 /lib/modules/%{kernel_release}/kernel/kernel
1313 /lib/modules/%{kernel_release}/kernel/lib
1314 /lib/modules/%{kernel_release}/kernel/net
1315 /lib/modules/%{kernel_release}/kernel/mm
1317 %dir /lib/modules/%{kernel_release}/kernel/sound
1318 /lib/modules/%{kernel_release}/kernel/sound/ac97_bus.ko*
1319 /lib/modules/%{kernel_release}/kernel/sound/sound*.ko*
1321 %exclude /lib/modules/%{kernel_release}/kernel/drivers/media/video/cx88/cx88-alsa.ko*
1322 %exclude /lib/modules/%{kernel_release}/kernel/drivers/media/video/em28xx/em28xx-alsa.ko*
1323 %exclude /lib/modules/%{kernel_release}/kernel/drivers/media/video/saa7134/saa7134-alsa.ko*
1326 %dir /lib/modules/%{kernel_release}/misc
1328 %exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/[!p]*
1329 %exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/pd6729.ko*
1330 %exclude /lib/modules/%{kernel_release}/kernel/drivers/*/pcmcia
1331 %if %{without rescuecd}
1332 %exclude /lib/modules/%{kernel_release}/kernel/drivers/ata/pata_pcmcia.ko*
1333 %exclude /lib/modules/%{kernel_release}/kernel/drivers/bluetooth/*_cs.ko*
1334 %exclude /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/avm_cs.ko*
1335 %exclude /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/b1pcmcia.ko*
1336 %exclude /lib/modules/%{kernel_release}/kernel/drivers/telephony/ixj_pcmcia.ko*
1337 %exclude /lib/modules/%{kernel_release}/kernel/drivers/usb/gadget/g_midi.ko*
1339 %exclude /lib/modules/%{kernel_release}/kernel/drivers/ide/ide-cs.ko*
1340 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/*_cs.ko*
1341 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/b43
1342 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/hostap/hostap_cs.ko*
1343 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/libertas/*_cs.ko*
1344 %exclude /lib/modules/%{kernel_release}/kernel/drivers/parport/parport_cs.ko*
1345 %exclude /lib/modules/%{kernel_release}/kernel/drivers/serial/serial_cs.ko*
1346 %exclude /lib/modules/%{kernel_release}/kernel/drivers/usb/host/sl811_cs.ko*
1349 /lib/modules/%{kernel_release}/kernel/sound
1351 %ghost /lib/modules/%{kernel_release}/modules.*
1352 # symlinks pointing to kernelsrcdir
1353 %ghost /lib/modules/%{kernel_release}/build
1354 %ghost /lib/modules/%{kernel_release}/source
1355 %dir %{_sysconfdir}/modprobe.d/%{kernel_release}
1357 %ifarch alpha %{ix86} %{x8664} ppc ppc64 sparc sparc64
1359 %defattr(644,root,root,755)
1360 /boot/vmlinux-%{kernel_release}
1365 %defattr(644,root,root,755)
1366 /lib/modules/%{kernel_release}/kernel/drivers/gpu
1371 %defattr(644,root,root,755)
1372 /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/*ko*
1373 /lib/modules/%{kernel_release}/kernel/drivers/*/pcmcia
1374 %exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/pcmcia*ko*
1375 %if %{without rescuecd}
1376 /lib/modules/%{kernel_release}/kernel/drivers/bluetooth/*_cs.ko*
1377 /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/avm_cs.ko*
1378 /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/b1pcmcia.ko*
1379 /lib/modules/%{kernel_release}/kernel/drivers/telephony/ixj_pcmcia.ko*
1381 /lib/modules/%{kernel_release}/kernel/drivers/ata/pata_pcmcia.ko*
1382 /lib/modules/%{kernel_release}/kernel/drivers/ide/ide-cs.ko*
1383 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/*_cs.ko*
1384 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/b43
1385 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/hostap/hostap_cs.ko*
1386 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/libertas/*_cs.ko*
1387 /lib/modules/%{kernel_release}/kernel/drivers/parport/parport_cs.ko*
1388 /lib/modules/%{kernel_release}/kernel/drivers/serial/serial_cs.ko*
1389 /lib/modules/%{kernel_release}/kernel/drivers/usb/host/sl811_cs.ko*
1394 %defattr(644,root,root,755)
1395 /lib/modules/%{kernel_release}/kernel/sound
1396 %exclude %dir /lib/modules/%{kernel_release}/kernel/sound
1397 %exclude /lib/modules/%{kernel_release}/kernel/sound/ac97_bus.ko*
1398 %exclude /lib/modules/%{kernel_release}/kernel/sound/sound*.ko*
1400 %exclude /lib/modules/%{kernel_release}/kernel/sound/oss
1403 /lib/modules/%{kernel_release}/kernel/drivers/usb/gadget/g_midi.ko*
1404 /lib/modules/%{kernel_release}/kernel/drivers/media/video/cx88/cx88-alsa.ko*
1405 /lib/modules/%{kernel_release}/kernel/drivers/media/video/em28xx/em28xx-alsa.ko*
1406 /lib/modules/%{kernel_release}/kernel/drivers/media/video/saa7134/saa7134-alsa.ko*
1411 %defattr(644,root,root,755)
1412 /lib/modules/%{kernel_release}/kernel/sound/oss
1416 %files headers -f files.headers_exclude_kbuild
1417 %defattr(644,root,root,755)
1418 %dir %{_kernelsrcdir}
1419 %{_kernelsrcdir}/include
1420 %dir %{_kernelsrcdir}/arch
1421 %dir %{_kernelsrcdir}/arch/[!K]*
1422 %{_kernelsrcdir}/arch/*/include
1423 %dir %{_kernelsrcdir}/security
1424 %dir %{_kernelsrcdir}/security/selinux
1425 %{_kernelsrcdir}/security/selinux/include
1426 %{_kernelsrcdir}/config-dist
1427 %{_kernelsrcdir}/Module.symvers-dist
1429 %files module-build -f files.mb_include_modulebuild_and_dirs
1430 %defattr(644,root,root,755)
1432 %{_kernelsrcdir}/arch/powerpc/lib/crtsavres.*
1434 %exclude %dir %{_kernelsrcdir}/arch/m68knommu
1435 %exclude %dir %{_kernelsrcdir}/arch/um
1436 %{_kernelsrcdir}/arch/*/kernel/asm-offsets*
1437 %{_kernelsrcdir}/arch/*/kernel/sigframe*.h
1438 %{_kernelsrcdir}/drivers/lguest/lg.h
1439 %{_kernelsrcdir}/kernel/bounds.c
1440 %dir %{_kernelsrcdir}/scripts
1441 %{_kernelsrcdir}/scripts/Kbuild.include
1442 %{_kernelsrcdir}/scripts/Makefile*
1443 %{_kernelsrcdir}/scripts/basic
1444 %{_kernelsrcdir}/scripts/kconfig
1445 %{_kernelsrcdir}/scripts/mkcompile_h
1446 %{_kernelsrcdir}/scripts/mkmakefile
1447 %{_kernelsrcdir}/scripts/mod
1448 %{_kernelsrcdir}/scripts/module-common.lds
1449 %{_kernelsrcdir}/scripts/setlocalversion
1450 %{_kernelsrcdir}/scripts/*.c
1451 %{_kernelsrcdir}/scripts/*.sh
1452 %dir %{_kernelsrcdir}/scripts/selinux
1453 %{_kernelsrcdir}/scripts/selinux/Makefile
1454 %dir %{_kernelsrcdir}/scripts/selinux/mdp
1455 %{_kernelsrcdir}/scripts/selinux/mdp/Makefile
1456 %{_kernelsrcdir}/scripts/selinux/mdp/*.c
1457 %exclude %dir %{_kernelsrcdir}/security
1458 %exclude %dir %{_kernelsrcdir}/security/selinux
1462 %defattr(644,root,root,755)
1463 %dir %{_docdir}/%{name}-%{version}
1465 %{_docdir}/%{name}-%{version}/[!jkz]*
1466 %{_docdir}/%{name}-%{version}/[jkz]*.txt
1467 %{_docdir}/%{name}-%{version}/kbuild
1468 %{_docdir}/%{name}-%{version}/kdump
1469 %{_docdir}/%{name}-%{version}/kvm
1470 %lang(ja) %{_docdir}/%{name}-%{version}/ja_JP
1471 %lang(ko) %{_docdir}/%{name}-%{version}/ko_KR
1472 %lang(zh_CN) %{_docdir}/%{name}-%{version}/zh_CN
1476 %files source -f files.source_exclude_modulebuild_and_dirs
1477 %defattr(644,root,root,755)
1478 %{_kernelsrcdir}/arch/*/[!Mik]*
1479 %{_kernelsrcdir}/arch/*/kernel/[!M]*
1480 %{_kernelsrcdir}/arch/ia64/ia32/[!M]*
1481 %{_kernelsrcdir}/arch/ia64/install.sh
1482 %{_kernelsrcdir}/arch/m68k/ifpsp060/[!M]*
1483 %{_kernelsrcdir}/arch/m68k/ifpsp060/MISC
1484 %{_kernelsrcdir}/arch/m68k/install.sh
1485 %{_kernelsrcdir}/arch/parisc/install.sh
1486 %{_kernelsrcdir}/arch/x86/ia32/[!M]*
1487 %{_kernelsrcdir}/arch/ia64/kvm
1488 %{_kernelsrcdir}/arch/powerpc/kvm
1490 %exclude %{_kernelsrcdir}/arch/powerpc/lib/crtsavres.*
1492 %{_kernelsrcdir}/arch/s390/kvm
1493 %{_kernelsrcdir}/arch/x86/kvm
1494 %exclude %{_kernelsrcdir}/arch/*/kernel/asm-offsets*
1495 %exclude %{_kernelsrcdir}/arch/*/kernel/sigframe*.h
1496 %exclude %{_kernelsrcdir}/drivers/lguest/lg.h
1497 %{_kernelsrcdir}/block
1498 %{_kernelsrcdir}/crypto
1499 %{_kernelsrcdir}/drivers
1500 %{_kernelsrcdir}/firmware
1502 %if %{with grsecurity} && %{without rescuecd}
1503 %{_kernelsrcdir}/grsecurity
1505 %{_kernelsrcdir}/init
1506 %{_kernelsrcdir}/ipc
1507 %{_kernelsrcdir}/kernel
1508 %exclude %{_kernelsrcdir}/kernel/bounds.c
1509 %{_kernelsrcdir}/lib
1511 %{_kernelsrcdir}/net
1512 %{_kernelsrcdir}/virt
1513 %{_kernelsrcdir}/samples
1514 %{_kernelsrcdir}/scripts/*
1515 %exclude %{_kernelsrcdir}/scripts/Kbuild.include
1516 %exclude %{_kernelsrcdir}/scripts/Makefile*
1517 %exclude %{_kernelsrcdir}/scripts/basic
1518 %exclude %{_kernelsrcdir}/scripts/kconfig
1519 %exclude %{_kernelsrcdir}/scripts/mkcompile_h
1520 %exclude %{_kernelsrcdir}/scripts/mkmakefile
1521 %exclude %{_kernelsrcdir}/scripts/mod
1522 %exclude %{_kernelsrcdir}/scripts/module-common.lds
1523 %exclude %{_kernelsrcdir}/scripts/setlocalversion
1524 %exclude %{_kernelsrcdir}/scripts/*.c
1525 %exclude %{_kernelsrcdir}/scripts/*.sh
1526 %exclude %dir %{_kernelsrcdir}/scripts/selinux
1527 %exclude %{_kernelsrcdir}/scripts/selinux/Makefile
1528 %exclude %dir %{_kernelsrcdir}/scripts/selinux/mdp
1529 %exclude %{_kernelsrcdir}/scripts/selinux/mdp/Makefile
1530 %exclude %{_kernelsrcdir}/scripts/selinux/mdp/*.c
1531 %{_kernelsrcdir}/sound
1532 %{_kernelsrcdir}/security
1533 %exclude %{_kernelsrcdir}/security/selinux/include
1534 %{_kernelsrcdir}/tools
1535 %{_kernelsrcdir}/usr
1536 %{_kernelsrcdir}/COPYING
1537 %{_kernelsrcdir}/CREDITS
1538 %{_kernelsrcdir}/MAINTAINERS
1539 %{_kernelsrcdir}/README
1540 %{_kernelsrcdir}/REPORTING-BUGS