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