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