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