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