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