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_without 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_without 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_apparmor
82 %undefine with_tuxonice
83 %undefine with_grsec_full
84 %undefine with_grsec_minimal
86 %undefine with_pax_full
87 %undefine with_vserver
92 %ifarch %{ix86} alpha ppc
104 %define basever 2.6.27
108 %define _enable_debug_packages 0
110 %define squashfs_version 3.4
111 %define tuxonice_version 3.0-rc7a
112 %define netfilter_snap 20070806
113 %define xen_version 3.0.2
115 %if %{without rescuecd}
116 %define __alt_kernel %{?with_pax:pax}%{!?with_grsec_full:nogrsecurity}%{!?with_apparmor:noaa}%{?with_xen0:xen0}%{?with_xenU:xenU}%{?with_pae:pae}%{?with_myown:myown}
118 %define __alt_kernel rescuecd
121 %if "%{__alt_kernel}" != ""
122 %define alt_kernel %{__alt_kernel}
125 # kernel release (used in filesystem and eventually in uname -r)
126 # modules will be looked from /lib/modules/%{kernel_release}
127 # localversion is just that without version for "> localversion"
128 %define localversion %{rel}
129 %define kernel_release %{version}%{?alt_kernel:_%{alt_kernel}}-%{localversion}
131 Summary: The Linux kernel (the core of the Linux operating system)
132 Summary(de.UTF-8): Der Linux-Kernel (Kern des Linux-Betriebssystems)
133 Summary(et.UTF-8): Linuxi kernel (ehk operatsioonisüsteemi tuum)
134 Summary(fr.UTF-8): Le Kernel-Linux (La partie centrale du systeme)
135 Summary(pl.UTF-8): JÄ…dro Linuksa
136 Name: kernel%{_alt_kernel}
137 Version: %{basever}%{postver}
142 Source0: http://www.kernel.org/pub/linux/kernel/v2.6/linux-%{basever}.tar.bz2
143 # Source0-md5: b3e78977aa79d3754cb7f8143d7ddabd
144 %if "%{postver}" != "%{nil}"
145 Source1: http://www.kernel.org/pub/linux/kernel/v2.6/patch-%{version}.bz2
146 # Source1-md5: 1d0e83c620f3960d4d1e813f186b39f6
149 Source3: kernel-autoconf.h
150 Source4: kernel-config.h
151 Source5: kernel-ppclibs.Makefile
152 Source6: kernel-config.awk
153 Source7: kernel-module-build.pl
154 Source8: kernel-track-config-change.awk
155 # not used by kernel.spec, but it's good to have it in SOURCES
156 Source9: kernel-config-sort.pl
158 Source20: kernel-multiarch.config
159 Source21: kernel-x86.config
160 Source22: kernel-sparc.config
161 Source23: kernel-sparc64.config
162 Source24: kernel-alpha.config
163 Source25: kernel-powerpc.config
164 Source26: kernel-ia64.config
166 Source40: kernel-netfilter.config
167 Source41: kernel-patches.config
168 Source42: kernel-tuxonice.config
169 Source43: kernel-vserver.config
170 Source45: kernel-grsec.config
171 Source46: kernel-xen0.config
172 Source47: kernel-xenU.config
174 Source49: kernel-pax.config
175 Source50: kernel-no-pax.config
176 Source51: kernel-grsec_minimal.config
177 Source55: kernel-imq.config
178 Source56: kernel-reiser4.config
179 Source57: kernel-wrr.config
181 Source58: kernel-inittmpfs.config
182 Source59: kernel-bzip2-lzma.config
184 # tahoe9xx http://www.tahoe.pl/drivers/tahoe9xx-2.6.24.patch
185 Patch2: tahoe9xx-2.6.24.patch
187 # http://dev.gentoo.org/~spock/projects/fbcondecor/archive/fbcondecor-0.9.4-2.6.25-rc6.patch
188 Patch3: kernel-fbcondecor.patch
189 Patch4: linux-fbcon-margins.patch
191 # http://mesh.dl.sourceforge.net/sourceforge/squashfs/squashfs3.4.tgz
192 # squashfs3.4/kernel-patches/linux-2.6.27-rc4/squashfs3.4-patch
193 Patch5: kernel-squashfs.patch
194 Patch6: linux-static-dev.patch
196 # netfilter related stuff mostly based on patch-o-matic-ng
197 # snapshot 20061213 with some fixes related to changes in
198 # netfilter api in 2.6.19 up to 2.6.22. Some modules
199 # were ported to nf_conntrack. Some of these are unique.
201 Patch10: kernel-pom-ng-IPV4OPTSSTRIP.patch
202 Patch11: kernel-pom-ng-ipv4options.patch
204 Patch14: kernel-pom-ng-ROUTE.patch
205 Patch16: kernel-pom-ng-mms-conntrack-nat.patch
206 Patch22: kernel-pom-ng-rsh.patch
207 Patch23: kernel-pom-ng-rpc.patch
209 # based on http://mike.it-loops.com/rtsp/rtsp-2.6.26.patch
210 Patch36: kernel-nf_rtsp.patch
212 # http://ftp.linux-vserver.org/pub/people/dhozac/p/k/delta-owner-xid-feat02.diff
213 Patch37: kernel-owner-xid.patch
215 # based on http://www.svn.barbara.eu.org/ipt_account/attachment/wiki/Software/ipt_account-0.1.21-20070804164729.tar.gz?format=raw
216 Patch38: kernel-ipt_account.patch
218 # based on http://www.intra2net.com/de/produkte/opensource/ipt_account/pom-ng-ipt_ACCOUNT-1.12.tgz
219 Patch39: kernel-ipt_ACCOUNT.patch
221 # based on kernel-2.6.25-layer7-2.20.patch from
222 # http://switch.dl.sourceforge.net/sourceforge/l7-filter/netfilter-layer7-v2.20.tar.gz
223 Patch40: kernel-layer7.patch
225 # http://www.ssi.bg/~ja/nfct/ipvs-nfct-2.6.27-1.diff
226 Patch41: kernel-ipvs-nfct.patch
228 # based on http://www.balabit.com/downloads/files/tproxy/tproxy-kernel-2.6.25-20080509-164605-1210344365.tar.bz2
229 #FIXME: this patch needs net_device->nd_dev feature (see net/Kconfig:NET_NS).
230 # NET_NS depends on EXPERIMENTAL && !SYSFS && NAMESPACES while we have SYSFS enabled.
231 # the https://lists.linux-foundation.org/pipermail/containers/2007-December/008849.html is waiting for merge.
232 #Patch42: kernel-tproxy.patch
236 # http://zph.bratcheda.org/linux-2.6.26.3-zph.patch
237 Patch49: kernel-zph.patch
239 # based on http://www.linuximq.net/patchs/linux-2.6.24-imq.diff
240 # some people report problems when using imq with wrr.
241 # try unoficial version: http://kapturkiewicz.name/linux-2.6.25-imq1.diff
242 Patch50: kernel-imq.patch
244 # http://www.kernel.org/pub/linux/kernel/people/edward/reiser4/reiser4-for-2.6/reiser4-for-2.6.27.patch.bz2
245 Patch51: kernel-reiser4.patch
247 # http://www.zz9.dk/patches/wrr-linux-071203-2.6.25.patch.gz
248 Patch52: kernel-wrr.patch
250 # http://fatooh.org/esfq-2.6/sfq-2.6.24.1.tar.bz2
251 Patch53: esfq-kernel.patch
253 # http://memebeam.org/free-software/toshiba_acpi/toshiba_acpi-dev_toshiba_test5-linux_2.6.26.patch
254 Patch54: linux-2.6-toshiba_acpi.patch
256 # by Baggins request:
257 # derived from ftp://ftp.cmf.nrl.navy.mil/pub/chas/linux-atm/vbr/vbr-kernel-diffs
258 Patch55: linux-2.6-atm-vbr.patch
259 Patch56: linux-2.6-atmdd.patch
261 # http://www.ntop.org/PF_RING.html 20070610
262 Patch58: linux-PF_RING.patch
264 # http://synce.svn.sourceforge.net/svnroot/synce/trunk/patches/linux-2.6.22-rndis_host-wm5.patch
265 Patch59: kernel-rndis_host-wm5.patch
267 Patch61: kernel-vesa-upstream.patch
269 # Project suspend2 renamed to tuxonice
270 # http://www.tuxonice.net/downloads/all/tuxonice-3.0-rc7a-for-2.6.26.patch.bz2
271 Patch69: linux-2.6-suspend2.patch
272 Patch70: kernel-suspend2-headers.patch
273 Patch71: linux-2.6-suspend2-page.patch
274 Patch72: kernel-2.6-ueagle-atm-freezer.patch
276 # adds some ids for hostap suported cards and monitor_enable from/for aircrack-ng
277 # http://patches.aircrack-ng.org/hostap-kernel-2.6.18.patch
278 Patch85: hostap-kernel-2.6.18.patch
280 # http://vserver.13thfloor.at/Experimental/patch-2.6.27.3-vs2.3.0.35.7.diff
281 Patch100: linux-2.6-vs2.3.patch
282 Patch101: kernel-vserver-fixes.patch
284 # from http://www.cl.cam.ac.uk/Research/SRG/netos/xen/downloads/xen-3.0.2-src.tgz
285 #Patch120: xen-3.0-2.6.16.patch
287 # Wake-On-Lan fix for nForce drivers; using http://atlas.et.tudelft.nl/verwei90/nforce2/wol.html
288 # Fix verified for that kernel version.
289 Patch130: linux-2.6-forcedeth-WON.patch
291 # http://download.filesystems.org/unionfs/unionfs-2.x/unionfs-2.5_for_2.6.27-rc6.diff.gz
292 Patch140: kernel-unionfs.patch
293 Patch141: kernel-unionfs-apparmor.patch
295 Patch142: kernel-autofs4-2.6.27-v5-update-20081027.patch
297 Patch150: kernel-ppc-crtsavres.patch
299 Patch200: linux-2.6-ppc-ICE-hacks.patch
301 # The following patch extend the routing functionality in Linux
302 # to support static routes (defined by user), new way to use the
303 # alternative routes, the reverse path protection (rp_filter),
304 # the NAT processing to use correctly the routing when multiple
306 # http://www.ssi.bg/~ja/routes-2.6.27-15.diff
307 Patch300: kernel-routes.patch
309 Patch1000: linux-2.6-grsec-minimal.patch
311 Patch2000: kernel-small_fixes.patch
312 Patch2001: linux-2.6.21.1-pwc-uncompress.patch
314 # kill some thousands of warnings
315 # (only warnings, so just remove parts of this patch if conflics)
316 Patch2500: linux-2.6-warnings.patch
318 # based on https://forgesvn1.novell.com/svn/apparmor/trunk/kernel-patches/2.6.27 rev 1303
319 # repatched and adapted for vserver/grsec changes in vfs API, experimental
320 Patch5000: kernel-apparmor.patch
321 # with grsec_full version
322 Patch5001: kernel-apparmor-after-grsec_full.patch
323 Patch5002: kernel-apparmor-common.patch
326 # based on http://ftp.leg.uct.ac.za/pub/linux/rip/inittmpfs-2.6.14.diff.gz
327 Patch7000: kernel-inittmpfs.patch
328 ### based on http://udpcast.linux.lu/download/bzip2-lzma-kernel-2.6.26.3.patch.gz
329 # http://lkml.org/lkml/2008/10/14/268
330 Patch7001: kernel-bzip2-lzma.patch
333 Patch9997: pax_selinux_hooks-2.6.20.patch
335 # based on http://www.grsecurity.net/~paxguy1/pax-linux-2.6.24.6-test45.patch
336 Patch9998: kernel-pax.patch
338 # based on http://www.grsecurity.net/~spender/grsecurity-2.1.12-2.6.27.4-200810272314.patch
339 Patch9999: linux-2.6-grsec_full.patch
340 Patch10000: linux-2.6-grsec-caps.patch
341 Patch10001: linux-2.6-grsec-common.patch
342 Patch10002: kernel-grsec_fixes.patch
344 URL: http://www.kernel.org/
345 BuildRequires: binutils >= 3:2.18
346 %ifarch sparc sparc64
347 BuildRequires: elftoaout
350 BuildRequires: uboot-mkimage
353 BuildRequires: /sbin/depmod
354 BuildRequires: gcc >= 5:3.2
355 %{?with_rescuecd:BuildRequires: lzma >= 1:4.42.2}
356 # for hostname command
357 BuildRequires: net-tools
358 BuildRequires: perl-base
359 BuildRequires: rpm-build >= 4.4.9-56
360 BuildRequires: rpmbuild(macros) >= 1.217
361 Requires(post): coreutils
362 Requires(post): geninitrd >= 2.57
363 Requires(post): module-init-tools >= 0.9.9
364 Requires: /sbin/depmod
366 Requires: geninitrd >= 2.57
367 Requires: module-init-tools >= 0.9.9
368 Provides: %{name}(netfilter) = %{netfilter_snap}
369 Provides: %{name}(vermagic) = %{kernel_release}
370 %if %{with xen0} || %{with xenU}
371 Provides: kernel(xen) = %{_xen_version}
373 Obsoletes: kernel%{_alt_kernel}-isdn-mISDN
374 Obsoletes: kernel-misc-acer_acpi
375 Obsoletes: kernel-misc-fuse
376 Obsoletes: kernel-misc-uvc
377 Obsoletes: kernel-modules
378 Obsoletes: kernel-net-ar81
379 Obsoletes: kernel-net-hostap
380 Obsoletes: kernel-net-ieee80211
381 Obsoletes: kernel-net-ipp2p
382 Obsoletes: kernel-net-rt61
383 Obsoletes: kernel-smp
384 Conflicts: e2fsprogs < 1.29
385 Conflicts: isdn4k-utils < 3.1pre1
386 Conflicts: jfsutils < 1.1.3
387 Conflicts: module-init-tools < 0.9.10
388 Conflicts: nfs-utils < 1.0.5
389 Conflicts: oprofile < 0.9
390 Conflicts: ppp < 1:2.4.0
391 Conflicts: procps < 3.2.0
392 Conflicts: quota-tools < 3.09
393 %if %{with reiserfs4}
394 Conflicts: reiser4progs < 1.0.0
396 Conflicts: reiserfsprogs < 3.6.3
397 Conflicts: udev < 1:071
398 Conflicts: util-linux < 2.10o
399 Conflicts: util-vserver < 0.30.215-10
400 Conflicts: xfsprogs < 2.6.0
401 %if %{with xen0} || %{with xenU} || %{with pae}
402 ExclusiveArch: %{ix86}
404 ExcludeArch: i386 i486 i586
407 ExclusiveArch: %{ix86} %{x8664} alpha arm ia64 ppc ppc64 sparc sparc64
410 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
412 %ifarch %{ix86} %{x8664}
413 %define target_arch_dir x86
416 %define target_arch_dir powerpc
418 %ifnarch %{ix86} %{x8664} ppc ppc64
419 %define target_arch_dir %{_target_base_arch}
422 %define defconfig arch/%{target_arch_dir}/defconfig
424 # No ELF objects there to strip (skips processing 27k files)
425 %define _noautostrip .*%{_kernelsrcdir}/.*
426 %define _noautochrpath .*%{_kernelsrcdir}/.*
429 %define initrd_dir /boot/efi
431 %define initrd_dir /boot
434 %define _kernelsrcdir /usr/src/linux%{_alt_kernel}-%{version}
436 %if "%{_target_base_arch}" != "%{_arch}"
437 %define CrossOpts ARCH=%{_target_base_arch} CROSS_COMPILE=%{_target_cpu}-pld-linux-
438 %define DepMod /bin/true
440 %if "%{_arch}" == "sparc" && "%{_target_base_arch}" == "sparc64"
441 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
442 %define DepMod /sbin/depmod
445 %if "%{_arch}" == "sparc64" && "%{_target_base_arch}" == "sparc"
446 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
447 %define DepMod /sbin/depmod
450 %if "%{_arch}" == "x86_64" && "%{_target_base_arch}" == "i386"
451 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
452 %define DepMod /sbin/depmod
455 %if "%{_target_base_arch}" == ppc || "%{_target_base_arch}" == "ppc64"
456 %define CrossOpts ARCH=powerpc CROSS_COMPILE=%{_target_cpu}-pld-linux-
460 %define CrossOpts ARCH=powerpc CC="%{__cc}"
462 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
464 %define DepMod /sbin/depmod
466 %define MakeOpts %{CrossOpts} HOSTCC="%{__cc}"
468 %define __features Netfilter module dated: %{netfilter_snap}\
469 %{?with_grsec_full:Grsecurity full support - enabled}\
470 %{?with_pax:PaX support - enabled}\
471 %{?with_xen0:Xen 0 - enabled}\
472 %{?with_xenU:Xen U - enabled}\
473 %{?with_fbcondecor:Fbsplash/fbcondecor - enabled }\
474 %{?with_nfsroot:Root on NFS - enabled}
476 %define Features %(echo "%{__features}" | sed '/^$/d')
479 This package contains the Linux kernel that is used to boot and run
480 your system. It contains few device drivers for specific hardware.
481 Most hardware is instead supported by modules loaded after booting.
485 %description -l de.UTF-8
486 Das Kernel-Paket enthält den Linux-Kernel (vmlinuz), den Kern des
487 Linux-Betriebssystems. Der Kernel ist für grundliegende
488 Systemfunktionen verantwortlich: Speicherreservierung,
489 Prozeß-Management, Geräte Ein- und Ausgaben, usw.
493 %description -l fr.UTF-8
494 Le package kernel contient le kernel linux (vmlinuz), la partie
495 centrale d'un système d'exploitation Linux. Le noyau traite les
496 fonctions basiques d'un système d'exploitation: allocation mémoire,
497 allocation de process, entrée/sortie de peripheriques, etc.
501 %description -l pl.UTF-8
502 Pakiet zawiera jądro Linuksa niezbędne do prawidłowego działania
503 Twojego komputera. Zawiera w sobie sterowniki do sprzętu znajdującego
504 się w komputerze, takiego jak sterowniki dysków itp.
509 Summary: vmlinux - uncompressed kernel image
510 Summary(de.UTF-8): vmlinux - dekompressiertes Kernel Bild
511 Summary(pl.UTF-8): vmlinux - rozpakowany obraz jÄ…dra
513 Obsoletes: kernel-smp-vmlinux
516 vmlinux - uncompressed kernel image.
518 %description vmlinux -l de.UTF-8
519 vmlinux - dekompressiertes Kernel Bild.
521 %description vmlinux -l pl.UTF-8
522 vmlinux - rozpakowany obraz jÄ…dra.
525 Summary: DRM kernel modules
526 Summary(de.UTF-8): DRM Kernel Treiber
527 Summary(pl.UTF-8): Sterowniki DRM
529 Requires(postun): %{name} = %{epoch}:%{version}-%{release}
530 Requires: %{name} = %{epoch}:%{version}-%{release}
531 Obsoletes: kernel-smp-drm
537 %description drm -l de.UTF-8
540 %description drm -l pl.UTF-8
544 Summary: PCMCIA modules
545 Summary(de.UTF-8): PCMCIA Module
546 Summary(pl.UTF-8): Moduły PCMCIA
548 Requires(postun): %{name} = %{epoch}:%{version}-%{release}
549 Requires: %{name} = %{epoch}:%{version}-%{release}
550 Obsoletes: kernel-smp-pcmcia
551 Conflicts: pcmcia-cs < 3.1.21
552 Conflicts: pcmciautils < 004
558 %description pcmcia -l de.UTF-8
561 %description pcmcia -l pl.UTF-8
565 Summary: Libraries for preparing bootable kernel on PowerPCs
566 Summary(pl.UTF-8): Biblioteki do przygotowania bootowalnego jÄ…dra dla PowerPC
568 Requires: %{name} = %{epoch}:%{version}-%{release}
569 Requires: mkvmlinuz >= 1.3
570 Obsoletes: kernel-smp-libs
574 Libraries for preparing bootable kernel on PowerPCs. Script called
575 mkvmlinuz may be useful for this.
577 %description libs -l pl.UTF-8
578 Biblioteki do przygotowania bootowalnego jÄ…dra dla PowerPC. Skrypt
579 mkvmlinuz może być do tego przydatny.
582 Summary: ALSA kernel modules
583 Summary(de.UTF-8): ALSA Kernel Module
584 Summary(pl.UTF-8): Sterowniki dźwięku ALSA
586 Requires(postun): %{name} = %{epoch}:%{version}-%{release}
587 Requires: %{name} = %{epoch}:%{version}-%{release}
588 Obsoletes: kernel-smp-sound-alsa
591 %description sound-alsa
592 ALSA (Advanced Linux Sound Architecture) sound drivers.
594 %description sound-alsa -l de.UTF-8
595 ALSA (Advanced Linux Sound Architecture) Sound-Treiber.
597 %description sound-alsa -l pl.UTF-8
598 Sterowniki dźwięku ALSA (Advanced Linux Sound Architecture).
601 Summary: OSS kernel modules
602 Summary(de.UTF-8): OSS Kernel Module
603 Summary(pl.UTF-8): Sterowniki dźwięku OSS
605 Requires(postun): %{name} = %{epoch}:%{version}-%{release}
606 Requires: %{name} = %{epoch}:%{version}-%{release}
607 Obsoletes: kernel-smp-sound-oss
610 %description sound-oss
611 OSS (Open Sound System) drivers.
613 %description sound-oss -l de.UTF-8
614 OSS (Open Sound System) Treiber.
616 %description sound-oss -l pl.UTF-8
617 Sterowniki dźwięku OSS (Open Sound System).
620 Summary: Header files for the Linux kernel
621 Summary(de.UTF-8): Header Dateien für den Linux-Kernel
622 Summary(pl.UTF-8): Pliki nagłówkowe jądra Linuksa
623 Group: Development/Building
624 Provides: %{name}-headers(netfilter) = %{netfilter_snap}
628 These are the C header files for the Linux kernel, which define
629 structures and constants that are needed when rebuilding the kernel or
630 building kernel modules.
632 %description headers -l de.UTF-8
633 Dies sind die C Header Dateien für den Linux-Kernel, die definierte
634 Strukturen und Konstante beinhalten, die beim rekompilieren des
635 Kernels oder bei Kernel Modul kompilationen gebraucht werden.
637 %description headers -l pl.UTF-8
638 Pakiet zawiera pliki nagłówkowe jądra, niezbędne do rekompilacji jądra
639 oraz budowania modułów jądra.
641 %package module-build
642 Summary: Development files for building kernel modules
643 Summary(de.UTF-8): Development Dateien die beim Kernel Modul kompilationen gebraucht werden
644 Summary(pl.UTF-8): Pliki służące do budowania modułów jądra
645 Group: Development/Building
646 Requires: %{name}-headers = %{epoch}:%{version}-%{release}
647 Conflicts: rpmbuild(macros) < 1.321
650 %description module-build
651 Development files from kernel source tree needed to build Linux kernel
652 modules from external packages.
654 %description module-build -l de.UTF-8
655 Development Dateien des Linux-Kernels die beim kompilieren externer
656 Kernel Module gebraucht werden.
658 %description module-build -l pl.UTF-8
659 Pliki ze drzewa źródeł jądra potrzebne do budowania modułów jądra
660 Linuksa z zewnętrznych pakietów.
663 Summary: Kernel source tree
664 Summary(de.UTF-8): Der Kernel Quelltext
665 Summary(pl.UTF-8): Kod źródłowy jądra Linuksa
666 Group: Development/Building
667 Requires: %{name}-module-build = %{epoch}:%{version}-%{release}
671 This is the source code for the Linux kernel. You can build a custom
672 kernel that is better tuned to your particular hardware.
674 %description source -l de.UTF-8
675 Das Kernel-Source-Paket enthält den source code (C/Assembler-Code) des
676 Linux-Kernels. Die Source-Dateien werden gebraucht, um viele
677 C-Programme zu kompilieren, da sie auf Konstanten zurückgreifen, die
678 im Kernel-Source definiert sind. Die Source-Dateien können auch
679 benutzt werden, um einen Kernel zu kompilieren, der besser auf Ihre
680 Hardware ausgerichtet ist.
682 %description source -l fr.UTF-8
683 Le package pour le kernel-source contient le code source pour le noyau
684 linux. Ces sources sont nécessaires pour compiler la plupart des
685 programmes C, car il dépend de constantes définies dans le code
686 source. Les sources peuvent être aussi utilisée pour compiler un noyau
687 personnalisé pour avoir de meilleures performances sur des matériels
690 %description source -l pl.UTF-8
691 Pakiet zawiera kod źródłowy jądra systemu.
694 Summary: Kernel documentation
695 Summary(de.UTF-8): Kernel Dokumentation
696 Summary(pl.UTF-8): Dokumentacja do jÄ…dra Linuksa
701 This is the documentation for the Linux kernel, as found in
702 /usr/src/linux/Documentation directory.
704 %description doc -l de.UTF-8
705 Dies ist die Kernel Dokumentation wie sie im 'Documentation'
706 Verzeichniss vorgefunden werden kann.
708 %description doc -l pl.UTF-8
709 Pakiet zawiera dokumentacjÄ™ do jÄ…dra Linuksa pochodzÄ…cÄ… z katalogu
710 /usr/src/linux/Documentation.
716 # hack against warning in pax/grsec
718 sed -i 's/-Werror//' arch/alpha/kernel/Makefile
722 install %{SOURCE5} Makefile.ppclibs
725 %if "%{postver}" != "%{nil}"
726 %{__bzip2} -dc %{SOURCE1} | patch -p1 -s
731 ##ifarch %{ix86} %{x8664} ia64 ppc alpha
735 # kernel-2.6-ueagle-atm-freezer.patch
741 %if %{with fbcondecor}
754 # kernel-pom-ng-IPV4OPTSSTRIP.patch
757 # kernel-pom-ng-ipv4options.patch
760 # kernel-pom-ng-ROUTE.patch
763 # kernel-pom-ng-mms-conntrack-nat.patch
766 # kernel-pom-ng-rsh.patch
769 # kernel-pom-ng-rpc.patch
772 # kernel-nf_rtsp.patch
775 # kernel-owner-xid.patch
780 # kernel-ipt_account.patch
783 # kernel-ipt_ACCOUNT.patch
786 # kernel-layer7.patch
822 # kernel-rndis_host-wm5.patch
827 # hostap enhancements from/for aircrack-ng
836 #%if %{with xen0} || %{with xenU}
837 #%ifarch %{ix86} %{x8664} ia64
843 %if %{without rescuecd} && %{with vserver}
852 %{?with_apparmor:%patch141 -p1}
864 # grsecurity & pax stuff
868 %{?with_vserver:%patch10000 -p1}
869 %{?with_vserver:%patch10001 -p1}
870 %{?with_vserver:%patch10002 -p1}
873 %if %{with grsec_full}
875 %{?with_vserver:%patch10000 -p1}
876 %{?with_vserver:%patch10001 -p1}
877 %{?with_vserver:%patch10002 -p1}
879 %if %{with grsec_minimal}
881 # remember that we have the same config file for grsec_minimal and
882 # grsec_full, but the patches are different.
887 # now we have an separate testing pax-only patch - in the future we
888 # could have single grsecurity patch and will have to prepare separate
889 # configs for grsec_minimal, grsec_full and pax to support such
890 # configurations like pax & grsec_minimal.
891 # So, in a future there could be no patch9998, but only config
892 # would tell which options should be enabled.
893 # The second option is to maintain separate pax-only patch.
895 #patch9997 -p1 - needs update
901 # end of grsecurity & pax stuff
905 %if %{with grsec_full} || %{with pax_full}
927 # Fix EXTRAVERSION in main Makefile
928 sed -i 's#EXTRAVERSION =.*#EXTRAVERSION = %{postver}%{?alt_kernel:_%{alt_kernel}}#g' Makefile
930 # on sparc this line causes CONFIG_INPUT=m (instead of =y), thus breaking build
931 sed -i -e '/select INPUT/d' net/bluetooth/hidp/Kconfig
933 # on sparc64 avoid building break due to NULL pointer type warrning
934 sed -i -e 's/^EXTRA_CFLAGS := -Werror/EXTRA_CFLAGS := /' arch/sparc64/kernel/Makefile
936 # cleanup backups after patching
937 find '(' -name '*~' -o -name '*.orig' -o -name '.gitignore' ')' -print0 | xargs -0 -r -l512 rm -f
945 CONFIG_PAX_SEGMEXEC=y
946 # performance impact on CPUs without NX bit
947 CONFIG_PAX_PAGEEXEC=n
950 CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM=n
956 CONFIG_PAX_NOELFRELOCS=n
959 CONFIG_PAX_EMUTRAMP=y
960 CONFIG_PAX_EMUSIGRT=y
964 %ifarch sparc sparc64 alpha
968 # Now we have to check MAC system integration. Grsecurity (full) uses PAX_HAVE_ACL_FLAGS
969 # setting (direct acces). grsec_minimal probably have no idea about PaX so we probably
970 # could use PAX_NO_ACL_FLAGS, but for testing the hooks setting will be used
971 # PAX_HOOK_ACL_FLAGS. SELinux should also be able to make PaX settings via hooks
973 %if %{with grsec_full}
974 # Hardening grsec options if with pax
975 CONFIG_GRKERNSEC_PROC_MEMMAP=y
976 # almost rational (see HIDESYM help)
977 CONFIG_GRKERNSEC_HIDESYM=y
979 # no change needed CONFIG=PAX_HAVE_ACL_FLAGS=y is taken from the kernel-pax.config
981 # selinux or other hooks?
982 CONFIG_PAX_HAVE_ACL_FLAGS=n
983 CONFIG_PAX_HOOK_ACL_FLAGS=y
993 # CONFIG_SOUND is not set
994 # CONFIG_AUDIT is not set
995 # CONFIG_TR is not set
996 # CONFIG_BT is not set
997 # CONFIG_VIDEO_DEV is not set
998 # CONFIG_DVB_CORE is not set
999 # CONFIG_HAMRADIO is not set
1000 # CONFIG_ARCNET is not set
1001 # CONFIG_FB is not set
1002 # CONFIG_DRM is not set
1003 # CONFIG_WATCHDOG is not set
1004 # CONFIG_INPUT_JOYSTICK is not set
1005 # CONFIG_DEBUG_KERNEL is not set
1006 # CONFIG_ISDN is not set
1007 # CONFIG_AGP is not set
1008 # CONFIG_SECURITY is not set
1009 # CONFIG_PARIDE is not set
1010 # CONFIG_CPU_FREQ is not set
1011 # CONFIG_GAMEPORT is not set
1012 # CONFIG_KVM is not set
1013 # CONFIG_PHONE is not set
1014 CONFIG_BLK_DEV_LOOP=y
1026 Config="kernel-%{target_arch_dir}.config"
1027 echo "Building config file for %{_target_cpu} using $Config et al."
1029 # prepare local and important options
1030 cat <<-EOCONFIG > important.config
1033 CONFIG_DEBUG_SLAB_LEAK=y
1034 CONFIG_DEBUG_PREEMPT=y
1035 CONFIG_RT_DEADLOCK_DETECT=y
1042 # apparmor, will be moved to external file if works
1043 %if %{with apparmor}
1044 CONFIG_SECURITY_APPARMOR=y
1045 CONFIG_SECURITY_APPARMOR_BOOTPARAM_VALUE=1
1046 CONFIG_SECURITY_APPARMOR_DISABLE=n
1053 %ifarch i686 athlon pentium3 pentium4
1061 %if %{without pcmcia}
1065 %if %{with fbcondecor}
1069 CONFIG_FB_TILEBLITTING=n
1070 CONFIG_FB_CON_DECOR=y
1078 # Temporary disabled RELOCATABLE. Needed only on x86??
1079 %if %{with pax} || %{with grsec_full}
1080 CONFIG_RELOCATABLE=n
1084 RescueConfig rescue.config
1085 PaXconfig pax.config
1087 # prepare kernel-style config file from multiple config files
1088 %{__awk} -v arch="all %{target_arch_dir} %{_target_base_arch} %{_target_cpu}" -f %{SOURCE6} \
1090 %if %{with rescuecd}
1102 %if %{with pax_full}
1107 %if %{with grsec_full}
1111 %if %{with grsec_minimal}
1133 %if %{with tuxonice}
1134 %ifarch %{ix86} %{x8664} ia64 ppc ppc64
1138 %{SOURCE40} %{?0:netfilter} \
1139 %{SOURCE41} %{?0:patches} \
1141 $RPM_SOURCE_DIR/$Config \
1147 echo "Building kernel $1 ..."
1148 install .config %{defconfig}
1149 %{__make} %{MakeOpts} mrproper \
1150 RCS_FIND_IGNORE='-name build-done -prune -o'
1151 ln -sf %{defconfig} .config
1153 %{__make} %{MakeOpts} clean \
1154 RCS_FIND_IGNORE='-name build-done -prune -o'
1155 %{__make} %{MakeOpts} include/linux/version.h \
1156 %{?with_verbose:V=1}
1158 %{__make} %{MakeOpts} scripts/mkcompile_h \
1159 %{?with_verbose:V=1}
1161 # make does vmlinux, modules and bzImage at once
1163 %{__make} %{MakeOpts} image \
1164 %{?with_verbose:V=1}
1166 %{__make} %{MakeOpts} modules \
1167 %{?with_verbose:V=1}
1169 %{__make} %{MakeOpts} \
1170 %{?with_verbose:V=1}
1174 PreInstallKernel() {
1175 Config="%{_target_base_arch}"
1176 KernelVer=%{kernel_release}
1178 mkdir -p $KERNEL_INSTALL_DIR/boot
1179 install System.map $KERNEL_INSTALL_DIR/boot/System.map-$KernelVer
1180 %ifarch %{ix86} %{x8664}
1181 install arch/x86/boot/bzImage $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
1182 install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinux-$KernelVer
1184 %ifarch alpha sparc sparc64
1185 gzip -cfv vmlinux > vmlinuz
1186 install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinux-$KernelVer
1187 install vmlinuz $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
1189 elftoaout arch/sparc/boot/image -o vmlinux.aout
1190 install vmlinux.aout $KERNEL_INSTALL_DIR/boot/vmlinux.aout-$KernelVer
1193 elftoaout arch/sparc64/boot/image -o vmlinux.aout
1194 install vmlinux.aout $KERNEL_INSTALL_DIR/boot/vmlinux.aout-$KernelVer
1198 install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinux-$KernelVer
1199 install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
1202 %{__make} -f Makefile.ppclibs install \
1203 DESTDIR=$KERNEL_INSTALL_DIR/boot/libs-$KernelVer
1206 gzip -cfv vmlinux > vmlinuz
1207 install -d $KERNEL_INSTALL_DIR/boot/efi
1208 install vmlinuz $KERNEL_INSTALL_DIR/boot/efi/vmlinuz-$KernelVer
1209 ln -sf efi/vmlinuz-$KernelVer $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
1212 install arch/arm/boot/zImage $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
1215 %{__make} %{MakeOpts} modules_install firmware_install \
1216 %{?with_verbose:V=1} \
1218 INSTALL_MOD_PATH=$KERNEL_INSTALL_DIR \
1219 INSTALL_FW_PATH=$KERNEL_INSTALL_DIR/lib/firmware/$KernelVer \
1220 KERNELRELEASE=$KernelVer
1222 # You'd probabelly want to make it somewhat different
1223 install -d $KERNEL_INSTALL_DIR%{_kernelsrcdir}
1224 install Module.symvers $KERNEL_INSTALL_DIR%{_kernelsrcdir}/Module.symvers-dist
1226 echo "CHECKING DEPENDENCIES FOR KERNEL MODULES"
1227 if [ %DepMod = /sbin/depmod ]; then
1228 /sbin/depmod --basedir $KERNEL_INSTALL_DIR -ae -F $KERNEL_INSTALL_DIR/boot/System.map-$KernelVer -r $KernelVer || :
1230 touch $KERNEL_INSTALL_DIR/lib/modules/$KernelVer/modules.dep
1231 # binary cache produced by depmod at runtime
1232 touch $KERNEL_INSTALL_DIR/lib/modules/$KernelVer/modules.{alias,dep,symbols}.bin
1233 echo "KERNEL RELEASE $KernelVer DONE"
1236 KERNEL_BUILD_DIR=`pwd`
1237 echo "-%{localversion}" > localversion
1239 KERNEL_INSTALL_DIR="$KERNEL_BUILD_DIR/build-done/kernel"
1240 rm -rf $KERNEL_INSTALL_DIR
1241 %if %{without myown}
1244 cat $RPM_SOURCE_DIR/kernel-myown.config > %{defconfig}
1246 ln -sf %{defconfig} .config
1247 install -d $KERNEL_INSTALL_DIR%{_kernelsrcdir}/include/linux
1248 rm -f include/linux/autoconf.h
1249 %{__make} %{MakeOpts} include/linux/autoconf.h
1250 install include/linux/autoconf.h \
1251 $KERNEL_INSTALL_DIR%{_kernelsrcdir}/include/linux/autoconf-dist.h
1253 $KERNEL_INSTALL_DIR%{_kernelsrcdir}/config-dist
1255 %{__awk} %{?debug:-v dieOnError=1} -v infile=%{defconfig} -f %{SOURCE8} .config
1260 %{__make} %{MakeOpts} include/linux/utsrelease.h
1261 cp include/linux/utsrelease.h{,.save}
1262 cp include/linux/version.h{,.save}
1263 cp scripts/mkcompile_h{,.save}
1266 rm -rf $RPM_BUILD_ROOT
1270 export DEPMOD=%DepMod
1272 install -d $RPM_BUILD_ROOT%{_kernelsrcdir}
1273 install -d $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/%{kernel_release}
1275 # test if we can hardlink -- %{_builddir} and $RPM_BUILD_ROOT on same partition
1276 if cp -al COPYING $RPM_BUILD_ROOT/COPYING 2>/dev/null; then
1278 rm -f $RPM_BUILD_ROOT/COPYING
1281 KERNEL_BUILD_DIR=`pwd`
1283 cp -a$l $KERNEL_BUILD_DIR/build-done/kernel/* $RPM_BUILD_ROOT
1285 if [ -e $RPM_BUILD_ROOT/lib/modules/%{kernel_release} ] ; then
1286 rm -f $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/build
1287 ln -sf %{_kernelsrcdir} $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/build
1288 install -d $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/{cluster,misc}
1291 find . -maxdepth 1 ! -name "build-done" ! -name "." -exec cp -a$l "{}" "$RPM_BUILD_ROOT%{_kernelsrcdir}/" ";"
1293 cd $RPM_BUILD_ROOT%{_kernelsrcdir}
1295 %{__make} %{MakeOpts} mrproper archclean \
1296 RCS_FIND_IGNORE='-name build-done -prune -o'
1298 if [ -e $KERNEL_BUILD_DIR/build-done/kernel%{_kernelsrcdir}/include/linux/autoconf-dist.h ]; then
1299 install $KERNEL_BUILD_DIR/build-done/kernel%{_kernelsrcdir}/include/linux/autoconf-dist.h \
1300 $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux
1301 install $KERNEL_BUILD_DIR/build-done/kernel%{_kernelsrcdir}/config-dist \
1302 $RPM_BUILD_ROOT%{_kernelsrcdir}
1305 cp -Rdp$l $KERNEL_BUILD_DIR/include/linux/* \
1306 $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux
1308 %{__make} %{MakeOpts} mrproper
1309 mv -f include/linux/utsrelease.h.save $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux/utsrelease.h
1310 cp include/linux/version.h{.save,}
1311 cp scripts/mkcompile_h{.save,}
1312 rm -rf include/linux/version.h.save
1313 rm -rf scripts/mkcompile_h.save
1314 install %{SOURCE3} $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux/autoconf.h
1315 install %{SOURCE4} $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux/config.h
1317 # collect module-build files and directories
1318 perl %{SOURCE7} %{_kernelsrcdir} %{_builddir}/%{name}-%{version}
1321 touch $RPM_BUILD_ROOT%{initrd_dir}/initrd-%{kernel_release}.gz
1323 # rpm obeys filelinkto checks for ghosted symlinks, convert to files
1324 rm -f $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/{build,source}
1325 touch $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/{build,source}
1327 # remove unnecessary dir with dead symlink
1328 rm -rf $RPM_BUILD_ROOT/arch/i386
1331 rm -rf $RPM_BUILD_ROOT
1334 if [ -x /sbin/new-kernel-pkg ]; then
1335 /sbin/new-kernel-pkg --remove %{kernel_release}
1340 mv -f /boot/efi/vmlinuz{,.old} 2> /dev/null
1341 %{?alt_kernel:mv -f /boot/efi/vmlinuz%{_alt_kernel}{,.old} 2> /dev/null}
1342 ln -sf vmlinuz-%{kernel_release} /boot/efi/vmlinuz
1343 %{?alt_kernel:ln -sf vmlinuz-%{kernel_release} /boot/efi/vmlinuz%{_alt_kernel}}
1345 mv -f /boot/vmlinuz{,.old} 2> /dev/null
1346 %{?alt_kernel:mv -f /boot/vmlinuz%{_alt_kernel}{,.old} 2> /dev/null}
1347 mv -f /boot/System.map{,.old} 2> /dev/null
1348 %{?alt_kernel:mv -f /boot/System%{_alt_kernel}.map{,.old} 2> /dev/null}
1349 ln -sf vmlinuz-%{kernel_release} /boot/vmlinuz
1350 %{?alt_kernel:ln -sf vmlinuz-%{kernel_release} /boot/vmlinuz%{_alt_kernel}}
1351 ln -sf System.map-%{kernel_release} /boot/System.map
1352 %{?alt_kernel:ln -sf System.map-%{kernel_release} /boot/System.map%{_alt_kernel}}
1354 %depmod %{kernel_release}
1356 /sbin/geninitrd -f --initrdfs=rom %{initrd_dir}/initrd-%{kernel_release}.gz %{kernel_release}
1357 mv -f %{initrd_dir}/initrd{,.old} 2> /dev/null
1358 %{?alt_kernel:mv -f %{initrd_dir}/initrd%{_alt_kernel}{,.old} 2> /dev/null}
1359 ln -sf initrd-%{kernel_release}.gz %{initrd_dir}/initrd
1360 %{?alt_kernel:ln -sf initrd-%{kernel_release}.gz %{initrd_dir}/initrd%{_alt_kernel}}
1362 if [ -x /sbin/new-kernel-pkg ]; then
1363 title="PLD Linux (%{pld_release})%{?alt_kernel: / %{alt_kernel}}"
1365 /sbin/new-kernel-pkg --initrdfile=%{initrd_dir}/initrd-%{kernel_release}.gz --install %{kernel_release} --banner "$title"
1366 elif [ -x /sbin/rc-boot ]; then
1367 /sbin/rc-boot 1>&2 || :
1371 mv -f /boot/vmlinux{,.old} 2> /dev/null
1372 %{?alt_kernel:mv -f /boot/vmlinux-%{alt_kernel}{,.old} 2> /dev/null}
1373 ln -sf vmlinux-%{kernel_release} /boot/vmlinux
1374 %{?alt_kernel:ln -sf vmlinux-%{kernel_release} /boot/vmlinux-%{alt_kernel}}
1377 %{_sbindir}/mkvmlinuz /boot/zImage-%{kernel_release} %{kernel_release}
1380 %depmod %{kernel_release}
1383 %depmod %{kernel_release}
1386 %depmod %{kernel_release}
1389 %depmod %{kernel_release}
1392 %depmod %{kernel_release}
1395 %depmod %{kernel_release}
1398 %depmod %{kernel_release}
1401 %depmod %{kernel_release}
1404 ln -snf %{basename:%{_kernelsrcdir}} %{_prefix}/src/linux%{_alt_kernel}
1407 if [ "$1" = "0" ]; then
1408 if [ -L %{_prefix}/src/linux%{_alt_kernel} ]; then
1409 if [ "$(readlink %{_prefix}/src/linux%{_alt_kernel})" = "linux%{_alt_kernel}-%{version}" ]; then
1410 rm -f %{_prefix}/src/linux%{_alt_kernel}
1415 %triggerin module-build -- %{name} = %{epoch}:%{version}-%{release}
1416 ln -sfn %{_kernelsrcdir} /lib/modules/%{kernel_release}/build
1417 ln -sfn %{_kernelsrcdir} /lib/modules/%{kernel_release}/source
1419 %triggerun module-build -- %{name} = %{epoch}:%{version}-%{release}
1420 if [ "$1" = 0 ]; then
1421 rm -f /lib/modules/%{kernel_release}/{build,source}
1425 %defattr(644,root,root,755)
1426 %ifarch sparc sparc64
1427 /boot/vmlinux.aout-%{kernel_release}
1430 /boot/efi/vmlinuz-%{kernel_release}
1432 /boot/vmlinuz-%{kernel_release}
1433 /boot/System.map-%{kernel_release}
1434 %ghost %{initrd_dir}/initrd-%{kernel_release}.gz
1435 /lib/firmware/%{kernel_release}
1436 %dir /lib/modules/%{kernel_release}
1437 %dir /lib/modules/%{kernel_release}/kernel
1439 /lib/modules/%{kernel_release}/kernel/arch
1441 /lib/modules/%{kernel_release}/kernel/crypto
1442 /lib/modules/%{kernel_release}/kernel/drivers
1443 %if %{have_drm} && %{without myown}
1444 %exclude /lib/modules/%{kernel_release}/kernel/drivers/gpu
1446 /lib/modules/%{kernel_release}/kernel/fs
1448 # this directory will be removed after disabling rcutorture mod. in 2.6.20.
1449 /lib/modules/%{kernel_release}/kernel/kernel
1451 /lib/modules/%{kernel_release}/kernel/lib
1452 /lib/modules/%{kernel_release}/kernel/net
1453 %if %{have_sound} && %{without myown}
1454 %dir /lib/modules/%{kernel_release}/kernel/sound
1455 /lib/modules/%{kernel_release}/kernel/sound/ac97_bus.ko*
1456 /lib/modules/%{kernel_release}/kernel/sound/sound*.ko*
1458 %exclude /lib/modules/%{kernel_release}/kernel/drivers/media/video/cx88/cx88-alsa.ko*
1459 %exclude /lib/modules/%{kernel_release}/kernel/drivers/media/video/em28xx/em28xx-alsa.ko*
1460 %exclude /lib/modules/%{kernel_release}/kernel/drivers/media/video/saa7134/saa7134-alsa.ko*
1463 %dir /lib/modules/%{kernel_release}/misc
1464 %if %{with pcmcia} && %{without myown}
1465 %exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/[!p]*
1466 %exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/pd6729.ko*
1467 %exclude /lib/modules/%{kernel_release}/kernel/drivers/*/pcmcia
1468 %if %{without rescuecd}
1469 %exclude /lib/modules/%{kernel_release}/kernel/drivers/ata/pata_pcmcia.ko*
1470 %exclude /lib/modules/%{kernel_release}/kernel/drivers/bluetooth/*_cs.ko*
1471 %exclude /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/avm_cs.ko*
1472 %exclude /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/b1pcmcia.ko*
1473 %exclude /lib/modules/%{kernel_release}/kernel/drivers/telephony/ixj_pcmcia.ko*
1474 %exclude /lib/modules/%{kernel_release}/kernel/drivers/usb/gadget/g_midi.ko*
1476 %exclude /lib/modules/%{kernel_release}/kernel/drivers/ide/legacy/ide-cs.ko*
1477 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/*_cs.ko*
1478 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/b43
1479 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/hostap/hostap_cs.ko*
1480 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/libertas/*_cs.ko*
1481 %exclude /lib/modules/%{kernel_release}/kernel/drivers/parport/parport_cs.ko*
1482 %exclude /lib/modules/%{kernel_release}/kernel/drivers/serial/serial_cs.ko*
1483 %exclude /lib/modules/%{kernel_release}/kernel/drivers/usb/host/sl811_cs.ko*
1485 %ghost /lib/modules/%{kernel_release}/modules.*
1486 # symlinks pointing to kernelsrcdir
1487 %ghost /lib/modules/%{kernel_release}/build
1488 %ghost /lib/modules/%{kernel_release}/source
1489 %dir %{_sysconfdir}/modprobe.d/%{kernel_release}
1491 %ifarch alpha %{ix86} %{x8664} ppc ppc64 sparc sparc64
1493 %defattr(644,root,root,755)
1494 /boot/vmlinux-%{kernel_release}
1497 %if %{have_drm} && %{without myown}
1499 %defattr(644,root,root,755)
1500 /lib/modules/%{kernel_release}/kernel/drivers/gpu
1503 %if %{with pcmcia} && %{without myown}
1505 %defattr(644,root,root,755)
1506 /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/*ko*
1507 /lib/modules/%{kernel_release}/kernel/drivers/*/pcmcia
1508 %exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/pcmcia*ko*
1509 %if %{without rescuecd}
1510 /lib/modules/%{kernel_release}/kernel/drivers/bluetooth/*_cs.ko*
1511 /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/avm_cs.ko*
1512 /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/b1pcmcia.ko*
1513 /lib/modules/%{kernel_release}/kernel/drivers/telephony/ixj_pcmcia.ko*
1515 /lib/modules/%{kernel_release}/kernel/drivers/ata/pata_pcmcia.ko*
1516 /lib/modules/%{kernel_release}/kernel/drivers/ide/legacy/ide-cs.ko*
1517 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/*_cs.ko*
1518 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/b43
1519 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/hostap/hostap_cs.ko*
1520 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/libertas/*_cs.ko*
1521 /lib/modules/%{kernel_release}/kernel/drivers/parport/parport_cs.ko*
1522 /lib/modules/%{kernel_release}/kernel/drivers/serial/serial_cs.ko*
1523 /lib/modules/%{kernel_release}/kernel/drivers/usb/host/sl811_cs.ko*
1527 %if "%{_arch}" == "ppc"
1529 %defattr(644,root,root,755)
1530 %dir /boot/libs-%{kernel_release}
1531 /boot/libs-%{kernel_release}/common
1532 /boot/libs-%{kernel_release}/kernel
1533 /boot/libs-%{kernel_release}/lib
1534 /boot/libs-%{kernel_release}/of1275
1535 /boot/libs-%{kernel_release}/openfirmware
1536 /boot/libs-%{kernel_release}/simple
1537 %dir /boot/libs-%{kernel_release}/utils
1538 %attr(755,root,root) /boot/libs-%{kernel_release}/utils/*
1539 /boot/libs-%{kernel_release}/ld.script
1543 %if %{have_sound} && %{without myown}
1545 %defattr(644,root,root,755)
1546 /lib/modules/%{kernel_release}/kernel/sound
1547 %exclude %dir /lib/modules/%{kernel_release}/kernel/sound
1548 %exclude /lib/modules/%{kernel_release}/kernel/sound/ac97_bus.ko*
1549 %exclude /lib/modules/%{kernel_release}/kernel/sound/sound*.ko*
1551 %exclude /lib/modules/%{kernel_release}/kernel/sound/oss
1554 /lib/modules/%{kernel_release}/kernel/drivers/usb/gadget/g_midi.ko*
1555 /lib/modules/%{kernel_release}/kernel/drivers/media/video/cx88/cx88-alsa.ko*
1556 /lib/modules/%{kernel_release}/kernel/drivers/media/video/em28xx/em28xx-alsa.ko*
1557 /lib/modules/%{kernel_release}/kernel/drivers/media/video/saa7134/saa7134-alsa.ko*
1560 %if %{have_oss} && %{without myown}
1562 %defattr(644,root,root,755)
1563 /lib/modules/%{kernel_release}/kernel/sound/oss
1568 %defattr(644,root,root,755)
1569 %dir %{_kernelsrcdir}
1570 %{_kernelsrcdir}/include
1571 %{_kernelsrcdir}/config-dist
1572 %{_kernelsrcdir}/Module.symvers-dist
1574 %files module-build -f aux_files
1575 %defattr(644,root,root,755)
1576 # symlinks pointint to kernelsrcdir
1577 %dir /lib/modules/%{kernel_release}
1578 /lib/modules/%{kernel_release}/build
1579 %{_kernelsrcdir}/Kbuild
1580 %{_kernelsrcdir}/localversion
1582 %{_kernelsrcdir}/arch/powerpc/lib/crtsavres.*
1584 %{_kernelsrcdir}/arch/*/kernel/asm-offsets*
1585 %{_kernelsrcdir}/arch/*/kernel/sigframe*.h
1586 %{_kernelsrcdir}/drivers/lguest/lg.h
1587 %{_kernelsrcdir}/kernel/bounds.c
1588 %dir %{_kernelsrcdir}/scripts
1589 %dir %{_kernelsrcdir}/scripts/kconfig
1590 %{_kernelsrcdir}/scripts/Kbuild.include
1591 %{_kernelsrcdir}/scripts/Makefile*
1592 %{_kernelsrcdir}/scripts/basic
1593 %{_kernelsrcdir}/scripts/mkmakefile
1594 %{_kernelsrcdir}/scripts/mod
1595 %{_kernelsrcdir}/scripts/setlocalversion
1596 %{_kernelsrcdir}/scripts/*.c
1597 %{_kernelsrcdir}/scripts/*.sh
1598 %{_kernelsrcdir}/scripts/kconfig/*
1599 %{_kernelsrcdir}/scripts/mkcompile_h
1602 %defattr(644,root,root,755)
1603 %dir %{_kernelsrcdir}
1604 %{_kernelsrcdir}/Documentation
1607 %files source -f aux_files_exc
1608 %defattr(644,root,root,755)
1609 %{_kernelsrcdir}/arch/*/[!Mk]*
1610 %{_kernelsrcdir}/arch/*/kernel/[!M]*
1611 %{_kernelsrcdir}/arch/ia64/kvm
1612 %{_kernelsrcdir}/arch/powerpc/kvm
1614 %exclude %{_kernelsrcdir}/arch/powerpc/lib/crtsavres.*
1616 %{_kernelsrcdir}/arch/s390/kvm
1617 %{_kernelsrcdir}/arch/x86/kvm
1618 %exclude %{_kernelsrcdir}/arch/*/kernel/asm-offsets*
1619 %exclude %{_kernelsrcdir}/arch/*/kernel/sigframe*.h
1620 %exclude %{_kernelsrcdir}/drivers/lguest/lg.h
1621 %{_kernelsrcdir}/block
1622 %{_kernelsrcdir}/crypto
1623 %{_kernelsrcdir}/drivers
1625 %if %{with grsecurity} && %{without rescuecd}
1626 %{_kernelsrcdir}/grsecurity
1628 %{_kernelsrcdir}/init
1629 %{_kernelsrcdir}/ipc
1630 %{_kernelsrcdir}/kernel
1631 %exclude %{_kernelsrcdir}/kernel/bounds.c
1632 %{_kernelsrcdir}/lib
1634 %{_kernelsrcdir}/net
1635 %{_kernelsrcdir}/virt
1636 %{_kernelsrcdir}/scripts/*
1637 %exclude %{_kernelsrcdir}/scripts/Kbuild.include
1638 %exclude %{_kernelsrcdir}/scripts/Makefile*
1639 %exclude %{_kernelsrcdir}/scripts/basic
1640 %exclude %{_kernelsrcdir}/scripts/kconfig
1641 %exclude %{_kernelsrcdir}/scripts/mkmakefile
1642 %exclude %{_kernelsrcdir}/scripts/mod
1643 %exclude %{_kernelsrcdir}/scripts/setlocalversion
1644 %exclude %{_kernelsrcdir}/scripts/*.c
1645 %exclude %{_kernelsrcdir}/scripts/*.sh
1646 %{_kernelsrcdir}/sound
1647 %{_kernelsrcdir}/security
1648 %{_kernelsrcdir}/usr
1649 %{_kernelsrcdir}/COPYING
1650 %{_kernelsrcdir}/CREDITS
1651 %{_kernelsrcdir}/MAINTAINERS
1652 %{_kernelsrcdir}/README
1653 %{_kernelsrcdir}/REPORTING-BUGS
1654 %{_kernelsrcdir}/.mailmap