3 # - benchmark NO_HZ & HZ=1000 vs HZ=300 on i686
4 # - apparmor (needs testing)
5 # - add a subpackage (kernel-firmware?) for ~35 firmware files
9 # - pom-ng quake3-conntrack-nat -> nf_conntrack ?
10 # - pom-ng talk-conntrack-nat -> nf_conntrack ?
12 # - pax hooks for selinux (experimental)
15 %bcond_without source # don't build kernel-source package
16 %bcond_without pcmcia # don't build pcmcia
18 %bcond_with verbose # verbose build (V=1)
19 %bcond_with xen0 # added Xen0 support
20 %bcond_with xenU # added XenU support
21 %bcond_without reiser4 # support for reiser4 fs (experimental)
23 %bcond_without grsecurity # don't build grsecurity nor pax at all
24 %bcond_without grsec_minimal # build only minimal subset (proc,link,fifo,shm)
25 %bcond_with grsec_full # build full grsecurity
26 %bcond_with pax_full # build pax and full grsecurity (ie. grsec_full && pax)
27 %bcond_with pax # build pax support
29 %bcond_with fbcondecor # build fbcondecor (disable FB_TILEBLITTING and affected fb modules)
30 %bcond_with pae # build PAE (HIGHMEM64G) support on uniprocessor
31 %bcond_with nfsroot # build with root on NFS support
33 %bcond_without imq # imq support
34 %bcond_without wrr # wrr support
35 %bcond_without ipv6 # ipv6 support
37 %bcond_without vserver # support for VServer (enabled by default)
38 %bcond_without tuxonice # support for tuxonice (ex-suspend2) (enabled by default)
39 %bcond_with apparmor # build kernel with apparmor (exerimental mix)
41 %bcond_with rescuecd # build kernel for our rescue
43 %bcond_without smp # build uniprocessor instead of SMP kernel
44 %bcond_with myown # build with your own config (kernel-myown.config)
46 %{?debug:%define with_verbose 1}
48 %if %{without grsecurity}
49 %undefine with_grsec_full
50 %undefine with_grsec_minimal
52 %undefine with_pax_full
56 %undefine with_grsec_minimal
57 %define with_grsec_full 1
58 %define with_grsecurity 1
62 %if %{with grsec_full}
63 %undefine with_grsec_minimal
64 %define with_grsecurity 1
66 %define with_pax_full 1
70 %if %{with grsec_minimal}
71 %undefine with_grsec_full
72 %undefine with_pax_full
73 %define with_grsecurity 1
81 %undefine with_tuxonice
82 %undefine with_grsec_full
83 %undefine with_grsec_minimal
85 %undefine with_pax_full
86 %undefine with_vserver
91 %ifarch %{ix86} alpha ppc
103 %define basever 2.6.27
107 %define _enable_debug_packages 0
109 %define squashfs_version 3.3
110 %define tuxonice_version 3.0-rc7a
111 %define netfilter_snap 20070806
112 %define xen_version 3.0.2
114 %define _alt_kernel %{?with_pax:-pax}%{?with_grsec_full:-grsecurity}%{?with_xen0:-xen0}%{?with_xenU:-xenU}%{?with_rescuecd:-rescuecd}%{?with_pae:-pae}%{?with_myown:-myown}%{?with_apparmor:-aa}
116 # kernel release (used in filesystem and eventually in uname -r)
117 # modules will be looked from /lib/modules/%{kernel_release}
118 # localversion is just that without version for "> localversion"
119 %define localversion %{rel}
120 %define kernel_release %{version}%{?_alt_kernel:%{_alt_kernel}}-%{localversion}
122 Summary: The Linux kernel (the core of the Linux operating system)
123 Summary(de.UTF-8): Der Linux-Kernel (Kern des Linux-Betriebssystems)
124 Summary(et.UTF-8): Linuxi kernel (ehk operatsioonisüsteemi tuum)
125 Summary(fr.UTF-8): Le Kernel-Linux (La partie centrale du systeme)
126 Summary(pl.UTF-8): JÄ…dro Linuksa
127 Name: kernel%{_alt_kernel}
128 Version: %{basever}%{postver}
133 Source0: http://www.kernel.org/pub/linux/kernel/v2.6/linux-%{basever}.tar.bz2
134 # Source0-md5: b3e78977aa79d3754cb7f8143d7ddabd
135 %if "%{postver}" != "%{nil}"
136 Source1: http://www.kernel.org/pub/linux/kernel/v2.6/patch-%{version}.bz2
137 # Source1-md5: fa7cb6cf1ee5e796e89905806ffc6f01
140 Source3: kernel-autoconf.h
141 Source4: kernel-config.h
142 Source5: kernel-ppclibs.Makefile
143 Source6: kernel-config.awk
144 Source7: kernel-module-build.pl
145 Source8: kernel-track-config-change.awk
146 # not used by kernel.spec, but it's good to have it in SOURCES
147 Source9: kernel-config-sort.pl
149 Source20: kernel-multiarch.config
150 Source21: kernel-x86.config
151 Source22: kernel-sparc.config
152 Source23: kernel-sparc64.config
153 Source24: kernel-alpha.config
154 Source25: kernel-powerpc.config
155 Source26: kernel-ia64.config
157 Source40: kernel-netfilter.config
158 Source41: kernel-patches.config
159 Source42: kernel-tuxonice.config
160 Source43: kernel-vserver.config
161 Source45: kernel-grsec.config
162 Source46: kernel-xen0.config
163 Source47: kernel-xenU.config
165 Source49: kernel-pax.config
166 Source50: kernel-no-pax.config
167 Source51: kernel-grsec_minimal.config
168 Source55: kernel-imq.config
169 Source56: kernel-reiser4.config
170 Source57: kernel-wrr.config
172 Source58: kernel-inittmpfs.config
173 Source59: kernel-bzip2-lzma.config
175 # tahoe9xx http://www.tahoe.pl/drivers/tahoe9xx-2.6.24.patch
176 Patch2: tahoe9xx-2.6.24.patch
178 # http://dev.gentoo.org/~spock/projects/fbcondecor/archive/fbcondecor-0.9.4-2.6.25-rc6.patch
179 Patch3: kernel-fbcondecor.patch
180 Patch4: linux-fbcon-margins.patch
182 # based on http://mesh.dl.sourceforge.net/sourceforge/squashfs/squashfs3.3.tgz
183 # squashfs3.3/kernel-patches/linux-2.6.24/squashfs3.3-patch
184 Patch5: kernel-squashfs.patch
185 Patch6: linux-static-dev.patch
187 # netfilter related stuff mostly based on patch-o-matic-ng
188 # snapshot 20061213 with some fixes related to changes in
189 # netfilter api in 2.6.19 up to 2.6.22. Some modules
190 # were ported to nf_conntrack. Some of these are unique.
192 Patch10: kernel-pom-ng-IPV4OPTSSTRIP.patch
193 Patch11: kernel-pom-ng-ipv4options.patch
195 Patch14: kernel-pom-ng-ROUTE.patch
196 Patch16: kernel-pom-ng-mms-conntrack-nat.patch
197 Patch22: kernel-pom-ng-rsh.patch
198 Patch23: kernel-pom-ng-rpc.patch
200 # based on http://mike.it-loops.com/rtsp/rtsp-2.6.26.patch
201 Patch36: kernel-nf_rtsp.patch
203 # http://ftp.linux-vserver.org/pub/people/dhozac/p/k/delta-owner-xid-feat02.diff
204 Patch37: kernel-owner-xid.patch
206 # based on http://www.svn.barbara.eu.org/ipt_account/attachment/wiki/Software/ipt_account-0.1.21-20070804164729.tar.gz?format=raw
207 Patch38: kernel-ipt_account.patch
209 # based on http://www.intra2net.com/de/produkte/opensource/ipt_account/pom-ng-ipt_ACCOUNT-1.12.tgz
210 Patch39: kernel-ipt_ACCOUNT.patch
212 # kernel-2.6.25-layer7-2.18.patch from
213 # http://switch.dl.sourceforge.net/sourceforge/l7-filter/netfilter-layer7-v2.18.tar.gz
214 Patch40: kernel-layer7.patch
216 # http://www.ssi.bg/~ja/nfct/ipvs-nfct-2.6.25-1.diff
217 Patch41: kernel-ipvs-nfct.patch
219 # based on http://www.balabit.com/downloads/files/tproxy/tproxy-kernel-2.6.25-20080509-164605-1210344365.tar.bz2
220 #FIXME: this patch needs net_device->nd_dev feature (see net/Kconfig:NET_NS).
221 # NET_NS depends on EXPERIMENTAL && !SYSFS && NAMESPACES while we have SYSFS enabled.
222 # the https://lists.linux-foundation.org/pipermail/containers/2007-December/008849.html is waiting for merge.
223 #Patch42: kernel-tproxy.patch
227 # http://zph.bratcheda.org/linux-2.6.25-zph.patch
228 Patch49: kernel-zph.patch
230 # based on http://www.linuximq.net/patchs/linux-2.6.24-imq.diff
231 # some people report problems when using imq with wrr.
232 # try unoficial version: http://kapturkiewicz.name/linux-2.6.25-imq1.diff
233 Patch50: kernel-imq.patch
235 # http://www.kernel.org/pub/linux/kernel/people/edward/reiser4/reiser4-for-2.6/reiser4-for-2.6.27.patch.bz2
236 Patch51: kernel-reiser4.patch
238 # http://www.zz9.dk/patches/wrr-linux-071203-2.6.25.patch.gz
239 Patch52: kernel-wrr.patch
241 # http://fatooh.org/esfq-2.6/sfq-2.6.24.1.tar.bz2
242 Patch53: esfq-kernel.patch
244 # http://memebeam.org/free-software/toshiba_acpi/toshiba_acpi-dev_toshiba_test5-linux_2.6.26.patch
245 Patch54: linux-2.6-toshiba_acpi.patch
247 # by Baggins request:
248 # derived from ftp://ftp.cmf.nrl.navy.mil/pub/chas/linux-atm/vbr/vbr-kernel-diffs
249 Patch55: linux-2.6-atm-vbr.patch
250 Patch56: linux-2.6-atmdd.patch
252 # http://www.ntop.org/PF_RING.html 20070610
253 Patch58: linux-PF_RING.patch
255 # http://synce.svn.sourceforge.net/svnroot/synce/trunk/patches/linux-2.6.22-rndis_host-wm5.patch
256 Patch59: kernel-rndis_host-wm5.patch
258 Patch61: kernel-vesa-upstream.patch
260 # Project suspend2 renamed to tuxonice
261 # http://www.tuxonice.net/downloads/all/tuxonice-3.0-rc7a-for-2.6.26.patch.bz2
262 Patch69: linux-2.6-suspend2.patch
263 Patch70: kernel-suspend2-headers.patch
264 Patch71: linux-2.6-suspend2-page.patch
265 Patch72: kernel-2.6-ueagle-atm-freezer.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: hostap-kernel-2.6.18.patch
271 # http://vserver.13thfloor.at/Experimental/patch-2.6.27.3-vs2.3.0.35.7.diff
272 Patch100: linux-2.6-vs2.3.patch
273 Patch101: kernel-vserver-fixes.patch
275 # from http://www.cl.cam.ac.uk/Research/SRG/netos/xen/downloads/xen-3.0.2-src.tgz
276 #Patch120: xen-3.0-2.6.16.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: linux-2.6-forcedeth-WON.patch
282 # http://download.filesystems.org/unionfs/unionfs-2.x/unionfs-2.4_for_2.6.26.diff.gz
283 Patch140: kernel-unionfs.patch
285 Patch200: linux-2.6-ppc-ICE-hacks.patch
287 # The following patch extend the routing functionality in Linux
288 # to support static routes (defined by user), new way to use the
289 # alternative routes, the reverse path protection (rp_filter),
290 # the NAT processing to use correctly the routing when multiple
292 # http://www.ssi.bg/~ja/routes-2.6.27-15.diff
293 Patch300: kernel-routes.patch
295 Patch1000: linux-2.6-grsec-minimal.patch
297 Patch2000: kernel-small_fixes.patch
298 Patch2001: linux-2.6.21.1-pwc-uncompress.patch
300 # kill some thousands of warnings
301 # (only warnings, so just remove parts of this patch if conflics)
302 Patch2500: linux-2.6-warnings.patch
304 # based on https://forgesvn1.novell.com/svn/apparmor/trunk/kernel-patches/2.6.27 rev 1303
305 # repatched and adapted for vserver/grsec changes in vfs API, experimental
306 Patch5000: kernel-apparmor.patch
307 # with grsec_full version
308 Patch5001: kernel-apparmor-after-grsec_full.patch
309 Patch5002: kernel-apparmor-common.patch
312 # based on http://ftp.leg.uct.ac.za/pub/linux/rip/inittmpfs-2.6.14.diff.gz
313 Patch7000: kernel-inittmpfs.patch
314 # based on http://www.udpcast.linux.lu/download/bzip2-lzma-kernel-2.6.23.12.patch.gz
315 Patch7001: kernel-bzip2-lzma.patch
318 Patch9997: pax_selinux_hooks-2.6.20.patch
320 # based on http://www.grsecurity.net/~paxguy1/pax-linux-2.6.24.6-test45.patch
321 Patch9998: kernel-pax.patch
323 # based on http://www.grsecurity.net/~spender/grsecurity-2.1.12-2.6.27.4-200810272314.patch
324 Patch9999: linux-2.6-grsec_full.patch
325 Patch10000: linux-2.6-grsec-caps.patch
326 Patch10001: linux-2.6-grsec-common.patch
327 Patch10002: kernel-grsec_fixes.patch
329 URL: http://www.kernel.org/
330 BuildRequires: binutils >= 3:2.14.90.0.7
331 %ifarch sparc sparc64
332 BuildRequires: elftoaout
335 BuildRequires: uboot-mkimage
337 BuildRequires: /sbin/depmod
338 BuildRequires: gcc >= 5:3.2
339 %{?with_rescuecd:BuildRequires: lzma >= 1:4.42.2}
340 # for hostname command
341 BuildRequires: net-tools
342 BuildRequires: perl-base
343 BuildRequires: rpmbuild(macros) >= 1.217
345 Requires(post): coreutils
346 Requires(post): geninitrd >= 2.57
347 Requires(post): module-init-tools >= 0.9.9
348 Requires: /sbin/depmod
350 Requires: geninitrd >= 2.57
351 Requires: module-init-tools >= 0.9.9
352 Provides: %{name}(netfilter) = %{netfilter_snap}
353 Provides: %{name}(vermagic) = %{kernel_release}
354 %if %{with xen0} || %{with xenU}
355 Provides: kernel(xen) = %{_xen_version}
357 Obsoletes: kernel-misc-acer_acpi
358 Obsoletes: kernel-misc-fuse
359 Obsoletes: kernel-misc-uvc
360 Obsoletes: kernel-modules
361 Obsoletes: kernel-net-ar81
362 Obsoletes: kernel-net-hostap
363 Obsoletes: kernel-net-ieee80211
364 Obsoletes: kernel-net-ipp2p
365 Obsoletes: kernel-net-rt61
366 Obsoletes: kernel-smp
367 Obsoletes: kernel%{_alt_kernel}-isdn-mISDN
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:071
382 Conflicts: util-linux < 2.10o
383 Conflicts: xfsprogs < 2.6.0
384 %if %{with xen0} || %{with xenU} || %{with pae}
385 ExclusiveArch: %{ix86}
387 ExcludeArch: i386 i486 i586
390 ExclusiveArch: %{ix86} %{x8664} alpha arm ia64 ppc ppc64 sparc sparc64
393 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
395 %ifarch %{ix86} %{x8664}
396 %define target_arch_dir x86
399 %define target_arch_dir powerpc
401 %ifnarch %{ix86} %{x8664} ppc ppc64
402 %define target_arch_dir %{_target_base_arch}
405 %define defconfig arch/%{target_arch_dir}/defconfig
407 # No ELF objects there to strip (skips processing 27k files)
408 %define _noautostrip .*%{_kernelsrcdir}/.*
409 %define _noautochrpath .*%{_kernelsrcdir}/.*
412 %define initrd_dir /boot/efi
414 %define initrd_dir /boot
417 %define _kernelsrcdir /usr/src/linux%{_alt_kernel}-%{version}
419 %if "%{_target_base_arch}" != "%{_arch}"
420 %define CrossOpts ARCH=%{_target_base_arch} CROSS_COMPILE=%{_target_cpu}-pld-linux-
421 %define DepMod /bin/true
423 %if "%{_arch}" == "sparc" && "%{_target_base_arch}" == "sparc64"
424 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
425 %define DepMod /sbin/depmod
428 %if "%{_arch}" == "sparc64" && "%{_target_base_arch}" == "sparc"
429 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
430 %define DepMod /sbin/depmod
433 %if "%{_arch}" == "x86_64" && "%{_target_base_arch}" == "i386"
434 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
435 %define DepMod /sbin/depmod
438 %if "%{_target_base_arch}" == ppc || "%{_target_base_arch}" == "ppc64"
439 %define CrossOpts ARCH=powerpc CROSS_COMPILE=%{_target_cpu}-pld-linux-
443 %define CrossOpts ARCH=powerpc CC="%{__cc}"
445 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
447 %define DepMod /sbin/depmod
449 %define MakeOpts %{CrossOpts} HOSTCC="%{__cc}"
451 %define __features Netfilter module dated: %{netfilter_snap}\
452 %{?with_grsec_full:Grsecurity full support - enabled}\
453 %{?with_pax:PaX support - enabled}\
454 %{?with_xen0:Xen 0 - enabled}\
455 %{?with_xenU:Xen U - enabled}\
456 %{?with_fbcondecor:Fbsplash/fbcondecor - enabled }\
457 %{?with_nfsroot:Root on NFS - enabled}
459 %define Features %(echo "%{__features}" | sed '/^$/d')
462 This package contains the Linux kernel that is used to boot and run
463 your system. It contains few device drivers for specific hardware.
464 Most hardware is instead supported by modules loaded after booting.
468 %description -l de.UTF-8
469 Das Kernel-Paket enthält den Linux-Kernel (vmlinuz), den Kern des
470 Linux-Betriebssystems. Der Kernel ist für grundliegende
471 Systemfunktionen verantwortlich: Speicherreservierung,
472 Prozeß-Management, Geräte Ein- und Ausgaben, usw.
476 %description -l fr.UTF-8
477 Le package kernel contient le kernel linux (vmlinuz), la partie
478 centrale d'un système d'exploitation Linux. Le noyau traite les
479 fonctions basiques d'un système d'exploitation: allocation mémoire,
480 allocation de process, entrée/sortie de peripheriques, etc.
484 %description -l pl.UTF-8
485 Pakiet zawiera jądro Linuksa niezbędne do prawidłowego działania
486 Twojego komputera. Zawiera w sobie sterowniki do sprzętu znajdującego
487 się w komputerze, takiego jak sterowniki dysków itp.
492 Summary: vmlinux - uncompressed kernel image
493 Summary(de.UTF-8): vmlinux - dekompressiertes Kernel Bild
494 Summary(pl.UTF-8): vmlinux - rozpakowany obraz jÄ…dra
496 Obsoletes: kernel-smp-vmlinux
499 vmlinux - uncompressed kernel image.
501 %description vmlinux -l de.UTF-8
502 vmlinux - dekompressiertes Kernel Bild.
504 %description vmlinux -l pl.UTF-8
505 vmlinux - rozpakowany obraz jÄ…dra.
508 Summary: DRM kernel modules
509 Summary(de.UTF-8): DRM Kernel Treiber
510 Summary(pl.UTF-8): Sterowniki DRM
512 Requires(postun): %{name} = %{epoch}:%{version}-%{release}
513 Requires: %{name} = %{epoch}:%{version}-%{release}
514 Obsoletes: kernel-smp-drm
520 %description drm -l de.UTF-8
523 %description drm -l pl.UTF-8
527 Summary: PCMCIA modules
528 Summary(de.UTF-8): PCMCIA Module
529 Summary(pl.UTF-8): Moduły PCMCIA
531 Requires(postun): %{name} = %{epoch}:%{version}-%{release}
532 Requires: %{name} = %{epoch}:%{version}-%{release}
533 Obsoletes: kernel-smp-pcmcia
534 Conflicts: pcmcia-cs < 3.1.21
535 Conflicts: pcmciautils < 004
541 %description pcmcia -l de.UTF-8
544 %description pcmcia -l pl.UTF-8
548 Summary: Libraries for preparing bootable kernel on PowerPCs
549 Summary(pl.UTF-8): Biblioteki do przygotowania bootowalnego jÄ…dra dla PowerPC
551 Requires: %{name} = %{epoch}:%{version}-%{release}
552 Requires: mkvmlinuz >= 1.3
553 Obsoletes: kernel-smp-libs
557 Libraries for preparing bootable kernel on PowerPCs. Script called
558 mkvmlinuz may be useful for this.
560 %description libs -l pl.UTF-8
561 Biblioteki do przygotowania bootowalnego jÄ…dra dla PowerPC. Skrypt
562 mkvmlinuz może być do tego przydatny.
565 Summary: ALSA kernel modules
566 Summary(de.UTF-8): ALSA Kernel Module
567 Summary(pl.UTF-8): Sterowniki dźwięku ALSA
569 Requires(postun): %{name} = %{epoch}:%{version}-%{release}
570 Requires: %{name} = %{epoch}:%{version}-%{release}
571 Obsoletes: kernel-smp-sound-alsa
574 %description sound-alsa
575 ALSA (Advanced Linux Sound Architecture) sound drivers.
577 %description sound-alsa -l de.UTF-8
578 ALSA (Advanced Linux Sound Architecture) Sound-Treiber.
580 %description sound-alsa -l pl.UTF-8
581 Sterowniki dźwięku ALSA (Advanced Linux Sound Architecture).
584 Summary: OSS kernel modules
585 Summary(de.UTF-8): OSS Kernel Module
586 Summary(pl.UTF-8): Sterowniki dźwięku OSS
588 Requires(postun): %{name} = %{epoch}:%{version}-%{release}
589 Requires: %{name} = %{epoch}:%{version}-%{release}
590 Obsoletes: kernel-smp-sound-oss
593 %description sound-oss
594 OSS (Open Sound System) drivers.
596 %description sound-oss -l de.UTF-8
597 OSS (Open Sound System) Treiber.
599 %description sound-oss -l pl.UTF-8
600 Sterowniki dźwięku OSS (Open Sound System).
603 Summary: Header files for the Linux kernel
604 Summary(de.UTF-8): Header Dateien für den Linux-Kernel
605 Summary(pl.UTF-8): Pliki nagłówkowe jądra Linuksa
606 Group: Development/Building
607 Provides: %{name}-headers(netfilter) = %{netfilter_snap}
611 These are the C header files for the Linux kernel, which define
612 structures and constants that are needed when rebuilding the kernel or
613 building kernel modules.
615 %description headers -l de.UTF-8
616 Dies sind die C Header Dateien für den Linux-Kernel, die definierte
617 Strukturen und Konstante beinhalten, die beim rekompilieren des
618 Kernels oder bei Kernel Modul kompilationen gebraucht werden.
620 %description headers -l pl.UTF-8
621 Pakiet zawiera pliki nagłówkowe jądra, niezbędne do rekompilacji jądra
622 oraz budowania modułów jądra.
624 %package module-build
625 Summary: Development files for building kernel modules
626 Summary(de.UTF-8): Development Dateien die beim Kernel Modul kompilationen gebraucht werden
627 Summary(pl.UTF-8): Pliki służące do budowania modułów jądra
628 Group: Development/Building
629 Requires: %{name}-headers = %{epoch}:%{version}-%{release}
630 Conflicts: rpmbuild(macros) < 1.321
633 %description module-build
634 Development files from kernel source tree needed to build Linux kernel
635 modules from external packages.
637 %description module-build -l de.UTF-8
638 Development Dateien des Linux-Kernels die beim kompilieren externer
639 Kernel Module gebraucht werden.
641 %description module-build -l pl.UTF-8
642 Pliki ze drzewa źródeł jądra potrzebne do budowania modułów jądra
643 Linuksa z zewnętrznych pakietów.
646 Summary: Kernel source tree
647 Summary(de.UTF-8): Der Kernel Quelltext
648 Summary(pl.UTF-8): Kod źródłowy jądra Linuksa
649 Group: Development/Building
650 Requires: %{name}-module-build = %{epoch}:%{version}-%{release}
654 This is the source code for the Linux kernel. You can build a custom
655 kernel that is better tuned to your particular hardware.
657 %description source -l de.UTF-8
658 Das Kernel-Source-Paket enthält den source code (C/Assembler-Code) des
659 Linux-Kernels. Die Source-Dateien werden gebraucht, um viele
660 C-Programme zu kompilieren, da sie auf Konstanten zurückgreifen, die
661 im Kernel-Source definiert sind. Die Source-Dateien können auch
662 benutzt werden, um einen Kernel zu kompilieren, der besser auf Ihre
663 Hardware ausgerichtet ist.
665 %description source -l fr.UTF-8
666 Le package pour le kernel-source contient le code source pour le noyau
667 linux. Ces sources sont nécessaires pour compiler la plupart des
668 programmes C, car il dépend de constantes définies dans le code
669 source. Les sources peuvent être aussi utilisée pour compiler un noyau
670 personnalisé pour avoir de meilleures performances sur des matériels
673 %description source -l pl.UTF-8
674 Pakiet zawiera kod źródłowy jądra systemu.
677 Summary: Kernel documentation
678 Summary(de.UTF-8): Kernel Dokumentation
679 Summary(pl.UTF-8): Dokumentacja do jÄ…dra Linuksa
684 This is the documentation for the Linux kernel, as found in
685 /usr/src/linux/Documentation directory.
687 %description doc -l de.UTF-8
688 Dies ist die Kernel Dokumentation wie sie im 'Documentation'
689 Verzeichniss vorgefunden werden kann.
691 %description doc -l pl.UTF-8
692 Pakiet zawiera dokumentacjÄ™ do jÄ…dra Linuksa pochodzÄ…cÄ… z katalogu
693 /usr/src/linux/Documentation.
696 %setup -q -n linux-%{basever}
698 # hack against warning in pax/grsec
700 sed -i 's/-Werror//' arch/alpha/kernel/Makefile
704 install %{SOURCE5} Makefile.ppclibs
707 %if "%{postver}" != "%{nil}"
708 %{__bzip2} -dc %{SOURCE1} | patch -p1 -s
713 ##ifarch %{ix86} %{x8664} ia64 ppc alpha
717 # kernel-2.6-ueagle-atm-freezer.patch
723 %if %{with fbcondecor}
736 # kernel-pom-ng-IPV4OPTSSTRIP.patch
739 # kernel-pom-ng-ipv4options.patch
742 # kernel-pom-ng-ROUTE.patch
745 # kernel-pom-ng-mms-conntrack-nat.patch
748 # kernel-pom-ng-rsh.patch
751 # kernel-pom-ng-rpc.patch
754 # kernel-nf_rtsp.patch
757 # kernel-owner-xid.patch
762 # kernel-ipt_account.patch
765 # kernel-ipt_ACCOUNT.patch
768 # kernel-layer7.patch
769 #%%patch40 -p1 # NEEDS UPDATE
805 # kernel-rndis_host-wm5.patch
810 # hostap enhancements from/for aircrack-ng
819 #%if %{with xen0} || %{with xenU}
820 #%ifarch %{ix86} %{x8664} ia64
826 %if %{without rescuecd} && %{with vserver}
843 # grsecurity & pax stuff
847 %{?with_vserver:%patch10000 -p1}
848 %{?with_vserver:%patch10001 -p1}
849 %{?with_vserver:%patch10002 -p1}
852 %if %{with grsec_full}
854 %{?with_vserver:%patch10000 -p1}
855 %{?with_vserver:%patch10001 -p1}
856 %{?with_vserver:%patch10002 -p1}
858 %if %{with grsec_minimal}
860 # remember that we have the same config file for grsec_minimal and
861 # grsec_full, but the patches are different.
866 # now we have an separate testing pax-only patch - in the future we
867 # could have single grsecurity patch and will have to prepare separate
868 # configs for grsec_minimal, grsec_full and pax to support such
869 # configurations like pax & grsec_minimal.
870 # So, in a future there could be no patch9998, but only config
871 # would tell which options should be enabled.
872 # The second option is to maintain separate pax-only patch.
874 #patch9997 -p1 - needs update
880 # end of grsecurity & pax stuff
884 %if %{with grsec_full} || %{with pax_full}
904 # Fix EXTRAVERSION in main Makefile
905 sed -i 's#EXTRAVERSION =.*#EXTRAVERSION = %{postver}%{?_alt_kernel:%{_alt_kernel}}#g' Makefile
907 # on sparc this line causes CONFIG_INPUT=m (instead of =y), thus breaking build
908 sed -i -e '/select INPUT/d' net/bluetooth/hidp/Kconfig
910 # on sparc64 avoid building break due to NULL pointer type warrning
911 sed -i -e 's/^EXTRA_CFLAGS := -Werror/EXTRA_CFLAGS := /' arch/sparc64/kernel/Makefile
913 # cleanup backups after patching
914 find '(' -name '*~' -o -name '*.orig' -o -name '.gitignore' ')' -print0 | xargs -0 -r -l512 rm -f
921 CONFIG_PAX_SEGMEXEC=y
922 # performance impact on CPUs without NX bit
923 CONFIG_PAX_PAGEEXEC=n
926 CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM=n
932 CONFIG_PAX_NOELFRELOCS=n
935 CONFIG_PAX_EMUTRAMP=y
936 CONFIG_PAX_EMUSIGRT=y
940 %ifarch sparc sparc64 alpha
944 # Now we have to check MAC system integration. Grsecurity (full) uses PAX_HAVE_ACL_FLAGS
945 # setting (direct acces). grsec_minimal probably have no idea about PaX so we probably
946 # could use PAX_NO_ACL_FLAGS, but for testing the hooks setting will be used
947 # PAX_HOOK_ACL_FLAGS. SELinux should also be able to make PaX settings via hooks
949 %if %{with grsec_full}
950 # Hardening grsec options if with pax
951 CONFIG_GRKERNSEC_PROC_MEMMAP=y
952 # almost rational (see HIDESYM help)
953 CONFIG_GRKERNSEC_HIDESYM=y
955 # no change needed CONFIG=PAX_HAVE_ACL_FLAGS=y is taken from the kernel-pax.config
957 # selinux or other hooks?
958 CONFIG_PAX_HAVE_ACL_FLAGS=n
959 CONFIG_PAX_HOOK_ACL_FLAGS=y
969 # CONFIG_SOUND is not set
970 # CONFIG_AUDIT is not set
971 # CONFIG_TR is not set
972 # CONFIG_BT is not set
973 # CONFIG_VIDEO_DEV is not set
974 # CONFIG_DVB_CORE is not set
975 # CONFIG_HAMRADIO is not set
976 # CONFIG_ARCNET is not set
977 # CONFIG_FB is not set
978 # CONFIG_DRM is not set
979 # CONFIG_WATCHDOG is not set
980 # CONFIG_INPUT_JOYSTICK is not set
981 # CONFIG_DEBUG_KERNEL is not set
982 # CONFIG_ISDN is not set
983 # CONFIG_AGP is not set
984 # CONFIG_SECURITY is not set
985 # CONFIG_PARIDE is not set
986 # CONFIG_CPU_FREQ is not set
987 # CONFIG_GAMEPORT is not set
988 # CONFIG_KVM is not set
989 # CONFIG_PHONE is not set
990 CONFIG_BLK_DEV_LOOP=y
1002 Config="kernel-%{target_arch_dir}.config"
1003 echo "Building config file for %{_target_cpu} using $Config et al."
1005 # prepare local and important options
1006 cat <<-EOCONFIG > important.config
1009 CONFIG_DEBUG_SLAB_LEAK=y
1010 CONFIG_DEBUG_PREEMPT=y
1011 CONFIG_RT_DEADLOCK_DETECT=y
1018 # apparmor, will be moved to external file if works
1019 %if %{with apparmor}
1020 CONFIG_SECURITY_APPARMOR=y
1021 CONFIG_SECURITY_APPARMOR_BOOTPARAM_VALUE=1
1022 CONFIG_SECURITY_APPARMOR_DISABLE=n
1023 # patch for unionfs not ready yet
1025 # some conflict with smack, todo
1026 CONFIG_SECURITY_SMACK=n
1033 %ifarch i686 athlon pentium3 pentium4
1041 %if %{without pcmcia}
1045 %if %{with fbcondecor}
1049 CONFIG_FB_TILEBLITTING=n
1050 CONFIG_FB_CON_DECOR=y
1058 # Temporary disabled RELOCATABLE. Needed only on x86??
1059 %if %{with pax} || %{with grsec_full}
1060 CONFIG_RELOCATABLE=n
1064 RescueConfig rescue.config
1065 PaXconfig pax.config
1067 # prepare kernel-style config file from multiple config files
1068 %{__awk} -v arch="all %{target_arch_dir} %{_target_base_arch} %{_target_cpu}" -f %{SOURCE6} \
1070 %if %{with rescuecd}
1082 %if %{with pax_full}
1087 %if %{with grsec_full}
1091 %if %{with grsec_minimal}
1113 %if %{with tuxonice}
1114 %ifarch %{ix86} %{x8664} ia64 ppc ppc64
1118 %{SOURCE40} %{?0:netfilter} \
1119 %{SOURCE41} %{?0:patches} \
1121 $RPM_SOURCE_DIR/$Config \
1127 echo "Building kernel $1 ..."
1128 install .config %{defconfig}
1129 %{__make} %{MakeOpts} mrproper \
1130 RCS_FIND_IGNORE='-name build-done -prune -o'
1131 ln -sf %{defconfig} .config
1133 %{__make} %{MakeOpts} clean \
1134 RCS_FIND_IGNORE='-name build-done -prune -o'
1135 %{__make} %{MakeOpts} include/linux/version.h \
1136 %{?with_verbose:V=1}
1138 %{__make} %{MakeOpts} scripts/mkcompile_h \
1139 %{?with_verbose:V=1}
1141 # make does vmlinux, modules and bzImage at once
1143 %{__make} %{MakeOpts} image \
1144 %{?with_verbose:V=1}
1146 %{__make} %{MakeOpts} modules \
1147 %{?with_verbose:V=1}
1149 %{__make} %{MakeOpts} \
1150 %{?with_verbose:V=1}
1154 PreInstallKernel() {
1155 Config="%{_target_base_arch}"
1156 KernelVer=%{kernel_release}
1158 mkdir -p $KERNEL_INSTALL_DIR/boot
1159 install System.map $KERNEL_INSTALL_DIR/boot/System.map-$KernelVer
1160 %ifarch %{ix86} %{x8664}
1161 install arch/x86/boot/bzImage $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
1162 install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinux-$KernelVer
1164 %ifarch alpha sparc sparc64
1165 gzip -cfv vmlinux > vmlinuz
1166 install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinux-$KernelVer
1167 install vmlinuz $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
1169 elftoaout arch/sparc/boot/image -o vmlinux.aout
1170 install vmlinux.aout $KERNEL_INSTALL_DIR/boot/vmlinux.aout-$KernelVer
1173 elftoaout arch/sparc64/boot/image -o vmlinux.aout
1174 install vmlinux.aout $KERNEL_INSTALL_DIR/boot/vmlinux.aout-$KernelVer
1178 install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinux-$KernelVer
1179 install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
1182 %{__make} -f Makefile.ppclibs install \
1183 DESTDIR=$KERNEL_INSTALL_DIR/boot/libs-$KernelVer
1186 gzip -cfv vmlinux > vmlinuz
1187 install -d $KERNEL_INSTALL_DIR/boot/efi
1188 install vmlinuz $KERNEL_INSTALL_DIR/boot/efi/vmlinuz-$KernelVer
1189 ln -sf efi/vmlinuz-$KernelVer $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
1192 install arch/arm/boot/zImage $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
1195 %{__make} %{MakeOpts} modules_install firmware_install \
1196 %{?with_verbose:V=1} \
1198 INSTALL_MOD_PATH=$KERNEL_INSTALL_DIR \
1199 INSTALL_FW_PATH=$KERNEL_INSTALL_DIR/lib/firmware/$KernelVer \
1200 KERNELRELEASE=$KernelVer
1202 # You'd probabelly want to make it somewhat different
1203 install -d $KERNEL_INSTALL_DIR%{_kernelsrcdir}
1204 install Module.symvers $KERNEL_INSTALL_DIR%{_kernelsrcdir}/Module.symvers-dist
1206 echo "CHECKING DEPENDENCIES FOR KERNEL MODULES"
1207 if [ %DepMod = /sbin/depmod ]; then
1208 /sbin/depmod --basedir $KERNEL_INSTALL_DIR -ae -F $KERNEL_INSTALL_DIR/boot/System.map-$KernelVer -r $KernelVer || :
1210 touch $KERNEL_INSTALL_DIR/lib/modules/$KernelVer/modules.dep
1211 echo "KERNEL RELEASE $KernelVer DONE"
1214 KERNEL_BUILD_DIR=`pwd`
1215 echo "-%{localversion}" > localversion
1217 KERNEL_INSTALL_DIR="$KERNEL_BUILD_DIR/build-done/kernel"
1218 rm -rf $KERNEL_INSTALL_DIR
1219 %if %{without myown}
1222 cat $RPM_SOURCE_DIR/kernel-myown.config > %{defconfig}
1224 ln -sf %{defconfig} .config
1225 install -d $KERNEL_INSTALL_DIR%{_kernelsrcdir}/include/linux
1226 rm -f include/linux/autoconf.h
1227 %{__make} %{MakeOpts} include/linux/autoconf.h
1228 install include/linux/autoconf.h \
1229 $KERNEL_INSTALL_DIR%{_kernelsrcdir}/include/linux/autoconf-dist.h
1231 $KERNEL_INSTALL_DIR%{_kernelsrcdir}/config-dist
1233 %{__awk} %{?debug:-v dieOnError=1} -v infile=%{defconfig} -f %{SOURCE8} .config
1238 %{__make} %{MakeOpts} include/linux/utsrelease.h
1239 cp include/linux/utsrelease.h{,.save}
1240 cp include/linux/version.h{,.save}
1241 cp scripts/mkcompile_h{,.save}
1244 rm -rf $RPM_BUILD_ROOT
1247 export DEPMOD=%DepMod
1249 install -d $RPM_BUILD_ROOT%{_kernelsrcdir}
1250 install -d $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/%{kernel_release}
1252 # test if we can hardlink -- %{_builddir} and $RPM_BUILD_ROOT on same partition
1253 if cp -al COPYING $RPM_BUILD_ROOT/COPYING 2>/dev/null; then
1255 rm -f $RPM_BUILD_ROOT/COPYING
1258 KERNEL_BUILD_DIR=`pwd`
1260 cp -a$l $KERNEL_BUILD_DIR/build-done/kernel/* $RPM_BUILD_ROOT
1262 if [ -e $RPM_BUILD_ROOT/lib/modules/%{kernel_release} ] ; then
1263 rm -f $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/build
1264 ln -sf %{_kernelsrcdir} $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/build
1265 install -d $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/{cluster,misc}
1268 find . -maxdepth 1 ! -name "build-done" ! -name "." -exec cp -a$l "{}" "$RPM_BUILD_ROOT%{_kernelsrcdir}/" ";"
1270 cd $RPM_BUILD_ROOT%{_kernelsrcdir}
1272 %{__make} %{MakeOpts} mrproper archclean \
1273 RCS_FIND_IGNORE='-name build-done -prune -o'
1275 if [ -e $KERNEL_BUILD_DIR/build-done/kernel%{_kernelsrcdir}/include/linux/autoconf-dist.h ]; then
1276 install $KERNEL_BUILD_DIR/build-done/kernel%{_kernelsrcdir}/include/linux/autoconf-dist.h \
1277 $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux
1278 install $KERNEL_BUILD_DIR/build-done/kernel%{_kernelsrcdir}/config-dist \
1279 $RPM_BUILD_ROOT%{_kernelsrcdir}
1282 cp -Rdp$l $KERNEL_BUILD_DIR/include/linux/* \
1283 $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux
1285 %{__make} %{MakeOpts} mrproper
1286 mv -f include/linux/utsrelease.h.save $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux/utsrelease.h
1287 cp include/linux/version.h{.save,}
1288 cp scripts/mkcompile_h{.save,}
1289 rm -rf include/linux/version.h.save
1290 rm -rf scripts/mkcompile_h.save
1291 install %{SOURCE3} $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux/autoconf.h
1292 install %{SOURCE4} $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux/config.h
1294 # collect module-build files and directories
1295 perl %{SOURCE7} %{_kernelsrcdir} $KERNEL_BUILD_DIR
1298 touch $RPM_BUILD_ROOT%{initrd_dir}/initrd-%{kernel_release}.gz
1300 # rpm obeys filelinkto checks for ghosted symlinks, convert to files
1301 rm -f $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/{build,source}
1302 touch $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/{build,source}
1304 # remove unnecessary dir with dead symlink
1305 rm -rf $RPM_BUILD_ROOT/arch/i386
1308 rm -rf $RPM_BUILD_ROOT
1311 if [ -x /sbin/new-kernel-pkg ]; then
1312 /sbin/new-kernel-pkg --remove %{kernel_release}
1317 mv -f /boot/efi/vmlinuz{,.old} 2> /dev/null
1318 %{?_alt_kernel:mv -f /boot/efi/vmlinuz%{_alt_kernel}{,.old} 2> /dev/null}
1319 ln -sf vmlinuz-%{kernel_release} /boot/efi/vmlinuz
1320 %{?_alt_kernel:ln -sf vmlinuz-%{kernel_release} /boot/efi/vmlinuz%{_alt_kernel}}
1322 mv -f /boot/vmlinuz{,.old} 2> /dev/null
1323 %{?_alt_kernel:mv -f /boot/vmlinuz%{_alt_kernel}{,.old} 2> /dev/null}
1324 mv -f /boot/System.map{,.old} 2> /dev/null
1325 %{?_alt_kernel:mv -f /boot/System%{_alt_kernel}.map{,.old} 2> /dev/null}
1326 ln -sf vmlinuz-%{kernel_release} /boot/vmlinuz
1327 %{?_alt_kernel:ln -sf vmlinuz-%{kernel_release} /boot/vmlinuz%{_alt_kernel}}
1328 ln -sf System.map-%{kernel_release} /boot/System.map
1329 %{?_alt_kernel:ln -sf System.map-%{kernel_release} /boot/System.map%{_alt_kernel}}
1331 %depmod %{kernel_release}
1333 /sbin/geninitrd -f --initrdfs=rom %{initrd_dir}/initrd-%{kernel_release}.gz %{kernel_release}
1334 mv -f %{initrd_dir}/initrd{,.old} 2> /dev/null
1335 %{?_alt_kernel:mv -f %{initrd_dir}/initrd%{_alt_kernel}{,.old} 2> /dev/null}
1336 ln -sf initrd-%{kernel_release}.gz %{initrd_dir}/initrd
1337 %{?_alt_kernel:ln -sf initrd-%{kernel_release}.gz %{initrd_dir}/initrd%{_alt_kernel}}
1339 if [ -x /sbin/new-kernel-pkg ]; then
1340 if [ -f /etc/pld-release ]; then
1341 title=$(sed 's/^[0-9.]\+ //' < /etc/pld-release)
1346 ext='%{_alt_kernel}'
1351 /sbin/new-kernel-pkg --initrdfile=%{initrd_dir}/initrd-%{kernel_release}.gz --install %{kernel_release} --banner "$title"
1352 elif [ -x /sbin/rc-boot ]; then
1353 /sbin/rc-boot 1>&2 || :
1357 mv -f /boot/vmlinux{,.old} 2> /dev/null
1358 %{?alt_kernel:mv -f /boot/vmlinux-%{alt_kernel}{,.old} 2> /dev/null}
1359 ln -sf vmlinux-%{kernel_release} /boot/vmlinux
1360 %{?alt_kernel:ln -sf vmlinux-%{kernel_release} /boot/vmlinux-%{alt_kernel}}
1363 %{_sbindir}/mkvmlinuz /boot/zImage-%{kernel_release} %{kernel_release}
1366 %depmod %{kernel_release}
1369 %depmod %{kernel_release}
1372 %depmod %{kernel_release}
1375 %depmod %{kernel_release}
1378 %depmod %{kernel_release}
1381 %depmod %{kernel_release}
1384 %depmod %{kernel_release}
1387 %depmod %{kernel_release}
1390 ln -snf %{basename:%{_kernelsrcdir}} %{_prefix}/src/linux%{_alt_kernel}
1393 if [ "$1" = "0" ]; then
1394 if [ -L %{_prefix}/src/linux%{_alt_kernel} ]; then
1395 if [ "$(readlink %{_prefix}/src/linux%{_alt_kernel})" = "linux%{_alt_kernel}-%{version}" ]; then
1396 rm -f %{_prefix}/src/linux%{_alt_kernel}
1401 %triggerin module-build -- %{name} = %{epoch}:%{version}-%{release}
1402 ln -sfn %{_kernelsrcdir} /lib/modules/%{kernel_release}/build
1403 ln -sfn %{_kernelsrcdir} /lib/modules/%{kernel_release}/source
1405 %triggerun module-build -- %{name} = %{epoch}:%{version}-%{release}
1406 if [ "$1" = 0 ]; then
1407 rm -f /lib/modules/%{kernel_release}/{build,source}
1411 %defattr(644,root,root,755)
1412 %ifarch sparc sparc64
1413 /boot/vmlinux.aout-%{kernel_release}
1416 /boot/efi/vmlinuz-%{kernel_release}
1418 /boot/vmlinuz-%{kernel_release}
1419 /boot/System.map-%{kernel_release}
1420 %ghost %{initrd_dir}/initrd-%{kernel_release}.gz
1421 /lib/firmware/%{kernel_release}
1422 %dir /lib/modules/%{kernel_release}
1423 %dir /lib/modules/%{kernel_release}/kernel
1425 /lib/modules/%{kernel_release}/kernel/arch
1427 /lib/modules/%{kernel_release}/kernel/crypto
1428 /lib/modules/%{kernel_release}/kernel/drivers
1429 %if %{have_drm} && %{without myown}
1430 %exclude /lib/modules/%{kernel_release}/kernel/drivers/gpu
1432 /lib/modules/%{kernel_release}/kernel/fs
1434 # this directory will be removed after disabling rcutorture mod. in 2.6.20.
1435 /lib/modules/%{kernel_release}/kernel/kernel
1437 /lib/modules/%{kernel_release}/kernel/lib
1438 /lib/modules/%{kernel_release}/kernel/net
1439 %if %{have_sound} && %{without myown}
1440 %dir /lib/modules/%{kernel_release}/kernel/sound
1441 /lib/modules/%{kernel_release}/kernel/sound/ac97_bus.ko*
1442 /lib/modules/%{kernel_release}/kernel/sound/sound*.ko*
1444 %exclude /lib/modules/%{kernel_release}/kernel/drivers/media/video/cx88/cx88-alsa.ko*
1445 %exclude /lib/modules/%{kernel_release}/kernel/drivers/media/video/em28xx/em28xx-alsa.ko*
1446 %exclude /lib/modules/%{kernel_release}/kernel/drivers/media/video/saa7134/saa7134-alsa.ko*
1449 %dir /lib/modules/%{kernel_release}/misc
1450 %if %{with pcmcia} && %{without myown}
1451 %exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/[!p]*
1452 %exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/pd6729.ko*
1453 %exclude /lib/modules/%{kernel_release}/kernel/drivers/*/pcmcia
1454 %if %{without rescuecd}
1455 %exclude /lib/modules/%{kernel_release}/kernel/drivers/ata/pata_pcmcia.ko*
1456 %exclude /lib/modules/%{kernel_release}/kernel/drivers/bluetooth/*_cs.ko*
1457 %exclude /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/avm_cs.ko*
1458 %exclude /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/b1pcmcia.ko*
1459 %exclude /lib/modules/%{kernel_release}/kernel/drivers/telephony/ixj_pcmcia.ko*
1460 %exclude /lib/modules/%{kernel_release}/kernel/drivers/usb/gadget/g_midi.ko*
1462 %exclude /lib/modules/%{kernel_release}/kernel/drivers/ide/legacy/ide-cs.ko*
1463 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/*_cs.ko*
1464 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/b43
1465 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/hostap/hostap_cs.ko*
1466 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/libertas/*_cs.ko*
1467 %exclude /lib/modules/%{kernel_release}/kernel/drivers/parport/parport_cs.ko*
1468 %exclude /lib/modules/%{kernel_release}/kernel/drivers/serial/serial_cs.ko*
1469 %exclude /lib/modules/%{kernel_release}/kernel/drivers/usb/host/sl811_cs.ko*
1471 %ghost /lib/modules/%{kernel_release}/modules.*
1472 # symlinks pointing to kernelsrcdir
1473 %ghost /lib/modules/%{kernel_release}/build
1474 %ghost /lib/modules/%{kernel_release}/source
1475 %dir %{_sysconfdir}/modprobe.d/%{kernel_release}
1477 %ifarch alpha %{ix86} %{x8664} ppc ppc64 sparc sparc64
1479 %defattr(644,root,root,755)
1480 /boot/vmlinux-%{kernel_release}
1483 %if %{have_drm} && %{without myown}
1485 %defattr(644,root,root,755)
1486 /lib/modules/%{kernel_release}/kernel/drivers/gpu
1489 %if %{with pcmcia} && %{without myown}
1491 %defattr(644,root,root,755)
1492 /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/*ko*
1493 /lib/modules/%{kernel_release}/kernel/drivers/*/pcmcia
1494 %exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/pcmcia*ko*
1495 %if %{without rescuecd}
1496 /lib/modules/%{kernel_release}/kernel/drivers/bluetooth/*_cs.ko*
1497 /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/avm_cs.ko*
1498 /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/b1pcmcia.ko*
1499 /lib/modules/%{kernel_release}/kernel/drivers/telephony/ixj_pcmcia.ko*
1501 /lib/modules/%{kernel_release}/kernel/drivers/ata/pata_pcmcia.ko*
1502 /lib/modules/%{kernel_release}/kernel/drivers/ide/legacy/ide-cs.ko*
1503 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/*_cs.ko*
1504 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/b43
1505 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/hostap/hostap_cs.ko*
1506 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/libertas/*_cs.ko*
1507 /lib/modules/%{kernel_release}/kernel/drivers/parport/parport_cs.ko*
1508 /lib/modules/%{kernel_release}/kernel/drivers/serial/serial_cs.ko*
1509 /lib/modules/%{kernel_release}/kernel/drivers/usb/host/sl811_cs.ko*
1513 %if "%{_arch}" == "ppc"
1515 %defattr(644,root,root,755)
1516 %dir /boot/libs-%{kernel_release}
1517 /boot/libs-%{kernel_release}/common
1518 /boot/libs-%{kernel_release}/kernel
1519 /boot/libs-%{kernel_release}/lib
1520 /boot/libs-%{kernel_release}/of1275
1521 /boot/libs-%{kernel_release}/openfirmware
1522 /boot/libs-%{kernel_release}/simple
1523 %dir /boot/libs-%{kernel_release}/utils
1524 %attr(755,root,root) /boot/libs-%{kernel_release}/utils/*
1525 /boot/libs-%{kernel_release}/ld.script
1529 %if %{have_sound} && %{without myown}
1531 %defattr(644,root,root,755)
1532 /lib/modules/%{kernel_release}/kernel/sound
1533 %exclude %dir /lib/modules/%{kernel_release}/kernel/sound
1534 %exclude /lib/modules/%{kernel_release}/kernel/sound/ac97_bus.ko*
1535 %exclude /lib/modules/%{kernel_release}/kernel/sound/sound*.ko*
1537 %exclude /lib/modules/%{kernel_release}/kernel/sound/oss
1540 /lib/modules/%{kernel_release}/kernel/drivers/usb/gadget/g_midi.ko*
1541 /lib/modules/%{kernel_release}/kernel/drivers/media/video/cx88/cx88-alsa.ko*
1542 /lib/modules/%{kernel_release}/kernel/drivers/media/video/em28xx/em28xx-alsa.ko*
1543 /lib/modules/%{kernel_release}/kernel/drivers/media/video/saa7134/saa7134-alsa.ko*
1546 %if %{have_oss} && %{without myown}
1548 %defattr(644,root,root,755)
1549 /lib/modules/%{kernel_release}/kernel/sound/oss
1554 %defattr(644,root,root,755)
1555 %dir %{_kernelsrcdir}
1556 %{_kernelsrcdir}/include
1557 %{_kernelsrcdir}/config-dist
1558 %{_kernelsrcdir}/Module.symvers-dist
1560 %files module-build -f aux_files
1561 %defattr(644,root,root,755)
1562 # symlinks pointint to kernelsrcdir
1563 %dir /lib/modules/%{kernel_release}
1564 /lib/modules/%{kernel_release}/build
1565 %{_kernelsrcdir}/Kbuild
1566 %{_kernelsrcdir}/localversion
1567 %{_kernelsrcdir}/arch/*/kernel/asm-offsets*
1568 %{_kernelsrcdir}/arch/*/kernel/sigframe*.h
1569 %{_kernelsrcdir}/drivers/lguest/lg.h
1570 %{_kernelsrcdir}/kernel/bounds.c
1571 %dir %{_kernelsrcdir}/scripts
1572 %dir %{_kernelsrcdir}/scripts/kconfig
1573 %{_kernelsrcdir}/scripts/Kbuild.include
1574 %{_kernelsrcdir}/scripts/Makefile*
1575 %{_kernelsrcdir}/scripts/basic
1576 %{_kernelsrcdir}/scripts/mkmakefile
1577 %{_kernelsrcdir}/scripts/mod
1578 %{_kernelsrcdir}/scripts/setlocalversion
1579 %{_kernelsrcdir}/scripts/*.c
1580 %{_kernelsrcdir}/scripts/*.sh
1581 %{_kernelsrcdir}/scripts/kconfig/*
1582 %{_kernelsrcdir}/scripts/mkcompile_h
1585 %defattr(644,root,root,755)
1586 %dir %{_kernelsrcdir}
1587 %{_kernelsrcdir}/Documentation
1590 %files source -f aux_files_exc
1591 %defattr(644,root,root,755)
1592 %{_kernelsrcdir}/arch/*/[!Mk]*
1593 %{_kernelsrcdir}/arch/*/kernel/[!M]*
1594 %{_kernelsrcdir}/arch/ia64/kvm
1595 %{_kernelsrcdir}/arch/powerpc/kvm
1596 %{_kernelsrcdir}/arch/s390/kvm
1597 %{_kernelsrcdir}/arch/x86/kvm
1598 %exclude %{_kernelsrcdir}/arch/*/kernel/asm-offsets*
1599 %exclude %{_kernelsrcdir}/arch/*/kernel/sigframe*.h
1600 %exclude %{_kernelsrcdir}/drivers/lguest/lg.h
1601 %{_kernelsrcdir}/block
1602 %{_kernelsrcdir}/crypto
1603 %{_kernelsrcdir}/drivers
1605 %if %{with grsecurity} && %{without rescuecd}
1606 %{_kernelsrcdir}/grsecurity
1608 %{_kernelsrcdir}/init
1609 %{_kernelsrcdir}/ipc
1610 %{_kernelsrcdir}/kernel
1611 %exclude %{_kernelsrcdir}/kernel/bounds.c
1612 %{_kernelsrcdir}/lib
1614 %{_kernelsrcdir}/net
1615 %{_kernelsrcdir}/virt
1616 %{_kernelsrcdir}/scripts/*
1617 %exclude %{_kernelsrcdir}/scripts/Kbuild.include
1618 %exclude %{_kernelsrcdir}/scripts/Makefile*
1619 %exclude %{_kernelsrcdir}/scripts/basic
1620 %exclude %{_kernelsrcdir}/scripts/kconfig
1621 %exclude %{_kernelsrcdir}/scripts/mkmakefile
1622 %exclude %{_kernelsrcdir}/scripts/mod
1623 %exclude %{_kernelsrcdir}/scripts/setlocalversion
1624 %exclude %{_kernelsrcdir}/scripts/*.c
1625 %exclude %{_kernelsrcdir}/scripts/*.sh
1626 %{_kernelsrcdir}/sound
1627 %{_kernelsrcdir}/security
1628 %{_kernelsrcdir}/usr
1629 %{_kernelsrcdir}/COPYING
1630 %{_kernelsrcdir}/CREDITS
1631 %{_kernelsrcdir}/MAINTAINERS
1632 %{_kernelsrcdir}/README
1633 %{_kernelsrcdir}/REPORTING-BUGS
1634 %{_kernelsrcdir}/.mailmap