]>
Commit | Line | Data |
---|---|---|
9b3bab6e | 1 | # |
2a261cfb | 2 | # STATUS: 2.6.25 works, needs testing |
c00d3452 | 3 | # |
4 | # NOTE: | |
5 | # - suspend2 renamed to tuxonice (as project name) | |
347a6801 | 6 | # |
3734e33d | 7 | # TODO: |
c3ea9043 | 8 | # - benchmark NO_HZ & HZ=1000 vs HZ=300 on i686 |
b02a74a2 | 9 | # - apparmor (needs testing) |
32f36d00 | 10 | # |
347a6801 | 11 | # FUTURE: |
8dee06f0 | 12 | # - update xen patch |
2c421faa | 13 | # - pom-ng quake3-conntrack-nat -> nf_conntrack ? |
2c421faa | 14 | # - pom-ng talk-conntrack-nat -> nf_conntrack ? |
15 | # - nf-hipac ? | |
16 | # - pax hooks for selinux (experimental) | |
c800013b | 17 | # |
ade3916a | 18 | # Conditional build: |
25204d32 | 19 | %bcond_without source # don't build kernel-source package |
f8f3b973 | 20 | %bcond_without pcmcia # don't build pcmcia |
2245b68b | 21 | |
25204d32 | 22 | %bcond_with verbose # verbose build (V=1) |
de0d7ee0 | 23 | %bcond_with xen0 # added Xen0 support |
24 | %bcond_with xenU # added XenU support | |
2c421faa | 25 | %bcond_without reiser4 # support for reiser4 fs (experimental) |
ceb42b9b | 26 | |
2c421faa | 27 | %bcond_without grsecurity # don't build grsecurity nor pax at all |
dcc54002 | 28 | %bcond_without grsec_minimal # build only minimal subset (proc,link,fifo,shm) |
2c421faa | 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 | |
acbe79ff | 32 | |
04ea1d8c | 33 | %bcond_with fbcondecor # fbsplash/fbcondecor instead of bootsplash |
740dff65 JR |
34 | %bcond_with pae # build PAE (HIGHMEM64G) support on uniprocessor |
35 | %bcond_with nfsroot # build with root on NFS support | |
36 | ||
4234d9d3 | 37 | %bcond_without imq # imq support |
2c421faa | 38 | %bcond_without wrr # wrr support |
28713bdb | 39 | %bcond_without ipv6 # ipv6 support |
2c421faa | 40 | |
e28463de | 41 | %bcond_without vserver # support for VServer (enabled by default) |
edfcc0e8 | 42 | %bcond_without tuxonice # support for tuxonice (ex-suspend2) (enabled by default) |
438dc343 | 43 | %bcond_with vs22 # use vserver 2.2 instead of 2.3 (see comment near patch 102) |
b02a74a2 | 44 | %bcond_with apparmor # build kernel with apparmor (very exerimental mix) |
438dc343 | 45 | |
512e1dc7 | 46 | %bcond_with rescuecd # build kernel for our rescue |
47 | ||
2a261cfb | 48 | %bcond_with myown # build with your own config (kernel-myown.config) |
49 | ||
ade3916a | 50 | %{?debug:%define with_verbose 1} |
01ebb9c5 | 51 | |
60d1c35d | 52 | %if %{without grsecurity} |
dcc54002 JR |
53 | %undefine with_grsec_full |
54 | %undefine with_grsec_minimal | |
60d1c35d | 55 | %undefine with_pax |
2c421faa | 56 | %undefine with_pax_full |
dcc54002 JR |
57 | %endif |
58 | ||
2c421faa | 59 | %if %{with pax_full} |
dcc54002 | 60 | %undefine with_grsec_minimal |
2c421faa | 61 | %define with_grsec_full 1 |
8fb7cd9b | 62 | %define with_grsecurity 1 |
2c421faa | 63 | %define with_pax 1 |
dcc54002 JR |
64 | %endif |
65 | ||
60d1c35d | 66 | %if %{with grsec_full} |
67 | %undefine with_grsec_minimal | |
68 | %define with_grsecurity 1 | |
f8f172f4 | 69 | %if %{with pax} |
70 | %define with_pax_full 1 | |
f8f172f4 | 71 | %endif |
60d1c35d | 72 | %endif |
83830b16 | 73 | |
74 | %if %{with grsec_minimal} | |
dcc54002 | 75 | %undefine with_grsec_full |
2c421faa | 76 | %undefine with_pax_full |
8fb7cd9b | 77 | %define with_grsecurity 1 |
b7b28388 | 78 | %endif |
8adc256a | 79 | |
fbb03e0d JB |
80 | %define have_drm 1 |
81 | %define have_oss 1 | |
82 | %define have_sound 1 | |
83 | ||
512e1dc7 | 84 | %if %{with rescuecd} |
a52b9424 | 85 | %undefine with_tuxonice |
512e1dc7 | 86 | %undefine with_grsec_full |
a52b9424 | 87 | %undefine with_grsec_minimal |
512e1dc7 | 88 | %undefine with_pax |
89 | %undefine with_pax_full | |
a52b9424 | 90 | %undefine with_vserver |
512e1dc7 | 91 | %define have_drm 0 |
92 | %define have_sound 0 | |
93 | %endif | |
94 | ||
7291f0f8 JB |
95 | %ifarch %{ix86} alpha ppc |
96 | %define have_isa 1 | |
97 | %else | |
98 | %define have_isa 0 | |
99 | %endif | |
100 | ||
fbb03e0d JB |
101 | %ifarch sparc sparc64 |
102 | %undefine with_pcmcia | |
103 | %define have_drm 0 | |
104 | %define have_oss 0 | |
105 | %endif | |
106 | ||
2185d846 | 107 | %define _basever 2.6.25 |
0cc7a015 | 108 | %define _postver .7 |
2c421faa | 109 | %define _prepatch %{nil} |
110 | %define _pre_rc %{nil} | |
74fb0e3f | 111 | %define _rc %{nil} |
6a722a11 | 112 | %define _rel 1 |
c2921d44 | 113 | |
b620d240 | 114 | %define _enable_debug_packages 0 |
01ebb9c5 | 115 | |
befdc142 | 116 | %define squashfs_version 3.3 |
27dad056 | 117 | %define tuxonice_version 3.0-rc7 |
3f5783f6 | 118 | %define netfilter_snap 20070806 |
c5fcccf8 | 119 | %define xen_version 3.0.2 |
120 | ||
b5db8437 | 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} |
869e45ec | 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} | |
b8e032fa | 127 | %define kernel_release %{version}%{?_alt_kernel:%{_alt_kernel}}-%{_localversion} |
869e45ec | 128 | |
129 | # Our Kernel ABI, increase this when you want the out of source modules being rebuilt | |
130 | # Usually same as %{_rel} | |
117497e3 | 131 | %define KABI 2 |
869e45ec | 132 | |
601b4e87 | 133 | Summary: The Linux kernel (the core of the Linux operating system) |
2c421faa | 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 | |
869e45ec | 138 | Name: kernel%{_alt_kernel} |
2c421faa | 139 | |
140 | %if "%{_prepatch}" == "%{nil}" | |
38c14daa | 141 | Version: %{_basever}%{_postver} |
aaeacbf8 | 142 | Release: %{_rel} |
2c421faa | 143 | %else |
144 | Version: %{_prepatch} | |
145 | Release: 0.%{_pre_rc}.%{_rel} | |
146 | %endif | |
147 | ||
120b079f | 148 | Epoch: 3 |
1da2cf6b | 149 | License: GPL v2 |
601b4e87 | 150 | Group: Base/Kernel |
74fb0e3f | 151 | #Source0: ftp://ftp.kernel.org/pub/linux/kernel/v2.6/testing/linux-%{version}%{_rc}.tar.bz2 |
4d7ca79c | 152 | Source0: http://www.kernel.org/pub/linux/kernel/v2.6/linux-%{_basever}%{_rc}.tar.bz2 |
2185d846 | 153 | # Source0-md5: db95a49a656a3247d4995a797d333153 |
2c421faa | 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 | |
38c14daa | 158 | %if "%{_postver}" != "%{nil}" |
159 | Source1: http://www.kernel.org/pub/linux/kernel/v2.6/patch-%{version}.bz2 | |
0cc7a015 | 160 | # Source1-md5: 015b275011b48f716b3a6b072b18b471 |
38c14daa | 161 | %endif |
2c421faa | 162 | |
38c14daa | 163 | Source3: kernel-autoconf.h |
164 | Source4: kernel-config.h | |
1362b2d9 | 165 | Source5: kernel-ppclibs.Makefile |
fbf9d555 | 166 | Source6: kernel-config.py |
9d867cd0 | 167 | Source7: kernel-module-build.pl |
8a9df004 | 168 | |
e8c0537c | 169 | Source19: kernel-multiarch.config |
aaeacbf8 | 170 | Source20: kernel-i386.config |
2c421faa | 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 | ||
d04db8e4 | 179 | Source40: kernel-netfilter.config |
f0c5ac07 | 180 | Source41: kernel-squashfs.config |
e8c0537c | 181 | Source42: kernel-tuxonice.config |
36f2faae | 182 | Source43: kernel-vserver.config |
dcc54002 | 183 | Source45: kernel-grsec.config |
de0d7ee0 | 184 | Source46: kernel-xen0.config |
185 | Source47: kernel-xenU.config | |
f0c5ac07 | 186 | |
60d1c35d | 187 | Source49: kernel-pax.config |
188 | Source50: kernel-no-pax.config | |
2c421faa | 189 | Source51: kernel-grsec_minimal.config |
347a6801 | 190 | Source55: kernel-imq.config |
2c421faa | 191 | Source56: kernel-reiser4.config |
192 | Source57: kernel-wrr.config | |
edb27ca0 | 193 | |
512e1dc7 | 194 | Source58: kernel-inittmpfs.config |
edb27ca0 | 195 | Source59: kernel-bzip2-lzma.config |
60d1c35d | 196 | |
66d8ded9 | 197 | ### |
198 | # Patches | |
199 | ### | |
e43054fa | 200 | # tahoe9XX http://tahoe.pl/drivers/tahoe9xx-2.6.11.5.patch |
201 | Patch2: tahoe9xx-2.6.11.5.patch | |
202 | ||
3734e33d | 203 | # ftp://ftp.openbios.org/pub/bootsplash/kernel/bootsplash-3.1.6-2.6.21.diff.gz |
204 | Patch3: linux-2.6-bootsplash.patch | |
16a7bd96 | 205 | # http://dev.gentoo.org/~spock/projects/fbcondecor/archive/fbcondecor-0.9.4-2.6.25-rc6.patch |
04ea1d8c | 206 | Patch4: kernel-fbcondecor.patch |
bc31f1fe | 207 | |
4d7ca79c | 208 | # based on http://mesh.dl.sourceforge.net/sourceforge/squashfs/squashfs3.3.tgz |
befdc142 | 209 | # squashfs3.3/kernel-patches/linux-2.6.24/squashfs3.3-patch |
210 | Patch6: kernel-squashfs.patch | |
7e77e535 JR |
211 | Patch8: linux-fbcon-margins.patch |
212 | Patch9: linux-static-dev.patch | |
66d8ded9 | 213 | |
88f0e9ff | 214 | # netfilter related stuff mostly based on patch-o-matic-ng |
215 | # snapshot 20061213 with some fixes related to changes in | |
e28463de | 216 | # netfilter api in 2.6.19 up to 2.6.22. Some modules |
88f0e9ff | 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 | |
28713bdb | 222 | Patch14: kernel-pom-ng-ROUTE.patch |
88f0e9ff | 223 | Patch16: kernel-pom-ng-mms-conntrack-nat.patch |
f5fbd9ea | 224 | Patch22: kernel-pom-ng-rsh.patch |
253b8b20 | 225 | Patch23: kernel-pom-ng-rpc.patch |
88f0e9ff | 226 | |
78382233 | 227 | # based on http://mike.it-loops.com/rtsp/rtsp-2.6.24.patch |
228 | Patch36: kernel-nf_rtsp.patch | |
229 | ||
fcf7a306 | 230 | # http://ftp.linux-vserver.org/pub/people/dhozac/p/k/delta-owner-xid-feat02.diff |
231 | Patch37: kernel-owner-xid.patch | |
232 | ||
2cd49126 | 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 | ||
05219784 | 236 | # based on http://www.intra2net.com/de/produkte/opensource/ipt_account/pom-ng-ipt_ACCOUNT-1.12.tgz |
d5d1afcf | 237 | Patch39: kernel-ipt_ACCOUNT.patch |
238 | ||
9157d402 ER |
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 | |
88f0e9ff | 241 | Patch40: kernel-layer7.patch |
e28463de | 242 | |
2185d846 | 243 | # http://www.ssi.bg/~ja/nfct/ipvs-nfct-2.6.25-1.diff |
28713bdb | 244 | Patch41: kernel-ipvs-nfct.patch |
245 | ||
97013b4b | 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 | ||
88f0e9ff | 249 | ### End netfilter |
99bb556f | 250 | |
a60cb6c9 | 251 | # http://zph.bratcheda.org/linux-2.6.25-zph.patch |
252 | Patch49: kernel-zph.patch | |
253 | ||
befdc142 | 254 | # based on http://www.linuximq.net/patchs/linux-2.6.24-imq.diff |
c04b520b | 255 | # some people report problems when using imq with wrr. |
9a5f3f20 | 256 | # try unoficial version: http://kapturkiewicz.name/linux-2.6.25-imq1.diff |
c04b520b | 257 | Patch50: kernel-imq.patch |
4170601d | 258 | |
253c676a | 259 | # previously based on ftp://ftp.namesys.com/pub/reiser4-for-2.6/2.6.22/reiser4-for-2.6.22-2.patch.gz |
2185d846 | 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 | |
32edb06c | 262 | |
05219784 | 263 | # http://www.zz9.dk/patches/wrr-linux-071203-2.6.25.patch.gz |
264 | Patch52: kernel-wrr.patch | |
2c421faa | 265 | |
7d31896b | 266 | # http://fatooh.org/esfq-2.6/sfq-2.6.24.1.tar.bz2 |
e7b9147e | 267 | Patch53: esfq-kernel.patch |
2c421faa | 268 | |
ed5063af JR |
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 | |
b9f8c4e8 | 271 | # by Baggins request: |
272 | # derived from ftp://ftp.cmf.nrl.navy.mil/pub/chas/linux-atm/vbr/vbr-kernel-diffs | |
7e77e535 JR |
273 | Patch55: linux-2.6-atm-vbr.patch |
274 | Patch56: linux-2.6-atmdd.patch | |
b9f8c4e8 | 275 | |
dbfa210f | 276 | # http://www.ntop.org/PF_RING.html 20070610 |
6344ff36 | 277 | Patch58: linux-PF_RING.patch |
278 | ||
28713bdb | 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 | ||
c00d3452 | 282 | # Project suspend2 renamed to tuxonice |
2185d846 | 283 | # http://tuxonice.org/downloads/all/tuxonice-3.0-rc7-for-2.6.25.patch.bz2 |
2c421faa | 284 | Patch69: linux-2.6-suspend2.patch |
33a10a0a | 285 | Patch70: kernel-suspend2-headers.patch |
bd8646f4 | 286 | Patch71: linux-2.6-suspend2-page.patch |
df401e69 | 287 | Patch72: kernel-2.6-ueagle-atm-freezer.patch |
7897d3ff | 288 | |
60d1c35d | 289 | # adds some ids for hostap suported cards and monitor_enable from/for aircrack-ng |
2c421faa | 290 | # http://patches.aircrack-ng.org/hostap-kernel-2.6.18.patch |
60d1c35d | 291 | Patch85: hostap-kernel-2.6.18.patch |
292 | ||
24f97757 | 293 | # http://vserver.13thfloor.at/Experimental/patch-2.6.25.4-vs2.3.0.34.11.diff |
578002a9 | 294 | Patch100: linux-2.6-vs2.3.patch |
1f3f622a | 295 | Patch101: kernel-vserver-fixes.patch |
01d62a19 | 296 | # based on http://vserver.13thfloor.at/Experimental/patch-2.6.24-rc7-vs2.2.0.5.0.7-pre.diff |
438dc343 | 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; | |
12c62503 | 300 | # it was proposed to use 2.2 as a temp replacement. One could use vs 2.2 instead of 2.3 |
e28463de | 301 | # by using vs22 bcond - this bcond also changes IPV6 option from "y" to "m". |
a636f0fc | 302 | |
e32ba33b | 303 | # from http://www.cl.cam.ac.uk/Research/SRG/netos/xen/downloads/xen-3.0.2-src.tgz |
2c421faa | 304 | #Patch120: xen-3.0-2.6.16.patch |
e32ba33b | 305 | |
8b0541be | 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 | ||
2185d846 | 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 | |
6e23d65c | 312 | Patch141: kernel-unionfs-vserver.patch |
60d6f988 | 313 | |
44008d5e | 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 | ||
1b0af130 | 317 | Patch200: linux-2.6-ppc-ICE-hacks.patch |
7e4e533b | 318 | |
e28463de | 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 | |
27d09b3b | 323 | # gateways are used. |
2185d846 | 324 | # http://www.ssi.bg/~ja/routes-2.6.25-15.diff |
27d09b3b | 325 | # We need to disable CONFIG_IP_ROUTE_MULTIPATH_CACHED |
2185d846 | 326 | Patch300: kernel-routes.patch |
27d09b3b | 327 | |
ae0664f5 | 328 | Patch1000: linux-2.6-grsec-minimal.patch |
9a991405 | 329 | |
1b0af130 | 330 | Patch2000: kernel-small_fixes.patch |
a636f0fc | 331 | Patch2001: linux-2.6.21.1-pwc-uncompress.patch |
2c421faa | 332 | |
2c421faa | 333 | # kill some thousands of warnings |
befdc142 | 334 | # (only warnings, so just remove parts of this patch if conflics) |
2c421faa | 335 | Patch2500: linux-2.6-warnings.patch |
336 | ||
b02a74a2 | 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 | |
2c421faa | 341 | |
512e1dc7 | 342 | # for rescuecd |
78382233 | 343 | # based on http://ftp.leg.uct.ac.za/pub/linux/rip/inittmpfs-2.6.14.diff.gz |
512e1dc7 | 344 | Patch7000: kernel-inittmpfs.patch |
78382233 | 345 | # based on http://www.udpcast.linux.lu/download/bzip2-lzma-kernel-2.6.23.12.patch.gz |
edb27ca0 | 346 | Patch7001: kernel-bzip2-lzma.patch |
512e1dc7 | 347 | |
2c421faa | 348 | # not ready yet |
349 | Patch9997: pax_selinux_hooks-2.6.20.patch | |
350 | ||
7c7ef692 | 351 | # based on http://www.grsecurity.net/~paxguy1/pax-linux-2.6.24.6-test45.patch |
62d3f89b | 352 | Patch9998: kernel-pax.patch |
2c421faa | 353 | |
7d31896b | 354 | # based on http://www.grsecurity.net/~spender/grsecurity-2.1.12-2.6.25.4-200805181334.patch |
110a25bd | 355 | Patch9999: linux-2.6-grsec_full.patch |
2c421faa | 356 | Patch10000: linux-2.6-grsec-caps.patch |
357 | Patch10001: linux-2.6-grsec-common.patch | |
b769102c | 358 | Patch10002: kernel-grsec_fixes.patch |
36f2faae | 359 | |
601b4e87 | 360 | URL: http://www.kernel.org/ |
002ed53c | 361 | BuildRequires: binutils >= 3:2.14.90.0.7 |
46bb4084 | 362 | %ifarch sparc sparc64 |
363 | BuildRequires: elftoaout | |
364 | %endif | |
12c62503 | 365 | BuildRequires: /sbin/depmod |
0c18a0c3 | 366 | BuildRequires: gcc >= 5:3.2 |
edb27ca0 | 367 | %{?with_rescuecd:BuildRequires: lzma >= 1:4.42.2} |
f979af5b AM |
368 | # for hostname command |
369 | BuildRequires: net-tools | |
465bc122 | 370 | BuildRequires: perl-base |
fbf9d555 | 371 | BuildRequires: python |
372 | BuildRequires: python-modules | |
b7fa4545 | 373 | BuildRequires: rpmbuild(macros) >= 1.217 |
906e68b7 | 374 | Autoreqprov: no |
f1c7ea86 JB |
375 | Requires(post): coreutils |
376 | Requires(post): geninitrd >= 2.57 | |
377 | Requires(post): module-init-tools >= 0.9.9 | |
ac8b2067 | 378 | Requires: /sbin/depmod |
002ed53c ER |
379 | Requires: coreutils |
380 | Requires: geninitrd >= 2.57 | |
381 | Requires: module-init-tools >= 0.9.9 | |
12c62503 | 382 | Provides: %{name}(netfilter) = %{netfilter_snap} |
de0d7ee0 | 383 | %if %{with xen0} || %{with xenU} |
c5fcccf8 | 384 | Provides: kernel(xen) = %{_xen_version} |
2e4315a9 | 385 | %endif |
f0234385 | 386 | Obsoletes: kernel-misc-fuse |
601b4e87 | 387 | Obsoletes: kernel-modules |
67d44017 PS |
388 | Obsoletes: kernel-net-hostap |
389 | Obsoletes: kernel-net-ieee80211 | |
d0bbe802 | 390 | Obsoletes: kernel-net-ipp2p |
ac8b2067 | 391 | Obsoletes: kernel-smp |
3f5783f6 ER |
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 | |
12c62503 | 401 | %if %{with reiserfs4} |
3f5783f6 | 402 | Conflicts: reiser4progs < 1.0.0 |
12c62503 | 403 | %endif |
3f5783f6 | 404 | Conflicts: reiserfsprogs < 3.6.3 |
869e45ec | 405 | Conflicts: udev < 1:071 |
3f5783f6 ER |
406 | Conflicts: util-linux < 2.10o |
407 | Conflicts: xfsprogs < 2.6.0 | |
b9d3c9da | 408 | %if %{with xen0} || %{with xenU} || %{with pae} |
c5bf058d | 409 | ExclusiveArch: %{ix86} |
9157d402 ER |
410 | %if %{with pae} |
411 | ExcludeArch: i386 i486 i586 | |
412 | %endif | |
c5bf058d | 413 | %else |
edfcc0e8 | 414 | ExclusiveArch: %{ix86} %{x8664} alpha arm ia64 ppc ppc64 sparc sparc64 |
c5bf058d | 415 | %endif |
906e68b7 JB |
416 | ExclusiveOS: Linux |
417 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
601b4e87 | 418 | |
7efebc83 | 419 | %ifarch %{ix86} %{x8664} |
af0b79f6 JB |
420 | %define target_arch_dir x86 |
421 | %endif | |
422 | %ifarch ppc ppc64 | |
423 | %define target_arch_dir powerpc | |
424 | %endif | |
aadedaf5 | 425 | %ifnarch %{ix86} %{x8664} ppc ppc64 |
af0b79f6 | 426 | %define target_arch_dir %{_target_base_arch} |
7efebc83 AM |
427 | %endif |
428 | ||
52e8aad6 | 429 | %define defconfig arch/%{target_arch_dir}/defconfig |
430 | ||
db6c2213 ER |
431 | # No ELF objects there to strip (skips processing 27k files) |
432 | %define _noautostrip .*%{_kernelsrcdir}/.* | |
12c62503 | 433 | %define _noautochrpath .*%{_kernelsrcdir}/.* |
db6c2213 | 434 | |
8cd1b586 JB |
435 | %ifarch ia64 |
436 | %define initrd_dir /boot/efi | |
437 | %else | |
438 | %define initrd_dir /boot | |
439 | %endif | |
440 | ||
869e45ec | 441 | %define _kernelsrcdir /usr/src/linux%{_alt_kernel}-%{version} |
5253d53f | 442 | |
2e23b44b | 443 | %if "%{_target_base_arch}" != "%{_arch}" |
74d148ab | 444 | %define CrossOpts ARCH=%{_target_base_arch} CROSS_COMPILE=%{_target_cpu}-pld-linux- |
2e23b44b ER |
445 | %define DepMod /bin/true |
446 | ||
447 | %if "%{_arch}" == "sparc" && "%{_target_base_arch}" == "sparc64" | |
304c3aa6 JB |
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}" | |
2e23b44b ER |
454 | %define DepMod /sbin/depmod |
455 | %endif | |
456 | ||
457 | %if "%{_arch}" == "x86_64" && "%{_target_base_arch}" == "i386" | |
304c3aa6 | 458 | %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}" |
2e23b44b ER |
459 | %define DepMod /sbin/depmod |
460 | %endif | |
9157d402 | 461 | |
74d148ab | 462 | %ifarch ppc ppc64 |
463 | %define CrossOpts ARCH=powerpc CROSS_COMPILE=%{_target_cpu}-pld-linux- | |
464 | %endif | |
2e23b44b | 465 | %else |
304c3aa6 JB |
466 | %ifarch ppc ppc64 |
467 | %define CrossOpts ARCH=powerpc CC="%{__cc}" | |
468 | %else | |
469 | %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}" | |
470 | %endif | |
74d148ab | 471 | %define DepMod /sbin/depmod |
472 | %endif | |
2e23b44b | 473 | |
d6e334cd | 474 | %define __features Netfilter module dated: %{netfilter_snap}\ |
d6e334cd | 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}\ | |
04ea1d8c | 479 | %{?with_fbcondecor:Fbsplash/fbcondecor - enabled }\ |
d6e334cd | 480 | %{?with_nfsroot:Root on NFS - enabled} |
481 | ||
482 | %define Features %(echo "%{__features}" | sed '/^$/d') | |
483 | ||
601b4e87 KT |
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 | ||
d6e334cd | 489 | %{Features} |
d3c89e2e | 490 | |
83830b16 | 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 | |
601b4e87 | 494 | Systemfunktionen verantwortlich: Speicherreservierung, |
83830b16 | 495 | Prozeß-Management, Geräte Ein- und Ausgaben, usw. |
601b4e87 | 496 | |
d6e334cd | 497 | %{Features} |
d3c89e2e | 498 | |
83830b16 | 499 | %description -l fr.UTF-8 |
601b4e87 | 500 | Le package kernel contient le kernel linux (vmlinuz), la partie |
83830b16 | 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. | |
601b4e87 | 504 | |
d6e334cd | 505 | %{Features} |
d3c89e2e | 506 | |
83830b16 | 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. | |
69965db2 | 511 | |
d6e334cd | 512 | %{Features} |
d3c89e2e | 513 | |
c4057ded | 514 | %package vmlinux |
c5d76354 | 515 | Summary: vmlinux - uncompressed kernel image |
d6e334cd | 516 | Summary(de.UTF-8): vmlinux - dekompressiertes Kernel Bild |
e28463de | 517 | Summary(pl.UTF-8): vmlinux - rozpakowany obraz jądra |
c4057ded | 518 | Group: Base/Kernel |
2c421faa | 519 | Obsoletes: kernel-smp-vmlinux |
c4057ded | 520 | |
521 | %description vmlinux | |
c5d76354 JB |
522 | vmlinux - uncompressed kernel image. |
523 | ||
d6e334cd | 524 | %description vmlinux -l de.UTF-8 |
525 | vmlinux - dekompressiertes Kernel Bild. | |
526 | ||
83830b16 | 527 | %description vmlinux -l pl.UTF-8 |
528 | vmlinux - rozpakowany obraz jądra. | |
c4057ded | 529 | |
35fde00b JB |
530 | %package drm |
531 | Summary: DRM kernel modules | |
d6e334cd | 532 | Summary(de.UTF-8): DRM Kernel Treiber |
2c421faa | 533 | Summary(pl.UTF-8): Sterowniki DRM |
35fde00b | 534 | Group: Base/Kernel |
2c421faa | 535 | Requires(postun): %{name} = %{epoch}:%{version}-%{release} |
536 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
2c421faa | 537 | Obsoletes: kernel-smp-drm |
a508d02c | 538 | Autoreqprov: no |
35fde00b JB |
539 | |
540 | %description drm | |
3f5783f6 | 541 | DRM kernel modules. |
35fde00b | 542 | |
d6e334cd | 543 | %description drm -l de.UTF-8 |
544 | DRM Kernel Treiber. | |
545 | ||
83830b16 | 546 | %description drm -l pl.UTF-8 |
3f5783f6 | 547 | Sterowniki DRM. |
35fde00b JB |
548 | |
549 | %package pcmcia | |
550 | Summary: PCMCIA modules | |
d6e334cd | 551 | Summary(de.UTF-8): PCMCIA Module |
2c421faa | 552 | Summary(pl.UTF-8): Moduły PCMCIA |
35fde00b | 553 | Group: Base/Kernel |
2c421faa | 554 | Requires(postun): %{name} = %{epoch}:%{version}-%{release} |
555 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
2c421faa | 556 | Obsoletes: kernel-smp-pcmcia |
ccb58aaf | 557 | Conflicts: pcmcia-cs < 3.1.21 |
558 | Conflicts: pcmciautils < 004 | |
a508d02c | 559 | Autoreqprov: no |
35fde00b JB |
560 | |
561 | %description pcmcia | |
12c62503 | 562 | PCMCIA modules. |
35fde00b | 563 | |
d6e334cd | 564 | %description pcmcia -l de.UTF-8 |
565 | PCMCIA Module. | |
566 | ||
83830b16 | 567 | %description pcmcia -l pl.UTF-8 |
12c62503 | 568 | Moduły PCMCIA. |
35fde00b | 569 | |
d779450c | 570 | %package libs |
571 | Summary: Libraries for preparing bootable kernel on PowerPCs | |
2c421faa | 572 | Summary(pl.UTF-8): Biblioteki do przygotowania bootowalnego jądra dla PowerPC |
d779450c | 573 | Group: Base/Kernel |
2c421faa | 574 | Requires: %{name} = %{epoch}:%{version}-%{release} |
3f5783f6 | 575 | Requires: mkvmlinuz >= 1.3 |
2c421faa | 576 | Obsoletes: kernel-smp-libs |
d779450c | 577 | Autoreqprov: no |
578 | ||
579 | %description libs | |
002ed53c ER |
580 | Libraries for preparing bootable kernel on PowerPCs. Script called |
581 | mkvmlinuz may be useful for this. | |
d779450c | 582 | |
83830b16 | 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. | |
d779450c | 586 | |
35fde00b JB |
587 | %package sound-alsa |
588 | Summary: ALSA kernel modules | |
d6e334cd | 589 | Summary(de.UTF-8): ALSA Kernel Module |
2c421faa | 590 | Summary(pl.UTF-8): Sterowniki dźwięku ALSA |
35fde00b | 591 | Group: Base/Kernel |
2c421faa | 592 | Requires(postun): %{name} = %{epoch}:%{version}-%{release} |
593 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
594 | Obsoletes: kernel-smp-sound-alsa | |
a508d02c | 595 | Autoreqprov: no |
35fde00b JB |
596 | |
597 | %description sound-alsa | |
598 | ALSA (Advanced Linux Sound Architecture) sound drivers. | |
599 | ||
d6e334cd | 600 | %description sound-alsa -l de.UTF-8 |
601 | ALSA (Advanced Linux Sound Architecture) Sound-Treiber. | |
602 | ||
83830b16 | 603 | %description sound-alsa -l pl.UTF-8 |
604 | Sterowniki dźwięku ALSA (Advanced Linux Sound Architecture). | |
35fde00b JB |
605 | |
606 | %package sound-oss | |
607 | Summary: OSS kernel modules | |
d6e334cd | 608 | Summary(de.UTF-8): OSS Kernel Module |
2c421faa | 609 | Summary(pl.UTF-8): Sterowniki dźwięku OSS |
35fde00b | 610 | Group: Base/Kernel |
2c421faa | 611 | Requires(postun): %{name} = %{epoch}:%{version}-%{release} |
612 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
613 | Obsoletes: kernel-smp-sound-oss | |
a508d02c | 614 | Autoreqprov: no |
35fde00b JB |
615 | |
616 | %description sound-oss | |
617 | OSS (Open Sound System) drivers. | |
618 | ||
d6e334cd | 619 | %description sound-oss -l de.UTF-8 |
620 | OSS (Open Sound System) Treiber. | |
621 | ||
83830b16 | 622 | %description sound-oss -l pl.UTF-8 |
623 | Sterowniki dźwięku OSS (Open Sound System). | |
35fde00b | 624 | |
601b4e87 KT |
625 | %package headers |
626 | Summary: Header files for the Linux kernel | |
d6e334cd | 627 | Summary(de.UTF-8): Header Dateien für den Linux-Kernel |
2c421faa | 628 | Summary(pl.UTF-8): Pliki nagłówkowe jądra Linuksa |
6c6b034d | 629 | Group: Development/Building |
12c62503 | 630 | Provides: %{name}-headers(netfilter) = %{netfilter_snap} |
601b4e87 KT |
631 | Autoreqprov: no |
632 | ||
633 | %description headers | |
634 | These are the C header files for the Linux kernel, which define | |
40eea4ff SP |
635 | structures and constants that are needed when rebuilding the kernel or |
636 | building kernel modules. | |
601b4e87 | 637 | |
d6e334cd | 638 | %description headers -l de.UTF-8 |
639 | Dies sind die C Header Dateien für den Linux-Kernel, die definierte | |
9157d402 ER |
640 | Strukturen und Konstante beinhalten, die beim rekompilieren des |
641 | Kernels oder bei Kernel Modul kompilationen gebraucht werden. | |
d6e334cd | 642 | |
83830b16 | 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. | |
601b4e87 | 646 | |
d20b1dc0 | 647 | %package module-build |
2bc32647 | 648 | Summary: Development files for building kernel modules |
d6e334cd | 649 | Summary(de.UTF-8): Development Dateien die beim Kernel Modul kompilationen gebraucht werden |
2c421faa | 650 | Summary(pl.UTF-8): Pliki służące do budowania modułów jądra |
e687965c | 651 | Group: Development/Building |
d20b1dc0 | 652 | Requires: %{name}-headers = %{epoch}:%{version}-%{release} |
bf135ec7 | 653 | Conflicts: rpmbuild(macros) < 1.321 |
a508d02c | 654 | Autoreqprov: no |
d20b1dc0 | 655 | |
656 | %description module-build | |
2bc32647 JB |
657 | Development files from kernel source tree needed to build Linux kernel |
658 | modules from external packages. | |
659 | ||
d6e334cd | 660 | %description module-build -l de.UTF-8 |
661 | Development Dateien des Linux-Kernels die beim kompilieren externer | |
662 | Kernel Module gebraucht werden. | |
663 | ||
83830b16 | 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. | |
d20b1dc0 | 667 | |
601b4e87 KT |
668 | %package source |
669 | Summary: Kernel source tree | |
d6e334cd | 670 | Summary(de.UTF-8): Der Kernel Quelltext |
2c421faa | 671 | Summary(pl.UTF-8): Kod źródłowy jądra Linuksa |
e687965c | 672 | Group: Development/Building |
2bc32647 | 673 | Requires: %{name}-module-build = %{epoch}:%{version}-%{release} |
a508d02c | 674 | Autoreqprov: no |
601b4e87 KT |
675 | |
676 | %description source | |
12c62503 ER |
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. | |
601b4e87 | 679 | |
83830b16 | 680 | %description source -l de.UTF-8 |
681 | Das Kernel-Source-Paket enthält den source code (C/Assembler-Code) des | |
601b4e87 | 682 | Linux-Kernels. Die Source-Dateien werden gebraucht, um viele |
9eb43334 | 683 | C-Programme zu kompilieren, da sie auf Konstanten zurückgreifen, die |
83830b16 | 684 | im Kernel-Source definiert sind. Die Source-Dateien können auch |
9eb43334 | 685 | benutzt werden, um einen Kernel zu kompilieren, der besser auf Ihre |
601b4e87 KT |
686 | Hardware ausgerichtet ist. |
687 | ||
83830b16 | 688 | %description source -l fr.UTF-8 |
601b4e87 | 689 | Le package pour le kernel-source contient le code source pour le noyau |
83830b16 | 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 | |
601b4e87 KT |
694 | particuliers. |
695 | ||
83830b16 | 696 | %description source -l pl.UTF-8 |
697 | Pakiet zawiera kod źródłowy jądra systemu. | |
cf06f88a | 698 | |
9b3bab6e JR |
699 | %package doc |
700 | Summary: Kernel documentation | |
d6e334cd | 701 | Summary(de.UTF-8): Kernel Dokumentation |
2c421faa | 702 | Summary(pl.UTF-8): Dokumentacja do jądra Linuksa |
e687965c | 703 | Group: Documentation |
9b3bab6e | 704 | Autoreqprov: no |
cf06f88a | 705 | |
9b3bab6e JR |
706 | %description doc |
707 | This is the documentation for the Linux kernel, as found in | |
708 | /usr/src/linux/Documentation directory. | |
cf06f88a | 709 | |
d6e334cd | 710 | %description doc -l de.UTF-8 |
711 | Dies ist die Kernel Dokumentation wie sie im 'Documentation' | |
712 | Verzeichniss vorgefunden werden kann. | |
713 | ||
83830b16 | 714 | %description doc -l pl.UTF-8 |
715 | Pakiet zawiera dokumentację do jądra Linuksa pochodzącą z katalogu | |
9b3bab6e | 716 | /usr/src/linux/Documentation. |
cf06f88a | 717 | |
601b4e87 | 718 | %prep |
4cffab68 | 719 | %setup -q -n linux-%{_basever}%{_rc} |
1362b2d9 | 720 | |
2c421faa | 721 | # hack against warning in pax/grsec |
722 | %ifarch alpha | |
723 | sed -i 's/-Werror//' arch/alpha/kernel/Makefile | |
724 | %endif | |
34debd54 | 725 | |
1362b2d9 JR |
726 | %ifarch ppc |
727 | install %{SOURCE5} Makefile.ppclibs | |
728 | %endif | |
846aafa3 | 729 | |
2c421faa | 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 | ||
38c14daa | 736 | %if "%{_postver}" != "%{nil}" |
737 | %{__bzip2} -dc %{SOURCE1} | patch -p1 -s | |
738 | %endif | |
739 | ||
fbf9d555 | 740 | install -m 755 %{SOURCE6} . |
741 | ||
c00d3452 | 742 | # tuxonice: |
743 | %if %{with tuxonice} | |
2c421faa | 744 | ##ifarch %{ix86} %{x8664} ia64 ppc alpha |
737ba2a2 | 745 | %patch69 -p1 |
33a10a0a | 746 | %patch70 -p1 |
bd8646f4 | 747 | %patch71 -p1 |
df401e69 | 748 | # kernel-2.6-ueagle-atm-freezer.patch |
749 | %patch72 -p1 | |
2c421faa | 750 | ##endif |
0e9a441a | 751 | %endif |
04352f3d | 752 | |
e43054fa | 753 | %patch2 -p1 |
754 | ||
7e77e535 | 755 | %patch8 -p1 |
798b8384 | 756 | |
04ea1d8c | 757 | %if !%{with fbcondecor} |
1362b2d9 JR |
758 | %patch3 -p1 |
759 | %else | |
760 | %patch4 -p1 | |
761 | %endif | |
24b722f9 | 762 | |
16b2d858 | 763 | # squashfs |
28713bdb | 764 | %patch6 -p1 |
eb475ca7 | 765 | |
7e77e535 | 766 | %patch9 -p1 |
4a28820e | 767 | |
23f15e1c | 768 | ## netfilter |
1519495f | 769 | # |
f0c5ac07 | 770 | |
88f0e9ff | 771 | # kernel-pom-ng-IPV4OPTSSTRIP.patch |
1519495f | 772 | %patch10 -p1 |
88f0e9ff | 773 | |
774 | # kernel-pom-ng-ipv4options.patch | |
848a2d02 | 775 | %patch11 -p1 |
88f0e9ff | 776 | |
e28463de | 777 | # kernel-pom-ng-set.patch |
778 | %patch12 -p1 | |
779 | ||
28713bdb | 780 | # kernel-pom-ng-ROUTE.patch |
27dad056 | 781 | %patch14 -p1 |
28713bdb | 782 | |
88f0e9ff | 783 | # kernel-pom-ng-mms-conntrack-nat.patch |
c1d95c69 | 784 | %patch16 -p1 |
88f0e9ff | 785 | |
f5fbd9ea | 786 | # kernel-pom-ng-rsh.patch |
c1d95c69 | 787 | %patch22 -p1 |
f5fbd9ea | 788 | |
253b8b20 | 789 | # kernel-pom-ng-rpc.patch |
c1d95c69 | 790 | %patch23 -p1 |
253b8b20 | 791 | |
78382233 | 792 | # kernel-nf_rtsp.patch |
793 | %patch36 -p1 | |
794 | ||
fcf7a306 | 795 | # kernel-owner-xid.patch |
793722d1 | 796 | %if %{with vserver} |
9a5f3f20 | 797 | %patch37 -p1 |
793722d1 | 798 | %endif |
fcf7a306 | 799 | |
2cd49126 | 800 | # kernel-ipt_account.patch |
801 | %patch38 -p1 | |
802 | ||
d5d1afcf | 803 | # kernel-ipt_ACCOUNT.patch |
804 | %patch39 -p1 | |
805 | ||
88f0e9ff | 806 | # kernel-layer7.patch |
8089eb14 | 807 | %patch40 -p1 |
1519495f | 808 | |
28713bdb | 809 | # ipvs-nfct |
810 | %patch41 -p1 | |
811 | ||
52986594 | 812 | ## |
813 | # end of netfilter | |
36f2faae | 814 | |
a60cb6c9 | 815 | # zph |
816 | %patch49 -p1 | |
817 | ||
347a6801 | 818 | %if %{with imq} |
819 | %patch50 -p1 | |
820 | %endif | |
4170601d | 821 | |
32edb06c | 822 | # reiser4 |
823 | %if %{with reiser4} | |
824 | %patch51 -p1 | |
825 | %endif | |
826 | ||
2c421faa | 827 | # esfq |
ac26f4b9 | 828 | %patch53 -p1 |
2c421faa | 829 | |
830 | %if %{with wrr} | |
31a92666 | 831 | %patch52 -p1 |
2c421faa | 832 | %endif |
833 | ||
ed5063af JR |
834 | # toshiba_acpi |
835 | %patch54 -p1 | |
2c421faa | 836 | |
7e77e535 JR |
837 | %patch55 -p1 |
838 | %patch56 -p1 | |
b9f8c4e8 | 839 | |
56647b33 | 840 | %patch58 -p1 |
6344ff36 | 841 | |
28713bdb | 842 | # kernel-rndis_host-wm5.patch |
843 | %patch59 -p1 | |
844 | ||
2c421faa | 845 | # hostap enhancements from/for aircrack-ng |
60d1c35d | 846 | %patch85 -p1 |
847 | ||
2c421faa | 848 | # vserver |
849 | %if %{with vserver} | |
438dc343 | 850 | %if %{with vs22} |
851 | %patch102 -p1 | |
852 | %else | |
f79903d9 | 853 | %patch100 -p1 |
1f3f622a | 854 | %patch101 -p1 |
31c3042b | 855 | %endif |
2c421faa | 856 | %endif |
a6a6ac0b | 857 | |
858 | #%if %{with xen0} || %{with xenU} | |
859 | #%ifarch %{ix86} %{x8664} ia64 | |
860 | #%patch120 -p1 | |
861 | #%endif | |
862 | #%endif | |
863 | ||
97013b4b | 864 | # tproxy |
c3d03987 | 865 | %if %{without rescuecd} |
97013b4b | 866 | %patch42 -p1 |
16a7bd96 | 867 | %endif |
97013b4b | 868 | |
7d31896b | 869 | # forcedeth |
8b0541be | 870 | %patch130 -p1 |
871 | ||
60d6f988 JR |
872 | # unionfs |
873 | %patch140 -p1 | |
6e23d65c | 874 | %{?with_vserver:%patch141 -p1} |
60d6f988 | 875 | |
44008d5e | 876 | # aic94xx linux-2.6-aic94xx_with_included_firmware.patch |
877 | %patch160 -p1 | |
878 | ||
c1d95c69 | 879 | %patch2500 -p1 |
2c421faa | 880 | |
512e1dc7 | 881 | %if %{with rescuecd} |
882 | %patch7000 -p1 | |
edb27ca0 | 883 | %patch7001 -p1 |
512e1dc7 | 884 | %endif |
885 | ||
befdc142 | 886 | # grsecurity & pax stuff |
2c421faa | 887 | # |
2c421faa | 888 | %if %{with pax_full} |
889 | %patch9999 -p1 | |
7d31896b | 890 | %{?with_vserver:%patch10000 -p1} |
a636f0fc | 891 | %{?with_vserver:%patch10001 -p1} |
7d31896b | 892 | #{?with_vserver:%patch10002 -p1} |
2c421faa | 893 | %else |
894 | ||
64c7b6c3 | 895 | %if %{with grsec_full} |
896 | %patch9999 -p1 | |
7d31896b | 897 | %{?with_vserver:%patch10000 -p1} |
a636f0fc | 898 | %{?with_vserver:%patch10001 -p1} |
7d31896b | 899 | #{?with_vserver:%patch10002 -p1} |
2c421faa | 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 | |
64c7b6c3 | 906 | %endif |
a6a6ac0b | 907 | |
60d1c35d | 908 | %if %{with pax} |
2c421faa | 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 | |
60d1c35d | 918 | %endif |
919 | ||
2c421faa | 920 | %endif |
921 | ||
922 | # | |
923 | # end of grsecurity & pax stuff | |
60d1c35d | 924 | |
b02a74a2 | 925 | # apparmor |
926 | %if %{with apparmor} | |
927 | %patch5000 -p1 | |
928 | # %patch5001 -p1 | |
929 | %endif | |
930 | ||
1b0af130 | 931 | %ifarch ppc ppc64 |
8dee06f0 | 932 | #patch200 -p1 |
1b0af130 | 933 | %endif |
7e4e533b | 934 | |
27d09b3b | 935 | # routes |
a8f79cdc | 936 | %patch300 -p1 |
27d09b3b | 937 | |
2c421faa | 938 | # Small fixes: |
1b0af130 | 939 | %patch2000 -p1 |
a636f0fc | 940 | %patch2001 -p1 |
b5297306 | 941 | |
bd6ac90c | 942 | # Fix EXTRAVERSION in main Makefile |
b8e032fa | 943 | sed -i 's#EXTRAVERSION =.*#EXTRAVERSION = %{_postver}%{?_alt_kernel:%{_alt_kernel}}#g' Makefile |
074c0526 | 944 | |
1cbd66e6 JB |
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 | ||
acc00c76 | 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 | ||
e74bcc8b | 951 | # cleanup backups after patching |
12c62503 | 952 | find '(' -name '*~' -o -name '*.orig' -o -name '.gitignore' ')' -print0 | xargs -0 -r -l512 rm -f |
e74bcc8b | 953 | |
954 | %build | |
57adc3e2 | 955 | TuneUpConfigForIX86 () { |
b5297306 | 956 | set -x |
57adc3e2 | 957 | %ifarch %{ix86} |
6ce1acec JR |
958 | pae= |
959 | [ "$2" = "yes" ] && pae=yes | |
960 | %if %{with pae} | |
961 | pae=yes | |
962 | %endif | |
a602ba1f | 963 | %ifnarch i386 |
df7b1eb7 | 964 | sed -i 's:CONFIG_M386=y:# CONFIG_M386 is not set:' $1 |
a602ba1f ER |
965 | %endif |
966 | %ifarch i486 | |
57adc3e2 | 967 | sed -i 's:# CONFIG_M486 is not set:CONFIG_M486=y:' $1 |
a602ba1f ER |
968 | %endif |
969 | %ifarch i586 | |
57adc3e2 | 970 | sed -i 's:# CONFIG_M586 is not set:CONFIG_M586=y:' $1 |
a602ba1f ER |
971 | %endif |
972 | %ifarch i686 | |
57adc3e2 | 973 | sed -i 's:# CONFIG_M686 is not set:CONFIG_M686=y:' $1 |
a602ba1f ER |
974 | %endif |
975 | %ifarch pentium3 | |
57adc3e2 | 976 | sed -i 's:# CONFIG_MPENTIUMIII is not set:CONFIG_MPENTIUMIII=y:' $1 |
a602ba1f ER |
977 | %endif |
978 | %ifarch pentium4 | |
57adc3e2 | 979 | sed -i 's:# CONFIG_MPENTIUM4 is not set:CONFIG_MPENTIUM4=y:' $1 |
a602ba1f ER |
980 | %endif |
981 | %ifarch athlon | |
57adc3e2 | 982 | sed -i 's:# CONFIG_MK7 is not set:CONFIG_MK7=y:' $1 |
a602ba1f ER |
983 | %endif |
984 | %ifarch i686 athlon pentium3 pentium4 | |
6ce1acec | 985 | if [ "$pae" = "yes" ]; then |
3938b4bf JR |
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 | |
df7b1eb7 | 989 | sed -i 's:CONFIG_MATH_EMULATION=y:# CONFIG_MATH_EMULATION is not set:' $1 |
a602ba1f | 990 | %endif |
ab175f01 | 991 | return 0 |
57adc3e2 PS |
992 | %endif |
993 | } | |
994 | ||
60d1c35d | 995 | PaXconfig () { |
996 | set -x | |
997 | %ifarch %{ix86} | |
998 | sed -i 's:# CONFIG_PAX_SEGMEXEC is not set:CONFIG_PAX_SEGMEXEC=y:' $1 | |
e9006c08 | 999 | # performance impact on CPUs without NX bit |
b769102c | 1000 | sed -i 's:CONFIG_PAX_PAGEEXEC=y:# CONFIG_PAX_PAGEEXEC is not set:' $1 |
2c421faa | 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 | ||
60d1c35d | 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 | |
2c421faa | 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 | |
60d1c35d | 1015 | %endif |
2c421faa | 1016 | |
1017 | %ifarch sparc sparc64 alpha | |
1018 | sed -i 's:# CONFIG_PAX_EMUPLT is not set:CONFIG_PAX_EMUPLT=y:' $1 | |
1019 | %endif | |
1020 | ||
2c421faa | 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} | |
512e1dc7 | 1027 | # Hardening grsec options if with pax |
b769102c | 1028 | sed -i "s:# CONFIG_GRKERNSEC_PROC_MEMMAP is not set:CONFIG_GRKERNSEC_PROC_MEMMAP=y:" $1 |
512e1dc7 | 1029 | # almost rational (see HIDESYM help) |
b769102c | 1030 | sed -i "s:# CONFIG_GRKERNSEC_HIDESYM is not set:CONFIG_GRKERNSEC_HIDESYM=y:" $1 |
1031 | ||
2c421faa | 1032 | # no change needed CONFIG=PAX_HAVE_ACL_FLAGS=y is taken from the kernel-pax.config |
1033 | %else | |
b769102c | 1034 | # selinux or other hooks? |
2c421faa | 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 | ||
60d1c35d | 1039 | return 0 |
1040 | } | |
1041 | ||
512e1dc7 | 1042 | RescueConfig() { |
1043 | set -x | |
1044 | cat %{SOURCE58} >> $1 | |
edb27ca0 | 1045 | cat %{SOURCE59} >> $1 |
512e1dc7 | 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 | |
144cab6f | 1055 | sed -i "s:CONFIG_DRM\(.*\)=.:# CONFIG_DRM\1 is not set:" $1 |
512e1dc7 | 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 | |
512e1dc7 | 1061 | sed -i "s:CONFIG_SECURITY=.:# CONFIG_SECURITY is not set:" $1 |
144cab6f | 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 | |
098c6ded | 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 | |
512e1dc7 | 1070 | } |
1071 | ||
89311a3c | 1072 | BuildConfig() { |
2e23b44b | 1073 | %{?debug:set -x} |
601b4e87 | 1074 | # is this a special kernel we want to build? |
2c421faa | 1075 | Config="%{_target_base_arch}" |
1076 | KernelVer=%{kernel_release} | |
1077 | echo "Building config file using $Config.conf..." | |
52e8aad6 | 1078 | cat $RPM_SOURCE_DIR/kernel-$Config.config > %{defconfig} |
fbf9d555 | 1079 | ./kernel-config.py %{_target_base_arch} $RPM_SOURCE_DIR/kernel-multiarch.config \ |
52e8aad6 | 1080 | %{defconfig} %{defconfig} |
1081 | TuneUpConfigForIX86 %{defconfig} | |
d6a63a09 | 1082 | |
2c421faa | 1083 | # netfilter |
52e8aad6 | 1084 | cat %{SOURCE40} >> %{defconfig} |
2c421faa | 1085 | |
1086 | # squashfs | |
52e8aad6 | 1087 | cat %{SOURCE41} >> %{defconfig} |
2c421faa | 1088 | |
c00d3452 | 1089 | # tuxonice |
1090 | %if %{with tuxonice} | |
254fdd0d | 1091 | %ifarch %{ix86} %{x8664} ia64 ppc ppc64 |
52e8aad6 | 1092 | cat %{SOURCE42} >> %{defconfig} |
2c421faa | 1093 | %endif |
0a144780 | 1094 | %ifarch ppc ppc64 |
f8f172f4 | 1095 | sed -i "s:CONFIG_TOI=y:# CONFIG_TOI is not set:" %{defconfig} |
1096 | %endif | |
0a144780 | 1097 | %endif |
f8f172f4 | 1098 | |
2c421faa | 1099 | %if %{with vserver} |
52e8aad6 | 1100 | cat %{SOURCE43} >> %{defconfig} |
438dc343 | 1101 | %if %{with vs22} |
52e8aad6 | 1102 | sed -i "s:CONFIG_IPV6=y:CONFIG_IPV6=m:" %{defconfig} |
438dc343 | 1103 | %endif |
2c421faa | 1104 | %endif |
1105 | ||
28713bdb | 1106 | %if %{without ipv6} |
52e8aad6 | 1107 | sed -i "s:CONFIG_IPV6=.:# CONFIG_IPV6 is not set:" %{defconfig} |
28713bdb | 1108 | %endif |
1109 | ||
befdc142 | 1110 | # grsecurity & pax stuff |
2c421faa | 1111 | # |
1112 | ||
1113 | %if %{with pax_full} | |
52e8aad6 | 1114 | cat %{SOURCE45} >> %{defconfig} |
1115 | cat %{SOURCE49} >> %{defconfig} | |
1116 | PaXconfig %{defconfig} | |
2c421faa | 1117 | %else |
1118 | ||
1119 | %if %{with grsec_full} | |
52e8aad6 | 1120 | cat %{SOURCE45} >> %{defconfig} |
f8f172f4 | 1121 | cat %{SOURCE50} >> %{defconfig} |
2c421faa | 1122 | %else |
1123 | %if %{with grsec_minimal} | |
52e8aad6 | 1124 | cat %{SOURCE51} >> %{defconfig} |
2c421faa | 1125 | %endif |
dcc54002 JR |
1126 | %endif |
1127 | ||
60d1c35d | 1128 | %if %{with pax} |
52e8aad6 | 1129 | cat %{SOURCE49} >> %{defconfig} |
1130 | PaXconfig %{defconfig} | |
60d1c35d | 1131 | %endif |
1132 | ||
2c421faa | 1133 | %endif |
1134 | ||
7197f3a3 | 1135 | # Temporary disabled RELOCATABLE. Needed only on x86?? |
1136 | %if %{with pax} || %{with grsec_full} | |
52e8aad6 | 1137 | sed -i "s:CONFIG_RELOCATABLE=y:# CONFIG_RELOCATABLE is not set:" %{defconfig} |
7197f3a3 | 1138 | %endif |
1139 | ||
2c421faa | 1140 | # |
1141 | # end of grsecurity & pax stuff | |
1142 | ||
347a6801 | 1143 | %if %{with imq} |
52e8aad6 | 1144 | cat %{SOURCE55} >> %{defconfig} |
347a6801 | 1145 | %endif |
1146 | ||
2c421faa | 1147 | %if %{with wrr} |
52e8aad6 | 1148 | cat %{SOURCE57} >> %{defconfig} |
2c421faa | 1149 | %endif |
1150 | ||
1151 | %if %{with reiser4} | |
52e8aad6 | 1152 | cat %{SOURCE56} >> %{defconfig} |
60d1c35d | 1153 | %endif |
1154 | ||
de0d7ee0 | 1155 | %if %{with xen0} |
52e8aad6 | 1156 | cat %{SOURCE46} >> %{defconfig} |
bf135ec7 | 1157 | %endif |
de0d7ee0 | 1158 | |
1159 | %if %{with xenU} | |
52e8aad6 | 1160 | cat %{SOURCE47} >> %{defconfig} |
bf135ec7 SP |
1161 | %endif |
1162 | ||
04ea1d8c | 1163 | %if %{with fbcondecor} |
1164 | echo "CONFIG_FB_CON_DECOR=y" >> %{defconfig} | |
43e67452 | 1165 | %else |
52e8aad6 | 1166 | echo "CONFIG_BOOTSPLASH=y" >> %{defconfig} |
43e67452 | 1167 | %endif |
bc31f1fe | 1168 | |
740dff65 | 1169 | %if %{with nfsroot} |
52e8aad6 | 1170 | sed -i "s:CONFIG_NFS_FS=m:CONFIG_NFS_FS=y:" %{defconfig} |
1171 | echo "CONFIG_ROOT_NFS=y" >> %{defconfig} | |
740dff65 JR |
1172 | %endif |
1173 | ||
512e1dc7 | 1174 | %if %{with rescuecd} |
52e8aad6 | 1175 | RescueConfig %{defconfig} |
512e1dc7 | 1176 | %endif |
1177 | ||
b02a74a2 | 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 | ||
52e8aad6 | 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}} | |
79a69f0f | 1192 | |
32108e5b | 1193 | } |
1194 | ||
1f52db0a | 1195 | BuildKernel() { |
2e23b44b | 1196 | %{?debug:set -x} |
40eea4ff | 1197 | echo "Building kernel $1 ..." |
2e23b44b | 1198 | %{__make} %CrossOpts mrproper \ |
8bd86dbb | 1199 | RCS_FIND_IGNORE='-name build-done -prune -o' |
52e8aad6 | 1200 | ln -sf %{defconfig} .config |
601b4e87 | 1201 | |
2e23b44b | 1202 | %{__make} %CrossOpts clean \ |
c86751b7 | 1203 | RCS_FIND_IGNORE='-name build-done -prune -o' |
2e23b44b | 1204 | %{__make} %CrossOpts include/linux/version.h \ |
81259751 | 1205 | %{?with_verbose:V=1} |
601b4e87 | 1206 | |
2c421faa | 1207 | %{__make} %CrossOpts scripts/mkcompile_h \ |
1208 | %{?with_verbose:V=1} | |
1209 | ||
3190e2e5 | 1210 | # make does vmlinux, modules and bzImage at once |
84418e64 | 1211 | %ifarch sparc64 |
2e23b44b | 1212 | %{__make} %CrossOpts image \ |
84418e64 | 1213 | %{?with_verbose:V=1} |
2eede5c5 | 1214 | |
2e23b44b | 1215 | %{__make} %CrossOpts modules \ |
460faec9 | 1216 | %{?with_verbose:V=1} |
cf06f88a | 1217 | %else |
2e23b44b | 1218 | %{__make} %CrossOpts \ |
ade3916a | 1219 | %{?with_verbose:V=1} |
601b4e87 | 1220 | %endif |
41f05bdd | 1221 | } |
1222 | ||
89311a3c | 1223 | PreInstallKernel() { |
2c421faa | 1224 | Config="%{_target_base_arch}" |
1225 | KernelVer=%{kernel_release} | |
601b4e87 KT |
1226 | |
1227 | mkdir -p $KERNEL_INSTALL_DIR/boot | |
1228 | install System.map $KERNEL_INSTALL_DIR/boot/System.map-$KernelVer | |
45d0ae91 | 1229 | %ifarch %{ix86} %{x8664} |
24d8b028 | 1230 | install arch/x86/boot/bzImage $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer |
21843074 | 1231 | install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinux-$KernelVer |
97365a5a | 1232 | %endif |
601b4e87 KT |
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 | |
2fd967ba | 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 | |
84418e64 | 1242 | elftoaout arch/sparc64/boot/image -o vmlinux.aout |
2fd967ba | 1243 | install vmlinux.aout $KERNEL_INSTALL_DIR/boot/vmlinux.aout-$KernelVer |
46bb4084 | 1244 | %endif |
601b4e87 | 1245 | %endif |
3fa68acf | 1246 | %ifarch ppc ppc64 |
cf06f88a KT |
1247 | install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinux-$KernelVer |
1248 | install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer | |
6fb3ffc0 | 1249 | %endif |
1250 | %ifarch ppc-broken | |
d779450c | 1251 | %{__make} -f Makefile.ppclibs install \ |
1252 | DESTDIR=$KERNEL_INSTALL_DIR/boot/libs-$KernelVer | |
8cd1b586 JB |
1253 | %endif |
1254 | %ifarch ia64 | |
1255 | gzip -cfv vmlinux > vmlinuz | |
1256 | install -d $KERNEL_INSTALL_DIR/boot/efi | |
8cd1b586 JB |
1257 | install vmlinuz $KERNEL_INSTALL_DIR/boot/efi/vmlinuz-$KernelVer |
1258 | ln -sf efi/vmlinuz-$KernelVer $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer | |
9b3bab6e | 1259 | %endif |
2a261cfb | 1260 | %ifarch arm |
1261 | install arch/arm/boot/zImage $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer | |
1262 | %endif | |
1263 | ||
2e23b44b | 1264 | %{__make} %CrossOpts modules_install \ |
e7d99ddd | 1265 | %{?with_verbose:V=1} \ |
2e23b44b | 1266 | DEPMOD=%DepMod \ |
a602ba1f | 1267 | INSTALL_MOD_PATH=$KERNEL_INSTALL_DIR \ |
e7d99ddd | 1268 | KERNELRELEASE=$KernelVer |
6dc0a2ea | 1269 | |
f6d2eacd | 1270 | # You'd probabelly want to make it somewhat different |
a2b2199b | 1271 | install -d $KERNEL_INSTALL_DIR%{_kernelsrcdir} |
2c421faa | 1272 | install Module.symvers $KERNEL_INSTALL_DIR%{_kernelsrcdir}/Module.symvers-dist |
77c976a9 | 1273 | |
6dc0a2ea | 1274 | echo "CHECKING DEPENDENCIES FOR KERNEL MODULES" |
2e23b44b ER |
1275 | if [ %DepMod = /sbin/depmod ]; then |
1276 | /sbin/depmod --basedir $KERNEL_INSTALL_DIR -ae -F $KERNEL_INSTALL_DIR/boot/System.map-$KernelVer -r $KernelVer || : | |
2e23b44b | 1277 | fi |
2c421faa | 1278 | touch $KERNEL_INSTALL_DIR/lib/modules/$KernelVer/modules.dep |
6dc0a2ea | 1279 | echo "KERNEL RELEASE $KernelVer DONE" |
601b4e87 KT |
1280 | } |
1281 | ||
1282 | KERNEL_BUILD_DIR=`pwd` | |
5253d53f | 1283 | echo "-%{_localversion}" > localversion |
601b4e87 | 1284 | |
2c421faa | 1285 | KERNEL_INSTALL_DIR="$KERNEL_BUILD_DIR/build-done/kernel" |
7f1ae99e | 1286 | rm -rf $KERNEL_INSTALL_DIR |
2a261cfb | 1287 | %if %{without myown} |
e74bcc8b | 1288 | BuildConfig |
2a261cfb | 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 | |
25d2967b ER |
1300 | BuildKernel |
1301 | PreInstallKernel | |
7f1ae99e | 1302 | |
86c1d748 | 1303 | %{__make} %CrossOpts include/linux/utsrelease.h |
1304 | cp include/linux/utsrelease.h{,.save} | |
2c421faa | 1305 | cp include/linux/version.h{,.save} |
1306 | cp scripts/mkcompile_h{,.save} | |
86c1d748 | 1307 | |
601b4e87 KT |
1308 | %install |
1309 | rm -rf $RPM_BUILD_ROOT | |
9b3bab6e | 1310 | umask 022 |
728a94de | 1311 | |
2e23b44b | 1312 | export DEPMOD=%DepMod |
728a94de | 1313 | |
5253d53f | 1314 | install -d $RPM_BUILD_ROOT%{_kernelsrcdir} |
2c421faa | 1315 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/%{kernel_release} |
601b4e87 | 1316 | |
09a8e490 ER |
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 | ||
601b4e87 | 1323 | KERNEL_BUILD_DIR=`pwd` |
601b4e87 | 1324 | |
2c421faa | 1325 | cp -a$l $KERNEL_BUILD_DIR/build-done/kernel/* $RPM_BUILD_ROOT |
9b3bab6e | 1326 | |
2c421faa | 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 | |
9b3bab6e | 1332 | |
a2b2199b | 1333 | find . -maxdepth 1 ! -name "build-done" ! -name "." -exec cp -a$l "{}" "$RPM_BUILD_ROOT%{_kernelsrcdir}/" ";" |
8ba9ecd1 | 1334 | |
5253d53f | 1335 | cd $RPM_BUILD_ROOT%{_kernelsrcdir} |
601b4e87 | 1336 | |
24d8b028 | 1337 | %{__make} %CrossOpts mrproper archclean \ |
8bd86dbb | 1338 | RCS_FIND_IGNORE='-name build-done -prune -o' |
edcebaac | 1339 | |
2c421faa | 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} | |
1cb88365 | 1345 | fi |
08856617 | 1346 | |
a2b2199b ER |
1347 | cp -Rdp$l $KERNEL_BUILD_DIR/include/linux/* \ |
1348 | $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux | |
601b4e87 | 1349 | |
2e23b44b | 1350 | %{__make} %CrossOpts mrproper |
168f2d2b | 1351 | mv -f include/linux/utsrelease.h.save $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux/utsrelease.h |
2c421faa | 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 | |
5253d53f ER |
1356 | install %{SOURCE3} $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux/autoconf.h |
1357 | install %{SOURCE4} $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux/config.h | |
5fe99c7d | 1358 | |
d89749b7 | 1359 | # collect module-build files and directories |
5253d53f | 1360 | perl %{SOURCE7} %{_kernelsrcdir} $KERNEL_BUILD_DIR |
d89749b7 | 1361 | |
9153b8a3 | 1362 | # ghosted initrd |
f9f0c8d1 | 1363 | touch $RPM_BUILD_ROOT%{initrd_dir}/initrd-%{kernel_release}.gz |
9153b8a3 | 1364 | |
d67dd90c ER |
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 | ||
7c7ef692 | 1369 | # remove unnecessary dir with dead symlink |
1370 | rm -rf $RPM_BUILD_ROOT/arch/i386 | |
1371 | ||
601b4e87 KT |
1372 | %clean |
1373 | rm -rf $RPM_BUILD_ROOT | |
601b4e87 | 1374 | |
224eb801 | 1375 | %preun |
3b1bd92e | 1376 | if [ -x /sbin/new-kernel-pkg ]; then |
5253d53f | 1377 | /sbin/new-kernel-pkg --remove %{kernel_release} |
3b1bd92e | 1378 | fi |
224eb801 | 1379 | |
601b4e87 | 1380 | %post |
8cd1b586 | 1381 | %ifarch ia64 |
f9f0c8d1 | 1382 | mv -f /boot/efi/vmlinuz{,.old} 2> /dev/null |
ec1e637f | 1383 | %{?_alt_kernel:mv -f /boot/efi/vmlinuz%{_alt_kernel}{,.old} 2> /dev/null} |
2dd0543f | 1384 | ln -sf vmlinuz-%{kernel_release} /boot/efi/vmlinuz |
ec1e637f | 1385 | %{?_alt_kernel:ln -sf vmlinuz-%{kernel_release} /boot/efi/vmlinuz%{_alt_kernel}} |
8cd1b586 | 1386 | %endif |
f9f0c8d1 | 1387 | mv -f /boot/vmlinuz{,.old} 2> /dev/null |
ec1e637f | 1388 | %{?_alt_kernel:mv -f /boot/vmlinuz%{_alt_kernel}{,.old} 2> /dev/null} |
f9f0c8d1 | 1389 | mv -f /boot/System.map{,.old} 2> /dev/null |
ec1e637f | 1390 | %{?_alt_kernel:mv -f /boot/System%{_alt_kernel}.map{,.old} 2> /dev/null} |
2dd0543f | 1391 | ln -sf vmlinuz-%{kernel_release} /boot/vmlinuz |
ec1e637f | 1392 | %{?_alt_kernel:ln -sf vmlinuz-%{kernel_release} /boot/vmlinuz%{_alt_kernel}} |
2dd0543f | 1393 | ln -sf System.map-%{kernel_release} /boot/System.map |
ec1e637f | 1394 | %{?_alt_kernel:ln -sf System.map-%{kernel_release} /boot/System.map%{_alt_kernel}} |
601b4e87 | 1395 | |
5253d53f | 1396 | %depmod %{kernel_release} |
7392d4ab | 1397 | |
be35816e | 1398 | /sbin/geninitrd -f --initrdfs=rom %{initrd_dir}/initrd-%{kernel_release}.gz %{kernel_release} |
97013b4b | 1399 | mv -f %{initrd_dir}/initrd{,.old} 2> /dev/null |
ec1e637f | 1400 | %{?_alt_kernel:mv -f %{initrd_dir}/initrd%{_alt_kernel}{,.old} 2> /dev/null} |
2dd0543f | 1401 | ln -sf initrd-%{kernel_release}.gz %{initrd_dir}/initrd |
ec1e637f | 1402 | %{?_alt_kernel:ln -sf initrd-%{kernel_release}.gz %{initrd_dir}/initrd%{_alt_kernel}} |
601b4e87 | 1403 | |
3b1bd92e | 1404 | if [ -x /sbin/new-kernel-pkg ]; then |
3bfefb8d ER |
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 | ||
b8e032fa | 1411 | ext='%{_alt_kernel}' |
3bfefb8d ER |
1412 | if [ "$ext" ]; then |
1413 | title="$title $ext" | |
1414 | fi | |
1415 | ||
5253d53f | 1416 | /sbin/new-kernel-pkg --initrdfile=%{initrd_dir}/initrd-%{kernel_release}.gz --install %{kernel_release} --banner "$title" |
3b1bd92e | 1417 | elif [ -x /sbin/rc-boot ]; then |
9b3bab6e JR |
1418 | /sbin/rc-boot 1>&2 || : |
1419 | fi | |
cf06f88a | 1420 | |
c5d76354 | 1421 | %post vmlinux |
f9f0c8d1 | 1422 | mv -f /boot/vmlinux{,.old} 2> /dev/null |
1423 | %{?alt_kernel:mv -f /boot/vmlinux-%{alt_kernel}{,.old} 2> /dev/null} | |
2dd0543f | 1424 | ln -sf vmlinux-%{kernel_release} /boot/vmlinux |
f9f0c8d1 | 1425 | %{?alt_kernel:ln -sf vmlinux-%{kernel_release} /boot/vmlinux-%{alt_kernel}} |
c5d76354 | 1426 | |
3383ab6c | 1427 | %post libs |
5253d53f | 1428 | %{_sbindir}/mkvmlinuz /boot/zImage-%{kernel_release} %{kernel_release} |
3383ab6c | 1429 | |
35fde00b | 1430 | %post drm |
5253d53f | 1431 | %depmod %{kernel_release} |
35fde00b JB |
1432 | |
1433 | %postun drm | |
5253d53f | 1434 | %depmod %{kernel_release} |
35fde00b | 1435 | |
e7ae6cd3 | 1436 | %post pcmcia |
5253d53f | 1437 | %depmod %{kernel_release} |
9b3bab6e | 1438 | |
e7ae6cd3 | 1439 | %postun pcmcia |
5253d53f | 1440 | %depmod %{kernel_release} |
9b3bab6e | 1441 | |
35fde00b | 1442 | %post sound-alsa |
5253d53f | 1443 | %depmod %{kernel_release} |
cf06f88a | 1444 | |
35fde00b | 1445 | %postun sound-alsa |
5253d53f | 1446 | %depmod %{kernel_release} |
0575d61d | 1447 | |
1448 | %post sound-oss | |
5253d53f | 1449 | %depmod %{kernel_release} |
0575d61d | 1450 | |
1451 | %postun sound-oss | |
5253d53f | 1452 | %depmod %{kernel_release} |
0575d61d | 1453 | |
601b4e87 | 1454 | %post headers |
869e45ec | 1455 | ln -snf %{basename:%{_kernelsrcdir}} %{_prefix}/src/linux%{_alt_kernel} |
601b4e87 KT |
1456 | |
1457 | %postun headers | |
32d93861 | 1458 | if [ "$1" = "0" ]; then |
869e45ec | 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} | |
33e92923 | 1462 | fi |
601b4e87 KT |
1463 | fi |
1464 | fi | |
1465 | ||
869e45ec | 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 | ||
c5d76354 | 1475 | %files |
601b4e87 | 1476 | %defattr(644,root,root,755) |
46bb4084 | 1477 | %ifarch sparc sparc64 |
5253d53f | 1478 | /boot/vmlinux.aout-%{kernel_release} |
46bb4084 | 1479 | %endif |
8cd1b586 | 1480 | %ifarch ia64 |
5253d53f | 1481 | /boot/efi/vmlinuz-%{kernel_release} |
8cd1b586 | 1482 | %endif |
5253d53f ER |
1483 | /boot/vmlinuz-%{kernel_release} |
1484 | /boot/System.map-%{kernel_release} | |
f9f0c8d1 | 1485 | %ghost %{initrd_dir}/initrd-%{kernel_release}.gz |
5253d53f ER |
1486 | %dir /lib/modules/%{kernel_release} |
1487 | %dir /lib/modules/%{kernel_release}/kernel | |
f959288b | 1488 | %ifnarch sparc |
5253d53f | 1489 | /lib/modules/%{kernel_release}/kernel/arch |
672a0690 | 1490 | %endif |
5253d53f ER |
1491 | /lib/modules/%{kernel_release}/kernel/crypto |
1492 | /lib/modules/%{kernel_release}/kernel/drivers | |
2a261cfb | 1493 | %if %{have_drm} && %{without myown} |
5253d53f | 1494 | %exclude /lib/modules/%{kernel_release}/kernel/drivers/char/drm |
6c5df6cc | 1495 | %endif |
5253d53f | 1496 | /lib/modules/%{kernel_release}/kernel/fs |
2c421faa | 1497 | |
1498 | # this directory will be removed after disabling rcutorture mod. in 2.6.20. | |
5253d53f | 1499 | /lib/modules/%{kernel_release}/kernel/kernel |
2c421faa | 1500 | |
5253d53f ER |
1501 | /lib/modules/%{kernel_release}/kernel/lib |
1502 | /lib/modules/%{kernel_release}/kernel/net | |
2a261cfb | 1503 | %if %{have_sound} && %{without myown} |
5253d53f | 1504 | %dir /lib/modules/%{kernel_release}/kernel/sound |
b3721d7e | 1505 | /lib/modules/%{kernel_release}/kernel/sound/ac97_bus.ko* |
1506 | /lib/modules/%{kernel_release}/kernel/sound/sound*.ko* | |
2a261cfb | 1507 | %ifnarch sparc |
ff4421de | 1508 | %exclude /lib/modules/%{kernel_release}/kernel/drivers/media/video/cx88/cx88-alsa.ko* |
b3721d7e | 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* | |
04f9b17e | 1511 | %endif |
2a261cfb | 1512 | %endif |
5253d53f | 1513 | %dir /lib/modules/%{kernel_release}/misc |
2a261cfb | 1514 | %if %{with pcmcia} && %{without myown} |
b3721d7e | 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* | |
5253d53f | 1519 | %exclude /lib/modules/%{kernel_release}/kernel/drivers/*/pcmcia |
512e1dc7 | 1520 | %if %{without rescuecd} |
ff4421de | 1521 | %exclude /lib/modules/%{kernel_release}/kernel/drivers/ata/pata_pcmcia.ko* |
5253d53f | 1522 | %exclude /lib/modules/%{kernel_release}/kernel/drivers/bluetooth/*_cs.ko* |
5253d53f | 1523 | %exclude /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/avm_cs.ko* |
144cab6f | 1524 | %exclude /lib/modules/%{kernel_release}/kernel/drivers/telephony/ixj_pcmcia.ko* |
68831084 | 1525 | %exclude /lib/modules/%{kernel_release}/kernel/drivers/usb/gadget/g_midi.ko* |
512e1dc7 | 1526 | %endif |
1527 | %exclude /lib/modules/%{kernel_release}/kernel/drivers/ide/legacy/ide-cs.ko* | |
5253d53f | 1528 | %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/*_cs.ko* |
ff4421de | 1529 | %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/b43 |
5253d53f | 1530 | %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/hostap/hostap_cs.ko* |
ff4421de | 1531 | %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/libertas/*_cs.ko* |
5253d53f ER |
1532 | %exclude /lib/modules/%{kernel_release}/kernel/drivers/parport/parport_cs.ko* |
1533 | %exclude /lib/modules/%{kernel_release}/kernel/drivers/serial/serial_cs.ko* | |
5253d53f ER |
1534 | %exclude /lib/modules/%{kernel_release}/kernel/drivers/usb/host/sl811_cs.ko* |
1535 | %endif | |
5253d53f | 1536 | %ghost /lib/modules/%{kernel_release}/modules.* |
abe120f9 | 1537 | # symlinks pointing to kernelsrcdir |
1538 | %ghost /lib/modules/%{kernel_release}/build | |
1539 | %ghost /lib/modules/%{kernel_release}/source | |
5253d53f | 1540 | %dir %{_sysconfdir}/modprobe.d/%{kernel_release} |
cf06f88a | 1541 | |
c5d76354 JB |
1542 | %ifarch alpha %{ix86} %{x8664} ppc ppc64 sparc sparc64 |
1543 | %files vmlinux | |
1544 | %defattr(644,root,root,755) | |
5253d53f | 1545 | /boot/vmlinux-%{kernel_release} |
c5d76354 JB |
1546 | %endif |
1547 | ||
2a261cfb | 1548 | %if %{have_drm} && %{without myown} |
35fde00b JB |
1549 | %files drm |
1550 | %defattr(644,root,root,755) | |
5253d53f | 1551 | /lib/modules/%{kernel_release}/kernel/drivers/char/drm |
35fde00b JB |
1552 | %endif |
1553 | ||
2a261cfb | 1554 | %if %{with pcmcia} && %{without myown} |
e7ae6cd3 | 1555 | %files pcmcia |
cf06f88a | 1556 | %defattr(644,root,root,755) |
b3721d7e | 1557 | /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/*ko* |
5253d53f | 1558 | /lib/modules/%{kernel_release}/kernel/drivers/*/pcmcia |
b3721d7e | 1559 | %exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/pcmcia*ko* |
512e1dc7 | 1560 | %if %{without rescuecd} |
5253d53f | 1561 | /lib/modules/%{kernel_release}/kernel/drivers/bluetooth/*_cs.ko* |
5253d53f | 1562 | /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/avm_cs.ko* |
144cab6f | 1563 | /lib/modules/%{kernel_release}/kernel/drivers/telephony/ixj_pcmcia.ko* |
512e1dc7 | 1564 | %endif |
ff4421de | 1565 | /lib/modules/%{kernel_release}/kernel/drivers/ata/pata_pcmcia.ko* |
512e1dc7 | 1566 | /lib/modules/%{kernel_release}/kernel/drivers/ide/legacy/ide-cs.ko* |
5253d53f | 1567 | /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/*_cs.ko* |
ff4421de | 1568 | /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/b43 |
5253d53f | 1569 | /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/hostap/hostap_cs.ko* |
ff4421de | 1570 | /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/libertas/*_cs.ko* |
5253d53f ER |
1571 | /lib/modules/%{kernel_release}/kernel/drivers/parport/parport_cs.ko* |
1572 | /lib/modules/%{kernel_release}/kernel/drivers/serial/serial_cs.ko* | |
5253d53f | 1573 | /lib/modules/%{kernel_release}/kernel/drivers/usb/host/sl811_cs.ko* |
35fde00b | 1574 | %endif |
9b3bab6e | 1575 | |
6fb3ffc0 | 1576 | %ifarch ppc-broken |
b443ca49 | 1577 | %if "%{_arch}" == "ppc" |
d779450c | 1578 | %files libs |
1579 | %defattr(644,root,root,755) | |
5253d53f ER |
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 | |
d779450c | 1590 | %endif |
b443ca49 | 1591 | %endif |
d779450c | 1592 | |
2a261cfb | 1593 | %if %{have_sound} && %{without myown} |
35fde00b JB |
1594 | %files sound-alsa |
1595 | %defattr(644,root,root,755) | |
5253d53f ER |
1596 | /lib/modules/%{kernel_release}/kernel/sound |
1597 | %exclude %dir /lib/modules/%{kernel_release}/kernel/sound | |
b3721d7e | 1598 | %exclude /lib/modules/%{kernel_release}/kernel/sound/ac97_bus.ko* |
1599 | %exclude /lib/modules/%{kernel_release}/kernel/sound/sound*.ko* | |
fbb03e0d | 1600 | %if %{have_oss} |
5253d53f | 1601 | %exclude /lib/modules/%{kernel_release}/kernel/sound/oss |
f12ce97e | 1602 | %endif |
2a261cfb | 1603 | %ifnarch sparc |
ff4421de | 1604 | /lib/modules/%{kernel_release}/kernel/drivers/usb/gadget/g_midi.ko* |
ff4421de | 1605 | /lib/modules/%{kernel_release}/kernel/drivers/media/video/cx88/cx88-alsa.ko* |
b3721d7e | 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* | |
2a261cfb | 1608 | %endif |
35fde00b | 1609 | |
2a261cfb | 1610 | %if %{have_oss} && %{without myown} |
35fde00b | 1611 | %files sound-oss |
9b3bab6e | 1612 | %defattr(644,root,root,755) |
5253d53f | 1613 | /lib/modules/%{kernel_release}/kernel/sound/oss |
7291f0f8 | 1614 | %endif |
512e1dc7 | 1615 | %endif |
601b4e87 KT |
1616 | |
1617 | %files headers | |
1618 | %defattr(644,root,root,755) | |
5253d53f ER |
1619 | %dir %{_kernelsrcdir} |
1620 | %{_kernelsrcdir}/include | |
2c421faa | 1621 | %{_kernelsrcdir}/config-dist |
1622 | %{_kernelsrcdir}/Module.symvers-dist | |
d20b1dc0 | 1623 | |
ecc2a0f6 | 1624 | %files module-build -f aux_files |
d20b1dc0 | 1625 | %defattr(644,root,root,755) |
2c421faa | 1626 | # symlinks pointint to kernelsrcdir |
1627 | %dir /lib/modules/%{kernel_release} | |
1628 | /lib/modules/%{kernel_release}/build | |
5253d53f ER |
1629 | %{_kernelsrcdir}/Kbuild |
1630 | %{_kernelsrcdir}/localversion | |
08c11c7a | 1631 | %{_kernelsrcdir}/arch/*/kernel/asm-offsets* |
7bef4bf5 | 1632 | %{_kernelsrcdir}/arch/*/kernel/sigframe*.h |
27dad056 | 1633 | %{_kernelsrcdir}/drivers/lguest/lg.h |
5253d53f ER |
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/* | |
2c421faa | 1645 | %{_kernelsrcdir}/scripts/mkcompile_h |
601b4e87 KT |
1646 | |
1647 | %files doc | |
1648 | %defattr(644,root,root,755) | |
76fa8c91 | 1649 | %dir %{_kernelsrcdir} |
5253d53f | 1650 | %{_kernelsrcdir}/Documentation |
601b4e87 | 1651 | |
402404fb | 1652 | %if %{with source} |
ecc2a0f6 | 1653 | %files source -f aux_files_exc |
601b4e87 | 1654 | %defattr(644,root,root,755) |
5253d53f ER |
1655 | %{_kernelsrcdir}/arch/*/[!Mk]* |
1656 | %{_kernelsrcdir}/arch/*/kernel/[!M]* | |
27dad056 | 1657 | %{_kernelsrcdir}/arch/x86/kvm |
08c11c7a | 1658 | %exclude %{_kernelsrcdir}/arch/*/kernel/asm-offsets* |
7bef4bf5 | 1659 | %exclude %{_kernelsrcdir}/arch/*/kernel/sigframe*.h |
27dad056 | 1660 | %exclude %{_kernelsrcdir}/drivers/lguest/lg.h |
5253d53f ER |
1661 | %{_kernelsrcdir}/block |
1662 | %{_kernelsrcdir}/crypto | |
1663 | %{_kernelsrcdir}/drivers | |
1664 | %{_kernelsrcdir}/fs | |
a52b9424 | 1665 | %if %{with grsecurity} && %{without rescuecd} |
5253d53f ER |
1666 | %{_kernelsrcdir}/grsecurity |
1667 | %endif | |
1668 | %{_kernelsrcdir}/init | |
1669 | %{_kernelsrcdir}/ipc | |
1670 | %{_kernelsrcdir}/kernel | |
1671 | %{_kernelsrcdir}/lib | |
1672 | %{_kernelsrcdir}/mm | |
1673 | %{_kernelsrcdir}/net | |
27dad056 | 1674 | %{_kernelsrcdir}/virt |
5253d53f ER |
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 | |
869e45ec | 1693 | %{_kernelsrcdir}/.mailmap |
9b3bab6e | 1694 | %endif |