3 # the following bcond combos will not work
4 # - without_vserver and any of the following
11 # - benchmark NO_HZ & HZ=1000 vs HZ=300 on i686
12 # - add a subpackage (kernel-firmware?) for ~35 firmware files
15 # - pom-ng quake3-conntrack-nat -> nf_conntrack ?
16 # - pom-ng talk-conntrack-nat -> nf_conntrack ?
18 # - pax hooks for selinux (experimental)
21 # - update main config: ./kernel-config-sort.pl ./BUILD/kernel-*/linux-2.6.29 kernel-multiarch.config
24 %bcond_without source # don't build kernel-source package
25 %bcond_without pcmcia # don't build pcmcia
27 %bcond_with verbose # verbose build (V=1)
28 %bcond_without reiser4 # support for reiser4 fs (experimental)
30 %bcond_without grsecurity # don't build grsecurity nor pax at all
31 %bcond_without grsec_minimal # build only minimal subset (proc,link,fifo,shm)
32 %bcond_without grsec_full # build full grsecurity
33 %bcond_with pax_full # build pax and full grsecurity (ie. grsec_full && pax)
34 %bcond_with pax # build pax support
36 %bcond_with fbcondecor # build fbcondecor (disable FB_TILEBLITTING and affected fb modules)
37 %bcond_with pae # build PAE (HIGHMEM64G) support on uniprocessor
38 %bcond_with nfsroot # build with root on NFS support
40 %bcond_with imq # imq support
41 %bcond_without wrr # wrr support
42 %bcond_without esfq # esfq support
43 %bcond_without ipv6 # ipv6 support
45 %bcond_without vserver # support for VServer (enabled by default)
46 %bcond_without tuxonice # support for tuxonice (ex-suspend2) (enabled by default)
47 %bcond_without apparmor # build kernel with apparmor (exerimental mix)
48 %bcond_with tomoyo # build kernel with tomoyo support [ disables apparmor ]
50 %bcond_with rescuecd # build kernel for our rescue
52 %bcond_with myown # build with your own config (kernel-myown.config)
54 %{?debug:%define with_verbose 1}
56 %if %{without grsecurity}
57 %undefine with_grsec_full
58 %undefine with_grsec_minimal
60 %undefine with_pax_full
64 %undefine with_grsec_minimal
65 %define with_grsec_full 1
66 %define with_grsecurity 1
70 %if %{with grsec_full}
71 %undefine with_grsec_minimal
72 %define with_grsecurity 1
74 %define with_pax_full 1
78 %if %{with grsec_minimal}
79 %undefine with_grsec_full
80 %undefine with_pax_full
81 %define with_grsecurity 1
90 %undefine with_apparmor
91 %undefine with_tuxonice
92 %undefine with_grsec_full
93 %undefine with_grsec_minimal
95 %undefine with_pax_full
96 %undefine with_vserver
105 %define have_pcmcia 0
108 %ifarch sparc sparc64
109 %undefine with_pcmcia
114 %if %{without pcmcia}
115 %define have_pcmcia 0
118 %define basever 2.6.30
122 %define _enable_debug_packages 0
124 %define squashfs_version 3.4
125 %define tuxonice_version 3.0.1
126 %define netfilter_snap 20070806
129 %if "%{_alt_kernel}" == ""
130 %define alt_kernel myown
133 %if %{without rescuecd}
134 %define __alt_kernel %{?with_pax:pax}%{!?with_grsec_full:nogrsecurity}%{!?with_apparmor:noaa}%{?with_pae:pae}
135 %if "%{__alt_kernel}" != ""
136 %define alt_kernel %{__alt_kernel}
139 %define alt_kernel rescuecd
143 # kernel release (used in filesystem and eventually in uname -r)
144 # modules will be looked from /lib/modules/%{kernel_release}
145 # localversion is just that without version for "> localversion"
146 %define localversion %{rel}
147 %define kernel_release %{version}%{?alt_kernel:_%{alt_kernel}}-%{localversion}
149 Summary: The Linux kernel (the core of the Linux operating system)
150 Summary(de.UTF-8): Der Linux-Kernel (Kern des Linux-Betriebssystems)
151 Summary(et.UTF-8): Linuxi kernel (ehk operatsioonisüsteemi tuum)
152 Summary(fr.UTF-8): Le Kernel-Linux (La partie centrale du systeme)
153 Summary(pl.UTF-8): JÄ…dro Linuksa
154 Name: kernel%{_alt_kernel}
155 Version: %{basever}%{postver}
160 Source0: http://www.kernel.org/pub/linux/kernel/v2.6/linux-%{basever}.tar.bz2
161 # Source0-md5: 7a80058a6382e5108cdb5554d1609615
162 %if "%{postver}" != "%{nil}"
163 Source1: http://www.kernel.org/pub/linux/kernel/v2.6/patch-%{version}.bz2
164 # Source1-md5: 3b566e7d970941846bcbe35cecf04e21
167 Source3: kernel-autoconf.h
168 Source4: kernel-config.h
169 Source5: kernel-ppclibs.Makefile
170 Source6: kernel-config.awk
171 Source7: kernel-module-build.pl
172 Source8: kernel-track-config-change.awk
173 # not used by kernel.spec, but it's good to have it in SOURCES
174 Source9: kernel-config-sort.pl
175 Source10: kernel.make
177 Source20: kernel-multiarch.config
178 Source21: kernel-x86.config
179 Source22: kernel-sparc.config
180 Source23: kernel-alpha.config
181 Source24: kernel-powerpc.config
182 Source25: kernel-ia64.config
184 Source40: kernel-netfilter.config
185 Source41: kernel-patches.config
186 Source42: kernel-tuxonice.config
187 Source43: kernel-vserver.config
188 Source45: kernel-grsec.config
190 Source49: kernel-pax.config
191 Source50: kernel-no-pax.config
192 Source51: kernel-grsec_minimal.config
193 Source55: kernel-imq.config
194 Source56: kernel-reiser4.config
195 Source57: kernel-wrr.config
197 Source58: kernel-inittmpfs.config
198 Source59: kernel-bzip2-lzma.config
200 Source6000: http://globalbase.dl.sourceforge.jp/tomoyo/30297/ccs-patch-1.6.6-20090202.tar.gz
201 # Source6000-md5: cceb1731d3720030eac34ed128848b32
203 # tahoe9xx http://www.tahoe.pl/drivers/tahoe9xx-2.6.24.patch
204 Patch2: kernel-tahoe9xx.patch
206 # http://dev.gentoo.org/~spock/projects/fbcondecor/archive/fbcondecor-0.9.4-2.6.25-rc6.patch
207 Patch3: kernel-fbcondecor.patch
208 Patch4: kernel-fbcon-margins.patch
210 # netfilter related stuff mostly based on patch-o-matic-ng
211 # snapshot 20061213 with some fixes related to changes in
212 # netfilter api in 2.6.19 up to 2.6.22. Some modules
213 # were ported to nf_conntrack. Some of these are unique.
215 Patch10: kernel-pom-ng-IPV4OPTSSTRIP.patch
216 Patch11: kernel-pom-ng-ipv4options.patch
218 Patch14: kernel-pom-ng-ROUTE.patch
219 Patch16: kernel-pom-ng-mms-conntrack-nat.patch
220 Patch22: kernel-pom-ng-rsh.patch
221 Patch23: kernel-pom-ng-rpc.patch
223 # based on http://mike.it-loops.com/rtsp/rtsp-2.6.26.patch
224 Patch36: kernel-nf_rtsp.patch
226 # http://ftp.linux-vserver.org/pub/people/dhozac/p/k/delta-owner-xid-feat02.diff
227 Patch37: kernel-owner-xid.patch
229 # based on http://www.svn.barbara.eu.org/ipt_account/attachment/wiki/Software/ipt_account-0.1.21-20070804164729.tar.gz?format=raw
230 Patch38: kernel-ipt_account.patch
232 # based on http://www.intra2net.com/de/produkte/opensource/ipt_account/pom-ng-ipt_ACCOUNT-1.12.tgz
233 Patch39: kernel-ipt_ACCOUNT.patch
235 # based on kernel-2.6.25-layer7-2.20.patch from
236 # http://switch.dl.sourceforge.net/sourceforge/l7-filter/netfilter-layer7-v2.20.tar.gz
237 Patch40: kernel-layer7.patch
239 # http://www.ssi.bg/~ja/nfct/ipvs-nfct-2.6.28-1.diff
240 Patch41: kernel-ipvs-nfct.patch
244 # http://zph.bratcheda.org/linux-2.6.26.3-zph.patch
245 Patch49: kernel-zph.patch
247 # based on http://www.linuximq.net/patchs/linux-2.6.24-imq.diff
248 # some people report problems when using imq with wrr.
249 # try unoficial version: http://kapturkiewicz.name/linux-2.6.25-imq1.diff
250 Patch50: kernel-imq.patch
252 # http://www.kernel.org/pub/linux/kernel/people/edward/reiser4/reiser4-for-2.6/reiser4-for-2.6.28.patch.bz2
253 Patch51: kernel-reiser4.patch
255 # http://www.zz9.dk/patches/wrr-linux-071203-2.6.25.patch.gz
256 Patch52: kernel-wrr.patch
258 # http://fatooh.org/esfq-2.6/sfq-2.6.24.1.tar.bz2
259 Patch53: kernel-esfq.patch
261 # http://memebeam.org/free-software/toshiba_acpi/toshiba_acpi-dev_toshiba_test5-linux_2.6.26.patch
262 Patch54: kernel-toshiba_acpi.patch
264 # by Baggins request:
265 # derived from ftp://ftp.cmf.nrl.navy.mil/pub/chas/linux-atm/vbr/vbr-kernel-diffs
266 Patch55: kernel-atm-vbr.patch
267 Patch56: kernel-atmdd.patch
269 # http://www.ntop.org/PF_RING.html 20070610
270 Patch58: kernel-PF_RING.patch
272 # http://synce.svn.sourceforge.net/svnroot/synce/trunk/patches/linux-2.6.22-rndis_host-wm5.patch
273 Patch59: kernel-rndis_host-wm5.patch
275 # Project suspend2 renamed to tuxonice
276 # http://www.tuxonice.net/downloads/all/current-tuxonice-for-2.6.30.patch-20090620-v1.bz2
277 Patch69: kernel-tuxonice.patch
278 Patch70: kernel-tuxonice-headers.patch
280 # adds some ids for hostap suported cards and monitor_enable from/for aircrack-ng
281 # http://patches.aircrack-ng.org/hostap-kernel-2.6.18.patch
282 Patch85: kernel-hostap.patch
284 # Taken from http://download.opensuse.org/factory/repo/src-oss/suse/src/kernel-source-2.6.30-10.3.src.rpm
285 Patch90: kernel-mpt-fusion.patch
287 # based on http://vserver.13thfloor.at/Experimental/patch-2.6.30.1-vs2.3.0.36.14-pre4.diff
288 Patch100: kernel-vserver-2.3.patch
289 Patch101: kernel-vserver-fixes.patch
291 # Wake-On-Lan fix for nForce drivers; using http://atlas.et.tudelft.nl/verwei90/nforce2/wol.html
292 # Fix verified for that kernel version.
293 Patch130: kernel-forcedeth-WON.patch
295 # http://download.filesystems.org/unionfs/unionfs-2.x/unionfs-2.5.1_for_2.6.28.1.diff.gz
296 Patch140: kernel-unionfs.patch
297 Patch141: kernel-unionfs-apparmor.patch
299 # aufs1, http://aufs.sourceforge.net/
300 Patch145: kernel-aufs.patch
301 Patch146: kernel-aufs-support.patch
302 Patch147: kernel-aufs-apparmor.patch
304 Patch148: kernel-aufs2.patch
306 Patch150: kernel-ppc-crtsavres.patch
308 Patch200: kernel-ppc-ICE-hacks.patch
310 # The following patch extend the routing functionality in Linux
311 # to support static routes (defined by user), new way to use the
312 # alternative routes, the reverse path protection (rp_filter),
313 # the NAT processing to use correctly the routing when multiple
315 # http://www.ssi.bg/~ja/routes-2.6.28-16.diff
316 Patch300: kernel-routes.patch
318 Patch1000: kernel-grsec-minimal.patch
320 Patch2000: kernel-small_fixes.patch
321 Patch2001: kernel-pwc-uncompress.patch
322 Patch2003: kernel-regressions.patch
324 # kill some thousands of warnings
325 # (only warnings, so just remove parts of this patch if conflics)
326 Patch2500: kernel-warnings.patch
328 # git://kernel.ubuntu.com/jj/apparmor-karmic-tree.git
329 # git diff 0c9f19b4dd23620fb32116922b0d93e8aca6c911..HEAD
330 Patch5000: kernel-apparmor.patch
331 # with grsec_full version
332 Patch5001: kernel-apparmor-after-grsec_full.patch
334 # tomoyo based on patch from ccs-patch-1.6.6-20090202 tarball
335 Patch6000: kernel-tomoyo-with-apparmor.patch
336 Patch6001: kernel-tomoyo-without-apparmor.patch
339 # based on http://ftp.leg.uct.ac.za/pub/linux/rip/inittmpfs-2.6.14.diff.gz
340 Patch7000: kernel-inittmpfs.patch
343 Patch9997: kernel-pax_selinux_hooks.patch
345 # based on http://www.grsecurity.net/~paxguy1/pax-linux-2.6.24.6-test45.patch
346 Patch9998: kernel-pax.patch
348 # based on http://www.grsecurity.net/~spender/grsecurity-2.1.14-2.6.29-200903281534.patch
349 # NOTE: put raw upstream patches on kernel-grsec_full.patch:GRSECURITY_RAW for reference
350 # (since upstream deletes older patches)
351 Patch9999: kernel-grsec_full.patch
352 Patch10000: kernel-grsec-caps.patch
353 Patch10001: kernel-grsec-common.patch
354 Patch10002: kernel-grsec_fixes.patch
355 Patch10003: kernel-grsec-no-stupid-SbO.patch
357 URL: http://www.kernel.org/
358 BuildRequires: binutils >= 3:2.18
359 %ifarch sparc sparc64
360 BuildRequires: elftoaout
363 BuildRequires: uboot-mkimage
366 BuildRequires: /sbin/depmod
367 BuildRequires: gcc >= 5:3.2
368 BuildRequires: xz >= 1:4.999.7
369 # for hostname command
370 BuildRequires: net-tools
371 BuildRequires: perl-base
372 BuildRequires: rpm-build >= 4.4.9-56
373 BuildRequires: rpmbuild(macros) >= 1.217
374 Requires(post): coreutils
375 Requires(post): geninitrd >= 10000-3
376 Requires(post): module-init-tools >= 0.9.9
377 Requires: /sbin/depmod
379 Requires: geninitrd >= 10000-3
380 Requires: module-init-tools >= 0.9.9
381 Provides: %{name}(netfilter) = %{netfilter_snap}
382 Provides: %{name}(vermagic) = %{kernel_release}
383 Obsoletes: kernel%{_alt_kernel}-isdn-mISDN
384 Obsoletes: kernel-misc-acer_acpi
385 Obsoletes: kernel-misc-fuse
386 Obsoletes: kernel-misc-uvc
387 Obsoletes: kernel-modules
388 Obsoletes: kernel-net-ar81
389 Obsoletes: kernel-net-hostap
390 Obsoletes: kernel-net-ieee80211
391 Obsoletes: kernel-net-ipp2p
392 Obsoletes: kernel-net-rt61
393 Obsoletes: kernel-smp
394 Conflicts: e2fsprogs < 1.29
395 Conflicts: isdn4k-utils < 3.1pre1
396 Conflicts: jfsutils < 1.1.3
397 Conflicts: module-init-tools < 0.9.10
398 Conflicts: nfs-utils < 1.0.5
399 Conflicts: oprofile < 0.9
400 Conflicts: ppp < 1:2.4.0
401 Conflicts: procps < 3.2.0
402 Conflicts: quota-tools < 3.09
403 %if %{with reiserfs4}
404 Conflicts: reiser4progs < 1.0.0
406 Conflicts: reiserfsprogs < 3.6.3
407 Conflicts: udev < 1:081
408 Conflicts: util-linux < 2.10o
409 Conflicts: util-vserver < 0.30.216
410 Conflicts: xfsprogs < 2.6.0
412 ExcludeArch: i386 i486 i586
414 ExclusiveArch: %{ix86} %{x8664} alpha arm ia64 ppc ppc64 sparc sparc64
417 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
419 %ifarch %{ix86} %{x8664}
420 %define target_arch_dir x86
423 %define target_arch_dir powerpc
425 %ifarch sparc sparc64
426 %define target_arch_dir sparc
428 %ifnarch %{ix86} %{x8664} ppc ppc64 sparc sparc64
429 %define target_arch_dir %{_target_base_arch}
432 %define defconfig arch/%{target_arch_dir}/defconfig
434 # No ELF objects there to strip (skips processing 27k files)
435 %define _noautostrip .*%{_kernelsrcdir}/.*
436 %define _noautochrpath .*%{_kernelsrcdir}/.*
439 %define initrd_dir /boot/efi
441 %define initrd_dir /boot
444 %define topdir %{_builddir}/%{name}-%{version}
445 %define srcdir %{topdir}/linux-%{basever}
446 %define objdir %{topdir}/%{targetobj}
447 %define targetobj %{_target_base_arch}-gcc-%(%{kgcc} -dumpversion)
449 %define _kernelsrcdir /usr/src/linux%{_alt_kernel}-%{version}
451 %if "%{_target_base_arch}" != "%{_arch}"
452 %define CrossOpts ARCH=%{_target_base_arch} CROSS_COMPILE=%{_target_cpu}-pld-linux-
453 %define DepMod /bin/true
455 %if "%{_arch}" == "sparc" && "%{_target_base_arch}" == "sparc64"
456 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
457 %define DepMod /sbin/depmod
460 %if "%{_arch}" == "sparc64" && "%{_target_base_arch}" == "sparc"
461 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
462 %define DepMod /sbin/depmod
465 %if "%{_arch}" == "x86_64" && "%{_target_base_arch}" == "i386"
466 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
467 %define DepMod /sbin/depmod
470 %if "%{_target_base_arch}" == "ppc" || "%{_target_base_arch}" == "ppc64"
471 %define CrossOpts ARCH=powerpc CROSS_COMPILE=%{_target_cpu}-pld-linux-
475 %define CrossOpts ARCH=powerpc CC="%{__cc}"
477 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
479 %define DepMod /sbin/depmod
481 %define MakeOpts %{CrossOpts} HOSTCC="%{__cc}"
483 %define __features Netfilter module dated: %{netfilter_snap}\
484 %{?with_grsec_full:Grsecurity full support - enabled}\
485 %{?with_pax:PaX support - enabled}\
486 %{?with_fbcondecor:Fbsplash/fbcondecor - enabled }\
487 %{?with_nfsroot:Root on NFS - enabled}\
488 %{?with_apparmor:apparmor support - enabled}\
489 %{?with_tomoyo:tomoyo support - enabled}
491 %define Features %(echo "%{__features}" | sed '/^$/d')
494 This package contains the Linux kernel that is used to boot and run
495 your system. It contains few device drivers for specific hardware.
496 Most hardware is instead supported by modules loaded after booting.
500 %description -l de.UTF-8
501 Das Kernel-Paket enthält den Linux-Kernel (vmlinuz), den Kern des
502 Linux-Betriebssystems. Der Kernel ist für grundliegende
503 Systemfunktionen verantwortlich: Speicherreservierung,
504 Prozeß-Management, Geräte Ein- und Ausgaben, usw.
508 %description -l fr.UTF-8
509 Le package kernel contient le kernel linux (vmlinuz), la partie
510 centrale d'un système d'exploitation Linux. Le noyau traite les
511 fonctions basiques d'un système d'exploitation: allocation mémoire,
512 allocation de process, entrée/sortie de peripheriques, etc.
516 %description -l pl.UTF-8
517 Pakiet zawiera jądro Linuksa niezbędne do prawidłowego działania
518 Twojego komputera. Zawiera w sobie sterowniki do sprzętu znajdującego
519 się w komputerze, takiego jak sterowniki dysków itp.
524 Summary: vmlinux - uncompressed kernel image
525 Summary(de.UTF-8): vmlinux - dekompressiertes Kernel Bild
526 Summary(pl.UTF-8): vmlinux - rozpakowany obraz jÄ…dra
528 Obsoletes: kernel-smp-vmlinux
531 vmlinux - uncompressed kernel image.
533 %description vmlinux -l de.UTF-8
534 vmlinux - dekompressiertes Kernel Bild.
536 %description vmlinux -l pl.UTF-8
537 vmlinux - rozpakowany obraz jÄ…dra.
540 Summary: common dirs for kernel packages
541 Summary(pl.UTF-8): Katalogi wspólne dla pakietów kernela
545 This package provides common dirs shared between various kernel
548 %description dirs -l pl.UTF-8
549 Katalog ten udostepnia katalogi współdzielone pomiędzy różnymi
553 Summary: DRM kernel modules
554 Summary(de.UTF-8): DRM Kernel Treiber
555 Summary(pl.UTF-8): Sterowniki DRM
557 Requires(postun): %{name} = %{epoch}:%{version}-%{release}
558 Requires: %{name} = %{epoch}:%{version}-%{release}
559 Obsoletes: kernel-smp-drm
565 %description drm -l de.UTF-8
568 %description drm -l pl.UTF-8
572 Summary: PCMCIA modules
573 Summary(de.UTF-8): PCMCIA Module
574 Summary(pl.UTF-8): Moduły PCMCIA
576 Requires(postun): %{name} = %{epoch}:%{version}-%{release}
577 Requires: %{name} = %{epoch}:%{version}-%{release}
578 Obsoletes: kernel-smp-pcmcia
579 Conflicts: pcmcia-cs < 3.1.21
580 Conflicts: pcmciautils < 004
586 %description pcmcia -l de.UTF-8
589 %description pcmcia -l pl.UTF-8
593 Summary: Libraries for preparing bootable kernel on PowerPCs
594 Summary(pl.UTF-8): Biblioteki do przygotowania bootowalnego jÄ…dra dla PowerPC
596 Requires: %{name} = %{epoch}:%{version}-%{release}
597 Requires: mkvmlinuz >= 1.3
598 Obsoletes: kernel-smp-libs
602 Libraries for preparing bootable kernel on PowerPCs. Script called
603 mkvmlinuz may be useful for this.
605 %description libs -l pl.UTF-8
606 Biblioteki do przygotowania bootowalnego jÄ…dra dla PowerPC. Skrypt
607 mkvmlinuz może być do tego przydatny.
610 Summary: ALSA kernel modules
611 Summary(de.UTF-8): ALSA Kernel Module
612 Summary(pl.UTF-8): Sterowniki dźwięku ALSA
614 Requires(postun): %{name} = %{epoch}:%{version}-%{release}
615 Requires: %{name} = %{epoch}:%{version}-%{release}
616 Obsoletes: kernel-smp-sound-alsa
619 %description sound-alsa
620 ALSA (Advanced Linux Sound Architecture) sound drivers.
622 %description sound-alsa -l de.UTF-8
623 ALSA (Advanced Linux Sound Architecture) Sound-Treiber.
625 %description sound-alsa -l pl.UTF-8
626 Sterowniki dźwięku ALSA (Advanced Linux Sound Architecture).
629 Summary: OSS kernel modules
630 Summary(de.UTF-8): OSS Kernel Module
631 Summary(pl.UTF-8): Sterowniki dźwięku OSS
633 Requires(postun): %{name} = %{epoch}:%{version}-%{release}
634 Requires: %{name} = %{epoch}:%{version}-%{release}
635 Obsoletes: kernel-smp-sound-oss
638 %description sound-oss
639 OSS (Open Sound System) drivers.
641 %description sound-oss -l de.UTF-8
642 OSS (Open Sound System) Treiber.
644 %description sound-oss -l pl.UTF-8
645 Sterowniki dźwięku OSS (Open Sound System).
648 Summary: Header files for the Linux kernel
649 Summary(de.UTF-8): Header Dateien für den Linux-Kernel
650 Summary(pl.UTF-8): Pliki nagłówkowe jądra Linuksa
651 Group: Development/Building
652 Provides: %{name}-headers(netfilter) = %{netfilter_snap}
656 These are the C header files for the Linux kernel, which define
657 structures and constants that are needed when rebuilding the kernel or
658 building kernel modules.
660 %description headers -l de.UTF-8
661 Dies sind die C Header Dateien für den Linux-Kernel, die definierte
662 Strukturen und Konstante beinhalten, die beim rekompilieren des
663 Kernels oder bei Kernel Modul kompilationen gebraucht werden.
665 %description headers -l pl.UTF-8
666 Pakiet zawiera pliki nagłówkowe jądra, niezbędne do rekompilacji jądra
667 oraz budowania modułów jądra.
669 %package module-build
670 Summary: Development files for building kernel modules
671 Summary(de.UTF-8): Development Dateien die beim Kernel Modul kompilationen gebraucht werden
672 Summary(pl.UTF-8): Pliki służące do budowania modułów jądra
673 Group: Development/Building
674 Requires: %{name}-headers = %{epoch}:%{version}-%{release}
675 Conflicts: rpmbuild(macros) < 1.321
678 %description module-build
679 Development files from kernel source tree needed to build Linux kernel
680 modules from external packages.
682 %description module-build -l de.UTF-8
683 Development Dateien des Linux-Kernels die beim kompilieren externer
684 Kernel Module gebraucht werden.
686 %description module-build -l pl.UTF-8
687 Pliki ze drzewa źródeł jądra potrzebne do budowania modułów jądra
688 Linuksa z zewnętrznych pakietów.
691 Summary: Kernel source tree
692 Summary(de.UTF-8): Der Kernel Quelltext
693 Summary(pl.UTF-8): Kod źródłowy jądra Linuksa
694 Group: Development/Building
695 Requires: %{name}-module-build = %{epoch}:%{version}-%{release}
699 This is the source code for the Linux kernel. You can build a custom
700 kernel that is better tuned to your particular hardware.
702 %description source -l de.UTF-8
703 Das Kernel-Source-Paket enthält den source code (C/Assembler-Code) des
704 Linux-Kernels. Die Source-Dateien werden gebraucht, um viele
705 C-Programme zu kompilieren, da sie auf Konstanten zurückgreifen, die
706 im Kernel-Source definiert sind. Die Source-Dateien können auch
707 benutzt werden, um einen Kernel zu kompilieren, der besser auf Ihre
708 Hardware ausgerichtet ist.
710 %description source -l fr.UTF-8
711 Le package pour le kernel-source contient le code source pour le noyau
712 linux. Ces sources sont nécessaires pour compiler la plupart des
713 programmes C, car il dépend de constantes définies dans le code
714 source. Les sources peuvent être aussi utilisée pour compiler un noyau
715 personnalisé pour avoir de meilleures performances sur des matériels
718 %description source -l pl.UTF-8
719 Pakiet zawiera kod źródłowy jądra systemu.
722 Summary: Kernel documentation
723 Summary(de.UTF-8): Kernel Dokumentation
724 Summary(pl.UTF-8): Dokumentacja do jÄ…dra Linuksa
729 This is the documentation for the Linux kernel, as found in
730 /usr/src/linux/Documentation directory.
732 %description doc -l de.UTF-8
733 Dies ist die Kernel Dokumentation wie sie im 'Documentation'
734 Verzeichniss vorgefunden werden kann.
736 %description doc -l pl.UTF-8
737 Pakiet zawiera dokumentacjÄ™ do jÄ…dra Linuksa pochodzÄ…cÄ… z katalogu
738 /usr/src/linux/Documentation.
742 ln -s %{SOURCE7} kernel-module-build.pl
743 ln -s %{SOURCE10} Makefile
746 # hack against warning in pax/grsec
748 sed -i 's/-Werror//' arch/alpha/kernel/Makefile
752 install %{SOURCE5} Makefile.ppclibs
755 %if "%{postver}" != "%{nil}"
756 %{__bzip2} -dc %{SOURCE1} | patch -p1 -s
765 # XXX: 2.6.29 - need update
768 %if %{with fbcondecor}
776 # kernel-pom-ng-IPV4OPTSSTRIP.patch
779 # kernel-pom-ng-ipv4options.patch
782 # kernel-pom-ng-ROUTE.patch
785 # kernel-pom-ng-mms-conntrack-nat.patch
788 # kernel-pom-ng-rsh.patch
791 # kernel-pom-ng-rpc.patch
794 # kernel-nf_rtsp.patch
797 # kernel-owner-xid.patch
802 # kernel-ipt_account.patch
805 # kernel-ipt_ACCOUNT.patch
808 # kernel-layer7.patch
846 # kernel-rndis_host-wm5.patch
849 # hostap enhancements from/for aircrack-ng
852 # LSI MPT Fusion driver update (by LSI via SUSE folks)
865 # unionfs (disabled for rescuecd - problems with aufs2)
866 %if %{without rescuecd}
868 %{?with_apparmor:%patch141 -p1}
874 # 2.6.29 FIXME - needs port to creds
877 #%{?with_apparmor:%patch147 -p1}
886 # grsecurity & pax stuff
890 %{?with_vserver:%patch10000 -p1}
891 %{?with_vserver:%patch10001 -p1}
892 %{?with_vserver:%patch10002 -p1}
893 %{?with_vserver:%patch10003 -p1}
896 %if %{with grsec_full}
898 %{?with_vserver:%patch10000 -p1}
899 %{?with_vserver:%patch10001 -p1}
900 %{?with_vserver:%patch10002 -p1}
901 %{?with_vserver:%patch10003 -p1}
903 %if %{with grsec_minimal}
905 # remember that we have the same config file for grsec_minimal and
906 # grsec_full, but the patches are different.
911 # now we have an separate testing pax-only patch - in the future we
912 # could have single grsecurity patch and will have to prepare separate
913 # configs for grsec_minimal, grsec_full and pax to support such
914 # configurations like pax & grsec_minimal.
915 # So, in a future there could be no patch9998, but only config
916 # would tell which options should be enabled.
917 # The second option is to maintain separate pax-only patch.
919 #patch9997 -p1 - needs update
925 # end of grsecurity & pax stuff
929 %if %{with grsec_full} || %{with pax_full}
938 tar xzf %{SOURCE6000}
960 # Fix EXTRAVERSION in main Makefile
961 sed -i 's#EXTRAVERSION =.*#EXTRAVERSION = %{postver}%{?alt_kernel:_%{alt_kernel}}#g' Makefile
963 # cleanup backups after patching
964 find '(' -name '*~' -o -name '*.orig' -o -name '.gitignore' ')' -print0 | xargs -0 -r -l512 rm -f
968 cat > %{targetobj}.mk <<'EOF'
969 # generated by %{name}.spec
970 KERNELSRC := %{_builddir}/%{name}-%{version}/linux-%{basever}
971 KERNELOUTPUT := %{objdir}
973 SRCARCH := %{target_arch_dir}
974 ARCH := %{_target_base_arch}
975 Q := %{!?with_verbose:@}
976 MAKE_OPTS := %{MakeOpts}
977 DEFCONFIG := %{defconfig}
984 CONFIG_PAX_SEGMEXEC=y
985 # performance impact on CPUs without NX bit
986 CONFIG_PAX_PAGEEXEC=n
989 CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM=n
995 CONFIG_PAX_NOELFRELOCS=n
998 CONFIG_PAX_EMUTRAMP=y
999 CONFIG_PAX_EMUSIGRT=y
1003 %ifarch sparc sparc64 alpha
1007 # Now we have to check MAC system integration. Grsecurity (full) uses PAX_HAVE_ACL_FLAGS
1008 # setting (direct acces). grsec_minimal probably have no idea about PaX so we probably
1009 # could use PAX_NO_ACL_FLAGS, but for testing the hooks setting will be used
1010 # PAX_HOOK_ACL_FLAGS. SELinux should also be able to make PaX settings via hooks
1012 %if %{with grsec_full}
1013 # Hardening grsec options if with pax
1014 CONFIG_GRKERNSEC_PROC_MEMMAP=y
1015 # almost rational (see HIDESYM help)
1016 CONFIG_GRKERNSEC_HIDESYM=y
1018 # no change needed CONFIG=PAX_HAVE_ACL_FLAGS=y is taken from the kernel-pax.config
1020 # selinux or other hooks?
1021 CONFIG_PAX_HAVE_ACL_FLAGS=n
1022 CONFIG_PAX_HOOK_ACL_FLAGS=y
1031 cat <<-EOCONFIG > $1
1032 # CONFIG_SOUND is not set
1033 # CONFIG_AUDIT is not set
1034 # CONFIG_TR is not set
1035 # CONFIG_BT is not set
1036 # CONFIG_VIDEO_DEV is not set
1037 # CONFIG_DVB_CORE is not set
1038 # CONFIG_HAMRADIO is not set
1039 # CONFIG_ARCNET is not set
1040 # CONFIG_FB is not set
1041 # CONFIG_DRM is not set
1042 # CONFIG_WATCHDOG is not set
1043 # CONFIG_INPUT_JOYSTICK is not set
1044 # CONFIG_DEBUG_KERNEL is not set
1045 # CONFIG_ISDN is not set
1046 # CONFIG_AGP is not set
1047 # CONFIG_SECURITY is not set
1048 # CONFIG_PARIDE is not set
1049 # CONFIG_CPU_FREQ is not set
1050 # CONFIG_GAMEPORT is not set
1051 # CONFIG_KVM is not set
1052 # CONFIG_PHONE is not set
1055 CONFIG_AUFS_BR_RAMFS=y
1056 CONFIG_BLK_DEV_LOOP=y
1068 Config="kernel-%{target_arch_dir}.config"
1069 echo >&2 "Building config file for %{_target_cpu} using $Config et al."
1071 # prepare local and important options
1072 cat <<-EOCONFIG > important.config
1073 LOCALVERSION="-%{localversion}"
1077 CONFIG_DEBUG_SLAB_LEAK=y
1078 CONFIG_DEBUG_PREEMPT=y
1079 CONFIG_RT_DEADLOCK_DETECT=y
1082 # apparmor, will be moved to external file if works
1083 %if %{with apparmor}
1084 CONFIG_SECURITY_APPARMOR=y
1085 CONFIG_SECURITY_APPARMOR_BOOTPARAM_VALUE=1
1086 CONFIG_SECURITY_APPARMOR_DISABLE=n
1093 %ifarch i686 athlon pentium3 pentium4
1101 %if %{without pcmcia}
1105 %if %{with fbcondecor}
1109 CONFIG_FB_TILEBLITTING=n
1110 CONFIG_FB_CON_DECOR=y
1118 # Temporary disabled RELOCATABLE. Needed only on x86??
1119 %if %{with pax} || %{with grsec_full}
1120 CONFIG_RELOCATABLE=n
1124 %if %{with rescuecd}
1125 RescueConfig rescue.config
1127 %if %{with pax_full} || %{with pax}
1128 PaXconfig pax.config
1131 # prepare kernel-style config file from multiple config files
1132 %{__awk} -v arch="all %{target_arch_dir} %{_target_base_arch} %{_target_cpu}" -f %{SOURCE6} \
1134 $RPM_SOURCE_DIR/kernel-%{alt_kernel}.config \
1137 %if %{with rescuecd}
1143 %if %{with pax_full}
1148 %if %{with grsec_full}
1152 %if %{with grsec_minimal}
1174 %if %{with tuxonice}
1175 %ifarch %{ix86} %{x8664} ia64 ppc ppc64
1182 %{SOURCE40} %{?0:netfilter} \
1183 %{SOURCE41} %{?0:patches} \
1185 $RPM_SOURCE_DIR/$Config
1189 install -d arch/%{target_arch_dir}
1190 BuildConfig > %{defconfig}
1191 ln -sf %{defconfig} .config
1194 %{__make} TARGETOBJ=%{targetobj} oldconfig
1196 %{__awk} %{?debug:-v dieOnError=1} -v infile=%{objdir}/%{defconfig} -f %{SOURCE8} %{objdir}/.config
1199 %{__make} TARGETOBJ=%{targetobj} all
1202 rm -rf $RPM_BUILD_ROOT
1203 %{__make} %{MakeOpts} %{!?with_verbose:-s} modules_install firmware_install \
1205 %{?with_verbose:V=1} \
1207 INSTALL_MOD_PATH=$RPM_BUILD_ROOT \
1208 INSTALL_FW_PATH=$RPM_BUILD_ROOT/lib/firmware/%{kernel_release} \
1209 KERNELRELEASE=%{kernel_release}
1211 install -d $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/misc
1214 # create directories which may be missing, to simplyfy %files
1215 install -d $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/kernel/sound
1218 # rpm obeys filelinkto checks for ghosted symlinks, convert to files
1219 rm -f $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/{build,source}
1220 touch $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/{build,source}
1223 install -d $RPM_BUILD_ROOT/boot
1224 cp -a %{objdir}/System.map $RPM_BUILD_ROOT/boot/System.map-%{kernel_release}
1225 %ifarch %{ix86} %{x8664}
1226 cp -a %{objdir}/arch/%{target_arch_dir}/boot/bzImage $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release}
1227 install %{objdir}/vmlinux $RPM_BUILD_ROOT/boot/vmlinux-%{kernel_release}
1230 install %{objdir}/vmlinux $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release}
1231 install %{objdir}/vmlinux $RPM_BUILD_ROOT/boot/vmlinux-%{kernel_release}
1234 %{__gzip} -cfv %{objdir}/vmlinux > %{objdir}/vmlinuz
1235 cp -a %{objdir}/vmlinuz $RPM_BUILD_ROOT/boot/efi/vmlinuz-%{kernel_release}
1236 ln -sf efi/vmlinuz-%{kernel_release} $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release}
1238 %ifarch alpha sparc sparc64
1239 %{__gzip} -cfv %{objdir}/vmlinux > %{objdir}/vmlinuz
1240 cp -a %{objdir}/vmlinuz $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release}
1241 install %{objdir}/vmlinux $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release}
1243 elftoaout %{objdir}/arch/sparc/boot/image -o %{objdir}/vmlinux.aout
1244 install %{objdir}/vmlinux.aout $RPM_BUILD_ROOT/boot/vmlinux.aout-%{kernel_release}
1247 elftoaout %{objdir}/arch/sparc64/boot/image -o %{objdir}/vmlinux.aout
1248 install %{objdir}/vmlinux.aout $RPM_BUILD_ROOT/boot/vmlinux.aout-%{kernel_release}
1251 install %{objdir}/arch/arm/boot/zImage $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release}
1256 touch $RPM_BUILD_ROOT%{initrd_dir}/initrd-%{kernel_release}.gz
1258 %if "%{_target_base_arch}" != "%{_arch}"
1259 touch $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/modules.dep
1263 install -d $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/%{kernel_release}
1266 install -d $RPM_BUILD_ROOT%{_kernelsrcdir}
1267 # test if we can hardlink -- %{_builddir} and $RPM_BUILD_ROOT on same partition
1268 if cp -al %{srcdir}/COPYING $RPM_BUILD_ROOT/COPYING 2>/dev/null; then
1270 rm -f $RPM_BUILD_ROOT/COPYING
1273 cp -a$l %{srcdir}/* $RPM_BUILD_ROOT%{_kernelsrcdir}
1274 cp -a %{objdir}/Module.symvers $RPM_BUILD_ROOT%{_kernelsrcdir}/Module.symvers-dist
1275 cp -aL %{objdir}/.config $RPM_BUILD_ROOT%{_kernelsrcdir}/config-dist
1276 cp -a %{objdir}/include/linux/autoconf.h $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux/autoconf-dist.h
1277 cp -a %{objdir}/include/linux/{utsrelease,version}.h $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux
1278 cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux/autoconf.h
1279 cp -a %{SOURCE4} $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux/config.h
1281 # collect module-build files and directories
1282 # Usage: kernel-module-build.pl $rpmdir $fileoutdir
1284 cd $RPM_BUILD_ROOT%{_kernelsrcdir}
1285 %{__perl} %{topdir}/kernel-module-build.pl %{_kernelsrcdir} $fileoutdir
1289 rm -rf $RPM_BUILD_ROOT
1292 if [ -x /sbin/new-kernel-pkg ]; then
1293 /sbin/new-kernel-pkg --remove %{kernel_release}
1298 mv -f /boot/efi/vmlinuz{,.old} 2> /dev/null
1299 %{?alt_kernel:mv -f /boot/efi/vmlinuz%{_alt_kernel}{,.old} 2> /dev/null}
1300 ln -sf vmlinuz-%{kernel_release} /boot/efi/vmlinuz
1301 %{?alt_kernel:ln -sf vmlinuz-%{kernel_release} /boot/efi/vmlinuz%{_alt_kernel}}
1303 mv -f /boot/vmlinuz{,.old} 2> /dev/null
1304 %{?alt_kernel:mv -f /boot/vmlinuz%{_alt_kernel}{,.old} 2> /dev/null}
1305 mv -f /boot/System.map{,.old} 2> /dev/null
1306 %{?alt_kernel:mv -f /boot/System%{_alt_kernel}.map{,.old} 2> /dev/null}
1307 ln -sf vmlinuz-%{kernel_release} /boot/vmlinuz
1308 %{?alt_kernel:ln -sf vmlinuz-%{kernel_release} /boot/vmlinuz%{_alt_kernel}}
1309 ln -sf System.map-%{kernel_release} /boot/System.map
1310 %{?alt_kernel:ln -sf System.map-%{kernel_release} /boot/System.map%{_alt_kernel}}
1312 %depmod %{kernel_release}
1314 /sbin/geninitrd -f --initrdfs=rom %{initrd_dir}/initrd-%{kernel_release}.gz %{kernel_release}
1315 mv -f %{initrd_dir}/initrd{,.old} 2> /dev/null
1316 %{?alt_kernel:mv -f %{initrd_dir}/initrd%{_alt_kernel}{,.old} 2> /dev/null}
1317 ln -sf initrd-%{kernel_release}.gz %{initrd_dir}/initrd
1318 %{?alt_kernel:ln -sf initrd-%{kernel_release}.gz %{initrd_dir}/initrd%{_alt_kernel}}
1320 if [ -x /sbin/new-kernel-pkg ]; then
1321 /sbin/new-kernel-pkg --initrdfile=%{initrd_dir}/initrd-%{kernel_release}.gz --install %{kernel_release} --banner "PLD Linux (%{pld_release})%{?alt_kernel: / %{alt_kernel}}"
1322 elif [ -x /sbin/rc-boot ]; then
1323 /sbin/rc-boot 1>&2 || :
1327 mv -f /boot/vmlinux{,.old} 2> /dev/null
1328 %{?alt_kernel:mv -f /boot/vmlinux-%{alt_kernel}{,.old} 2> /dev/null}
1329 ln -sf vmlinux-%{kernel_release} /boot/vmlinux
1330 %{?alt_kernel:ln -sf vmlinux-%{kernel_release} /boot/vmlinux-%{alt_kernel}}
1333 %{_sbindir}/mkvmlinuz /boot/zImage-%{kernel_release} %{kernel_release}
1336 %depmod %{kernel_release}
1339 %depmod %{kernel_release}
1342 %depmod %{kernel_release}
1345 %depmod %{kernel_release}
1348 %depmod %{kernel_release}
1351 %depmod %{kernel_release}
1354 %depmod %{kernel_release}
1357 %depmod %{kernel_release}
1360 ln -snf %{basename:%{_kernelsrcdir}} %{_prefix}/src/linux%{_alt_kernel}
1363 if [ "$1" = "0" ]; then
1364 if [ -L %{_prefix}/src/linux%{_alt_kernel} ]; then
1365 if [ "$(readlink %{_prefix}/src/linux%{_alt_kernel})" = "linux%{_alt_kernel}-%{version}" ]; then
1366 rm -f %{_prefix}/src/linux%{_alt_kernel}
1371 %triggerin module-build -- %{name} = %{epoch}:%{version}-%{release}
1372 ln -sfn %{_kernelsrcdir} /lib/modules/%{kernel_release}/build
1373 ln -sfn %{_kernelsrcdir} /lib/modules/%{kernel_release}/source
1375 %triggerun module-build -- %{name} = %{epoch}:%{version}-%{release}
1376 if [ "$1" = 0 ]; then
1377 rm -f /lib/modules/%{kernel_release}/{build,source}
1381 %defattr(644,root,root,755)
1382 %ifarch sparc sparc64
1383 /boot/vmlinux.aout-%{kernel_release}
1386 /boot/efi/vmlinuz-%{kernel_release}
1388 /boot/vmlinuz-%{kernel_release}
1389 /boot/System.map-%{kernel_release}
1390 %ghost %{initrd_dir}/initrd-%{kernel_release}.gz
1391 /lib/firmware/%{kernel_release}
1393 %dir /lib/modules/%{kernel_release}
1394 %dir /lib/modules/%{kernel_release}/kernel
1396 /lib/modules/%{kernel_release}/kernel/arch
1398 /lib/modules/%{kernel_release}/kernel/crypto
1399 /lib/modules/%{kernel_release}/kernel/drivers
1401 %exclude /lib/modules/%{kernel_release}/kernel/drivers/gpu
1403 /lib/modules/%{kernel_release}/kernel/fs
1404 /lib/modules/%{kernel_release}/kernel/kernel
1405 /lib/modules/%{kernel_release}/kernel/lib
1406 /lib/modules/%{kernel_release}/kernel/net
1408 %dir /lib/modules/%{kernel_release}/kernel/sound
1409 /lib/modules/%{kernel_release}/kernel/sound/ac97_bus.ko*
1410 /lib/modules/%{kernel_release}/kernel/sound/sound*.ko*
1412 %exclude /lib/modules/%{kernel_release}/kernel/drivers/media/video/cx88/cx88-alsa.ko*
1413 %exclude /lib/modules/%{kernel_release}/kernel/drivers/media/video/em28xx/em28xx-alsa.ko*
1414 %exclude /lib/modules/%{kernel_release}/kernel/drivers/media/video/saa7134/saa7134-alsa.ko*
1417 %dir /lib/modules/%{kernel_release}/misc
1419 %exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/[!p]*
1420 %exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/pd6729.ko*
1421 %exclude /lib/modules/%{kernel_release}/kernel/drivers/*/pcmcia
1422 %if %{without rescuecd}
1423 %exclude /lib/modules/%{kernel_release}/kernel/drivers/ata/pata_pcmcia.ko*
1424 %exclude /lib/modules/%{kernel_release}/kernel/drivers/bluetooth/*_cs.ko*
1425 %exclude /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/avm_cs.ko*
1426 %exclude /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/b1pcmcia.ko*
1427 %exclude /lib/modules/%{kernel_release}/kernel/drivers/telephony/ixj_pcmcia.ko*
1428 %exclude /lib/modules/%{kernel_release}/kernel/drivers/usb/gadget/g_midi.ko*
1430 %exclude /lib/modules/%{kernel_release}/kernel/drivers/ide/ide-cs.ko*
1431 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/*_cs.ko*
1432 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/b43
1433 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/hostap/hostap_cs.ko*
1434 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/libertas/*_cs.ko*
1435 %exclude /lib/modules/%{kernel_release}/kernel/drivers/parport/parport_cs.ko*
1436 %exclude /lib/modules/%{kernel_release}/kernel/drivers/serial/serial_cs.ko*
1437 %exclude /lib/modules/%{kernel_release}/kernel/drivers/usb/host/sl811_cs.ko*
1440 /lib/modules/%{kernel_release}/kernel/sound
1442 %ghost /lib/modules/%{kernel_release}/modules.*
1443 # symlinks pointing to kernelsrcdir
1444 %ghost /lib/modules/%{kernel_release}/build
1445 %ghost /lib/modules/%{kernel_release}/source
1446 %dir %{_sysconfdir}/modprobe.d/%{kernel_release}
1449 %defattr(644,root,root,755)
1450 %dir %{_kernelsrcdir}
1452 %ifarch alpha %{ix86} %{x8664} ppc ppc64 sparc sparc64
1454 %defattr(644,root,root,755)
1455 /boot/vmlinux-%{kernel_release}
1460 %defattr(644,root,root,755)
1461 /lib/modules/%{kernel_release}/kernel/drivers/gpu
1466 %defattr(644,root,root,755)
1467 /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/*ko*
1468 /lib/modules/%{kernel_release}/kernel/drivers/*/pcmcia
1469 %exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/pcmcia*ko*
1470 %if %{without rescuecd}
1471 /lib/modules/%{kernel_release}/kernel/drivers/bluetooth/*_cs.ko*
1472 /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/avm_cs.ko*
1473 /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/b1pcmcia.ko*
1474 /lib/modules/%{kernel_release}/kernel/drivers/telephony/ixj_pcmcia.ko*
1476 /lib/modules/%{kernel_release}/kernel/drivers/ata/pata_pcmcia.ko*
1477 /lib/modules/%{kernel_release}/kernel/drivers/ide/ide-cs.ko*
1478 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/*_cs.ko*
1479 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/b43
1480 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/hostap/hostap_cs.ko*
1481 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/libertas/*_cs.ko*
1482 /lib/modules/%{kernel_release}/kernel/drivers/parport/parport_cs.ko*
1483 /lib/modules/%{kernel_release}/kernel/drivers/serial/serial_cs.ko*
1484 /lib/modules/%{kernel_release}/kernel/drivers/usb/host/sl811_cs.ko*
1488 %if "%{_arch}" == "ppc"
1490 %defattr(644,root,root,755)
1491 %dir /boot/libs-%{kernel_release}
1492 /boot/libs-%{kernel_release}/common
1493 /boot/libs-%{kernel_release}/kernel
1494 /boot/libs-%{kernel_release}/lib
1495 /boot/libs-%{kernel_release}/of1275
1496 /boot/libs-%{kernel_release}/openfirmware
1497 /boot/libs-%{kernel_release}/simple
1498 %dir /boot/libs-%{kernel_release}/utils
1499 %attr(755,root,root) /boot/libs-%{kernel_release}/utils/*
1500 /boot/libs-%{kernel_release}/ld.script
1506 %defattr(644,root,root,755)
1507 /lib/modules/%{kernel_release}/kernel/sound
1508 %exclude %dir /lib/modules/%{kernel_release}/kernel/sound
1509 %exclude /lib/modules/%{kernel_release}/kernel/sound/ac97_bus.ko*
1510 %exclude /lib/modules/%{kernel_release}/kernel/sound/sound*.ko*
1512 %exclude /lib/modules/%{kernel_release}/kernel/sound/oss
1515 /lib/modules/%{kernel_release}/kernel/drivers/usb/gadget/g_midi.ko*
1516 /lib/modules/%{kernel_release}/kernel/drivers/media/video/cx88/cx88-alsa.ko*
1517 /lib/modules/%{kernel_release}/kernel/drivers/media/video/em28xx/em28xx-alsa.ko*
1518 /lib/modules/%{kernel_release}/kernel/drivers/media/video/saa7134/saa7134-alsa.ko*
1523 %defattr(644,root,root,755)
1524 /lib/modules/%{kernel_release}/kernel/sound/oss
1529 %defattr(644,root,root,755)
1530 %{_kernelsrcdir}/include
1531 %dir %{_kernelsrcdir}/arch
1532 %dir %{_kernelsrcdir}/arch/[!K]*
1533 %{_kernelsrcdir}/arch/*/include
1534 %dir %{_kernelsrcdir}/security
1535 %dir %{_kernelsrcdir}/security/selinux
1536 %{_kernelsrcdir}/security/selinux/include
1537 %{_kernelsrcdir}/config-dist
1538 %{_kernelsrcdir}/Module.symvers-dist
1540 %files module-build -f aux_files
1541 %defattr(644,root,root,755)
1543 %{_kernelsrcdir}/arch/powerpc/lib/crtsavres.*
1545 %{_kernelsrcdir}/arch/*/kernel/asm-offsets*
1546 %{_kernelsrcdir}/arch/*/kernel/sigframe*.h
1547 %{_kernelsrcdir}/drivers/lguest/lg.h
1548 %{_kernelsrcdir}/kernel/bounds.c
1549 %dir %{_kernelsrcdir}/scripts
1550 %dir %{_kernelsrcdir}/scripts/kconfig
1551 %{_kernelsrcdir}/scripts/Kbuild.include
1552 %{_kernelsrcdir}/scripts/Makefile*
1553 %{_kernelsrcdir}/scripts/basic
1554 %{_kernelsrcdir}/scripts/mkmakefile
1555 %{_kernelsrcdir}/scripts/mod
1556 %{_kernelsrcdir}/scripts/setlocalversion
1557 %{_kernelsrcdir}/scripts/*.c
1558 %{_kernelsrcdir}/scripts/*.sh
1559 %{_kernelsrcdir}/scripts/kconfig/*
1560 %{_kernelsrcdir}/scripts/mkcompile_h
1561 %dir %{_kernelsrcdir}/scripts/selinux
1562 %{_kernelsrcdir}/scripts/selinux/Makefile
1563 %dir %{_kernelsrcdir}/scripts/selinux/mdp
1564 %{_kernelsrcdir}/scripts/selinux/mdp/Makefile
1565 %{_kernelsrcdir}/scripts/selinux/mdp/*.c
1568 %defattr(644,root,root,755)
1569 %{_kernelsrcdir}/Documentation
1572 %files source -f aux_files_exc
1573 %defattr(644,root,root,755)
1574 %{_kernelsrcdir}/arch/*/[!Mik]*
1575 %{_kernelsrcdir}/arch/*/kernel/[!M]*
1576 %{_kernelsrcdir}/arch/ia64/ia32/[!M]*
1577 %{_kernelsrcdir}/arch/ia64/install.sh
1578 %{_kernelsrcdir}/arch/m68k/ifpsp060/[!M]*
1579 %{_kernelsrcdir}/arch/m68k/ifpsp060/MISC
1580 %{_kernelsrcdir}/arch/parisc/install.sh
1581 %{_kernelsrcdir}/arch/x86/ia32/[!M]*
1582 %{_kernelsrcdir}/arch/ia64/kvm
1583 %{_kernelsrcdir}/arch/powerpc/kvm
1585 %exclude %{_kernelsrcdir}/arch/powerpc/lib/crtsavres.*
1587 %{_kernelsrcdir}/arch/s390/kvm
1588 %{_kernelsrcdir}/arch/x86/kvm
1589 %exclude %{_kernelsrcdir}/arch/*/kernel/asm-offsets*
1590 %exclude %{_kernelsrcdir}/arch/*/kernel/sigframe*.h
1591 %exclude %{_kernelsrcdir}/drivers/lguest/lg.h
1592 %{_kernelsrcdir}/block
1593 %{_kernelsrcdir}/crypto
1594 %{_kernelsrcdir}/drivers
1595 %{_kernelsrcdir}/firmware
1597 %if %{with grsecurity} && %{without rescuecd}
1598 %{_kernelsrcdir}/grsecurity
1600 %{_kernelsrcdir}/init
1601 %{_kernelsrcdir}/ipc
1602 %{_kernelsrcdir}/kernel
1603 %exclude %{_kernelsrcdir}/kernel/bounds.c
1604 %{_kernelsrcdir}/lib
1606 %{_kernelsrcdir}/net
1607 %{_kernelsrcdir}/virt
1608 %{_kernelsrcdir}/samples
1609 %{_kernelsrcdir}/scripts/*
1610 %exclude %{_kernelsrcdir}/scripts/Kbuild.include
1611 %exclude %{_kernelsrcdir}/scripts/Makefile*
1612 %exclude %{_kernelsrcdir}/scripts/basic
1613 %exclude %{_kernelsrcdir}/scripts/kconfig
1614 %exclude %{_kernelsrcdir}/scripts/mkmakefile
1615 %exclude %{_kernelsrcdir}/scripts/mod
1616 %exclude %{_kernelsrcdir}/scripts/setlocalversion
1617 %exclude %{_kernelsrcdir}/scripts/*.c
1618 %exclude %{_kernelsrcdir}/scripts/*.sh
1619 %{_kernelsrcdir}/sound
1620 %{_kernelsrcdir}/security
1621 %exclude %{_kernelsrcdir}/security/selinux/include
1622 %{_kernelsrcdir}/usr
1623 %{_kernelsrcdir}/COPYING
1624 %{_kernelsrcdir}/CREDITS
1625 %{_kernelsrcdir}/MAINTAINERS
1626 %{_kernelsrcdir}/README
1627 %{_kernelsrcdir}/REPORTING-BUGS