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