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