]> git.pld-linux.org Git - packages/kernel.git/blame - kernel.spec
- up to vserver patch-2.6.35.4-vs2.3.0.36.32.diff
[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
3afa71bc 117%define rel 0.1
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
JR
314Patch2003: kernel-regressions.patch
315
316# kill some thousands of warnings
317# (only warnings, so just remove parts of this patch if conflics)
60bb736d 318Patch2500: kernel-warnings.patch
351f379b 319
76514441 320# http://kernel.org/pub/linux/security/apparmor/AppArmor-2.6/apparmor-v2.6+v2.4-compat-for-2.6.35.patch
351f379b 321Patch5000: kernel-apparmor.patch
351f379b
JR
322
323# for rescuecd
324# based on http://ftp.leg.uct.ac.za/pub/linux/rip/inittmpfs-2.6.14.diff.gz
325Patch7000: kernel-inittmpfs.patch
326
088bb6a5 327# based on http://www.grsecurity.net/~spender/grsecurity-2.2.0-2.6.34-201007031927.patch
4a6985f1
AM
328# NOTE: put raw upstream patches on kernel-grsec_full.patch:GRSECURITY_RAW for reference
329# (since upstream deletes older patches)
60bb736d
JR
330Patch9999: kernel-grsec_full.patch
331Patch10000: kernel-grsec-caps.patch
332Patch10001: kernel-grsec-common.patch
351f379b 333Patch10002: kernel-grsec_fixes.patch
bf6838be 334
a5585a68 335URL: http://www.kernel.org/
351f379b 336BuildRequires: binutils >= 3:2.18
a5585a68
AM
337%ifarch sparc sparc64
338BuildRequires: elftoaout
339%endif
351f379b
JR
340%ifarch ppc
341BuildRequires: uboot-mkimage
342%endif
351f379b
JR
343BuildRequires: /sbin/depmod
344BuildRequires: gcc >= 5:3.2
cfce203c 345BuildRequires: xz >= 1:4.999.7
e69c45e8 346AutoReqProv: no
351f379b 347# for hostname command
c8ff6387 348BuildRequires: module-init-tools >= 3.5
351f379b 349BuildRequires: net-tools
a5585a68 350BuildRequires: perl-base
b488384f 351BuildRequires: rpm-build >= 4.5-24
351f379b
JR
352BuildRequires: rpmbuild(macros) >= 1.217
353Requires(post): coreutils
354Requires(post): geninitrd >= 10000-3
355Requires(post): module-init-tools >= 0.9.9
356Requires: /sbin/depmod
357Requires: coreutils
358Requires: geninitrd >= 10000-3
359Requires: module-init-tools >= 0.9.9
360Provides: %{name}(netfilter) = %{netfilter_snap}
361Provides: %{name}(vermagic) = %{kernel_release}
362Obsoletes: kernel%{_alt_kernel}-isdn-mISDN
26b1ceeb 363Obsoletes: kernel-firmware
351f379b
JR
364Obsoletes: kernel-misc-acer_acpi
365Obsoletes: kernel-misc-fuse
366Obsoletes: kernel-misc-uvc
a5585a68 367Obsoletes: kernel-modules
351f379b
JR
368Obsoletes: kernel-net-ar81
369Obsoletes: kernel-net-hostap
370Obsoletes: kernel-net-ieee80211
371Obsoletes: kernel-net-ipp2p
372Obsoletes: kernel-net-rt61
373Obsoletes: kernel-smp
374Conflicts: e2fsprogs < 1.29
375Conflicts: isdn4k-utils < 3.1pre1
376Conflicts: jfsutils < 1.1.3
cf8de22f 377Conflicts: lvm2 < 2.02.40
351f379b
JR
378Conflicts: module-init-tools < 0.9.10
379Conflicts: nfs-utils < 1.0.5
380Conflicts: oprofile < 0.9
381Conflicts: ppp < 1:2.4.0
382Conflicts: procps < 3.2.0
383Conflicts: quota-tools < 3.09
4dabe329 384%{?with_reiserfs4:Conflicts: reiser4progs < 1.0.0}
351f379b 385Conflicts: reiserfsprogs < 3.6.3
4dabe329 386Conflicts: rpm < 4.4.2-0.2
351f379b
JR
387Conflicts: udev < 1:081
388Conflicts: util-linux < 2.10o
d3c4e01e 389Conflicts: util-vserver < 0.30.216
351f379b
JR
390Conflicts: xfsprogs < 2.6.0
391%if %{with pae}
392ExcludeArch: i386 i486 i586
393%else
394ExclusiveArch: %{ix86} %{x8664} alpha arm ia64 ppc ppc64 sparc sparc64
395%endif
a5585a68
AM
396ExclusiveOS: Linux
397BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
398
351f379b
JR
399%ifarch %{ix86} %{x8664}
400%define target_arch_dir x86
401%endif
402%ifarch ppc ppc64
403%define target_arch_dir powerpc
404%endif
5a99ae3d 405%ifarch sparc sparc64
406%define target_arch_dir sparc
407%endif
408%ifnarch %{ix86} %{x8664} ppc ppc64 sparc sparc64
351f379b
JR
409%define target_arch_dir %{_target_base_arch}
410%endif
411
412%define defconfig arch/%{target_arch_dir}/defconfig
413
414# No ELF objects there to strip (skips processing 27k files)
ded910ba 415%define _noautostrip \\(.*%{_kernelsrcdir}/.*\\|.*/vmlinux.*\\)
351f379b
JR
416%define _noautochrpath .*%{_kernelsrcdir}/.*
417
a5585a68
AM
418%ifarch ia64
419%define initrd_dir /boot/efi
420%else
421%define initrd_dir /boot
422%endif
423
351f379b
JR
424%define topdir %{_builddir}/%{name}-%{version}
425%define srcdir %{topdir}/linux-%{basever}
426%define objdir %{topdir}/%{targetobj}
427%define targetobj %{_target_base_arch}-gcc-%(%{kgcc} -dumpversion)
428
429%define _kernelsrcdir /usr/src/linux%{_alt_kernel}-%{version}
430
431%if "%{_target_base_arch}" != "%{_arch}"
432 %define CrossOpts ARCH=%{_target_base_arch} CROSS_COMPILE=%{_target_cpu}-pld-linux-
433 %define DepMod /bin/true
434
435 %if "%{_arch}" == "sparc" && "%{_target_base_arch}" == "sparc64"
436 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
437 %define DepMod /sbin/depmod
438 %endif
439
440 %if "%{_arch}" == "sparc64" && "%{_target_base_arch}" == "sparc"
441 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
442 %define DepMod /sbin/depmod
443 %endif
444
445 %if "%{_arch}" == "x86_64" && "%{_target_base_arch}" == "i386"
446 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
447 %define DepMod /sbin/depmod
448 %endif
449
5a99ae3d 450 %if "%{_target_base_arch}" == "ppc" || "%{_target_base_arch}" == "ppc64"
351f379b
JR
451 %define CrossOpts ARCH=powerpc CROSS_COMPILE=%{_target_cpu}-pld-linux-
452 %endif
453%else
454 %ifarch ppc ppc64
455 %define CrossOpts ARCH=powerpc CC="%{__cc}"
456 %else
457 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
458 %endif
459 %define DepMod /sbin/depmod
460%endif
461%define MakeOpts %{CrossOpts} HOSTCC="%{__cc}"
462
463%define __features Netfilter module dated: %{netfilter_snap}\
17da405a 464%{?with_grsec_full:Grsecurity support - enabled}\
465%{?with_grsec_minimal:Grsecurity minimal support /proc,link,fifo,shm/ - enabled}\
351f379b
JR
466%{?with_pax:PaX support - enabled}\
467%{?with_fbcondecor:Fbsplash/fbcondecor - enabled }\
468%{?with_nfsroot:Root on NFS - enabled}\
469%{?with_apparmor:apparmor support - enabled}\
351f379b
JR
470
471%define Features %(echo "%{__features}" | sed '/^$/d')
472
a5585a68
AM
473%description
474This package contains the Linux kernel that is used to boot and run
475your system. It contains few device drivers for specific hardware.
476Most hardware is instead supported by modules loaded after booting.
477
351f379b
JR
478%{Features}
479
3a467bc1
JR
480%description -l de.UTF-8
481Das Kernel-Paket enthält den Linux-Kernel (vmlinuz), den Kern des
482Linux-Betriebssystems. Der Kernel ist für grundliegende
a5585a68 483Systemfunktionen verantwortlich: Speicherreservierung,
3a467bc1 484Prozeß-Management, Geräte Ein- und Ausgaben, usw.
a5585a68 485
351f379b
JR
486%{Features}
487
3a467bc1 488%description -l fr.UTF-8
a5585a68 489Le package kernel contient le kernel linux (vmlinuz), la partie
3a467bc1
JR
490centrale d'un système d'exploitation Linux. Le noyau traite les
491fonctions basiques d'un système d'exploitation: allocation mémoire,
492allocation de process, entrée/sortie de peripheriques, etc.
a5585a68 493
351f379b
JR
494%{Features}
495
3a467bc1
JR
496%description -l pl.UTF-8
497Pakiet zawiera jądro Linuksa niezbędne do prawidłowego działania
498Twojego komputera. Zawiera w sobie sterowniki do sprzętu znajdującego
499się w komputerze, takiego jak sterowniki dysków itp.
a5585a68 500
351f379b
JR
501%{Features}
502
503%package vmlinux
504Summary: vmlinux - uncompressed kernel image
505Summary(de.UTF-8): vmlinux - dekompressiertes Kernel Bild
506Summary(pl.UTF-8): vmlinux - rozpakowany obraz jądra
507Group: Base/Kernel
508Obsoletes: kernel-smp-vmlinux
509
510%description vmlinux
511vmlinux - uncompressed kernel image.
512
513%description vmlinux -l de.UTF-8
514vmlinux - dekompressiertes Kernel Bild.
515
516%description vmlinux -l pl.UTF-8
517vmlinux - rozpakowany obraz jądra.
518
a5585a68
AM
519%package drm
520Summary: DRM kernel modules
351f379b
JR
521Summary(de.UTF-8): DRM Kernel Treiber
522Summary(pl.UTF-8): Sterowniki DRM
a5585a68 523Group: Base/Kernel
351f379b
JR
524Requires(postun): %{name} = %{epoch}:%{version}-%{release}
525Requires: %{name} = %{epoch}:%{version}-%{release}
526Obsoletes: kernel-smp-drm
07ff8614 527AutoReqProv: no
a5585a68
AM
528
529%description drm
351f379b
JR
530DRM kernel modules.
531
532%description drm -l de.UTF-8
533DRM Kernel Treiber.
a5585a68 534
3a467bc1 535%description drm -l pl.UTF-8
351f379b 536Sterowniki DRM.
a5585a68
AM
537
538%package pcmcia
539Summary: PCMCIA modules
351f379b
JR
540Summary(de.UTF-8): PCMCIA Module
541Summary(pl.UTF-8): Moduły PCMCIA
a5585a68 542Group: Base/Kernel
351f379b
JR
543Requires(postun): %{name} = %{epoch}:%{version}-%{release}
544Requires: %{name} = %{epoch}:%{version}-%{release}
545Obsoletes: kernel-smp-pcmcia
546Conflicts: pcmcia-cs < 3.1.21
547Conflicts: pcmciautils < 004
07ff8614 548AutoReqProv: no
a5585a68
AM
549
550%description pcmcia
351f379b
JR
551PCMCIA modules.
552
553%description pcmcia -l de.UTF-8
554PCMCIA Module.
a5585a68 555
3a467bc1 556%description pcmcia -l pl.UTF-8
351f379b
JR
557Moduły PCMCIA.
558
a5585a68
AM
559%package sound-alsa
560Summary: ALSA kernel modules
351f379b
JR
561Summary(de.UTF-8): ALSA Kernel Module
562Summary(pl.UTF-8): Sterowniki dźwięku ALSA
a5585a68 563Group: Base/Kernel
351f379b
JR
564Requires(postun): %{name} = %{epoch}:%{version}-%{release}
565Requires: %{name} = %{epoch}:%{version}-%{release}
566Obsoletes: kernel-smp-sound-alsa
07ff8614 567AutoReqProv: no
a5585a68
AM
568
569%description sound-alsa
570ALSA (Advanced Linux Sound Architecture) sound drivers.
571
351f379b
JR
572%description sound-alsa -l de.UTF-8
573ALSA (Advanced Linux Sound Architecture) Sound-Treiber.
574
3a467bc1
JR
575%description sound-alsa -l pl.UTF-8
576Sterowniki dźwięku ALSA (Advanced Linux Sound Architecture).
a5585a68
AM
577
578%package sound-oss
579Summary: OSS kernel modules
351f379b
JR
580Summary(de.UTF-8): OSS Kernel Module
581Summary(pl.UTF-8): Sterowniki dźwięku OSS
a5585a68 582Group: Base/Kernel
351f379b
JR
583Requires(postun): %{name} = %{epoch}:%{version}-%{release}
584Requires: %{name} = %{epoch}:%{version}-%{release}
585Obsoletes: kernel-smp-sound-oss
07ff8614 586AutoReqProv: no
a5585a68
AM
587
588%description sound-oss
589OSS (Open Sound System) drivers.
590
351f379b
JR
591%description sound-oss -l de.UTF-8
592OSS (Open Sound System) Treiber.
593
3a467bc1
JR
594%description sound-oss -l pl.UTF-8
595Sterowniki dźwięku OSS (Open Sound System).
a5585a68 596
a5585a68
AM
597%package headers
598Summary: Header files for the Linux kernel
351f379b
JR
599Summary(de.UTF-8): Header Dateien für den Linux-Kernel
600Summary(pl.UTF-8): Pliki nagłówkowe jądra Linuksa
601Group: Development/Building
602Provides: %{name}-headers(netfilter) = %{netfilter_snap}
07ff8614 603AutoReqProv: no
a5585a68
AM
604
605%description headers
606These are the C header files for the Linux kernel, which define
351f379b
JR
607structures and constants that are needed when rebuilding the kernel or
608building kernel modules.
609
610%description headers -l de.UTF-8
611Dies sind die C Header Dateien für den Linux-Kernel, die definierte
612Strukturen und Konstante beinhalten, die beim rekompilieren des
613Kernels oder bei Kernel Modul kompilationen gebraucht werden.
a5585a68 614
3a467bc1
JR
615%description headers -l pl.UTF-8
616Pakiet zawiera pliki nagłówkowe jądra, niezbędne do rekompilacji jądra
617oraz budowania modułów jądra.
a5585a68
AM
618
619%package module-build
620Summary: Development files for building kernel modules
351f379b
JR
621Summary(de.UTF-8): Development Dateien die beim Kernel Modul kompilationen gebraucht werden
622Summary(pl.UTF-8): Pliki służące do budowania modułów jądra
623Group: Development/Building
a5585a68 624Requires: %{name}-headers = %{epoch}:%{version}-%{release}
fd19fa89 625Conflicts: rpmbuild(macros) < 1.550
07ff8614 626AutoReqProv: no
a5585a68
AM
627
628%description module-build
629Development files from kernel source tree needed to build Linux kernel
630modules from external packages.
631
351f379b
JR
632%description module-build -l de.UTF-8
633Development Dateien des Linux-Kernels die beim kompilieren externer
634Kernel Module gebraucht werden.
635
3a467bc1
JR
636%description module-build -l pl.UTF-8
637Pliki ze drzewa źródeł jądra potrzebne do budowania modułów jądra
638Linuksa z zewnętrznych pakietów.
a5585a68
AM
639
640%package source
641Summary: Kernel source tree
351f379b
JR
642Summary(de.UTF-8): Der Kernel Quelltext
643Summary(pl.UTF-8): Kod źródłowy jądra Linuksa
644Group: Development/Building
a5585a68 645Requires: %{name}-module-build = %{epoch}:%{version}-%{release}
07ff8614 646AutoReqProv: no
a5585a68
AM
647
648%description source
351f379b
JR
649This is the source code for the Linux kernel. You can build a custom
650kernel that is better tuned to your particular hardware.
a5585a68 651
3a467bc1
JR
652%description source -l de.UTF-8
653Das Kernel-Source-Paket enthält den source code (C/Assembler-Code) des
a5585a68 654Linux-Kernels. Die Source-Dateien werden gebraucht, um viele
351f379b 655C-Programme zu kompilieren, da sie auf Konstanten zurückgreifen, die
3a467bc1 656im Kernel-Source definiert sind. Die Source-Dateien können auch
351f379b 657benutzt werden, um einen Kernel zu kompilieren, der besser auf Ihre
a5585a68
AM
658Hardware ausgerichtet ist.
659
3a467bc1 660%description source -l fr.UTF-8
a5585a68 661Le package pour le kernel-source contient le code source pour le noyau
3a467bc1
JR
662linux. Ces sources sont nécessaires pour compiler la plupart des
663programmes C, car il dépend de constantes définies dans le code
664source. Les sources peuvent être aussi utilisée pour compiler un noyau
665personnalisé pour avoir de meilleures performances sur des matériels
a5585a68
AM
666particuliers.
667
3a467bc1
JR
668%description source -l pl.UTF-8
669Pakiet zawiera kod źródłowy jądra systemu.
a5585a68
AM
670
671%package doc
672Summary: Kernel documentation
351f379b
JR
673Summary(de.UTF-8): Kernel Dokumentation
674Summary(pl.UTF-8): Dokumentacja do jądra Linuksa
675Group: Documentation
07ff8614 676AutoReqProv: no
a5585a68
AM
677
678%description doc
679This is the documentation for the Linux kernel, as found in
680/usr/src/linux/Documentation directory.
681
351f379b
JR
682%description doc -l de.UTF-8
683Dies ist die Kernel Dokumentation wie sie im 'Documentation'
684Verzeichniss vorgefunden werden kann.
685
3a467bc1
JR
686%description doc -l pl.UTF-8
687Pakiet zawiera dokumentację do jądra Linuksa pochodzącą z katalogu
a5585a68
AM
688/usr/src/linux/Documentation.
689
690%prep
351f379b
JR
691%setup -qc
692ln -s %{SOURCE7} kernel-module-build.pl
693ln -s %{SOURCE10} Makefile
694cd linux-%{basever}
a5585a68 695
351f379b 696# hack against warning in pax/grsec
351f379b 697sed -i 's/-Werror//' arch/alpha/kernel/Makefile
a5585a68 698
351f379b
JR
699%if "%{postver}" != "%{nil}"
700%{__bzip2} -dc %{SOURCE1} | patch -p1 -s
701%endif
a5585a68 702
351f379b
JR
703# tuxonice:
704%if %{with tuxonice}
351f379b
JR
705%patch69 -p1
706%patch70 -p1
351f379b 707%endif
bf6838be 708
17da405a 709# tahoe9xx: 2.6.29 - need update
351f379b 710#%patch2 -p1
a5585a68 711
351f379b
JR
712%if %{with fbcondecor}
713%patch3 -p1
a5585a68 714%endif
351f379b 715%patch4 -p1
a5585a68 716
351f379b
JR
717## netfilter
718#
a5585a68 719
351f379b
JR
720# kernel-pom-ng-IPV4OPTSSTRIP.patch
721%patch10 -p1
a5585a68 722
351f379b
JR
723# kernel-pom-ng-ipv4options.patch
724%patch11 -p1
a5585a68 725
351f379b
JR
726# kernel-pom-ng-mms-conntrack-nat.patch
727%patch16 -p1
a5585a68 728
351f379b
JR
729# kernel-pom-ng-rsh.patch
730%patch22 -p1
a5585a68 731
351f379b
JR
732# kernel-pom-ng-rpc.patch
733%patch23 -p1
a5585a68 734
351f379b
JR
735# kernel-nf_rtsp.patch
736%patch36 -p1
a5585a68 737
351f379b
JR
738# kernel-owner-xid.patch
739%if %{with vserver}
740%patch37 -p1
a5585a68 741%endif
a5585a68 742
351f379b
JR
743# kernel-layer7.patch
744%patch40 -p1
745
746# ipvs-nfct
78978408 747%patch41 -p1
351f379b
JR
748
749##
750# end of netfilter
751
752# zph
753%patch49 -p1
754
755%if %{with imq}
756%patch50 -p1
a5585a68 757%endif
351f379b
JR
758
759# reiser4
760%if %{with reiser4}
761%patch51 -p1
a5585a68 762%endif
351f379b 763
351f379b 764# esfq
068b6c82
AM
765%if %{with esfq}
766%patch53 -p1
767%endif
351f379b
JR
768
769%if %{with wrr}
770%patch52 -p1
a5585a68 771%endif
351f379b
JR
772
773# toshiba_acpi
774%patch54 -p1
775
776%patch55 -p1
777%patch56 -p1
778
40bf088a
AM
779# squashfs lzma support
780%patch57 -p1
781
351f379b
JR
782# kernel-rndis_host-wm5.patch
783%patch59 -p1
784
785# hostap enhancements from/for aircrack-ng
786%patch85 -p1
787
351f379b
JR
788# vserver
789%if %{with vserver}
790%patch100 -p1
791%patch101 -p1
a5585a68 792%endif
351f379b 793
351f379b
JR
794# forcedeth
795%patch130 -p1
a5585a68 796
76b36ddb
ER
797%patch131 -p1
798
62fff140 799# unionfs (problems with aufs2, needed for aufs1 patch)
aabc2ad2 800%if %{without rescuecd}
351f379b 801%patch140 -p1
aabc2ad2 802%endif
a5585a68 803
a899ef35 804%if %{with rescuecd}
17da405a 805# aufs2
a899ef35 806%patch148 -p1
807%else
62fff140 808# aufs1
809#patch145 -p1
810#patch146 -p1
a899ef35 811%endif
a5585a68 812
351f379b 813%patch2500 -p1
a5585a68 814
351f379b
JR
815%if %{with rescuecd}
816%patch7000 -p1
e981df17 817%endif
a5585a68 818
351f379b
JR
819# grsecurity & pax stuff
820#
351f379b 821
17da405a 822# remember that we have the same config file for grsec_minimal and
823# grsec_full, but the patches are different.
824
825%if %{with grsecurity}
826%if %{with grsec_minimal}
827%patch1000 -p1
828%else
829# grsec_full and/or pax
351f379b
JR
830%patch9999 -p1
831%{?with_vserver:%patch10000 -p1}
832%{?with_vserver:%patch10001 -p1}
833%{?with_vserver:%patch10002 -p1}
351f379b 834%endif
e981df17 835%endif
351f379b
JR
836#
837# end of grsecurity & pax stuff
838
df4db69a
AM
839# apparmor
840%if %{with apparmor}
841%patch5000 -p1
842%endif
843
7e46296a
AM
844# FIXME
845#%patch150 -p1
a11f3f79 846
351f379b
JR
847%ifarch ppc ppc64
848#patch200 -p1
849%endif
a5585a68 850
351f379b
JR
851# routes
852%patch300 -p1
a5585a68 853
351f379b
JR
854# Small fixes:
855%patch2000 -p1
856%patch2001 -p1
857#%patch2003 -p1
a5585a68 858
351f379b
JR
859# Fix EXTRAVERSION in main Makefile
860sed -i 's#EXTRAVERSION =.*#EXTRAVERSION = %{postver}%{?alt_kernel:_%{alt_kernel}}#g' Makefile
a5585a68 861
351f379b
JR
862# cleanup backups after patching
863find '(' -name '*~' -o -name '*.orig' -o -name '.gitignore' ')' -print0 | xargs -0 -r -l512 rm -f
a5585a68 864
351f379b
JR
865%build
866install -d %{objdir}
867cat > %{targetobj}.mk <<'EOF'
868# generated by %{name}.spec
869KERNELSRC := %{_builddir}/%{name}-%{version}/linux-%{basever}
870KERNELOUTPUT := %{objdir}
871
872SRCARCH := %{target_arch_dir}
873ARCH := %{_target_base_arch}
874Q := %{!?with_verbose:@}
875MAKE_OPTS := %{MakeOpts}
876DEFCONFIG := %{defconfig}
877EOF
a5585a68 878
351f379b
JR
879PaXconfig() {
880 set -x
881 cat <<-EOCONFIG > $1
882 %ifarch %{ix86}
883 CONFIG_PAX_SEGMEXEC=y
884 # performance impact on CPUs without NX bit
885 CONFIG_PAX_PAGEEXEC=n
886 # Testing KERNEXEC
887
888 CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM=n
889 CONFIG_PCI_BIOS=n
890 CONFIG_EFI=n
891 %endif
a5585a68 892
351f379b
JR
893 %ifarch ppc64
894 CONFIG_PAX_NOELFRELOCS=n
895 %endif
896 %ifarch ppc
897 CONFIG_PAX_EMUTRAMP=y
898 CONFIG_PAX_EMUSIGRT=y
899 CONFIG_PAX_EMUPLT=y
900 %endif
a5585a68 901
351f379b
JR
902 %ifarch sparc sparc64 alpha
903 CONFIG_PAX_EMUPLT=y
904 %endif
a5585a68 905
351f379b
JR
906 # Now we have to check MAC system integration. Grsecurity (full) uses PAX_HAVE_ACL_FLAGS
907 # setting (direct acces). grsec_minimal probably have no idea about PaX so we probably
908 # could use PAX_NO_ACL_FLAGS, but for testing the hooks setting will be used
e69c45e8 909 # PAX_HOOK_ACL_FLAGS.
351f379b
JR
910
911 %if %{with grsec_full}
912 # Hardening grsec options if with pax
913 CONFIG_GRKERNSEC_PROC_MEMMAP=y
914 # almost rational (see HIDESYM help)
915 CONFIG_GRKERNSEC_HIDESYM=y
916
917 # no change needed CONFIG=PAX_HAVE_ACL_FLAGS=y is taken from the kernel-pax.config
918 %else
351f379b
JR
919 CONFIG_PAX_HAVE_ACL_FLAGS=n
920 CONFIG_PAX_HOOK_ACL_FLAGS=y
921 %endif
922EOCONFIG
a5585a68 923
351f379b
JR
924 return 0
925}
a5585a68 926
351f379b
JR
927RescueConfig() {
928 set -x
929 cat <<-EOCONFIG > $1
930 # CONFIG_SOUND is not set
931 # CONFIG_AUDIT is not set
932 # CONFIG_TR is not set
933 # CONFIG_BT is not set
934 # CONFIG_VIDEO_DEV is not set
935 # CONFIG_DVB_CORE is not set
936 # CONFIG_HAMRADIO is not set
937 # CONFIG_ARCNET is not set
938 # CONFIG_FB is not set
939 # CONFIG_DRM is not set
940 # CONFIG_WATCHDOG is not set
941 # CONFIG_INPUT_JOYSTICK is not set
942 # CONFIG_DEBUG_KERNEL is not set
943 # CONFIG_ISDN is not set
944 # CONFIG_AGP is not set
945 # CONFIG_SECURITY is not set
946 # CONFIG_PARIDE is not set
947 # CONFIG_CPU_FREQ is not set
948 # CONFIG_GAMEPORT is not set
949 # CONFIG_KVM is not set
950 # CONFIG_PHONE is not set
dd55897d 951 # CONFIG_STRICT_DEVMEM is not set
6bab3a31 952 # CONFIG_IMA is not set
351f379b 953 CONFIG_AUFS=y
a899ef35 954 CONFIG_AUFS_FS=y
955 CONFIG_AUFS_BR_RAMFS=y
62fff140 956 CONFIG_AUFS_RDU=y
351f379b
JR
957 CONFIG_BLK_DEV_LOOP=y
958 CONFIG_ISO9660_FS=y
959 CONFIG_NLS_UTF8=y
960EOCONFIG
961
962 return 0
963}
a5585a68 964
351f379b
JR
965BuildConfig() {
966 %{?debug:set -x}
967 set -e
a5585a68 968
351f379b
JR
969 Config="kernel-%{target_arch_dir}.config"
970 echo >&2 "Building config file for %{_target_cpu} using $Config et al."
a5585a68 971
351f379b
JR
972 # prepare local and important options
973 cat <<-EOCONFIG > important.config
974 LOCALVERSION="-%{localversion}"
fb4e3822 975
351f379b
JR
976%if 0%{?debug:1}
977 CONFIG_DEBUG_SLAB=y
978 CONFIG_DEBUG_SLAB_LEAK=y
979 CONFIG_DEBUG_PREEMPT=y
980 CONFIG_RT_DEADLOCK_DETECT=y
a5585a68 981%endif
351f379b 982
351f379b
JR
983# apparmor, will be moved to external file if works
984%if %{with apparmor}
985 CONFIG_SECURITY_APPARMOR=y
986 CONFIG_SECURITY_APPARMOR_BOOTPARAM_VALUE=1
987 CONFIG_SECURITY_APPARMOR_DISABLE=n
4f0a2212 988 CONFIG_SECURITY_APPARMOR_NETWORK=y
ceaf2cfb
AM
989 CONFIG_SECURITY_APPARMOR_COMPAT_24=y
990 CONFIG_DEFAULT_SECURITY_APPARMOR=n
351f379b 991%endif
a5585a68 992
351f379b
JR
993%if %{without ipv6}
994 CONFIG_IPV6=n
995%endif
a5585a68 996
351f379b
JR
997%ifarch i686 athlon pentium3 pentium4
998 %if %{with pae}
999 CONFIG_HIGHMEM4G=n
1000 CONFIG_HIGHMEM64G=y
1001 CONFIG_X86_PAE=y
7c99a84b 1002 CONFIG_NUMA=n
351f379b
JR
1003 %endif
1004%endif
a5585a68 1005
351f379b
JR
1006%if %{without pcmcia}
1007 CONFIG_PCMCIA=n
1008%endif
a5585a68 1009
351f379b
JR
1010%if %{with fbcondecor}
1011 CONFIG_FB_S3=n
1012 CONFIG_FB_VT8623=n
1013 CONFIG_FB_ARK=n
1014 CONFIG_FB_TILEBLITTING=n
1015 CONFIG_FB_CON_DECOR=y
1016%endif
a5585a68 1017
351f379b
JR
1018%if %{with nfsroot}
1019 CONFIG_NFS_FS=y
1020 CONFIG_ROOT_NFS=y
1021%endif
a5585a68 1022
351f379b
JR
1023# Temporary disabled RELOCATABLE. Needed only on x86??
1024%if %{with pax} || %{with grsec_full}
1025 CONFIG_RELOCATABLE=n
1026%endif
1027EOCONFIG
a5585a68 1028
351f379b
JR
1029%if %{with rescuecd}
1030 RescueConfig rescue.config
1031%endif
17da405a 1032%if %{with pax}
351f379b
JR
1033 PaXconfig pax.config
1034%endif
a5585a68 1035
351f379b
JR
1036 # prepare kernel-style config file from multiple config files
1037 %{__awk} -v arch="all %{target_arch_dir} %{_target_base_arch} %{_target_cpu}" -f %{SOURCE6} \
101ae904 1038%if %{with myown}
1039 $RPM_SOURCE_DIR/kernel-%{alt_kernel}.config \
1040%endif
351f379b
JR
1041 important.config \
1042%if %{with rescuecd}
1043 %{SOURCE58} \
1044 %{SOURCE59} \
1045 rescue.config \
1046%endif
1047 \
17da405a 1048%if %{with pax}
351f379b
JR
1049 %{SOURCE45} \
1050 %{SOURCE49} \
1051 pax.config \
1052%else
1053 %if %{with grsec_full}
1054 %{SOURCE45} \
1055 %{SOURCE50} \
1056 %else
1057 %if %{with grsec_minimal}
1058 %{SOURCE51} \
1059 %endif
1060 %endif
351f379b
JR
1061%endif
1062 \
1063%if %{with reiser4}
1064 %{SOURCE56} \
1065%endif
1066%if %{with wrr}
1067 %{SOURCE57} \
1068%endif
1069%if %{with imq}
1070 %{SOURCE55} \
1071%endif
1072%if %{with vserver}
1073 %{SOURCE43} \
1074%endif
1075%if %{with tuxonice}
1076%ifarch %{ix86} %{x8664} ia64 ppc ppc64
1077 %{SOURCE42} \
1078%endif
351f379b
JR
1079%endif
1080 %{SOURCE40} %{?0:netfilter} \
1081 %{SOURCE41} %{?0:patches} \
1082 %{SOURCE20} \
1083 $RPM_SOURCE_DIR/$Config
1084}
a5585a68 1085
351f379b
JR
1086cd %{objdir}
1087install -d arch/%{target_arch_dir}
351f379b 1088BuildConfig > %{defconfig}
351f379b
JR
1089ln -sf %{defconfig} .config
1090cd -
a5585a68 1091
7856c5e8
AM
1092%{__make} \
1093 TARGETOBJ=%{targetobj} \
1094 %{?with_verbose:V=1} \
1095 oldconfig
a5585a68 1096
351f379b 1097%{__awk} %{?debug:-v dieOnError=1} -v infile=%{objdir}/%{defconfig} -f %{SOURCE8} %{objdir}/.config
a5585a68 1098
351f379b 1099# build kernel
7856c5e8
AM
1100%{__make} \
1101 TARGETOBJ=%{targetobj} \
1102 %{?with_verbose:V=1} \
1103 all
a5585a68 1104
351f379b
JR
1105%install
1106rm -rf $RPM_BUILD_ROOT
1107%{__make} %{MakeOpts} %{!?with_verbose:-s} modules_install firmware_install \
1108 -C %{objdir} \
1109 %{?with_verbose:V=1} \
1110 DEPMOD=%{DepMod} \
1111 INSTALL_MOD_PATH=$RPM_BUILD_ROOT \
1112 INSTALL_FW_PATH=$RPM_BUILD_ROOT/lib/firmware/%{kernel_release} \
1113 KERNELRELEASE=%{kernel_release}
1114
1115install -d $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/misc
1116
101ae904 1117# create directories which may be missing, to simplyfy %files
64d14572 1118install -d $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/kernel/{arch,sound,mm}
101ae904 1119
351f379b
JR
1120# rpm obeys filelinkto checks for ghosted symlinks, convert to files
1121rm -f $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/{build,source}
1122touch $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/{build,source}
1123
6d54bd67
ER
1124# no point embed content for %ghost files. empty them
1125for a in \
1126 dep{,.bin} \
1127 alias{,.bin} \
1128 symbols{,.bin} \
1129 {pci,usb,ccw,isapnp,input,ieee1394,serio,of}map \
1130; do
09e63f4a 1131 test -f $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/modules.$a
6d54bd67
ER
1132 > $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/modules.$a
1133done
1134
351f379b
JR
1135# /boot
1136install -d $RPM_BUILD_ROOT/boot
1137cp -a %{objdir}/System.map $RPM_BUILD_ROOT/boot/System.map-%{kernel_release}
1138%ifarch %{ix86} %{x8664}
1db9a2c1
ER
1139 cp -a %{objdir}/arch/%{target_arch_dir}/boot/bzImage $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release}
1140 install -p %{objdir}/vmlinux $RPM_BUILD_ROOT/boot/vmlinux-%{kernel_release}
351f379b
JR
1141%endif
1142%ifarch ppc ppc64
1db9a2c1
ER
1143 install -p %{objdir}/vmlinux $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release}
1144 install -p %{objdir}/vmlinux $RPM_BUILD_ROOT/boot/vmlinux-%{kernel_release}
a5585a68 1145%endif
a5585a68 1146%ifarch ia64
1db9a2c1
ER
1147 %{__gzip} -cfv %{objdir}/vmlinux > %{objdir}/vmlinuz
1148 cp -a %{objdir}/vmlinuz $RPM_BUILD_ROOT/boot/efi/vmlinuz-%{kernel_release}
1149 ln -sf efi/vmlinuz-%{kernel_release} $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release}
351f379b
JR
1150%endif
1151%ifarch alpha sparc sparc64
1152 %{__gzip} -cfv %{objdir}/vmlinux > %{objdir}/vmlinuz
1153 cp -a %{objdir}/vmlinuz $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release}
1db9a2c1
ER
1154 install -p %{objdir}/vmlinux $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release}
1155 %ifarch sparc
1156 elftoaout %{objdir}/arch/sparc/boot/image -o %{objdir}/vmlinux.aout
1157 install -p %{objdir}/vmlinux.aout $RPM_BUILD_ROOT/boot/vmlinux.aout-%{kernel_release}
1158 %endif
1159 %ifarch sparc64
1160 elftoaout %{objdir}/arch/sparc64/boot/image -o %{objdir}/vmlinux.aout
1161 install -p %{objdir}/vmlinux.aout $RPM_BUILD_ROOT/boot/vmlinux.aout-%{kernel_release}
1162 %endif
351f379b
JR
1163%endif
1164%ifarch arm
1db9a2c1 1165 install -p %{objdir}/arch/arm/boot/zImage $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release}
a5585a68 1166%endif
a5585a68 1167
351f379b
JR
1168# ghosted initrd
1169touch $RPM_BUILD_ROOT%{initrd_dir}/initrd-%{kernel_release}.gz
a5585a68 1170
351f379b
JR
1171%if "%{_target_base_arch}" != "%{_arch}"
1172touch $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/modules.dep
1173%endif
a5585a68 1174
351f379b
JR
1175# /etc/modrobe.d
1176install -d $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/%{kernel_release}
a5585a68 1177
351f379b 1178# /usr/src/linux
11b2646e 1179install -d $RPM_BUILD_ROOT%{_kernelsrcdir}/include/generated
351f379b
JR
1180# test if we can hardlink -- %{_builddir} and $RPM_BUILD_ROOT on same partition
1181if cp -al %{srcdir}/COPYING $RPM_BUILD_ROOT/COPYING 2>/dev/null; then
1182 l=l
1183 rm -f $RPM_BUILD_ROOT/COPYING
a5585a68 1184fi
a5585a68 1185
351f379b
JR
1186cp -a$l %{srcdir}/* $RPM_BUILD_ROOT%{_kernelsrcdir}
1187cp -a %{objdir}/Module.symvers $RPM_BUILD_ROOT%{_kernelsrcdir}/Module.symvers-dist
1188cp -aL %{objdir}/.config $RPM_BUILD_ROOT%{_kernelsrcdir}/config-dist
11b2646e
AM
1189cp -a %{objdir}/include/generated/autoconf.h $RPM_BUILD_ROOT%{_kernelsrcdir}/include/generated/autoconf-dist.h
1190cp -a %{objdir}/include/generated/utsrelease.h $RPM_BUILD_ROOT%{_kernelsrcdir}/include/generated
1191cp -a %{objdir}/include/linux/version.h $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux
1192cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_kernelsrcdir}/include/generated/autoconf.h
351f379b
JR
1193cp -a %{SOURCE4} $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux/config.h
1194
1195# collect module-build files and directories
1196# Usage: kernel-module-build.pl $rpmdir $fileoutdir
1197fileoutdir=$(pwd)
1198cd $RPM_BUILD_ROOT%{_kernelsrcdir}
1199%{__perl} %{topdir}/kernel-module-build.pl %{_kernelsrcdir} $fileoutdir
1200cd -
1201
30f08736
ER
1202# move to %{_docdir} so we wouldn't depend on any kernel package for dirs
1203install -d $RPM_BUILD_ROOT%{_docdir}
1204mv $RPM_BUILD_ROOT{%{_kernelsrcdir}/Documentation,%{_docdir}/%{name}-%{version}}
1205
d3a69071
ER
1206rm -f $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/dontdiff
1207rm -f $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/Makefile
1208rm -f $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/*/Makefile
1209rm -f $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/*/*/Makefile
1210
351f379b
JR
1211%clean
1212rm -rf $RPM_BUILD_ROOT
1213
1214%preun
1215if [ -x /sbin/new-kernel-pkg ]; then
1216 /sbin/new-kernel-pkg --remove %{kernel_release}
a5585a68 1217fi
351f379b
JR
1218
1219%post
1220%ifarch ia64
1221mv -f /boot/efi/vmlinuz{,.old} 2> /dev/null
1222%{?alt_kernel:mv -f /boot/efi/vmlinuz%{_alt_kernel}{,.old} 2> /dev/null}
1223ln -sf vmlinuz-%{kernel_release} /boot/efi/vmlinuz
1224%{?alt_kernel:ln -sf vmlinuz-%{kernel_release} /boot/efi/vmlinuz%{_alt_kernel}}
1225%endif
1226mv -f /boot/vmlinuz{,.old} 2> /dev/null
1227%{?alt_kernel:mv -f /boot/vmlinuz%{_alt_kernel}{,.old} 2> /dev/null}
1228mv -f /boot/System.map{,.old} 2> /dev/null
1229%{?alt_kernel:mv -f /boot/System%{_alt_kernel}.map{,.old} 2> /dev/null}
1230ln -sf vmlinuz-%{kernel_release} /boot/vmlinuz
1231%{?alt_kernel:ln -sf vmlinuz-%{kernel_release} /boot/vmlinuz%{_alt_kernel}}
1232ln -sf System.map-%{kernel_release} /boot/System.map
1233%{?alt_kernel:ln -sf System.map-%{kernel_release} /boot/System.map%{_alt_kernel}}
1234
1235%depmod %{kernel_release}
1236
4dabe329
ER
1237%posttrans
1238# generate initrd after all dependant modules are installed
351f379b
JR
1239/sbin/geninitrd -f --initrdfs=rom %{initrd_dir}/initrd-%{kernel_release}.gz %{kernel_release}
1240mv -f %{initrd_dir}/initrd{,.old} 2> /dev/null
1241%{?alt_kernel:mv -f %{initrd_dir}/initrd%{_alt_kernel}{,.old} 2> /dev/null}
1242ln -sf initrd-%{kernel_release}.gz %{initrd_dir}/initrd
1243%{?alt_kernel:ln -sf initrd-%{kernel_release}.gz %{initrd_dir}/initrd%{_alt_kernel}}
1244
4dabe329 1245# update boot loaders when old package files are gone from filesystem
c5de1ad5 1246if [ -x /sbin/update-grub -a -f /etc/sysconfig/grub ]; then
4dabe329
ER
1247 if [ "$(. /etc/sysconfig/grub; echo ${UPDATE_GRUB:-no})" = "yes" ]; then
1248 /sbin/update-grub >/dev/null
c5de1ad5
ER
1249 fi
1250fi
351f379b
JR
1251if [ -x /sbin/new-kernel-pkg ]; then
1252 /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
1253fi
1254if [ -x /sbin/rc-boot ]; then
351f379b 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
351f379b
JR
1264%post drm
1265%depmod %{kernel_release}
a5585a68 1266
351f379b
JR
1267%postun drm
1268%depmod %{kernel_release}
a5585a68 1269
351f379b
JR
1270%post pcmcia
1271%depmod %{kernel_release}
a5585a68 1272
351f379b
JR
1273%postun pcmcia
1274%depmod %{kernel_release}
a5585a68 1275
351f379b
JR
1276%post sound-alsa
1277%depmod %{kernel_release}
a5585a68 1278
351f379b
JR
1279%postun sound-alsa
1280%depmod %{kernel_release}
a5585a68 1281
351f379b
JR
1282%post sound-oss
1283%depmod %{kernel_release}
a5585a68 1284
351f379b
JR
1285%postun sound-oss
1286%depmod %{kernel_release}
a5585a68
AM
1287
1288%post headers
351f379b 1289ln -snf %{basename:%{_kernelsrcdir}} %{_prefix}/src/linux%{_alt_kernel}
a5585a68
AM
1290
1291%postun headers
351f379b
JR
1292if [ "$1" = "0" ]; then
1293 if [ -L %{_prefix}/src/linux%{_alt_kernel} ]; then
1294 if [ "$(readlink %{_prefix}/src/linux%{_alt_kernel})" = "linux%{_alt_kernel}-%{version}" ]; then
1295 rm -f %{_prefix}/src/linux%{_alt_kernel}
a5585a68
AM
1296 fi
1297 fi
1298fi
1299
351f379b
JR
1300%triggerin module-build -- %{name} = %{epoch}:%{version}-%{release}
1301ln -sfn %{_kernelsrcdir} /lib/modules/%{kernel_release}/build
1302ln -sfn %{_kernelsrcdir} /lib/modules/%{kernel_release}/source
1303
1304%triggerun module-build -- %{name} = %{epoch}:%{version}-%{release}
1305if [ "$1" = 0 ]; then
1306 rm -f /lib/modules/%{kernel_release}/{build,source}
1307fi
1308
a5585a68
AM
1309%files
1310%defattr(644,root,root,755)
a5585a68 1311%ifarch sparc sparc64
351f379b 1312/boot/vmlinux.aout-%{kernel_release}
a5585a68
AM
1313%endif
1314%ifarch ia64
351f379b
JR
1315/boot/efi/vmlinuz-%{kernel_release}
1316%endif
1317/boot/vmlinuz-%{kernel_release}
1318/boot/System.map-%{kernel_release}
1319%ghost %{initrd_dir}/initrd-%{kernel_release}.gz
ae1c66e5 1320/lib/firmware/%{kernel_release}
351f379b
JR
1321
1322%dir /lib/modules/%{kernel_release}
1323%dir /lib/modules/%{kernel_release}/kernel
351f379b 1324/lib/modules/%{kernel_release}/kernel/arch
351f379b
JR
1325/lib/modules/%{kernel_release}/kernel/crypto
1326/lib/modules/%{kernel_release}/kernel/drivers
101ae904 1327%if %{have_drm}
351f379b
JR
1328%exclude /lib/modules/%{kernel_release}/kernel/drivers/gpu
1329%endif
1330/lib/modules/%{kernel_release}/kernel/fs
351f379b 1331/lib/modules/%{kernel_release}/kernel/kernel
351f379b
JR
1332/lib/modules/%{kernel_release}/kernel/lib
1333/lib/modules/%{kernel_release}/kernel/net
fecce547 1334/lib/modules/%{kernel_release}/kernel/mm
101ae904 1335%if %{have_sound}
351f379b
JR
1336%dir /lib/modules/%{kernel_release}/kernel/sound
1337/lib/modules/%{kernel_release}/kernel/sound/ac97_bus.ko*
1338/lib/modules/%{kernel_release}/kernel/sound/sound*.ko*
1339%ifnarch sparc
1340%exclude /lib/modules/%{kernel_release}/kernel/drivers/media/video/cx88/cx88-alsa.ko*
1341%exclude /lib/modules/%{kernel_release}/kernel/drivers/media/video/em28xx/em28xx-alsa.ko*
1342%exclude /lib/modules/%{kernel_release}/kernel/drivers/media/video/saa7134/saa7134-alsa.ko*
1343%endif
1344%endif
1345%dir /lib/modules/%{kernel_release}/misc
101ae904 1346%if %{have_pcmcia}
351f379b
JR
1347%exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/[!p]*
1348%exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/pd6729.ko*
1349%exclude /lib/modules/%{kernel_release}/kernel/drivers/*/pcmcia
1350%if %{without rescuecd}
1351%exclude /lib/modules/%{kernel_release}/kernel/drivers/ata/pata_pcmcia.ko*
1352%exclude /lib/modules/%{kernel_release}/kernel/drivers/bluetooth/*_cs.ko*
1353%exclude /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/avm_cs.ko*
1354%exclude /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/b1pcmcia.ko*
1355%exclude /lib/modules/%{kernel_release}/kernel/drivers/telephony/ixj_pcmcia.ko*
1356%exclude /lib/modules/%{kernel_release}/kernel/drivers/usb/gadget/g_midi.ko*
1357%endif
1358%exclude /lib/modules/%{kernel_release}/kernel/drivers/ide/ide-cs.ko*
1359%exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/*_cs.ko*
1360%exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/b43
1361%exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/hostap/hostap_cs.ko*
1362%exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/libertas/*_cs.ko*
1363%exclude /lib/modules/%{kernel_release}/kernel/drivers/parport/parport_cs.ko*
1364%exclude /lib/modules/%{kernel_release}/kernel/drivers/serial/serial_cs.ko*
1365%exclude /lib/modules/%{kernel_release}/kernel/drivers/usb/host/sl811_cs.ko*
1366%endif
101ae904 1367%if %{with myown}
1368/lib/modules/%{kernel_release}/kernel/sound
1369%endif
6d54bd67
ER
1370
1371%dir %{_sysconfdir}/modprobe.d/%{kernel_release}
1372
1373# provided by build
1374/lib/modules/%{kernel_release}/modules.order
5ebe7534 1375/lib/modules/%{kernel_release}/modules.builtin
6d54bd67
ER
1376
1377# rest modules.* are ghost (regenerated by post depmod -a invocation)
1378%ghost /lib/modules/%{kernel_release}/modules.alias
1379%ghost /lib/modules/%{kernel_release}/modules.alias.bin
1380%ghost /lib/modules/%{kernel_release}/modules.ccwmap
1381%ghost /lib/modules/%{kernel_release}/modules.dep
1382%ghost /lib/modules/%{kernel_release}/modules.dep.bin
1383%ghost /lib/modules/%{kernel_release}/modules.ieee1394map
1384%ghost /lib/modules/%{kernel_release}/modules.inputmap
1385%ghost /lib/modules/%{kernel_release}/modules.isapnpmap
1386%ghost /lib/modules/%{kernel_release}/modules.ofmap
1387%ghost /lib/modules/%{kernel_release}/modules.pcimap
1388%ghost /lib/modules/%{kernel_release}/modules.seriomap
1389%ghost /lib/modules/%{kernel_release}/modules.symbols
1390%ghost /lib/modules/%{kernel_release}/modules.symbols.bin
1391%ghost /lib/modules/%{kernel_release}/modules.usbmap
1392
351f379b
JR
1393# symlinks pointing to kernelsrcdir
1394%ghost /lib/modules/%{kernel_release}/build
1395%ghost /lib/modules/%{kernel_release}/source
351f379b 1396
351f379b
JR
1397%ifarch alpha %{ix86} %{x8664} ppc ppc64 sparc sparc64
1398%files vmlinux
a5585a68 1399%defattr(644,root,root,755)
351f379b 1400/boot/vmlinux-%{kernel_release}
a5585a68
AM
1401%endif
1402
101ae904 1403%if %{have_drm}
351f379b 1404%files drm
a5585a68 1405%defattr(644,root,root,755)
351f379b 1406/lib/modules/%{kernel_release}/kernel/drivers/gpu
a5585a68
AM
1407%endif
1408
101ae904 1409%if %{have_pcmcia}
351f379b 1410%files pcmcia
a5585a68 1411%defattr(644,root,root,755)
351f379b
JR
1412/lib/modules/%{kernel_release}/kernel/drivers/pcmcia/*ko*
1413/lib/modules/%{kernel_release}/kernel/drivers/*/pcmcia
1414%exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/pcmcia*ko*
1415%if %{without rescuecd}
1416/lib/modules/%{kernel_release}/kernel/drivers/bluetooth/*_cs.ko*
1417/lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/avm_cs.ko*
1418/lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/b1pcmcia.ko*
1419/lib/modules/%{kernel_release}/kernel/drivers/telephony/ixj_pcmcia.ko*
1420%endif
1421/lib/modules/%{kernel_release}/kernel/drivers/ata/pata_pcmcia.ko*
1422/lib/modules/%{kernel_release}/kernel/drivers/ide/ide-cs.ko*
1423/lib/modules/%{kernel_release}/kernel/drivers/net/wireless/*_cs.ko*
1424/lib/modules/%{kernel_release}/kernel/drivers/net/wireless/b43
1425/lib/modules/%{kernel_release}/kernel/drivers/net/wireless/hostap/hostap_cs.ko*
1426/lib/modules/%{kernel_release}/kernel/drivers/net/wireless/libertas/*_cs.ko*
1427/lib/modules/%{kernel_release}/kernel/drivers/parport/parport_cs.ko*
1428/lib/modules/%{kernel_release}/kernel/drivers/serial/serial_cs.ko*
1429/lib/modules/%{kernel_release}/kernel/drivers/usb/host/sl811_cs.ko*
1430%endif
1431
101ae904 1432%if %{have_sound}
351f379b 1433%files sound-alsa
a5585a68 1434%defattr(644,root,root,755)
351f379b
JR
1435/lib/modules/%{kernel_release}/kernel/sound
1436%exclude %dir /lib/modules/%{kernel_release}/kernel/sound
1437%exclude /lib/modules/%{kernel_release}/kernel/sound/ac97_bus.ko*
1438%exclude /lib/modules/%{kernel_release}/kernel/sound/sound*.ko*
1439%if %{have_oss}
1440%exclude /lib/modules/%{kernel_release}/kernel/sound/oss
a5585a68 1441%endif
351f379b
JR
1442%ifnarch sparc
1443/lib/modules/%{kernel_release}/kernel/drivers/usb/gadget/g_midi.ko*
1444/lib/modules/%{kernel_release}/kernel/drivers/media/video/cx88/cx88-alsa.ko*
1445/lib/modules/%{kernel_release}/kernel/drivers/media/video/em28xx/em28xx-alsa.ko*
1446/lib/modules/%{kernel_release}/kernel/drivers/media/video/saa7134/saa7134-alsa.ko*
a5585a68
AM
1447%endif
1448
101ae904 1449%if %{have_oss}
351f379b 1450%files sound-oss
a5585a68 1451%defattr(644,root,root,755)
351f379b 1452/lib/modules/%{kernel_release}/kernel/sound/oss
a5585a68 1453%endif
a5585a68
AM
1454%endif
1455
fecce547 1456%files headers -f files.headers_exclude_kbuild
a5585a68 1457%defattr(644,root,root,755)
30f08736 1458%dir %{_kernelsrcdir}
351f379b
JR
1459%{_kernelsrcdir}/include
1460%dir %{_kernelsrcdir}/arch
1461%dir %{_kernelsrcdir}/arch/[!K]*
1462%{_kernelsrcdir}/arch/*/include
1463%dir %{_kernelsrcdir}/security
1464%dir %{_kernelsrcdir}/security/selinux
1465%{_kernelsrcdir}/security/selinux/include
1466%{_kernelsrcdir}/config-dist
1467%{_kernelsrcdir}/Module.symvers-dist
1468
fecce547 1469%files module-build -f files.mb_include_modulebuild_and_dirs
a5585a68 1470%defattr(644,root,root,755)
351f379b
JR
1471%ifarch ppc ppc64
1472%{_kernelsrcdir}/arch/powerpc/lib/crtsavres.*
1473%endif
fecce547 1474%exclude %dir %{_kernelsrcdir}/arch/m68knommu
1475%exclude %dir %{_kernelsrcdir}/arch/um
351f379b
JR
1476%{_kernelsrcdir}/arch/*/kernel/asm-offsets*
1477%{_kernelsrcdir}/arch/*/kernel/sigframe*.h
1478%{_kernelsrcdir}/drivers/lguest/lg.h
1479%{_kernelsrcdir}/kernel/bounds.c
1480%dir %{_kernelsrcdir}/scripts
351f379b
JR
1481%{_kernelsrcdir}/scripts/Kbuild.include
1482%{_kernelsrcdir}/scripts/Makefile*
1483%{_kernelsrcdir}/scripts/basic
960d2e94 1484%{_kernelsrcdir}/scripts/kconfig
1485%{_kernelsrcdir}/scripts/mkcompile_h
351f379b
JR
1486%{_kernelsrcdir}/scripts/mkmakefile
1487%{_kernelsrcdir}/scripts/mod
960d2e94 1488%{_kernelsrcdir}/scripts/module-common.lds
351f379b
JR
1489%{_kernelsrcdir}/scripts/setlocalversion
1490%{_kernelsrcdir}/scripts/*.c
1491%{_kernelsrcdir}/scripts/*.sh
351f379b
JR
1492%dir %{_kernelsrcdir}/scripts/selinux
1493%{_kernelsrcdir}/scripts/selinux/Makefile
9d6d5869
AM
1494%dir %{_kernelsrcdir}/scripts/selinux/genheaders
1495%{_kernelsrcdir}/scripts/selinux/genheaders/Makefile
1496%{_kernelsrcdir}/scripts/selinux/genheaders/*.c
c78e408d
PZ
1497%dir %{_kernelsrcdir}/scripts/selinux/mdp
1498%{_kernelsrcdir}/scripts/selinux/mdp/Makefile
1499%{_kernelsrcdir}/scripts/selinux/mdp/*.c
fecce547 1500%exclude %dir %{_kernelsrcdir}/security
1501%exclude %dir %{_kernelsrcdir}/security/selinux
a5585a68 1502
1848fd38 1503%if %{with doc}
a5585a68
AM
1504%files doc
1505%defattr(644,root,root,755)
d3a69071
ER
1506%dir %{_docdir}/%{name}-%{version}
1507
1508%{_docdir}/%{name}-%{version}/[!jkz]*
1509%{_docdir}/%{name}-%{version}/[jkz]*.txt
1510%{_docdir}/%{name}-%{version}/kbuild
1511%{_docdir}/%{name}-%{version}/kdump
2ddc4ac9 1512%{_docdir}/%{name}-%{version}/kvm
d3a69071
ER
1513%lang(ja) %{_docdir}/%{name}-%{version}/ja_JP
1514%lang(ko) %{_docdir}/%{name}-%{version}/ko_KR
1515%lang(zh_CN) %{_docdir}/%{name}-%{version}/zh_CN
1848fd38 1516%endif
a5585a68
AM
1517
1518%if %{with source}
fecce547 1519%files source -f files.source_exclude_modulebuild_and_dirs
a5585a68 1520%defattr(644,root,root,755)
351f379b
JR
1521%{_kernelsrcdir}/arch/*/[!Mik]*
1522%{_kernelsrcdir}/arch/*/kernel/[!M]*
351f379b
JR
1523%{_kernelsrcdir}/arch/ia64/install.sh
1524%{_kernelsrcdir}/arch/m68k/ifpsp060/[!M]*
1525%{_kernelsrcdir}/arch/m68k/ifpsp060/MISC
fecce547 1526%{_kernelsrcdir}/arch/m68k/install.sh
351f379b
JR
1527%{_kernelsrcdir}/arch/parisc/install.sh
1528%{_kernelsrcdir}/arch/x86/ia32/[!M]*
1529%{_kernelsrcdir}/arch/ia64/kvm
1530%{_kernelsrcdir}/arch/powerpc/kvm
1531%ifarch ppc ppc64
1532%exclude %{_kernelsrcdir}/arch/powerpc/lib/crtsavres.*
1533%endif
1534%{_kernelsrcdir}/arch/s390/kvm
1535%{_kernelsrcdir}/arch/x86/kvm
1536%exclude %{_kernelsrcdir}/arch/*/kernel/asm-offsets*
1537%exclude %{_kernelsrcdir}/arch/*/kernel/sigframe*.h
1538%exclude %{_kernelsrcdir}/drivers/lguest/lg.h
1539%{_kernelsrcdir}/block
1540%{_kernelsrcdir}/crypto
1541%{_kernelsrcdir}/drivers
1542%{_kernelsrcdir}/firmware
1543%{_kernelsrcdir}/fs
1544%if %{with grsecurity} && %{without rescuecd}
1545%{_kernelsrcdir}/grsecurity
1546%endif
1547%{_kernelsrcdir}/init
1548%{_kernelsrcdir}/ipc
1549%{_kernelsrcdir}/kernel
1550%exclude %{_kernelsrcdir}/kernel/bounds.c
1551%{_kernelsrcdir}/lib
1552%{_kernelsrcdir}/mm
1553%{_kernelsrcdir}/net
1554%{_kernelsrcdir}/virt
1555%{_kernelsrcdir}/samples
1556%{_kernelsrcdir}/scripts/*
1557%exclude %{_kernelsrcdir}/scripts/Kbuild.include
1558%exclude %{_kernelsrcdir}/scripts/Makefile*
1559%exclude %{_kernelsrcdir}/scripts/basic
1560%exclude %{_kernelsrcdir}/scripts/kconfig
960d2e94 1561%exclude %{_kernelsrcdir}/scripts/mkcompile_h
351f379b
JR
1562%exclude %{_kernelsrcdir}/scripts/mkmakefile
1563%exclude %{_kernelsrcdir}/scripts/mod
960d2e94 1564%exclude %{_kernelsrcdir}/scripts/module-common.lds
351f379b
JR
1565%exclude %{_kernelsrcdir}/scripts/setlocalversion
1566%exclude %{_kernelsrcdir}/scripts/*.c
1567%exclude %{_kernelsrcdir}/scripts/*.sh
960d2e94 1568%exclude %dir %{_kernelsrcdir}/scripts/selinux
1569%exclude %{_kernelsrcdir}/scripts/selinux/Makefile
c78e408d
PZ
1570%exclude %dir %{_kernelsrcdir}/scripts/selinux/genheaders
1571%exclude %{_kernelsrcdir}/scripts/selinux/genheaders/Makefile
1572%exclude %{_kernelsrcdir}/scripts/selinux/genheaders/*.c
960d2e94 1573%exclude %dir %{_kernelsrcdir}/scripts/selinux/mdp
1574%exclude %{_kernelsrcdir}/scripts/selinux/mdp/Makefile
1575%exclude %{_kernelsrcdir}/scripts/selinux/mdp/*.c
351f379b
JR
1576%{_kernelsrcdir}/sound
1577%{_kernelsrcdir}/security
1578%exclude %{_kernelsrcdir}/security/selinux/include
fecce547 1579%{_kernelsrcdir}/tools
351f379b
JR
1580%{_kernelsrcdir}/usr
1581%{_kernelsrcdir}/COPYING
1582%{_kernelsrcdir}/CREDITS
1583%{_kernelsrcdir}/MAINTAINERS
1584%{_kernelsrcdir}/README
1585%{_kernelsrcdir}/REPORTING-BUGS
a5585a68 1586%endif
This page took 0.575508 seconds and 4 git commands to generate.