2 # STATUS: 2.6.25 work in progress
5 # - suspend2 renamed to tuxonice (as project name)
8 # - benchmark NO_HZ & HZ=1000 vs HZ=300 on i686
9 # - apparmor (no future?)
13 # - pom-ng quake3-conntrack-nat -> nf_conntrack ?
14 # - pom-ng talk-conntrack-nat -> nf_conntrack ?
16 # - pax hooks for selinux (experimental)
19 %bcond_without source # don't build kernel-source package
20 %bcond_without pcmcia # don't build pcmcia
22 %bcond_with verbose # verbose build (V=1)
23 %bcond_with xen0 # added Xen0 support
24 %bcond_with xenU # added XenU support
25 %bcond_without reiser4 # support for reiser4 fs (experimental)
27 %bcond_without grsecurity # don't build grsecurity nor pax at all
28 %bcond_without grsec_minimal # build only minimal subset (proc,link,fifo,shm)
29 %bcond_with grsec_full # build full grsecurity
30 %bcond_with pax_full # build pax and full grsecurity (ie. grsec_full && pax)
31 %bcond_with pax # build pax support
33 %bcond_with fbcondecor # fbsplash/fbcondecor instead of bootsplash
34 %bcond_with pae # build PAE (HIGHMEM64G) support on uniprocessor
35 %bcond_with nfsroot # build with root on NFS support
37 %bcond_without imq # imq support
38 %bcond_without wrr # wrr support
39 %bcond_without ipv6 # ipv6 support
41 %bcond_without vserver # support for VServer (enabled by default)
42 %bcond_without tuxonice # support for tuxonice (ex-suspend2) (enabled by default)
44 %bcond_with vs22 # use vserver 2.2 instead of 2.3 (see comment near patch 102)
46 %bcond_with rescuecd # build kernel for our rescue
48 %{?debug:%define with_verbose 1}
50 %if %{without grsecurity}
51 %undefine with_grsec_full
52 %undefine with_grsec_minimal
54 %undefine with_pax_full
58 %undefine with_grsec_minimal
59 %define with_grsec_full 1
60 %define with_grsecurity 1
64 %if %{with grsec_full}
65 %undefine with_grsec_minimal
66 %define with_grsecurity 1
68 %define with_pax_full 1
72 %if %{with grsec_minimal}
73 %undefine with_grsec_full
74 %undefine with_pax_full
75 %define with_grsecurity 1
83 %undefine with_tuxonice
84 %undefine with_grsec_full
85 %undefine with_grsec_minimal
87 %undefine with_pax_full
88 %undefine with_vserver
93 %ifarch %{ix86} alpha ppc
100 %undefine with_pcmcia
105 %define _basever 2.6.25
107 %define _prepatch %{nil}
108 %define _pre_rc %{nil}
112 %define _enable_debug_packages 0
114 %define squashfs_version 3.3
115 %define tuxonice_version 3.0-rc7
116 %define netfilter_snap 20070806
117 %define xen_version 3.0.2
119 %define _alt_kernel %{?with_pax:-pax}%{?with_grsec_full:-grsecurity}%{?with_xen0:-xen0}%{?with_xenU:-xenU}%{?with_rescuecd:-rescuecd}%{?with_pae:-pae}
121 # kernel release (used in filesystem and eventually in uname -r)
122 # modules will be looked from /lib/modules/%{kernel_release}
123 # _localversion is just that without version for "> localversion"
124 %define _localversion %{KABI}
125 %define kernel_release %{version}%{?_alt_kernel:%{_alt_kernel}}-%{_localversion}
127 # Our Kernel ABI, increase this when you want the out of source modules being rebuilt
128 # Usually same as %{_rel}
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}
138 %if "%{_prepatch}" == "%{nil}"
139 Version: %{_basever}%{_postver}
142 Version: %{_prepatch}
143 Release: 0.%{_pre_rc}.%{_rel}
149 #Source0: ftp://ftp.kernel.org/pub/linux/kernel/v2.6/testing/linux-%{version}%{_rc}.tar.bz2
150 Source0: http://www.kernel.org/pub/linux/kernel/v2.6/linux-%{_basever}%{_rc}.tar.bz2
151 # Source0-md5: db95a49a656a3247d4995a797d333153
152 %if "%{_prepatch}" != "%{nil}"
153 Source90: http://www.kernel.org/pub/linux/kernel/v2.6/testing/patch-%{_prepatch}-%{_pre_rc}.bz2
154 # Source90-md5: b78873f8a3aff5bdc719fc7fb4c66a9b
156 %if "%{_postver}" != "%{nil}"
157 Source1: http://www.kernel.org/pub/linux/kernel/v2.6/patch-%{version}.bz2
158 # Source1-md5: f12f43dd78b765f3d1402aa9d2170cf5
161 Source3: kernel-autoconf.h
162 Source4: kernel-config.h
163 Source5: kernel-ppclibs.Makefile
164 Source6: kernel-config.py
165 Source7: kernel-module-build.pl
167 Source19: kernel-multiarch.config
168 Source20: kernel-i386.config
169 Source21: kernel-x86_64.config
170 Source22: kernel-sparc.config
171 Source23: kernel-sparc64.config
172 Source24: kernel-alpha.config
173 Source25: kernel-ppc.config
174 Source26: kernel-ia64.config
175 Source27: kernel-ppc64.config
177 Source40: kernel-netfilter.config
178 Source41: kernel-squashfs.config
179 Source42: kernel-tuxonice.config
180 Source43: kernel-vserver.config
181 Source45: kernel-grsec.config
182 Source46: kernel-xen0.config
183 Source47: kernel-xenU.config
185 Source49: kernel-pax.config
186 Source50: kernel-no-pax.config
187 Source51: kernel-grsec_minimal.config
188 Source55: kernel-imq.config
189 Source56: kernel-reiser4.config
190 Source57: kernel-wrr.config
192 Source58: kernel-inittmpfs.config
193 Source59: kernel-bzip2-lzma.config
198 # tahoe9XX http://tahoe.pl/drivers/tahoe9xx-2.6.11.5.patch
199 Patch2: tahoe9xx-2.6.11.5.patch
201 # ftp://ftp.openbios.org/pub/bootsplash/kernel/bootsplash-3.1.6-2.6.21.diff.gz
202 Patch3: linux-2.6-bootsplash.patch
203 # http://dev.gentoo.org/~spock/projects/fbcondecor/archive/fbcondecor-0.9.4-2.6.25-rc6.patch
204 Patch4: kernel-fbcondecor.patch
206 # based on http://mesh.dl.sourceforge.net/sourceforge/squashfs/squashfs3.3.tgz
207 # squashfs3.3/kernel-patches/linux-2.6.24/squashfs3.3-patch
208 Patch6: kernel-squashfs.patch
209 Patch8: linux-fbcon-margins.patch
210 Patch9: linux-static-dev.patch
212 # netfilter related stuff mostly based on patch-o-matic-ng
213 # snapshot 20061213 with some fixes related to changes in
214 # netfilter api in 2.6.19 up to 2.6.22. Some modules
215 # were ported to nf_conntrack. Some of these are unique.
217 Patch10: kernel-pom-ng-IPV4OPTSSTRIP.patch
218 Patch11: kernel-pom-ng-ipv4options.patch
219 Patch12: kernel-pom-ng-set.patch
220 Patch14: kernel-pom-ng-ROUTE.patch
221 Patch16: kernel-pom-ng-mms-conntrack-nat.patch
222 Patch22: kernel-pom-ng-rsh.patch
223 Patch23: kernel-pom-ng-rpc.patch
225 # based on http://mike.it-loops.com/rtsp/rtsp-2.6.24.patch
226 Patch36: kernel-nf_rtsp.patch
228 # http://ftp.linux-vserver.org/pub/people/dhozac/p/k/delta-owner-xid-feat02.diff
229 Patch37: kernel-owner-xid.patch
231 # based on http://www.svn.barbara.eu.org/ipt_account/attachment/wiki/Software/ipt_account-0.1.21-20070804164729.tar.gz?format=raw
232 Patch38: kernel-ipt_account.patch
234 # based on http://www.intra2net.com/de/produkte/opensource/ipt_account/pom-ng-ipt_ACCOUNT-1.12.tgz
235 Patch39: kernel-ipt_ACCOUNT.patch
237 # kernel-2.6.25-layer7-2.18.patch from
238 # http://switch.dl.sourceforge.net/sourceforge/l7-filter/netfilter-layer7-v2.18.tar.gz
239 Patch40: kernel-layer7.patch
241 # http://www.ssi.bg/~ja/nfct/ipvs-nfct-2.6.25-1.diff
242 Patch41: kernel-ipvs-nfct.patch
244 # based on http://www.balabit.com/downloads/files/tproxy/tproxy-kernel-2.6.25-20080509-164605-1210344365.tar.bz2
245 Patch42: kernel-tproxy.patch
249 # http://zph.bratcheda.org/linux-2.6.25-zph.patch
250 Patch49: kernel-zph.patch
252 # based on http://www.linuximq.net/patchs/linux-2.6.24-imq.diff
253 # some people report problems when using imq with wrr.
254 # try unoficial version: http://kapturkiewicz.name/linux-2.6.25-imq1.diff
255 Patch50: kernel-imq.patch
257 # previously based on ftp://ftp.namesys.com/pub/reiser4-for-2.6/2.6.22/reiser4-for-2.6.22-2.patch.gz
258 # now based on http://www.kernel.org/pub/linux/kernel/people/edward/reiser4/reiser4-for-2.6/reiser4-for-2.6.25.patch.bz2
259 Patch51: kernel-reiser4.patch
261 # http://www.zz9.dk/patches/wrr-linux-071203-2.6.25.patch.gz
262 Patch52: kernel-wrr.patch
264 # http://fatooh.org/esfq-2.6/sfq-2.6.24.1.tar.bz2
265 Patch53: esfq-kernel.patch
267 # http://memebeam.org/free-software/toshiba_acpi/toshiba_acpi-dev_toshiba_test5-linux_2.6.21.patch
268 Patch54: linux-2.6-toshiba_acpi.patch
269 # by Baggins request:
270 # derived from ftp://ftp.cmf.nrl.navy.mil/pub/chas/linux-atm/vbr/vbr-kernel-diffs
271 Patch55: linux-2.6-atm-vbr.patch
272 Patch56: linux-2.6-atmdd.patch
274 # http://www.ntop.org/PF_RING.html 20070610
275 Patch58: linux-PF_RING.patch
277 # http://synce.svn.sourceforge.net/svnroot/synce/trunk/patches/linux-2.6.22-rndis_host-wm5.patch
278 Patch59: kernel-rndis_host-wm5.patch
280 # Project suspend2 renamed to tuxonice
281 # http://tuxonice.org/downloads/all/tuxonice-3.0-rc7-for-2.6.25.patch.bz2
282 Patch69: linux-2.6-suspend2.patch
283 Patch70: kernel-suspend2-headers.patch
284 Patch71: linux-2.6-suspend2-page.patch
285 Patch72: kernel-2.6-ueagle-atm-freezer.patch
287 # adds some ids for hostap suported cards and monitor_enable from/for aircrack-ng
288 # http://patches.aircrack-ng.org/hostap-kernel-2.6.18.patch
289 Patch85: hostap-kernel-2.6.18.patch
291 # http://vserver.13thfloor.at/Experimental/patch-2.6.25.4-vs2.3.0.34.10.diff
292 Patch100: linux-2.6-vs2.3.patch
293 Patch101: kernel-vserver-fixes.patch
294 # based on http://vserver.13thfloor.at/Experimental/patch-2.6.24-rc7-vs2.2.0.5.0.7-pre.diff
295 Patch102: linux-2.6-vs2.2.patch
296 # note about vserver 2.2 vs 2.3: 2.2 is "stable", 2.3 is "development", currently (2007-09-03)
297 # the preferred 2.3 vserver needs CONFIG_IPV6=y config, which break things for some users;
298 # it was proposed to use 2.2 as a temp replacement. One could use vs 2.2 instead of 2.3
299 # by using vs22 bcond - this bcond also changes IPV6 option from "y" to "m".
301 # from http://www.cl.cam.ac.uk/Research/SRG/netos/xen/downloads/xen-3.0.2-src.tgz
302 #Patch120: xen-3.0-2.6.16.patch
304 # Wake-On-Lan fix for nForce drivers; using http://atlas.et.tudelft.nl/verwei90/nforce2/wol.html
305 # Fix verified for that kernel version.
306 Patch130: linux-2.6-forcedeth-WON.patch
308 # http://download.filesystems.org/unionfs/unionfs-2.x/unionfs-2.2.4_for_2.6.25-rc2.diff.gz
309 Patch140: kernel-unionfs.patch
310 Patch141: kernel-unionfs-vserver.patch
312 # aic94xx patch based on http://georgi.unixsol.org/programs/aic94xx_with_included_firmware_2.6.21.diff
313 Patch160: linux-2.6-aic94xx_with_included_firmware.patch
315 Patch200: linux-2.6-ppc-ICE-hacks.patch
317 # The following patch extend the routing functionality in Linux
318 # to support static routes (defined by user), new way to use the
319 # alternative routes, the reverse path protection (rp_filter),
320 # the NAT processing to use correctly the routing when multiple
322 # http://www.ssi.bg/~ja/routes-2.6.25-15.diff
323 # We need to disable CONFIG_IP_ROUTE_MULTIPATH_CACHED
324 Patch300: kernel-routes.patch
326 Patch1000: linux-2.6-grsec-minimal.patch
328 Patch2000: kernel-small_fixes.patch
329 Patch2001: linux-2.6.21.1-pwc-uncompress.patch
331 # kill some thousands of warnings
332 # (only warnings, so just remove parts of this patch if conflics)
333 Patch2500: linux-2.6-warnings.patch
335 Patch5000: apparmor-2.6.20.3-v405-fullseries.diff
336 Patch5001: linux-2.6-apparmor-caps.patch
339 # based on http://ftp.leg.uct.ac.za/pub/linux/rip/inittmpfs-2.6.14.diff.gz
340 Patch7000: kernel-inittmpfs.patch
341 # based on http://www.udpcast.linux.lu/download/bzip2-lzma-kernel-2.6.23.12.patch.gz
342 Patch7001: kernel-bzip2-lzma.patch
345 Patch9997: pax_selinux_hooks-2.6.20.patch
347 # based on http://www.grsecurity.net/~paxguy1/pax-linux-2.6.24.6-test45.patch
348 Patch9998: kernel-pax.patch
350 # based on http://www.grsecurity.net/~spender/grsecurity-2.1.12-2.6.25.4-200805181334.patch
351 Patch9999: linux-2.6-grsec_full.patch
352 Patch10000: linux-2.6-grsec-caps.patch
353 Patch10001: linux-2.6-grsec-common.patch
354 Patch10002: kernel-grsec_fixes.patch
356 URL: http://www.kernel.org/
357 BuildRequires: binutils >= 3:2.14.90.0.7
358 %ifarch sparc sparc64
359 BuildRequires: elftoaout
361 BuildRequires: /sbin/depmod
362 BuildRequires: gcc >= 5:3.2
363 %{?with_rescuecd:BuildRequires: lzma >= 1:4.42.2}
364 # for hostname command
365 BuildRequires: net-tools
366 BuildRequires: perl-base
367 BuildRequires: python
368 BuildRequires: python-modules
369 BuildRequires: rpmbuild(macros) >= 1.217
371 Requires(post): coreutils
372 Requires(post): geninitrd >= 2.57
373 Requires(post): module-init-tools >= 0.9.9
374 Requires: /sbin/depmod
376 Requires: geninitrd >= 2.57
377 Requires: module-init-tools >= 0.9.9
378 Provides: %{name}(netfilter) = %{netfilter_snap}
379 %if %{with xen0} || %{with xenU}
380 Provides: kernel(xen) = %{_xen_version}
382 Obsoletes: kernel-misc-fuse
383 Obsoletes: kernel-modules
384 Obsoletes: kernel-net-hostap
385 Obsoletes: kernel-net-ieee80211
386 Obsoletes: kernel-net-ipp2p
387 Obsoletes: kernel-smp
388 Conflicts: e2fsprogs < 1.29
389 Conflicts: isdn4k-utils < 3.1pre1
390 Conflicts: jfsutils < 1.1.3
391 Conflicts: module-init-tools < 0.9.10
392 Conflicts: nfs-utils < 1.0.5
393 Conflicts: oprofile < 0.9
394 Conflicts: ppp < 1:2.4.0
395 Conflicts: procps < 3.2.0
396 Conflicts: quota-tools < 3.09
397 %if %{with reiserfs4}
398 Conflicts: reiser4progs < 1.0.0
400 Conflicts: reiserfsprogs < 3.6.3
401 Conflicts: udev < 1:071
402 Conflicts: util-linux < 2.10o
403 Conflicts: xfsprogs < 2.6.0
404 %if %{with xen0} || %{with xenU} || %{with pae}
405 ExclusiveArch: %{ix86}
407 ExcludeArch: i386 i486 i586
410 ExclusiveArch: %{ix86} %{x8664} alpha arm ia64 ppc ppc64 sparc sparc64
413 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
415 %ifarch %{ix86} %{x8664}
416 %define target_arch_dir x86
419 %define target_arch_dir powerpc
421 %ifnarch %{ix86} %{x8664} ppc ppc64
422 %define target_arch_dir %{_target_base_arch}
425 %define defconfig arch/%{target_arch_dir}/defconfig
427 # No ELF objects there to strip (skips processing 27k files)
428 %define _noautostrip .*%{_kernelsrcdir}/.*
429 %define _noautochrpath .*%{_kernelsrcdir}/.*
432 %define initrd_dir /boot/efi
434 %define initrd_dir /boot
437 %define _kernelsrcdir /usr/src/linux%{_alt_kernel}-%{version}
439 %if "%{_target_base_arch}" != "%{_arch}"
440 %define CrossOpts ARCH=%{_target_base_arch} CROSS_COMPILE=%{_target_cpu}-pld-linux-
441 %define DepMod /bin/true
443 %if "%{_arch}" == "sparc" && "%{_target_base_arch}" == "sparc64"
444 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
445 %define DepMod /sbin/depmod
448 %if "%{_arch}" == "sparc64" && "%{_target_base_arch}" == "sparc"
449 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
450 %define DepMod /sbin/depmod
453 %if "%{_arch}" == "x86_64" && "%{_target_base_arch}" == "i386"
454 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
455 %define DepMod /sbin/depmod
459 %define CrossOpts ARCH=powerpc CROSS_COMPILE=%{_target_cpu}-pld-linux-
463 %define CrossOpts ARCH=powerpc CC="%{__cc}"
465 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
467 %define DepMod /sbin/depmod
470 %define __features Netfilter module dated: %{netfilter_snap}\
471 %{?with_grsec_full:Grsecurity full support - enabled}\
472 %{?with_pax:PaX support - enabled}\
473 %{?with_xen0:Xen 0 - enabled}\
474 %{?with_xenU:Xen U - enabled}\
475 %{?with_fbcondecor:Fbsplash/fbcondecor - enabled }\
476 %{?with_nfsroot:Root on NFS - enabled}
478 %define Features %(echo "%{__features}" | sed '/^$/d')
481 This package contains the Linux kernel that is used to boot and run
482 your system. It contains few device drivers for specific hardware.
483 Most hardware is instead supported by modules loaded after booting.
487 %description -l de.UTF-8
488 Das Kernel-Paket enthält den Linux-Kernel (vmlinuz), den Kern des
489 Linux-Betriebssystems. Der Kernel ist für grundliegende
490 Systemfunktionen verantwortlich: Speicherreservierung,
491 Prozeß-Management, Geräte Ein- und Ausgaben, usw.
495 %description -l fr.UTF-8
496 Le package kernel contient le kernel linux (vmlinuz), la partie
497 centrale d'un système d'exploitation Linux. Le noyau traite les
498 fonctions basiques d'un système d'exploitation: allocation mémoire,
499 allocation de process, entrée/sortie de peripheriques, etc.
503 %description -l pl.UTF-8
504 Pakiet zawiera jądro Linuksa niezbędne do prawidłowego działania
505 Twojego komputera. Zawiera w sobie sterowniki do sprzętu znajdującego
506 się w komputerze, takiego jak sterowniki dysków itp.
511 Summary: vmlinux - uncompressed kernel image
512 Summary(de.UTF-8): vmlinux - dekompressiertes Kernel Bild
513 Summary(pl.UTF-8): vmlinux - rozpakowany obraz jÄ…dra
515 Obsoletes: kernel-smp-vmlinux
518 vmlinux - uncompressed kernel image.
520 %description vmlinux -l de.UTF-8
521 vmlinux - dekompressiertes Kernel Bild.
523 %description vmlinux -l pl.UTF-8
524 vmlinux - rozpakowany obraz jÄ…dra.
527 Summary: DRM kernel modules
528 Summary(de.UTF-8): DRM Kernel Treiber
529 Summary(pl.UTF-8): Sterowniki DRM
531 Requires(postun): %{name} = %{epoch}:%{version}-%{release}
532 Requires: %{name} = %{epoch}:%{version}-%{release}
533 Obsoletes: kernel-smp-drm
539 %description drm -l de.UTF-8
542 %description drm -l pl.UTF-8
546 Summary: PCMCIA modules
547 Summary(de.UTF-8): PCMCIA Module
548 Summary(pl.UTF-8): Moduły PCMCIA
550 Requires(postun): %{name} = %{epoch}:%{version}-%{release}
551 Requires: %{name} = %{epoch}:%{version}-%{release}
552 Obsoletes: kernel-smp-pcmcia
553 Conflicts: pcmcia-cs < 3.1.21
554 Conflicts: pcmciautils < 004
560 %description pcmcia -l de.UTF-8
563 %description pcmcia -l pl.UTF-8
567 Summary: Libraries for preparing bootable kernel on PowerPCs
568 Summary(pl.UTF-8): Biblioteki do przygotowania bootowalnego jÄ…dra dla PowerPC
570 Requires: %{name} = %{epoch}:%{version}-%{release}
571 Requires: mkvmlinuz >= 1.3
572 Obsoletes: kernel-smp-libs
576 Libraries for preparing bootable kernel on PowerPCs. Script called
577 mkvmlinuz may be useful for this.
579 %description libs -l pl.UTF-8
580 Biblioteki do przygotowania bootowalnego jÄ…dra dla PowerPC. Skrypt
581 mkvmlinuz może być do tego przydatny.
584 Summary: ALSA kernel modules
585 Summary(de.UTF-8): ALSA Kernel Module
586 Summary(pl.UTF-8): Sterowniki dźwięku ALSA
588 Requires(postun): %{name} = %{epoch}:%{version}-%{release}
589 Requires: %{name} = %{epoch}:%{version}-%{release}
590 Obsoletes: kernel-smp-sound-alsa
593 %description sound-alsa
594 ALSA (Advanced Linux Sound Architecture) sound drivers.
596 %description sound-alsa -l de.UTF-8
597 ALSA (Advanced Linux Sound Architecture) Sound-Treiber.
599 %description sound-alsa -l pl.UTF-8
600 Sterowniki dźwięku ALSA (Advanced Linux Sound Architecture).
603 Summary: OSS kernel modules
604 Summary(de.UTF-8): OSS Kernel Module
605 Summary(pl.UTF-8): Sterowniki dźwięku OSS
607 Requires(postun): %{name} = %{epoch}:%{version}-%{release}
608 Requires: %{name} = %{epoch}:%{version}-%{release}
609 Obsoletes: kernel-smp-sound-oss
612 %description sound-oss
613 OSS (Open Sound System) drivers.
615 %description sound-oss -l de.UTF-8
616 OSS (Open Sound System) Treiber.
618 %description sound-oss -l pl.UTF-8
619 Sterowniki dźwięku OSS (Open Sound System).
622 Summary: Header files for the Linux kernel
623 Summary(de.UTF-8): Header Dateien für den Linux-Kernel
624 Summary(pl.UTF-8): Pliki nagłówkowe jądra Linuksa
625 Group: Development/Building
626 Provides: %{name}-headers(netfilter) = %{netfilter_snap}
630 These are the C header files for the Linux kernel, which define
631 structures and constants that are needed when rebuilding the kernel or
632 building kernel modules.
634 %description headers -l de.UTF-8
635 Dies sind die C Header Dateien für den Linux-Kernel, die definierte
636 Strukturen und Konstante beinhalten, die beim rekompilieren des
637 Kernels oder bei Kernel Modul kompilationen gebraucht werden.
639 %description headers -l pl.UTF-8
640 Pakiet zawiera pliki nagłówkowe jądra, niezbędne do rekompilacji jądra
641 oraz budowania modułów jądra.
643 %package module-build
644 Summary: Development files for building kernel modules
645 Summary(de.UTF-8): Development Dateien die beim Kernel Modul kompilationen gebraucht werden
646 Summary(pl.UTF-8): Pliki służące do budowania modułów jądra
647 Group: Development/Building
648 Requires: %{name}-headers = %{epoch}:%{version}-%{release}
649 Conflicts: rpmbuild(macros) < 1.321
652 %description module-build
653 Development files from kernel source tree needed to build Linux kernel
654 modules from external packages.
656 %description module-build -l de.UTF-8
657 Development Dateien des Linux-Kernels die beim kompilieren externer
658 Kernel Module gebraucht werden.
660 %description module-build -l pl.UTF-8
661 Pliki ze drzewa źródeł jądra potrzebne do budowania modułów jądra
662 Linuksa z zewnętrznych pakietów.
665 Summary: Kernel source tree
666 Summary(de.UTF-8): Der Kernel Quelltext
667 Summary(pl.UTF-8): Kod źródłowy jądra Linuksa
668 Group: Development/Building
669 Requires: %{name}-module-build = %{epoch}:%{version}-%{release}
673 This is the source code for the Linux kernel. You can build a custom
674 kernel that is better tuned to your particular hardware.
676 %description source -l de.UTF-8
677 Das Kernel-Source-Paket enthält den source code (C/Assembler-Code) des
678 Linux-Kernels. Die Source-Dateien werden gebraucht, um viele
679 C-Programme zu kompilieren, da sie auf Konstanten zurückgreifen, die
680 im Kernel-Source definiert sind. Die Source-Dateien können auch
681 benutzt werden, um einen Kernel zu kompilieren, der besser auf Ihre
682 Hardware ausgerichtet ist.
684 %description source -l fr.UTF-8
685 Le package pour le kernel-source contient le code source pour le noyau
686 linux. Ces sources sont nécessaires pour compiler la plupart des
687 programmes C, car il dépend de constantes définies dans le code
688 source. Les sources peuvent être aussi utilisée pour compiler un noyau
689 personnalisé pour avoir de meilleures performances sur des matériels
692 %description source -l pl.UTF-8
693 Pakiet zawiera kod źródłowy jądra systemu.
696 Summary: Kernel documentation
697 Summary(de.UTF-8): Kernel Dokumentation
698 Summary(pl.UTF-8): Dokumentacja do jÄ…dra Linuksa
703 This is the documentation for the Linux kernel, as found in
704 /usr/src/linux/Documentation directory.
706 %description doc -l de.UTF-8
707 Dies ist die Kernel Dokumentation wie sie im 'Documentation'
708 Verzeichniss vorgefunden werden kann.
710 %description doc -l pl.UTF-8
711 Pakiet zawiera dokumentacjÄ™ do jÄ…dra Linuksa pochodzÄ…cÄ… z katalogu
712 /usr/src/linux/Documentation.
715 %setup -q -n linux-%{_basever}%{_rc}
717 # hack against warning in pax/grsec
719 sed -i 's/-Werror//' arch/alpha/kernel/Makefile
723 install %{SOURCE5} Makefile.ppclibs
726 # sources 1 and 90 should be mutually exclusive btw.
728 %if "%{_prepatch}" != "%{nil}"
729 %{__bzip2} -dc %{SOURCE90} | patch -p1 -s
732 %if "%{_postver}" != "%{nil}"
733 %{__bzip2} -dc %{SOURCE1} | patch -p1 -s
736 install -m 755 %{SOURCE6} .
740 ##ifarch %{ix86} %{x8664} ia64 ppc alpha
744 # kernel-2.6-ueagle-atm-freezer.patch
753 %if !%{with fbcondecor}
767 # kernel-pom-ng-IPV4OPTSSTRIP.patch
770 # kernel-pom-ng-ipv4options.patch
773 # kernel-pom-ng-set.patch
776 # kernel-pom-ng-ROUTE.patch
779 # kernel-pom-ng-mms-conntrack-nat.patch
782 # kernel-pom-ng-rsh.patch
785 # kernel-pom-ng-rpc.patch
788 # kernel-nf_rtsp.patch
791 # kernel-owner-xid.patch
796 # kernel-ipt_account.patch
799 # kernel-ipt_ACCOUNT.patch
802 # kernel-layer7.patch
838 # kernel-rndis_host-wm5.patch
841 # hostap enhancements from/for aircrack-ng
854 #%if %{with xen0} || %{with xenU}
855 #%ifarch %{ix86} %{x8664} ia64
861 %if %{without rescuecd}
870 %{?with_vserver:%patch141 -p1}
872 # aic94xx linux-2.6-aic94xx_with_included_firmware.patch
877 # FIXME !!! 2.6.24 (no modular security? crap)
887 # grsecurity & pax stuff
891 %{?with_vserver:%patch10000 -p1}
892 %{?with_vserver:%patch10001 -p1}
893 #{?with_vserver:%patch10002 -p1}
896 %if %{with grsec_full}
898 %{?with_vserver:%patch10000 -p1}
899 %{?with_vserver:%patch10001 -p1}
900 #{?with_vserver:%patch10002 -p1}
902 %if %{with grsec_minimal}
904 # remember that we have the same config file for grsec_minimal and
905 # grsec_full, but the patches are different.
910 # now we have an separate testing pax-only patch - in the future we
911 # could have single grsecurity patch and will have to prepare separate
912 # configs for grsec_minimal, grsec_full and pax to support such
913 # configurations like pax & grsec_minimal.
914 # So, in a future there could be no patch9998, but only config
915 # would tell which options should be enabled.
916 # The second option is to maintain separate pax-only patch.
918 #patch9997 -p1 - needs update
924 # end of grsecurity & pax stuff
937 # Fix EXTRAVERSION in main Makefile
938 sed -i 's#EXTRAVERSION =.*#EXTRAVERSION = %{_postver}%{?_alt_kernel:%{_alt_kernel}}#g' Makefile
940 # on sparc this line causes CONFIG_INPUT=m (instead of =y), thus breaking build
941 sed -i -e '/select INPUT/d' net/bluetooth/hidp/Kconfig
943 # on sparc64 avoid building break due to NULL pointer type warrning
944 sed -i -e 's/^EXTRA_CFLAGS := -Werror/EXTRA_CFLAGS := /' arch/sparc64/kernel/Makefile
946 # cleanup backups after patching
947 find '(' -name '*~' -o -name '*.orig' -o -name '.gitignore' ')' -print0 | xargs -0 -r -l512 rm -f
950 TuneUpConfigForIX86 () {
954 [ "$2" = "yes" ] && pae=yes
959 sed -i 's:CONFIG_M386=y:# CONFIG_M386 is not set:' $1
962 sed -i 's:# CONFIG_M486 is not set:CONFIG_M486=y:' $1
965 sed -i 's:# CONFIG_M586 is not set:CONFIG_M586=y:' $1
968 sed -i 's:# CONFIG_M686 is not set:CONFIG_M686=y:' $1
971 sed -i 's:# CONFIG_MPENTIUMIII is not set:CONFIG_MPENTIUMIII=y:' $1
974 sed -i 's:# CONFIG_MPENTIUM4 is not set:CONFIG_MPENTIUM4=y:' $1
977 sed -i 's:# CONFIG_MK7 is not set:CONFIG_MK7=y:' $1
979 %ifarch i686 athlon pentium3 pentium4
980 if [ "$pae" = "yes" ]; then
981 sed -i "s:CONFIG_HIGHMEM4G=y:# CONFIG_HIGHMEM4G is not set:" $1
982 sed -i "s:# CONFIG_HIGHMEM64G is not set:CONFIG_HIGHMEM64G=y\nCONFIG_X86_PAE=y:" $1
984 sed -i 's:CONFIG_MATH_EMULATION=y:# CONFIG_MATH_EMULATION is not set:' $1
993 sed -i 's:# CONFIG_PAX_SEGMEXEC is not set:CONFIG_PAX_SEGMEXEC=y:' $1
994 # performance impact on CPUs without NX bit
995 sed -i 's:CONFIG_PAX_PAGEEXEC=y:# CONFIG_PAX_PAGEEXEC is not set:' $1
998 # sed -i 's:CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM=y:# CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM is not set:' $1
999 # sed -i 's:CONFIG_PCI_BIOS=y:# CONFIG_PCI_BIOS is not set:' $1
1000 # sed -i 's:CONFIG_EFI=y:# CONFIG_EFI is not set:' $1
1004 sed -i 's:CONFIG_PAX_NOELFRELOCS=y:# CONFIG_PAX_NOELFRELOCS is not set:' $1
1007 sed -i 's:# CONFIG_PAX_EMUTRAMP is not set:CONFIG_PAX_EMUTRAMP=y:' $1
1008 sed -i 's:# CONFIG_PAX_EMUSIGRT is not set:CONFIG_PAX_EMUSIGRT=y:' $1
1009 sed -i 's:# CONFIG_PAX_EMUPLT is not set:CONFIG_PAX_EMUPLT=y:' $1
1012 %ifarch sparc sparc64 alpha
1013 sed -i 's:# CONFIG_PAX_EMUPLT is not set:CONFIG_PAX_EMUPLT=y:' $1
1016 # Now we have to check MAC system integration. Grsecurity (full) uses PAX_HAVE_ACL_FLAGS
1017 # setting (direct acces). grsec_minimal probably have no idea about PaX so we probably
1018 # could use PAX_NO_ACL_FLAGS, but for testing the hooks setting will be used
1019 # PAX_HOOK_ACL_FLAGS. SELinux should also be able to make PaX settings via hooks
1021 %if %{with grsec_full}
1022 # Hardening grsec options if with pax
1023 sed -i "s:# CONFIG_GRKERNSEC_PROC_MEMMAP is not set:CONFIG_GRKERNSEC_PROC_MEMMAP=y:" $1
1024 # almost rational (see HIDESYM help)
1025 sed -i "s:# CONFIG_GRKERNSEC_HIDESYM is not set:CONFIG_GRKERNSEC_HIDESYM=y:" $1
1027 # no change needed CONFIG=PAX_HAVE_ACL_FLAGS=y is taken from the kernel-pax.config
1029 # selinux or other hooks?
1030 sed -i 's:CONFIG_PAX_HAVE_ACL_FLAGS=y:# CONFIG_PAX_HAVE_ACL_FLAGS is not set:' $1
1031 sed -i 's:# CONFIG_PAX_HOOK_ACL_FLAGS is not set:CONFIG_PAX_HOOK_ACL_FLAGS=y:' $1
1039 cat %{SOURCE58} >> $1
1040 cat %{SOURCE59} >> $1
1041 sed -i "s:CONFIG_SOUND=.:# CONFIG_SOUND is not set:" $1
1042 sed -i "s:CONFIG_AUDIT=.:# CONFIG_AUDIT is not set:" $1
1043 sed -i "s:CONFIG_TR=.:# CONFIG_TR is not set:" $1
1044 sed -i "s:CONFIG_BT=.:# CONFIG_BT is not set:" $1
1045 sed -i "s:CONFIG_VIDEO_DEV=.:# CONFIG_VIDEO_DEV is not set:" $1
1046 sed -i "s:CONFIG_DVB_CORE=.:# CONFIG_DVB_CORE is not set:" $1
1047 sed -i "s:CONFIG_HAMRADIO=.:# CONFIG_HAMRADIO is not set:" $1
1048 sed -i "s:CONFIG_ARCNET=.:# CONFIG_ARCNET is not set:" $1
1049 sed -i "s:CONFIG_FB=.:# CONFIG_FB is not set:" $1
1050 sed -i "s:CONFIG_DRM\(.*\)=.:# CONFIG_DRM\1 is not set:" $1
1051 sed -i "s:CONFIG_WATCHDOG=.:# CONFIG_WATCHDOG is not set:" $1
1052 sed -i "s:CONFIG_INPUT_JOYSTICK=.:# CONFIG_INPUT_JOYSTICK is not set:" $1
1053 sed -i "s:CONFIG_DEBUG_KERNEL=.:# CONFIG_DEBUG_KERNEL is not set:" $1
1054 sed -i "s:CONFIG_ISDN=.:# CONFIG_ISDN is not set:" $1
1055 sed -i "s:CONFIG_AGP\(.*\)=.:# CONFIG_AGP\1 is not set:" $1
1056 sed -i "s:CONFIG_SECURITY=.:# CONFIG_SECURITY is not set:" $1
1057 sed -i "s:CONFIG_PARIDE=.:# CONFIG_PARIDE is not set:" $1
1058 sed -i "s:CONFIG_CPU_FREQ=.:# CONFIG_CPU_FREQ is not set:" $1
1059 sed -i "s:CONFIG_GAMEPORT=.:# CONFIG_GAMEPORT is not set:" $1
1060 sed -i "s:CONFIG_KVM=.:# CONFIG_KVM is not set:" $1
1061 sed -i "s:CONFIG_PHONE=.:# CONFIG_PHONE is not set:" $1
1062 sed -i "s:CONFIG_BLK_DEV_LOOP=m:CONFIG_BLK_DEV_LOOP=y:" $1
1063 sed -i "s:CONFIG_ISO9660_FS=m:CONFIG_ISO9660_FS=y:" $1
1064 sed -i "s:CONFIG_NLS_UTF8=m:CONFIG_NLS_UTF8=y:" $1
1069 # is this a special kernel we want to build?
1070 Config="%{_target_base_arch}"
1071 KernelVer=%{kernel_release}
1072 echo "Building config file using $Config.conf..."
1073 cat $RPM_SOURCE_DIR/kernel-$Config.config > %{defconfig}
1074 ./kernel-config.py %{_target_base_arch} $RPM_SOURCE_DIR/kernel-multiarch.config \
1075 %{defconfig} %{defconfig}
1076 TuneUpConfigForIX86 %{defconfig}
1079 cat %{SOURCE40} >> %{defconfig}
1082 cat %{SOURCE41} >> %{defconfig}
1085 %if %{with tuxonice}
1086 %ifarch %{ix86} %{x8664} ia64 ppc ppc64
1087 cat %{SOURCE42} >> %{defconfig}
1090 sed -i "s:CONFIG_TOI=y:# CONFIG_TOI is not set:" %{defconfig}
1095 cat %{SOURCE43} >> %{defconfig}
1097 sed -i "s:CONFIG_IPV6=y:CONFIG_IPV6=m:" %{defconfig}
1102 sed -i "s:CONFIG_IPV6=.:# CONFIG_IPV6 is not set:" %{defconfig}
1105 # grsecurity & pax stuff
1108 %if %{with pax_full}
1109 cat %{SOURCE45} >> %{defconfig}
1110 cat %{SOURCE49} >> %{defconfig}
1111 PaXconfig %{defconfig}
1114 %if %{with grsec_full}
1115 cat %{SOURCE45} >> %{defconfig}
1116 cat %{SOURCE50} >> %{defconfig}
1118 %if %{with grsec_minimal}
1119 cat %{SOURCE51} >> %{defconfig}
1124 cat %{SOURCE49} >> %{defconfig}
1125 PaXconfig %{defconfig}
1130 # Temporary disabled RELOCATABLE. Needed only on x86??
1131 %if %{with pax} || %{with grsec_full}
1132 sed -i "s:CONFIG_RELOCATABLE=y:# CONFIG_RELOCATABLE is not set:" %{defconfig}
1136 # end of grsecurity & pax stuff
1139 cat %{SOURCE55} >> %{defconfig}
1143 cat %{SOURCE57} >> %{defconfig}
1147 cat %{SOURCE56} >> %{defconfig}
1151 cat %{SOURCE46} >> %{defconfig}
1155 cat %{SOURCE47} >> %{defconfig}
1158 %if %{with fbcondecor}
1159 echo "CONFIG_FB_CON_DECOR=y" >> %{defconfig}
1161 echo "CONFIG_BOOTSPLASH=y" >> %{defconfig}
1165 sed -i "s:CONFIG_NFS_FS=m:CONFIG_NFS_FS=y:" %{defconfig}
1166 echo "CONFIG_ROOT_NFS=y" >> %{defconfig}
1169 %if %{with rescuecd}
1170 RescueConfig %{defconfig}
1173 %{?debug:sed -i "s:# CONFIG_DEBUG_SLAB is not set:CONFIG_DEBUG_SLAB=y:" %{defconfig}}
1174 %{?debug:sed -i "s:# CONFIG_DEBUG_PREEMPT is not set:CONFIG_DEBUG_PREEMPT=y:" %{defconfig}}
1175 %{?debug:sed -i "s:# CONFIG_RT_DEADLOCK_DETECT is not set:CONFIG_RT_DEADLOCK_DETECT=y:" %{defconfig}}
1177 ln -sf %{defconfig} .config
1178 install -d $KERNEL_INSTALL_DIR%{_kernelsrcdir}/include/linux
1179 rm -f include/linux/autoconf.h
1180 %{__make} %CrossOpts include/linux/autoconf.h
1181 install include/linux/autoconf.h \
1182 $KERNEL_INSTALL_DIR%{_kernelsrcdir}/include/linux/autoconf-dist.h
1184 $KERNEL_INSTALL_DIR%{_kernelsrcdir}/config-dist
1189 echo "Building kernel $1 ..."
1190 %{__make} %CrossOpts mrproper \
1191 RCS_FIND_IGNORE='-name build-done -prune -o'
1192 ln -sf %{defconfig} .config
1194 %{__make} %CrossOpts clean \
1195 RCS_FIND_IGNORE='-name build-done -prune -o'
1196 %{__make} %CrossOpts include/linux/version.h \
1197 %{?with_verbose:V=1}
1199 %{__make} %CrossOpts scripts/mkcompile_h \
1200 %{?with_verbose:V=1}
1202 # make does vmlinux, modules and bzImage at once
1204 %{__make} %CrossOpts image \
1205 %{?with_verbose:V=1}
1207 %{__make} %CrossOpts modules \
1208 %{?with_verbose:V=1}
1210 %{__make} %CrossOpts \
1211 %{?with_verbose:V=1}
1215 PreInstallKernel() {
1216 Config="%{_target_base_arch}"
1217 KernelVer=%{kernel_release}
1219 mkdir -p $KERNEL_INSTALL_DIR/boot
1220 install System.map $KERNEL_INSTALL_DIR/boot/System.map-$KernelVer
1221 %ifarch %{ix86} %{x8664}
1222 install arch/x86/boot/bzImage $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
1223 install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinux-$KernelVer
1225 %ifarch alpha sparc sparc64
1226 gzip -cfv vmlinux > vmlinuz
1227 install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinux-$KernelVer
1228 install vmlinuz $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
1230 elftoaout arch/sparc/boot/image -o vmlinux.aout
1231 install vmlinux.aout $KERNEL_INSTALL_DIR/boot/vmlinux.aout-$KernelVer
1234 elftoaout arch/sparc64/boot/image -o vmlinux.aout
1235 install vmlinux.aout $KERNEL_INSTALL_DIR/boot/vmlinux.aout-$KernelVer
1239 install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinux-$KernelVer
1240 install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
1243 %{__make} -f Makefile.ppclibs install \
1244 DESTDIR=$KERNEL_INSTALL_DIR/boot/libs-$KernelVer
1247 gzip -cfv vmlinux > vmlinuz
1248 install -d $KERNEL_INSTALL_DIR/boot/efi
1249 install vmlinuz $KERNEL_INSTALL_DIR/boot/efi/vmlinuz-$KernelVer
1250 ln -sf efi/vmlinuz-$KernelVer $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
1252 %{__make} %CrossOpts modules_install \
1253 %{?with_verbose:V=1} \
1255 INSTALL_MOD_PATH=$KERNEL_INSTALL_DIR \
1256 KERNELRELEASE=$KernelVer
1258 # You'd probabelly want to make it somewhat different
1259 install -d $KERNEL_INSTALL_DIR%{_kernelsrcdir}
1260 install Module.symvers $KERNEL_INSTALL_DIR%{_kernelsrcdir}/Module.symvers-dist
1262 echo "CHECKING DEPENDENCIES FOR KERNEL MODULES"
1263 if [ %DepMod = /sbin/depmod ]; then
1264 /sbin/depmod --basedir $KERNEL_INSTALL_DIR -ae -F $KERNEL_INSTALL_DIR/boot/System.map-$KernelVer -r $KernelVer || :
1266 touch $KERNEL_INSTALL_DIR/lib/modules/$KernelVer/modules.dep
1267 echo "KERNEL RELEASE $KernelVer DONE"
1270 KERNEL_BUILD_DIR=`pwd`
1271 echo "-%{_localversion}" > localversion
1273 KERNEL_INSTALL_DIR="$KERNEL_BUILD_DIR/build-done/kernel"
1274 rm -rf $KERNEL_INSTALL_DIR
1279 %{__make} %CrossOpts include/linux/utsrelease.h
1280 cp include/linux/utsrelease.h{,.save}
1281 cp include/linux/version.h{,.save}
1282 cp scripts/mkcompile_h{,.save}
1285 rm -rf $RPM_BUILD_ROOT
1288 export DEPMOD=%DepMod
1290 install -d $RPM_BUILD_ROOT%{_kernelsrcdir}
1291 install -d $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/%{kernel_release}
1293 # test if we can hardlink -- %{_builddir} and $RPM_BUILD_ROOT on same partition
1294 if cp -al COPYING $RPM_BUILD_ROOT/COPYING 2>/dev/null; then
1296 rm -f $RPM_BUILD_ROOT/COPYING
1299 KERNEL_BUILD_DIR=`pwd`
1301 cp -a$l $KERNEL_BUILD_DIR/build-done/kernel/* $RPM_BUILD_ROOT
1303 if [ -e $RPM_BUILD_ROOT/lib/modules/%{kernel_release} ] ; then
1304 rm -f $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/build
1305 ln -sf %{_kernelsrcdir} $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/build
1306 install -d $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/{cluster,misc}
1309 find . -maxdepth 1 ! -name "build-done" ! -name "." -exec cp -a$l "{}" "$RPM_BUILD_ROOT%{_kernelsrcdir}/" ";"
1311 cd $RPM_BUILD_ROOT%{_kernelsrcdir}
1313 %{__make} %CrossOpts mrproper archclean \
1314 RCS_FIND_IGNORE='-name build-done -prune -o'
1316 if [ -e $KERNEL_BUILD_DIR/build-done/kernel%{_kernelsrcdir}/include/linux/autoconf-dist.h ]; then
1317 install $KERNEL_BUILD_DIR/build-done/kernel%{_kernelsrcdir}/include/linux/autoconf-dist.h \
1318 $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux
1319 install $KERNEL_BUILD_DIR/build-done/kernel%{_kernelsrcdir}/config-dist \
1320 $RPM_BUILD_ROOT%{_kernelsrcdir}
1323 cp -Rdp$l $KERNEL_BUILD_DIR/include/linux/* \
1324 $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux
1326 %{__make} %CrossOpts mrproper
1327 mv -f include/linux/utsrelease.h.save $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux/utsrelease.h
1328 cp include/linux/version.h{.save,}
1329 cp scripts/mkcompile_h{.save,}
1330 rm -rf include/linux/version.h.save
1331 rm -rf scripts/mkcompile_h.save
1332 install %{SOURCE3} $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux/autoconf.h
1333 install %{SOURCE4} $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux/config.h
1335 # collect module-build files and directories
1336 perl %{SOURCE7} %{_kernelsrcdir} $KERNEL_BUILD_DIR
1339 touch $RPM_BUILD_ROOT%{initrd_dir}/initrd-%{kernel_release}.gz
1341 # rpm obeys filelinkto checks for ghosted symlinks, convert to files
1342 rm -f $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/{build,source}
1343 touch $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/{build,source}
1345 # remove unnecessary dir with dead symlink
1346 rm -rf $RPM_BUILD_ROOT/arch/i386
1349 rm -rf $RPM_BUILD_ROOT
1352 if [ -x /sbin/new-kernel-pkg ]; then
1353 /sbin/new-kernel-pkg --remove %{kernel_release}
1358 mv -f /boot/efi/vmlinuz{,.old} 2> /dev/null
1359 %{?_alt_kernel:mv -f /boot/efi/vmlinuz%{_alt_kernel}{,.old} 2> /dev/null}
1360 ln -sf vmlinuz-%{kernel_release} /boot/efi/vmlinuz
1361 %{?_alt_kernel:ln -sf vmlinuz-%{kernel_release} /boot/efi/vmlinuz%{_alt_kernel}}
1363 mv -f /boot/vmlinuz{,.old} 2> /dev/null
1364 %{?_alt_kernel:mv -f /boot/vmlinuz%{_alt_kernel}{,.old} 2> /dev/null}
1365 mv -f /boot/System.map{,.old} 2> /dev/null
1366 %{?_alt_kernel:mv -f /boot/System%{_alt_kernel}.map{,.old} 2> /dev/null}
1367 ln -sf vmlinuz-%{kernel_release} /boot/vmlinuz
1368 %{?_alt_kernel:ln -sf vmlinuz-%{kernel_release} /boot/vmlinuz%{_alt_kernel}}
1369 ln -sf System.map-%{kernel_release} /boot/System.map
1370 %{?_alt_kernel:ln -sf System.map-%{kernel_release} /boot/System.map%{_alt_kernel}}
1372 %depmod %{kernel_release}
1374 /sbin/geninitrd -f --initrdfs=rom %{initrd_dir}/initrd-%{kernel_release}.gz %{kernel_release}
1375 mv -f %{initrd_dir}/initrd{,.old} 2> /dev/null
1376 %{?_alt_kernel:mv -f %{initrd_dir}/initrd%{_alt_kernel}{,.old} 2> /dev/null}
1377 ln -sf initrd-%{kernel_release}.gz %{initrd_dir}/initrd
1378 %{?_alt_kernel:ln -sf initrd-%{kernel_release}.gz %{initrd_dir}/initrd%{_alt_kernel}}
1380 if [ -x /sbin/new-kernel-pkg ]; then
1381 if [ -f /etc/pld-release ]; then
1382 title=$(sed 's/^[0-9.]\+ //' < /etc/pld-release)
1387 ext='%{_alt_kernel}'
1392 /sbin/new-kernel-pkg --initrdfile=%{initrd_dir}/initrd-%{kernel_release}.gz --install %{kernel_release} --banner "$title"
1393 elif [ -x /sbin/rc-boot ]; then
1394 /sbin/rc-boot 1>&2 || :
1398 mv -f /boot/vmlinux{,.old} 2> /dev/null
1399 %{?alt_kernel:mv -f /boot/vmlinux-%{alt_kernel}{,.old} 2> /dev/null}
1400 ln -sf vmlinux-%{kernel_release} /boot/vmlinux
1401 %{?alt_kernel:ln -sf vmlinux-%{kernel_release} /boot/vmlinux-%{alt_kernel}}
1404 %{_sbindir}/mkvmlinuz /boot/zImage-%{kernel_release} %{kernel_release}
1407 %depmod %{kernel_release}
1410 %depmod %{kernel_release}
1413 %depmod %{kernel_release}
1416 %depmod %{kernel_release}
1419 %depmod %{kernel_release}
1422 %depmod %{kernel_release}
1425 %depmod %{kernel_release}
1428 %depmod %{kernel_release}
1431 ln -snf %{basename:%{_kernelsrcdir}} %{_prefix}/src/linux%{_alt_kernel}
1434 if [ "$1" = "0" ]; then
1435 if [ -L %{_prefix}/src/linux%{_alt_kernel} ]; then
1436 if [ "$(readlink %{_prefix}/src/linux%{_alt_kernel})" = "linux%{_alt_kernel}-%{version}" ]; then
1437 rm -f %{_prefix}/src/linux%{_alt_kernel}
1442 %triggerin module-build -- %{name} = %{epoch}:%{version}-%{release}
1443 ln -sfn %{_kernelsrcdir} /lib/modules/%{kernel_release}/build
1444 ln -sfn %{_kernelsrcdir} /lib/modules/%{kernel_release}/source
1446 %triggerun module-build -- %{name} = %{epoch}:%{version}-%{release}
1447 if [ "$1" = 0 ]; then
1448 rm -f /lib/modules/%{kernel_release}/{build,source}
1452 %defattr(644,root,root,755)
1453 %ifarch sparc sparc64
1454 /boot/vmlinux.aout-%{kernel_release}
1457 /boot/efi/vmlinuz-%{kernel_release}
1459 /boot/vmlinuz-%{kernel_release}
1460 /boot/System.map-%{kernel_release}
1461 %ghost %{initrd_dir}/initrd-%{kernel_release}.gz
1462 %dir /lib/modules/%{kernel_release}
1463 %dir /lib/modules/%{kernel_release}/kernel
1465 /lib/modules/%{kernel_release}/kernel/arch
1467 /lib/modules/%{kernel_release}/kernel/crypto
1468 /lib/modules/%{kernel_release}/kernel/drivers
1470 %exclude /lib/modules/%{kernel_release}/kernel/drivers/char/drm
1472 /lib/modules/%{kernel_release}/kernel/fs
1474 # this directory will be removed after disabling rcutorture mod. in 2.6.20.
1475 /lib/modules/%{kernel_release}/kernel/kernel
1477 /lib/modules/%{kernel_release}/kernel/lib
1478 /lib/modules/%{kernel_release}/kernel/net
1480 %dir /lib/modules/%{kernel_release}/kernel/sound
1481 /lib/modules/%{kernel_release}/kernel/sound/soundcore.*
1482 %exclude /lib/modules/%{kernel_release}/kernel/drivers/media/video/saa7134/saa7134-alsa.ko*
1483 %exclude /lib/modules/%{kernel_release}/kernel/drivers/media/video/cx88/cx88-alsa.ko*
1485 %dir /lib/modules/%{kernel_release}/misc
1487 %exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia
1488 %exclude /lib/modules/%{kernel_release}/kernel/drivers/*/pcmcia
1489 %if %{without rescuecd}
1490 %exclude /lib/modules/%{kernel_release}/kernel/drivers/ata/pata_pcmcia.ko*
1491 %exclude /lib/modules/%{kernel_release}/kernel/drivers/bluetooth/*_cs.ko*
1492 %exclude /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/avm_cs.ko*
1493 %exclude /lib/modules/%{kernel_release}/kernel/drivers/telephony/ixj_pcmcia.ko*
1494 %exclude /lib/modules/%{kernel_release}/kernel/drivers/usb/gadget/g_midi.ko*
1496 %exclude /lib/modules/%{kernel_release}/kernel/drivers/ide/legacy/ide-cs.ko*
1497 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/*_cs.ko*
1498 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/b43
1499 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/hostap/hostap_cs.ko*
1500 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/libertas/*_cs.ko*
1501 %exclude /lib/modules/%{kernel_release}/kernel/drivers/parport/parport_cs.ko*
1502 %exclude /lib/modules/%{kernel_release}/kernel/drivers/serial/serial_cs.ko*
1503 %exclude /lib/modules/%{kernel_release}/kernel/drivers/usb/host/sl811_cs.ko*
1505 %ghost /lib/modules/%{kernel_release}/modules.*
1506 # symlinks pointing to kernelsrcdir
1507 %ghost /lib/modules/%{kernel_release}/build
1508 %ghost /lib/modules/%{kernel_release}/source
1509 %dir %{_sysconfdir}/modprobe.d/%{kernel_release}
1511 %ifarch alpha %{ix86} %{x8664} ppc ppc64 sparc sparc64
1513 %defattr(644,root,root,755)
1514 /boot/vmlinux-%{kernel_release}
1519 %defattr(644,root,root,755)
1520 /lib/modules/%{kernel_release}/kernel/drivers/char/drm
1525 %defattr(644,root,root,755)
1526 /lib/modules/%{kernel_release}/kernel/drivers/pcmcia
1527 /lib/modules/%{kernel_release}/kernel/drivers/*/pcmcia
1528 %if %{without rescuecd}
1529 /lib/modules/%{kernel_release}/kernel/drivers/bluetooth/*_cs.ko*
1530 /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/avm_cs.ko*
1531 /lib/modules/%{kernel_release}/kernel/drivers/telephony/ixj_pcmcia.ko*
1533 /lib/modules/%{kernel_release}/kernel/drivers/ata/pata_pcmcia.ko*
1534 /lib/modules/%{kernel_release}/kernel/drivers/ide/legacy/ide-cs.ko*
1535 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/*_cs.ko*
1536 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/b43
1537 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/hostap/hostap_cs.ko*
1538 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/libertas/*_cs.ko*
1539 /lib/modules/%{kernel_release}/kernel/drivers/parport/parport_cs.ko*
1540 /lib/modules/%{kernel_release}/kernel/drivers/serial/serial_cs.ko*
1541 /lib/modules/%{kernel_release}/kernel/drivers/usb/host/sl811_cs.ko*
1545 %if "%{_arch}" == "ppc"
1547 %defattr(644,root,root,755)
1548 %dir /boot/libs-%{kernel_release}
1549 /boot/libs-%{kernel_release}/common
1550 /boot/libs-%{kernel_release}/kernel
1551 /boot/libs-%{kernel_release}/lib
1552 /boot/libs-%{kernel_release}/of1275
1553 /boot/libs-%{kernel_release}/openfirmware
1554 /boot/libs-%{kernel_release}/simple
1555 %dir /boot/libs-%{kernel_release}/utils
1556 %attr(755,root,root) /boot/libs-%{kernel_release}/utils/*
1557 /boot/libs-%{kernel_release}/ld.script
1563 %defattr(644,root,root,755)
1564 /lib/modules/%{kernel_release}/kernel/sound
1565 %exclude %dir /lib/modules/%{kernel_release}/kernel/sound
1566 %exclude /lib/modules/%{kernel_release}/kernel/sound/soundcore.*
1568 %exclude /lib/modules/%{kernel_release}/kernel/sound/oss
1570 /lib/modules/%{kernel_release}/kernel/drivers/usb/gadget/g_midi.ko*
1571 /lib/modules/%{kernel_release}/kernel/drivers/media/video/saa7134/saa7134-alsa.ko*
1572 /lib/modules/%{kernel_release}/kernel/drivers/media/video/cx88/cx88-alsa.ko*
1576 %defattr(644,root,root,755)
1577 /lib/modules/%{kernel_release}/kernel/sound/oss
1582 %defattr(644,root,root,755)
1583 %dir %{_kernelsrcdir}
1584 %{_kernelsrcdir}/include
1585 %{_kernelsrcdir}/config-dist
1586 %{_kernelsrcdir}/Module.symvers-dist
1588 %files module-build -f aux_files
1589 %defattr(644,root,root,755)
1590 # symlinks pointint to kernelsrcdir
1591 %dir /lib/modules/%{kernel_release}
1592 /lib/modules/%{kernel_release}/build
1593 %{_kernelsrcdir}/Kbuild
1594 %{_kernelsrcdir}/localversion
1595 %{_kernelsrcdir}/arch/*/kernel/asm-offsets*
1596 %{_kernelsrcdir}/arch/*/kernel/sigframe*.h
1597 %{_kernelsrcdir}/drivers/lguest/lg.h
1598 %dir %{_kernelsrcdir}/scripts
1599 %dir %{_kernelsrcdir}/scripts/kconfig
1600 %{_kernelsrcdir}/scripts/Kbuild.include
1601 %{_kernelsrcdir}/scripts/Makefile*
1602 %{_kernelsrcdir}/scripts/basic
1603 %{_kernelsrcdir}/scripts/mkmakefile
1604 %{_kernelsrcdir}/scripts/mod
1605 %{_kernelsrcdir}/scripts/setlocalversion
1606 %{_kernelsrcdir}/scripts/*.c
1607 %{_kernelsrcdir}/scripts/*.sh
1608 %{_kernelsrcdir}/scripts/kconfig/*
1609 %{_kernelsrcdir}/scripts/mkcompile_h
1612 %defattr(644,root,root,755)
1613 %dir %{_kernelsrcdir}
1614 %{_kernelsrcdir}/Documentation
1617 %files source -f aux_files_exc
1618 %defattr(644,root,root,755)
1619 %{_kernelsrcdir}/arch/*/[!Mk]*
1620 %{_kernelsrcdir}/arch/*/kernel/[!M]*
1621 %{_kernelsrcdir}/arch/x86/kvm
1622 %exclude %{_kernelsrcdir}/arch/*/kernel/asm-offsets*
1623 %exclude %{_kernelsrcdir}/arch/*/kernel/sigframe*.h
1624 %exclude %{_kernelsrcdir}/drivers/lguest/lg.h
1625 %{_kernelsrcdir}/block
1626 %{_kernelsrcdir}/crypto
1627 %{_kernelsrcdir}/drivers
1629 %if %{with grsecurity} && %{without rescuecd}
1630 %{_kernelsrcdir}/grsecurity
1632 %{_kernelsrcdir}/init
1633 %{_kernelsrcdir}/ipc
1634 %{_kernelsrcdir}/kernel
1635 %{_kernelsrcdir}/lib
1637 %{_kernelsrcdir}/net
1638 %{_kernelsrcdir}/virt
1639 %{_kernelsrcdir}/scripts/*
1640 %exclude %{_kernelsrcdir}/scripts/Kbuild.include
1641 %exclude %{_kernelsrcdir}/scripts/Makefile*
1642 %exclude %{_kernelsrcdir}/scripts/basic
1643 %exclude %{_kernelsrcdir}/scripts/kconfig
1644 %exclude %{_kernelsrcdir}/scripts/mkmakefile
1645 %exclude %{_kernelsrcdir}/scripts/mod
1646 %exclude %{_kernelsrcdir}/scripts/setlocalversion
1647 %exclude %{_kernelsrcdir}/scripts/*.c
1648 %exclude %{_kernelsrcdir}/scripts/*.sh
1649 %{_kernelsrcdir}/sound
1650 %{_kernelsrcdir}/security
1651 %{_kernelsrcdir}/usr
1652 %{_kernelsrcdir}/COPYING
1653 %{_kernelsrcdir}/CREDITS
1654 %{_kernelsrcdir}/MAINTAINERS
1655 %{_kernelsrcdir}/README
1656 %{_kernelsrcdir}/REPORTING-BUGS
1657 %{_kernelsrcdir}/.mailmap