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