]> git.pld-linux.org Git - packages/kernel.git/blame - kernel.spec
- create dirs kernel/arch and kernel/mm so ifarch's won't polute %files section
[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 706# hack against warning in pax/grsec
351f379b 707sed -i 's/-Werror//' arch/alpha/kernel/Makefile
a5585a68 708
351f379b
JR
709%ifarch ppc
710install %{SOURCE5} Makefile.ppclibs
711%endif
269cd19e 712
351f379b
JR
713%if "%{postver}" != "%{nil}"
714%{__bzip2} -dc %{SOURCE1} | patch -p1 -s
715%endif
a5585a68 716
351f379b
JR
717# tuxonice:
718%if %{with tuxonice}
351f379b
JR
719%patch69 -p1
720%patch70 -p1
351f379b 721%endif
bf6838be 722
17da405a 723# tahoe9xx: 2.6.29 - need update
351f379b 724#%patch2 -p1
a5585a68 725
351f379b
JR
726%if %{with fbcondecor}
727%patch3 -p1
a5585a68 728%endif
351f379b 729%patch4 -p1
a5585a68 730
351f379b
JR
731## netfilter
732#
a5585a68 733
351f379b
JR
734# kernel-pom-ng-IPV4OPTSSTRIP.patch
735%patch10 -p1
a5585a68 736
351f379b
JR
737# kernel-pom-ng-ipv4options.patch
738%patch11 -p1
a5585a68 739
351f379b
JR
740# kernel-pom-ng-ROUTE.patch
741%patch14 -p1
a5585a68 742
351f379b
JR
743# kernel-pom-ng-mms-conntrack-nat.patch
744%patch16 -p1
a5585a68 745
351f379b
JR
746# kernel-pom-ng-rsh.patch
747%patch22 -p1
a5585a68 748
351f379b
JR
749# kernel-pom-ng-rpc.patch
750%patch23 -p1
a5585a68 751
351f379b
JR
752# kernel-nf_rtsp.patch
753%patch36 -p1
a5585a68 754
351f379b
JR
755# kernel-owner-xid.patch
756%if %{with vserver}
757%patch37 -p1
a5585a68 758%endif
a5585a68 759
351f379b
JR
760# kernel-ipt_account.patch
761%patch38 -p1
a5585a68 762
351f379b
JR
763# kernel-ipt_ACCOUNT.patch
764%patch39 -p1
765
766# kernel-layer7.patch
767%patch40 -p1
768
769# ipvs-nfct
770%patch41 -p1
771
772##
773# end of netfilter
774
775# zph
776%patch49 -p1
777
778%if %{with imq}
779%patch50 -p1
a5585a68 780%endif
351f379b
JR
781
782# reiser4
783%if %{with reiser4}
784%patch51 -p1
a5585a68 785%endif
351f379b 786
351f379b 787# esfq
068b6c82
AM
788%if %{with esfq}
789%patch53 -p1
790%endif
351f379b
JR
791
792%if %{with wrr}
793%patch52 -p1
a5585a68 794%endif
351f379b
JR
795
796# toshiba_acpi
797%patch54 -p1
798
799%patch55 -p1
800%patch56 -p1
801
351f379b
JR
802# kernel-rndis_host-wm5.patch
803%patch59 -p1
804
805# hostap enhancements from/for aircrack-ng
806%patch85 -p1
807
808# LSI MPT Fusion driver update (by LSI via SUSE folks)
9474138d
AM
809# FIXME!
810#%patch90 -p1
351f379b
JR
811
812# vserver
813%if %{with vserver}
814%patch100 -p1
815%patch101 -p1
a5585a68 816%endif
351f379b 817
351f379b
JR
818# forcedeth
819%patch130 -p1
a5585a68 820
62fff140 821# unionfs (problems with aufs2, needed for aufs1 patch)
aabc2ad2 822%if %{without rescuecd}
351f379b 823%patch140 -p1
aabc2ad2 824%endif
a5585a68 825
a899ef35 826%if %{with rescuecd}
17da405a 827# aufs2
a899ef35 828%patch148 -p1
829%else
62fff140 830# aufs1
831#patch145 -p1
832#patch146 -p1
a899ef35 833%endif
a5585a68 834
351f379b 835%patch2500 -p1
a5585a68 836
351f379b
JR
837%if %{with rescuecd}
838%patch7000 -p1
e981df17 839%endif
a5585a68 840
351f379b
JR
841# grsecurity & pax stuff
842#
351f379b 843
17da405a 844# remember that we have the same config file for grsec_minimal and
845# grsec_full, but the patches are different.
846
847%if %{with grsecurity}
848%if %{with grsec_minimal}
849%patch1000 -p1
850%else
851# grsec_full and/or pax
351f379b
JR
852%patch9999 -p1
853%{?with_vserver:%patch10000 -p1}
854%{?with_vserver:%patch10001 -p1}
855%{?with_vserver:%patch10002 -p1}
856%{?with_vserver:%patch10003 -p1}
351f379b 857%endif
e981df17 858%endif
351f379b
JR
859#
860# end of grsecurity & pax stuff
861
df4db69a
AM
862# apparmor
863%if %{with apparmor}
864%patch5000 -p1
865%endif
866
7e46296a
AM
867# FIXME
868#%patch150 -p1
a11f3f79 869
351f379b
JR
870%ifarch ppc ppc64
871#patch200 -p1
872%endif
a5585a68 873
351f379b
JR
874# routes
875%patch300 -p1
a5585a68 876
351f379b
JR
877# Small fixes:
878%patch2000 -p1
879%patch2001 -p1
880#%patch2003 -p1
a5585a68 881
351f379b
JR
882# Fix EXTRAVERSION in main Makefile
883sed -i 's#EXTRAVERSION =.*#EXTRAVERSION = %{postver}%{?alt_kernel:_%{alt_kernel}}#g' Makefile
a5585a68 884
351f379b
JR
885# cleanup backups after patching
886find '(' -name '*~' -o -name '*.orig' -o -name '.gitignore' ')' -print0 | xargs -0 -r -l512 rm -f
a5585a68 887
351f379b
JR
888%build
889install -d %{objdir}
890cat > %{targetobj}.mk <<'EOF'
891# generated by %{name}.spec
892KERNELSRC := %{_builddir}/%{name}-%{version}/linux-%{basever}
893KERNELOUTPUT := %{objdir}
894
895SRCARCH := %{target_arch_dir}
896ARCH := %{_target_base_arch}
897Q := %{!?with_verbose:@}
898MAKE_OPTS := %{MakeOpts}
899DEFCONFIG := %{defconfig}
900EOF
a5585a68 901
351f379b
JR
902PaXconfig() {
903 set -x
904 cat <<-EOCONFIG > $1
905 %ifarch %{ix86}
906 CONFIG_PAX_SEGMEXEC=y
907 # performance impact on CPUs without NX bit
908 CONFIG_PAX_PAGEEXEC=n
909 # Testing KERNEXEC
910
911 CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM=n
912 CONFIG_PCI_BIOS=n
913 CONFIG_EFI=n
914 %endif
a5585a68 915
351f379b
JR
916 %ifarch ppc64
917 CONFIG_PAX_NOELFRELOCS=n
918 %endif
919 %ifarch ppc
920 CONFIG_PAX_EMUTRAMP=y
921 CONFIG_PAX_EMUSIGRT=y
922 CONFIG_PAX_EMUPLT=y
923 %endif
a5585a68 924
351f379b
JR
925 %ifarch sparc sparc64 alpha
926 CONFIG_PAX_EMUPLT=y
927 %endif
a5585a68 928
351f379b
JR
929 # Now we have to check MAC system integration. Grsecurity (full) uses PAX_HAVE_ACL_FLAGS
930 # setting (direct acces). grsec_minimal probably have no idea about PaX so we probably
931 # could use PAX_NO_ACL_FLAGS, but for testing the hooks setting will be used
17da405a 932 # PAX_HOOK_ACL_FLAGS.
351f379b
JR
933
934 %if %{with grsec_full}
935 # Hardening grsec options if with pax
936 CONFIG_GRKERNSEC_PROC_MEMMAP=y
937 # almost rational (see HIDESYM help)
938 CONFIG_GRKERNSEC_HIDESYM=y
939
940 # no change needed CONFIG=PAX_HAVE_ACL_FLAGS=y is taken from the kernel-pax.config
941 %else
351f379b
JR
942 CONFIG_PAX_HAVE_ACL_FLAGS=n
943 CONFIG_PAX_HOOK_ACL_FLAGS=y
944 %endif
945EOCONFIG
a5585a68 946
351f379b
JR
947 return 0
948}
a5585a68 949
351f379b
JR
950RescueConfig() {
951 set -x
952 cat <<-EOCONFIG > $1
953 # CONFIG_SOUND is not set
954 # CONFIG_AUDIT is not set
955 # CONFIG_TR is not set
956 # CONFIG_BT is not set
957 # CONFIG_VIDEO_DEV is not set
958 # CONFIG_DVB_CORE is not set
959 # CONFIG_HAMRADIO is not set
960 # CONFIG_ARCNET is not set
961 # CONFIG_FB is not set
962 # CONFIG_DRM is not set
963 # CONFIG_WATCHDOG is not set
964 # CONFIG_INPUT_JOYSTICK is not set
965 # CONFIG_DEBUG_KERNEL is not set
966 # CONFIG_ISDN is not set
967 # CONFIG_AGP is not set
968 # CONFIG_SECURITY is not set
969 # CONFIG_PARIDE is not set
970 # CONFIG_CPU_FREQ is not set
971 # CONFIG_GAMEPORT is not set
972 # CONFIG_KVM is not set
973 # CONFIG_PHONE is not set
dd55897d 974 # CONFIG_STRICT_DEVMEM is not set
6bab3a31 975 # CONFIG_IMA is not set
351f379b 976 CONFIG_AUFS=y
a899ef35 977 CONFIG_AUFS_FS=y
978 CONFIG_AUFS_BR_RAMFS=y
62fff140 979 CONFIG_AUFS_RDU=y
351f379b
JR
980 CONFIG_BLK_DEV_LOOP=y
981 CONFIG_ISO9660_FS=y
982 CONFIG_NLS_UTF8=y
983EOCONFIG
984
985 return 0
986}
a5585a68 987
351f379b
JR
988BuildConfig() {
989 %{?debug:set -x}
990 set -e
a5585a68 991
351f379b
JR
992 Config="kernel-%{target_arch_dir}.config"
993 echo >&2 "Building config file for %{_target_cpu} using $Config et al."
a5585a68 994
351f379b
JR
995 # prepare local and important options
996 cat <<-EOCONFIG > important.config
997 LOCALVERSION="-%{localversion}"
fb4e3822 998
351f379b
JR
999%if 0%{?debug:1}
1000 CONFIG_DEBUG_SLAB=y
1001 CONFIG_DEBUG_SLAB_LEAK=y
1002 CONFIG_DEBUG_PREEMPT=y
1003 CONFIG_RT_DEADLOCK_DETECT=y
a5585a68 1004%endif
351f379b 1005
351f379b
JR
1006# apparmor, will be moved to external file if works
1007%if %{with apparmor}
1008 CONFIG_SECURITY_APPARMOR=y
1009 CONFIG_SECURITY_APPARMOR_BOOTPARAM_VALUE=1
1010 CONFIG_SECURITY_APPARMOR_DISABLE=n
4f0a2212 1011 CONFIG_SECURITY_APPARMOR_NETWORK=y
351f379b 1012%endif
a5585a68 1013
351f379b
JR
1014%if %{without ipv6}
1015 CONFIG_IPV6=n
1016%endif
a5585a68 1017
351f379b
JR
1018%ifarch i686 athlon pentium3 pentium4
1019 %if %{with pae}
1020 CONFIG_HIGHMEM4G=n
1021 CONFIG_HIGHMEM64G=y
1022 CONFIG_X86_PAE=y
7c99a84b 1023 CONFIG_NUMA=n
351f379b
JR
1024 %endif
1025%endif
a5585a68 1026
351f379b
JR
1027%if %{without pcmcia}
1028 CONFIG_PCMCIA=n
1029%endif
a5585a68 1030
351f379b
JR
1031%if %{with fbcondecor}
1032 CONFIG_FB_S3=n
1033 CONFIG_FB_VT8623=n
1034 CONFIG_FB_ARK=n
1035 CONFIG_FB_TILEBLITTING=n
1036 CONFIG_FB_CON_DECOR=y
1037%endif
a5585a68 1038
351f379b
JR
1039%if %{with nfsroot}
1040 CONFIG_NFS_FS=y
1041 CONFIG_ROOT_NFS=y
1042%endif
a5585a68 1043
351f379b
JR
1044# Temporary disabled RELOCATABLE. Needed only on x86??
1045%if %{with pax} || %{with grsec_full}
1046 CONFIG_RELOCATABLE=n
1047%endif
1048EOCONFIG
a5585a68 1049
351f379b
JR
1050%if %{with rescuecd}
1051 RescueConfig rescue.config
1052%endif
17da405a 1053%if %{with pax}
351f379b
JR
1054 PaXconfig pax.config
1055%endif
a5585a68 1056
351f379b
JR
1057 # prepare kernel-style config file from multiple config files
1058 %{__awk} -v arch="all %{target_arch_dir} %{_target_base_arch} %{_target_cpu}" -f %{SOURCE6} \
101ae904 1059%if %{with myown}
1060 $RPM_SOURCE_DIR/kernel-%{alt_kernel}.config \
1061%endif
351f379b
JR
1062 important.config \
1063%if %{with rescuecd}
1064 %{SOURCE58} \
1065 %{SOURCE59} \
1066 rescue.config \
1067%endif
1068 \
17da405a 1069%if %{with pax}
351f379b
JR
1070 %{SOURCE45} \
1071 %{SOURCE49} \
1072 pax.config \
1073%else
1074 %if %{with grsec_full}
1075 %{SOURCE45} \
1076 %{SOURCE50} \
1077 %else
1078 %if %{with grsec_minimal}
1079 %{SOURCE51} \
1080 %endif
1081 %endif
351f379b
JR
1082%endif
1083 \
1084%if %{with reiser4}
1085 %{SOURCE56} \
1086%endif
1087%if %{with wrr}
1088 %{SOURCE57} \
1089%endif
1090%if %{with imq}
1091 %{SOURCE55} \
1092%endif
1093%if %{with vserver}
1094 %{SOURCE43} \
1095%endif
1096%if %{with tuxonice}
1097%ifarch %{ix86} %{x8664} ia64 ppc ppc64
1098 %{SOURCE42} \
1099%endif
351f379b
JR
1100%endif
1101 %{SOURCE40} %{?0:netfilter} \
1102 %{SOURCE41} %{?0:patches} \
1103 %{SOURCE20} \
1104 $RPM_SOURCE_DIR/$Config
1105}
a5585a68 1106
351f379b
JR
1107cd %{objdir}
1108install -d arch/%{target_arch_dir}
351f379b 1109BuildConfig > %{defconfig}
351f379b
JR
1110ln -sf %{defconfig} .config
1111cd -
a5585a68 1112
7856c5e8
AM
1113%{__make} \
1114 TARGETOBJ=%{targetobj} \
1115 %{?with_verbose:V=1} \
1116 oldconfig
a5585a68 1117
351f379b 1118%{__awk} %{?debug:-v dieOnError=1} -v infile=%{objdir}/%{defconfig} -f %{SOURCE8} %{objdir}/.config
a5585a68 1119
351f379b 1120# build kernel
7856c5e8
AM
1121%{__make} \
1122 TARGETOBJ=%{targetobj} \
1123 %{?with_verbose:V=1} \
1124 all
a5585a68 1125
351f379b
JR
1126%install
1127rm -rf $RPM_BUILD_ROOT
1128%{__make} %{MakeOpts} %{!?with_verbose:-s} modules_install firmware_install \
1129 -C %{objdir} \
1130 %{?with_verbose:V=1} \
1131 DEPMOD=%{DepMod} \
1132 INSTALL_MOD_PATH=$RPM_BUILD_ROOT \
1133 INSTALL_FW_PATH=$RPM_BUILD_ROOT/lib/firmware/%{kernel_release} \
1134 KERNELRELEASE=%{kernel_release}
1135
1136install -d $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/misc
1137
101ae904 1138# create directories which may be missing, to simplyfy %files
64d14572 1139install -d $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/kernel/{arch,sound,mm}
101ae904 1140
351f379b
JR
1141# rpm obeys filelinkto checks for ghosted symlinks, convert to files
1142rm -f $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/{build,source}
1143touch $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/{build,source}
1144
1145# /boot
1146install -d $RPM_BUILD_ROOT/boot
1147cp -a %{objdir}/System.map $RPM_BUILD_ROOT/boot/System.map-%{kernel_release}
1148%ifarch %{ix86} %{x8664}
1149cp -a %{objdir}/arch/%{target_arch_dir}/boot/bzImage $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release}
1150install %{objdir}/vmlinux $RPM_BUILD_ROOT/boot/vmlinux-%{kernel_release}
1151%endif
1152%ifarch ppc ppc64
1153install %{objdir}/vmlinux $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release}
1154install %{objdir}/vmlinux $RPM_BUILD_ROOT/boot/vmlinux-%{kernel_release}
a5585a68 1155%endif
a5585a68 1156%ifarch ia64
351f379b
JR
1157%{__gzip} -cfv %{objdir}/vmlinux > %{objdir}/vmlinuz
1158cp -a %{objdir}/vmlinuz $RPM_BUILD_ROOT/boot/efi/vmlinuz-%{kernel_release}
1159ln -sf efi/vmlinuz-%{kernel_release} $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release}
1160%endif
1161%ifarch alpha sparc sparc64
1162 %{__gzip} -cfv %{objdir}/vmlinux > %{objdir}/vmlinuz
1163 cp -a %{objdir}/vmlinuz $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release}
1164 install %{objdir}/vmlinux $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release}
1165%ifarch sparc
1166 elftoaout %{objdir}/arch/sparc/boot/image -o %{objdir}/vmlinux.aout
1167 install %{objdir}/vmlinux.aout $RPM_BUILD_ROOT/boot/vmlinux.aout-%{kernel_release}
1168%endif
1169%ifarch sparc64
1170 elftoaout %{objdir}/arch/sparc64/boot/image -o %{objdir}/vmlinux.aout
1171 install %{objdir}/vmlinux.aout $RPM_BUILD_ROOT/boot/vmlinux.aout-%{kernel_release}
1172%endif
1173%ifarch arm
1174 install %{objdir}/arch/arm/boot/zImage $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release}
1175%endif
a5585a68 1176%endif
a5585a68 1177
351f379b
JR
1178# ghosted initrd
1179touch $RPM_BUILD_ROOT%{initrd_dir}/initrd-%{kernel_release}.gz
a5585a68 1180
351f379b
JR
1181%if "%{_target_base_arch}" != "%{_arch}"
1182touch $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/modules.dep
1183%endif
a5585a68 1184
351f379b
JR
1185# /etc/modrobe.d
1186install -d $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/%{kernel_release}
a5585a68 1187
351f379b
JR
1188# /usr/src/linux
1189install -d $RPM_BUILD_ROOT%{_kernelsrcdir}
1190# test if we can hardlink -- %{_builddir} and $RPM_BUILD_ROOT on same partition
1191if cp -al %{srcdir}/COPYING $RPM_BUILD_ROOT/COPYING 2>/dev/null; then
1192 l=l
1193 rm -f $RPM_BUILD_ROOT/COPYING
a5585a68 1194fi
a5585a68 1195
351f379b
JR
1196cp -a$l %{srcdir}/* $RPM_BUILD_ROOT%{_kernelsrcdir}
1197cp -a %{objdir}/Module.symvers $RPM_BUILD_ROOT%{_kernelsrcdir}/Module.symvers-dist
1198cp -aL %{objdir}/.config $RPM_BUILD_ROOT%{_kernelsrcdir}/config-dist
1199cp -a %{objdir}/include/linux/autoconf.h $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux/autoconf-dist.h
1200cp -a %{objdir}/include/linux/{utsrelease,version}.h $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux
1201cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux/autoconf.h
1202cp -a %{SOURCE4} $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux/config.h
1203
1204# collect module-build files and directories
1205# Usage: kernel-module-build.pl $rpmdir $fileoutdir
1206fileoutdir=$(pwd)
1207cd $RPM_BUILD_ROOT%{_kernelsrcdir}
1208%{__perl} %{topdir}/kernel-module-build.pl %{_kernelsrcdir} $fileoutdir
1209cd -
1210
30f08736
ER
1211# move to %{_docdir} so we wouldn't depend on any kernel package for dirs
1212install -d $RPM_BUILD_ROOT%{_docdir}
1213mv $RPM_BUILD_ROOT{%{_kernelsrcdir}/Documentation,%{_docdir}/%{name}-%{version}}
1214
d3a69071
ER
1215rm -f $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/dontdiff
1216rm -f $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/Makefile
1217rm -f $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/*/Makefile
1218rm -f $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/*/*/Makefile
1219
351f379b
JR
1220%clean
1221rm -rf $RPM_BUILD_ROOT
1222
1223%preun
1224if [ -x /sbin/new-kernel-pkg ]; then
1225 /sbin/new-kernel-pkg --remove %{kernel_release}
a5585a68 1226fi
351f379b
JR
1227
1228%post
1229%ifarch ia64
1230mv -f /boot/efi/vmlinuz{,.old} 2> /dev/null
1231%{?alt_kernel:mv -f /boot/efi/vmlinuz%{_alt_kernel}{,.old} 2> /dev/null}
1232ln -sf vmlinuz-%{kernel_release} /boot/efi/vmlinuz
1233%{?alt_kernel:ln -sf vmlinuz-%{kernel_release} /boot/efi/vmlinuz%{_alt_kernel}}
1234%endif
1235mv -f /boot/vmlinuz{,.old} 2> /dev/null
1236%{?alt_kernel:mv -f /boot/vmlinuz%{_alt_kernel}{,.old} 2> /dev/null}
1237mv -f /boot/System.map{,.old} 2> /dev/null
1238%{?alt_kernel:mv -f /boot/System%{_alt_kernel}.map{,.old} 2> /dev/null}
1239ln -sf vmlinuz-%{kernel_release} /boot/vmlinuz
1240%{?alt_kernel:ln -sf vmlinuz-%{kernel_release} /boot/vmlinuz%{_alt_kernel}}
1241ln -sf System.map-%{kernel_release} /boot/System.map
1242%{?alt_kernel:ln -sf System.map-%{kernel_release} /boot/System.map%{_alt_kernel}}
1243
1244%depmod %{kernel_release}
1245
1246/sbin/geninitrd -f --initrdfs=rom %{initrd_dir}/initrd-%{kernel_release}.gz %{kernel_release}
1247mv -f %{initrd_dir}/initrd{,.old} 2> /dev/null
1248%{?alt_kernel:mv -f %{initrd_dir}/initrd%{_alt_kernel}{,.old} 2> /dev/null}
1249ln -sf initrd-%{kernel_release}.gz %{initrd_dir}/initrd
1250%{?alt_kernel:ln -sf initrd-%{kernel_release}.gz %{initrd_dir}/initrd%{_alt_kernel}}
1251
1252if [ -x /sbin/new-kernel-pkg ]; then
1253 /sbin/new-kernel-pkg --initrdfile=%{initrd_dir}/initrd-%{kernel_release}.gz --install %{kernel_release} --banner "PLD Linux (%{pld_release})%{?alt_kernel: / %{alt_kernel}}"
1254elif [ -x /sbin/rc-boot ]; then
1255 /sbin/rc-boot 1>&2 || :
a5585a68 1256fi
a5585a68 1257
351f379b
JR
1258%post vmlinux
1259mv -f /boot/vmlinux{,.old} 2> /dev/null
1260%{?alt_kernel:mv -f /boot/vmlinux-%{alt_kernel}{,.old} 2> /dev/null}
1261ln -sf vmlinux-%{kernel_release} /boot/vmlinux
1262%{?alt_kernel:ln -sf vmlinux-%{kernel_release} /boot/vmlinux-%{alt_kernel}}
1263
1264%post libs
1265%{_sbindir}/mkvmlinuz /boot/zImage-%{kernel_release} %{kernel_release}
a5585a68 1266
351f379b
JR
1267%post drm
1268%depmod %{kernel_release}
a5585a68 1269
351f379b
JR
1270%postun drm
1271%depmod %{kernel_release}
a5585a68 1272
351f379b
JR
1273%post pcmcia
1274%depmod %{kernel_release}
a5585a68 1275
351f379b
JR
1276%postun pcmcia
1277%depmod %{kernel_release}
a5585a68 1278
351f379b
JR
1279%post sound-alsa
1280%depmod %{kernel_release}
a5585a68 1281
351f379b
JR
1282%postun sound-alsa
1283%depmod %{kernel_release}
a5585a68 1284
351f379b
JR
1285%post sound-oss
1286%depmod %{kernel_release}
a5585a68 1287
351f379b
JR
1288%postun sound-oss
1289%depmod %{kernel_release}
a5585a68
AM
1290
1291%post headers
351f379b 1292ln -snf %{basename:%{_kernelsrcdir}} %{_prefix}/src/linux%{_alt_kernel}
a5585a68
AM
1293
1294%postun headers
351f379b
JR
1295if [ "$1" = "0" ]; then
1296 if [ -L %{_prefix}/src/linux%{_alt_kernel} ]; then
1297 if [ "$(readlink %{_prefix}/src/linux%{_alt_kernel})" = "linux%{_alt_kernel}-%{version}" ]; then
1298 rm -f %{_prefix}/src/linux%{_alt_kernel}
a5585a68
AM
1299 fi
1300 fi
1301fi
1302
351f379b
JR
1303%triggerin module-build -- %{name} = %{epoch}:%{version}-%{release}
1304ln -sfn %{_kernelsrcdir} /lib/modules/%{kernel_release}/build
1305ln -sfn %{_kernelsrcdir} /lib/modules/%{kernel_release}/source
1306
1307%triggerun module-build -- %{name} = %{epoch}:%{version}-%{release}
1308if [ "$1" = 0 ]; then
1309 rm -f /lib/modules/%{kernel_release}/{build,source}
1310fi
1311
a5585a68
AM
1312%files
1313%defattr(644,root,root,755)
a5585a68 1314%ifarch sparc sparc64
351f379b 1315/boot/vmlinux.aout-%{kernel_release}
a5585a68
AM
1316%endif
1317%ifarch ia64
351f379b
JR
1318/boot/efi/vmlinuz-%{kernel_release}
1319%endif
1320/boot/vmlinuz-%{kernel_release}
1321/boot/System.map-%{kernel_release}
1322%ghost %{initrd_dir}/initrd-%{kernel_release}.gz
1323/lib/firmware/%{kernel_release}
1324
1325%dir /lib/modules/%{kernel_release}
1326%dir /lib/modules/%{kernel_release}/kernel
351f379b 1327/lib/modules/%{kernel_release}/kernel/arch
351f379b
JR
1328/lib/modules/%{kernel_release}/kernel/crypto
1329/lib/modules/%{kernel_release}/kernel/drivers
101ae904 1330%if %{have_drm}
351f379b
JR
1331%exclude /lib/modules/%{kernel_release}/kernel/drivers/gpu
1332%endif
1333/lib/modules/%{kernel_release}/kernel/fs
351f379b 1334/lib/modules/%{kernel_release}/kernel/kernel
351f379b
JR
1335/lib/modules/%{kernel_release}/kernel/lib
1336/lib/modules/%{kernel_release}/kernel/net
fecce547 1337/lib/modules/%{kernel_release}/kernel/mm
101ae904 1338%if %{have_sound}
351f379b
JR
1339%dir /lib/modules/%{kernel_release}/kernel/sound
1340/lib/modules/%{kernel_release}/kernel/sound/ac97_bus.ko*
1341/lib/modules/%{kernel_release}/kernel/sound/sound*.ko*
1342%ifnarch sparc
1343%exclude /lib/modules/%{kernel_release}/kernel/drivers/media/video/cx88/cx88-alsa.ko*
1344%exclude /lib/modules/%{kernel_release}/kernel/drivers/media/video/em28xx/em28xx-alsa.ko*
1345%exclude /lib/modules/%{kernel_release}/kernel/drivers/media/video/saa7134/saa7134-alsa.ko*
1346%endif
1347%endif
1348%dir /lib/modules/%{kernel_release}/misc
101ae904 1349%if %{have_pcmcia}
351f379b
JR
1350%exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/[!p]*
1351%exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/pd6729.ko*
1352%exclude /lib/modules/%{kernel_release}/kernel/drivers/*/pcmcia
1353%if %{without rescuecd}
1354%exclude /lib/modules/%{kernel_release}/kernel/drivers/ata/pata_pcmcia.ko*
1355%exclude /lib/modules/%{kernel_release}/kernel/drivers/bluetooth/*_cs.ko*
1356%exclude /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/avm_cs.ko*
1357%exclude /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/b1pcmcia.ko*
1358%exclude /lib/modules/%{kernel_release}/kernel/drivers/telephony/ixj_pcmcia.ko*
1359%exclude /lib/modules/%{kernel_release}/kernel/drivers/usb/gadget/g_midi.ko*
1360%endif
1361%exclude /lib/modules/%{kernel_release}/kernel/drivers/ide/ide-cs.ko*
1362%exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/*_cs.ko*
1363%exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/b43
1364%exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/hostap/hostap_cs.ko*
1365%exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/libertas/*_cs.ko*
1366%exclude /lib/modules/%{kernel_release}/kernel/drivers/parport/parport_cs.ko*
1367%exclude /lib/modules/%{kernel_release}/kernel/drivers/serial/serial_cs.ko*
1368%exclude /lib/modules/%{kernel_release}/kernel/drivers/usb/host/sl811_cs.ko*
1369%endif
101ae904 1370%if %{with myown}
1371/lib/modules/%{kernel_release}/kernel/sound
1372%endif
351f379b
JR
1373%ghost /lib/modules/%{kernel_release}/modules.*
1374# symlinks pointing to kernelsrcdir
1375%ghost /lib/modules/%{kernel_release}/build
1376%ghost /lib/modules/%{kernel_release}/source
1377%dir %{_sysconfdir}/modprobe.d/%{kernel_release}
1378
351f379b
JR
1379%ifarch alpha %{ix86} %{x8664} ppc ppc64 sparc sparc64
1380%files vmlinux
a5585a68 1381%defattr(644,root,root,755)
351f379b 1382/boot/vmlinux-%{kernel_release}
a5585a68
AM
1383%endif
1384
101ae904 1385%if %{have_drm}
351f379b 1386%files drm
a5585a68 1387%defattr(644,root,root,755)
351f379b 1388/lib/modules/%{kernel_release}/kernel/drivers/gpu
a5585a68
AM
1389%endif
1390
101ae904 1391%if %{have_pcmcia}
351f379b 1392%files pcmcia
a5585a68 1393%defattr(644,root,root,755)
351f379b
JR
1394/lib/modules/%{kernel_release}/kernel/drivers/pcmcia/*ko*
1395/lib/modules/%{kernel_release}/kernel/drivers/*/pcmcia
1396%exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/pcmcia*ko*
1397%if %{without rescuecd}
1398/lib/modules/%{kernel_release}/kernel/drivers/bluetooth/*_cs.ko*
1399/lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/avm_cs.ko*
1400/lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/b1pcmcia.ko*
1401/lib/modules/%{kernel_release}/kernel/drivers/telephony/ixj_pcmcia.ko*
1402%endif
1403/lib/modules/%{kernel_release}/kernel/drivers/ata/pata_pcmcia.ko*
1404/lib/modules/%{kernel_release}/kernel/drivers/ide/ide-cs.ko*
1405/lib/modules/%{kernel_release}/kernel/drivers/net/wireless/*_cs.ko*
1406/lib/modules/%{kernel_release}/kernel/drivers/net/wireless/b43
1407/lib/modules/%{kernel_release}/kernel/drivers/net/wireless/hostap/hostap_cs.ko*
1408/lib/modules/%{kernel_release}/kernel/drivers/net/wireless/libertas/*_cs.ko*
1409/lib/modules/%{kernel_release}/kernel/drivers/parport/parport_cs.ko*
1410/lib/modules/%{kernel_release}/kernel/drivers/serial/serial_cs.ko*
1411/lib/modules/%{kernel_release}/kernel/drivers/usb/host/sl811_cs.ko*
1412%endif
1413
1414%ifarch ppc-broken
1415%if "%{_arch}" == "ppc"
1416%files libs
a5585a68 1417%defattr(644,root,root,755)
351f379b
JR
1418%dir /boot/libs-%{kernel_release}
1419/boot/libs-%{kernel_release}/common
1420/boot/libs-%{kernel_release}/kernel
1421/boot/libs-%{kernel_release}/lib
1422/boot/libs-%{kernel_release}/of1275
1423/boot/libs-%{kernel_release}/openfirmware
1424/boot/libs-%{kernel_release}/simple
1425%dir /boot/libs-%{kernel_release}/utils
1426%attr(755,root,root) /boot/libs-%{kernel_release}/utils/*
1427/boot/libs-%{kernel_release}/ld.script
a5585a68 1428%endif
a5585a68
AM
1429%endif
1430
101ae904 1431%if %{have_sound}
351f379b 1432%files sound-alsa
a5585a68 1433%defattr(644,root,root,755)
351f379b
JR
1434/lib/modules/%{kernel_release}/kernel/sound
1435%exclude %dir /lib/modules/%{kernel_release}/kernel/sound
1436%exclude /lib/modules/%{kernel_release}/kernel/sound/ac97_bus.ko*
1437%exclude /lib/modules/%{kernel_release}/kernel/sound/sound*.ko*
1438%if %{have_oss}
1439%exclude /lib/modules/%{kernel_release}/kernel/sound/oss
a5585a68 1440%endif
351f379b
JR
1441%ifnarch sparc
1442/lib/modules/%{kernel_release}/kernel/drivers/usb/gadget/g_midi.ko*
1443/lib/modules/%{kernel_release}/kernel/drivers/media/video/cx88/cx88-alsa.ko*
1444/lib/modules/%{kernel_release}/kernel/drivers/media/video/em28xx/em28xx-alsa.ko*
1445/lib/modules/%{kernel_release}/kernel/drivers/media/video/saa7134/saa7134-alsa.ko*
a5585a68
AM
1446%endif
1447
101ae904 1448%if %{have_oss}
351f379b 1449%files sound-oss
a5585a68 1450%defattr(644,root,root,755)
351f379b 1451/lib/modules/%{kernel_release}/kernel/sound/oss
a5585a68 1452%endif
a5585a68
AM
1453%endif
1454
fecce547 1455%files headers -f files.headers_exclude_kbuild
a5585a68 1456%defattr(644,root,root,755)
30f08736 1457%dir %{_kernelsrcdir}
351f379b
JR
1458%{_kernelsrcdir}/include
1459%dir %{_kernelsrcdir}/arch
1460%dir %{_kernelsrcdir}/arch/[!K]*
1461%{_kernelsrcdir}/arch/*/include
1462%dir %{_kernelsrcdir}/security
1463%dir %{_kernelsrcdir}/security/selinux
1464%{_kernelsrcdir}/security/selinux/include
1465%{_kernelsrcdir}/config-dist
1466%{_kernelsrcdir}/Module.symvers-dist
1467
fecce547 1468%files module-build -f files.mb_include_modulebuild_and_dirs
a5585a68 1469%defattr(644,root,root,755)
351f379b
JR
1470%ifarch ppc ppc64
1471%{_kernelsrcdir}/arch/powerpc/lib/crtsavres.*
1472%endif
fecce547 1473%exclude %dir %{_kernelsrcdir}/arch/m68knommu
1474%exclude %dir %{_kernelsrcdir}/arch/um
351f379b
JR
1475%{_kernelsrcdir}/arch/*/kernel/asm-offsets*
1476%{_kernelsrcdir}/arch/*/kernel/sigframe*.h
1477%{_kernelsrcdir}/drivers/lguest/lg.h
1478%{_kernelsrcdir}/kernel/bounds.c
1479%dir %{_kernelsrcdir}/scripts
351f379b
JR
1480%{_kernelsrcdir}/scripts/Kbuild.include
1481%{_kernelsrcdir}/scripts/Makefile*
1482%{_kernelsrcdir}/scripts/basic
960d2e94 1483%{_kernelsrcdir}/scripts/kconfig
1484%{_kernelsrcdir}/scripts/mkcompile_h
351f379b
JR
1485%{_kernelsrcdir}/scripts/mkmakefile
1486%{_kernelsrcdir}/scripts/mod
960d2e94 1487%{_kernelsrcdir}/scripts/module-common.lds
351f379b
JR
1488%{_kernelsrcdir}/scripts/setlocalversion
1489%{_kernelsrcdir}/scripts/*.c
1490%{_kernelsrcdir}/scripts/*.sh
351f379b
JR
1491%dir %{_kernelsrcdir}/scripts/selinux
1492%{_kernelsrcdir}/scripts/selinux/Makefile
1493%dir %{_kernelsrcdir}/scripts/selinux/mdp
1494%{_kernelsrcdir}/scripts/selinux/mdp/Makefile
1495%{_kernelsrcdir}/scripts/selinux/mdp/*.c
fecce547 1496%exclude %dir %{_kernelsrcdir}/security
1497%exclude %dir %{_kernelsrcdir}/security/selinux
a5585a68
AM
1498
1499%files doc
1500%defattr(644,root,root,755)
d3a69071
ER
1501%dir %{_docdir}/%{name}-%{version}
1502
1503%{_docdir}/%{name}-%{version}/[!jkz]*
1504%{_docdir}/%{name}-%{version}/[jkz]*.txt
1505%{_docdir}/%{name}-%{version}/kbuild
1506%{_docdir}/%{name}-%{version}/kdump
1507%lang(ja) %{_docdir}/%{name}-%{version}/ja_JP
1508%lang(ko) %{_docdir}/%{name}-%{version}/ko_KR
1509%lang(zh_CN) %{_docdir}/%{name}-%{version}/zh_CN
a5585a68
AM
1510
1511%if %{with source}
fecce547 1512%files source -f files.source_exclude_modulebuild_and_dirs
a5585a68 1513%defattr(644,root,root,755)
351f379b
JR
1514%{_kernelsrcdir}/arch/*/[!Mik]*
1515%{_kernelsrcdir}/arch/*/kernel/[!M]*
1516%{_kernelsrcdir}/arch/ia64/ia32/[!M]*
1517%{_kernelsrcdir}/arch/ia64/install.sh
1518%{_kernelsrcdir}/arch/m68k/ifpsp060/[!M]*
1519%{_kernelsrcdir}/arch/m68k/ifpsp060/MISC
fecce547 1520%{_kernelsrcdir}/arch/m68k/install.sh
351f379b
JR
1521%{_kernelsrcdir}/arch/parisc/install.sh
1522%{_kernelsrcdir}/arch/x86/ia32/[!M]*
1523%{_kernelsrcdir}/arch/ia64/kvm
1524%{_kernelsrcdir}/arch/powerpc/kvm
1525%ifarch ppc ppc64
1526%exclude %{_kernelsrcdir}/arch/powerpc/lib/crtsavres.*
1527%endif
1528%{_kernelsrcdir}/arch/s390/kvm
1529%{_kernelsrcdir}/arch/x86/kvm
1530%exclude %{_kernelsrcdir}/arch/*/kernel/asm-offsets*
1531%exclude %{_kernelsrcdir}/arch/*/kernel/sigframe*.h
1532%exclude %{_kernelsrcdir}/drivers/lguest/lg.h
1533%{_kernelsrcdir}/block
1534%{_kernelsrcdir}/crypto
1535%{_kernelsrcdir}/drivers
1536%{_kernelsrcdir}/firmware
1537%{_kernelsrcdir}/fs
1538%if %{with grsecurity} && %{without rescuecd}
1539%{_kernelsrcdir}/grsecurity
1540%endif
1541%{_kernelsrcdir}/init
1542%{_kernelsrcdir}/ipc
1543%{_kernelsrcdir}/kernel
1544%exclude %{_kernelsrcdir}/kernel/bounds.c
1545%{_kernelsrcdir}/lib
1546%{_kernelsrcdir}/mm
1547%{_kernelsrcdir}/net
1548%{_kernelsrcdir}/virt
1549%{_kernelsrcdir}/samples
1550%{_kernelsrcdir}/scripts/*
1551%exclude %{_kernelsrcdir}/scripts/Kbuild.include
1552%exclude %{_kernelsrcdir}/scripts/Makefile*
1553%exclude %{_kernelsrcdir}/scripts/basic
1554%exclude %{_kernelsrcdir}/scripts/kconfig
960d2e94 1555%exclude %{_kernelsrcdir}/scripts/mkcompile_h
351f379b
JR
1556%exclude %{_kernelsrcdir}/scripts/mkmakefile
1557%exclude %{_kernelsrcdir}/scripts/mod
960d2e94 1558%exclude %{_kernelsrcdir}/scripts/module-common.lds
351f379b
JR
1559%exclude %{_kernelsrcdir}/scripts/setlocalversion
1560%exclude %{_kernelsrcdir}/scripts/*.c
1561%exclude %{_kernelsrcdir}/scripts/*.sh
960d2e94 1562%exclude %dir %{_kernelsrcdir}/scripts/selinux
1563%exclude %{_kernelsrcdir}/scripts/selinux/Makefile
1564%exclude %dir %{_kernelsrcdir}/scripts/selinux/mdp
1565%exclude %{_kernelsrcdir}/scripts/selinux/mdp/Makefile
1566%exclude %{_kernelsrcdir}/scripts/selinux/mdp/*.c
351f379b
JR
1567%{_kernelsrcdir}/sound
1568%{_kernelsrcdir}/security
1569%exclude %{_kernelsrcdir}/security/selinux/include
fecce547 1570%{_kernelsrcdir}/tools
351f379b
JR
1571%{_kernelsrcdir}/usr
1572%{_kernelsrcdir}/COPYING
1573%{_kernelsrcdir}/CREDITS
1574%{_kernelsrcdir}/MAINTAINERS
1575%{_kernelsrcdir}/README
1576%{_kernelsrcdir}/REPORTING-BUGS
a5585a68 1577%endif
This page took 0.400777 seconds and 4 git commands to generate.