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_with 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-rc8
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: ebdefe1196bfc9bc1eecc92da62445ea
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-rc8-for-2.6.27.patch.bz2
271 Patch69: linux-2.6-suspend2.patch
272 Patch70: kernel-suspend2-headers.patch
274 # adds some ids for hostap suported cards and monitor_enable from/for aircrack-ng
275 # http://patches.aircrack-ng.org/hostap-kernel-2.6.18.patch
276 Patch85: hostap-kernel-2.6.18.patch
278 # Taken from http://download.opensuse.org/factory/repo/src-oss/suse/src/kernel-source-2.6.27.7-3.1.src.rpm
279 Patch90: kernel-mpt-fusion.patch
281 Patch95: kernel-touchpad.patch
283 # http://vserver.13thfloor.at/Experimental/patch-2.6.27.14-vs2.3.0.36.4.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
744 %if %{with fbcondecor}
757 # kernel-pom-ng-IPV4OPTSSTRIP.patch
760 # kernel-pom-ng-ipv4options.patch
763 # kernel-pom-ng-ROUTE.patch
766 # kernel-pom-ng-mms-conntrack-nat.patch
769 # kernel-pom-ng-rsh.patch
772 # kernel-pom-ng-rpc.patch
775 # kernel-nf_rtsp.patch
778 # kernel-owner-xid.patch
783 # kernel-ipt_account.patch
786 # kernel-ipt_ACCOUNT.patch
789 # kernel-layer7.patch
825 # kernel-rndis_host-wm5.patch
830 # hostap enhancements from/for aircrack-ng
833 # LSI MPT Fusion driver update
844 #%if %{with xen0} || %{with xenU}
845 #%ifarch %{ix86} %{x8664} ia64
851 %if %{without rescuecd} && %{with vserver}
860 %{?with_apparmor:%patch141 -p1}
872 # grsecurity & pax stuff
876 %{?with_vserver:%patch10000 -p1}
877 %{?with_vserver:%patch10001 -p1}
878 %{?with_vserver:%patch10002 -p1}
879 %{?with_vserver:%patch10003 -p1}
882 %if %{with grsec_full}
884 %{?with_vserver:%patch10000 -p1}
885 %{?with_vserver:%patch10001 -p1}
886 %{?with_vserver:%patch10002 -p1}
887 %{?with_vserver:%patch10003 -p1}
889 %if %{with grsec_minimal}
891 # remember that we have the same config file for grsec_minimal and
892 # grsec_full, but the patches are different.
897 # now we have an separate testing pax-only patch - in the future we
898 # could have single grsecurity patch and will have to prepare separate
899 # configs for grsec_minimal, grsec_full and pax to support such
900 # configurations like pax & grsec_minimal.
901 # So, in a future there could be no patch9998, but only config
902 # would tell which options should be enabled.
903 # The second option is to maintain separate pax-only patch.
905 #patch9997 -p1 - needs update
911 # end of grsecurity & pax stuff
915 %if %{with grsec_full} || %{with pax_full}
939 # Fix EXTRAVERSION in main Makefile
940 sed -i 's#EXTRAVERSION =.*#EXTRAVERSION = %{postver}%{?alt_kernel:_%{alt_kernel}}#g' Makefile
942 # on sparc this line causes CONFIG_INPUT=m (instead of =y), thus breaking build
943 sed -i -e '/select INPUT/d' net/bluetooth/hidp/Kconfig
945 # on sparc64 avoid building break due to NULL pointer type warrning
946 sed -i -e 's/^EXTRA_CFLAGS := -Werror/EXTRA_CFLAGS := /' arch/sparc64/kernel/Makefile
948 # cleanup backups after patching
949 find '(' -name '*~' -o -name '*.orig' -o -name '.gitignore' ')' -print0 | xargs -0 -r -l512 rm -f
957 CONFIG_PAX_SEGMEXEC=y
958 # performance impact on CPUs without NX bit
959 CONFIG_PAX_PAGEEXEC=n
962 CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM=n
968 CONFIG_PAX_NOELFRELOCS=n
971 CONFIG_PAX_EMUTRAMP=y
972 CONFIG_PAX_EMUSIGRT=y
976 %ifarch sparc sparc64 alpha
980 # Now we have to check MAC system integration. Grsecurity (full) uses PAX_HAVE_ACL_FLAGS
981 # setting (direct acces). grsec_minimal probably have no idea about PaX so we probably
982 # could use PAX_NO_ACL_FLAGS, but for testing the hooks setting will be used
983 # PAX_HOOK_ACL_FLAGS. SELinux should also be able to make PaX settings via hooks
985 %if %{with grsec_full}
986 # Hardening grsec options if with pax
987 CONFIG_GRKERNSEC_PROC_MEMMAP=y
988 # almost rational (see HIDESYM help)
989 CONFIG_GRKERNSEC_HIDESYM=y
991 # no change needed CONFIG=PAX_HAVE_ACL_FLAGS=y is taken from the kernel-pax.config
993 # selinux or other hooks?
994 CONFIG_PAX_HAVE_ACL_FLAGS=n
995 CONFIG_PAX_HOOK_ACL_FLAGS=y
1004 cat <<-EOCONFIG > $1
1005 # CONFIG_SOUND is not set
1006 # CONFIG_AUDIT is not set
1007 # CONFIG_TR is not set
1008 # CONFIG_BT is not set
1009 # CONFIG_VIDEO_DEV is not set
1010 # CONFIG_DVB_CORE is not set
1011 # CONFIG_HAMRADIO is not set
1012 # CONFIG_ARCNET is not set
1013 # CONFIG_FB is not set
1014 # CONFIG_DRM is not set
1015 # CONFIG_WATCHDOG is not set
1016 # CONFIG_INPUT_JOYSTICK is not set
1017 # CONFIG_DEBUG_KERNEL is not set
1018 # CONFIG_ISDN is not set
1019 # CONFIG_AGP is not set
1020 # CONFIG_SECURITY is not set
1021 # CONFIG_PARIDE is not set
1022 # CONFIG_CPU_FREQ is not set
1023 # CONFIG_GAMEPORT is not set
1024 # CONFIG_KVM is not set
1025 # CONFIG_PHONE is not set
1026 CONFIG_BLK_DEV_LOOP=y
1038 Config="kernel-%{target_arch_dir}.config"
1039 echo "Building config file for %{_target_cpu} using $Config et al."
1041 # prepare local and important options
1042 cat <<-EOCONFIG > important.config
1045 CONFIG_DEBUG_SLAB_LEAK=y
1046 CONFIG_DEBUG_PREEMPT=y
1047 CONFIG_RT_DEADLOCK_DETECT=y
1054 # apparmor, will be moved to external file if works
1055 %if %{with apparmor}
1056 CONFIG_SECURITY_APPARMOR=y
1057 CONFIG_SECURITY_APPARMOR_BOOTPARAM_VALUE=1
1058 CONFIG_SECURITY_APPARMOR_DISABLE=n
1065 %ifarch i686 athlon pentium3 pentium4
1073 %if %{without pcmcia}
1077 %if %{with fbcondecor}
1081 CONFIG_FB_TILEBLITTING=n
1082 CONFIG_FB_CON_DECOR=y
1090 # Temporary disabled RELOCATABLE. Needed only on x86??
1091 %if %{with pax} || %{with grsec_full}
1092 CONFIG_RELOCATABLE=n
1096 RescueConfig rescue.config
1097 PaXconfig pax.config
1099 # prepare kernel-style config file from multiple config files
1100 %{__awk} -v arch="all %{target_arch_dir} %{_target_base_arch} %{_target_cpu}" -f %{SOURCE6} \
1102 %if %{with rescuecd}
1114 %if %{with pax_full}
1119 %if %{with grsec_full}
1123 %if %{with grsec_minimal}
1145 %if %{with tuxonice}
1146 %ifarch %{ix86} %{x8664} ia64 ppc ppc64
1150 %{SOURCE40} %{?0:netfilter} \
1151 %{SOURCE41} %{?0:patches} \
1153 $RPM_SOURCE_DIR/$Config \
1159 echo "Building kernel $1 ..."
1160 install .config %{defconfig}
1161 %{__make} %{MakeOpts} mrproper \
1162 RCS_FIND_IGNORE='-name build-done -prune -o'
1163 ln -sf %{defconfig} .config
1165 %{__make} %{MakeOpts} clean \
1166 RCS_FIND_IGNORE='-name build-done -prune -o'
1167 %{__make} %{MakeOpts} include/linux/version.h \
1168 %{?with_verbose:V=1}
1170 %{__make} %{MakeOpts} scripts/mkcompile_h \
1171 %{?with_verbose:V=1}
1173 # make does vmlinux, modules and bzImage at once
1175 %{__make} %{MakeOpts} image \
1176 %{?with_verbose:V=1}
1178 %{__make} %{MakeOpts} modules \
1179 %{?with_verbose:V=1}
1181 %{__make} %{MakeOpts} \
1182 %{?with_verbose:V=1}
1186 PreInstallKernel() {
1187 Config="%{_target_base_arch}"
1188 KernelVer=%{kernel_release}
1190 mkdir -p $KERNEL_INSTALL_DIR/boot
1191 install System.map $KERNEL_INSTALL_DIR/boot/System.map-$KernelVer
1192 %ifarch %{ix86} %{x8664}
1193 install arch/x86/boot/bzImage $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
1194 install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinux-$KernelVer
1196 %ifarch alpha sparc sparc64
1197 gzip -cfv vmlinux > vmlinuz
1198 install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinux-$KernelVer
1199 install vmlinuz $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
1201 elftoaout arch/sparc/boot/image -o vmlinux.aout
1202 install vmlinux.aout $KERNEL_INSTALL_DIR/boot/vmlinux.aout-$KernelVer
1205 elftoaout arch/sparc64/boot/image -o vmlinux.aout
1206 install vmlinux.aout $KERNEL_INSTALL_DIR/boot/vmlinux.aout-$KernelVer
1210 install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinux-$KernelVer
1211 install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
1214 %{__make} -f Makefile.ppclibs install \
1215 DESTDIR=$KERNEL_INSTALL_DIR/boot/libs-$KernelVer
1218 gzip -cfv vmlinux > vmlinuz
1219 install -d $KERNEL_INSTALL_DIR/boot/efi
1220 install vmlinuz $KERNEL_INSTALL_DIR/boot/efi/vmlinuz-$KernelVer
1221 ln -sf efi/vmlinuz-$KernelVer $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
1224 install arch/arm/boot/zImage $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
1227 %{__make} %{MakeOpts} modules_install firmware_install \
1228 %{?with_verbose:V=1} \
1230 INSTALL_MOD_PATH=$KERNEL_INSTALL_DIR \
1231 INSTALL_FW_PATH=$KERNEL_INSTALL_DIR/lib/firmware/$KernelVer \
1232 KERNELRELEASE=$KernelVer
1234 # You'd probabelly want to make it somewhat different
1235 install -d $KERNEL_INSTALL_DIR%{_kernelsrcdir}
1236 install Module.symvers $KERNEL_INSTALL_DIR%{_kernelsrcdir}/Module.symvers-dist
1238 echo "CHECKING DEPENDENCIES FOR KERNEL MODULES"
1239 if [ %DepMod = /sbin/depmod ]; then
1240 /sbin/depmod --basedir $KERNEL_INSTALL_DIR -ae -F $KERNEL_INSTALL_DIR/boot/System.map-$KernelVer -r $KernelVer || :
1242 touch $KERNEL_INSTALL_DIR/lib/modules/$KernelVer/modules.dep
1243 # binary cache produced by depmod at runtime
1244 touch $KERNEL_INSTALL_DIR/lib/modules/$KernelVer/modules.{alias,dep,symbols}.bin
1245 echo "KERNEL RELEASE $KernelVer DONE"
1248 KERNEL_BUILD_DIR=`pwd`
1249 echo "-%{localversion}" > localversion
1251 KERNEL_INSTALL_DIR="$KERNEL_BUILD_DIR/build-done/kernel"
1252 rm -rf $KERNEL_INSTALL_DIR
1253 %if %{without myown}
1256 cat $RPM_SOURCE_DIR/kernel-myown.config > %{defconfig}
1258 ln -sf %{defconfig} .config
1259 install -d $KERNEL_INSTALL_DIR%{_kernelsrcdir}/include/linux
1260 rm -f include/linux/autoconf.h
1261 %{__make} %{MakeOpts} include/linux/autoconf.h
1262 install include/linux/autoconf.h \
1263 $KERNEL_INSTALL_DIR%{_kernelsrcdir}/include/linux/autoconf-dist.h
1265 $KERNEL_INSTALL_DIR%{_kernelsrcdir}/config-dist
1267 %{__awk} %{?debug:-v dieOnError=1} -v infile=%{defconfig} -f %{SOURCE8} .config
1272 %{__make} %{MakeOpts} include/linux/utsrelease.h
1273 cp include/linux/utsrelease.h{,.save}
1274 cp include/linux/version.h{,.save}
1275 cp scripts/mkcompile_h{,.save}
1278 rm -rf $RPM_BUILD_ROOT
1282 export DEPMOD=%DepMod
1284 install -d $RPM_BUILD_ROOT%{_kernelsrcdir}
1285 install -d $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/%{kernel_release}
1287 # test if we can hardlink -- %{_builddir} and $RPM_BUILD_ROOT on same partition
1288 if cp -al COPYING $RPM_BUILD_ROOT/COPYING 2>/dev/null; then
1290 rm -f $RPM_BUILD_ROOT/COPYING
1293 KERNEL_BUILD_DIR=`pwd`
1295 cp -a$l $KERNEL_BUILD_DIR/build-done/kernel/* $RPM_BUILD_ROOT
1297 if [ -e $RPM_BUILD_ROOT/lib/modules/%{kernel_release} ] ; then
1298 rm -f $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/build
1299 ln -sf %{_kernelsrcdir} $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/build
1300 install -d $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/{cluster,misc}
1303 find . -maxdepth 1 ! -name "build-done" ! -name "." -exec cp -a$l "{}" "$RPM_BUILD_ROOT%{_kernelsrcdir}/" ";"
1305 cd $RPM_BUILD_ROOT%{_kernelsrcdir}
1307 %{__make} %{MakeOpts} mrproper archclean \
1308 RCS_FIND_IGNORE='-name build-done -prune -o'
1310 if [ -e $KERNEL_BUILD_DIR/build-done/kernel%{_kernelsrcdir}/include/linux/autoconf-dist.h ]; then
1311 install $KERNEL_BUILD_DIR/build-done/kernel%{_kernelsrcdir}/include/linux/autoconf-dist.h \
1312 $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux
1313 install $KERNEL_BUILD_DIR/build-done/kernel%{_kernelsrcdir}/config-dist \
1314 $RPM_BUILD_ROOT%{_kernelsrcdir}
1317 cp -Rdp$l $KERNEL_BUILD_DIR/include/linux/* \
1318 $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux
1320 %{__make} %{MakeOpts} mrproper
1321 mv -f include/linux/utsrelease.h{.save,}
1322 mv -f include/linux/version.h{.save,}
1323 mv -f scripts/mkcompile_h{.save,}
1324 install %{SOURCE3} $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux/autoconf.h
1325 install %{SOURCE4} $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux/config.h
1327 # collect module-build files and directories
1328 perl %{SOURCE7} %{_kernelsrcdir} %{_builddir}/%{name}-%{version}
1331 touch $RPM_BUILD_ROOT%{initrd_dir}/initrd-%{kernel_release}.gz
1333 # rpm obeys filelinkto checks for ghosted symlinks, convert to files
1334 rm -f $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/{build,source}
1335 touch $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/{build,source}
1337 # remove unnecessary dir with dead symlink
1338 rm -rf $RPM_BUILD_ROOT/arch/i386
1341 rm -rf $RPM_BUILD_ROOT
1344 if [ -x /sbin/new-kernel-pkg ]; then
1345 /sbin/new-kernel-pkg --remove %{kernel_release}
1350 mv -f /boot/efi/vmlinuz{,.old} 2> /dev/null
1351 %{?alt_kernel:mv -f /boot/efi/vmlinuz%{_alt_kernel}{,.old} 2> /dev/null}
1352 ln -sf vmlinuz-%{kernel_release} /boot/efi/vmlinuz
1353 %{?alt_kernel:ln -sf vmlinuz-%{kernel_release} /boot/efi/vmlinuz%{_alt_kernel}}
1355 mv -f /boot/vmlinuz{,.old} 2> /dev/null
1356 %{?alt_kernel:mv -f /boot/vmlinuz%{_alt_kernel}{,.old} 2> /dev/null}
1357 mv -f /boot/System.map{,.old} 2> /dev/null
1358 %{?alt_kernel:mv -f /boot/System%{_alt_kernel}.map{,.old} 2> /dev/null}
1359 ln -sf vmlinuz-%{kernel_release} /boot/vmlinuz
1360 %{?alt_kernel:ln -sf vmlinuz-%{kernel_release} /boot/vmlinuz%{_alt_kernel}}
1361 ln -sf System.map-%{kernel_release} /boot/System.map
1362 %{?alt_kernel:ln -sf System.map-%{kernel_release} /boot/System.map%{_alt_kernel}}
1364 %depmod %{kernel_release}
1366 /sbin/geninitrd -f --initrdfs=rom %{initrd_dir}/initrd-%{kernel_release}.gz %{kernel_release}
1367 mv -f %{initrd_dir}/initrd{,.old} 2> /dev/null
1368 %{?alt_kernel:mv -f %{initrd_dir}/initrd%{_alt_kernel}{,.old} 2> /dev/null}
1369 ln -sf initrd-%{kernel_release}.gz %{initrd_dir}/initrd
1370 %{?alt_kernel:ln -sf initrd-%{kernel_release}.gz %{initrd_dir}/initrd%{_alt_kernel}}
1372 if [ -x /sbin/new-kernel-pkg ]; then
1373 title="PLD Linux (%{pld_release})%{?alt_kernel: / %{alt_kernel}}"
1375 /sbin/new-kernel-pkg --initrdfile=%{initrd_dir}/initrd-%{kernel_release}.gz --install %{kernel_release} --banner "$title"
1376 elif [ -x /sbin/rc-boot ]; then
1377 /sbin/rc-boot 1>&2 || :
1381 mv -f /boot/vmlinux{,.old} 2> /dev/null
1382 %{?alt_kernel:mv -f /boot/vmlinux-%{alt_kernel}{,.old} 2> /dev/null}
1383 ln -sf vmlinux-%{kernel_release} /boot/vmlinux
1384 %{?alt_kernel:ln -sf vmlinux-%{kernel_release} /boot/vmlinux-%{alt_kernel}}
1387 %{_sbindir}/mkvmlinuz /boot/zImage-%{kernel_release} %{kernel_release}
1390 %depmod %{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 ln -snf %{basename:%{_kernelsrcdir}} %{_prefix}/src/linux%{_alt_kernel}
1417 if [ "$1" = "0" ]; then
1418 if [ -L %{_prefix}/src/linux%{_alt_kernel} ]; then
1419 if [ "$(readlink %{_prefix}/src/linux%{_alt_kernel})" = "linux%{_alt_kernel}-%{version}" ]; then
1420 rm -f %{_prefix}/src/linux%{_alt_kernel}
1425 %triggerin module-build -- %{name} = %{epoch}:%{version}-%{release}
1426 ln -sfn %{_kernelsrcdir} /lib/modules/%{kernel_release}/build
1427 ln -sfn %{_kernelsrcdir} /lib/modules/%{kernel_release}/source
1429 %triggerun module-build -- %{name} = %{epoch}:%{version}-%{release}
1430 if [ "$1" = 0 ]; then
1431 rm -f /lib/modules/%{kernel_release}/{build,source}
1435 %defattr(644,root,root,755)
1436 %ifarch sparc sparc64
1437 /boot/vmlinux.aout-%{kernel_release}
1440 /boot/efi/vmlinuz-%{kernel_release}
1442 /boot/vmlinuz-%{kernel_release}
1443 /boot/System.map-%{kernel_release}
1444 %ghost %{initrd_dir}/initrd-%{kernel_release}.gz
1445 /lib/firmware/%{kernel_release}
1446 %dir /lib/modules/%{kernel_release}
1447 %dir /lib/modules/%{kernel_release}/kernel
1449 /lib/modules/%{kernel_release}/kernel/arch
1451 /lib/modules/%{kernel_release}/kernel/crypto
1452 /lib/modules/%{kernel_release}/kernel/drivers
1453 %if %{have_drm} && %{without myown}
1454 %exclude /lib/modules/%{kernel_release}/kernel/drivers/gpu
1456 /lib/modules/%{kernel_release}/kernel/fs
1458 # this directory will be removed after disabling rcutorture mod. in 2.6.20.
1459 /lib/modules/%{kernel_release}/kernel/kernel
1461 /lib/modules/%{kernel_release}/kernel/lib
1462 /lib/modules/%{kernel_release}/kernel/net
1463 %if %{have_sound} && %{without myown}
1464 %dir /lib/modules/%{kernel_release}/kernel/sound
1465 /lib/modules/%{kernel_release}/kernel/sound/ac97_bus.ko*
1466 /lib/modules/%{kernel_release}/kernel/sound/sound*.ko*
1468 %exclude /lib/modules/%{kernel_release}/kernel/drivers/media/video/cx88/cx88-alsa.ko*
1469 %exclude /lib/modules/%{kernel_release}/kernel/drivers/media/video/em28xx/em28xx-alsa.ko*
1470 %exclude /lib/modules/%{kernel_release}/kernel/drivers/media/video/saa7134/saa7134-alsa.ko*
1473 %dir /lib/modules/%{kernel_release}/misc
1474 %if %{with pcmcia} && %{without myown}
1475 %exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/[!p]*
1476 %exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/pd6729.ko*
1477 %exclude /lib/modules/%{kernel_release}/kernel/drivers/*/pcmcia
1478 %if %{without rescuecd}
1479 %exclude /lib/modules/%{kernel_release}/kernel/drivers/ata/pata_pcmcia.ko*
1480 %exclude /lib/modules/%{kernel_release}/kernel/drivers/bluetooth/*_cs.ko*
1481 %exclude /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/avm_cs.ko*
1482 %exclude /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/b1pcmcia.ko*
1483 %exclude /lib/modules/%{kernel_release}/kernel/drivers/telephony/ixj_pcmcia.ko*
1484 %exclude /lib/modules/%{kernel_release}/kernel/drivers/usb/gadget/g_midi.ko*
1486 %exclude /lib/modules/%{kernel_release}/kernel/drivers/ide/legacy/ide-cs.ko*
1487 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/*_cs.ko*
1488 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/b43
1489 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/hostap/hostap_cs.ko*
1490 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/libertas/*_cs.ko*
1491 %exclude /lib/modules/%{kernel_release}/kernel/drivers/parport/parport_cs.ko*
1492 %exclude /lib/modules/%{kernel_release}/kernel/drivers/serial/serial_cs.ko*
1493 %exclude /lib/modules/%{kernel_release}/kernel/drivers/usb/host/sl811_cs.ko*
1495 %ghost /lib/modules/%{kernel_release}/modules.*
1496 # symlinks pointing to kernelsrcdir
1497 %ghost /lib/modules/%{kernel_release}/build
1498 %ghost /lib/modules/%{kernel_release}/source
1499 %dir %{_sysconfdir}/modprobe.d/%{kernel_release}
1501 %ifarch alpha %{ix86} %{x8664} ppc ppc64 sparc sparc64
1503 %defattr(644,root,root,755)
1504 /boot/vmlinux-%{kernel_release}
1507 %if %{have_drm} && %{without myown}
1509 %defattr(644,root,root,755)
1510 /lib/modules/%{kernel_release}/kernel/drivers/gpu
1513 %if %{with pcmcia} && %{without myown}
1515 %defattr(644,root,root,755)
1516 /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/*ko*
1517 /lib/modules/%{kernel_release}/kernel/drivers/*/pcmcia
1518 %exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/pcmcia*ko*
1519 %if %{without rescuecd}
1520 /lib/modules/%{kernel_release}/kernel/drivers/bluetooth/*_cs.ko*
1521 /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/avm_cs.ko*
1522 /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/b1pcmcia.ko*
1523 /lib/modules/%{kernel_release}/kernel/drivers/telephony/ixj_pcmcia.ko*
1525 /lib/modules/%{kernel_release}/kernel/drivers/ata/pata_pcmcia.ko*
1526 /lib/modules/%{kernel_release}/kernel/drivers/ide/legacy/ide-cs.ko*
1527 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/*_cs.ko*
1528 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/b43
1529 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/hostap/hostap_cs.ko*
1530 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/libertas/*_cs.ko*
1531 /lib/modules/%{kernel_release}/kernel/drivers/parport/parport_cs.ko*
1532 /lib/modules/%{kernel_release}/kernel/drivers/serial/serial_cs.ko*
1533 /lib/modules/%{kernel_release}/kernel/drivers/usb/host/sl811_cs.ko*
1537 %if "%{_arch}" == "ppc"
1539 %defattr(644,root,root,755)
1540 %dir /boot/libs-%{kernel_release}
1541 /boot/libs-%{kernel_release}/common
1542 /boot/libs-%{kernel_release}/kernel
1543 /boot/libs-%{kernel_release}/lib
1544 /boot/libs-%{kernel_release}/of1275
1545 /boot/libs-%{kernel_release}/openfirmware
1546 /boot/libs-%{kernel_release}/simple
1547 %dir /boot/libs-%{kernel_release}/utils
1548 %attr(755,root,root) /boot/libs-%{kernel_release}/utils/*
1549 /boot/libs-%{kernel_release}/ld.script
1553 %if %{have_sound} && %{without myown}
1555 %defattr(644,root,root,755)
1556 /lib/modules/%{kernel_release}/kernel/sound
1557 %exclude %dir /lib/modules/%{kernel_release}/kernel/sound
1558 %exclude /lib/modules/%{kernel_release}/kernel/sound/ac97_bus.ko*
1559 %exclude /lib/modules/%{kernel_release}/kernel/sound/sound*.ko*
1561 %exclude /lib/modules/%{kernel_release}/kernel/sound/oss
1564 /lib/modules/%{kernel_release}/kernel/drivers/usb/gadget/g_midi.ko*
1565 /lib/modules/%{kernel_release}/kernel/drivers/media/video/cx88/cx88-alsa.ko*
1566 /lib/modules/%{kernel_release}/kernel/drivers/media/video/em28xx/em28xx-alsa.ko*
1567 /lib/modules/%{kernel_release}/kernel/drivers/media/video/saa7134/saa7134-alsa.ko*
1570 %if %{have_oss} && %{without myown}
1572 %defattr(644,root,root,755)
1573 /lib/modules/%{kernel_release}/kernel/sound/oss
1578 %defattr(644,root,root,755)
1579 %dir %{_kernelsrcdir}
1580 %{_kernelsrcdir}/include
1581 %{_kernelsrcdir}/config-dist
1582 %{_kernelsrcdir}/Module.symvers-dist
1584 %files module-build -f aux_files
1585 %defattr(644,root,root,755)
1586 # symlinks pointint to kernelsrcdir
1587 %dir /lib/modules/%{kernel_release}
1588 /lib/modules/%{kernel_release}/build
1589 %{_kernelsrcdir}/localversion
1591 %{_kernelsrcdir}/arch/powerpc/lib/crtsavres.*
1593 %{_kernelsrcdir}/arch/*/kernel/asm-offsets*
1594 %{_kernelsrcdir}/arch/*/kernel/sigframe*.h
1595 %{_kernelsrcdir}/drivers/lguest/lg.h
1596 %{_kernelsrcdir}/kernel/bounds.c
1597 %dir %{_kernelsrcdir}/scripts
1598 %dir %{_kernelsrcdir}/scripts/kconfig
1599 %{_kernelsrcdir}/scripts/Kbuild.include
1600 %{_kernelsrcdir}/scripts/Makefile*
1601 %{_kernelsrcdir}/scripts/basic
1602 %{_kernelsrcdir}/scripts/mkmakefile
1603 %{_kernelsrcdir}/scripts/mod
1604 %{_kernelsrcdir}/scripts/setlocalversion
1605 %{_kernelsrcdir}/scripts/*.c
1606 %{_kernelsrcdir}/scripts/*.sh
1607 %{_kernelsrcdir}/scripts/kconfig/*
1608 %{_kernelsrcdir}/scripts/mkcompile_h
1611 %defattr(644,root,root,755)
1612 %dir %{_kernelsrcdir}
1613 %{_kernelsrcdir}/Documentation
1616 %files source -f aux_files_exc
1617 %defattr(644,root,root,755)
1618 %{_kernelsrcdir}/arch/*/[!Mk]*
1619 %{_kernelsrcdir}/arch/*/kernel/[!M]*
1620 %{_kernelsrcdir}/arch/ia64/kvm
1621 %{_kernelsrcdir}/arch/powerpc/kvm
1623 %exclude %{_kernelsrcdir}/arch/powerpc/lib/crtsavres.*
1625 %{_kernelsrcdir}/arch/s390/kvm
1626 %{_kernelsrcdir}/arch/x86/kvm
1627 %exclude %{_kernelsrcdir}/arch/*/kernel/asm-offsets*
1628 %exclude %{_kernelsrcdir}/arch/*/kernel/sigframe*.h
1629 %exclude %{_kernelsrcdir}/drivers/lguest/lg.h
1630 %{_kernelsrcdir}/block
1631 %{_kernelsrcdir}/crypto
1632 %{_kernelsrcdir}/drivers
1634 %if %{with grsecurity} && %{without rescuecd}
1635 %{_kernelsrcdir}/grsecurity
1637 %{_kernelsrcdir}/init
1638 %{_kernelsrcdir}/ipc
1639 %{_kernelsrcdir}/kernel
1640 %exclude %{_kernelsrcdir}/kernel/bounds.c
1641 %{_kernelsrcdir}/lib
1643 %{_kernelsrcdir}/net
1644 %{_kernelsrcdir}/virt
1645 %{_kernelsrcdir}/scripts/*
1646 %exclude %{_kernelsrcdir}/scripts/Kbuild.include
1647 %exclude %{_kernelsrcdir}/scripts/Makefile*
1648 %exclude %{_kernelsrcdir}/scripts/basic
1649 %exclude %{_kernelsrcdir}/scripts/kconfig
1650 %exclude %{_kernelsrcdir}/scripts/mkmakefile
1651 %exclude %{_kernelsrcdir}/scripts/mod
1652 %exclude %{_kernelsrcdir}/scripts/setlocalversion
1653 %exclude %{_kernelsrcdir}/scripts/*.c
1654 %exclude %{_kernelsrcdir}/scripts/*.sh
1655 %{_kernelsrcdir}/sound
1656 %{_kernelsrcdir}/security
1657 %{_kernelsrcdir}/usr
1658 %{_kernelsrcdir}/COPYING
1659 %{_kernelsrcdir}/CREDITS
1660 %{_kernelsrcdir}/MAINTAINERS
1661 %{_kernelsrcdir}/README
1662 %{_kernelsrcdir}/REPORTING-BUGS
1663 %{_kernelsrcdir}/.mailmap