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