]> git.pld-linux.org Git - packages/kernel.git/blame - kernel.spec
- no makefile part
[packages/kernel.git] / kernel.spec
CommitLineData
9b3bab6e 1#
3734e33d 2# TODO:
c3ea9043 3# - benchmark NO_HZ & HZ=1000 vs HZ=300 on i686
b02a74a2 4# - apparmor (needs testing)
fd9a5985 5# - add a subpackage (kernel-firmware?) for ~35 firmware files
32f36d00 6#
347a6801 7# FUTURE:
8dee06f0 8# - update xen patch
2c421faa 9# - pom-ng quake3-conntrack-nat -> nf_conntrack ?
2c421faa 10# - pom-ng talk-conntrack-nat -> nf_conntrack ?
11# - nf-hipac ?
12# - pax hooks for selinux (experimental)
c800013b 13#
ade3916a 14# Conditional build:
25204d32 15%bcond_without source # don't build kernel-source package
f8f3b973 16%bcond_without pcmcia # don't build pcmcia
2245b68b 17
25204d32 18%bcond_with verbose # verbose build (V=1)
de0d7ee0 19%bcond_with xen0 # added Xen0 support
20%bcond_with xenU # added XenU support
2c421faa 21%bcond_without reiser4 # support for reiser4 fs (experimental)
ceb42b9b 22
2c421faa 23%bcond_without grsecurity # don't build grsecurity nor pax at all
dcc54002 24%bcond_without grsec_minimal # build only minimal subset (proc,link,fifo,shm)
aa4545a7 25%bcond_without grsec_full # build full grsecurity
2c421faa 26%bcond_with pax_full # build pax and full grsecurity (ie. grsec_full && pax)
27%bcond_with pax # build pax support
acbe79ff 28
275eff18 29%bcond_with fbcondecor # build fbcondecor (disable FB_TILEBLITTING and affected fb modules)
740dff65
JR
30%bcond_with pae # build PAE (HIGHMEM64G) support on uniprocessor
31%bcond_with nfsroot # build with root on NFS support
32
0ff9fabf 33%bcond_with imq # imq support
2c421faa 34%bcond_without wrr # wrr support
28713bdb 35%bcond_without ipv6 # ipv6 support
2c421faa 36
e28463de 37%bcond_without vserver # support for VServer (enabled by default)
edfcc0e8 38%bcond_without tuxonice # support for tuxonice (ex-suspend2) (enabled by default)
aa4545a7 39%bcond_without apparmor # build kernel with apparmor (exerimental mix)
438dc343 40
512e1dc7 41%bcond_with rescuecd # build kernel for our rescue
42
39258f30 43%bcond_without smp # build uniprocessor instead of SMP kernel
2a261cfb 44%bcond_with myown # build with your own config (kernel-myown.config)
45
ade3916a 46%{?debug:%define with_verbose 1}
01ebb9c5 47
60d1c35d 48%if %{without grsecurity}
dcc54002
JR
49%undefine with_grsec_full
50%undefine with_grsec_minimal
60d1c35d 51%undefine with_pax
2c421faa 52%undefine with_pax_full
dcc54002
JR
53%endif
54
2c421faa 55%if %{with pax_full}
dcc54002 56%undefine with_grsec_minimal
2c421faa 57%define with_grsec_full 1
8fb7cd9b 58%define with_grsecurity 1
2c421faa 59%define with_pax 1
dcc54002
JR
60%endif
61
60d1c35d 62%if %{with grsec_full}
63%undefine with_grsec_minimal
64%define with_grsecurity 1
f8f172f4 65%if %{with pax}
66%define with_pax_full 1
f8f172f4 67%endif
60d1c35d 68%endif
83830b16 69
70%if %{with grsec_minimal}
dcc54002 71%undefine with_grsec_full
2c421faa 72%undefine with_pax_full
8fb7cd9b 73%define with_grsecurity 1
b7b28388 74%endif
8adc256a 75
fbb03e0d
JB
76%define have_drm 1
77%define have_oss 1
78%define have_sound 1
79
512e1dc7 80%if %{with rescuecd}
2b7a2411 81%undefine with_apparmor
a52b9424 82%undefine with_tuxonice
512e1dc7 83%undefine with_grsec_full
a52b9424 84%undefine with_grsec_minimal
512e1dc7 85%undefine with_pax
86%undefine with_pax_full
a52b9424 87%undefine with_vserver
512e1dc7 88%define have_drm 0
89%define have_sound 0
90%endif
91
7291f0f8
JB
92%ifarch %{ix86} alpha ppc
93%define have_isa 1
94%else
95%define have_isa 0
96%endif
97
fbb03e0d
JB
98%ifarch sparc sparc64
99%undefine with_pcmcia
100%define have_drm 0
101%define have_oss 0
102%endif
103
52bb7759 104%define basever 2.6.27
7c796d57 105%define postver .10
c4a95a73 106%define rel 3
c2921d44 107
b620d240 108%define _enable_debug_packages 0
01ebb9c5 109
2f86595b 110%define squashfs_version 3.4
0075ac0c 111%define tuxonice_version 3.0-rc7a
3f5783f6 112%define netfilter_snap 20070806
c5fcccf8 113%define xen_version 3.0.2
114
2c6c1761 115%if %{without rescuecd}
249a4c7b 116%define __alt_kernel %{?with_pax:pax}%{!?with_grsec_full:nogrsecurity}%{!?with_apparmor:noaa}%{?with_xen0:xen0}%{?with_xenU:xenU}%{?with_pae:pae}%{?with_myown:myown}
2c6c1761 117%else
249a4c7b
ER
118%define __alt_kernel rescuecd
119%endif
120
121%if "%{__alt_kernel}" != ""
122%define alt_kernel %{__alt_kernel}
2c6c1761 123%endif
869e45ec 124
125# kernel release (used in filesystem and eventually in uname -r)
126# modules will be looked from /lib/modules/%{kernel_release}
52bb7759 127# localversion is just that without version for "> localversion"
249a4c7b
ER
128%define localversion %{rel}
129%define kernel_release %{version}%{?alt_kernel:_%{alt_kernel}}-%{localversion}
869e45ec 130
601b4e87 131Summary: The Linux kernel (the core of the Linux operating system)
2c421faa 132Summary(de.UTF-8): Der Linux-Kernel (Kern des Linux-Betriebssystems)
133Summary(et.UTF-8): Linuxi kernel (ehk operatsioonisüsteemi tuum)
134Summary(fr.UTF-8): Le Kernel-Linux (La partie centrale du systeme)
135Summary(pl.UTF-8): Jądro Linuksa
869e45ec 136Name: kernel%{_alt_kernel}
52bb7759
JB
137Version: %{basever}%{postver}
138Release: %{rel}
120b079f 139Epoch: 3
1da2cf6b 140License: GPL v2
601b4e87 141Group: Base/Kernel
52bb7759 142Source0: http://www.kernel.org/pub/linux/kernel/v2.6/linux-%{basever}.tar.bz2
831f60a4 143# Source0-md5: b3e78977aa79d3754cb7f8143d7ddabd
52bb7759 144%if "%{postver}" != "%{nil}"
38c14daa 145Source1: http://www.kernel.org/pub/linux/kernel/v2.6/patch-%{version}.bz2
7c796d57 146# Source1-md5: 82691ff96bff9b4fa19f91b69a9695f9
38c14daa 147%endif
2c421faa 148
38c14daa 149Source3: kernel-autoconf.h
150Source4: kernel-config.h
1362b2d9 151Source5: kernel-ppclibs.Makefile
55ee54ad 152Source6: kernel-config.awk
9d867cd0 153Source7: kernel-module-build.pl
75287058 154Source8: kernel-track-config-change.awk
155# not used by kernel.spec, but it's good to have it in SOURCES
156Source9: kernel-config-sort.pl
8a9df004 157
fa35f1bb 158Source20: kernel-multiarch.config
159Source21: kernel-x86.config
2c421faa 160Source22: kernel-sparc.config
161Source23: kernel-sparc64.config
162Source24: kernel-alpha.config
fa35f1bb 163Source25: kernel-powerpc.config
2c421faa 164Source26: kernel-ia64.config
2c421faa 165
d04db8e4 166Source40: kernel-netfilter.config
20a19493 167Source41: kernel-patches.config
e8c0537c 168Source42: kernel-tuxonice.config
36f2faae 169Source43: kernel-vserver.config
dcc54002 170Source45: kernel-grsec.config
de0d7ee0 171Source46: kernel-xen0.config
172Source47: kernel-xenU.config
f0c5ac07 173
60d1c35d 174Source49: kernel-pax.config
175Source50: kernel-no-pax.config
2c421faa 176Source51: kernel-grsec_minimal.config
347a6801 177Source55: kernel-imq.config
2c421faa 178Source56: kernel-reiser4.config
179Source57: kernel-wrr.config
edb27ca0 180
512e1dc7 181Source58: kernel-inittmpfs.config
edb27ca0 182Source59: kernel-bzip2-lzma.config
60d1c35d 183
8c2bf331
PS
184# tahoe9xx http://www.tahoe.pl/drivers/tahoe9xx-2.6.24.patch
185Patch2: tahoe9xx-2.6.24.patch
e43054fa 186
16a7bd96 187# http://dev.gentoo.org/~spock/projects/fbcondecor/archive/fbcondecor-0.9.4-2.6.25-rc6.patch
275eff18
PS
188Patch3: kernel-fbcondecor.patch
189Patch4: linux-fbcon-margins.patch
bc31f1fe 190
2f86595b 191# http://mesh.dl.sourceforge.net/sourceforge/squashfs/squashfs3.4.tgz
192# squashfs3.4/kernel-patches/linux-2.6.27-rc4/squashfs3.4-patch
275eff18
PS
193Patch5: kernel-squashfs.patch
194Patch6: linux-static-dev.patch
66d8ded9 195
88f0e9ff 196# netfilter related stuff mostly based on patch-o-matic-ng
197# snapshot 20061213 with some fixes related to changes in
e28463de 198# netfilter api in 2.6.19 up to 2.6.22. Some modules
88f0e9ff 199# were ported to nf_conntrack. Some of these are unique.
200
201Patch10: kernel-pom-ng-IPV4OPTSSTRIP.patch
202Patch11: kernel-pom-ng-ipv4options.patch
b57ddbed 203
28713bdb 204Patch14: kernel-pom-ng-ROUTE.patch
88f0e9ff 205Patch16: kernel-pom-ng-mms-conntrack-nat.patch
f5fbd9ea 206Patch22: kernel-pom-ng-rsh.patch
253b8b20 207Patch23: kernel-pom-ng-rpc.patch
88f0e9ff 208
1fbbe25c 209# based on http://mike.it-loops.com/rtsp/rtsp-2.6.26.patch
78382233 210Patch36: kernel-nf_rtsp.patch
211
fcf7a306 212# http://ftp.linux-vserver.org/pub/people/dhozac/p/k/delta-owner-xid-feat02.diff
213Patch37: kernel-owner-xid.patch
214
2cd49126 215# based on http://www.svn.barbara.eu.org/ipt_account/attachment/wiki/Software/ipt_account-0.1.21-20070804164729.tar.gz?format=raw
216Patch38: kernel-ipt_account.patch
217
05219784 218# based on http://www.intra2net.com/de/produkte/opensource/ipt_account/pom-ng-ipt_ACCOUNT-1.12.tgz
d5d1afcf 219Patch39: kernel-ipt_ACCOUNT.patch
220
6f4d2f35 221# based on kernel-2.6.25-layer7-2.20.patch from
222# http://switch.dl.sourceforge.net/sourceforge/l7-filter/netfilter-layer7-v2.20.tar.gz
88f0e9ff 223Patch40: kernel-layer7.patch
e28463de 224
6f4d2f35 225# http://www.ssi.bg/~ja/nfct/ipvs-nfct-2.6.27-1.diff
28713bdb 226Patch41: kernel-ipvs-nfct.patch
227
97013b4b 228# based on http://www.balabit.com/downloads/files/tproxy/tproxy-kernel-2.6.25-20080509-164605-1210344365.tar.bz2
81a50533
PS
229#FIXME: this patch needs net_device->nd_dev feature (see net/Kconfig:NET_NS).
230# NET_NS depends on EXPERIMENTAL && !SYSFS && NAMESPACES while we have SYSFS enabled.
231# the https://lists.linux-foundation.org/pipermail/containers/2007-December/008849.html is waiting for merge.
232#Patch42: kernel-tproxy.patch
97013b4b 233
88f0e9ff 234### End netfilter
99bb556f 235
6f4d2f35 236# http://zph.bratcheda.org/linux-2.6.26.3-zph.patch
a60cb6c9 237Patch49: kernel-zph.patch
238
befdc142 239# based on http://www.linuximq.net/patchs/linux-2.6.24-imq.diff
c04b520b 240# some people report problems when using imq with wrr.
9a5f3f20 241# try unoficial version: http://kapturkiewicz.name/linux-2.6.25-imq1.diff
c04b520b 242Patch50: kernel-imq.patch
4170601d 243
831f60a4 244# http://www.kernel.org/pub/linux/kernel/people/edward/reiser4/reiser4-for-2.6/reiser4-for-2.6.27.patch.bz2
20a19493 245Patch51: kernel-reiser4.patch
32edb06c 246
05219784 247# http://www.zz9.dk/patches/wrr-linux-071203-2.6.25.patch.gz
248Patch52: kernel-wrr.patch
2c421faa 249
7d31896b 250# http://fatooh.org/esfq-2.6/sfq-2.6.24.1.tar.bz2
e7b9147e 251Patch53: esfq-kernel.patch
2c421faa 252
77e482ca 253# http://memebeam.org/free-software/toshiba_acpi/toshiba_acpi-dev_toshiba_test5-linux_2.6.26.patch
ed5063af 254Patch54: linux-2.6-toshiba_acpi.patch
77e482ca 255
b9f8c4e8 256# by Baggins request:
257# derived from ftp://ftp.cmf.nrl.navy.mil/pub/chas/linux-atm/vbr/vbr-kernel-diffs
7e77e535
JR
258Patch55: linux-2.6-atm-vbr.patch
259Patch56: linux-2.6-atmdd.patch
b9f8c4e8 260
dbfa210f 261# http://www.ntop.org/PF_RING.html 20070610
6344ff36 262Patch58: linux-PF_RING.patch
263
28713bdb 264# http://synce.svn.sourceforge.net/svnroot/synce/trunk/patches/linux-2.6.22-rndis_host-wm5.patch
265Patch59: kernel-rndis_host-wm5.patch
266
2eee54b8
PS
267Patch61: kernel-vesa-upstream.patch
268
c00d3452 269# Project suspend2 renamed to tuxonice
0075ac0c 270# http://www.tuxonice.net/downloads/all/tuxonice-3.0-rc7a-for-2.6.26.patch.bz2
2c421faa 271Patch69: linux-2.6-suspend2.patch
33a10a0a 272Patch70: kernel-suspend2-headers.patch
7897d3ff 273
60d1c35d 274# adds some ids for hostap suported cards and monitor_enable from/for aircrack-ng
2c421faa 275# http://patches.aircrack-ng.org/hostap-kernel-2.6.18.patch
60d1c35d 276Patch85: hostap-kernel-2.6.18.patch
277
410d7f63
JR
278# Taken from http://download.opensuse.org/factory/repo/src-oss/suse/src/kernel-source-2.6.27.7-3.1.src.rpm
279Patch90: kernel-mpt-fusion.patch
280
6d723150 281# http://vserver.13thfloor.at/Experimental/patch-2.6.27.6-vs2.3.0.36.2.diff
578002a9 282Patch100: linux-2.6-vs2.3.patch
1f3f622a 283Patch101: kernel-vserver-fixes.patch
a636f0fc 284
e32ba33b 285# from http://www.cl.cam.ac.uk/Research/SRG/netos/xen/downloads/xen-3.0.2-src.tgz
2c421faa 286#Patch120: xen-3.0-2.6.16.patch
e32ba33b 287
8b0541be 288# Wake-On-Lan fix for nForce drivers; using http://atlas.et.tudelft.nl/verwei90/nforce2/wol.html
289# Fix verified for that kernel version.
290Patch130: linux-2.6-forcedeth-WON.patch
291
4cef2f21 292# http://download.filesystems.org/unionfs/unionfs-2.x/unionfs-2.5_for_2.6.27-rc6.diff.gz
997e0ae9 293Patch140: kernel-unionfs.patch
4cef2f21 294Patch141: kernel-unionfs-apparmor.patch
60d6f988 295
627c4101
PS
296Patch142: kernel-autofs4-2.6.27-v5-update-20081027.patch
297
01053713
AM
298Patch150: kernel-ppc-crtsavres.patch
299
1b0af130 300Patch200: linux-2.6-ppc-ICE-hacks.patch
7e4e533b 301
e28463de 302# The following patch extend the routing functionality in Linux
303# to support static routes (defined by user), new way to use the
304# alternative routes, the reverse path protection (rp_filter),
305# the NAT processing to use correctly the routing when multiple
27d09b3b 306# gateways are used.
831f60a4 307# http://www.ssi.bg/~ja/routes-2.6.27-15.diff
2185d846 308Patch300: kernel-routes.patch
27d09b3b 309
ae0664f5 310Patch1000: linux-2.6-grsec-minimal.patch
9a991405 311
1b0af130 312Patch2000: kernel-small_fixes.patch
a636f0fc 313Patch2001: linux-2.6.21.1-pwc-uncompress.patch
9aa8852b 314Patch2002: kernel-netns-inet6-tw.patch
50e65954 315Patch2003: kernel-regressions.patch
2c421faa 316
2c421faa 317# kill some thousands of warnings
befdc142 318# (only warnings, so just remove parts of this patch if conflics)
2c421faa 319Patch2500: linux-2.6-warnings.patch
320
a02681d3 321# based on https://forgesvn1.novell.com/svn/apparmor/trunk/kernel-patches/2.6.27 rev 1303
322# repatched and adapted for vserver/grsec changes in vfs API, experimental
b02a74a2 323Patch5000: kernel-apparmor.patch
a02681d3 324# with grsec_full version
325Patch5001: kernel-apparmor-after-grsec_full.patch
326Patch5002: kernel-apparmor-common.patch
2c421faa 327
512e1dc7 328# for rescuecd
78382233 329# based on http://ftp.leg.uct.ac.za/pub/linux/rip/inittmpfs-2.6.14.diff.gz
512e1dc7 330Patch7000: kernel-inittmpfs.patch
6f4d2f35 331### based on http://udpcast.linux.lu/download/bzip2-lzma-kernel-2.6.26.3.patch.gz
332# http://lkml.org/lkml/2008/10/14/268
edb27ca0 333Patch7001: kernel-bzip2-lzma.patch
512e1dc7 334
2c421faa 335# not ready yet
336Patch9997: pax_selinux_hooks-2.6.20.patch
337
7c7ef692 338# based on http://www.grsecurity.net/~paxguy1/pax-linux-2.6.24.6-test45.patch
62d3f89b 339Patch9998: kernel-pax.patch
2c421faa 340
78f2a203 341# based on http://www.grsecurity.net/~spender/grsecurity-2.1.12-2.6.27.4-200810272314.patch
110a25bd 342Patch9999: linux-2.6-grsec_full.patch
2c421faa 343Patch10000: linux-2.6-grsec-caps.patch
344Patch10001: linux-2.6-grsec-common.patch
b769102c 345Patch10002: kernel-grsec_fixes.patch
7001cd3f 346Patch10003: linux-2.6-grsec-no-stupid-SoB.patch
36f2faae 347
601b4e87 348URL: http://www.kernel.org/
d62e86e9 349BuildRequires: binutils >= 3:2.18
46bb4084 350%ifarch sparc sparc64
351BuildRequires: elftoaout
352%endif
2c6c1761 353%ifarch ppc
6f17021d
AM
354BuildRequires: uboot-mkimage
355%endif
b8c817d6 356AutoReqProv: no
12c62503 357BuildRequires: /sbin/depmod
0c18a0c3 358BuildRequires: gcc >= 5:3.2
edb27ca0 359%{?with_rescuecd:BuildRequires: lzma >= 1:4.42.2}
f979af5b
AM
360# for hostname command
361BuildRequires: net-tools
465bc122 362BuildRequires: perl-base
b8c817d6 363BuildRequires: rpm-build >= 4.4.9-56
b7fa4545 364BuildRequires: rpmbuild(macros) >= 1.217
f1c7ea86
JB
365Requires(post): coreutils
366Requires(post): geninitrd >= 2.57
367Requires(post): module-init-tools >= 0.9.9
ac8b2067 368Requires: /sbin/depmod
002ed53c
ER
369Requires: coreutils
370Requires: geninitrd >= 2.57
371Requires: module-init-tools >= 0.9.9
12c62503 372Provides: %{name}(netfilter) = %{netfilter_snap}
da12047a 373Provides: %{name}(vermagic) = %{kernel_release}
de0d7ee0 374%if %{with xen0} || %{with xenU}
c5fcccf8 375Provides: kernel(xen) = %{_xen_version}
2e4315a9 376%endif
b8c817d6 377Obsoletes: kernel%{_alt_kernel}-isdn-mISDN
cfb7cf50 378Obsoletes: kernel-misc-acer_acpi
f0234385 379Obsoletes: kernel-misc-fuse
31fbd796 380Obsoletes: kernel-misc-uvc
601b4e87 381Obsoletes: kernel-modules
320795c4 382Obsoletes: kernel-net-ar81
67d44017
PS
383Obsoletes: kernel-net-hostap
384Obsoletes: kernel-net-ieee80211
d0bbe802 385Obsoletes: kernel-net-ipp2p
a99f3043 386Obsoletes: kernel-net-rt61
ac8b2067 387Obsoletes: kernel-smp
3f5783f6
ER
388Conflicts: e2fsprogs < 1.29
389Conflicts: isdn4k-utils < 3.1pre1
390Conflicts: jfsutils < 1.1.3
391Conflicts: module-init-tools < 0.9.10
392Conflicts: nfs-utils < 1.0.5
393Conflicts: oprofile < 0.9
394Conflicts: ppp < 1:2.4.0
395Conflicts: procps < 3.2.0
396Conflicts: quota-tools < 3.09
12c62503 397%if %{with reiserfs4}
3f5783f6 398Conflicts: reiser4progs < 1.0.0
12c62503 399%endif
3f5783f6 400Conflicts: reiserfsprogs < 3.6.3
869e45ec 401Conflicts: udev < 1:071
3f5783f6 402Conflicts: util-linux < 2.10o
bda09b70 403Conflicts: util-vserver < 0.30.215-10
3f5783f6 404Conflicts: xfsprogs < 2.6.0
b9d3c9da 405%if %{with xen0} || %{with xenU} || %{with pae}
c5bf058d 406ExclusiveArch: %{ix86}
9157d402
ER
407%if %{with pae}
408ExcludeArch: i386 i486 i586
409%endif
c5bf058d 410%else
edfcc0e8 411ExclusiveArch: %{ix86} %{x8664} alpha arm ia64 ppc ppc64 sparc sparc64
c5bf058d 412%endif
906e68b7
JB
413ExclusiveOS: Linux
414BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
601b4e87 415
7efebc83 416%ifarch %{ix86} %{x8664}
af0b79f6
JB
417%define target_arch_dir x86
418%endif
419%ifarch ppc ppc64
420%define target_arch_dir powerpc
421%endif
aadedaf5 422%ifnarch %{ix86} %{x8664} ppc ppc64
af0b79f6 423%define target_arch_dir %{_target_base_arch}
7efebc83
AM
424%endif
425
52e8aad6 426%define defconfig arch/%{target_arch_dir}/defconfig
427
db6c2213
ER
428# No ELF objects there to strip (skips processing 27k files)
429%define _noautostrip .*%{_kernelsrcdir}/.*
12c62503 430%define _noautochrpath .*%{_kernelsrcdir}/.*
db6c2213 431
8cd1b586
JB
432%ifarch ia64
433%define initrd_dir /boot/efi
434%else
435%define initrd_dir /boot
436%endif
437
869e45ec 438%define _kernelsrcdir /usr/src/linux%{_alt_kernel}-%{version}
5253d53f 439
2e23b44b 440%if "%{_target_base_arch}" != "%{_arch}"
74d148ab 441 %define CrossOpts ARCH=%{_target_base_arch} CROSS_COMPILE=%{_target_cpu}-pld-linux-
2e23b44b
ER
442 %define DepMod /bin/true
443
444 %if "%{_arch}" == "sparc" && "%{_target_base_arch}" == "sparc64"
304c3aa6
JB
445 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
446 %define DepMod /sbin/depmod
447 %endif
448
449 %if "%{_arch}" == "sparc64" && "%{_target_base_arch}" == "sparc"
450 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
2e23b44b
ER
451 %define DepMod /sbin/depmod
452 %endif
453
454 %if "%{_arch}" == "x86_64" && "%{_target_base_arch}" == "i386"
304c3aa6 455 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
2e23b44b
ER
456 %define DepMod /sbin/depmod
457 %endif
9157d402 458
2fdc58ef 459 %if "%{_target_base_arch}" == ppc || "%{_target_base_arch}" == "ppc64"
74d148ab 460 %define CrossOpts ARCH=powerpc CROSS_COMPILE=%{_target_cpu}-pld-linux-
461 %endif
2e23b44b 462%else
304c3aa6
JB
463 %ifarch ppc ppc64
464 %define CrossOpts ARCH=powerpc CC="%{__cc}"
465 %else
466 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
467 %endif
74d148ab 468 %define DepMod /sbin/depmod
469%endif
2fdc58ef 470%define MakeOpts %{CrossOpts} HOSTCC="%{__cc}"
2e23b44b 471
d6e334cd 472%define __features Netfilter module dated: %{netfilter_snap}\
d6e334cd 473%{?with_grsec_full:Grsecurity full support - enabled}\
474%{?with_pax:PaX support - enabled}\
475%{?with_xen0:Xen 0 - enabled}\
476%{?with_xenU:Xen U - enabled}\
04ea1d8c 477%{?with_fbcondecor:Fbsplash/fbcondecor - enabled }\
d6e334cd 478%{?with_nfsroot:Root on NFS - enabled}
479
480%define Features %(echo "%{__features}" | sed '/^$/d')
481
601b4e87
KT
482%description
483This package contains the Linux kernel that is used to boot and run
484your system. It contains few device drivers for specific hardware.
485Most hardware is instead supported by modules loaded after booting.
486
d6e334cd 487%{Features}
d3c89e2e 488
83830b16 489%description -l de.UTF-8
490Das Kernel-Paket enthält den Linux-Kernel (vmlinuz), den Kern des
491Linux-Betriebssystems. Der Kernel ist für grundliegende
601b4e87 492Systemfunktionen verantwortlich: Speicherreservierung,
83830b16 493Prozeß-Management, Geräte Ein- und Ausgaben, usw.
601b4e87 494
d6e334cd 495%{Features}
d3c89e2e 496
83830b16 497%description -l fr.UTF-8
601b4e87 498Le package kernel contient le kernel linux (vmlinuz), la partie
83830b16 499centrale d'un système d'exploitation Linux. Le noyau traite les
500fonctions basiques d'un système d'exploitation: allocation mémoire,
501allocation de process, entrée/sortie de peripheriques, etc.
601b4e87 502
d6e334cd 503%{Features}
d3c89e2e 504
83830b16 505%description -l pl.UTF-8
506Pakiet zawiera jądro Linuksa niezbędne do prawidłowego działania
507Twojego komputera. Zawiera w sobie sterowniki do sprzętu znajdującego
508się w komputerze, takiego jak sterowniki dysków itp.
69965db2 509
d6e334cd 510%{Features}
d3c89e2e 511
c4057ded 512%package vmlinux
c5d76354 513Summary: vmlinux - uncompressed kernel image
d6e334cd 514Summary(de.UTF-8): vmlinux - dekompressiertes Kernel Bild
e28463de 515Summary(pl.UTF-8): vmlinux - rozpakowany obraz jądra
c4057ded 516Group: Base/Kernel
2c421faa 517Obsoletes: kernel-smp-vmlinux
c4057ded 518
519%description vmlinux
c5d76354
JB
520vmlinux - uncompressed kernel image.
521
d6e334cd 522%description vmlinux -l de.UTF-8
523vmlinux - dekompressiertes Kernel Bild.
524
83830b16 525%description vmlinux -l pl.UTF-8
526vmlinux - rozpakowany obraz jądra.
c4057ded 527
35fde00b
JB
528%package drm
529Summary: DRM kernel modules
d6e334cd 530Summary(de.UTF-8): DRM Kernel Treiber
2c421faa 531Summary(pl.UTF-8): Sterowniki DRM
35fde00b 532Group: Base/Kernel
2c421faa 533Requires(postun): %{name} = %{epoch}:%{version}-%{release}
534Requires: %{name} = %{epoch}:%{version}-%{release}
2c421faa 535Obsoletes: kernel-smp-drm
a508d02c 536Autoreqprov: no
35fde00b
JB
537
538%description drm
3f5783f6 539DRM kernel modules.
35fde00b 540
d6e334cd 541%description drm -l de.UTF-8
542DRM Kernel Treiber.
543
83830b16 544%description drm -l pl.UTF-8
3f5783f6 545Sterowniki DRM.
35fde00b
JB
546
547%package pcmcia
548Summary: PCMCIA modules
d6e334cd 549Summary(de.UTF-8): PCMCIA Module
2c421faa 550Summary(pl.UTF-8): Moduły PCMCIA
35fde00b 551Group: Base/Kernel
2c421faa 552Requires(postun): %{name} = %{epoch}:%{version}-%{release}
553Requires: %{name} = %{epoch}:%{version}-%{release}
2c421faa 554Obsoletes: kernel-smp-pcmcia
ccb58aaf 555Conflicts: pcmcia-cs < 3.1.21
556Conflicts: pcmciautils < 004
a508d02c 557Autoreqprov: no
35fde00b
JB
558
559%description pcmcia
12c62503 560PCMCIA modules.
35fde00b 561
d6e334cd 562%description pcmcia -l de.UTF-8
563PCMCIA Module.
564
83830b16 565%description pcmcia -l pl.UTF-8
12c62503 566Moduły PCMCIA.
35fde00b 567
d779450c 568%package libs
569Summary: Libraries for preparing bootable kernel on PowerPCs
2c421faa 570Summary(pl.UTF-8): Biblioteki do przygotowania bootowalnego jądra dla PowerPC
d779450c 571Group: Base/Kernel
2c421faa 572Requires: %{name} = %{epoch}:%{version}-%{release}
3f5783f6 573Requires: mkvmlinuz >= 1.3
2c421faa 574Obsoletes: kernel-smp-libs
d779450c 575Autoreqprov: no
576
577%description libs
002ed53c
ER
578Libraries for preparing bootable kernel on PowerPCs. Script called
579mkvmlinuz may be useful for this.
d779450c 580
83830b16 581%description libs -l pl.UTF-8
582Biblioteki do przygotowania bootowalnego jądra dla PowerPC. Skrypt
583mkvmlinuz może być do tego przydatny.
d779450c 584
35fde00b
JB
585%package sound-alsa
586Summary: ALSA kernel modules
d6e334cd 587Summary(de.UTF-8): ALSA Kernel Module
2c421faa 588Summary(pl.UTF-8): Sterowniki dźwięku ALSA
35fde00b 589Group: Base/Kernel
2c421faa 590Requires(postun): %{name} = %{epoch}:%{version}-%{release}
591Requires: %{name} = %{epoch}:%{version}-%{release}
592Obsoletes: kernel-smp-sound-alsa
a508d02c 593Autoreqprov: no
35fde00b
JB
594
595%description sound-alsa
596ALSA (Advanced Linux Sound Architecture) sound drivers.
597
d6e334cd 598%description sound-alsa -l de.UTF-8
599ALSA (Advanced Linux Sound Architecture) Sound-Treiber.
600
83830b16 601%description sound-alsa -l pl.UTF-8
602Sterowniki dźwięku ALSA (Advanced Linux Sound Architecture).
35fde00b
JB
603
604%package sound-oss
605Summary: OSS kernel modules
d6e334cd 606Summary(de.UTF-8): OSS Kernel Module
2c421faa 607Summary(pl.UTF-8): Sterowniki dźwięku OSS
35fde00b 608Group: Base/Kernel
2c421faa 609Requires(postun): %{name} = %{epoch}:%{version}-%{release}
610Requires: %{name} = %{epoch}:%{version}-%{release}
611Obsoletes: kernel-smp-sound-oss
a508d02c 612Autoreqprov: no
35fde00b
JB
613
614%description sound-oss
615OSS (Open Sound System) drivers.
616
d6e334cd 617%description sound-oss -l de.UTF-8
618OSS (Open Sound System) Treiber.
619
83830b16 620%description sound-oss -l pl.UTF-8
621Sterowniki dźwięku OSS (Open Sound System).
35fde00b 622
601b4e87
KT
623%package headers
624Summary: Header files for the Linux kernel
d6e334cd 625Summary(de.UTF-8): Header Dateien für den Linux-Kernel
2c421faa 626Summary(pl.UTF-8): Pliki nagłówkowe jądra Linuksa
6c6b034d 627Group: Development/Building
12c62503 628Provides: %{name}-headers(netfilter) = %{netfilter_snap}
601b4e87
KT
629Autoreqprov: no
630
631%description headers
632These are the C header files for the Linux kernel, which define
40eea4ff
SP
633structures and constants that are needed when rebuilding the kernel or
634building kernel modules.
601b4e87 635
d6e334cd 636%description headers -l de.UTF-8
637Dies sind die C Header Dateien für den Linux-Kernel, die definierte
9157d402
ER
638Strukturen und Konstante beinhalten, die beim rekompilieren des
639Kernels oder bei Kernel Modul kompilationen gebraucht werden.
d6e334cd 640
83830b16 641%description headers -l pl.UTF-8
642Pakiet zawiera pliki nagłówkowe jądra, niezbędne do rekompilacji jądra
643oraz budowania modułów jądra.
601b4e87 644
d20b1dc0 645%package module-build
2bc32647 646Summary: Development files for building kernel modules
d6e334cd 647Summary(de.UTF-8): Development Dateien die beim Kernel Modul kompilationen gebraucht werden
2c421faa 648Summary(pl.UTF-8): Pliki służące do budowania modułów jądra
e687965c 649Group: Development/Building
d20b1dc0 650Requires: %{name}-headers = %{epoch}:%{version}-%{release}
bf135ec7 651Conflicts: rpmbuild(macros) < 1.321
a508d02c 652Autoreqprov: no
d20b1dc0 653
654%description module-build
2bc32647
JB
655Development files from kernel source tree needed to build Linux kernel
656modules from external packages.
657
d6e334cd 658%description module-build -l de.UTF-8
659Development Dateien des Linux-Kernels die beim kompilieren externer
660Kernel Module gebraucht werden.
661
83830b16 662%description module-build -l pl.UTF-8
663Pliki ze drzewa źródeł jądra potrzebne do budowania modułów jądra
664Linuksa z zewnętrznych pakietów.
d20b1dc0 665
601b4e87
KT
666%package source
667Summary: Kernel source tree
d6e334cd 668Summary(de.UTF-8): Der Kernel Quelltext
2c421faa 669Summary(pl.UTF-8): Kod źródłowy jądra Linuksa
e687965c 670Group: Development/Building
2bc32647 671Requires: %{name}-module-build = %{epoch}:%{version}-%{release}
a508d02c 672Autoreqprov: no
601b4e87
KT
673
674%description source
12c62503
ER
675This is the source code for the Linux kernel. You can build a custom
676kernel that is better tuned to your particular hardware.
601b4e87 677
83830b16 678%description source -l de.UTF-8
679Das Kernel-Source-Paket enthält den source code (C/Assembler-Code) des
601b4e87 680Linux-Kernels. Die Source-Dateien werden gebraucht, um viele
9eb43334 681C-Programme zu kompilieren, da sie auf Konstanten zurückgreifen, die
83830b16 682im Kernel-Source definiert sind. Die Source-Dateien können auch
9eb43334 683benutzt werden, um einen Kernel zu kompilieren, der besser auf Ihre
601b4e87
KT
684Hardware ausgerichtet ist.
685
83830b16 686%description source -l fr.UTF-8
601b4e87 687Le package pour le kernel-source contient le code source pour le noyau
83830b16 688linux. Ces sources sont nécessaires pour compiler la plupart des
689programmes C, car il dépend de constantes définies dans le code
690source. Les sources peuvent être aussi utilisée pour compiler un noyau
691personnalisé pour avoir de meilleures performances sur des matériels
601b4e87
KT
692particuliers.
693
83830b16 694%description source -l pl.UTF-8
695Pakiet zawiera kod źródłowy jądra systemu.
cf06f88a 696
9b3bab6e
JR
697%package doc
698Summary: Kernel documentation
d6e334cd 699Summary(de.UTF-8): Kernel Dokumentation
2c421faa 700Summary(pl.UTF-8): Dokumentacja do jądra Linuksa
e687965c 701Group: Documentation
9b3bab6e 702Autoreqprov: no
cf06f88a 703
9b3bab6e
JR
704%description doc
705This is the documentation for the Linux kernel, as found in
706/usr/src/linux/Documentation directory.
cf06f88a 707
d6e334cd 708%description doc -l de.UTF-8
709Dies ist die Kernel Dokumentation wie sie im 'Documentation'
710Verzeichniss vorgefunden werden kann.
711
83830b16 712%description doc -l pl.UTF-8
713Pakiet zawiera dokumentację do jądra Linuksa pochodzącą z katalogu
9b3bab6e 714/usr/src/linux/Documentation.
cf06f88a 715
601b4e87 716%prep
249a4c7b
ER
717%setup -qc
718cd linux-%{basever}
1362b2d9 719
2c421faa 720# hack against warning in pax/grsec
721%ifarch alpha
722sed -i 's/-Werror//' arch/alpha/kernel/Makefile
723%endif
34debd54 724
1362b2d9
JR
725%ifarch ppc
726install %{SOURCE5} Makefile.ppclibs
727%endif
846aafa3 728
52bb7759 729%if "%{postver}" != "%{nil}"
38c14daa 730%{__bzip2} -dc %{SOURCE1} | patch -p1 -s
731%endif
732
c00d3452 733# tuxonice:
734%if %{with tuxonice}
2c421faa 735##ifarch %{ix86} %{x8664} ia64 ppc alpha
737ba2a2 736%patch69 -p1
33a10a0a 737%patch70 -p1
2c421faa 738##endif
0e9a441a 739%endif
04352f3d 740
e43054fa 741%patch2 -p1
275eff18 742%if %{with fbcondecor}
df97710f 743%patch3 -p1
1362b2d9 744%endif
df97710f 745%patch4 -p1
24b722f9 746
16b2d858 747# squashfs
275eff18 748%patch5 -p1
eb475ca7 749
275eff18 750%patch6 -p1
4a28820e 751
23f15e1c 752## netfilter
1519495f 753#
f0c5ac07 754
88f0e9ff 755# kernel-pom-ng-IPV4OPTSSTRIP.patch
1fbbe25c 756%patch10 -p1
88f0e9ff 757
758# kernel-pom-ng-ipv4options.patch
848a2d02 759%patch11 -p1
88f0e9ff 760
28713bdb 761# kernel-pom-ng-ROUTE.patch
1fbbe25c 762%patch14 -p1
28713bdb 763
88f0e9ff 764# kernel-pom-ng-mms-conntrack-nat.patch
1fbbe25c 765%patch16 -p1
88f0e9ff 766
f5fbd9ea 767# kernel-pom-ng-rsh.patch
1fbbe25c 768%patch22 -p1
f5fbd9ea 769
253b8b20 770# kernel-pom-ng-rpc.patch
1fbbe25c 771%patch23 -p1
253b8b20 772
78382233 773# kernel-nf_rtsp.patch
1fbbe25c 774%patch36 -p1
78382233 775
fcf7a306 776# kernel-owner-xid.patch
793722d1 777%if %{with vserver}
9a5f3f20 778%patch37 -p1
793722d1 779%endif
fcf7a306 780
2cd49126 781# kernel-ipt_account.patch
782%patch38 -p1
783
d5d1afcf 784# kernel-ipt_ACCOUNT.patch
785%patch39 -p1
786
88f0e9ff 787# kernel-layer7.patch
6f4d2f35 788%patch40 -p1
1519495f 789
28713bdb 790# ipvs-nfct
6f4d2f35 791%patch41 -p1
28713bdb 792
52986594 793##
794# end of netfilter
36f2faae 795
a60cb6c9 796# zph
797%patch49 -p1
798
347a6801 799%if %{with imq}
800%patch50 -p1
801%endif
4170601d 802
32edb06c 803# reiser4
804%if %{with reiser4}
805%patch51 -p1
806%endif
807
2c421faa 808# esfq
89715f5b 809%patch53 -p1
2c421faa 810
811%if %{with wrr}
90cf2c6a 812%patch52 -p1
2c421faa 813%endif
814
ed5063af 815# toshiba_acpi
77e482ca 816%patch54 -p1
2c421faa 817
7e77e535
JR
818%patch55 -p1
819%patch56 -p1
b9f8c4e8 820
1f543321 821%patch58 -p1
6344ff36 822
28713bdb 823# kernel-rndis_host-wm5.patch
824%patch59 -p1
560ff042 825
2eee54b8
PS
826%patch61 -p1
827
2c421faa 828# hostap enhancements from/for aircrack-ng
60d1c35d 829%patch85 -p1
830
410d7f63
JR
831# LSI MPT Fusion driver update
832%patch90 -p1
833
2c421faa 834# vserver
835%if %{with vserver}
f79903d9 836%patch100 -p1
1f3f622a 837%patch101 -p1
31c3042b 838%endif
a6a6ac0b 839
840#%if %{with xen0} || %{with xenU}
841#%ifarch %{ix86} %{x8664} ia64
842#%patch120 -p1
843#%endif
844#%endif
845
97013b4b 846# tproxy
2d8a42d9 847%if %{without rescuecd} && %{with vserver}
81a50533 848#patch42 -p1
16a7bd96 849%endif
97013b4b 850
7d31896b 851# forcedeth
8b0541be 852%patch130 -p1
853
60d6f988 854# unionfs
997e0ae9 855%patch140 -p1
0ee88483 856%{?with_apparmor:%patch141 -p1}
60d6f988 857
627c4101
PS
858# autofs4-v5-update
859%patch142 -p1
860
c1d95c69 861%patch2500 -p1
2c421faa 862
512e1dc7 863%if %{with rescuecd}
864%patch7000 -p1
edb27ca0 865%patch7001 -p1
512e1dc7 866%endif
867
befdc142 868# grsecurity & pax stuff
2c421faa 869#
2c421faa 870%if %{with pax_full}
871%patch9999 -p1
7d31896b 872%{?with_vserver:%patch10000 -p1}
a636f0fc 873%{?with_vserver:%patch10001 -p1}
78f2a203 874%{?with_vserver:%patch10002 -p1}
7001cd3f 875%{?with_vserver:%patch10003 -p1}
2c421faa 876%else
877
64c7b6c3 878%if %{with grsec_full}
879%patch9999 -p1
7d31896b 880%{?with_vserver:%patch10000 -p1}
a636f0fc 881%{?with_vserver:%patch10001 -p1}
78f2a203 882%{?with_vserver:%patch10002 -p1}
7001cd3f 883%{?with_vserver:%patch10003 -p1}
2c421faa 884%else
885%if %{with grsec_minimal}
886%patch1000 -p1
887# remember that we have the same config file for grsec_minimal and
888# grsec_full, but the patches are different.
889%endif
64c7b6c3 890%endif
a6a6ac0b 891
60d1c35d 892%if %{with pax}
2c421faa 893# now we have an separate testing pax-only patch - in the future we
894# could have single grsecurity patch and will have to prepare separate
895# configs for grsec_minimal, grsec_full and pax to support such
896# configurations like pax & grsec_minimal.
897# So, in a future there could be no patch9998, but only config
898# would tell which options should be enabled.
899# The second option is to maintain separate pax-only patch.
900%patch9998 -p1
901#patch9997 -p1 - needs update
60d1c35d 902%endif
903
2c421faa 904%endif
905
906#
907# end of grsecurity & pax stuff
60d1c35d 908
b02a74a2 909# apparmor
910%if %{with apparmor}
a02681d3 911%if %{with grsec_full} || %{with pax_full}
912%patch5001 -p1
913%patch5002 -p1
914%else
b02a74a2 915%patch5000 -p1
a02681d3 916%patch5002 -p1
917%endif
b02a74a2 918%endif
919
01053713
AM
920%patch150 -p1
921
1b0af130 922%ifarch ppc ppc64
8dee06f0 923#patch200 -p1
1b0af130 924%endif
7e4e533b 925
27d09b3b 926# routes
dc024c24 927%patch300 -p1
27d09b3b 928
2c421faa 929# Small fixes:
1b0af130 930%patch2000 -p1
a636f0fc 931%patch2001 -p1
9aa8852b 932%patch2002 -p1
7c796d57 933#%patch2003 -p1
b5297306 934
bd6ac90c 935# Fix EXTRAVERSION in main Makefile
249a4c7b 936sed -i 's#EXTRAVERSION =.*#EXTRAVERSION = %{postver}%{?alt_kernel:_%{alt_kernel}}#g' Makefile
074c0526 937
1cbd66e6
JB
938# on sparc this line causes CONFIG_INPUT=m (instead of =y), thus breaking build
939sed -i -e '/select INPUT/d' net/bluetooth/hidp/Kconfig
940
acc00c76 941# on sparc64 avoid building break due to NULL pointer type warrning
942sed -i -e 's/^EXTRA_CFLAGS := -Werror/EXTRA_CFLAGS := /' arch/sparc64/kernel/Makefile
943
e74bcc8b 944# cleanup backups after patching
12c62503 945find '(' -name '*~' -o -name '*.orig' -o -name '.gitignore' ')' -print0 | xargs -0 -r -l512 rm -f
e74bcc8b 946
947%build
249a4c7b 948cd linux-%{basever}
60d1c35d 949PaXconfig () {
950 set -x
330af2a1 951 cat <<-EOCONFIG > $1
60d1c35d 952 %ifarch %{ix86}
330af2a1 953 CONFIG_PAX_SEGMEXEC=y
e9006c08 954 # performance impact on CPUs without NX bit
330af2a1 955 CONFIG_PAX_PAGEEXEC=n
2c421faa 956 # Testing KERNEXEC
957
330af2a1 958 CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM=n
959 CONFIG_PCI_BIOS=n
960 CONFIG_EFI=n
60d1c35d 961 %endif
330af2a1 962
60d1c35d 963 %ifarch ppc64
330af2a1 964 CONFIG_PAX_NOELFRELOCS=n
60d1c35d 965 %endif
966 %ifarch ppc
330af2a1 967 CONFIG_PAX_EMUTRAMP=y
968 CONFIG_PAX_EMUSIGRT=y
969 CONFIG_PAX_EMUPLT=y
60d1c35d 970 %endif
2c421faa 971
972 %ifarch sparc sparc64 alpha
330af2a1 973 CONFIG_PAX_EMUPLT=y
2c421faa 974 %endif
975
2c421faa 976 # Now we have to check MAC system integration. Grsecurity (full) uses PAX_HAVE_ACL_FLAGS
977 # setting (direct acces). grsec_minimal probably have no idea about PaX so we probably
978 # could use PAX_NO_ACL_FLAGS, but for testing the hooks setting will be used
979 # PAX_HOOK_ACL_FLAGS. SELinux should also be able to make PaX settings via hooks
980
981 %if %{with grsec_full}
512e1dc7 982 # Hardening grsec options if with pax
330af2a1 983 CONFIG_GRKERNSEC_PROC_MEMMAP=y
512e1dc7 984 # almost rational (see HIDESYM help)
330af2a1 985 CONFIG_GRKERNSEC_HIDESYM=y
b769102c 986
2c421faa 987 # no change needed CONFIG=PAX_HAVE_ACL_FLAGS=y is taken from the kernel-pax.config
988 %else
b769102c 989 # selinux or other hooks?
330af2a1 990 CONFIG_PAX_HAVE_ACL_FLAGS=n
991 CONFIG_PAX_HOOK_ACL_FLAGS=y
2c421faa 992 %endif
330af2a1 993EOCONFIG
2c421faa 994
60d1c35d 995 return 0
996}
997
512e1dc7 998RescueConfig() {
999 set -x
330af2a1 1000 cat <<-EOCONFIG > $1
1001 # CONFIG_SOUND is not set
1002 # CONFIG_AUDIT is not set
1003 # CONFIG_TR is not set
1004 # CONFIG_BT is not set
1005 # CONFIG_VIDEO_DEV is not set
1006 # CONFIG_DVB_CORE is not set
1007 # CONFIG_HAMRADIO is not set
1008 # CONFIG_ARCNET is not set
1009 # CONFIG_FB is not set
1010 # CONFIG_DRM is not set
1011 # CONFIG_WATCHDOG is not set
1012 # CONFIG_INPUT_JOYSTICK is not set
1013 # CONFIG_DEBUG_KERNEL is not set
1014 # CONFIG_ISDN is not set
1015 # CONFIG_AGP is not set
1016 # CONFIG_SECURITY is not set
1017 # CONFIG_PARIDE is not set
1018 # CONFIG_CPU_FREQ is not set
1019 # CONFIG_GAMEPORT is not set
1020 # CONFIG_KVM is not set
1021 # CONFIG_PHONE is not set
1022 CONFIG_BLK_DEV_LOOP=y
1023 CONFIG_ISO9660_FS=y
1024 CONFIG_NLS_UTF8=y
1025EOCONFIG
1026
1027 return 0
512e1dc7 1028}
1029
89311a3c 1030BuildConfig() {
2e23b44b 1031 %{?debug:set -x}
330af2a1 1032 set -e
1033
20a19493 1034 Config="kernel-%{target_arch_dir}.config"
1035 echo "Building config file for %{_target_cpu} using $Config et al."
d6a63a09 1036
330af2a1 1037 # prepare local and important options
1038 cat <<-EOCONFIG > important.config
1039%if 0%{?debug:1}
1040 CONFIG_DEBUG_SLAB=y
2d0f2103 1041 CONFIG_DEBUG_SLAB_LEAK=y
330af2a1 1042 CONFIG_DEBUG_PREEMPT=y
1043 CONFIG_RT_DEADLOCK_DETECT=y
1044%endif
2c421faa 1045
39258f30 1046%if %{without smp}
1047 CONFIG_SMP=n
1048%endif
1049
330af2a1 1050# apparmor, will be moved to external file if works
1051%if %{with apparmor}
1052 CONFIG_SECURITY_APPARMOR=y
1053 CONFIG_SECURITY_APPARMOR_BOOTPARAM_VALUE=1
1054 CONFIG_SECURITY_APPARMOR_DISABLE=n
330af2a1 1055%endif
2c421faa 1056
28713bdb 1057%if %{without ipv6}
330af2a1 1058 CONFIG_IPV6=n
28713bdb 1059%endif
1060
11dc80a5 1061%ifarch i686 athlon pentium3 pentium4
1062 %if %{with pae}
1063 CONFIG_HIGHMEM4G=n
1064 CONFIG_HIGHMEM64G=y
1065 CONFIG_X86_PAE=y
1066 %endif
1067%endif
1068
fd56bde4 1069%if %{without pcmcia}
1070 CONFIG_PCMCIA=n
1071%endif
1072
330af2a1 1073%if %{with fbcondecor}
1074 CONFIG_FB_S3=n
1075 CONFIG_FB_VT8623=n
1076 CONFIG_FB_ARK=n
1077 CONFIG_FB_TILEBLITTING=n
1078 CONFIG_FB_CON_DECOR=y
dcc54002
JR
1079%endif
1080
330af2a1 1081%if %{with nfsroot}
1082 CONFIG_NFS_FS=y
1083 CONFIG_ROOT_NFS=y
60d1c35d 1084%endif
2c421faa 1085
7197f3a3 1086# Temporary disabled RELOCATABLE. Needed only on x86??
1087%if %{with pax} || %{with grsec_full}
20a19493 1088 CONFIG_RELOCATABLE=n
347a6801 1089%endif
20a19493 1090EOCONFIG
1091
1092 RescueConfig rescue.config
1093 PaXconfig pax.config
347a6801 1094
330af2a1 1095 # prepare kernel-style config file from multiple config files
c69b2ed9 1096 %{__awk} -v arch="all %{target_arch_dir} %{_target_base_arch} %{_target_cpu}" -f %{SOURCE6} \
330af2a1 1097 important.config \
1098%if %{with rescuecd}
1099 %{SOURCE58} \
1100 %{SOURCE59} \
1101 rescue.config \
2c421faa 1102%endif
330af2a1 1103%if %{with xenU}
1104 %{SOURCE47} \
60d1c35d 1105%endif
de0d7ee0 1106%if %{with xen0}
330af2a1 1107 %{SOURCE46} \
bf135ec7 1108%endif
330af2a1 1109 \
1110%if %{with pax_full}
1111 %{SOURCE45} \
1112 %{SOURCE49} \
1113 pax.config \
1114%else
1115 %if %{with grsec_full}
1116 %{SOURCE45} \
1117 %{SOURCE50} \
1118 %else
b8c817d6 1119 %if %{with grsec_minimal}
330af2a1 1120 %{SOURCE51} \
b8c817d6 1121 %endif
330af2a1 1122 %endif
1123 %if %{with pax}
1124 %{SOURCE49} \
1125 pax.config \
1126 %endif
bf135ec7 1127%endif
330af2a1 1128 \
1129%if %{with reiser4}
1130 %{SOURCE56} \
43e67452 1131%endif
330af2a1 1132%if %{with wrr}
1133 %{SOURCE57} \
740dff65 1134%endif
330af2a1 1135%if %{with imq}
1136 %{SOURCE55} \
512e1dc7 1137%endif
330af2a1 1138%if %{with vserver}
1139 %{SOURCE43} \
b02a74a2 1140%endif
330af2a1 1141%if %{with tuxonice}
1142%ifarch %{ix86} %{x8664} ia64 ppc ppc64
1143 %{SOURCE42} \
1144%endif
1145%endif
1146 %{SOURCE40} %{?0:netfilter} \
20a19493 1147 %{SOURCE41} %{?0:patches} \
fa35f1bb 1148 %{SOURCE20} \
20a19493 1149 $RPM_SOURCE_DIR/$Config \
330af2a1 1150 > %{defconfig}
32108e5b 1151}
1152
1f52db0a 1153BuildKernel() {
2e23b44b 1154 %{?debug:set -x}
40eea4ff 1155 echo "Building kernel $1 ..."
28d40a00 1156 install .config %{defconfig}
2fdc58ef 1157 %{__make} %{MakeOpts} mrproper \
8bd86dbb 1158 RCS_FIND_IGNORE='-name build-done -prune -o'
52e8aad6 1159 ln -sf %{defconfig} .config
601b4e87 1160
2fdc58ef 1161 %{__make} %{MakeOpts} clean \
c86751b7 1162 RCS_FIND_IGNORE='-name build-done -prune -o'
2fdc58ef 1163 %{__make} %{MakeOpts} include/linux/version.h \
81259751 1164 %{?with_verbose:V=1}
601b4e87 1165
2fdc58ef 1166 %{__make} %{MakeOpts} scripts/mkcompile_h \
2c421faa 1167 %{?with_verbose:V=1}
1168
3190e2e5 1169# make does vmlinux, modules and bzImage at once
84418e64 1170%ifarch sparc64
2fdc58ef 1171 %{__make} %{MakeOpts} image \
84418e64 1172 %{?with_verbose:V=1}
2eede5c5 1173
2fdc58ef 1174 %{__make} %{MakeOpts} modules \
460faec9 1175 %{?with_verbose:V=1}
cf06f88a 1176%else
2fdc58ef 1177 %{__make} %{MakeOpts} \
ade3916a 1178 %{?with_verbose:V=1}
601b4e87 1179%endif
41f05bdd 1180}
1181
89311a3c 1182PreInstallKernel() {
2c421faa 1183 Config="%{_target_base_arch}"
1184 KernelVer=%{kernel_release}
601b4e87
KT
1185
1186 mkdir -p $KERNEL_INSTALL_DIR/boot
1187 install System.map $KERNEL_INSTALL_DIR/boot/System.map-$KernelVer
45d0ae91 1188%ifarch %{ix86} %{x8664}
24d8b028 1189 install arch/x86/boot/bzImage $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
21843074 1190 install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinux-$KernelVer
97365a5a 1191%endif
601b4e87
KT
1192%ifarch alpha sparc sparc64
1193 gzip -cfv vmlinux > vmlinuz
1194 install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinux-$KernelVer
1195 install vmlinuz $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
2fd967ba 1196%ifarch sparc
1197 elftoaout arch/sparc/boot/image -o vmlinux.aout
1198 install vmlinux.aout $KERNEL_INSTALL_DIR/boot/vmlinux.aout-$KernelVer
1199%endif
1200%ifarch sparc64
84418e64 1201 elftoaout arch/sparc64/boot/image -o vmlinux.aout
2fd967ba 1202 install vmlinux.aout $KERNEL_INSTALL_DIR/boot/vmlinux.aout-$KernelVer
46bb4084 1203%endif
601b4e87 1204%endif
3fa68acf 1205%ifarch ppc ppc64
cf06f88a
KT
1206 install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinux-$KernelVer
1207 install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
6fb3ffc0 1208%endif
1209%ifarch ppc-broken
d779450c 1210 %{__make} -f Makefile.ppclibs install \
1211 DESTDIR=$KERNEL_INSTALL_DIR/boot/libs-$KernelVer
8cd1b586
JB
1212%endif
1213%ifarch ia64
1214 gzip -cfv vmlinux > vmlinuz
1215 install -d $KERNEL_INSTALL_DIR/boot/efi
8cd1b586
JB
1216 install vmlinuz $KERNEL_INSTALL_DIR/boot/efi/vmlinuz-$KernelVer
1217 ln -sf efi/vmlinuz-$KernelVer $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
9b3bab6e 1218%endif
2a261cfb 1219%ifarch arm
1220 install arch/arm/boot/zImage $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
1221%endif
1222
47068aef 1223 %{__make} %{MakeOpts} modules_install firmware_install \
e7d99ddd 1224 %{?with_verbose:V=1} \
2e23b44b 1225 DEPMOD=%DepMod \
a602ba1f 1226 INSTALL_MOD_PATH=$KERNEL_INSTALL_DIR \
47068aef 1227 INSTALL_FW_PATH=$KERNEL_INSTALL_DIR/lib/firmware/$KernelVer \
e7d99ddd 1228 KERNELRELEASE=$KernelVer
6dc0a2ea 1229
f6d2eacd 1230 # You'd probabelly want to make it somewhat different
a2b2199b 1231 install -d $KERNEL_INSTALL_DIR%{_kernelsrcdir}
2c421faa 1232 install Module.symvers $KERNEL_INSTALL_DIR%{_kernelsrcdir}/Module.symvers-dist
77c976a9 1233
6dc0a2ea 1234 echo "CHECKING DEPENDENCIES FOR KERNEL MODULES"
2e23b44b
ER
1235 if [ %DepMod = /sbin/depmod ]; then
1236 /sbin/depmod --basedir $KERNEL_INSTALL_DIR -ae -F $KERNEL_INSTALL_DIR/boot/System.map-$KernelVer -r $KernelVer || :
2e23b44b 1237 fi
2c421faa 1238 touch $KERNEL_INSTALL_DIR/lib/modules/$KernelVer/modules.dep
9fe786e6
ER
1239 # binary cache produced by depmod at runtime
1240 touch $KERNEL_INSTALL_DIR/lib/modules/$KernelVer/modules.{alias,dep,symbols}.bin
6dc0a2ea 1241 echo "KERNEL RELEASE $KernelVer DONE"
601b4e87
KT
1242}
1243
1244KERNEL_BUILD_DIR=`pwd`
52bb7759 1245echo "-%{localversion}" > localversion
601b4e87 1246
2c421faa 1247KERNEL_INSTALL_DIR="$KERNEL_BUILD_DIR/build-done/kernel"
7f1ae99e 1248rm -rf $KERNEL_INSTALL_DIR
2a261cfb 1249%if %{without myown}
e74bcc8b 1250BuildConfig
2a261cfb 1251%else
1252cat $RPM_SOURCE_DIR/kernel-myown.config > %{defconfig}
1253%endif
1254ln -sf %{defconfig} .config
1255install -d $KERNEL_INSTALL_DIR%{_kernelsrcdir}/include/linux
1256rm -f include/linux/autoconf.h
2fdc58ef 1257%{__make} %{MakeOpts} include/linux/autoconf.h
2a261cfb 1258install include/linux/autoconf.h \
1259 $KERNEL_INSTALL_DIR%{_kernelsrcdir}/include/linux/autoconf-dist.h
1260install .config \
1261 $KERNEL_INSTALL_DIR%{_kernelsrcdir}/config-dist
75287058 1262
70796952 1263%{__awk} %{?debug:-v dieOnError=1} -v infile=%{defconfig} -f %{SOURCE8} .config
75287058 1264
25d2967b
ER
1265BuildKernel
1266PreInstallKernel
7f1ae99e 1267
2fdc58ef 1268%{__make} %{MakeOpts} include/linux/utsrelease.h
86c1d748 1269cp include/linux/utsrelease.h{,.save}
2c421faa 1270cp include/linux/version.h{,.save}
1271cp scripts/mkcompile_h{,.save}
86c1d748 1272
601b4e87
KT
1273%install
1274rm -rf $RPM_BUILD_ROOT
249a4c7b 1275cd linux-%{basever}
728a94de 1276
249a4c7b 1277umask 022
2e23b44b 1278export DEPMOD=%DepMod
728a94de 1279
5253d53f 1280install -d $RPM_BUILD_ROOT%{_kernelsrcdir}
2c421faa 1281install -d $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/%{kernel_release}
601b4e87 1282
09a8e490
ER
1283# test if we can hardlink -- %{_builddir} and $RPM_BUILD_ROOT on same partition
1284if cp -al COPYING $RPM_BUILD_ROOT/COPYING 2>/dev/null; then
1285 l=l
1286 rm -f $RPM_BUILD_ROOT/COPYING
1287fi
1288
601b4e87 1289KERNEL_BUILD_DIR=`pwd`
601b4e87 1290
2c421faa 1291cp -a$l $KERNEL_BUILD_DIR/build-done/kernel/* $RPM_BUILD_ROOT
9b3bab6e 1292
20a19493 1293if [ -e $RPM_BUILD_ROOT/lib/modules/%{kernel_release} ] ; then
2c421faa 1294 rm -f $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/build
1295 ln -sf %{_kernelsrcdir} $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/build
1296 install -d $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/{cluster,misc}
1297fi
9b3bab6e 1298
a2b2199b 1299find . -maxdepth 1 ! -name "build-done" ! -name "." -exec cp -a$l "{}" "$RPM_BUILD_ROOT%{_kernelsrcdir}/" ";"
8ba9ecd1 1300
5253d53f 1301cd $RPM_BUILD_ROOT%{_kernelsrcdir}
601b4e87 1302
2fdc58ef 1303%{__make} %{MakeOpts} mrproper archclean \
8bd86dbb 1304 RCS_FIND_IGNORE='-name build-done -prune -o'
edcebaac 1305
2c421faa 1306if [ -e $KERNEL_BUILD_DIR/build-done/kernel%{_kernelsrcdir}/include/linux/autoconf-dist.h ]; then
1307 install $KERNEL_BUILD_DIR/build-done/kernel%{_kernelsrcdir}/include/linux/autoconf-dist.h \
1308 $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux
1309 install $KERNEL_BUILD_DIR/build-done/kernel%{_kernelsrcdir}/config-dist \
1310 $RPM_BUILD_ROOT%{_kernelsrcdir}
1cb88365 1311fi
08856617 1312
a2b2199b
ER
1313cp -Rdp$l $KERNEL_BUILD_DIR/include/linux/* \
1314 $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux
601b4e87 1315
2fdc58ef 1316%{__make} %{MakeOpts} mrproper
c2986d7e
PS
1317mv -f include/linux/utsrelease.h{.save,}
1318mv -f include/linux/version.h{.save,}
1319mv -f scripts/mkcompile_h{.save,}
5253d53f
ER
1320install %{SOURCE3} $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux/autoconf.h
1321install %{SOURCE4} $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux/config.h
5fe99c7d 1322
d89749b7 1323# collect module-build files and directories
249a4c7b 1324perl %{SOURCE7} %{_kernelsrcdir} %{_builddir}/%{name}-%{version}
d89749b7 1325
9153b8a3 1326# ghosted initrd
f9f0c8d1 1327touch $RPM_BUILD_ROOT%{initrd_dir}/initrd-%{kernel_release}.gz
9153b8a3 1328
d67dd90c
ER
1329# rpm obeys filelinkto checks for ghosted symlinks, convert to files
1330rm -f $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/{build,source}
1331touch $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/{build,source}
1332
7c7ef692 1333# remove unnecessary dir with dead symlink
1334rm -rf $RPM_BUILD_ROOT/arch/i386
1335
601b4e87
KT
1336%clean
1337rm -rf $RPM_BUILD_ROOT
601b4e87 1338
224eb801 1339%preun
3b1bd92e 1340if [ -x /sbin/new-kernel-pkg ]; then
5253d53f 1341 /sbin/new-kernel-pkg --remove %{kernel_release}
3b1bd92e 1342fi
224eb801 1343
601b4e87 1344%post
8cd1b586 1345%ifarch ia64
f9f0c8d1 1346mv -f /boot/efi/vmlinuz{,.old} 2> /dev/null
249a4c7b 1347%{?alt_kernel:mv -f /boot/efi/vmlinuz%{_alt_kernel}{,.old} 2> /dev/null}
2dd0543f 1348ln -sf vmlinuz-%{kernel_release} /boot/efi/vmlinuz
249a4c7b 1349%{?alt_kernel:ln -sf vmlinuz-%{kernel_release} /boot/efi/vmlinuz%{_alt_kernel}}
8cd1b586 1350%endif
f9f0c8d1 1351mv -f /boot/vmlinuz{,.old} 2> /dev/null
249a4c7b 1352%{?alt_kernel:mv -f /boot/vmlinuz%{_alt_kernel}{,.old} 2> /dev/null}
f9f0c8d1 1353mv -f /boot/System.map{,.old} 2> /dev/null
249a4c7b 1354%{?alt_kernel:mv -f /boot/System%{_alt_kernel}.map{,.old} 2> /dev/null}
2dd0543f 1355ln -sf vmlinuz-%{kernel_release} /boot/vmlinuz
249a4c7b 1356%{?alt_kernel:ln -sf vmlinuz-%{kernel_release} /boot/vmlinuz%{_alt_kernel}}
2dd0543f 1357ln -sf System.map-%{kernel_release} /boot/System.map
249a4c7b 1358%{?alt_kernel:ln -sf System.map-%{kernel_release} /boot/System.map%{_alt_kernel}}
601b4e87 1359
5253d53f 1360%depmod %{kernel_release}
7392d4ab 1361
be35816e 1362/sbin/geninitrd -f --initrdfs=rom %{initrd_dir}/initrd-%{kernel_release}.gz %{kernel_release}
97013b4b 1363mv -f %{initrd_dir}/initrd{,.old} 2> /dev/null
249a4c7b 1364%{?alt_kernel:mv -f %{initrd_dir}/initrd%{_alt_kernel}{,.old} 2> /dev/null}
2dd0543f 1365ln -sf initrd-%{kernel_release}.gz %{initrd_dir}/initrd
249a4c7b 1366%{?alt_kernel:ln -sf initrd-%{kernel_release}.gz %{initrd_dir}/initrd%{_alt_kernel}}
601b4e87 1367
3b1bd92e 1368if [ -x /sbin/new-kernel-pkg ]; then
249a4c7b 1369 title="PLD Linux (%{pld_release})%{?alt_kernel: / %{alt_kernel}}"
3bfefb8d 1370
5253d53f 1371 /sbin/new-kernel-pkg --initrdfile=%{initrd_dir}/initrd-%{kernel_release}.gz --install %{kernel_release} --banner "$title"
3b1bd92e 1372elif [ -x /sbin/rc-boot ]; then
9b3bab6e
JR
1373 /sbin/rc-boot 1>&2 || :
1374fi
cf06f88a 1375
c5d76354 1376%post vmlinux
f9f0c8d1 1377mv -f /boot/vmlinux{,.old} 2> /dev/null
1378%{?alt_kernel:mv -f /boot/vmlinux-%{alt_kernel}{,.old} 2> /dev/null}
2dd0543f 1379ln -sf vmlinux-%{kernel_release} /boot/vmlinux
f9f0c8d1 1380%{?alt_kernel:ln -sf vmlinux-%{kernel_release} /boot/vmlinux-%{alt_kernel}}
c5d76354 1381
3383ab6c 1382%post libs
5253d53f 1383%{_sbindir}/mkvmlinuz /boot/zImage-%{kernel_release} %{kernel_release}
3383ab6c 1384
35fde00b 1385%post drm
5253d53f 1386%depmod %{kernel_release}
35fde00b
JB
1387
1388%postun drm
5253d53f 1389%depmod %{kernel_release}
35fde00b 1390
e7ae6cd3 1391%post pcmcia
5253d53f 1392%depmod %{kernel_release}
9b3bab6e 1393
e7ae6cd3 1394%postun pcmcia
5253d53f 1395%depmod %{kernel_release}
9b3bab6e 1396
35fde00b 1397%post sound-alsa
5253d53f 1398%depmod %{kernel_release}
cf06f88a 1399
35fde00b 1400%postun sound-alsa
5253d53f 1401%depmod %{kernel_release}
0575d61d 1402
1403%post sound-oss
5253d53f 1404%depmod %{kernel_release}
0575d61d 1405
1406%postun sound-oss
5253d53f 1407%depmod %{kernel_release}
0575d61d 1408
601b4e87 1409%post headers
869e45ec 1410ln -snf %{basename:%{_kernelsrcdir}} %{_prefix}/src/linux%{_alt_kernel}
601b4e87
KT
1411
1412%postun headers
32d93861 1413if [ "$1" = "0" ]; then
869e45ec 1414 if [ -L %{_prefix}/src/linux%{_alt_kernel} ]; then
1415 if [ "$(readlink %{_prefix}/src/linux%{_alt_kernel})" = "linux%{_alt_kernel}-%{version}" ]; then
1416 rm -f %{_prefix}/src/linux%{_alt_kernel}
33e92923 1417 fi
601b4e87
KT
1418 fi
1419fi
1420
869e45ec 1421%triggerin module-build -- %{name} = %{epoch}:%{version}-%{release}
1422ln -sfn %{_kernelsrcdir} /lib/modules/%{kernel_release}/build
1423ln -sfn %{_kernelsrcdir} /lib/modules/%{kernel_release}/source
1424
1425%triggerun module-build -- %{name} = %{epoch}:%{version}-%{release}
1426if [ "$1" = 0 ]; then
1427 rm -f /lib/modules/%{kernel_release}/{build,source}
1428fi
1429
c5d76354 1430%files
601b4e87 1431%defattr(644,root,root,755)
46bb4084 1432%ifarch sparc sparc64
5253d53f 1433/boot/vmlinux.aout-%{kernel_release}
46bb4084 1434%endif
8cd1b586 1435%ifarch ia64
5253d53f 1436/boot/efi/vmlinuz-%{kernel_release}
8cd1b586 1437%endif
5253d53f
ER
1438/boot/vmlinuz-%{kernel_release}
1439/boot/System.map-%{kernel_release}
f9f0c8d1 1440%ghost %{initrd_dir}/initrd-%{kernel_release}.gz
47068aef 1441/lib/firmware/%{kernel_release}
5253d53f
ER
1442%dir /lib/modules/%{kernel_release}
1443%dir /lib/modules/%{kernel_release}/kernel
f959288b 1444%ifnarch sparc
5253d53f 1445/lib/modules/%{kernel_release}/kernel/arch
672a0690 1446%endif
5253d53f
ER
1447/lib/modules/%{kernel_release}/kernel/crypto
1448/lib/modules/%{kernel_release}/kernel/drivers
2a261cfb 1449%if %{have_drm} && %{without myown}
0a2b8395 1450%exclude /lib/modules/%{kernel_release}/kernel/drivers/gpu
6c5df6cc 1451%endif
5253d53f 1452/lib/modules/%{kernel_release}/kernel/fs
2c421faa 1453
1454# this directory will be removed after disabling rcutorture mod. in 2.6.20.
5253d53f 1455/lib/modules/%{kernel_release}/kernel/kernel
2c421faa 1456
5253d53f
ER
1457/lib/modules/%{kernel_release}/kernel/lib
1458/lib/modules/%{kernel_release}/kernel/net
2a261cfb 1459%if %{have_sound} && %{without myown}
5253d53f 1460%dir /lib/modules/%{kernel_release}/kernel/sound
b3721d7e 1461/lib/modules/%{kernel_release}/kernel/sound/ac97_bus.ko*
1462/lib/modules/%{kernel_release}/kernel/sound/sound*.ko*
2a261cfb 1463%ifnarch sparc
ff4421de 1464%exclude /lib/modules/%{kernel_release}/kernel/drivers/media/video/cx88/cx88-alsa.ko*
b3721d7e 1465%exclude /lib/modules/%{kernel_release}/kernel/drivers/media/video/em28xx/em28xx-alsa.ko*
1466%exclude /lib/modules/%{kernel_release}/kernel/drivers/media/video/saa7134/saa7134-alsa.ko*
04f9b17e 1467%endif
2a261cfb 1468%endif
5253d53f 1469%dir /lib/modules/%{kernel_release}/misc
2a261cfb 1470%if %{with pcmcia} && %{without myown}
b3721d7e 1471%exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/[!p]*
1472%exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/pd6729.ko*
5253d53f 1473%exclude /lib/modules/%{kernel_release}/kernel/drivers/*/pcmcia
512e1dc7 1474%if %{without rescuecd}
ff4421de 1475%exclude /lib/modules/%{kernel_release}/kernel/drivers/ata/pata_pcmcia.ko*
5253d53f 1476%exclude /lib/modules/%{kernel_release}/kernel/drivers/bluetooth/*_cs.ko*
5253d53f 1477%exclude /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/avm_cs.ko*
b1e75fda 1478%exclude /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/b1pcmcia.ko*
144cab6f 1479%exclude /lib/modules/%{kernel_release}/kernel/drivers/telephony/ixj_pcmcia.ko*
68831084 1480%exclude /lib/modules/%{kernel_release}/kernel/drivers/usb/gadget/g_midi.ko*
512e1dc7 1481%endif
1482%exclude /lib/modules/%{kernel_release}/kernel/drivers/ide/legacy/ide-cs.ko*
5253d53f 1483%exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/*_cs.ko*
ff4421de 1484%exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/b43
5253d53f 1485%exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/hostap/hostap_cs.ko*
ff4421de 1486%exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/libertas/*_cs.ko*
5253d53f
ER
1487%exclude /lib/modules/%{kernel_release}/kernel/drivers/parport/parport_cs.ko*
1488%exclude /lib/modules/%{kernel_release}/kernel/drivers/serial/serial_cs.ko*
5253d53f
ER
1489%exclude /lib/modules/%{kernel_release}/kernel/drivers/usb/host/sl811_cs.ko*
1490%endif
5253d53f 1491%ghost /lib/modules/%{kernel_release}/modules.*
abe120f9 1492# symlinks pointing to kernelsrcdir
1493%ghost /lib/modules/%{kernel_release}/build
1494%ghost /lib/modules/%{kernel_release}/source
5253d53f 1495%dir %{_sysconfdir}/modprobe.d/%{kernel_release}
cf06f88a 1496
c5d76354
JB
1497%ifarch alpha %{ix86} %{x8664} ppc ppc64 sparc sparc64
1498%files vmlinux
1499%defattr(644,root,root,755)
5253d53f 1500/boot/vmlinux-%{kernel_release}
c5d76354
JB
1501%endif
1502
2a261cfb 1503%if %{have_drm} && %{without myown}
35fde00b
JB
1504%files drm
1505%defattr(644,root,root,755)
0a2b8395 1506/lib/modules/%{kernel_release}/kernel/drivers/gpu
35fde00b
JB
1507%endif
1508
2a261cfb 1509%if %{with pcmcia} && %{without myown}
e7ae6cd3 1510%files pcmcia
cf06f88a 1511%defattr(644,root,root,755)
b3721d7e 1512/lib/modules/%{kernel_release}/kernel/drivers/pcmcia/*ko*
5253d53f 1513/lib/modules/%{kernel_release}/kernel/drivers/*/pcmcia
b3721d7e 1514%exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/pcmcia*ko*
512e1dc7 1515%if %{without rescuecd}
5253d53f 1516/lib/modules/%{kernel_release}/kernel/drivers/bluetooth/*_cs.ko*
5253d53f 1517/lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/avm_cs.ko*
b1e75fda 1518/lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/b1pcmcia.ko*
144cab6f 1519/lib/modules/%{kernel_release}/kernel/drivers/telephony/ixj_pcmcia.ko*
512e1dc7 1520%endif
ff4421de 1521/lib/modules/%{kernel_release}/kernel/drivers/ata/pata_pcmcia.ko*
512e1dc7 1522/lib/modules/%{kernel_release}/kernel/drivers/ide/legacy/ide-cs.ko*
5253d53f 1523/lib/modules/%{kernel_release}/kernel/drivers/net/wireless/*_cs.ko*
ff4421de 1524/lib/modules/%{kernel_release}/kernel/drivers/net/wireless/b43
5253d53f 1525/lib/modules/%{kernel_release}/kernel/drivers/net/wireless/hostap/hostap_cs.ko*
ff4421de 1526/lib/modules/%{kernel_release}/kernel/drivers/net/wireless/libertas/*_cs.ko*
5253d53f
ER
1527/lib/modules/%{kernel_release}/kernel/drivers/parport/parport_cs.ko*
1528/lib/modules/%{kernel_release}/kernel/drivers/serial/serial_cs.ko*
5253d53f 1529/lib/modules/%{kernel_release}/kernel/drivers/usb/host/sl811_cs.ko*
35fde00b 1530%endif
9b3bab6e 1531
6fb3ffc0 1532%ifarch ppc-broken
b443ca49 1533%if "%{_arch}" == "ppc"
d779450c 1534%files libs
1535%defattr(644,root,root,755)
5253d53f
ER
1536%dir /boot/libs-%{kernel_release}
1537/boot/libs-%{kernel_release}/common
1538/boot/libs-%{kernel_release}/kernel
1539/boot/libs-%{kernel_release}/lib
1540/boot/libs-%{kernel_release}/of1275
1541/boot/libs-%{kernel_release}/openfirmware
1542/boot/libs-%{kernel_release}/simple
1543%dir /boot/libs-%{kernel_release}/utils
1544%attr(755,root,root) /boot/libs-%{kernel_release}/utils/*
1545/boot/libs-%{kernel_release}/ld.script
d779450c 1546%endif
b443ca49 1547%endif
d779450c 1548
2a261cfb 1549%if %{have_sound} && %{without myown}
35fde00b
JB
1550%files sound-alsa
1551%defattr(644,root,root,755)
5253d53f
ER
1552/lib/modules/%{kernel_release}/kernel/sound
1553%exclude %dir /lib/modules/%{kernel_release}/kernel/sound
b3721d7e 1554%exclude /lib/modules/%{kernel_release}/kernel/sound/ac97_bus.ko*
1555%exclude /lib/modules/%{kernel_release}/kernel/sound/sound*.ko*
fbb03e0d 1556%if %{have_oss}
5253d53f 1557%exclude /lib/modules/%{kernel_release}/kernel/sound/oss
f12ce97e 1558%endif
2a261cfb 1559%ifnarch sparc
ff4421de 1560/lib/modules/%{kernel_release}/kernel/drivers/usb/gadget/g_midi.ko*
ff4421de 1561/lib/modules/%{kernel_release}/kernel/drivers/media/video/cx88/cx88-alsa.ko*
b3721d7e 1562/lib/modules/%{kernel_release}/kernel/drivers/media/video/em28xx/em28xx-alsa.ko*
1563/lib/modules/%{kernel_release}/kernel/drivers/media/video/saa7134/saa7134-alsa.ko*
2a261cfb 1564%endif
35fde00b 1565
2a261cfb 1566%if %{have_oss} && %{without myown}
35fde00b 1567%files sound-oss
9b3bab6e 1568%defattr(644,root,root,755)
5253d53f 1569/lib/modules/%{kernel_release}/kernel/sound/oss
7291f0f8 1570%endif
512e1dc7 1571%endif
601b4e87
KT
1572
1573%files headers
1574%defattr(644,root,root,755)
5253d53f
ER
1575%dir %{_kernelsrcdir}
1576%{_kernelsrcdir}/include
2c421faa 1577%{_kernelsrcdir}/config-dist
1578%{_kernelsrcdir}/Module.symvers-dist
d20b1dc0 1579
ecc2a0f6 1580%files module-build -f aux_files
d20b1dc0 1581%defattr(644,root,root,755)
2c421faa 1582# symlinks pointint to kernelsrcdir
1583%dir /lib/modules/%{kernel_release}
1584/lib/modules/%{kernel_release}/build
5253d53f 1585%{_kernelsrcdir}/localversion
01053713
AM
1586%ifarch ppc ppc64
1587%{_kernelsrcdir}/arch/powerpc/lib/crtsavres.*
1588%endif
08c11c7a 1589%{_kernelsrcdir}/arch/*/kernel/asm-offsets*
7bef4bf5 1590%{_kernelsrcdir}/arch/*/kernel/sigframe*.h
27dad056 1591%{_kernelsrcdir}/drivers/lguest/lg.h
8b54ea24 1592%{_kernelsrcdir}/kernel/bounds.c
5253d53f
ER
1593%dir %{_kernelsrcdir}/scripts
1594%dir %{_kernelsrcdir}/scripts/kconfig
1595%{_kernelsrcdir}/scripts/Kbuild.include
1596%{_kernelsrcdir}/scripts/Makefile*
1597%{_kernelsrcdir}/scripts/basic
1598%{_kernelsrcdir}/scripts/mkmakefile
1599%{_kernelsrcdir}/scripts/mod
1600%{_kernelsrcdir}/scripts/setlocalversion
1601%{_kernelsrcdir}/scripts/*.c
1602%{_kernelsrcdir}/scripts/*.sh
1603%{_kernelsrcdir}/scripts/kconfig/*
2c421faa 1604%{_kernelsrcdir}/scripts/mkcompile_h
601b4e87
KT
1605
1606%files doc
1607%defattr(644,root,root,755)
76fa8c91 1608%dir %{_kernelsrcdir}
5253d53f 1609%{_kernelsrcdir}/Documentation
601b4e87 1610
402404fb 1611%if %{with source}
ecc2a0f6 1612%files source -f aux_files_exc
601b4e87 1613%defattr(644,root,root,755)
5253d53f
ER
1614%{_kernelsrcdir}/arch/*/[!Mk]*
1615%{_kernelsrcdir}/arch/*/kernel/[!M]*
763091d9
PS
1616%{_kernelsrcdir}/arch/ia64/kvm
1617%{_kernelsrcdir}/arch/powerpc/kvm
01053713 1618%ifarch ppc ppc64
bb1e7be4 1619%exclude %{_kernelsrcdir}/arch/powerpc/lib/crtsavres.*
01053713 1620%endif
763091d9 1621%{_kernelsrcdir}/arch/s390/kvm
27dad056 1622%{_kernelsrcdir}/arch/x86/kvm
08c11c7a 1623%exclude %{_kernelsrcdir}/arch/*/kernel/asm-offsets*
7bef4bf5 1624%exclude %{_kernelsrcdir}/arch/*/kernel/sigframe*.h
27dad056 1625%exclude %{_kernelsrcdir}/drivers/lguest/lg.h
5253d53f
ER
1626%{_kernelsrcdir}/block
1627%{_kernelsrcdir}/crypto
1628%{_kernelsrcdir}/drivers
1629%{_kernelsrcdir}/fs
a52b9424 1630%if %{with grsecurity} && %{without rescuecd}
5253d53f
ER
1631%{_kernelsrcdir}/grsecurity
1632%endif
1633%{_kernelsrcdir}/init
1634%{_kernelsrcdir}/ipc
1635%{_kernelsrcdir}/kernel
8b54ea24 1636%exclude %{_kernelsrcdir}/kernel/bounds.c
5253d53f
ER
1637%{_kernelsrcdir}/lib
1638%{_kernelsrcdir}/mm
1639%{_kernelsrcdir}/net
27dad056 1640%{_kernelsrcdir}/virt
5253d53f
ER
1641%{_kernelsrcdir}/scripts/*
1642%exclude %{_kernelsrcdir}/scripts/Kbuild.include
1643%exclude %{_kernelsrcdir}/scripts/Makefile*
1644%exclude %{_kernelsrcdir}/scripts/basic
1645%exclude %{_kernelsrcdir}/scripts/kconfig
1646%exclude %{_kernelsrcdir}/scripts/mkmakefile
1647%exclude %{_kernelsrcdir}/scripts/mod
1648%exclude %{_kernelsrcdir}/scripts/setlocalversion
1649%exclude %{_kernelsrcdir}/scripts/*.c
1650%exclude %{_kernelsrcdir}/scripts/*.sh
1651%{_kernelsrcdir}/sound
1652%{_kernelsrcdir}/security
1653%{_kernelsrcdir}/usr
1654%{_kernelsrcdir}/COPYING
1655%{_kernelsrcdir}/CREDITS
1656%{_kernelsrcdir}/MAINTAINERS
1657%{_kernelsrcdir}/README
1658%{_kernelsrcdir}/REPORTING-BUGS
869e45ec 1659%{_kernelsrcdir}/.mailmap
9b3bab6e 1660%endif
This page took 1.227585 seconds and 4 git commands to generate.