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: ec23e3dce22b23ca681199fe515f10fb
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 # Taken from http://download.opensuse.org/factory/repo/src-oss/suse/src/kernel-source-2.6.27.7-3.1.src.rpm
281 Patch90: kernel-mpt-fusion.patch
283 # http://vserver.13thfloor.at/Experimental/patch-2.6.27.6-vs2.3.0.36.2.diff
284 Patch100: linux-2.6-vs2.3.patch
285 Patch101: kernel-vserver-fixes.patch
287 # from http://www.cl.cam.ac.uk/Research/SRG/netos/xen/downloads/xen-3.0.2-src.tgz
288 #Patch120: xen-3.0-2.6.16.patch
290 # Wake-On-Lan fix for nForce drivers; using http://atlas.et.tudelft.nl/verwei90/nforce2/wol.html
291 # Fix verified for that kernel version.
292 Patch130: linux-2.6-forcedeth-WON.patch
294 # http://download.filesystems.org/unionfs/unionfs-2.x/unionfs-2.5_for_2.6.27-rc6.diff.gz
295 Patch140: kernel-unionfs.patch
296 Patch141: kernel-unionfs-apparmor.patch
298 Patch142: kernel-autofs4-2.6.27-v5-update-20081027.patch
300 Patch150: kernel-ppc-crtsavres.patch
302 Patch200: linux-2.6-ppc-ICE-hacks.patch
304 # The following patch extend the routing functionality in Linux
305 # to support static routes (defined by user), new way to use the
306 # alternative routes, the reverse path protection (rp_filter),
307 # the NAT processing to use correctly the routing when multiple
309 # http://www.ssi.bg/~ja/routes-2.6.27-15.diff
310 Patch300: kernel-routes.patch
312 Patch1000: linux-2.6-grsec-minimal.patch
314 Patch2000: kernel-small_fixes.patch
315 Patch2001: linux-2.6.21.1-pwc-uncompress.patch
316 Patch2002: kernel-netns-inet6-tw.patch
317 Patch2003: kernel-regressions.patch
319 # kill some thousands of warnings
320 # (only warnings, so just remove parts of this patch if conflics)
321 Patch2500: linux-2.6-warnings.patch
323 # based on https://forgesvn1.novell.com/svn/apparmor/trunk/kernel-patches/2.6.27 rev 1303
324 # repatched and adapted for vserver/grsec changes in vfs API, experimental
325 Patch5000: kernel-apparmor.patch
326 # with grsec_full version
327 Patch5001: kernel-apparmor-after-grsec_full.patch
328 Patch5002: kernel-apparmor-common.patch
331 # based on http://ftp.leg.uct.ac.za/pub/linux/rip/inittmpfs-2.6.14.diff.gz
332 Patch7000: kernel-inittmpfs.patch
333 ### based on http://udpcast.linux.lu/download/bzip2-lzma-kernel-2.6.26.3.patch.gz
334 # http://lkml.org/lkml/2008/10/14/268
335 Patch7001: kernel-bzip2-lzma.patch
338 Patch9997: pax_selinux_hooks-2.6.20.patch
340 # based on http://www.grsecurity.net/~paxguy1/pax-linux-2.6.24.6-test45.patch
341 Patch9998: kernel-pax.patch
343 # based on http://www.grsecurity.net/~spender/grsecurity-2.1.12-2.6.27.4-200810272314.patch
344 Patch9999: linux-2.6-grsec_full.patch
345 Patch10000: linux-2.6-grsec-caps.patch
346 Patch10001: linux-2.6-grsec-common.patch
347 Patch10002: kernel-grsec_fixes.patch
348 Patch10003: linux-2.6-grsec-no-stupid-SoB.patch
350 URL: http://www.kernel.org/
351 BuildRequires: binutils >= 3:2.18
352 %ifarch sparc sparc64
353 BuildRequires: elftoaout
356 BuildRequires: uboot-mkimage
359 BuildRequires: /sbin/depmod
360 BuildRequires: gcc >= 5:3.2
361 %{?with_rescuecd:BuildRequires: lzma >= 1:4.42.2}
362 # for hostname command
363 BuildRequires: net-tools
364 BuildRequires: perl-base
365 BuildRequires: rpm-build >= 4.4.9-56
366 BuildRequires: rpmbuild(macros) >= 1.217
367 Requires(post): coreutils
368 Requires(post): geninitrd >= 2.57
369 Requires(post): module-init-tools >= 0.9.9
370 Requires: /sbin/depmod
372 Requires: geninitrd >= 2.57
373 Requires: module-init-tools >= 0.9.9
374 Provides: %{name}(netfilter) = %{netfilter_snap}
375 Provides: %{name}(vermagic) = %{kernel_release}
376 %if %{with xen0} || %{with xenU}
377 Provides: kernel(xen) = %{_xen_version}
379 Obsoletes: kernel%{_alt_kernel}-isdn-mISDN
380 Obsoletes: kernel-misc-acer_acpi
381 Obsoletes: kernel-misc-fuse
382 Obsoletes: kernel-misc-uvc
383 Obsoletes: kernel-modules
384 Obsoletes: kernel-net-ar81
385 Obsoletes: kernel-net-hostap
386 Obsoletes: kernel-net-ieee80211
387 Obsoletes: kernel-net-ipp2p
388 Obsoletes: kernel-net-rt61
389 Obsoletes: kernel-smp
390 Conflicts: e2fsprogs < 1.29
391 Conflicts: isdn4k-utils < 3.1pre1
392 Conflicts: jfsutils < 1.1.3
393 Conflicts: module-init-tools < 0.9.10
394 Conflicts: nfs-utils < 1.0.5
395 Conflicts: oprofile < 0.9
396 Conflicts: ppp < 1:2.4.0
397 Conflicts: procps < 3.2.0
398 Conflicts: quota-tools < 3.09
399 %if %{with reiserfs4}
400 Conflicts: reiser4progs < 1.0.0
402 Conflicts: reiserfsprogs < 3.6.3
403 Conflicts: udev < 1:071
404 Conflicts: util-linux < 2.10o
405 Conflicts: util-vserver < 0.30.215-10
406 Conflicts: xfsprogs < 2.6.0
407 %if %{with xen0} || %{with xenU} || %{with pae}
408 ExclusiveArch: %{ix86}
410 ExcludeArch: i386 i486 i586
413 ExclusiveArch: %{ix86} %{x8664} alpha arm ia64 ppc ppc64 sparc sparc64
416 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
418 %ifarch %{ix86} %{x8664}
419 %define target_arch_dir x86
422 %define target_arch_dir powerpc
424 %ifnarch %{ix86} %{x8664} ppc ppc64
425 %define target_arch_dir %{_target_base_arch}
428 %define defconfig arch/%{target_arch_dir}/defconfig
430 # No ELF objects there to strip (skips processing 27k files)
431 %define _noautostrip .*%{_kernelsrcdir}/.*
432 %define _noautochrpath .*%{_kernelsrcdir}/.*
435 %define initrd_dir /boot/efi
437 %define initrd_dir /boot
440 %define _kernelsrcdir /usr/src/linux%{_alt_kernel}-%{version}
442 %if "%{_target_base_arch}" != "%{_arch}"
443 %define CrossOpts ARCH=%{_target_base_arch} CROSS_COMPILE=%{_target_cpu}-pld-linux-
444 %define DepMod /bin/true
446 %if "%{_arch}" == "sparc" && "%{_target_base_arch}" == "sparc64"
447 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
448 %define DepMod /sbin/depmod
451 %if "%{_arch}" == "sparc64" && "%{_target_base_arch}" == "sparc"
452 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
453 %define DepMod /sbin/depmod
456 %if "%{_arch}" == "x86_64" && "%{_target_base_arch}" == "i386"
457 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
458 %define DepMod /sbin/depmod
461 %if "%{_target_base_arch}" == ppc || "%{_target_base_arch}" == "ppc64"
462 %define CrossOpts ARCH=powerpc CROSS_COMPILE=%{_target_cpu}-pld-linux-
466 %define CrossOpts ARCH=powerpc CC="%{__cc}"
468 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
470 %define DepMod /sbin/depmod
472 %define MakeOpts %{CrossOpts} HOSTCC="%{__cc}"
474 %define __features Netfilter module dated: %{netfilter_snap}\
475 %{?with_grsec_full:Grsecurity full support - enabled}\
476 %{?with_pax:PaX support - enabled}\
477 %{?with_xen0:Xen 0 - enabled}\
478 %{?with_xenU:Xen U - enabled}\
479 %{?with_fbcondecor:Fbsplash/fbcondecor - enabled }\
480 %{?with_nfsroot:Root on NFS - enabled}
482 %define Features %(echo "%{__features}" | sed '/^$/d')
485 This package contains the Linux kernel that is used to boot and run
486 your system. It contains few device drivers for specific hardware.
487 Most hardware is instead supported by modules loaded after booting.
491 %description -l de.UTF-8
492 Das Kernel-Paket enthält den Linux-Kernel (vmlinuz), den Kern des
493 Linux-Betriebssystems. Der Kernel ist für grundliegende
494 Systemfunktionen verantwortlich: Speicherreservierung,
495 Prozeß-Management, Geräte Ein- und Ausgaben, usw.
499 %description -l fr.UTF-8
500 Le package kernel contient le kernel linux (vmlinuz), la partie
501 centrale d'un système d'exploitation Linux. Le noyau traite les
502 fonctions basiques d'un système d'exploitation: allocation mémoire,
503 allocation de process, entrée/sortie de peripheriques, etc.
507 %description -l pl.UTF-8
508 Pakiet zawiera jądro Linuksa niezbędne do prawidłowego działania
509 Twojego komputera. Zawiera w sobie sterowniki do sprzętu znajdującego
510 się w komputerze, takiego jak sterowniki dysków itp.
515 Summary: vmlinux - uncompressed kernel image
516 Summary(de.UTF-8): vmlinux - dekompressiertes Kernel Bild
517 Summary(pl.UTF-8): vmlinux - rozpakowany obraz jÄ…dra
519 Obsoletes: kernel-smp-vmlinux
522 vmlinux - uncompressed kernel image.
524 %description vmlinux -l de.UTF-8
525 vmlinux - dekompressiertes Kernel Bild.
527 %description vmlinux -l pl.UTF-8
528 vmlinux - rozpakowany obraz jÄ…dra.
531 Summary: DRM kernel modules
532 Summary(de.UTF-8): DRM Kernel Treiber
533 Summary(pl.UTF-8): Sterowniki DRM
535 Requires(postun): %{name} = %{epoch}:%{version}-%{release}
536 Requires: %{name} = %{epoch}:%{version}-%{release}
537 Obsoletes: kernel-smp-drm
543 %description drm -l de.UTF-8
546 %description drm -l pl.UTF-8
550 Summary: PCMCIA modules
551 Summary(de.UTF-8): PCMCIA Module
552 Summary(pl.UTF-8): Moduły PCMCIA
554 Requires(postun): %{name} = %{epoch}:%{version}-%{release}
555 Requires: %{name} = %{epoch}:%{version}-%{release}
556 Obsoletes: kernel-smp-pcmcia
557 Conflicts: pcmcia-cs < 3.1.21
558 Conflicts: pcmciautils < 004
564 %description pcmcia -l de.UTF-8
567 %description pcmcia -l pl.UTF-8
571 Summary: Libraries for preparing bootable kernel on PowerPCs
572 Summary(pl.UTF-8): Biblioteki do przygotowania bootowalnego jÄ…dra dla PowerPC
574 Requires: %{name} = %{epoch}:%{version}-%{release}
575 Requires: mkvmlinuz >= 1.3
576 Obsoletes: kernel-smp-libs
580 Libraries for preparing bootable kernel on PowerPCs. Script called
581 mkvmlinuz may be useful for this.
583 %description libs -l pl.UTF-8
584 Biblioteki do przygotowania bootowalnego jÄ…dra dla PowerPC. Skrypt
585 mkvmlinuz może być do tego przydatny.
588 Summary: ALSA kernel modules
589 Summary(de.UTF-8): ALSA Kernel Module
590 Summary(pl.UTF-8): Sterowniki dźwięku ALSA
592 Requires(postun): %{name} = %{epoch}:%{version}-%{release}
593 Requires: %{name} = %{epoch}:%{version}-%{release}
594 Obsoletes: kernel-smp-sound-alsa
597 %description sound-alsa
598 ALSA (Advanced Linux Sound Architecture) sound drivers.
600 %description sound-alsa -l de.UTF-8
601 ALSA (Advanced Linux Sound Architecture) Sound-Treiber.
603 %description sound-alsa -l pl.UTF-8
604 Sterowniki dźwięku ALSA (Advanced Linux Sound Architecture).
607 Summary: OSS kernel modules
608 Summary(de.UTF-8): OSS Kernel Module
609 Summary(pl.UTF-8): Sterowniki dźwięku OSS
611 Requires(postun): %{name} = %{epoch}:%{version}-%{release}
612 Requires: %{name} = %{epoch}:%{version}-%{release}
613 Obsoletes: kernel-smp-sound-oss
616 %description sound-oss
617 OSS (Open Sound System) drivers.
619 %description sound-oss -l de.UTF-8
620 OSS (Open Sound System) Treiber.
622 %description sound-oss -l pl.UTF-8
623 Sterowniki dźwięku OSS (Open Sound System).
626 Summary: Header files for the Linux kernel
627 Summary(de.UTF-8): Header Dateien für den Linux-Kernel
628 Summary(pl.UTF-8): Pliki nagłówkowe jądra Linuksa
629 Group: Development/Building
630 Provides: %{name}-headers(netfilter) = %{netfilter_snap}
634 These are the C header files for the Linux kernel, which define
635 structures and constants that are needed when rebuilding the kernel or
636 building kernel modules.
638 %description headers -l de.UTF-8
639 Dies sind die C Header Dateien für den Linux-Kernel, die definierte
640 Strukturen und Konstante beinhalten, die beim rekompilieren des
641 Kernels oder bei Kernel Modul kompilationen gebraucht werden.
643 %description headers -l pl.UTF-8
644 Pakiet zawiera pliki nagłówkowe jądra, niezbędne do rekompilacji jądra
645 oraz budowania modułów jądra.
647 %package module-build
648 Summary: Development files for building kernel modules
649 Summary(de.UTF-8): Development Dateien die beim Kernel Modul kompilationen gebraucht werden
650 Summary(pl.UTF-8): Pliki służące do budowania modułów jądra
651 Group: Development/Building
652 Requires: %{name}-headers = %{epoch}:%{version}-%{release}
653 Conflicts: rpmbuild(macros) < 1.321
656 %description module-build
657 Development files from kernel source tree needed to build Linux kernel
658 modules from external packages.
660 %description module-build -l de.UTF-8
661 Development Dateien des Linux-Kernels die beim kompilieren externer
662 Kernel Module gebraucht werden.
664 %description module-build -l pl.UTF-8
665 Pliki ze drzewa źródeł jądra potrzebne do budowania modułów jądra
666 Linuksa z zewnętrznych pakietów.
669 Summary: Kernel source tree
670 Summary(de.UTF-8): Der Kernel Quelltext
671 Summary(pl.UTF-8): Kod źródłowy jądra Linuksa
672 Group: Development/Building
673 Requires: %{name}-module-build = %{epoch}:%{version}-%{release}
677 This is the source code for the Linux kernel. You can build a custom
678 kernel that is better tuned to your particular hardware.
680 %description source -l de.UTF-8
681 Das Kernel-Source-Paket enthält den source code (C/Assembler-Code) des
682 Linux-Kernels. Die Source-Dateien werden gebraucht, um viele
683 C-Programme zu kompilieren, da sie auf Konstanten zurückgreifen, die
684 im Kernel-Source definiert sind. Die Source-Dateien können auch
685 benutzt werden, um einen Kernel zu kompilieren, der besser auf Ihre
686 Hardware ausgerichtet ist.
688 %description source -l fr.UTF-8
689 Le package pour le kernel-source contient le code source pour le noyau
690 linux. Ces sources sont nécessaires pour compiler la plupart des
691 programmes C, car il dépend de constantes définies dans le code
692 source. Les sources peuvent être aussi utilisée pour compiler un noyau
693 personnalisé pour avoir de meilleures performances sur des matériels
696 %description source -l pl.UTF-8
697 Pakiet zawiera kod źródłowy jądra systemu.
700 Summary: Kernel documentation
701 Summary(de.UTF-8): Kernel Dokumentation
702 Summary(pl.UTF-8): Dokumentacja do jÄ…dra Linuksa
707 This is the documentation for the Linux kernel, as found in
708 /usr/src/linux/Documentation directory.
710 %description doc -l de.UTF-8
711 Dies ist die Kernel Dokumentation wie sie im 'Documentation'
712 Verzeichniss vorgefunden werden kann.
714 %description doc -l pl.UTF-8
715 Pakiet zawiera dokumentacjÄ™ do jÄ…dra Linuksa pochodzÄ…cÄ… z katalogu
716 /usr/src/linux/Documentation.
722 # hack against warning in pax/grsec
724 sed -i 's/-Werror//' arch/alpha/kernel/Makefile
728 install %{SOURCE5} Makefile.ppclibs
731 %if "%{postver}" != "%{nil}"
732 %{__bzip2} -dc %{SOURCE1} | patch -p1 -s
737 ##ifarch %{ix86} %{x8664} ia64 ppc alpha
741 # kernel-2.6-ueagle-atm-freezer.patch
747 %if %{with fbcondecor}
760 # kernel-pom-ng-IPV4OPTSSTRIP.patch
763 # kernel-pom-ng-ipv4options.patch
766 # kernel-pom-ng-ROUTE.patch
769 # kernel-pom-ng-mms-conntrack-nat.patch
772 # kernel-pom-ng-rsh.patch
775 # kernel-pom-ng-rpc.patch
778 # kernel-nf_rtsp.patch
781 # kernel-owner-xid.patch
786 # kernel-ipt_account.patch
789 # kernel-ipt_ACCOUNT.patch
792 # kernel-layer7.patch
828 # kernel-rndis_host-wm5.patch
833 # hostap enhancements from/for aircrack-ng
836 # LSI MPT Fusion driver update
845 #%if %{with xen0} || %{with xenU}
846 #%ifarch %{ix86} %{x8664} ia64
852 %if %{without rescuecd} && %{with vserver}
861 %{?with_apparmor:%patch141 -p1}
873 # grsecurity & pax stuff
877 %{?with_vserver:%patch10000 -p1}
878 %{?with_vserver:%patch10001 -p1}
879 %{?with_vserver:%patch10002 -p1}
880 %{?with_vserver:%patch10003 -p1}
883 %if %{with grsec_full}
885 %{?with_vserver:%patch10000 -p1}
886 %{?with_vserver:%patch10001 -p1}
887 %{?with_vserver:%patch10002 -p1}
888 %{?with_vserver:%patch10003 -p1}
890 %if %{with grsec_minimal}
892 # remember that we have the same config file for grsec_minimal and
893 # grsec_full, but the patches are different.
898 # now we have an separate testing pax-only patch - in the future we
899 # could have single grsecurity patch and will have to prepare separate
900 # configs for grsec_minimal, grsec_full and pax to support such
901 # configurations like pax & grsec_minimal.
902 # So, in a future there could be no patch9998, but only config
903 # would tell which options should be enabled.
904 # The second option is to maintain separate pax-only patch.
906 #patch9997 -p1 - needs update
912 # end of grsecurity & pax stuff
916 %if %{with grsec_full} || %{with pax_full}
940 # Fix EXTRAVERSION in main Makefile
941 sed -i 's#EXTRAVERSION =.*#EXTRAVERSION = %{postver}%{?alt_kernel:_%{alt_kernel}}#g' Makefile
943 # on sparc this line causes CONFIG_INPUT=m (instead of =y), thus breaking build
944 sed -i -e '/select INPUT/d' net/bluetooth/hidp/Kconfig
946 # on sparc64 avoid building break due to NULL pointer type warrning
947 sed -i -e 's/^EXTRA_CFLAGS := -Werror/EXTRA_CFLAGS := /' arch/sparc64/kernel/Makefile
949 # cleanup backups after patching
950 find '(' -name '*~' -o -name '*.orig' -o -name '.gitignore' ')' -print0 | xargs -0 -r -l512 rm -f
958 CONFIG_PAX_SEGMEXEC=y
959 # performance impact on CPUs without NX bit
960 CONFIG_PAX_PAGEEXEC=n
963 CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM=n
969 CONFIG_PAX_NOELFRELOCS=n
972 CONFIG_PAX_EMUTRAMP=y
973 CONFIG_PAX_EMUSIGRT=y
977 %ifarch sparc sparc64 alpha
981 # Now we have to check MAC system integration. Grsecurity (full) uses PAX_HAVE_ACL_FLAGS
982 # setting (direct acces). grsec_minimal probably have no idea about PaX so we probably
983 # could use PAX_NO_ACL_FLAGS, but for testing the hooks setting will be used
984 # PAX_HOOK_ACL_FLAGS. SELinux should also be able to make PaX settings via hooks
986 %if %{with grsec_full}
987 # Hardening grsec options if with pax
988 CONFIG_GRKERNSEC_PROC_MEMMAP=y
989 # almost rational (see HIDESYM help)
990 CONFIG_GRKERNSEC_HIDESYM=y
992 # no change needed CONFIG=PAX_HAVE_ACL_FLAGS=y is taken from the kernel-pax.config
994 # selinux or other hooks?
995 CONFIG_PAX_HAVE_ACL_FLAGS=n
996 CONFIG_PAX_HOOK_ACL_FLAGS=y
1005 cat <<-EOCONFIG > $1
1006 # CONFIG_SOUND is not set
1007 # CONFIG_AUDIT is not set
1008 # CONFIG_TR is not set
1009 # CONFIG_BT is not set
1010 # CONFIG_VIDEO_DEV is not set
1011 # CONFIG_DVB_CORE is not set
1012 # CONFIG_HAMRADIO is not set
1013 # CONFIG_ARCNET is not set
1014 # CONFIG_FB is not set
1015 # CONFIG_DRM is not set
1016 # CONFIG_WATCHDOG is not set
1017 # CONFIG_INPUT_JOYSTICK is not set
1018 # CONFIG_DEBUG_KERNEL is not set
1019 # CONFIG_ISDN is not set
1020 # CONFIG_AGP is not set
1021 # CONFIG_SECURITY is not set
1022 # CONFIG_PARIDE is not set
1023 # CONFIG_CPU_FREQ is not set
1024 # CONFIG_GAMEPORT is not set
1025 # CONFIG_KVM is not set
1026 # CONFIG_PHONE is not set
1027 CONFIG_BLK_DEV_LOOP=y
1039 Config="kernel-%{target_arch_dir}.config"
1040 echo "Building config file for %{_target_cpu} using $Config et al."
1042 # prepare local and important options
1043 cat <<-EOCONFIG > important.config
1046 CONFIG_DEBUG_SLAB_LEAK=y
1047 CONFIG_DEBUG_PREEMPT=y
1048 CONFIG_RT_DEADLOCK_DETECT=y
1055 # apparmor, will be moved to external file if works
1056 %if %{with apparmor}
1057 CONFIG_SECURITY_APPARMOR=y
1058 CONFIG_SECURITY_APPARMOR_BOOTPARAM_VALUE=1
1059 CONFIG_SECURITY_APPARMOR_DISABLE=n
1066 %ifarch i686 athlon pentium3 pentium4
1074 %if %{without pcmcia}
1078 %if %{with fbcondecor}
1082 CONFIG_FB_TILEBLITTING=n
1083 CONFIG_FB_CON_DECOR=y
1091 # Temporary disabled RELOCATABLE. Needed only on x86??
1092 %if %{with pax} || %{with grsec_full}
1093 CONFIG_RELOCATABLE=n
1097 RescueConfig rescue.config
1098 PaXconfig pax.config
1100 # prepare kernel-style config file from multiple config files
1101 %{__awk} -v arch="all %{target_arch_dir} %{_target_base_arch} %{_target_cpu}" -f %{SOURCE6} \
1103 %if %{with rescuecd}
1115 %if %{with pax_full}
1120 %if %{with grsec_full}
1124 %if %{with grsec_minimal}
1146 %if %{with tuxonice}
1147 %ifarch %{ix86} %{x8664} ia64 ppc ppc64
1151 %{SOURCE40} %{?0:netfilter} \
1152 %{SOURCE41} %{?0:patches} \
1154 $RPM_SOURCE_DIR/$Config \
1160 echo "Building kernel $1 ..."
1161 install .config %{defconfig}
1162 %{__make} %{MakeOpts} mrproper \
1163 RCS_FIND_IGNORE='-name build-done -prune -o'
1164 ln -sf %{defconfig} .config
1166 %{__make} %{MakeOpts} clean \
1167 RCS_FIND_IGNORE='-name build-done -prune -o'
1168 %{__make} %{MakeOpts} include/linux/version.h \
1169 %{?with_verbose:V=1}
1171 %{__make} %{MakeOpts} scripts/mkcompile_h \
1172 %{?with_verbose:V=1}
1174 # make does vmlinux, modules and bzImage at once
1176 %{__make} %{MakeOpts} image \
1177 %{?with_verbose:V=1}
1179 %{__make} %{MakeOpts} modules \
1180 %{?with_verbose:V=1}
1182 %{__make} %{MakeOpts} \
1183 %{?with_verbose:V=1}
1187 PreInstallKernel() {
1188 Config="%{_target_base_arch}"
1189 KernelVer=%{kernel_release}
1191 mkdir -p $KERNEL_INSTALL_DIR/boot
1192 install System.map $KERNEL_INSTALL_DIR/boot/System.map-$KernelVer
1193 %ifarch %{ix86} %{x8664}
1194 install arch/x86/boot/bzImage $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
1195 install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinux-$KernelVer
1197 %ifarch alpha sparc sparc64
1198 gzip -cfv vmlinux > vmlinuz
1199 install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinux-$KernelVer
1200 install vmlinuz $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
1202 elftoaout arch/sparc/boot/image -o vmlinux.aout
1203 install vmlinux.aout $KERNEL_INSTALL_DIR/boot/vmlinux.aout-$KernelVer
1206 elftoaout arch/sparc64/boot/image -o vmlinux.aout
1207 install vmlinux.aout $KERNEL_INSTALL_DIR/boot/vmlinux.aout-$KernelVer
1211 install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinux-$KernelVer
1212 install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
1215 %{__make} -f Makefile.ppclibs install \
1216 DESTDIR=$KERNEL_INSTALL_DIR/boot/libs-$KernelVer
1219 gzip -cfv vmlinux > vmlinuz
1220 install -d $KERNEL_INSTALL_DIR/boot/efi
1221 install vmlinuz $KERNEL_INSTALL_DIR/boot/efi/vmlinuz-$KernelVer
1222 ln -sf efi/vmlinuz-$KernelVer $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
1225 install arch/arm/boot/zImage $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
1228 %{__make} %{MakeOpts} modules_install firmware_install \
1229 %{?with_verbose:V=1} \
1231 INSTALL_MOD_PATH=$KERNEL_INSTALL_DIR \
1232 INSTALL_FW_PATH=$KERNEL_INSTALL_DIR/lib/firmware/$KernelVer \
1233 KERNELRELEASE=$KernelVer
1235 # You'd probabelly want to make it somewhat different
1236 install -d $KERNEL_INSTALL_DIR%{_kernelsrcdir}
1237 install Module.symvers $KERNEL_INSTALL_DIR%{_kernelsrcdir}/Module.symvers-dist
1239 echo "CHECKING DEPENDENCIES FOR KERNEL MODULES"
1240 if [ %DepMod = /sbin/depmod ]; then
1241 /sbin/depmod --basedir $KERNEL_INSTALL_DIR -ae -F $KERNEL_INSTALL_DIR/boot/System.map-$KernelVer -r $KernelVer || :
1243 touch $KERNEL_INSTALL_DIR/lib/modules/$KernelVer/modules.dep
1244 # binary cache produced by depmod at runtime
1245 touch $KERNEL_INSTALL_DIR/lib/modules/$KernelVer/modules.{alias,dep,symbols}.bin
1246 echo "KERNEL RELEASE $KernelVer DONE"
1249 KERNEL_BUILD_DIR=`pwd`
1250 echo "-%{localversion}" > localversion
1252 KERNEL_INSTALL_DIR="$KERNEL_BUILD_DIR/build-done/kernel"
1253 rm -rf $KERNEL_INSTALL_DIR
1254 %if %{without myown}
1257 cat $RPM_SOURCE_DIR/kernel-myown.config > %{defconfig}
1259 ln -sf %{defconfig} .config
1260 install -d $KERNEL_INSTALL_DIR%{_kernelsrcdir}/include/linux
1261 rm -f include/linux/autoconf.h
1262 %{__make} %{MakeOpts} include/linux/autoconf.h
1263 install include/linux/autoconf.h \
1264 $KERNEL_INSTALL_DIR%{_kernelsrcdir}/include/linux/autoconf-dist.h
1266 $KERNEL_INSTALL_DIR%{_kernelsrcdir}/config-dist
1268 %{__awk} %{?debug:-v dieOnError=1} -v infile=%{defconfig} -f %{SOURCE8} .config
1273 %{__make} %{MakeOpts} include/linux/utsrelease.h
1274 cp include/linux/utsrelease.h{,.save}
1275 cp include/linux/version.h{,.save}
1276 cp scripts/mkcompile_h{,.save}
1279 rm -rf $RPM_BUILD_ROOT
1283 export DEPMOD=%DepMod
1285 install -d $RPM_BUILD_ROOT%{_kernelsrcdir}
1286 install -d $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/%{kernel_release}
1288 # test if we can hardlink -- %{_builddir} and $RPM_BUILD_ROOT on same partition
1289 if cp -al COPYING $RPM_BUILD_ROOT/COPYING 2>/dev/null; then
1291 rm -f $RPM_BUILD_ROOT/COPYING
1294 KERNEL_BUILD_DIR=`pwd`
1296 cp -a$l $KERNEL_BUILD_DIR/build-done/kernel/* $RPM_BUILD_ROOT
1298 if [ -e $RPM_BUILD_ROOT/lib/modules/%{kernel_release} ] ; then
1299 rm -f $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/build
1300 ln -sf %{_kernelsrcdir} $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/build
1301 install -d $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/{cluster,misc}
1304 find . -maxdepth 1 ! -name "build-done" ! -name "." -exec cp -a$l "{}" "$RPM_BUILD_ROOT%{_kernelsrcdir}/" ";"
1306 cd $RPM_BUILD_ROOT%{_kernelsrcdir}
1308 %{__make} %{MakeOpts} mrproper archclean \
1309 RCS_FIND_IGNORE='-name build-done -prune -o'
1311 if [ -e $KERNEL_BUILD_DIR/build-done/kernel%{_kernelsrcdir}/include/linux/autoconf-dist.h ]; then
1312 install $KERNEL_BUILD_DIR/build-done/kernel%{_kernelsrcdir}/include/linux/autoconf-dist.h \
1313 $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux
1314 install $KERNEL_BUILD_DIR/build-done/kernel%{_kernelsrcdir}/config-dist \
1315 $RPM_BUILD_ROOT%{_kernelsrcdir}
1318 cp -Rdp$l $KERNEL_BUILD_DIR/include/linux/* \
1319 $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux
1321 %{__make} %{MakeOpts} mrproper
1322 mv -f include/linux/utsrelease.h.save $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux/utsrelease.h
1323 cp include/linux/version.h{.save,}
1324 cp scripts/mkcompile_h{.save,}
1325 rm -rf include/linux/version.h.save
1326 rm -rf scripts/mkcompile_h.save
1327 install %{SOURCE3} $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux/autoconf.h
1328 install %{SOURCE4} $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux/config.h
1330 # collect module-build files and directories
1331 perl %{SOURCE7} %{_kernelsrcdir} %{_builddir}/%{name}-%{version}
1334 touch $RPM_BUILD_ROOT%{initrd_dir}/initrd-%{kernel_release}.gz
1336 # rpm obeys filelinkto checks for ghosted symlinks, convert to files
1337 rm -f $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/{build,source}
1338 touch $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/{build,source}
1340 # remove unnecessary dir with dead symlink
1341 rm -rf $RPM_BUILD_ROOT/arch/i386
1344 rm -rf $RPM_BUILD_ROOT
1347 if [ -x /sbin/new-kernel-pkg ]; then
1348 /sbin/new-kernel-pkg --remove %{kernel_release}
1353 mv -f /boot/efi/vmlinuz{,.old} 2> /dev/null
1354 %{?alt_kernel:mv -f /boot/efi/vmlinuz%{_alt_kernel}{,.old} 2> /dev/null}
1355 ln -sf vmlinuz-%{kernel_release} /boot/efi/vmlinuz
1356 %{?alt_kernel:ln -sf vmlinuz-%{kernel_release} /boot/efi/vmlinuz%{_alt_kernel}}
1358 mv -f /boot/vmlinuz{,.old} 2> /dev/null
1359 %{?alt_kernel:mv -f /boot/vmlinuz%{_alt_kernel}{,.old} 2> /dev/null}
1360 mv -f /boot/System.map{,.old} 2> /dev/null
1361 %{?alt_kernel:mv -f /boot/System%{_alt_kernel}.map{,.old} 2> /dev/null}
1362 ln -sf vmlinuz-%{kernel_release} /boot/vmlinuz
1363 %{?alt_kernel:ln -sf vmlinuz-%{kernel_release} /boot/vmlinuz%{_alt_kernel}}
1364 ln -sf System.map-%{kernel_release} /boot/System.map
1365 %{?alt_kernel:ln -sf System.map-%{kernel_release} /boot/System.map%{_alt_kernel}}
1367 %depmod %{kernel_release}
1369 /sbin/geninitrd -f --initrdfs=rom %{initrd_dir}/initrd-%{kernel_release}.gz %{kernel_release}
1370 mv -f %{initrd_dir}/initrd{,.old} 2> /dev/null
1371 %{?alt_kernel:mv -f %{initrd_dir}/initrd%{_alt_kernel}{,.old} 2> /dev/null}
1372 ln -sf initrd-%{kernel_release}.gz %{initrd_dir}/initrd
1373 %{?alt_kernel:ln -sf initrd-%{kernel_release}.gz %{initrd_dir}/initrd%{_alt_kernel}}
1375 if [ -x /sbin/new-kernel-pkg ]; then
1376 title="PLD Linux (%{pld_release})%{?alt_kernel: / %{alt_kernel}}"
1378 /sbin/new-kernel-pkg --initrdfile=%{initrd_dir}/initrd-%{kernel_release}.gz --install %{kernel_release} --banner "$title"
1379 elif [ -x /sbin/rc-boot ]; then
1380 /sbin/rc-boot 1>&2 || :
1384 mv -f /boot/vmlinux{,.old} 2> /dev/null
1385 %{?alt_kernel:mv -f /boot/vmlinux-%{alt_kernel}{,.old} 2> /dev/null}
1386 ln -sf vmlinux-%{kernel_release} /boot/vmlinux
1387 %{?alt_kernel:ln -sf vmlinux-%{kernel_release} /boot/vmlinux-%{alt_kernel}}
1390 %{_sbindir}/mkvmlinuz /boot/zImage-%{kernel_release} %{kernel_release}
1393 %depmod %{kernel_release}
1396 %depmod %{kernel_release}
1399 %depmod %{kernel_release}
1402 %depmod %{kernel_release}
1405 %depmod %{kernel_release}
1408 %depmod %{kernel_release}
1411 %depmod %{kernel_release}
1414 %depmod %{kernel_release}
1417 ln -snf %{basename:%{_kernelsrcdir}} %{_prefix}/src/linux%{_alt_kernel}
1420 if [ "$1" = "0" ]; then
1421 if [ -L %{_prefix}/src/linux%{_alt_kernel} ]; then
1422 if [ "$(readlink %{_prefix}/src/linux%{_alt_kernel})" = "linux%{_alt_kernel}-%{version}" ]; then
1423 rm -f %{_prefix}/src/linux%{_alt_kernel}
1428 %triggerin module-build -- %{name} = %{epoch}:%{version}-%{release}
1429 ln -sfn %{_kernelsrcdir} /lib/modules/%{kernel_release}/build
1430 ln -sfn %{_kernelsrcdir} /lib/modules/%{kernel_release}/source
1432 %triggerun module-build -- %{name} = %{epoch}:%{version}-%{release}
1433 if [ "$1" = 0 ]; then
1434 rm -f /lib/modules/%{kernel_release}/{build,source}
1438 %defattr(644,root,root,755)
1439 %ifarch sparc sparc64
1440 /boot/vmlinux.aout-%{kernel_release}
1443 /boot/efi/vmlinuz-%{kernel_release}
1445 /boot/vmlinuz-%{kernel_release}
1446 /boot/System.map-%{kernel_release}
1447 %ghost %{initrd_dir}/initrd-%{kernel_release}.gz
1448 /lib/firmware/%{kernel_release}
1449 %dir /lib/modules/%{kernel_release}
1450 %dir /lib/modules/%{kernel_release}/kernel
1452 /lib/modules/%{kernel_release}/kernel/arch
1454 /lib/modules/%{kernel_release}/kernel/crypto
1455 /lib/modules/%{kernel_release}/kernel/drivers
1456 %if %{have_drm} && %{without myown}
1457 %exclude /lib/modules/%{kernel_release}/kernel/drivers/gpu
1459 /lib/modules/%{kernel_release}/kernel/fs
1461 # this directory will be removed after disabling rcutorture mod. in 2.6.20.
1462 /lib/modules/%{kernel_release}/kernel/kernel
1464 /lib/modules/%{kernel_release}/kernel/lib
1465 /lib/modules/%{kernel_release}/kernel/net
1466 %if %{have_sound} && %{without myown}
1467 %dir /lib/modules/%{kernel_release}/kernel/sound
1468 /lib/modules/%{kernel_release}/kernel/sound/ac97_bus.ko*
1469 /lib/modules/%{kernel_release}/kernel/sound/sound*.ko*
1471 %exclude /lib/modules/%{kernel_release}/kernel/drivers/media/video/cx88/cx88-alsa.ko*
1472 %exclude /lib/modules/%{kernel_release}/kernel/drivers/media/video/em28xx/em28xx-alsa.ko*
1473 %exclude /lib/modules/%{kernel_release}/kernel/drivers/media/video/saa7134/saa7134-alsa.ko*
1476 %dir /lib/modules/%{kernel_release}/misc
1477 %if %{with pcmcia} && %{without myown}
1478 %exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/[!p]*
1479 %exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/pd6729.ko*
1480 %exclude /lib/modules/%{kernel_release}/kernel/drivers/*/pcmcia
1481 %if %{without rescuecd}
1482 %exclude /lib/modules/%{kernel_release}/kernel/drivers/ata/pata_pcmcia.ko*
1483 %exclude /lib/modules/%{kernel_release}/kernel/drivers/bluetooth/*_cs.ko*
1484 %exclude /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/avm_cs.ko*
1485 %exclude /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/b1pcmcia.ko*
1486 %exclude /lib/modules/%{kernel_release}/kernel/drivers/telephony/ixj_pcmcia.ko*
1487 %exclude /lib/modules/%{kernel_release}/kernel/drivers/usb/gadget/g_midi.ko*
1489 %exclude /lib/modules/%{kernel_release}/kernel/drivers/ide/legacy/ide-cs.ko*
1490 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/*_cs.ko*
1491 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/b43
1492 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/hostap/hostap_cs.ko*
1493 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/libertas/*_cs.ko*
1494 %exclude /lib/modules/%{kernel_release}/kernel/drivers/parport/parport_cs.ko*
1495 %exclude /lib/modules/%{kernel_release}/kernel/drivers/serial/serial_cs.ko*
1496 %exclude /lib/modules/%{kernel_release}/kernel/drivers/usb/host/sl811_cs.ko*
1498 %ghost /lib/modules/%{kernel_release}/modules.*
1499 # symlinks pointing to kernelsrcdir
1500 %ghost /lib/modules/%{kernel_release}/build
1501 %ghost /lib/modules/%{kernel_release}/source
1502 %dir %{_sysconfdir}/modprobe.d/%{kernel_release}
1504 %ifarch alpha %{ix86} %{x8664} ppc ppc64 sparc sparc64
1506 %defattr(644,root,root,755)
1507 /boot/vmlinux-%{kernel_release}
1510 %if %{have_drm} && %{without myown}
1512 %defattr(644,root,root,755)
1513 /lib/modules/%{kernel_release}/kernel/drivers/gpu
1516 %if %{with pcmcia} && %{without myown}
1518 %defattr(644,root,root,755)
1519 /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/*ko*
1520 /lib/modules/%{kernel_release}/kernel/drivers/*/pcmcia
1521 %exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/pcmcia*ko*
1522 %if %{without rescuecd}
1523 /lib/modules/%{kernel_release}/kernel/drivers/bluetooth/*_cs.ko*
1524 /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/avm_cs.ko*
1525 /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/b1pcmcia.ko*
1526 /lib/modules/%{kernel_release}/kernel/drivers/telephony/ixj_pcmcia.ko*
1528 /lib/modules/%{kernel_release}/kernel/drivers/ata/pata_pcmcia.ko*
1529 /lib/modules/%{kernel_release}/kernel/drivers/ide/legacy/ide-cs.ko*
1530 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/*_cs.ko*
1531 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/b43
1532 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/hostap/hostap_cs.ko*
1533 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/libertas/*_cs.ko*
1534 /lib/modules/%{kernel_release}/kernel/drivers/parport/parport_cs.ko*
1535 /lib/modules/%{kernel_release}/kernel/drivers/serial/serial_cs.ko*
1536 /lib/modules/%{kernel_release}/kernel/drivers/usb/host/sl811_cs.ko*
1540 %if "%{_arch}" == "ppc"
1542 %defattr(644,root,root,755)
1543 %dir /boot/libs-%{kernel_release}
1544 /boot/libs-%{kernel_release}/common
1545 /boot/libs-%{kernel_release}/kernel
1546 /boot/libs-%{kernel_release}/lib
1547 /boot/libs-%{kernel_release}/of1275
1548 /boot/libs-%{kernel_release}/openfirmware
1549 /boot/libs-%{kernel_release}/simple
1550 %dir /boot/libs-%{kernel_release}/utils
1551 %attr(755,root,root) /boot/libs-%{kernel_release}/utils/*
1552 /boot/libs-%{kernel_release}/ld.script
1556 %if %{have_sound} && %{without myown}
1558 %defattr(644,root,root,755)
1559 /lib/modules/%{kernel_release}/kernel/sound
1560 %exclude %dir /lib/modules/%{kernel_release}/kernel/sound
1561 %exclude /lib/modules/%{kernel_release}/kernel/sound/ac97_bus.ko*
1562 %exclude /lib/modules/%{kernel_release}/kernel/sound/sound*.ko*
1564 %exclude /lib/modules/%{kernel_release}/kernel/sound/oss
1567 /lib/modules/%{kernel_release}/kernel/drivers/usb/gadget/g_midi.ko*
1568 /lib/modules/%{kernel_release}/kernel/drivers/media/video/cx88/cx88-alsa.ko*
1569 /lib/modules/%{kernel_release}/kernel/drivers/media/video/em28xx/em28xx-alsa.ko*
1570 /lib/modules/%{kernel_release}/kernel/drivers/media/video/saa7134/saa7134-alsa.ko*
1573 %if %{have_oss} && %{without myown}
1575 %defattr(644,root,root,755)
1576 /lib/modules/%{kernel_release}/kernel/sound/oss
1581 %defattr(644,root,root,755)
1582 %dir %{_kernelsrcdir}
1583 %{_kernelsrcdir}/include
1584 %{_kernelsrcdir}/config-dist
1585 %{_kernelsrcdir}/Module.symvers-dist
1587 %files module-build -f aux_files
1588 %defattr(644,root,root,755)
1589 # symlinks pointint to kernelsrcdir
1590 %dir /lib/modules/%{kernel_release}
1591 /lib/modules/%{kernel_release}/build
1592 %{_kernelsrcdir}/localversion
1594 %{_kernelsrcdir}/arch/powerpc/lib/crtsavres.*
1596 %{_kernelsrcdir}/arch/*/kernel/asm-offsets*
1597 %{_kernelsrcdir}/arch/*/kernel/sigframe*.h
1598 %{_kernelsrcdir}/drivers/lguest/lg.h
1599 %{_kernelsrcdir}/kernel/bounds.c
1600 %dir %{_kernelsrcdir}/scripts
1601 %dir %{_kernelsrcdir}/scripts/kconfig
1602 %{_kernelsrcdir}/scripts/Kbuild.include
1603 %{_kernelsrcdir}/scripts/Makefile*
1604 %{_kernelsrcdir}/scripts/basic
1605 %{_kernelsrcdir}/scripts/mkmakefile
1606 %{_kernelsrcdir}/scripts/mod
1607 %{_kernelsrcdir}/scripts/setlocalversion
1608 %{_kernelsrcdir}/scripts/*.c
1609 %{_kernelsrcdir}/scripts/*.sh
1610 %{_kernelsrcdir}/scripts/kconfig/*
1611 %{_kernelsrcdir}/scripts/mkcompile_h
1614 %defattr(644,root,root,755)
1615 %dir %{_kernelsrcdir}
1616 %{_kernelsrcdir}/Documentation
1619 %files source -f aux_files_exc
1620 %defattr(644,root,root,755)
1621 %{_kernelsrcdir}/arch/*/[!Mk]*
1622 %{_kernelsrcdir}/arch/*/kernel/[!M]*
1623 %{_kernelsrcdir}/arch/ia64/kvm
1624 %{_kernelsrcdir}/arch/powerpc/kvm
1626 %exclude %{_kernelsrcdir}/arch/powerpc/lib/crtsavres.*
1628 %{_kernelsrcdir}/arch/s390/kvm
1629 %{_kernelsrcdir}/arch/x86/kvm
1630 %exclude %{_kernelsrcdir}/arch/*/kernel/asm-offsets*
1631 %exclude %{_kernelsrcdir}/arch/*/kernel/sigframe*.h
1632 %exclude %{_kernelsrcdir}/drivers/lguest/lg.h
1633 %{_kernelsrcdir}/block
1634 %{_kernelsrcdir}/crypto
1635 %{_kernelsrcdir}/drivers
1637 %if %{with grsecurity} && %{without rescuecd}
1638 %{_kernelsrcdir}/grsecurity
1640 %{_kernelsrcdir}/init
1641 %{_kernelsrcdir}/ipc
1642 %{_kernelsrcdir}/kernel
1643 %exclude %{_kernelsrcdir}/kernel/bounds.c
1644 %{_kernelsrcdir}/lib
1646 %{_kernelsrcdir}/net
1647 %{_kernelsrcdir}/virt
1648 %{_kernelsrcdir}/scripts/*
1649 %exclude %{_kernelsrcdir}/scripts/Kbuild.include
1650 %exclude %{_kernelsrcdir}/scripts/Makefile*
1651 %exclude %{_kernelsrcdir}/scripts/basic
1652 %exclude %{_kernelsrcdir}/scripts/kconfig
1653 %exclude %{_kernelsrcdir}/scripts/mkmakefile
1654 %exclude %{_kernelsrcdir}/scripts/mod
1655 %exclude %{_kernelsrcdir}/scripts/setlocalversion
1656 %exclude %{_kernelsrcdir}/scripts/*.c
1657 %exclude %{_kernelsrcdir}/scripts/*.sh
1658 %{_kernelsrcdir}/sound
1659 %{_kernelsrcdir}/security
1660 %{_kernelsrcdir}/usr
1661 %{_kernelsrcdir}/COPYING
1662 %{_kernelsrcdir}/CREDITS
1663 %{_kernelsrcdir}/MAINTAINERS
1664 %{_kernelsrcdir}/README
1665 %{_kernelsrcdir}/REPORTING-BUGS
1666 %{_kernelsrcdir}/.mailmap