]> git.pld-linux.org Git - packages/kernel.git/blame - kernel.spec
- updated for alpha architecture
[packages/kernel.git] / kernel.spec
CommitLineData
a7313793 1#
0fec42fa 2# NOTE:
351f379b
JR
3# the following bcond combos will not work
4# - without_vserver and any of the following
5# - with_apparmor
6# - with_grsec_minimal
7# - with_grsec_full
a5585a68 8#
a5585a68 9# TODO:
351f379b
JR
10# - benchmark NO_HZ & HZ=1000 vs HZ=300 on i686
11# - add a subpackage (kernel-firmware?) for ~35 firmware files
17da405a 12# - update or remove tahoe9xx patch2
13# - update or remove mpt-fusion patch90
14# - update grsec_minimal patch1000:
15# fs/proc/base.c:1484: error: 'struct task_struct' has no member named 'uid'
351f379b 16#
fc5a68a2
AM
17# HOWTO update configuration files:
18# - run build
19# - add new options to proper config (kernel-multiarch.config, kernel-x86.config, kernel-powerpc.config etc)
20# - sort configuration files using:
21# ./kernel-config-sort.pl ~/rpm/BUILD/kernel-%{version}/linux-%{version}/ -a x86 kernel-x86_84.config
22# ./kernel-config-sort.pl ~/rpm/BUILD/kernel-%{version}/linux-%{version} kernel-multiarch.config
a5585a68
AM
23#
24# Conditional build:
a5585a68 25%bcond_without source # don't build kernel-source package
351f379b
JR
26%bcond_without pcmcia # don't build pcmcia
27
a5585a68 28%bcond_with verbose # verbose build (V=1)
351f379b
JR
29%bcond_without reiser4 # support for reiser4 fs (experimental)
30
31%bcond_without grsecurity # don't build grsecurity nor pax at all
351f379b 32%bcond_without grsec_full # build full grsecurity
17da405a 33%bcond_with grsec_minimal # build only minimal subset (proc,link,fifo,shm)
34%bcond_with pax # build pax and full grsecurity (ie. grsec_full && pax)
351f379b
JR
35
36%bcond_with fbcondecor # build fbcondecor (disable FB_TILEBLITTING and affected fb modules)
37%bcond_with pae # build PAE (HIGHMEM64G) support on uniprocessor
38%bcond_with nfsroot # build with root on NFS support
39
7f07242b 40%bcond_without imq # imq support
1b75c2b4
JR
41%bcond_without wrr # wrr support
42%bcond_without esfq # esfq support
351f379b
JR
43%bcond_without ipv6 # ipv6 support
44
45%bcond_without vserver # support for VServer (enabled by default)
46%bcond_without tuxonice # support for tuxonice (ex-suspend2) (enabled by default)
47%bcond_without apparmor # build kernel with apparmor (exerimental mix)
351f379b
JR
48
49%bcond_with rescuecd # build kernel for our rescue
50
351f379b 51%bcond_with myown # build with your own config (kernel-myown.config)
a5585a68
AM
52
53%{?debug:%define with_verbose 1}
54
351f379b 55%if %{without grsecurity}
b488384f
AM
56%unglobal with_grsec_full
57%unglobal with_grsec_minimal
58%unglobal with_pax
a5585a68 59%endif
351f379b 60
17da405a 61%if %{with pax}
b488384f 62%unglobal with_grsec_minimal
351f379b
JR
63%define with_grsec_full 1
64%define with_grsecurity 1
65%define with_pax 1
66%endif
67
17da405a 68%if %{with grsec_minimal}
b488384f
AM
69%unglobal with_pax
70%unglobal with_grsec_full
351f379b 71%define with_grsecurity 1
351f379b
JR
72%endif
73
17da405a 74%if %{with grsec_full}
b488384f 75%unglobal with_grsec_minimal
351f379b
JR
76%define with_grsecurity 1
77%endif
78
79%define have_drm 1
80%define have_oss 1
81%define have_sound 1
101ae904 82%define have_pcmcia 1
351f379b
JR
83
84%if %{with rescuecd}
b488384f
AM
85%unglobal with_apparmor
86%unglobal with_tuxonice
87%unglobal with_grsecurity
88%unglobal with_grsec_full
89%unglobal with_grsec_minimal
90%unglobal with_pax
91%unglobal with_vserver
351f379b
JR
92%define have_drm 0
93%define have_sound 0
94%endif
95
101ae904 96%if %{with myown}
97%define have_drm 0
98%define have_oss 0
99%define have_sound 0
100%define have_pcmcia 0
351f379b
JR
101%endif
102
103%ifarch sparc sparc64
b488384f 104%unglobal with_pcmcia
351f379b
JR
105%define have_drm 0
106%define have_oss 0
107%endif
108
101ae904 109%if %{without pcmcia}
110%define have_pcmcia 0
111%endif
112
38f04535
AM
113%define basever 2.6.32
114%define postver %{nil}
115%define rel 0.1
a5585a68
AM
116
117%define _enable_debug_packages 0
a5585a68 118
351f379b 119%define squashfs_version 3.4
0ada99ac 120%define tuxonice_version 3.0.1
351f379b
JR
121%define netfilter_snap 20070806
122
101ae904 123%if %{with myown}
124%if "%{_alt_kernel}" == ""
125%define alt_kernel myown
351f379b 126%endif
101ae904 127%else
128%if %{without rescuecd}
129%define __alt_kernel %{?with_pax:pax}%{!?with_grsec_full:nogrsecurity}%{!?with_apparmor:noaa}%{?with_pae:pae}
351f379b
JR
130%if "%{__alt_kernel}" != ""
131%define alt_kernel %{__alt_kernel}
132%endif
101ae904 133%else
134%define alt_kernel rescuecd
135%endif
136%endif
351f379b
JR
137
138# kernel release (used in filesystem and eventually in uname -r)
139# modules will be looked from /lib/modules/%{kernel_release}
140# localversion is just that without version for "> localversion"
141%define localversion %{rel}
142%define kernel_release %{version}%{?alt_kernel:_%{alt_kernel}}-%{localversion}
a5585a68
AM
143
144Summary: The Linux kernel (the core of the Linux operating system)
351f379b
JR
145Summary(de.UTF-8): Der Linux-Kernel (Kern des Linux-Betriebssystems)
146Summary(et.UTF-8): Linuxi kernel (ehk operatsioonisüsteemi tuum)
147Summary(fr.UTF-8): Le Kernel-Linux (La partie centrale du systeme)
148Summary(pl.UTF-8): Jądro Linuksa
149Name: kernel%{_alt_kernel}
150Version: %{basever}%{postver}
151Release: %{rel}
a5585a68 152Epoch: 3
c491b43b 153License: GPL v2
a5585a68 154Group: Base/Kernel
351f379b 155Source0: http://www.kernel.org/pub/linux/kernel/v2.6/linux-%{basever}.tar.bz2
38f04535 156# Source0-md5: 260551284ac224c3a43c4adac7df4879
351f379b
JR
157%if "%{postver}" != "%{nil}"
158Source1: http://www.kernel.org/pub/linux/kernel/v2.6/patch-%{version}.bz2
12c24919 159# Source1-md5: e6c460f49a6c31b539b92939f9241abe
351f379b
JR
160%endif
161
162Source3: kernel-autoconf.h
163Source4: kernel-config.h
164Source5: kernel-ppclibs.Makefile
165Source6: kernel-config.awk
166Source7: kernel-module-build.pl
167Source8: kernel-track-config-change.awk
168# not used by kernel.spec, but it's good to have it in SOURCES
169Source9: kernel-config-sort.pl
170Source10: kernel.make
171
172Source20: kernel-multiarch.config
173Source21: kernel-x86.config
174Source22: kernel-sparc.config
5a99ae3d 175Source23: kernel-alpha.config
176Source24: kernel-powerpc.config
177Source25: kernel-ia64.config
351f379b
JR
178
179Source40: kernel-netfilter.config
180Source41: kernel-patches.config
181Source42: kernel-tuxonice.config
182Source43: kernel-vserver.config
183Source45: kernel-grsec.config
184
185Source49: kernel-pax.config
186Source50: kernel-no-pax.config
187Source51: kernel-grsec_minimal.config
188Source55: kernel-imq.config
189Source56: kernel-reiser4.config
190Source57: kernel-wrr.config
191
192Source58: kernel-inittmpfs.config
193Source59: kernel-bzip2-lzma.config
194
351f379b 195# tahoe9xx http://www.tahoe.pl/drivers/tahoe9xx-2.6.24.patch
87365863 196Patch2: kernel-tahoe9xx.patch
351f379b
JR
197
198# http://dev.gentoo.org/~spock/projects/fbcondecor/archive/fbcondecor-0.9.4-2.6.25-rc6.patch
199Patch3: kernel-fbcondecor.patch
60bb736d 200Patch4: kernel-fbcon-margins.patch
351f379b
JR
201
202# netfilter related stuff mostly based on patch-o-matic-ng
17da405a 203# snapshot 20070806 with some fixes. Some modules
204# were ported to nf_conntrack.
351f379b
JR
205
206Patch10: kernel-pom-ng-IPV4OPTSSTRIP.patch
207Patch11: kernel-pom-ng-ipv4options.patch
208
209Patch14: kernel-pom-ng-ROUTE.patch
210Patch16: kernel-pom-ng-mms-conntrack-nat.patch
211Patch22: kernel-pom-ng-rsh.patch
212Patch23: kernel-pom-ng-rpc.patch
213
214# based on http://mike.it-loops.com/rtsp/rtsp-2.6.26.patch
215Patch36: kernel-nf_rtsp.patch
216
217# http://ftp.linux-vserver.org/pub/people/dhozac/p/k/delta-owner-xid-feat02.diff
218Patch37: kernel-owner-xid.patch
219
220# based on http://www.svn.barbara.eu.org/ipt_account/attachment/wiki/Software/ipt_account-0.1.21-20070804164729.tar.gz?format=raw
221Patch38: kernel-ipt_account.patch
222
223# based on http://www.intra2net.com/de/produkte/opensource/ipt_account/pom-ng-ipt_ACCOUNT-1.12.tgz
224Patch39: kernel-ipt_ACCOUNT.patch
225
226# based on kernel-2.6.25-layer7-2.20.patch from
227# http://switch.dl.sourceforge.net/sourceforge/l7-filter/netfilter-layer7-v2.20.tar.gz
228Patch40: kernel-layer7.patch
229
230# http://www.ssi.bg/~ja/nfct/ipvs-nfct-2.6.28-1.diff
231Patch41: kernel-ipvs-nfct.patch
232
351f379b
JR
233### End netfilter
234
235# http://zph.bratcheda.org/linux-2.6.26.3-zph.patch
236Patch49: kernel-zph.patch
237
7f07242b 238# based on http://www.linuximq.net/patchs/linux-2.6.29.1-imq-test2.diff
351f379b
JR
239Patch50: kernel-imq.patch
240
241# http://www.kernel.org/pub/linux/kernel/people/edward/reiser4/reiser4-for-2.6/reiser4-for-2.6.28.patch.bz2
242Patch51: kernel-reiser4.patch
243
244# http://www.zz9.dk/patches/wrr-linux-071203-2.6.25.patch.gz
245Patch52: kernel-wrr.patch
246
247# http://fatooh.org/esfq-2.6/sfq-2.6.24.1.tar.bz2
60bb736d 248Patch53: kernel-esfq.patch
351f379b
JR
249
250# http://memebeam.org/free-software/toshiba_acpi/toshiba_acpi-dev_toshiba_test5-linux_2.6.26.patch
60bb736d 251Patch54: kernel-toshiba_acpi.patch
351f379b
JR
252
253# by Baggins request:
254# derived from ftp://ftp.cmf.nrl.navy.mil/pub/chas/linux-atm/vbr/vbr-kernel-diffs
60bb736d
JR
255Patch55: kernel-atm-vbr.patch
256Patch56: kernel-atmdd.patch
351f379b 257
351f379b
JR
258# http://synce.svn.sourceforge.net/svnroot/synce/trunk/patches/linux-2.6.22-rndis_host-wm5.patch
259Patch59: kernel-rndis_host-wm5.patch
260
261# Project suspend2 renamed to tuxonice
7e46296a 262# http://www.tuxonice.net/downloads/all/tuxonice-3.0.99.32-for-2.6.32.patch.bz2
60bb736d
JR
263Patch69: kernel-tuxonice.patch
264Patch70: kernel-tuxonice-headers.patch
351f379b
JR
265
266# adds some ids for hostap suported cards and monitor_enable from/for aircrack-ng
267# http://patches.aircrack-ng.org/hostap-kernel-2.6.18.patch
60bb736d 268Patch85: kernel-hostap.patch
351f379b 269
9474138d 270# Taken from http://download.opensuse.org/factory/repo/src-oss/suse/src/kernel-source-2.6.30-10.3.src.rpm
351f379b
JR
271Patch90: kernel-mpt-fusion.patch
272
7e46296a 273# based on http://vserver.13thfloor.at/Experimental/patch-2.6.32-vs2.3.0.36.26.diff
60bb736d 274Patch100: kernel-vserver-2.3.patch
351f379b
JR
275Patch101: kernel-vserver-fixes.patch
276
277# Wake-On-Lan fix for nForce drivers; using http://atlas.et.tudelft.nl/verwei90/nforce2/wol.html
278# Fix verified for that kernel version.
60bb736d 279Patch130: kernel-forcedeth-WON.patch
351f379b 280
4ae1df7a 281# http://download.filesystems.org/unionfs/unionfs-2.x/unionfs-2.5.3_for_2.6.31.diff.gz
351f379b 282Patch140: kernel-unionfs.patch
351f379b
JR
283
284# aufs1, http://aufs.sourceforge.net/
17da405a 285# aufs1 is NOT maintained since Jan 2009.
351f379b
JR
286Patch145: kernel-aufs.patch
287Patch146: kernel-aufs-support.patch
351f379b 288
a899ef35 289Patch148: kernel-aufs2.patch
290
351f379b
JR
291Patch150: kernel-ppc-crtsavres.patch
292
60bb736d 293Patch200: kernel-ppc-ICE-hacks.patch
351f379b
JR
294
295# The following patch extend the routing functionality in Linux
296# to support static routes (defined by user), new way to use the
297# alternative routes, the reverse path protection (rp_filter),
298# the NAT processing to use correctly the routing when multiple
299# gateways are used.
300# http://www.ssi.bg/~ja/routes-2.6.28-16.diff
301Patch300: kernel-routes.patch
302
60bb736d 303Patch1000: kernel-grsec-minimal.patch
351f379b
JR
304
305Patch2000: kernel-small_fixes.patch
60bb736d 306Patch2001: kernel-pwc-uncompress.patch
351f379b
JR
307Patch2003: kernel-regressions.patch
308
309# kill some thousands of warnings
310# (only warnings, so just remove parts of this patch if conflics)
60bb736d 311Patch2500: kernel-warnings.patch
351f379b 312
5e665963
AM
313# git://kernel.ubuntu.com/ubuntu/ubuntu-karmic.git
314# see ubuntu/apparmor dir
351f379b 315Patch5000: kernel-apparmor.patch
351f379b
JR
316
317# for rescuecd
318# based on http://ftp.leg.uct.ac.za/pub/linux/rip/inittmpfs-2.6.14.diff.gz
319Patch7000: kernel-inittmpfs.patch
320
db2ff2a6 321# based on http://www.grsecurity.net/~spender/grsecurity-2.1.14-2.6.31.6-200911151724.patch" kernel-grsec_full.patch
4a6985f1
AM
322# NOTE: put raw upstream patches on kernel-grsec_full.patch:GRSECURITY_RAW for reference
323# (since upstream deletes older patches)
60bb736d
JR
324Patch9999: kernel-grsec_full.patch
325Patch10000: kernel-grsec-caps.patch
326Patch10001: kernel-grsec-common.patch
351f379b 327Patch10002: kernel-grsec_fixes.patch
60bb736d 328Patch10003: kernel-grsec-no-stupid-SbO.patch
bf6838be 329
a5585a68 330URL: http://www.kernel.org/
351f379b 331BuildRequires: binutils >= 3:2.18
a5585a68
AM
332%ifarch sparc sparc64
333BuildRequires: elftoaout
334%endif
351f379b
JR
335%ifarch ppc
336BuildRequires: uboot-mkimage
337%endif
338AutoReqProv: no
339BuildRequires: /sbin/depmod
340BuildRequires: gcc >= 5:3.2
cfce203c 341BuildRequires: xz >= 1:4.999.7
351f379b
JR
342# for hostname command
343BuildRequires: net-tools
a5585a68 344BuildRequires: perl-base
b488384f 345BuildRequires: rpm-build >= 4.5-24
351f379b
JR
346BuildRequires: rpmbuild(macros) >= 1.217
347Requires(post): coreutils
348Requires(post): geninitrd >= 10000-3
349Requires(post): module-init-tools >= 0.9.9
350Requires: /sbin/depmod
351Requires: coreutils
352Requires: geninitrd >= 10000-3
353Requires: module-init-tools >= 0.9.9
354Provides: %{name}(netfilter) = %{netfilter_snap}
355Provides: %{name}(vermagic) = %{kernel_release}
356Obsoletes: kernel%{_alt_kernel}-isdn-mISDN
357Obsoletes: kernel-misc-acer_acpi
358Obsoletes: kernel-misc-fuse
359Obsoletes: kernel-misc-uvc
a5585a68 360Obsoletes: kernel-modules
351f379b
JR
361Obsoletes: kernel-net-ar81
362Obsoletes: kernel-net-hostap
363Obsoletes: kernel-net-ieee80211
364Obsoletes: kernel-net-ipp2p
365Obsoletes: kernel-net-rt61
366Obsoletes: kernel-smp
367Conflicts: e2fsprogs < 1.29
368Conflicts: isdn4k-utils < 3.1pre1
369Conflicts: jfsutils < 1.1.3
370Conflicts: module-init-tools < 0.9.10
371Conflicts: nfs-utils < 1.0.5
372Conflicts: oprofile < 0.9
373Conflicts: ppp < 1:2.4.0
374Conflicts: procps < 3.2.0
375Conflicts: quota-tools < 3.09
376%if %{with reiserfs4}
377Conflicts: reiser4progs < 1.0.0
378%endif
379Conflicts: reiserfsprogs < 3.6.3
380Conflicts: udev < 1:081
381Conflicts: util-linux < 2.10o
d3c4e01e 382Conflicts: util-vserver < 0.30.216
351f379b
JR
383Conflicts: xfsprogs < 2.6.0
384%if %{with pae}
385ExcludeArch: i386 i486 i586
386%else
387ExclusiveArch: %{ix86} %{x8664} alpha arm ia64 ppc ppc64 sparc sparc64
388%endif
a5585a68
AM
389ExclusiveOS: Linux
390BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
391
351f379b
JR
392%ifarch %{ix86} %{x8664}
393%define target_arch_dir x86
394%endif
395%ifarch ppc ppc64
396%define target_arch_dir powerpc
397%endif
5a99ae3d 398%ifarch sparc sparc64
399%define target_arch_dir sparc
400%endif
401%ifnarch %{ix86} %{x8664} ppc ppc64 sparc sparc64
351f379b
JR
402%define target_arch_dir %{_target_base_arch}
403%endif
404
405%define defconfig arch/%{target_arch_dir}/defconfig
406
407# No ELF objects there to strip (skips processing 27k files)
a4a25b0e 408%define _noautostrip '(.*%{_kernelsrcdir}/.*|.*/vmlinux.*)'
351f379b
JR
409%define _noautochrpath .*%{_kernelsrcdir}/.*
410
a5585a68
AM
411%ifarch ia64
412%define initrd_dir /boot/efi
413%else
414%define initrd_dir /boot
415%endif
416
351f379b
JR
417%define topdir %{_builddir}/%{name}-%{version}
418%define srcdir %{topdir}/linux-%{basever}
419%define objdir %{topdir}/%{targetobj}
420%define targetobj %{_target_base_arch}-gcc-%(%{kgcc} -dumpversion)
421
422%define _kernelsrcdir /usr/src/linux%{_alt_kernel}-%{version}
423
424%if "%{_target_base_arch}" != "%{_arch}"
425 %define CrossOpts ARCH=%{_target_base_arch} CROSS_COMPILE=%{_target_cpu}-pld-linux-
426 %define DepMod /bin/true
427
428 %if "%{_arch}" == "sparc" && "%{_target_base_arch}" == "sparc64"
429 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
430 %define DepMod /sbin/depmod
431 %endif
432
433 %if "%{_arch}" == "sparc64" && "%{_target_base_arch}" == "sparc"
434 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
435 %define DepMod /sbin/depmod
436 %endif
437
438 %if "%{_arch}" == "x86_64" && "%{_target_base_arch}" == "i386"
439 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
440 %define DepMod /sbin/depmod
441 %endif
442
5a99ae3d 443 %if "%{_target_base_arch}" == "ppc" || "%{_target_base_arch}" == "ppc64"
351f379b
JR
444 %define CrossOpts ARCH=powerpc CROSS_COMPILE=%{_target_cpu}-pld-linux-
445 %endif
446%else
447 %ifarch ppc ppc64
448 %define CrossOpts ARCH=powerpc CC="%{__cc}"
449 %else
450 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
451 %endif
452 %define DepMod /sbin/depmod
453%endif
454%define MakeOpts %{CrossOpts} HOSTCC="%{__cc}"
455
456%define __features Netfilter module dated: %{netfilter_snap}\
17da405a 457%{?with_grsec_full:Grsecurity support - enabled}\
458%{?with_grsec_minimal:Grsecurity minimal support /proc,link,fifo,shm/ - enabled}\
351f379b
JR
459%{?with_pax:PaX support - enabled}\
460%{?with_fbcondecor:Fbsplash/fbcondecor - enabled }\
461%{?with_nfsroot:Root on NFS - enabled}\
462%{?with_apparmor:apparmor support - enabled}\
351f379b
JR
463
464%define Features %(echo "%{__features}" | sed '/^$/d')
465
a5585a68
AM
466%description
467This package contains the Linux kernel that is used to boot and run
468your system. It contains few device drivers for specific hardware.
469Most hardware is instead supported by modules loaded after booting.
470
351f379b
JR
471%{Features}
472
3a467bc1
JR
473%description -l de.UTF-8
474Das Kernel-Paket enthält den Linux-Kernel (vmlinuz), den Kern des
475Linux-Betriebssystems. Der Kernel ist für grundliegende
a5585a68 476Systemfunktionen verantwortlich: Speicherreservierung,
3a467bc1 477Prozeß-Management, Geräte Ein- und Ausgaben, usw.
a5585a68 478
351f379b
JR
479%{Features}
480
3a467bc1 481%description -l fr.UTF-8
a5585a68 482Le package kernel contient le kernel linux (vmlinuz), la partie
3a467bc1
JR
483centrale d'un système d'exploitation Linux. Le noyau traite les
484fonctions basiques d'un système d'exploitation: allocation mémoire,
485allocation de process, entrée/sortie de peripheriques, etc.
a5585a68 486
351f379b
JR
487%{Features}
488
3a467bc1
JR
489%description -l pl.UTF-8
490Pakiet zawiera jądro Linuksa niezbędne do prawidłowego działania
491Twojego komputera. Zawiera w sobie sterowniki do sprzętu znajdującego
492się w komputerze, takiego jak sterowniki dysków itp.
a5585a68 493
351f379b
JR
494%{Features}
495
496%package vmlinux
497Summary: vmlinux - uncompressed kernel image
498Summary(de.UTF-8): vmlinux - dekompressiertes Kernel Bild
499Summary(pl.UTF-8): vmlinux - rozpakowany obraz jądra
500Group: Base/Kernel
501Obsoletes: kernel-smp-vmlinux
502
503%description vmlinux
504vmlinux - uncompressed kernel image.
505
506%description vmlinux -l de.UTF-8
507vmlinux - dekompressiertes Kernel Bild.
508
509%description vmlinux -l pl.UTF-8
510vmlinux - rozpakowany obraz jądra.
511
a5585a68
AM
512%package drm
513Summary: DRM kernel modules
351f379b
JR
514Summary(de.UTF-8): DRM Kernel Treiber
515Summary(pl.UTF-8): Sterowniki DRM
a5585a68 516Group: Base/Kernel
351f379b
JR
517Requires(postun): %{name} = %{epoch}:%{version}-%{release}
518Requires: %{name} = %{epoch}:%{version}-%{release}
519Obsoletes: kernel-smp-drm
07ff8614 520AutoReqProv: no
a5585a68
AM
521
522%description drm
351f379b
JR
523DRM kernel modules.
524
525%description drm -l de.UTF-8
526DRM Kernel Treiber.
a5585a68 527
3a467bc1 528%description drm -l pl.UTF-8
351f379b 529Sterowniki DRM.
a5585a68
AM
530
531%package pcmcia
532Summary: PCMCIA modules
351f379b
JR
533Summary(de.UTF-8): PCMCIA Module
534Summary(pl.UTF-8): Moduły PCMCIA
a5585a68 535Group: Base/Kernel
351f379b
JR
536Requires(postun): %{name} = %{epoch}:%{version}-%{release}
537Requires: %{name} = %{epoch}:%{version}-%{release}
538Obsoletes: kernel-smp-pcmcia
539Conflicts: pcmcia-cs < 3.1.21
540Conflicts: pcmciautils < 004
07ff8614 541AutoReqProv: no
a5585a68
AM
542
543%description pcmcia
351f379b
JR
544PCMCIA modules.
545
546%description pcmcia -l de.UTF-8
547PCMCIA Module.
a5585a68 548
3a467bc1 549%description pcmcia -l pl.UTF-8
351f379b
JR
550Moduły PCMCIA.
551
552%package libs
553Summary: Libraries for preparing bootable kernel on PowerPCs
554Summary(pl.UTF-8): Biblioteki do przygotowania bootowalnego jądra dla PowerPC
555Group: Base/Kernel
556Requires: %{name} = %{epoch}:%{version}-%{release}
557Requires: mkvmlinuz >= 1.3
558Obsoletes: kernel-smp-libs
07ff8614 559AutoReqProv: no
351f379b
JR
560
561%description libs
562Libraries for preparing bootable kernel on PowerPCs. Script called
563mkvmlinuz may be useful for this.
564
565%description libs -l pl.UTF-8
566Biblioteki do przygotowania bootowalnego jądra dla PowerPC. Skrypt
567mkvmlinuz może być do tego przydatny.
a5585a68
AM
568
569%package sound-alsa
570Summary: ALSA kernel modules
351f379b
JR
571Summary(de.UTF-8): ALSA Kernel Module
572Summary(pl.UTF-8): Sterowniki dźwięku ALSA
a5585a68 573Group: Base/Kernel
351f379b
JR
574Requires(postun): %{name} = %{epoch}:%{version}-%{release}
575Requires: %{name} = %{epoch}:%{version}-%{release}
576Obsoletes: kernel-smp-sound-alsa
07ff8614 577AutoReqProv: no
a5585a68
AM
578
579%description sound-alsa
580ALSA (Advanced Linux Sound Architecture) sound drivers.
581
351f379b
JR
582%description sound-alsa -l de.UTF-8
583ALSA (Advanced Linux Sound Architecture) Sound-Treiber.
584
3a467bc1
JR
585%description sound-alsa -l pl.UTF-8
586Sterowniki dźwięku ALSA (Advanced Linux Sound Architecture).
a5585a68
AM
587
588%package sound-oss
589Summary: OSS kernel modules
351f379b
JR
590Summary(de.UTF-8): OSS Kernel Module
591Summary(pl.UTF-8): Sterowniki dźwięku OSS
a5585a68 592Group: Base/Kernel
351f379b
JR
593Requires(postun): %{name} = %{epoch}:%{version}-%{release}
594Requires: %{name} = %{epoch}:%{version}-%{release}
595Obsoletes: kernel-smp-sound-oss
07ff8614 596AutoReqProv: no
a5585a68
AM
597
598%description sound-oss
599OSS (Open Sound System) drivers.
600
351f379b
JR
601%description sound-oss -l de.UTF-8
602OSS (Open Sound System) Treiber.
603
3a467bc1
JR
604%description sound-oss -l pl.UTF-8
605Sterowniki dźwięku OSS (Open Sound System).
a5585a68 606
a5585a68
AM
607%package headers
608Summary: Header files for the Linux kernel
351f379b
JR
609Summary(de.UTF-8): Header Dateien für den Linux-Kernel
610Summary(pl.UTF-8): Pliki nagłówkowe jądra Linuksa
611Group: Development/Building
612Provides: %{name}-headers(netfilter) = %{netfilter_snap}
07ff8614 613AutoReqProv: no
a5585a68
AM
614
615%description headers
616These are the C header files for the Linux kernel, which define
351f379b
JR
617structures and constants that are needed when rebuilding the kernel or
618building kernel modules.
619
620%description headers -l de.UTF-8
621Dies sind die C Header Dateien für den Linux-Kernel, die definierte
622Strukturen und Konstante beinhalten, die beim rekompilieren des
623Kernels oder bei Kernel Modul kompilationen gebraucht werden.
a5585a68 624
3a467bc1
JR
625%description headers -l pl.UTF-8
626Pakiet zawiera pliki nagłówkowe jądra, niezbędne do rekompilacji jądra
627oraz budowania modułów jądra.
a5585a68
AM
628
629%package module-build
630Summary: Development files for building kernel modules
351f379b
JR
631Summary(de.UTF-8): Development Dateien die beim Kernel Modul kompilationen gebraucht werden
632Summary(pl.UTF-8): Pliki służące do budowania modułów jądra
633Group: Development/Building
a5585a68 634Requires: %{name}-headers = %{epoch}:%{version}-%{release}
351f379b 635Conflicts: rpmbuild(macros) < 1.321
07ff8614 636AutoReqProv: no
a5585a68
AM
637
638%description module-build
639Development files from kernel source tree needed to build Linux kernel
640modules from external packages.
641
351f379b
JR
642%description module-build -l de.UTF-8
643Development Dateien des Linux-Kernels die beim kompilieren externer
644Kernel Module gebraucht werden.
645
3a467bc1
JR
646%description module-build -l pl.UTF-8
647Pliki ze drzewa źródeł jądra potrzebne do budowania modułów jądra
648Linuksa z zewnętrznych pakietów.
a5585a68
AM
649
650%package source
651Summary: Kernel source tree
351f379b
JR
652Summary(de.UTF-8): Der Kernel Quelltext
653Summary(pl.UTF-8): Kod źródłowy jądra Linuksa
654Group: Development/Building
a5585a68 655Requires: %{name}-module-build = %{epoch}:%{version}-%{release}
07ff8614 656AutoReqProv: no
a5585a68
AM
657
658%description source
351f379b
JR
659This is the source code for the Linux kernel. You can build a custom
660kernel that is better tuned to your particular hardware.
a5585a68 661
3a467bc1
JR
662%description source -l de.UTF-8
663Das Kernel-Source-Paket enthält den source code (C/Assembler-Code) des
a5585a68 664Linux-Kernels. Die Source-Dateien werden gebraucht, um viele
351f379b 665C-Programme zu kompilieren, da sie auf Konstanten zurückgreifen, die
3a467bc1 666im Kernel-Source definiert sind. Die Source-Dateien können auch
351f379b 667benutzt werden, um einen Kernel zu kompilieren, der besser auf Ihre
a5585a68
AM
668Hardware ausgerichtet ist.
669
3a467bc1 670%description source -l fr.UTF-8
a5585a68 671Le package pour le kernel-source contient le code source pour le noyau
3a467bc1
JR
672linux. Ces sources sont nécessaires pour compiler la plupart des
673programmes C, car il dépend de constantes définies dans le code
674source. Les sources peuvent être aussi utilisée pour compiler un noyau
675personnalisé pour avoir de meilleures performances sur des matériels
a5585a68
AM
676particuliers.
677
3a467bc1
JR
678%description source -l pl.UTF-8
679Pakiet zawiera kod źródłowy jądra systemu.
a5585a68
AM
680
681%package doc
682Summary: Kernel documentation
351f379b
JR
683Summary(de.UTF-8): Kernel Dokumentation
684Summary(pl.UTF-8): Dokumentacja do jądra Linuksa
685Group: Documentation
07ff8614 686AutoReqProv: no
a5585a68
AM
687
688%description doc
689This is the documentation for the Linux kernel, as found in
690/usr/src/linux/Documentation directory.
691
351f379b
JR
692%description doc -l de.UTF-8
693Dies ist die Kernel Dokumentation wie sie im 'Documentation'
694Verzeichniss vorgefunden werden kann.
695
3a467bc1
JR
696%description doc -l pl.UTF-8
697Pakiet zawiera dokumentację do jądra Linuksa pochodzącą z katalogu
a5585a68
AM
698/usr/src/linux/Documentation.
699
700%prep
351f379b
JR
701%setup -qc
702ln -s %{SOURCE7} kernel-module-build.pl
703ln -s %{SOURCE10} Makefile
704cd linux-%{basever}
a5585a68 705
351f379b
JR
706# hack against warning in pax/grsec
707%ifarch alpha
708sed -i 's/-Werror//' arch/alpha/kernel/Makefile
a5585a68
AM
709%endif
710
351f379b
JR
711%ifarch ppc
712install %{SOURCE5} Makefile.ppclibs
713%endif
269cd19e 714
351f379b
JR
715%if "%{postver}" != "%{nil}"
716%{__bzip2} -dc %{SOURCE1} | patch -p1 -s
717%endif
a5585a68 718
351f379b
JR
719# tuxonice:
720%if %{with tuxonice}
351f379b
JR
721%patch69 -p1
722%patch70 -p1
351f379b 723%endif
bf6838be 724
17da405a 725# tahoe9xx: 2.6.29 - need update
351f379b 726#%patch2 -p1
a5585a68 727
351f379b
JR
728%if %{with fbcondecor}
729%patch3 -p1
a5585a68 730%endif
351f379b 731%patch4 -p1
a5585a68 732
351f379b
JR
733## netfilter
734#
a5585a68 735
351f379b
JR
736# kernel-pom-ng-IPV4OPTSSTRIP.patch
737%patch10 -p1
a5585a68 738
351f379b
JR
739# kernel-pom-ng-ipv4options.patch
740%patch11 -p1
a5585a68 741
351f379b
JR
742# kernel-pom-ng-ROUTE.patch
743%patch14 -p1
a5585a68 744
351f379b
JR
745# kernel-pom-ng-mms-conntrack-nat.patch
746%patch16 -p1
a5585a68 747
351f379b
JR
748# kernel-pom-ng-rsh.patch
749%patch22 -p1
a5585a68 750
351f379b
JR
751# kernel-pom-ng-rpc.patch
752%patch23 -p1
a5585a68 753
351f379b
JR
754# kernel-nf_rtsp.patch
755%patch36 -p1
a5585a68 756
351f379b
JR
757# kernel-owner-xid.patch
758%if %{with vserver}
759%patch37 -p1
a5585a68 760%endif
a5585a68 761
351f379b
JR
762# kernel-ipt_account.patch
763%patch38 -p1
a5585a68 764
351f379b
JR
765# kernel-ipt_ACCOUNT.patch
766%patch39 -p1
767
768# kernel-layer7.patch
769%patch40 -p1
770
771# ipvs-nfct
772%patch41 -p1
773
774##
775# end of netfilter
776
777# zph
778%patch49 -p1
779
780%if %{with imq}
781%patch50 -p1
a5585a68 782%endif
351f379b
JR
783
784# reiser4
785%if %{with reiser4}
786%patch51 -p1
a5585a68 787%endif
351f379b 788
351f379b 789# esfq
068b6c82
AM
790%if %{with esfq}
791%patch53 -p1
792%endif
351f379b
JR
793
794%if %{with wrr}
795%patch52 -p1
a5585a68 796%endif
351f379b
JR
797
798# toshiba_acpi
799%patch54 -p1
800
801%patch55 -p1
802%patch56 -p1
803
351f379b
JR
804# kernel-rndis_host-wm5.patch
805%patch59 -p1
806
807# hostap enhancements from/for aircrack-ng
808%patch85 -p1
809
810# LSI MPT Fusion driver update (by LSI via SUSE folks)
9474138d
AM
811# FIXME!
812#%patch90 -p1
351f379b
JR
813
814# vserver
815%if %{with vserver}
816%patch100 -p1
817%patch101 -p1
a5585a68 818%endif
351f379b 819
351f379b
JR
820# forcedeth
821%patch130 -p1
a5585a68 822
62fff140 823# unionfs (problems with aufs2, needed for aufs1 patch)
aabc2ad2 824%if %{without rescuecd}
351f379b 825%patch140 -p1
aabc2ad2 826%endif
a5585a68 827
a899ef35 828%if %{with rescuecd}
17da405a 829# aufs2
a899ef35 830%patch148 -p1
831%else
62fff140 832# aufs1
833#patch145 -p1
834#patch146 -p1
a899ef35 835%endif
a5585a68 836
351f379b 837%patch2500 -p1
a5585a68 838
351f379b
JR
839%if %{with rescuecd}
840%patch7000 -p1
e981df17 841%endif
a5585a68 842
351f379b
JR
843# grsecurity & pax stuff
844#
351f379b 845
17da405a 846# remember that we have the same config file for grsec_minimal and
847# grsec_full, but the patches are different.
848
849%if %{with grsecurity}
850%if %{with grsec_minimal}
851%patch1000 -p1
852%else
853# grsec_full and/or pax
351f379b
JR
854%patch9999 -p1
855%{?with_vserver:%patch10000 -p1}
856%{?with_vserver:%patch10001 -p1}
857%{?with_vserver:%patch10002 -p1}
858%{?with_vserver:%patch10003 -p1}
351f379b 859%endif
e981df17 860%endif
351f379b
JR
861#
862# end of grsecurity & pax stuff
863
df4db69a
AM
864# apparmor
865%if %{with apparmor}
866%patch5000 -p1
867%endif
868
7e46296a
AM
869# FIXME
870#%patch150 -p1
a11f3f79 871
351f379b
JR
872%ifarch ppc ppc64
873#patch200 -p1
874%endif
a5585a68 875
351f379b
JR
876# routes
877%patch300 -p1
a5585a68 878
351f379b
JR
879# Small fixes:
880%patch2000 -p1
881%patch2001 -p1
882#%patch2003 -p1
a5585a68 883
351f379b
JR
884# Fix EXTRAVERSION in main Makefile
885sed -i 's#EXTRAVERSION =.*#EXTRAVERSION = %{postver}%{?alt_kernel:_%{alt_kernel}}#g' Makefile
a5585a68 886
351f379b
JR
887# cleanup backups after patching
888find '(' -name '*~' -o -name '*.orig' -o -name '.gitignore' ')' -print0 | xargs -0 -r -l512 rm -f
a5585a68 889
351f379b
JR
890%build
891install -d %{objdir}
892cat > %{targetobj}.mk <<'EOF'
893# generated by %{name}.spec
894KERNELSRC := %{_builddir}/%{name}-%{version}/linux-%{basever}
895KERNELOUTPUT := %{objdir}
896
897SRCARCH := %{target_arch_dir}
898ARCH := %{_target_base_arch}
899Q := %{!?with_verbose:@}
900MAKE_OPTS := %{MakeOpts}
901DEFCONFIG := %{defconfig}
902EOF
a5585a68 903
351f379b
JR
904PaXconfig() {
905 set -x
906 cat <<-EOCONFIG > $1
907 %ifarch %{ix86}
908 CONFIG_PAX_SEGMEXEC=y
909 # performance impact on CPUs without NX bit
910 CONFIG_PAX_PAGEEXEC=n
911 # Testing KERNEXEC
912
913 CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM=n
914 CONFIG_PCI_BIOS=n
915 CONFIG_EFI=n
916 %endif
a5585a68 917
351f379b
JR
918 %ifarch ppc64
919 CONFIG_PAX_NOELFRELOCS=n
920 %endif
921 %ifarch ppc
922 CONFIG_PAX_EMUTRAMP=y
923 CONFIG_PAX_EMUSIGRT=y
924 CONFIG_PAX_EMUPLT=y
925 %endif
a5585a68 926
351f379b
JR
927 %ifarch sparc sparc64 alpha
928 CONFIG_PAX_EMUPLT=y
929 %endif
a5585a68 930
351f379b
JR
931 # Now we have to check MAC system integration. Grsecurity (full) uses PAX_HAVE_ACL_FLAGS
932 # setting (direct acces). grsec_minimal probably have no idea about PaX so we probably
933 # could use PAX_NO_ACL_FLAGS, but for testing the hooks setting will be used
17da405a 934 # PAX_HOOK_ACL_FLAGS.
351f379b
JR
935
936 %if %{with grsec_full}
937 # Hardening grsec options if with pax
938 CONFIG_GRKERNSEC_PROC_MEMMAP=y
939 # almost rational (see HIDESYM help)
940 CONFIG_GRKERNSEC_HIDESYM=y
941
942 # no change needed CONFIG=PAX_HAVE_ACL_FLAGS=y is taken from the kernel-pax.config
943 %else
351f379b
JR
944 CONFIG_PAX_HAVE_ACL_FLAGS=n
945 CONFIG_PAX_HOOK_ACL_FLAGS=y
946 %endif
947EOCONFIG
a5585a68 948
351f379b
JR
949 return 0
950}
a5585a68 951
351f379b
JR
952RescueConfig() {
953 set -x
954 cat <<-EOCONFIG > $1
955 # CONFIG_SOUND is not set
956 # CONFIG_AUDIT is not set
957 # CONFIG_TR is not set
958 # CONFIG_BT is not set
959 # CONFIG_VIDEO_DEV is not set
960 # CONFIG_DVB_CORE is not set
961 # CONFIG_HAMRADIO is not set
962 # CONFIG_ARCNET is not set
963 # CONFIG_FB is not set
964 # CONFIG_DRM is not set
965 # CONFIG_WATCHDOG is not set
966 # CONFIG_INPUT_JOYSTICK is not set
967 # CONFIG_DEBUG_KERNEL is not set
968 # CONFIG_ISDN is not set
969 # CONFIG_AGP is not set
970 # CONFIG_SECURITY is not set
971 # CONFIG_PARIDE is not set
972 # CONFIG_CPU_FREQ is not set
973 # CONFIG_GAMEPORT is not set
974 # CONFIG_KVM is not set
975 # CONFIG_PHONE is not set
dd55897d 976 # CONFIG_STRICT_DEVMEM is not set
6bab3a31 977 # CONFIG_IMA is not set
351f379b 978 CONFIG_AUFS=y
a899ef35 979 CONFIG_AUFS_FS=y
980 CONFIG_AUFS_BR_RAMFS=y
62fff140 981 CONFIG_AUFS_RDU=y
351f379b
JR
982 CONFIG_BLK_DEV_LOOP=y
983 CONFIG_ISO9660_FS=y
984 CONFIG_NLS_UTF8=y
985EOCONFIG
986
987 return 0
988}
a5585a68 989
351f379b
JR
990BuildConfig() {
991 %{?debug:set -x}
992 set -e
a5585a68 993
351f379b
JR
994 Config="kernel-%{target_arch_dir}.config"
995 echo >&2 "Building config file for %{_target_cpu} using $Config et al."
a5585a68 996
351f379b
JR
997 # prepare local and important options
998 cat <<-EOCONFIG > important.config
999 LOCALVERSION="-%{localversion}"
fb4e3822 1000
351f379b
JR
1001%if 0%{?debug:1}
1002 CONFIG_DEBUG_SLAB=y
1003 CONFIG_DEBUG_SLAB_LEAK=y
1004 CONFIG_DEBUG_PREEMPT=y
1005 CONFIG_RT_DEADLOCK_DETECT=y
a5585a68 1006%endif
351f379b 1007
351f379b
JR
1008# apparmor, will be moved to external file if works
1009%if %{with apparmor}
1010 CONFIG_SECURITY_APPARMOR=y
1011 CONFIG_SECURITY_APPARMOR_BOOTPARAM_VALUE=1
1012 CONFIG_SECURITY_APPARMOR_DISABLE=n
4f0a2212 1013 CONFIG_SECURITY_APPARMOR_NETWORK=y
351f379b 1014%endif
a5585a68 1015
351f379b
JR
1016%if %{without ipv6}
1017 CONFIG_IPV6=n
1018%endif
a5585a68 1019
351f379b
JR
1020%ifarch i686 athlon pentium3 pentium4
1021 %if %{with pae}
1022 CONFIG_HIGHMEM4G=n
1023 CONFIG_HIGHMEM64G=y
1024 CONFIG_X86_PAE=y
7c99a84b 1025 CONFIG_NUMA=n
351f379b
JR
1026 %endif
1027%endif
a5585a68 1028
351f379b
JR
1029%if %{without pcmcia}
1030 CONFIG_PCMCIA=n
1031%endif
a5585a68 1032
351f379b
JR
1033%if %{with fbcondecor}
1034 CONFIG_FB_S3=n
1035 CONFIG_FB_VT8623=n
1036 CONFIG_FB_ARK=n
1037 CONFIG_FB_TILEBLITTING=n
1038 CONFIG_FB_CON_DECOR=y
1039%endif
a5585a68 1040
351f379b
JR
1041%if %{with nfsroot}
1042 CONFIG_NFS_FS=y
1043 CONFIG_ROOT_NFS=y
1044%endif
a5585a68 1045
351f379b
JR
1046# Temporary disabled RELOCATABLE. Needed only on x86??
1047%if %{with pax} || %{with grsec_full}
1048 CONFIG_RELOCATABLE=n
1049%endif
1050EOCONFIG
a5585a68 1051
351f379b
JR
1052%if %{with rescuecd}
1053 RescueConfig rescue.config
1054%endif
17da405a 1055%if %{with pax}
351f379b
JR
1056 PaXconfig pax.config
1057%endif
a5585a68 1058
351f379b
JR
1059 # prepare kernel-style config file from multiple config files
1060 %{__awk} -v arch="all %{target_arch_dir} %{_target_base_arch} %{_target_cpu}" -f %{SOURCE6} \
101ae904 1061%if %{with myown}
1062 $RPM_SOURCE_DIR/kernel-%{alt_kernel}.config \
1063%endif
351f379b
JR
1064 important.config \
1065%if %{with rescuecd}
1066 %{SOURCE58} \
1067 %{SOURCE59} \
1068 rescue.config \
1069%endif
1070 \
17da405a 1071%if %{with pax}
351f379b
JR
1072 %{SOURCE45} \
1073 %{SOURCE49} \
1074 pax.config \
1075%else
1076 %if %{with grsec_full}
1077 %{SOURCE45} \
1078 %{SOURCE50} \
1079 %else
1080 %if %{with grsec_minimal}
1081 %{SOURCE51} \
1082 %endif
1083 %endif
351f379b
JR
1084%endif
1085 \
1086%if %{with reiser4}
1087 %{SOURCE56} \
1088%endif
1089%if %{with wrr}
1090 %{SOURCE57} \
1091%endif
1092%if %{with imq}
1093 %{SOURCE55} \
1094%endif
1095%if %{with vserver}
1096 %{SOURCE43} \
1097%endif
1098%if %{with tuxonice}
1099%ifarch %{ix86} %{x8664} ia64 ppc ppc64
1100 %{SOURCE42} \
1101%endif
351f379b
JR
1102%endif
1103 %{SOURCE40} %{?0:netfilter} \
1104 %{SOURCE41} %{?0:patches} \
1105 %{SOURCE20} \
1106 $RPM_SOURCE_DIR/$Config
1107}
a5585a68 1108
351f379b
JR
1109cd %{objdir}
1110install -d arch/%{target_arch_dir}
351f379b 1111BuildConfig > %{defconfig}
351f379b
JR
1112ln -sf %{defconfig} .config
1113cd -
a5585a68 1114
7856c5e8
AM
1115%{__make} \
1116 TARGETOBJ=%{targetobj} \
1117 %{?with_verbose:V=1} \
1118 oldconfig
a5585a68 1119
351f379b 1120%{__awk} %{?debug:-v dieOnError=1} -v infile=%{objdir}/%{defconfig} -f %{SOURCE8} %{objdir}/.config
a5585a68 1121
351f379b 1122# build kernel
7856c5e8
AM
1123%{__make} \
1124 TARGETOBJ=%{targetobj} \
1125 %{?with_verbose:V=1} \
1126 all
a5585a68 1127
351f379b
JR
1128%install
1129rm -rf $RPM_BUILD_ROOT
1130%{__make} %{MakeOpts} %{!?with_verbose:-s} modules_install firmware_install \
1131 -C %{objdir} \
1132 %{?with_verbose:V=1} \
1133 DEPMOD=%{DepMod} \
1134 INSTALL_MOD_PATH=$RPM_BUILD_ROOT \
1135 INSTALL_FW_PATH=$RPM_BUILD_ROOT/lib/firmware/%{kernel_release} \
1136 KERNELRELEASE=%{kernel_release}
1137
1138install -d $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/misc
1139
101ae904 1140%if %{with myown}
1141# create directories which may be missing, to simplyfy %files
1142install -d $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/kernel/sound
1143%endif
1144
351f379b
JR
1145# rpm obeys filelinkto checks for ghosted symlinks, convert to files
1146rm -f $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/{build,source}
1147touch $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/{build,source}
1148
1149# /boot
1150install -d $RPM_BUILD_ROOT/boot
1151cp -a %{objdir}/System.map $RPM_BUILD_ROOT/boot/System.map-%{kernel_release}
1152%ifarch %{ix86} %{x8664}
1153cp -a %{objdir}/arch/%{target_arch_dir}/boot/bzImage $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release}
1154install %{objdir}/vmlinux $RPM_BUILD_ROOT/boot/vmlinux-%{kernel_release}
1155%endif
1156%ifarch ppc ppc64
1157install %{objdir}/vmlinux $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release}
1158install %{objdir}/vmlinux $RPM_BUILD_ROOT/boot/vmlinux-%{kernel_release}
a5585a68 1159%endif
a5585a68 1160%ifarch ia64
351f379b
JR
1161%{__gzip} -cfv %{objdir}/vmlinux > %{objdir}/vmlinuz
1162cp -a %{objdir}/vmlinuz $RPM_BUILD_ROOT/boot/efi/vmlinuz-%{kernel_release}
1163ln -sf efi/vmlinuz-%{kernel_release} $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release}
1164%endif
1165%ifarch alpha sparc sparc64
1166 %{__gzip} -cfv %{objdir}/vmlinux > %{objdir}/vmlinuz
1167 cp -a %{objdir}/vmlinuz $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release}
1168 install %{objdir}/vmlinux $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release}
1169%ifarch sparc
1170 elftoaout %{objdir}/arch/sparc/boot/image -o %{objdir}/vmlinux.aout
1171 install %{objdir}/vmlinux.aout $RPM_BUILD_ROOT/boot/vmlinux.aout-%{kernel_release}
1172%endif
1173%ifarch sparc64
1174 elftoaout %{objdir}/arch/sparc64/boot/image -o %{objdir}/vmlinux.aout
1175 install %{objdir}/vmlinux.aout $RPM_BUILD_ROOT/boot/vmlinux.aout-%{kernel_release}
1176%endif
1177%ifarch arm
1178 install %{objdir}/arch/arm/boot/zImage $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release}
1179%endif
a5585a68 1180%endif
a5585a68 1181
351f379b
JR
1182# ghosted initrd
1183touch $RPM_BUILD_ROOT%{initrd_dir}/initrd-%{kernel_release}.gz
a5585a68 1184
351f379b
JR
1185%if "%{_target_base_arch}" != "%{_arch}"
1186touch $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/modules.dep
1187%endif
a5585a68 1188
351f379b
JR
1189# /etc/modrobe.d
1190install -d $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/%{kernel_release}
a5585a68 1191
351f379b
JR
1192# /usr/src/linux
1193install -d $RPM_BUILD_ROOT%{_kernelsrcdir}
1194# test if we can hardlink -- %{_builddir} and $RPM_BUILD_ROOT on same partition
1195if cp -al %{srcdir}/COPYING $RPM_BUILD_ROOT/COPYING 2>/dev/null; then
1196 l=l
1197 rm -f $RPM_BUILD_ROOT/COPYING
a5585a68 1198fi
a5585a68 1199
351f379b
JR
1200cp -a$l %{srcdir}/* $RPM_BUILD_ROOT%{_kernelsrcdir}
1201cp -a %{objdir}/Module.symvers $RPM_BUILD_ROOT%{_kernelsrcdir}/Module.symvers-dist
1202cp -aL %{objdir}/.config $RPM_BUILD_ROOT%{_kernelsrcdir}/config-dist
1203cp -a %{objdir}/include/linux/autoconf.h $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux/autoconf-dist.h
1204cp -a %{objdir}/include/linux/{utsrelease,version}.h $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux
1205cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux/autoconf.h
1206cp -a %{SOURCE4} $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux/config.h
1207
1208# collect module-build files and directories
1209# Usage: kernel-module-build.pl $rpmdir $fileoutdir
1210fileoutdir=$(pwd)
1211cd $RPM_BUILD_ROOT%{_kernelsrcdir}
1212%{__perl} %{topdir}/kernel-module-build.pl %{_kernelsrcdir} $fileoutdir
1213cd -
1214
30f08736
ER
1215# move to %{_docdir} so we wouldn't depend on any kernel package for dirs
1216install -d $RPM_BUILD_ROOT%{_docdir}
1217mv $RPM_BUILD_ROOT{%{_kernelsrcdir}/Documentation,%{_docdir}/%{name}-%{version}}
1218
d3a69071
ER
1219rm -f $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/dontdiff
1220rm -f $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/Makefile
1221rm -f $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/*/Makefile
1222rm -f $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/*/*/Makefile
1223
351f379b
JR
1224%clean
1225rm -rf $RPM_BUILD_ROOT
1226
1227%preun
1228if [ -x /sbin/new-kernel-pkg ]; then
1229 /sbin/new-kernel-pkg --remove %{kernel_release}
a5585a68 1230fi
351f379b
JR
1231
1232%post
1233%ifarch ia64
1234mv -f /boot/efi/vmlinuz{,.old} 2> /dev/null
1235%{?alt_kernel:mv -f /boot/efi/vmlinuz%{_alt_kernel}{,.old} 2> /dev/null}
1236ln -sf vmlinuz-%{kernel_release} /boot/efi/vmlinuz
1237%{?alt_kernel:ln -sf vmlinuz-%{kernel_release} /boot/efi/vmlinuz%{_alt_kernel}}
1238%endif
1239mv -f /boot/vmlinuz{,.old} 2> /dev/null
1240%{?alt_kernel:mv -f /boot/vmlinuz%{_alt_kernel}{,.old} 2> /dev/null}
1241mv -f /boot/System.map{,.old} 2> /dev/null
1242%{?alt_kernel:mv -f /boot/System%{_alt_kernel}.map{,.old} 2> /dev/null}
1243ln -sf vmlinuz-%{kernel_release} /boot/vmlinuz
1244%{?alt_kernel:ln -sf vmlinuz-%{kernel_release} /boot/vmlinuz%{_alt_kernel}}
1245ln -sf System.map-%{kernel_release} /boot/System.map
1246%{?alt_kernel:ln -sf System.map-%{kernel_release} /boot/System.map%{_alt_kernel}}
1247
1248%depmod %{kernel_release}
1249
1250/sbin/geninitrd -f --initrdfs=rom %{initrd_dir}/initrd-%{kernel_release}.gz %{kernel_release}
1251mv -f %{initrd_dir}/initrd{,.old} 2> /dev/null
1252%{?alt_kernel:mv -f %{initrd_dir}/initrd%{_alt_kernel}{,.old} 2> /dev/null}
1253ln -sf initrd-%{kernel_release}.gz %{initrd_dir}/initrd
1254%{?alt_kernel:ln -sf initrd-%{kernel_release}.gz %{initrd_dir}/initrd%{_alt_kernel}}
1255
1256if [ -x /sbin/new-kernel-pkg ]; then
1257 /sbin/new-kernel-pkg --initrdfile=%{initrd_dir}/initrd-%{kernel_release}.gz --install %{kernel_release} --banner "PLD Linux (%{pld_release})%{?alt_kernel: / %{alt_kernel}}"
1258elif [ -x /sbin/rc-boot ]; then
1259 /sbin/rc-boot 1>&2 || :
a5585a68 1260fi
a5585a68 1261
351f379b
JR
1262%post vmlinux
1263mv -f /boot/vmlinux{,.old} 2> /dev/null
1264%{?alt_kernel:mv -f /boot/vmlinux-%{alt_kernel}{,.old} 2> /dev/null}
1265ln -sf vmlinux-%{kernel_release} /boot/vmlinux
1266%{?alt_kernel:ln -sf vmlinux-%{kernel_release} /boot/vmlinux-%{alt_kernel}}
1267
1268%post libs
1269%{_sbindir}/mkvmlinuz /boot/zImage-%{kernel_release} %{kernel_release}
a5585a68 1270
351f379b
JR
1271%post drm
1272%depmod %{kernel_release}
a5585a68 1273
351f379b
JR
1274%postun drm
1275%depmod %{kernel_release}
a5585a68 1276
351f379b
JR
1277%post pcmcia
1278%depmod %{kernel_release}
a5585a68 1279
351f379b
JR
1280%postun pcmcia
1281%depmod %{kernel_release}
a5585a68 1282
351f379b
JR
1283%post sound-alsa
1284%depmod %{kernel_release}
a5585a68 1285
351f379b
JR
1286%postun sound-alsa
1287%depmod %{kernel_release}
a5585a68 1288
351f379b
JR
1289%post sound-oss
1290%depmod %{kernel_release}
a5585a68 1291
351f379b
JR
1292%postun sound-oss
1293%depmod %{kernel_release}
a5585a68
AM
1294
1295%post headers
351f379b 1296ln -snf %{basename:%{_kernelsrcdir}} %{_prefix}/src/linux%{_alt_kernel}
a5585a68
AM
1297
1298%postun headers
351f379b
JR
1299if [ "$1" = "0" ]; then
1300 if [ -L %{_prefix}/src/linux%{_alt_kernel} ]; then
1301 if [ "$(readlink %{_prefix}/src/linux%{_alt_kernel})" = "linux%{_alt_kernel}-%{version}" ]; then
1302 rm -f %{_prefix}/src/linux%{_alt_kernel}
a5585a68
AM
1303 fi
1304 fi
1305fi
1306
351f379b
JR
1307%triggerin module-build -- %{name} = %{epoch}:%{version}-%{release}
1308ln -sfn %{_kernelsrcdir} /lib/modules/%{kernel_release}/build
1309ln -sfn %{_kernelsrcdir} /lib/modules/%{kernel_release}/source
1310
1311%triggerun module-build -- %{name} = %{epoch}:%{version}-%{release}
1312if [ "$1" = 0 ]; then
1313 rm -f /lib/modules/%{kernel_release}/{build,source}
1314fi
1315
a5585a68
AM
1316%files
1317%defattr(644,root,root,755)
a5585a68 1318%ifarch sparc sparc64
351f379b 1319/boot/vmlinux.aout-%{kernel_release}
a5585a68
AM
1320%endif
1321%ifarch ia64
351f379b
JR
1322/boot/efi/vmlinuz-%{kernel_release}
1323%endif
1324/boot/vmlinuz-%{kernel_release}
1325/boot/System.map-%{kernel_release}
1326%ghost %{initrd_dir}/initrd-%{kernel_release}.gz
1327/lib/firmware/%{kernel_release}
1328
1329%dir /lib/modules/%{kernel_release}
1330%dir /lib/modules/%{kernel_release}/kernel
1331%ifnarch sparc
1332/lib/modules/%{kernel_release}/kernel/arch
1333%endif
1334/lib/modules/%{kernel_release}/kernel/crypto
1335/lib/modules/%{kernel_release}/kernel/drivers
101ae904 1336%if %{have_drm}
351f379b
JR
1337%exclude /lib/modules/%{kernel_release}/kernel/drivers/gpu
1338%endif
1339/lib/modules/%{kernel_release}/kernel/fs
351f379b 1340/lib/modules/%{kernel_release}/kernel/kernel
351f379b
JR
1341/lib/modules/%{kernel_release}/kernel/lib
1342/lib/modules/%{kernel_release}/kernel/net
7ffd54d5 1343%ifarch %{x8664}
fecce547 1344/lib/modules/%{kernel_release}/kernel/mm
7ffd54d5 1345%endif
101ae904 1346%if %{have_sound}
351f379b
JR
1347%dir /lib/modules/%{kernel_release}/kernel/sound
1348/lib/modules/%{kernel_release}/kernel/sound/ac97_bus.ko*
1349/lib/modules/%{kernel_release}/kernel/sound/sound*.ko*
1350%ifnarch sparc
1351%exclude /lib/modules/%{kernel_release}/kernel/drivers/media/video/cx88/cx88-alsa.ko*
1352%exclude /lib/modules/%{kernel_release}/kernel/drivers/media/video/em28xx/em28xx-alsa.ko*
1353%exclude /lib/modules/%{kernel_release}/kernel/drivers/media/video/saa7134/saa7134-alsa.ko*
1354%endif
1355%endif
1356%dir /lib/modules/%{kernel_release}/misc
101ae904 1357%if %{have_pcmcia}
351f379b
JR
1358%exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/[!p]*
1359%exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/pd6729.ko*
1360%exclude /lib/modules/%{kernel_release}/kernel/drivers/*/pcmcia
1361%if %{without rescuecd}
1362%exclude /lib/modules/%{kernel_release}/kernel/drivers/ata/pata_pcmcia.ko*
1363%exclude /lib/modules/%{kernel_release}/kernel/drivers/bluetooth/*_cs.ko*
1364%exclude /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/avm_cs.ko*
1365%exclude /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/b1pcmcia.ko*
1366%exclude /lib/modules/%{kernel_release}/kernel/drivers/telephony/ixj_pcmcia.ko*
1367%exclude /lib/modules/%{kernel_release}/kernel/drivers/usb/gadget/g_midi.ko*
1368%endif
1369%exclude /lib/modules/%{kernel_release}/kernel/drivers/ide/ide-cs.ko*
1370%exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/*_cs.ko*
1371%exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/b43
1372%exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/hostap/hostap_cs.ko*
1373%exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/libertas/*_cs.ko*
1374%exclude /lib/modules/%{kernel_release}/kernel/drivers/parport/parport_cs.ko*
1375%exclude /lib/modules/%{kernel_release}/kernel/drivers/serial/serial_cs.ko*
1376%exclude /lib/modules/%{kernel_release}/kernel/drivers/usb/host/sl811_cs.ko*
1377%endif
101ae904 1378%if %{with myown}
1379/lib/modules/%{kernel_release}/kernel/sound
1380%endif
351f379b
JR
1381%ghost /lib/modules/%{kernel_release}/modules.*
1382# symlinks pointing to kernelsrcdir
1383%ghost /lib/modules/%{kernel_release}/build
1384%ghost /lib/modules/%{kernel_release}/source
1385%dir %{_sysconfdir}/modprobe.d/%{kernel_release}
1386
351f379b
JR
1387%ifarch alpha %{ix86} %{x8664} ppc ppc64 sparc sparc64
1388%files vmlinux
a5585a68 1389%defattr(644,root,root,755)
351f379b 1390/boot/vmlinux-%{kernel_release}
a5585a68
AM
1391%endif
1392
101ae904 1393%if %{have_drm}
351f379b 1394%files drm
a5585a68 1395%defattr(644,root,root,755)
351f379b 1396/lib/modules/%{kernel_release}/kernel/drivers/gpu
a5585a68
AM
1397%endif
1398
101ae904 1399%if %{have_pcmcia}
351f379b 1400%files pcmcia
a5585a68 1401%defattr(644,root,root,755)
351f379b
JR
1402/lib/modules/%{kernel_release}/kernel/drivers/pcmcia/*ko*
1403/lib/modules/%{kernel_release}/kernel/drivers/*/pcmcia
1404%exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/pcmcia*ko*
1405%if %{without rescuecd}
1406/lib/modules/%{kernel_release}/kernel/drivers/bluetooth/*_cs.ko*
1407/lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/avm_cs.ko*
1408/lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/b1pcmcia.ko*
1409/lib/modules/%{kernel_release}/kernel/drivers/telephony/ixj_pcmcia.ko*
1410%endif
1411/lib/modules/%{kernel_release}/kernel/drivers/ata/pata_pcmcia.ko*
1412/lib/modules/%{kernel_release}/kernel/drivers/ide/ide-cs.ko*
1413/lib/modules/%{kernel_release}/kernel/drivers/net/wireless/*_cs.ko*
1414/lib/modules/%{kernel_release}/kernel/drivers/net/wireless/b43
1415/lib/modules/%{kernel_release}/kernel/drivers/net/wireless/hostap/hostap_cs.ko*
1416/lib/modules/%{kernel_release}/kernel/drivers/net/wireless/libertas/*_cs.ko*
1417/lib/modules/%{kernel_release}/kernel/drivers/parport/parport_cs.ko*
1418/lib/modules/%{kernel_release}/kernel/drivers/serial/serial_cs.ko*
1419/lib/modules/%{kernel_release}/kernel/drivers/usb/host/sl811_cs.ko*
1420%endif
1421
1422%ifarch ppc-broken
1423%if "%{_arch}" == "ppc"
1424%files libs
a5585a68 1425%defattr(644,root,root,755)
351f379b
JR
1426%dir /boot/libs-%{kernel_release}
1427/boot/libs-%{kernel_release}/common
1428/boot/libs-%{kernel_release}/kernel
1429/boot/libs-%{kernel_release}/lib
1430/boot/libs-%{kernel_release}/of1275
1431/boot/libs-%{kernel_release}/openfirmware
1432/boot/libs-%{kernel_release}/simple
1433%dir /boot/libs-%{kernel_release}/utils
1434%attr(755,root,root) /boot/libs-%{kernel_release}/utils/*
1435/boot/libs-%{kernel_release}/ld.script
a5585a68 1436%endif
a5585a68
AM
1437%endif
1438
101ae904 1439%if %{have_sound}
351f379b 1440%files sound-alsa
a5585a68 1441%defattr(644,root,root,755)
351f379b
JR
1442/lib/modules/%{kernel_release}/kernel/sound
1443%exclude %dir /lib/modules/%{kernel_release}/kernel/sound
1444%exclude /lib/modules/%{kernel_release}/kernel/sound/ac97_bus.ko*
1445%exclude /lib/modules/%{kernel_release}/kernel/sound/sound*.ko*
1446%if %{have_oss}
1447%exclude /lib/modules/%{kernel_release}/kernel/sound/oss
a5585a68 1448%endif
351f379b
JR
1449%ifnarch sparc
1450/lib/modules/%{kernel_release}/kernel/drivers/usb/gadget/g_midi.ko*
1451/lib/modules/%{kernel_release}/kernel/drivers/media/video/cx88/cx88-alsa.ko*
1452/lib/modules/%{kernel_release}/kernel/drivers/media/video/em28xx/em28xx-alsa.ko*
1453/lib/modules/%{kernel_release}/kernel/drivers/media/video/saa7134/saa7134-alsa.ko*
a5585a68
AM
1454%endif
1455
101ae904 1456%if %{have_oss}
351f379b 1457%files sound-oss
a5585a68 1458%defattr(644,root,root,755)
351f379b 1459/lib/modules/%{kernel_release}/kernel/sound/oss
a5585a68 1460%endif
a5585a68
AM
1461%endif
1462
fecce547 1463%files headers -f files.headers_exclude_kbuild
a5585a68 1464%defattr(644,root,root,755)
30f08736 1465%dir %{_kernelsrcdir}
351f379b
JR
1466%{_kernelsrcdir}/include
1467%dir %{_kernelsrcdir}/arch
1468%dir %{_kernelsrcdir}/arch/[!K]*
1469%{_kernelsrcdir}/arch/*/include
1470%dir %{_kernelsrcdir}/security
1471%dir %{_kernelsrcdir}/security/selinux
1472%{_kernelsrcdir}/security/selinux/include
1473%{_kernelsrcdir}/config-dist
1474%{_kernelsrcdir}/Module.symvers-dist
1475
fecce547 1476%files module-build -f files.mb_include_modulebuild_and_dirs
a5585a68 1477%defattr(644,root,root,755)
351f379b
JR
1478%ifarch ppc ppc64
1479%{_kernelsrcdir}/arch/powerpc/lib/crtsavres.*
1480%endif
fecce547 1481%exclude %dir %{_kernelsrcdir}/arch/m68knommu
1482%exclude %dir %{_kernelsrcdir}/arch/um
351f379b
JR
1483%{_kernelsrcdir}/arch/*/kernel/asm-offsets*
1484%{_kernelsrcdir}/arch/*/kernel/sigframe*.h
1485%{_kernelsrcdir}/drivers/lguest/lg.h
1486%{_kernelsrcdir}/kernel/bounds.c
1487%dir %{_kernelsrcdir}/scripts
351f379b
JR
1488%{_kernelsrcdir}/scripts/Kbuild.include
1489%{_kernelsrcdir}/scripts/Makefile*
1490%{_kernelsrcdir}/scripts/basic
960d2e94 1491%{_kernelsrcdir}/scripts/kconfig
1492%{_kernelsrcdir}/scripts/mkcompile_h
351f379b
JR
1493%{_kernelsrcdir}/scripts/mkmakefile
1494%{_kernelsrcdir}/scripts/mod
960d2e94 1495%{_kernelsrcdir}/scripts/module-common.lds
351f379b
JR
1496%{_kernelsrcdir}/scripts/setlocalversion
1497%{_kernelsrcdir}/scripts/*.c
1498%{_kernelsrcdir}/scripts/*.sh
351f379b
JR
1499%dir %{_kernelsrcdir}/scripts/selinux
1500%{_kernelsrcdir}/scripts/selinux/Makefile
1501%dir %{_kernelsrcdir}/scripts/selinux/mdp
1502%{_kernelsrcdir}/scripts/selinux/mdp/Makefile
1503%{_kernelsrcdir}/scripts/selinux/mdp/*.c
fecce547 1504%exclude %dir %{_kernelsrcdir}/security
1505%exclude %dir %{_kernelsrcdir}/security/selinux
a5585a68
AM
1506
1507%files doc
1508%defattr(644,root,root,755)
d3a69071
ER
1509%dir %{_docdir}/%{name}-%{version}
1510
1511%{_docdir}/%{name}-%{version}/[!jkz]*
1512%{_docdir}/%{name}-%{version}/[jkz]*.txt
1513%{_docdir}/%{name}-%{version}/kbuild
1514%{_docdir}/%{name}-%{version}/kdump
1515%lang(ja) %{_docdir}/%{name}-%{version}/ja_JP
1516%lang(ko) %{_docdir}/%{name}-%{version}/ko_KR
1517%lang(zh_CN) %{_docdir}/%{name}-%{version}/zh_CN
a5585a68
AM
1518
1519%if %{with source}
fecce547 1520%files source -f files.source_exclude_modulebuild_and_dirs
a5585a68 1521%defattr(644,root,root,755)
351f379b
JR
1522%{_kernelsrcdir}/arch/*/[!Mik]*
1523%{_kernelsrcdir}/arch/*/kernel/[!M]*
1524%{_kernelsrcdir}/arch/ia64/ia32/[!M]*
1525%{_kernelsrcdir}/arch/ia64/install.sh
1526%{_kernelsrcdir}/arch/m68k/ifpsp060/[!M]*
1527%{_kernelsrcdir}/arch/m68k/ifpsp060/MISC
fecce547 1528%{_kernelsrcdir}/arch/m68k/install.sh
351f379b
JR
1529%{_kernelsrcdir}/arch/parisc/install.sh
1530%{_kernelsrcdir}/arch/x86/ia32/[!M]*
1531%{_kernelsrcdir}/arch/ia64/kvm
1532%{_kernelsrcdir}/arch/powerpc/kvm
1533%ifarch ppc ppc64
1534%exclude %{_kernelsrcdir}/arch/powerpc/lib/crtsavres.*
1535%endif
1536%{_kernelsrcdir}/arch/s390/kvm
1537%{_kernelsrcdir}/arch/x86/kvm
1538%exclude %{_kernelsrcdir}/arch/*/kernel/asm-offsets*
1539%exclude %{_kernelsrcdir}/arch/*/kernel/sigframe*.h
1540%exclude %{_kernelsrcdir}/drivers/lguest/lg.h
1541%{_kernelsrcdir}/block
1542%{_kernelsrcdir}/crypto
1543%{_kernelsrcdir}/drivers
1544%{_kernelsrcdir}/firmware
1545%{_kernelsrcdir}/fs
1546%if %{with grsecurity} && %{without rescuecd}
1547%{_kernelsrcdir}/grsecurity
1548%endif
1549%{_kernelsrcdir}/init
1550%{_kernelsrcdir}/ipc
1551%{_kernelsrcdir}/kernel
1552%exclude %{_kernelsrcdir}/kernel/bounds.c
1553%{_kernelsrcdir}/lib
1554%{_kernelsrcdir}/mm
1555%{_kernelsrcdir}/net
1556%{_kernelsrcdir}/virt
1557%{_kernelsrcdir}/samples
1558%{_kernelsrcdir}/scripts/*
1559%exclude %{_kernelsrcdir}/scripts/Kbuild.include
1560%exclude %{_kernelsrcdir}/scripts/Makefile*
1561%exclude %{_kernelsrcdir}/scripts/basic
1562%exclude %{_kernelsrcdir}/scripts/kconfig
960d2e94 1563%exclude %{_kernelsrcdir}/scripts/mkcompile_h
351f379b
JR
1564%exclude %{_kernelsrcdir}/scripts/mkmakefile
1565%exclude %{_kernelsrcdir}/scripts/mod
960d2e94 1566%exclude %{_kernelsrcdir}/scripts/module-common.lds
351f379b
JR
1567%exclude %{_kernelsrcdir}/scripts/setlocalversion
1568%exclude %{_kernelsrcdir}/scripts/*.c
1569%exclude %{_kernelsrcdir}/scripts/*.sh
960d2e94 1570%exclude %dir %{_kernelsrcdir}/scripts/selinux
1571%exclude %{_kernelsrcdir}/scripts/selinux/Makefile
1572%exclude %dir %{_kernelsrcdir}/scripts/selinux/mdp
1573%exclude %{_kernelsrcdir}/scripts/selinux/mdp/Makefile
1574%exclude %{_kernelsrcdir}/scripts/selinux/mdp/*.c
351f379b
JR
1575%{_kernelsrcdir}/sound
1576%{_kernelsrcdir}/security
1577%exclude %{_kernelsrcdir}/security/selinux/include
fecce547 1578%{_kernelsrcdir}/tools
351f379b
JR
1579%{_kernelsrcdir}/usr
1580%{_kernelsrcdir}/COPYING
1581%{_kernelsrcdir}/CREDITS
1582%{_kernelsrcdir}/MAINTAINERS
1583%{_kernelsrcdir}/README
1584%{_kernelsrcdir}/REPORTING-BUGS
a5585a68 1585%endif
This page took 0.33207 seconds and 4 git commands to generate.