2 # STATUS: 2.6.25 works, needs testing
5 # - suspend2 renamed to tuxonice (as project name)
8 # - benchmark NO_HZ & HZ=1000 vs HZ=300 on i686
9 # - apparmor (needs testing)
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)
43 %bcond_with vs22 # use vserver 2.2 instead of 2.3 (see comment near patch 102)
44 %bcond_with apparmor # build kernel with apparmor (very exerimental mix)
46 %bcond_with rescuecd # build kernel for our rescue
48 %bcond_with myown # build with your own config (kernel-myown.config)
50 %{?debug:%define with_verbose 1}
52 %if %{without grsecurity}
53 %undefine with_grsec_full
54 %undefine with_grsec_minimal
56 %undefine with_pax_full
60 %undefine with_grsec_minimal
61 %define with_grsec_full 1
62 %define with_grsecurity 1
66 %if %{with grsec_full}
67 %undefine with_grsec_minimal
68 %define with_grsecurity 1
70 %define with_pax_full 1
74 %if %{with grsec_minimal}
75 %undefine with_grsec_full
76 %undefine with_pax_full
77 %define with_grsecurity 1
85 %undefine with_tuxonice
86 %undefine with_grsec_full
87 %undefine with_grsec_minimal
89 %undefine with_pax_full
90 %undefine with_vserver
95 %ifarch %{ix86} alpha ppc
101 %ifarch sparc sparc64
102 %undefine with_pcmcia
107 %define _basever 2.6.25
109 %define _prepatch %{nil}
110 %define _pre_rc %{nil}
114 %define _enable_debug_packages 0
116 %define squashfs_version 3.3
117 %define tuxonice_version 3.0-rc7
118 %define netfilter_snap 20070806
119 %define xen_version 3.0.2
121 %define _alt_kernel %{?with_pax:-pax}%{?with_grsec_full:-grsecurity}%{?with_xen0:-xen0}%{?with_xenU:-xenU}%{?with_rescuecd:-rescuecd}%{?with_pae:-pae}%{?with_myown:-myown}%{?with_apparmor:-aa}
123 # kernel release (used in filesystem and eventually in uname -r)
124 # modules will be looked from /lib/modules/%{kernel_release}
125 # _localversion is just that without version for "> localversion"
126 %define _localversion %{KABI}
127 %define kernel_release %{version}%{?_alt_kernel:%{_alt_kernel}}-%{_localversion}
129 # Our Kernel ABI, increase this when you want the out of source modules being rebuilt
130 # Usually same as %{_rel}
133 Summary: The Linux kernel (the core of the Linux operating system)
134 Summary(de.UTF-8): Der Linux-Kernel (Kern des Linux-Betriebssystems)
135 Summary(et.UTF-8): Linuxi kernel (ehk operatsioonisüsteemi tuum)
136 Summary(fr.UTF-8): Le Kernel-Linux (La partie centrale du systeme)
137 Summary(pl.UTF-8): JÄ…dro Linuksa
138 Name: kernel%{_alt_kernel}
140 %if "%{_prepatch}" == "%{nil}"
141 Version: %{_basever}%{_postver}
144 Version: %{_prepatch}
145 Release: 0.%{_pre_rc}.%{_rel}
151 #Source0: ftp://ftp.kernel.org/pub/linux/kernel/v2.6/testing/linux-%{version}%{_rc}.tar.bz2
152 Source0: http://www.kernel.org/pub/linux/kernel/v2.6/linux-%{_basever}%{_rc}.tar.bz2
153 # Source0-md5: db95a49a656a3247d4995a797d333153
154 %if "%{_prepatch}" != "%{nil}"
155 Source90: http://www.kernel.org/pub/linux/kernel/v2.6/testing/patch-%{_prepatch}-%{_pre_rc}.bz2
156 # Source90-md5: b78873f8a3aff5bdc719fc7fb4c66a9b
158 %if "%{_postver}" != "%{nil}"
159 Source1: http://www.kernel.org/pub/linux/kernel/v2.6/patch-%{version}.bz2
160 # Source1-md5: 015b275011b48f716b3a6b072b18b471
163 Source3: kernel-autoconf.h
164 Source4: kernel-config.h
165 Source5: kernel-ppclibs.Makefile
166 Source6: kernel-config.py
167 Source7: kernel-module-build.pl
169 Source19: kernel-multiarch.config
170 Source20: kernel-i386.config
171 Source21: kernel-x86_64.config
172 Source22: kernel-sparc.config
173 Source23: kernel-sparc64.config
174 Source24: kernel-alpha.config
175 Source25: kernel-ppc.config
176 Source26: kernel-ia64.config
177 Source27: kernel-ppc64.config
179 Source40: kernel-netfilter.config
180 Source41: kernel-squashfs.config
181 Source42: kernel-tuxonice.config
182 Source43: kernel-vserver.config
183 Source45: kernel-grsec.config
184 Source46: kernel-xen0.config
185 Source47: kernel-xenU.config
187 Source49: kernel-pax.config
188 Source50: kernel-no-pax.config
189 Source51: kernel-grsec_minimal.config
190 Source55: kernel-imq.config
191 Source56: kernel-reiser4.config
192 Source57: kernel-wrr.config
194 Source58: kernel-inittmpfs.config
195 Source59: kernel-bzip2-lzma.config
200 # tahoe9XX http://tahoe.pl/drivers/tahoe9xx-2.6.11.5.patch
201 Patch2: tahoe9xx-2.6.11.5.patch
203 # ftp://ftp.openbios.org/pub/bootsplash/kernel/bootsplash-3.1.6-2.6.21.diff.gz
204 Patch3: linux-2.6-bootsplash.patch
205 # http://dev.gentoo.org/~spock/projects/fbcondecor/archive/fbcondecor-0.9.4-2.6.25-rc6.patch
206 Patch4: kernel-fbcondecor.patch
208 # based on http://mesh.dl.sourceforge.net/sourceforge/squashfs/squashfs3.3.tgz
209 # squashfs3.3/kernel-patches/linux-2.6.24/squashfs3.3-patch
210 Patch6: kernel-squashfs.patch
211 Patch8: linux-fbcon-margins.patch
212 Patch9: linux-static-dev.patch
214 # netfilter related stuff mostly based on patch-o-matic-ng
215 # snapshot 20061213 with some fixes related to changes in
216 # netfilter api in 2.6.19 up to 2.6.22. Some modules
217 # were ported to nf_conntrack. Some of these are unique.
219 Patch10: kernel-pom-ng-IPV4OPTSSTRIP.patch
220 Patch11: kernel-pom-ng-ipv4options.patch
221 Patch12: kernel-pom-ng-set.patch
222 Patch14: kernel-pom-ng-ROUTE.patch
223 Patch16: kernel-pom-ng-mms-conntrack-nat.patch
224 Patch22: kernel-pom-ng-rsh.patch
225 Patch23: kernel-pom-ng-rpc.patch
227 # based on http://mike.it-loops.com/rtsp/rtsp-2.6.24.patch
228 Patch36: kernel-nf_rtsp.patch
230 # http://ftp.linux-vserver.org/pub/people/dhozac/p/k/delta-owner-xid-feat02.diff
231 Patch37: kernel-owner-xid.patch
233 # based on http://www.svn.barbara.eu.org/ipt_account/attachment/wiki/Software/ipt_account-0.1.21-20070804164729.tar.gz?format=raw
234 Patch38: kernel-ipt_account.patch
236 # based on http://www.intra2net.com/de/produkte/opensource/ipt_account/pom-ng-ipt_ACCOUNT-1.12.tgz
237 Patch39: kernel-ipt_ACCOUNT.patch
239 # kernel-2.6.25-layer7-2.18.patch from
240 # http://switch.dl.sourceforge.net/sourceforge/l7-filter/netfilter-layer7-v2.18.tar.gz
241 Patch40: kernel-layer7.patch
243 # http://www.ssi.bg/~ja/nfct/ipvs-nfct-2.6.25-1.diff
244 Patch41: kernel-ipvs-nfct.patch
246 # based on http://www.balabit.com/downloads/files/tproxy/tproxy-kernel-2.6.25-20080509-164605-1210344365.tar.bz2
247 Patch42: kernel-tproxy.patch
251 # http://zph.bratcheda.org/linux-2.6.25-zph.patch
252 Patch49: kernel-zph.patch
254 # based on http://www.linuximq.net/patchs/linux-2.6.24-imq.diff
255 # some people report problems when using imq with wrr.
256 # try unoficial version: http://kapturkiewicz.name/linux-2.6.25-imq1.diff
257 Patch50: kernel-imq.patch
259 # previously based on ftp://ftp.namesys.com/pub/reiser4-for-2.6/2.6.22/reiser4-for-2.6.22-2.patch.gz
260 # now based on http://www.kernel.org/pub/linux/kernel/people/edward/reiser4/reiser4-for-2.6/reiser4-for-2.6.25.patch.bz2
261 Patch51: kernel-reiser4.patch
263 # http://www.zz9.dk/patches/wrr-linux-071203-2.6.25.patch.gz
264 Patch52: kernel-wrr.patch
266 # http://fatooh.org/esfq-2.6/sfq-2.6.24.1.tar.bz2
267 Patch53: esfq-kernel.patch
269 # http://memebeam.org/free-software/toshiba_acpi/toshiba_acpi-dev_toshiba_test5-linux_2.6.21.patch
270 Patch54: linux-2.6-toshiba_acpi.patch
271 # by Baggins request:
272 # derived from ftp://ftp.cmf.nrl.navy.mil/pub/chas/linux-atm/vbr/vbr-kernel-diffs
273 Patch55: linux-2.6-atm-vbr.patch
274 Patch56: linux-2.6-atmdd.patch
276 # http://www.ntop.org/PF_RING.html 20070610
277 Patch58: linux-PF_RING.patch
279 # http://synce.svn.sourceforge.net/svnroot/synce/trunk/patches/linux-2.6.22-rndis_host-wm5.patch
280 Patch59: kernel-rndis_host-wm5.patch
282 # Project suspend2 renamed to tuxonice
283 # http://tuxonice.org/downloads/all/tuxonice-3.0-rc7-for-2.6.25.patch.bz2
284 Patch69: linux-2.6-suspend2.patch
285 Patch70: kernel-suspend2-headers.patch
286 Patch71: linux-2.6-suspend2-page.patch
287 Patch72: kernel-2.6-ueagle-atm-freezer.patch
289 # adds some ids for hostap suported cards and monitor_enable from/for aircrack-ng
290 # http://patches.aircrack-ng.org/hostap-kernel-2.6.18.patch
291 Patch85: hostap-kernel-2.6.18.patch
293 # http://vserver.13thfloor.at/Experimental/patch-2.6.25.4-vs2.3.0.34.11.diff
294 Patch100: linux-2.6-vs2.3.patch
295 Patch101: kernel-vserver-fixes.patch
296 # based on http://vserver.13thfloor.at/Experimental/patch-2.6.24-rc7-vs2.2.0.5.0.7-pre.diff
297 Patch102: linux-2.6-vs2.2.patch
298 # note about vserver 2.2 vs 2.3: 2.2 is "stable", 2.3 is "development", currently (2007-09-03)
299 # the preferred 2.3 vserver needs CONFIG_IPV6=y config, which break things for some users;
300 # it was proposed to use 2.2 as a temp replacement. One could use vs 2.2 instead of 2.3
301 # by using vs22 bcond - this bcond also changes IPV6 option from "y" to "m".
303 # from http://www.cl.cam.ac.uk/Research/SRG/netos/xen/downloads/xen-3.0.2-src.tgz
304 #Patch120: xen-3.0-2.6.16.patch
306 # Wake-On-Lan fix for nForce drivers; using http://atlas.et.tudelft.nl/verwei90/nforce2/wol.html
307 # Fix verified for that kernel version.
308 Patch130: linux-2.6-forcedeth-WON.patch
310 # http://download.filesystems.org/unionfs/unionfs-2.x/unionfs-2.2.4_for_2.6.25-rc2.diff.gz
311 Patch140: kernel-unionfs.patch
312 Patch141: kernel-unionfs-vserver.patch
314 # aic94xx patch based on http://georgi.unixsol.org/programs/aic94xx_with_included_firmware_2.6.21.diff
315 Patch160: linux-2.6-aic94xx_with_included_firmware.patch
317 Patch200: linux-2.6-ppc-ICE-hacks.patch
319 # The following patch extend the routing functionality in Linux
320 # to support static routes (defined by user), new way to use the
321 # alternative routes, the reverse path protection (rp_filter),
322 # the NAT processing to use correctly the routing when multiple
324 # http://www.ssi.bg/~ja/routes-2.6.25-15.diff
325 # We need to disable CONFIG_IP_ROUTE_MULTIPATH_CACHED
326 Patch300: kernel-routes.patch
328 Patch1000: linux-2.6-grsec-minimal.patch
330 Patch2000: kernel-small_fixes.patch
331 Patch2001: linux-2.6.21.1-pwc-uncompress.patch
333 # kill some thousands of warnings
334 # (only warnings, so just remove parts of this patch if conflics)
335 Patch2500: linux-2.6-warnings.patch
337 # based on https://forgesvn1.novell.com/svn/apparmor/trunk/kernel-patches/2.6.25 rev 1266
338 # repatched and adapted for vserver/grsec changes in vfs API, very experimental
339 Patch5000: kernel-apparmor.patch
340 #Patch5001: linux-2.6-apparmor-caps.patch
343 # based on http://ftp.leg.uct.ac.za/pub/linux/rip/inittmpfs-2.6.14.diff.gz
344 Patch7000: kernel-inittmpfs.patch
345 # based on http://www.udpcast.linux.lu/download/bzip2-lzma-kernel-2.6.23.12.patch.gz
346 Patch7001: kernel-bzip2-lzma.patch
349 Patch9997: pax_selinux_hooks-2.6.20.patch
351 # based on http://www.grsecurity.net/~paxguy1/pax-linux-2.6.24.6-test45.patch
352 Patch9998: kernel-pax.patch
354 # based on http://www.grsecurity.net/~spender/grsecurity-2.1.12-2.6.25.4-200805181334.patch
355 Patch9999: linux-2.6-grsec_full.patch
356 Patch10000: linux-2.6-grsec-caps.patch
357 Patch10001: linux-2.6-grsec-common.patch
358 Patch10002: kernel-grsec_fixes.patch
360 URL: http://www.kernel.org/
361 BuildRequires: binutils >= 3:2.14.90.0.7
362 %ifarch sparc sparc64
363 BuildRequires: elftoaout
365 BuildRequires: /sbin/depmod
366 BuildRequires: gcc >= 5:3.2
367 %{?with_rescuecd:BuildRequires: lzma >= 1:4.42.2}
368 # for hostname command
369 BuildRequires: net-tools
370 BuildRequires: perl-base
371 BuildRequires: python
372 BuildRequires: python-modules
373 BuildRequires: rpmbuild(macros) >= 1.217
375 Requires(post): coreutils
376 Requires(post): geninitrd >= 2.57
377 Requires(post): module-init-tools >= 0.9.9
378 Requires: /sbin/depmod
380 Requires: geninitrd >= 2.57
381 Requires: module-init-tools >= 0.9.9
382 Provides: %{name}(netfilter) = %{netfilter_snap}
383 %if %{with xen0} || %{with xenU}
384 Provides: kernel(xen) = %{_xen_version}
386 Obsoletes: kernel-misc-fuse
387 Obsoletes: kernel-modules
388 Obsoletes: kernel-net-hostap
389 Obsoletes: kernel-net-ieee80211
390 Obsoletes: kernel-net-ipp2p
391 Obsoletes: kernel-smp
392 Conflicts: e2fsprogs < 1.29
393 Conflicts: isdn4k-utils < 3.1pre1
394 Conflicts: jfsutils < 1.1.3
395 Conflicts: module-init-tools < 0.9.10
396 Conflicts: nfs-utils < 1.0.5
397 Conflicts: oprofile < 0.9
398 Conflicts: ppp < 1:2.4.0
399 Conflicts: procps < 3.2.0
400 Conflicts: quota-tools < 3.09
401 %if %{with reiserfs4}
402 Conflicts: reiser4progs < 1.0.0
404 Conflicts: reiserfsprogs < 3.6.3
405 Conflicts: udev < 1:071
406 Conflicts: util-linux < 2.10o
407 Conflicts: xfsprogs < 2.6.0
408 %if %{with xen0} || %{with xenU} || %{with pae}
409 ExclusiveArch: %{ix86}
411 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 %ifnarch %{ix86} %{x8664} ppc ppc64
426 %define target_arch_dir %{_target_base_arch}
429 %define defconfig arch/%{target_arch_dir}/defconfig
431 # No ELF objects there to strip (skips processing 27k files)
432 %define _noautostrip .*%{_kernelsrcdir}/.*
433 %define _noautochrpath .*%{_kernelsrcdir}/.*
436 %define initrd_dir /boot/efi
438 %define initrd_dir /boot
441 %define _kernelsrcdir /usr/src/linux%{_alt_kernel}-%{version}
443 %if "%{_target_base_arch}" != "%{_arch}"
444 %define CrossOpts ARCH=%{_target_base_arch} CROSS_COMPILE=%{_target_cpu}-pld-linux-
445 %define DepMod /bin/true
447 %if "%{_arch}" == "sparc" && "%{_target_base_arch}" == "sparc64"
448 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
449 %define DepMod /sbin/depmod
452 %if "%{_arch}" == "sparc64" && "%{_target_base_arch}" == "sparc"
453 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
454 %define DepMod /sbin/depmod
457 %if "%{_arch}" == "x86_64" && "%{_target_base_arch}" == "i386"
458 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
459 %define DepMod /sbin/depmod
463 %define CrossOpts ARCH=powerpc CROSS_COMPILE=%{_target_cpu}-pld-linux-
467 %define CrossOpts ARCH=powerpc CC="%{__cc}"
469 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
471 %define DepMod /sbin/depmod
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.
719 %setup -q -n linux-%{_basever}%{_rc}
721 # hack against warning in pax/grsec
723 sed -i 's/-Werror//' arch/alpha/kernel/Makefile
727 install %{SOURCE5} Makefile.ppclibs
730 # sources 1 and 90 should be mutually exclusive btw.
732 %if "%{_prepatch}" != "%{nil}"
733 %{__bzip2} -dc %{SOURCE90} | patch -p1 -s
736 %if "%{_postver}" != "%{nil}"
737 %{__bzip2} -dc %{SOURCE1} | patch -p1 -s
740 install -m 755 %{SOURCE6} .
744 ##ifarch %{ix86} %{x8664} ia64 ppc alpha
748 # kernel-2.6-ueagle-atm-freezer.patch
757 %if !%{with fbcondecor}
771 # kernel-pom-ng-IPV4OPTSSTRIP.patch
774 # kernel-pom-ng-ipv4options.patch
777 # kernel-pom-ng-set.patch
780 # kernel-pom-ng-ROUTE.patch
783 # kernel-pom-ng-mms-conntrack-nat.patch
786 # kernel-pom-ng-rsh.patch
789 # kernel-pom-ng-rpc.patch
792 # kernel-nf_rtsp.patch
795 # kernel-owner-xid.patch
800 # kernel-ipt_account.patch
803 # kernel-ipt_ACCOUNT.patch
806 # kernel-layer7.patch
842 # kernel-rndis_host-wm5.patch
845 # hostap enhancements from/for aircrack-ng
858 #%if %{with xen0} || %{with xenU}
859 #%ifarch %{ix86} %{x8664} ia64
865 %if %{without rescuecd}
874 %{?with_vserver:%patch141 -p1}
876 # aic94xx linux-2.6-aic94xx_with_included_firmware.patch
886 # grsecurity & pax stuff
890 %{?with_vserver:%patch10000 -p1}
891 %{?with_vserver:%patch10001 -p1}
892 #{?with_vserver:%patch10002 -p1}
895 %if %{with grsec_full}
897 %{?with_vserver:%patch10000 -p1}
898 %{?with_vserver:%patch10001 -p1}
899 #{?with_vserver:%patch10002 -p1}
901 %if %{with grsec_minimal}
903 # remember that we have the same config file for grsec_minimal and
904 # grsec_full, but the patches are different.
909 # now we have an separate testing pax-only patch - in the future we
910 # could have single grsecurity patch and will have to prepare separate
911 # configs for grsec_minimal, grsec_full and pax to support such
912 # configurations like pax & grsec_minimal.
913 # So, in a future there could be no patch9998, but only config
914 # would tell which options should be enabled.
915 # The second option is to maintain separate pax-only patch.
917 #patch9997 -p1 - needs update
923 # end of grsecurity & pax stuff
942 # Fix EXTRAVERSION in main Makefile
943 sed -i 's#EXTRAVERSION =.*#EXTRAVERSION = %{_postver}%{?_alt_kernel:%{_alt_kernel}}#g' Makefile
945 # on sparc this line causes CONFIG_INPUT=m (instead of =y), thus breaking build
946 sed -i -e '/select INPUT/d' net/bluetooth/hidp/Kconfig
948 # on sparc64 avoid building break due to NULL pointer type warrning
949 sed -i -e 's/^EXTRA_CFLAGS := -Werror/EXTRA_CFLAGS := /' arch/sparc64/kernel/Makefile
951 # cleanup backups after patching
952 find '(' -name '*~' -o -name '*.orig' -o -name '.gitignore' ')' -print0 | xargs -0 -r -l512 rm -f
955 TuneUpConfigForIX86 () {
959 [ "$2" = "yes" ] && pae=yes
964 sed -i 's:CONFIG_M386=y:# CONFIG_M386 is not set:' $1
967 sed -i 's:# CONFIG_M486 is not set:CONFIG_M486=y:' $1
970 sed -i 's:# CONFIG_M586 is not set:CONFIG_M586=y:' $1
973 sed -i 's:# CONFIG_M686 is not set:CONFIG_M686=y:' $1
976 sed -i 's:# CONFIG_MPENTIUMIII is not set:CONFIG_MPENTIUMIII=y:' $1
979 sed -i 's:# CONFIG_MPENTIUM4 is not set:CONFIG_MPENTIUM4=y:' $1
982 sed -i 's:# CONFIG_MK7 is not set:CONFIG_MK7=y:' $1
984 %ifarch i686 athlon pentium3 pentium4
985 if [ "$pae" = "yes" ]; then
986 sed -i "s:CONFIG_HIGHMEM4G=y:# CONFIG_HIGHMEM4G is not set:" $1
987 sed -i "s:# CONFIG_HIGHMEM64G is not set:CONFIG_HIGHMEM64G=y\nCONFIG_X86_PAE=y:" $1
989 sed -i 's:CONFIG_MATH_EMULATION=y:# CONFIG_MATH_EMULATION is not set:' $1
998 sed -i 's:# CONFIG_PAX_SEGMEXEC is not set:CONFIG_PAX_SEGMEXEC=y:' $1
999 # performance impact on CPUs without NX bit
1000 sed -i 's:CONFIG_PAX_PAGEEXEC=y:# CONFIG_PAX_PAGEEXEC is not set:' $1
1003 # sed -i 's:CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM=y:# CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM is not set:' $1
1004 # sed -i 's:CONFIG_PCI_BIOS=y:# CONFIG_PCI_BIOS is not set:' $1
1005 # sed -i 's:CONFIG_EFI=y:# CONFIG_EFI is not set:' $1
1009 sed -i 's:CONFIG_PAX_NOELFRELOCS=y:# CONFIG_PAX_NOELFRELOCS is not set:' $1
1012 sed -i 's:# CONFIG_PAX_EMUTRAMP is not set:CONFIG_PAX_EMUTRAMP=y:' $1
1013 sed -i 's:# CONFIG_PAX_EMUSIGRT is not set:CONFIG_PAX_EMUSIGRT=y:' $1
1014 sed -i 's:# CONFIG_PAX_EMUPLT is not set:CONFIG_PAX_EMUPLT=y:' $1
1017 %ifarch sparc sparc64 alpha
1018 sed -i 's:# CONFIG_PAX_EMUPLT is not set:CONFIG_PAX_EMUPLT=y:' $1
1021 # Now we have to check MAC system integration. Grsecurity (full) uses PAX_HAVE_ACL_FLAGS
1022 # setting (direct acces). grsec_minimal probably have no idea about PaX so we probably
1023 # could use PAX_NO_ACL_FLAGS, but for testing the hooks setting will be used
1024 # PAX_HOOK_ACL_FLAGS. SELinux should also be able to make PaX settings via hooks
1026 %if %{with grsec_full}
1027 # Hardening grsec options if with pax
1028 sed -i "s:# CONFIG_GRKERNSEC_PROC_MEMMAP is not set:CONFIG_GRKERNSEC_PROC_MEMMAP=y:" $1
1029 # almost rational (see HIDESYM help)
1030 sed -i "s:# CONFIG_GRKERNSEC_HIDESYM is not set:CONFIG_GRKERNSEC_HIDESYM=y:" $1
1032 # no change needed CONFIG=PAX_HAVE_ACL_FLAGS=y is taken from the kernel-pax.config
1034 # selinux or other hooks?
1035 sed -i 's:CONFIG_PAX_HAVE_ACL_FLAGS=y:# CONFIG_PAX_HAVE_ACL_FLAGS is not set:' $1
1036 sed -i 's:# CONFIG_PAX_HOOK_ACL_FLAGS is not set:CONFIG_PAX_HOOK_ACL_FLAGS=y:' $1
1044 cat %{SOURCE58} >> $1
1045 cat %{SOURCE59} >> $1
1046 sed -i "s:CONFIG_SOUND=.:# CONFIG_SOUND is not set:" $1
1047 sed -i "s:CONFIG_AUDIT=.:# CONFIG_AUDIT is not set:" $1
1048 sed -i "s:CONFIG_TR=.:# CONFIG_TR is not set:" $1
1049 sed -i "s:CONFIG_BT=.:# CONFIG_BT is not set:" $1
1050 sed -i "s:CONFIG_VIDEO_DEV=.:# CONFIG_VIDEO_DEV is not set:" $1
1051 sed -i "s:CONFIG_DVB_CORE=.:# CONFIG_DVB_CORE is not set:" $1
1052 sed -i "s:CONFIG_HAMRADIO=.:# CONFIG_HAMRADIO is not set:" $1
1053 sed -i "s:CONFIG_ARCNET=.:# CONFIG_ARCNET is not set:" $1
1054 sed -i "s:CONFIG_FB=.:# CONFIG_FB is not set:" $1
1055 sed -i "s:CONFIG_DRM\(.*\)=.:# CONFIG_DRM\1 is not set:" $1
1056 sed -i "s:CONFIG_WATCHDOG=.:# CONFIG_WATCHDOG is not set:" $1
1057 sed -i "s:CONFIG_INPUT_JOYSTICK=.:# CONFIG_INPUT_JOYSTICK is not set:" $1
1058 sed -i "s:CONFIG_DEBUG_KERNEL=.:# CONFIG_DEBUG_KERNEL is not set:" $1
1059 sed -i "s:CONFIG_ISDN=.:# CONFIG_ISDN is not set:" $1
1060 sed -i "s:CONFIG_AGP\(.*\)=.:# CONFIG_AGP\1 is not set:" $1
1061 sed -i "s:CONFIG_SECURITY=.:# CONFIG_SECURITY is not set:" $1
1062 sed -i "s:CONFIG_PARIDE=.:# CONFIG_PARIDE is not set:" $1
1063 sed -i "s:CONFIG_CPU_FREQ=.:# CONFIG_CPU_FREQ is not set:" $1
1064 sed -i "s:CONFIG_GAMEPORT=.:# CONFIG_GAMEPORT is not set:" $1
1065 sed -i "s:CONFIG_KVM=.:# CONFIG_KVM is not set:" $1
1066 sed -i "s:CONFIG_PHONE=.:# CONFIG_PHONE is not set:" $1
1067 sed -i "s:CONFIG_BLK_DEV_LOOP=m:CONFIG_BLK_DEV_LOOP=y:" $1
1068 sed -i "s:CONFIG_ISO9660_FS=m:CONFIG_ISO9660_FS=y:" $1
1069 sed -i "s:CONFIG_NLS_UTF8=m:CONFIG_NLS_UTF8=y:" $1
1074 # is this a special kernel we want to build?
1075 Config="%{_target_base_arch}"
1076 KernelVer=%{kernel_release}
1077 echo "Building config file using $Config.conf..."
1078 cat $RPM_SOURCE_DIR/kernel-$Config.config > %{defconfig}
1079 ./kernel-config.py %{_target_base_arch} $RPM_SOURCE_DIR/kernel-multiarch.config \
1080 %{defconfig} %{defconfig}
1081 TuneUpConfigForIX86 %{defconfig}
1084 cat %{SOURCE40} >> %{defconfig}
1087 cat %{SOURCE41} >> %{defconfig}
1090 %if %{with tuxonice}
1091 %ifarch %{ix86} %{x8664} ia64 ppc ppc64
1092 cat %{SOURCE42} >> %{defconfig}
1095 sed -i "s:CONFIG_TOI=y:# CONFIG_TOI is not set:" %{defconfig}
1100 cat %{SOURCE43} >> %{defconfig}
1102 sed -i "s:CONFIG_IPV6=y:CONFIG_IPV6=m:" %{defconfig}
1107 sed -i "s:CONFIG_IPV6=.:# CONFIG_IPV6 is not set:" %{defconfig}
1110 # grsecurity & pax stuff
1113 %if %{with pax_full}
1114 cat %{SOURCE45} >> %{defconfig}
1115 cat %{SOURCE49} >> %{defconfig}
1116 PaXconfig %{defconfig}
1119 %if %{with grsec_full}
1120 cat %{SOURCE45} >> %{defconfig}
1121 cat %{SOURCE50} >> %{defconfig}
1123 %if %{with grsec_minimal}
1124 cat %{SOURCE51} >> %{defconfig}
1129 cat %{SOURCE49} >> %{defconfig}
1130 PaXconfig %{defconfig}
1135 # Temporary disabled RELOCATABLE. Needed only on x86??
1136 %if %{with pax} || %{with grsec_full}
1137 sed -i "s:CONFIG_RELOCATABLE=y:# CONFIG_RELOCATABLE is not set:" %{defconfig}
1141 # end of grsecurity & pax stuff
1144 cat %{SOURCE55} >> %{defconfig}
1148 cat %{SOURCE57} >> %{defconfig}
1152 cat %{SOURCE56} >> %{defconfig}
1156 cat %{SOURCE46} >> %{defconfig}
1160 cat %{SOURCE47} >> %{defconfig}
1163 %if %{with fbcondecor}
1164 echo "CONFIG_FB_CON_DECOR=y" >> %{defconfig}
1166 echo "CONFIG_BOOTSPLASH=y" >> %{defconfig}
1170 sed -i "s:CONFIG_NFS_FS=m:CONFIG_NFS_FS=y:" %{defconfig}
1171 echo "CONFIG_ROOT_NFS=y" >> %{defconfig}
1174 %if %{with rescuecd}
1175 RescueConfig %{defconfig}
1178 # apparmor, will be moved to external file if works
1179 %if %{with apparmor}
1180 echo CONFIG_SECURITY_APPARMOR=y >> %{defconfig}
1181 echo CONFIG_SECURITY_APPARMOR_BOOTPARAM_VALUE=1 >> %{defconfig}
1182 echo "# CONFIG_SECURITY_APPARMOR_DISABLE is not set" >> %{defconfig}
1183 # patch for unionfs not ready yet
1184 sed -i "s:CONFIG_UNION_FS=m:# CONFIG_UNION_FS is not set:" %{defconfig}
1185 # some conflict with smack, todo
1186 sed -i "s:CONFIG_SECURITY_SMACK=y:# CONFIG_SECURITY_SMACK is not set:" %{defconfig}
1189 %{?debug:sed -i "s:# CONFIG_DEBUG_SLAB is not set:CONFIG_DEBUG_SLAB=y:" %{defconfig}}
1190 %{?debug:sed -i "s:# CONFIG_DEBUG_PREEMPT is not set:CONFIG_DEBUG_PREEMPT=y:" %{defconfig}}
1191 %{?debug:sed -i "s:# CONFIG_RT_DEADLOCK_DETECT is not set:CONFIG_RT_DEADLOCK_DETECT=y:" %{defconfig}}
1197 echo "Building kernel $1 ..."
1198 %{__make} %CrossOpts mrproper \
1199 RCS_FIND_IGNORE='-name build-done -prune -o'
1200 ln -sf %{defconfig} .config
1202 %{__make} %CrossOpts clean \
1203 RCS_FIND_IGNORE='-name build-done -prune -o'
1204 %{__make} %CrossOpts include/linux/version.h \
1205 %{?with_verbose:V=1}
1207 %{__make} %CrossOpts scripts/mkcompile_h \
1208 %{?with_verbose:V=1}
1210 # make does vmlinux, modules and bzImage at once
1212 %{__make} %CrossOpts image \
1213 %{?with_verbose:V=1}
1215 %{__make} %CrossOpts modules \
1216 %{?with_verbose:V=1}
1218 %{__make} %CrossOpts \
1219 %{?with_verbose:V=1}
1223 PreInstallKernel() {
1224 Config="%{_target_base_arch}"
1225 KernelVer=%{kernel_release}
1227 mkdir -p $KERNEL_INSTALL_DIR/boot
1228 install System.map $KERNEL_INSTALL_DIR/boot/System.map-$KernelVer
1229 %ifarch %{ix86} %{x8664}
1230 install arch/x86/boot/bzImage $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
1231 install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinux-$KernelVer
1233 %ifarch alpha sparc sparc64
1234 gzip -cfv vmlinux > vmlinuz
1235 install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinux-$KernelVer
1236 install vmlinuz $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
1238 elftoaout arch/sparc/boot/image -o vmlinux.aout
1239 install vmlinux.aout $KERNEL_INSTALL_DIR/boot/vmlinux.aout-$KernelVer
1242 elftoaout arch/sparc64/boot/image -o vmlinux.aout
1243 install vmlinux.aout $KERNEL_INSTALL_DIR/boot/vmlinux.aout-$KernelVer
1247 install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinux-$KernelVer
1248 install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
1251 %{__make} -f Makefile.ppclibs install \
1252 DESTDIR=$KERNEL_INSTALL_DIR/boot/libs-$KernelVer
1255 gzip -cfv vmlinux > vmlinuz
1256 install -d $KERNEL_INSTALL_DIR/boot/efi
1257 install vmlinuz $KERNEL_INSTALL_DIR/boot/efi/vmlinuz-$KernelVer
1258 ln -sf efi/vmlinuz-$KernelVer $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
1261 install arch/arm/boot/zImage $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
1264 %{__make} %CrossOpts modules_install \
1265 %{?with_verbose:V=1} \
1267 INSTALL_MOD_PATH=$KERNEL_INSTALL_DIR \
1268 KERNELRELEASE=$KernelVer
1270 # You'd probabelly want to make it somewhat different
1271 install -d $KERNEL_INSTALL_DIR%{_kernelsrcdir}
1272 install Module.symvers $KERNEL_INSTALL_DIR%{_kernelsrcdir}/Module.symvers-dist
1274 echo "CHECKING DEPENDENCIES FOR KERNEL MODULES"
1275 if [ %DepMod = /sbin/depmod ]; then
1276 /sbin/depmod --basedir $KERNEL_INSTALL_DIR -ae -F $KERNEL_INSTALL_DIR/boot/System.map-$KernelVer -r $KernelVer || :
1278 touch $KERNEL_INSTALL_DIR/lib/modules/$KernelVer/modules.dep
1279 echo "KERNEL RELEASE $KernelVer DONE"
1282 KERNEL_BUILD_DIR=`pwd`
1283 echo "-%{_localversion}" > localversion
1285 KERNEL_INSTALL_DIR="$KERNEL_BUILD_DIR/build-done/kernel"
1286 rm -rf $KERNEL_INSTALL_DIR
1287 %if %{without myown}
1290 cat $RPM_SOURCE_DIR/kernel-myown.config > %{defconfig}
1292 ln -sf %{defconfig} .config
1293 install -d $KERNEL_INSTALL_DIR%{_kernelsrcdir}/include/linux
1294 rm -f include/linux/autoconf.h
1295 %{__make} %CrossOpts include/linux/autoconf.h
1296 install include/linux/autoconf.h \
1297 $KERNEL_INSTALL_DIR%{_kernelsrcdir}/include/linux/autoconf-dist.h
1299 $KERNEL_INSTALL_DIR%{_kernelsrcdir}/config-dist
1303 %{__make} %CrossOpts include/linux/utsrelease.h
1304 cp include/linux/utsrelease.h{,.save}
1305 cp include/linux/version.h{,.save}
1306 cp scripts/mkcompile_h{,.save}
1309 rm -rf $RPM_BUILD_ROOT
1312 export DEPMOD=%DepMod
1314 install -d $RPM_BUILD_ROOT%{_kernelsrcdir}
1315 install -d $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/%{kernel_release}
1317 # test if we can hardlink -- %{_builddir} and $RPM_BUILD_ROOT on same partition
1318 if cp -al COPYING $RPM_BUILD_ROOT/COPYING 2>/dev/null; then
1320 rm -f $RPM_BUILD_ROOT/COPYING
1323 KERNEL_BUILD_DIR=`pwd`
1325 cp -a$l $KERNEL_BUILD_DIR/build-done/kernel/* $RPM_BUILD_ROOT
1327 if [ -e $RPM_BUILD_ROOT/lib/modules/%{kernel_release} ] ; then
1328 rm -f $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/build
1329 ln -sf %{_kernelsrcdir} $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/build
1330 install -d $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/{cluster,misc}
1333 find . -maxdepth 1 ! -name "build-done" ! -name "." -exec cp -a$l "{}" "$RPM_BUILD_ROOT%{_kernelsrcdir}/" ";"
1335 cd $RPM_BUILD_ROOT%{_kernelsrcdir}
1337 %{__make} %CrossOpts mrproper archclean \
1338 RCS_FIND_IGNORE='-name build-done -prune -o'
1340 if [ -e $KERNEL_BUILD_DIR/build-done/kernel%{_kernelsrcdir}/include/linux/autoconf-dist.h ]; then
1341 install $KERNEL_BUILD_DIR/build-done/kernel%{_kernelsrcdir}/include/linux/autoconf-dist.h \
1342 $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux
1343 install $KERNEL_BUILD_DIR/build-done/kernel%{_kernelsrcdir}/config-dist \
1344 $RPM_BUILD_ROOT%{_kernelsrcdir}
1347 cp -Rdp$l $KERNEL_BUILD_DIR/include/linux/* \
1348 $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux
1350 %{__make} %CrossOpts mrproper
1351 mv -f include/linux/utsrelease.h.save $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux/utsrelease.h
1352 cp include/linux/version.h{.save,}
1353 cp scripts/mkcompile_h{.save,}
1354 rm -rf include/linux/version.h.save
1355 rm -rf scripts/mkcompile_h.save
1356 install %{SOURCE3} $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux/autoconf.h
1357 install %{SOURCE4} $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux/config.h
1359 # collect module-build files and directories
1360 perl %{SOURCE7} %{_kernelsrcdir} $KERNEL_BUILD_DIR
1363 touch $RPM_BUILD_ROOT%{initrd_dir}/initrd-%{kernel_release}.gz
1365 # rpm obeys filelinkto checks for ghosted symlinks, convert to files
1366 rm -f $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/{build,source}
1367 touch $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/{build,source}
1369 # remove unnecessary dir with dead symlink
1370 rm -rf $RPM_BUILD_ROOT/arch/i386
1373 rm -rf $RPM_BUILD_ROOT
1376 if [ -x /sbin/new-kernel-pkg ]; then
1377 /sbin/new-kernel-pkg --remove %{kernel_release}
1382 mv -f /boot/efi/vmlinuz{,.old} 2> /dev/null
1383 %{?_alt_kernel:mv -f /boot/efi/vmlinuz%{_alt_kernel}{,.old} 2> /dev/null}
1384 ln -sf vmlinuz-%{kernel_release} /boot/efi/vmlinuz
1385 %{?_alt_kernel:ln -sf vmlinuz-%{kernel_release} /boot/efi/vmlinuz%{_alt_kernel}}
1387 mv -f /boot/vmlinuz{,.old} 2> /dev/null
1388 %{?_alt_kernel:mv -f /boot/vmlinuz%{_alt_kernel}{,.old} 2> /dev/null}
1389 mv -f /boot/System.map{,.old} 2> /dev/null
1390 %{?_alt_kernel:mv -f /boot/System%{_alt_kernel}.map{,.old} 2> /dev/null}
1391 ln -sf vmlinuz-%{kernel_release} /boot/vmlinuz
1392 %{?_alt_kernel:ln -sf vmlinuz-%{kernel_release} /boot/vmlinuz%{_alt_kernel}}
1393 ln -sf System.map-%{kernel_release} /boot/System.map
1394 %{?_alt_kernel:ln -sf System.map-%{kernel_release} /boot/System.map%{_alt_kernel}}
1396 %depmod %{kernel_release}
1398 /sbin/geninitrd -f --initrdfs=rom %{initrd_dir}/initrd-%{kernel_release}.gz %{kernel_release}
1399 mv -f %{initrd_dir}/initrd{,.old} 2> /dev/null
1400 %{?_alt_kernel:mv -f %{initrd_dir}/initrd%{_alt_kernel}{,.old} 2> /dev/null}
1401 ln -sf initrd-%{kernel_release}.gz %{initrd_dir}/initrd
1402 %{?_alt_kernel:ln -sf initrd-%{kernel_release}.gz %{initrd_dir}/initrd%{_alt_kernel}}
1404 if [ -x /sbin/new-kernel-pkg ]; then
1405 if [ -f /etc/pld-release ]; then
1406 title=$(sed 's/^[0-9.]\+ //' < /etc/pld-release)
1411 ext='%{_alt_kernel}'
1416 /sbin/new-kernel-pkg --initrdfile=%{initrd_dir}/initrd-%{kernel_release}.gz --install %{kernel_release} --banner "$title"
1417 elif [ -x /sbin/rc-boot ]; then
1418 /sbin/rc-boot 1>&2 || :
1422 mv -f /boot/vmlinux{,.old} 2> /dev/null
1423 %{?alt_kernel:mv -f /boot/vmlinux-%{alt_kernel}{,.old} 2> /dev/null}
1424 ln -sf vmlinux-%{kernel_release} /boot/vmlinux
1425 %{?alt_kernel:ln -sf vmlinux-%{kernel_release} /boot/vmlinux-%{alt_kernel}}
1428 %{_sbindir}/mkvmlinuz /boot/zImage-%{kernel_release} %{kernel_release}
1431 %depmod %{kernel_release}
1434 %depmod %{kernel_release}
1437 %depmod %{kernel_release}
1440 %depmod %{kernel_release}
1443 %depmod %{kernel_release}
1446 %depmod %{kernel_release}
1449 %depmod %{kernel_release}
1452 %depmod %{kernel_release}
1455 ln -snf %{basename:%{_kernelsrcdir}} %{_prefix}/src/linux%{_alt_kernel}
1458 if [ "$1" = "0" ]; then
1459 if [ -L %{_prefix}/src/linux%{_alt_kernel} ]; then
1460 if [ "$(readlink %{_prefix}/src/linux%{_alt_kernel})" = "linux%{_alt_kernel}-%{version}" ]; then
1461 rm -f %{_prefix}/src/linux%{_alt_kernel}
1466 %triggerin module-build -- %{name} = %{epoch}:%{version}-%{release}
1467 ln -sfn %{_kernelsrcdir} /lib/modules/%{kernel_release}/build
1468 ln -sfn %{_kernelsrcdir} /lib/modules/%{kernel_release}/source
1470 %triggerun module-build -- %{name} = %{epoch}:%{version}-%{release}
1471 if [ "$1" = 0 ]; then
1472 rm -f /lib/modules/%{kernel_release}/{build,source}
1476 %defattr(644,root,root,755)
1477 %ifarch sparc sparc64
1478 /boot/vmlinux.aout-%{kernel_release}
1481 /boot/efi/vmlinuz-%{kernel_release}
1483 /boot/vmlinuz-%{kernel_release}
1484 /boot/System.map-%{kernel_release}
1485 %ghost %{initrd_dir}/initrd-%{kernel_release}.gz
1486 %dir /lib/modules/%{kernel_release}
1487 %dir /lib/modules/%{kernel_release}/kernel
1489 /lib/modules/%{kernel_release}/kernel/arch
1491 /lib/modules/%{kernel_release}/kernel/crypto
1492 /lib/modules/%{kernel_release}/kernel/drivers
1493 %if %{have_drm} && %{without myown}
1494 %exclude /lib/modules/%{kernel_release}/kernel/drivers/char/drm
1496 /lib/modules/%{kernel_release}/kernel/fs
1498 # this directory will be removed after disabling rcutorture mod. in 2.6.20.
1499 /lib/modules/%{kernel_release}/kernel/kernel
1501 /lib/modules/%{kernel_release}/kernel/lib
1502 /lib/modules/%{kernel_release}/kernel/net
1503 %if %{have_sound} && %{without myown}
1504 %dir /lib/modules/%{kernel_release}/kernel/sound
1505 /lib/modules/%{kernel_release}/kernel/sound/ac97_bus.ko*
1506 /lib/modules/%{kernel_release}/kernel/sound/sound*.ko*
1508 %exclude /lib/modules/%{kernel_release}/kernel/drivers/media/video/cx88/cx88-alsa.ko*
1509 %exclude /lib/modules/%{kernel_release}/kernel/drivers/media/video/em28xx/em28xx-alsa.ko*
1510 %exclude /lib/modules/%{kernel_release}/kernel/drivers/media/video/saa7134/saa7134-alsa.ko*
1513 %dir /lib/modules/%{kernel_release}/misc
1514 %if %{with pcmcia} && %{without myown}
1515 %dir /lib/modules/%{kernel_release}/kernel/drivers/pcmcia
1516 /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/pcmcia*ko*
1517 %exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/[!p]*
1518 %exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/pd6729.ko*
1519 %exclude /lib/modules/%{kernel_release}/kernel/drivers/*/pcmcia
1520 %if %{without rescuecd}
1521 %exclude /lib/modules/%{kernel_release}/kernel/drivers/ata/pata_pcmcia.ko*
1522 %exclude /lib/modules/%{kernel_release}/kernel/drivers/bluetooth/*_cs.ko*
1523 %exclude /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/avm_cs.ko*
1524 %exclude /lib/modules/%{kernel_release}/kernel/drivers/telephony/ixj_pcmcia.ko*
1525 %exclude /lib/modules/%{kernel_release}/kernel/drivers/usb/gadget/g_midi.ko*
1527 %exclude /lib/modules/%{kernel_release}/kernel/drivers/ide/legacy/ide-cs.ko*
1528 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/*_cs.ko*
1529 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/b43
1530 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/hostap/hostap_cs.ko*
1531 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/libertas/*_cs.ko*
1532 %exclude /lib/modules/%{kernel_release}/kernel/drivers/parport/parport_cs.ko*
1533 %exclude /lib/modules/%{kernel_release}/kernel/drivers/serial/serial_cs.ko*
1534 %exclude /lib/modules/%{kernel_release}/kernel/drivers/usb/host/sl811_cs.ko*
1536 %ghost /lib/modules/%{kernel_release}/modules.*
1537 # symlinks pointing to kernelsrcdir
1538 %ghost /lib/modules/%{kernel_release}/build
1539 %ghost /lib/modules/%{kernel_release}/source
1540 %dir %{_sysconfdir}/modprobe.d/%{kernel_release}
1542 %ifarch alpha %{ix86} %{x8664} ppc ppc64 sparc sparc64
1544 %defattr(644,root,root,755)
1545 /boot/vmlinux-%{kernel_release}
1548 %if %{have_drm} && %{without myown}
1550 %defattr(644,root,root,755)
1551 /lib/modules/%{kernel_release}/kernel/drivers/char/drm
1554 %if %{with pcmcia} && %{without myown}
1556 %defattr(644,root,root,755)
1557 /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/*ko*
1558 /lib/modules/%{kernel_release}/kernel/drivers/*/pcmcia
1559 %exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/pcmcia*ko*
1560 %if %{without rescuecd}
1561 /lib/modules/%{kernel_release}/kernel/drivers/bluetooth/*_cs.ko*
1562 /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/avm_cs.ko*
1563 /lib/modules/%{kernel_release}/kernel/drivers/telephony/ixj_pcmcia.ko*
1565 /lib/modules/%{kernel_release}/kernel/drivers/ata/pata_pcmcia.ko*
1566 /lib/modules/%{kernel_release}/kernel/drivers/ide/legacy/ide-cs.ko*
1567 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/*_cs.ko*
1568 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/b43
1569 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/hostap/hostap_cs.ko*
1570 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/libertas/*_cs.ko*
1571 /lib/modules/%{kernel_release}/kernel/drivers/parport/parport_cs.ko*
1572 /lib/modules/%{kernel_release}/kernel/drivers/serial/serial_cs.ko*
1573 /lib/modules/%{kernel_release}/kernel/drivers/usb/host/sl811_cs.ko*
1577 %if "%{_arch}" == "ppc"
1579 %defattr(644,root,root,755)
1580 %dir /boot/libs-%{kernel_release}
1581 /boot/libs-%{kernel_release}/common
1582 /boot/libs-%{kernel_release}/kernel
1583 /boot/libs-%{kernel_release}/lib
1584 /boot/libs-%{kernel_release}/of1275
1585 /boot/libs-%{kernel_release}/openfirmware
1586 /boot/libs-%{kernel_release}/simple
1587 %dir /boot/libs-%{kernel_release}/utils
1588 %attr(755,root,root) /boot/libs-%{kernel_release}/utils/*
1589 /boot/libs-%{kernel_release}/ld.script
1593 %if %{have_sound} && %{without myown}
1595 %defattr(644,root,root,755)
1596 /lib/modules/%{kernel_release}/kernel/sound
1597 %exclude %dir /lib/modules/%{kernel_release}/kernel/sound
1598 %exclude /lib/modules/%{kernel_release}/kernel/sound/ac97_bus.ko*
1599 %exclude /lib/modules/%{kernel_release}/kernel/sound/sound*.ko*
1601 %exclude /lib/modules/%{kernel_release}/kernel/sound/oss
1604 /lib/modules/%{kernel_release}/kernel/drivers/usb/gadget/g_midi.ko*
1605 /lib/modules/%{kernel_release}/kernel/drivers/media/video/cx88/cx88-alsa.ko*
1606 /lib/modules/%{kernel_release}/kernel/drivers/media/video/em28xx/em28xx-alsa.ko*
1607 /lib/modules/%{kernel_release}/kernel/drivers/media/video/saa7134/saa7134-alsa.ko*
1610 %if %{have_oss} && %{without myown}
1612 %defattr(644,root,root,755)
1613 /lib/modules/%{kernel_release}/kernel/sound/oss
1618 %defattr(644,root,root,755)
1619 %dir %{_kernelsrcdir}
1620 %{_kernelsrcdir}/include
1621 %{_kernelsrcdir}/config-dist
1622 %{_kernelsrcdir}/Module.symvers-dist
1624 %files module-build -f aux_files
1625 %defattr(644,root,root,755)
1626 # symlinks pointint to kernelsrcdir
1627 %dir /lib/modules/%{kernel_release}
1628 /lib/modules/%{kernel_release}/build
1629 %{_kernelsrcdir}/Kbuild
1630 %{_kernelsrcdir}/localversion
1631 %{_kernelsrcdir}/arch/*/kernel/asm-offsets*
1632 %{_kernelsrcdir}/arch/*/kernel/sigframe*.h
1633 %{_kernelsrcdir}/drivers/lguest/lg.h
1634 %dir %{_kernelsrcdir}/scripts
1635 %dir %{_kernelsrcdir}/scripts/kconfig
1636 %{_kernelsrcdir}/scripts/Kbuild.include
1637 %{_kernelsrcdir}/scripts/Makefile*
1638 %{_kernelsrcdir}/scripts/basic
1639 %{_kernelsrcdir}/scripts/mkmakefile
1640 %{_kernelsrcdir}/scripts/mod
1641 %{_kernelsrcdir}/scripts/setlocalversion
1642 %{_kernelsrcdir}/scripts/*.c
1643 %{_kernelsrcdir}/scripts/*.sh
1644 %{_kernelsrcdir}/scripts/kconfig/*
1645 %{_kernelsrcdir}/scripts/mkcompile_h
1648 %defattr(644,root,root,755)
1649 %dir %{_kernelsrcdir}
1650 %{_kernelsrcdir}/Documentation
1653 %files source -f aux_files_exc
1654 %defattr(644,root,root,755)
1655 %{_kernelsrcdir}/arch/*/[!Mk]*
1656 %{_kernelsrcdir}/arch/*/kernel/[!M]*
1657 %{_kernelsrcdir}/arch/x86/kvm
1658 %exclude %{_kernelsrcdir}/arch/*/kernel/asm-offsets*
1659 %exclude %{_kernelsrcdir}/arch/*/kernel/sigframe*.h
1660 %exclude %{_kernelsrcdir}/drivers/lguest/lg.h
1661 %{_kernelsrcdir}/block
1662 %{_kernelsrcdir}/crypto
1663 %{_kernelsrcdir}/drivers
1665 %if %{with grsecurity} && %{without rescuecd}
1666 %{_kernelsrcdir}/grsecurity
1668 %{_kernelsrcdir}/init
1669 %{_kernelsrcdir}/ipc
1670 %{_kernelsrcdir}/kernel
1671 %{_kernelsrcdir}/lib
1673 %{_kernelsrcdir}/net
1674 %{_kernelsrcdir}/virt
1675 %{_kernelsrcdir}/scripts/*
1676 %exclude %{_kernelsrcdir}/scripts/Kbuild.include
1677 %exclude %{_kernelsrcdir}/scripts/Makefile*
1678 %exclude %{_kernelsrcdir}/scripts/basic
1679 %exclude %{_kernelsrcdir}/scripts/kconfig
1680 %exclude %{_kernelsrcdir}/scripts/mkmakefile
1681 %exclude %{_kernelsrcdir}/scripts/mod
1682 %exclude %{_kernelsrcdir}/scripts/setlocalversion
1683 %exclude %{_kernelsrcdir}/scripts/*.c
1684 %exclude %{_kernelsrcdir}/scripts/*.sh
1685 %{_kernelsrcdir}/sound
1686 %{_kernelsrcdir}/security
1687 %{_kernelsrcdir}/usr
1688 %{_kernelsrcdir}/COPYING
1689 %{_kernelsrcdir}/CREDITS
1690 %{_kernelsrcdir}/MAINTAINERS
1691 %{_kernelsrcdir}/README
1692 %{_kernelsrcdir}/REPORTING-BUGS
1693 %{_kernelsrcdir}/.mailmap