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