Some hacks that should make it build
[linux-3.git] / kernel-3.1.spec
1 # We have to override the new %%install behavior because, well... the kernel is special.
2 %global __spec_install_pre %{___build_pre}
3
4 Summary: The Linux kernel
5
6 # For a stable, released kernel, released_kernel should be 1. For rawhide
7 # and/or a kernel built from an rc or git snapshot, released_kernel should
8 # be 0.
9 %global released_kernel 1
10
11 # Save original buildid for later if it's defined
12 %if 0%{?buildid:1}
13 %global orig_buildid %{buildid}
14 %undefine buildid
15 %endif
16
17 ###################################################################
18 # Polite request for people who spin their own kernel rpms:
19 # please modify the "buildid" define in a way that identifies
20 # that the kernel isn't the stock distribution kernel, for example,
21 # by setting the define to ".local" or ".bz123456". This will be
22 # appended to the full kernel version.
23 #
24 # (Uncomment the '#' and both spaces below to set the buildid.)
25 #
26 %define buildid .planetlab
27 ###################################################################
28
29 # The buildid can also be specified on the rpmbuild command line
30 # by adding --define="buildid .whatever". If both the specfile and
31 # the environment define a buildid they will be concatenated together.
32 %if 0%{?orig_buildid:1}
33 %if 0%{?buildid:1}
34 %global srpm_buildid %{buildid}
35 %define buildid %{srpm_buildid}%{orig_buildid}
36 %else
37 %define buildid %{orig_buildid}
38 %endif
39 %endif
40
41 # baserelease defines which build revision of this kernel version we're
42 # building.  We used to call this fedora_build, but the magical name
43 # baserelease is matched by the rpmdev-bumpspec tool, which you should use.
44 #
45 # We used to have some extra magic weirdness to bump this automatically,
46 # but now we don't.  Just use: rpmdev-bumpspec -c 'comment for changelog'
47 # When changing base_sublevel below or going from rc to a final kernel,
48 # reset this by hand to 1 (or to 0 and then use rpmdev-bumpspec).
49 # scripts/rebase.sh should be made to do that for you, actually.
50 #
51 # For non-released -rc kernels, this will be prepended with "0.", so
52 # for example a 3 here will become 0.3
53 #
54 %global baserelease 8
55 %global fedora_build %{baserelease}
56
57 # base_sublevel is the kernel version we're starting with and patching
58 # on top of -- for example, 2.6.22-rc7-git1 starts with a 2.6.21 base,
59 # which yields a base_sublevel of 21.
60 %define base_sublevel 1
61
62 ## If this is a released kernel ##
63 %if 0%{?released_kernel}
64
65 # Do we have a -stable update to apply?
66 %define stable_update 0
67 # Is it a -stable RC?
68 %define stable_rc 0
69 # Set rpm version accordingly
70 %if 0%{?stable_update}
71 %define stablerev %{stable_update}
72 %define stable_base %{stable_update}
73 %if 0%{?stable_rc}
74 # stable RCs are incremental patches, so we need the previous stable patch
75 %define stable_base %(echo $((%{stable_update} - 1)))
76 %endif
77 %endif
78 %define rpmversion 3.%{base_sublevel}.%{stable_update}
79
80 ## The not-released-kernel case ##
81 %else
82 # The next upstream release sublevel (base_sublevel+1)
83 %define upstream_sublevel %(echo $((%{base_sublevel} + 1)))
84 # The rc snapshot level
85 %define rcrev 10
86 # The git snapshot level
87 %define gitrev 1
88 # Set rpm version accordingly
89 %define rpmversion 3.%{upstream_sublevel}.0
90 %endif
91 # Nb: The above rcrev and gitrev values automagically define Patch00 and Patch01 below.
92
93 # What parts do we want to build?  We must build at least one kernel.
94 # These are the kernels that are built IF the architecture allows it.
95 # All should default to 1 (enabled) and be flipped to 0 (disabled)
96 # by later arch-specific checks.
97
98 # The following build options are enabled by default.
99 # Use either --without <opt> in your rpmbuild command or force values
100 # to 0 in here to disable them.
101 #
102 # standard kernel
103 %define with_up        %{?_without_up:        0} %{?!_without_up:        1}
104 # kernel-smp (only valid for ppc 32-bit)
105 %define with_smp       %{?_without_smp:       0} %{?!_without_smp:       1}
106 # kernel-PAE (only valid for i686)
107 %define with_pae       %{?_without_pae:       0} %{?!_without_pae:       1}
108 # kernel-debug
109 %define with_debug     %{?_without_debug:     0} %{?!_without_debug:     1}
110 # kernel-doc
111 %define with_doc       %{?_without_doc:       0} %{?!_without_doc:       1}
112 # kernel-headers
113 %define with_headers   %{?_without_headers:   0} %{?!_without_headers:   1}
114 # tools
115 %define with_tools     %{?_without_tools:     0} %{?!_without_tools:     1}
116 # kernel-debuginfo
117 %define with_debuginfo %{?_without_debuginfo: 0} %{?!_without_debuginfo: 1}
118 # kernel-bootwrapper (for creating zImages from kernel + initrd)
119 %define with_bootwrapper %{?_without_bootwrapper: 0} %{?!_without_bootwrapper: 1}
120 # Want to build a the vsdo directories installed
121 %define with_vdso_install %{?_without_vdso_install: 0} %{?!_without_vdso_install: 1}
122 # ARM OMAP (Beagle/Panda Board)
123 %define with_omap      %{?_without_omap:      0} %{?!_without_omap:      1}
124 # kernel-tegra (only valid for arm)
125 %define with_tegra       %{?_without_tegra:       0} %{?!_without_tegra:       1}
126
127 # Build the kernel-doc package, but don't fail the build if it botches.
128 # Here "true" means "continue" and "false" means "fail the build".
129 %if 0%{?released_kernel}
130 %define doc_build_fail false
131 %else
132 %define doc_build_fail true
133 %endif
134
135 %define rawhide_skip_docs 0
136 %if 0%{?rawhide_skip_docs}
137 %define with_doc 0
138 %define doc_build_fail true
139 %endif
140
141 # Additional options for user-friendly one-off kernel building:
142 #
143 # Only build the base kernel (--with baseonly):
144 %define with_baseonly  %{?_with_baseonly:     1} %{?!_with_baseonly:     0}
145 # Only build the smp kernel (--with smponly):
146 %define with_smponly   %{?_with_smponly:      1} %{?!_with_smponly:      0}
147 # Only build the pae kernel (--with paeonly):
148 %define with_paeonly   %{?_with_paeonly:      1} %{?!_with_paeonly:      0}
149 # Only build the debug kernel (--with dbgonly):
150 %define with_dbgonly   %{?_with_dbgonly:      1} %{?!_with_dbgonly:      0}
151
152 # should we do C=1 builds with sparse
153 %define with_sparse    %{?_with_sparse:       1} %{?!_with_sparse:       0}
154
155 # Set debugbuildsenabled to 1 for production (build separate debug kernels)
156 #  and 0 for rawhide (all kernels are debug kernels).
157 # See also 'make debug' and 'make release'.
158 %define debugbuildsenabled 1
159
160 # Want to build a vanilla kernel build without any non-upstream patches?
161 %define with_vanilla %{?_with_vanilla: 1} %{?!_with_vanilla: 0}
162
163 # pkg_release is what we'll fill in for the rpm Release: field
164 %if 0%{?released_kernel}
165
166 %if 0%{?stable_rc}
167 %define stable_rctag .rc%{stable_rc}
168 %endif
169 %define pkg_release %{fedora_build}%{?stable_rctag}%{?buildid}%{?dist}
170
171 %else
172
173 # non-released_kernel
174 %if 0%{?rcrev}
175 %define rctag .rc%rcrev
176 %else
177 %define rctag .rc0
178 %endif
179 %if 0%{?gitrev}
180 %define gittag .git%gitrev
181 %else
182 %define gittag .git0
183 %endif
184 %define pkg_release 0%{?rctag}%{?gittag}.%{fedora_build}%{?buildid}%{?dist}
185
186 %endif
187
188 # The kernel tarball/base version
189 %define kversion 3.%{base_sublevel}
190
191 %define make_target bzImage
192
193 %define KVERREL %{version}-%{release}.%{_target_cpu}
194 %define hdrarch %_target_cpu
195 %define asmarch %_target_cpu
196
197 %if 0%{!?nopatches:1}
198 %define nopatches 0
199 %endif
200
201 %if %{with_vanilla}
202 %define nopatches 1
203 %endif
204
205 %if %{nopatches}
206 %define with_bootwrapper 0
207 %define variant -vanilla
208 %else
209 %define variant_fedora -fedora
210 %endif
211
212 %define using_upstream_branch 0
213 %if 0%{?upstream_branch:1}
214 %define stable_update 0
215 %define using_upstream_branch 1
216 %define variant -%{upstream_branch}%{?variant_fedora}
217 %define pkg_release 0.%{fedora_build}%{upstream_branch_tag}%{?buildid}%{?dist}
218 %endif
219
220 %if !%{debugbuildsenabled}
221 %define with_debug 0
222 %endif
223
224 %if !%{with_debuginfo}
225 %define _enable_debug_packages 0
226 %endif
227 %define debuginfodir /usr/lib/debug
228
229 # kernel-PAE is only built on i686.
230 %ifnarch i686
231 %define with_pae 0
232 %endif
233
234 # kernel-tegra and omap is only built on armv7 hard and softfp
235 %ifnarch armv7hl armv7l
236 %define with_tegra 0
237 %define with_omap 0
238 %endif
239
240 # if requested, only build base kernel
241 %if %{with_baseonly}
242 %define with_smp 0
243 %define with_pae 0
244 %define with_debug 0
245 %endif
246
247 # if requested, only build smp kernel
248 %if %{with_smponly}
249 %define with_up 0
250 %define with_pae 0
251 %define with_debug 0
252 %endif
253
254 # if requested, only build pae kernel
255 %if %{with_paeonly}
256 %define with_up 0
257 %define with_smp 0
258 %define with_debug 0
259 %endif
260
261 # if requested, only build debug kernel
262 %if %{with_dbgonly}
263 %if %{debugbuildsenabled}
264 %define with_up 0
265 %define with_pae 0
266 %endif
267 %define with_smp 0
268 %define with_pae 0
269 %define with_tools 0
270 %endif
271
272 %define all_x86 i386 i686
273
274 %if %{with_vdso_install}
275 # These arches install vdso/ directories.
276 %define vdso_arches %{all_x86} x86_64 ppc ppc64
277 %endif
278
279 # Overrides for generic default options
280
281 # only ppc and alphav56 need separate smp kernels
282 %ifnarch ppc alphaev56
283 %define with_smp 0
284 %endif
285
286 # don't do debug builds on anything but i686 and x86_64
287 %ifnarch i686 x86_64
288 %define with_debug 0
289 %endif
290
291 # only package docs noarch
292 %ifnarch noarch
293 %define with_doc 0
294 %endif
295
296 # don't build noarch kernels or headers (duh)
297 %ifarch noarch
298 %define with_up 0
299 %define with_headers 0
300 %define with_tools 0
301 %define all_arch_configs kernel-%{version}-*.config
302 %endif
303
304 # bootwrapper is only on ppc
305 %ifnarch ppc ppc64
306 %define with_bootwrapper 0
307 %endif
308
309 # sparse blows up on ppc64 alpha and sparc64
310 %ifarch ppc64 ppc alpha sparc64
311 %define with_sparse 0
312 %endif
313
314 # Per-arch tweaks
315
316 %ifarch %{all_x86}
317 %define asmarch x86
318 %define hdrarch i386
319 %define all_arch_configs kernel-%{version}-i?86*.config
320 %define image_install_path boot
321 %define kernel_image arch/x86/boot/bzImage
322 %endif
323
324 %ifarch x86_64
325 %define asmarch x86
326 %define all_arch_configs kernel-%{version}-x86_64*.config
327 %define image_install_path boot
328 %define kernel_image arch/x86/boot/bzImage
329 %endif
330
331 %ifarch ppc64
332 %define asmarch powerpc
333 %define hdrarch powerpc
334 %define all_arch_configs kernel-%{version}-ppc64*.config
335 %define image_install_path boot
336 %define make_target vmlinux
337 %define kernel_image vmlinux
338 %define kernel_image_elf 1
339 %endif
340
341 %ifarch s390x
342 %define asmarch s390
343 %define hdrarch s390
344 %define all_arch_configs kernel-%{version}-s390x.config
345 %define image_install_path boot
346 %define make_target image
347 %define kernel_image arch/s390/boot/image
348 %define with_tools 0
349 %endif
350
351 %ifarch sparc64
352 %define asmarch sparc
353 %define all_arch_configs kernel-%{version}-sparc64*.config
354 %define make_target vmlinux
355 %define kernel_image vmlinux
356 %define image_install_path boot
357 %define with_tools 0
358 %endif
359
360 %ifarch sparcv9
361 %define hdrarch sparc
362 %endif
363
364 %ifarch ppc
365 %define asmarch powerpc
366 %define hdrarch powerpc
367 %define all_arch_configs kernel-%{version}-ppc{-,.}*config
368 %define image_install_path boot
369 %define make_target vmlinux
370 %define kernel_image vmlinux
371 %define kernel_image_elf 1
372 %endif
373
374 %ifarch ia64
375 %define all_arch_configs kernel-%{version}-ia64*.config
376 %define image_install_path boot/efi/EFI/redhat
377 %define make_target compressed
378 %define kernel_image vmlinux.gz
379 %endif
380
381 %ifarch alpha alphaev56
382 %define all_arch_configs kernel-%{version}-alpha*.config
383 %define image_install_path boot
384 %define make_target vmlinux
385 %define kernel_image vmlinux
386 %endif
387
388 %ifarch %{arm}
389 %define all_arch_configs kernel-%{version}-arm*.config
390 %define image_install_path boot
391 %define asmarch arm
392 %define hdrarch arm
393 %define make_target bzImage
394 %define kernel_image arch/arm/boot/zImage
395 # we build a up kernel on armv5tel. its used for qemu.
396 %ifnarch armv5tel
397 %define with_up 0
398 %endif
399 # we only build headers on the base arm arches
400 # just like we used to only build them on i386 for x86
401 %ifnarch armv5tel armv7hl
402 %define with_headers 0
403 %endif
404 %define with_perf 0
405 %endif
406
407 %if %{nopatches}
408 # XXX temporary until last vdso patches are upstream
409 %define vdso_arches ppc ppc64
410 %endif
411
412 # Should make listnewconfig fail if there's config options
413 # printed out?
414 %if %{nopatches}%{using_upstream_branch}
415 %define listnewconfig_fail 0
416 %else
417 %define listnewconfig_fail 1
418 %endif
419
420 # To temporarily exclude an architecture from being built, add it to
421 # %%nobuildarches. Do _NOT_ use the ExclusiveArch: line, because if we
422 # don't build kernel-headers then the new build system will no longer let
423 # us use the previous build of that package -- it'll just be completely AWOL.
424 # Which is a BadThing(tm).
425
426 # We only build kernel-headers on the following...
427 %define nobuildarches i386 s390 sparc sparcv9
428
429 %ifarch %nobuildarches
430 %define with_up 0
431 %define with_smp 0
432 %define with_pae 0
433 %define with_debuginfo 0
434 %define with_tools 0
435 %define _enable_debug_packages 0
436 %endif
437
438 %define with_pae_debug 0
439 %if %{with_pae}
440 %define with_pae_debug %{with_debug}
441 %endif
442
443 # Architectures we build tools/cpupower on
444 %define cpupowerarchs %{ix86} x86_64 ppc ppc64
445 #%define cpupowerarchs ppc ppc64
446
447 #
448 # Three sets of minimum package version requirements in the form of Conflicts:
449 # to versions below the minimum
450 #
451
452 #
453 # First the general kernel 2.6 required versions as per
454 # Documentation/Changes
455 #
456 %define kernel_dot_org_conflicts  ppp < 2.4.3-3, isdn4k-utils < 3.2-32, nfs-utils < 1.0.7-12, e2fsprogs < 1.37-4, util-linux < 2.12, jfsutils < 1.1.7-2, reiserfs-utils < 3.6.19-2, xfsprogs < 2.6.13-4, procps < 3.2.5-6.3, oprofile < 0.9.1-2, device-mapper-libs < 1.02.63-2, mdadm < 3.2.1-5
457
458 #
459 # Then a series of requirements that are distribution specific, either
460 # because we add patches for something, or the older versions have
461 # problems with the newer kernel or lack certain things that make
462 # integration in the distro harder than needed.
463 #
464 %define package_conflicts initscripts < 7.23, udev < 063-6, iptables < 1.3.2-1, ipw2200-firmware < 2.4, iwl4965-firmware < 228.57.2, selinux-policy-targeted < 1.25.3-14, squashfs-tools < 4.0, wireless-tools < 29-3
465
466 # We moved the drm include files into kernel-headers, make sure there's
467 # a recent enough libdrm-devel on the system that doesn't have those.
468 %define kernel_headers_conflicts libdrm-devel < 2.4.0-0.15
469
470 #
471 # Packages that need to be installed before the kernel is, because the %%post
472 # scripts use them.
473 #
474 %define kernel_prereq  fileutils, module-init-tools >= 3.11.1, initscripts >= 8.11.1-1, grubby >= 7.0.1
475 %define initrd_prereq  dracut >= 001-7
476
477 #
478 # This macro does requires, provides, conflicts, obsoletes for a kernel package.
479 #       %%kernel_reqprovconf <subpackage>
480 # It uses any kernel_<subpackage>_conflicts and kernel_<subpackage>_obsoletes
481 # macros defined above.
482 #
483 %define kernel_reqprovconf \
484 Provides: kernel = %{rpmversion}-%{pkg_release}\
485 Provides: kernel-%{_target_cpu} = %{rpmversion}-%{pkg_release}%{?1:.%{1}}\
486 Provides: kernel-drm = 4.3.0\
487 Provides: kernel-drm-nouveau = 16\
488 Provides: kernel-modeset = 1\
489 Provides: kernel-uname-r = %{KVERREL}%{?1:.%{1}}\
490 Requires(pre): %{kernel_prereq}\
491 Requires(pre): %{initrd_prereq}\
492 Requires(post): /sbin/new-kernel-pkg\
493 Requires(preun): /sbin/new-kernel-pkg\
494 Conflicts: %{kernel_dot_org_conflicts}\
495 Conflicts: %{package_conflicts}\
496 %{expand:%%{?kernel%{?1:_%{1}}_conflicts:Conflicts: %%{kernel%{?1:_%{1}}_conflicts}}}\
497 %{expand:%%{?kernel%{?1:_%{1}}_obsoletes:Obsoletes: %%{kernel%{?1:_%{1}}_obsoletes}}}\
498 %{expand:%%{?kernel%{?1:_%{1}}_provides:Provides: %%{kernel%{?1:_%{1}}_provides}}}\
499 # We can't let RPM do the dependencies automatic because it'll then pick up\
500 # a correct but undesirable perl dependency from the module headers which\
501 # isn't required for the kernel proper to function\
502 AutoReq: no\
503 AutoProv: yes\
504 %{nil}
505
506 Name: kernel%{?variant}
507 Group: System Environment/Kernel
508 License: GPLv2
509 URL: http://www.kernel.org/
510 Version: %{rpmversion}
511 Release: %{pkg_release}
512 # DO NOT CHANGE THE 'ExclusiveArch' LINE TO TEMPORARILY EXCLUDE AN ARCHITECTURE BUILD.
513 # SET %%nobuildarches (ABOVE) INSTEAD
514 ExclusiveArch: noarch %{all_x86} x86_64 ppc ppc64 ia64 %{sparc} s390 s390x alpha alphaev56 %{arm}
515 ExclusiveOS: Linux
516
517 %kernel_reqprovconf
518
519 #
520 # List the packages used during the kernel build
521 #
522 BuildRequires: module-init-tools, patch >= 2.5.4, bash >= 2.03, sh-utils, tar
523 BuildRequires: bzip2, findutils, gzip, m4, perl, make >= 3.78, diffutils, gawk
524 BuildRequires: gcc >= 3.4.2, binutils >= 2.12, redhat-rpm-config
525 BuildRequires: net-tools
526 BuildRequires: xmlto, asciidoc
527 %if %{with_sparse}
528 BuildRequires: sparse >= 0.4.1
529 %endif
530 %if %{with_tools}
531 BuildRequires: elfutils-devel zlib-devel binutils-devel newt-devel python-devel perl(ExtUtils::Embed) pciutils-devel gettext
532 %endif
533 BuildConflicts: rhbuildsys(DiskFree) < 500Mb
534
535 %define fancy_debuginfo 0
536 %if %{with_debuginfo}
537 %if 0%{?fedora} >= 8 || 0%{?rhel} >= 6
538 %define fancy_debuginfo 1
539 %endif
540 %endif
541
542 %if %{fancy_debuginfo}
543 # Fancy new debuginfo generation introduced in Fedora 8.
544 BuildRequires: rpm-build >= 4.4.2.1-4
545 %define debuginfo_args --strict-build-id
546 %endif
547
548 Source0: ftp://ftp.kernel.org/pub/linux/kernel/v3.0/linux-%{kversion}.tar.bz2
549
550 Source11: genkey
551 Source14: find-provides
552 Source15: merge.pl
553
554 Source20: Makefile.config
555 Source21: config-debug
556 Source22: config-nodebug
557 Source23: config-generic
558 Source24: config-rhel-generic
559
560 Source30: config-x86-generic
561 Source31: config-i686-PAE
562 Source32: config-x86-32-generic
563
564 Source40: config-x86_64-generic
565
566 Source50: config-powerpc-generic
567 Source51: config-powerpc32-generic
568 Source52: config-powerpc32-smp
569 Source53: config-powerpc64
570
571 Source60: config-ia64-generic
572
573 Source70: config-s390x
574
575 Source90: config-sparc64-generic
576
577 Source100: config-arm-generic
578 Source110: config-arm-omap-generic
579 Source111: config-arm-tegra
580
581 # This file is intentionally left empty in the stock kernel. Its a nicety
582 # added for those wanting to do custom rebuilds with altered config opts.
583 Source1000: config-local
584
585 # Sources for kernel-tools
586 Source2000: cpupower.service
587 Source2001: cpupower.config
588
589 # Here should be only the patches up to the upstream canonical Linus tree.
590
591 # For a stable release kernel
592 %if 0%{?stable_update}
593 %if 0%{?stable_base}
594 %define    stable_patch_00  patch-3.%{base_sublevel}.%{stable_base}.bz2
595 Patch00: %{stable_patch_00}
596 %endif
597 %if 0%{?stable_rc}
598 %define    stable_patch_01  patch-3.%{base_sublevel}.%{stable_update}-rc%{stable_rc}.bz2
599 Patch01: %{stable_patch_01}
600 %endif
601
602 # non-released_kernel case
603 # These are automagically defined by the rcrev and gitrev values set up
604 # near the top of this spec file.
605 %else
606 %if 0%{?rcrev}
607 Patch00: patch-3.%{upstream_sublevel}-rc%{rcrev}.bz2
608 %if 0%{?gitrev}
609 Patch01: patch-3.%{upstream_sublevel}-rc%{rcrev}-git%{gitrev}.bz2
610 %endif
611 %else
612 # pre-{base_sublevel+1}-rc1 case
613 %if 0%{?gitrev}
614 Patch00: patch-3.%{base_sublevel}-git%{gitrev}.bz2
615 %endif
616 %endif
617 %endif
618
619 %if %{using_upstream_branch}
620 ### BRANCH PATCH ###
621 %endif
622
623 Patch02: git-linus.diff
624
625 # we also need compile fixes for -vanilla
626 Patch04: linux-2.6-compile-fixes.patch
627
628 # build tweak for build ID magic, even for -vanilla
629 Patch05: linux-2.6-makefile-after_link.patch
630
631 %if !%{nopatches}
632
633
634 # revert upstream patches we get via other methods
635 Patch09: linux-2.6-upstream-reverts.patch
636 # Git trees.
637
638 # Standalone patches
639
640 Patch100: taint-vbox.patch
641 Patch160: linux-2.6-32bit-mmap-exec-randomization.patch
642 Patch161: linux-2.6-i386-nx-emulation.patch
643
644 Patch202: linux-2.6-debug-taint-vm.patch
645
646 Patch383: linux-2.6-defaults-aspm.patch
647
648 Patch390: linux-2.6-defaults-acpi-video.patch
649 Patch391: linux-2.6-acpi-video-dos.patch
650 Patch394: linux-2.6-acpi-debug-infinite-loop.patch
651 Patch395: acpi-ensure-thermal-limits-match-cpu-freq.patch
652 Patch396: acpi-sony-nonvs-blacklist.patch
653
654 Patch450: linux-2.6-input-kill-stupid-messages.patch
655 Patch452: linux-2.6.30-no-pcspkr-modalias.patch
656
657 Patch460: linux-2.6-serial-460800.patch
658
659 Patch470: die-floppy-die.patch
660 Patch471: floppy-drop-disable_hlt-warning.patch
661
662 Patch510: linux-2.6-silence-noise.patch
663 Patch530: linux-2.6-silence-fbcon-logo.patch
664
665 Patch700: linux-2.6-e1000-ich9-montevina.patch
666
667 Patch800: linux-2.6-crash-driver.patch
668
669 # crypto/
670
671 # virt + ksm patches
672 Patch1500: fix_xen_guest_on_old_EC2.patch
673
674 # DRM
675
676 # nouveau + drm fixes
677 Patch1810: drm-nouveau-updates.patch
678 # intel drm is all merged upstream
679 Patch1824: drm-intel-next.patch
680 # make sure the lvds comes back on lid open
681 Patch1825: drm-intel-make-lvds-work.patch
682 # hush the i915 fbc noise
683 Patch1826: drm-i915-fbc-stfu.patch
684 # rhbz#729882, https://bugs.freedesktop.org/attachment.cgi?id=49069
685 Patch1827: drm-i915-sdvo-lvds-is-digital.patch
686
687 Patch1850: drm-lower-severity-radeon-lockup.diff
688
689 Patch1900: linux-2.6-intel-iommu-igfx.patch
690
691 # Quiet boot fixes
692 # silence the ACPI blacklist code
693 Patch2802: linux-2.6-silence-acpi-blacklist.patch
694
695 # media patches
696 Patch2899: linux-2.6-v4l-dvb-fixes.patch
697 Patch2900: linux-2.6-v4l-dvb-update.patch
698 Patch2901: linux-2.6-v4l-dvb-experimental.patch
699 Patch2902: linux-2.6-v4l-dvb-uvcvideo-update.patch
700
701 Patch2903: media-DiBcom-protect-the-I2C-bufer-access.patch
702 Patch2904: media-dib0700-protect-the-dib0700-buffer-access.patch
703 Patch2905: media-dib0700-correct-error-message.patch
704
705 Patch3000: rcutree-avoid-false-quiescent-states.patch
706
707 # fs fixes
708
709 # NFSv4
710
711 # patches headed upstream
712 Patch12010: add-appleir-usb-driver.patch
713
714 Patch12016: disable-i8042-check-on-apple-mac.patch
715
716 Patch12021: udlfb-bind-framebuffer-to-interface.patch
717
718 Patch12023: ums-realtek-driver-uses-stack-memory-for-DMA.patch
719 Patch12024: epoll-fix-spurious-lockdep-warnings.patch
720 Patch12025: rcu-avoid-just-onlined-cpu-resched.patch
721 Patch12026: block-stray-block-put-after-teardown.patch
722 Patch12027: usb-add-quirk-for-logitech-webcams.patch
723 Patch12029: crypto-register-cryptd-first.patch
724 Patch12030: epoll-limit-paths.patch
725
726 Patch12303: dmar-disable-when-ricoh-multifunction.patch
727
728 Patch13002: revert-efi-rtclock.patch
729 Patch13003: efi-dont-map-boot-services-on-32bit.patch
730
731 Patch13007: add-macbookair41-keyboard.patch
732
733 Patch13009: hvcs_pi_buf_alloc.patch
734
735 Patch13013: powerpc-Fix-deadlock-in-icswx-code.patch
736
737 Patch13014: iwlagn-fix-ht_params-NULL-pointer-dereference.patch
738
739 Patch20000: utrace.patch
740
741 # Flattened devicetree support
742 Patch21000: arm-omap-dt-compat.patch
743 Patch21001: arm-smsc-support-reading-mac-address-from-device-tree.patch
744
745 #rhbz #722509
746 Patch21002: mmc-Always-check-for-lower-base-frequency-quirk-for-.patch
747
748 #rhbz #735946
749 Patch21020: 0001-mm-vmscan-Limit-direct-reclaim-for-higher-order-allo.patch
750 Patch21021: 0002-mm-Abort-reclaim-compaction-if-compaction-can-procee.patch
751
752 #rhbz 748691
753 Patch21030: be2net-non-member-vlan-pkts-not-received-in-promisco.patch
754 Patch21031: benet-remove-bogus-unlikely-on-vlan-check.patch
755
756 #rhbz 749166
757 Patch21050: xfs-Fix-possible-memory-corruption-in-xfs_readlink.patch
758
759 Patch21070: oom-fix-integer-overflow-of-points.patch
760
761 %endif
762
763 BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root
764
765 %description
766 The kernel package contains the Linux kernel (vmlinuz), the core of any
767 Linux operating system.  The kernel handles the basic functions
768 of the operating system: memory allocation, process allocation, device
769 input and output, etc.
770
771
772 %package doc
773 Summary: Various documentation bits found in the kernel source
774 Group: Documentation
775 %description doc
776 This package contains documentation files from the kernel
777 source. Various bits of information about the Linux kernel and the
778 device drivers shipped with it are documented in these files.
779
780 You'll want to install this package if you need a reference to the
781 options that can be passed to Linux kernel modules at load time.
782
783
784 %package headers
785 Summary: Header files for the Linux kernel for use by glibc
786 Group: Development/System
787 Obsoletes: glibc-kernheaders < 3.0-46
788 Provides: glibc-kernheaders = 3.0-46
789 %description headers
790 Kernel-headers includes the C header files that specify the interface
791 between the Linux kernel and userspace libraries and programs.  The
792 header files define structures and constants that are needed for
793 building most standard programs and are also needed for rebuilding the
794 glibc package.
795
796 %package firmware
797 Summary: Firmware files used by the Linux kernel
798 Group: Development/System
799 # This is... complicated.
800 # Look at the WHENCE file.
801 License: GPL+ and GPLv2+ and MIT and Redistributable, no modification permitted
802 %if "x%{?variant}" != "x"
803 Provides: kernel-firmware = %{rpmversion}-%{pkg_release}
804 %endif
805 %description firmware
806 Kernel-firmware includes firmware files required for some devices to
807 operate.
808
809 %package bootwrapper
810 Summary: Boot wrapper files for generating combined kernel + initrd images
811 Group: Development/System
812 Requires: gzip binutils
813 %description bootwrapper
814 Kernel-bootwrapper contains the wrapper code which makes bootable "zImage"
815 files combining both kernel and initial ramdisk.
816
817 %package debuginfo-common-%{_target_cpu}
818 Summary: Kernel source files used by %{name}-debuginfo packages
819 Group: Development/Debug
820 %description debuginfo-common-%{_target_cpu}
821 This package is required by %{name}-debuginfo subpackages.
822 It provides the kernel source files common to all builds.
823
824 %if %{with_tools}
825 %package -n kernel-tools
826 Summary: Assortment of tools for the Linux kernel
827 Group: Development/System
828 License: GPLv2
829 Obsoletes: perf
830 Provides:  perf
831 Provides:  cpupowerutils = 1:009-0.6.p1
832 Obsoletes: cpupowerutils < 1:009-0.6.p1
833 Provides:  cpufreq-utils = 1:009-0.6.p1
834 Provides:  cpufrequtils = 1:009-0.6.p1
835 Obsoletes: cpufreq-utils < 1:009-0.6.p1
836 Obsoletes: cpufrequtils < 1:009-0.6.p1
837 Obsoletes: cpuspeed < 1:1.5-16
838 %description -n kernel-tools
839 This package contains the tools/ directory from the kernel source
840 - the perf tool and the supporting documentation.
841
842 %package -n kernel-tools-devel
843 Summary: Assortment of tools for the Linux kernel
844 Group: Development/System
845 License: GPLv2
846 Requires: kernel-tools = %{version}-%{release}
847 Provides:  cpupowerutils-devel = 1:009-0.6.p1
848 Obsoletes: cpupowerutils-devel < 1:009-0.6.p1
849 %description -n kernel-tools-devel
850 This package contains the development files for the tools/ directory from
851 the kernel source.
852
853 %package -n kernel-tools-debuginfo
854 Summary: Debug information for package kernel-tools
855 Group: Development/Debug
856 Requires: %{name}-debuginfo-common-%{_target_cpu} = %{version}-%{release}
857 AutoReqProv: no
858 %description -n kernel-tools-debuginfo
859 This package provides debug information for package kernel-tools.
860
861 # Note that this pattern only works right to match the .build-id
862 # symlinks because of the trailing nonmatching alternation and
863 # the leading .*, because of find-debuginfo.sh's buggy handling
864 # of matching the pattern against the symlinks file.
865 %{expand:%%global debuginfo_args %{?debuginfo_args} -p '.*%%{_bindir}/perf(\.debug)?|.*%%{_libexecdir}/perf-core/.*|.*%%{_bindir}/centrino-decode(\.debug)?|.*%%{_bindir}/powernow-k8-decode(\.debug)?|.*%%{_bindir}/cpupower(\.debug)?|.*%%{_libdir}/libcpupower.*|XXX' -o kernel-tools-debuginfo.list}
866 %endif
867
868
869 #
870 # This macro creates a kernel-<subpackage>-debuginfo package.
871 #       %%kernel_debuginfo_package <subpackage>
872 #
873 %define kernel_debuginfo_package() \
874 %package %{?1:%{1}-}debuginfo\
875 Summary: Debug information for package %{name}%{?1:-%{1}}\
876 Group: Development/Debug\
877 Requires: %{name}-debuginfo-common-%{_target_cpu} = %{version}-%{release}\
878 Provides: %{name}%{?1:-%{1}}-debuginfo-%{_target_cpu} = %{version}-%{release}\
879 AutoReqProv: no\
880 %description -n %{name}%{?1:-%{1}}-debuginfo\
881 This package provides debug information for package %{name}%{?1:-%{1}}.\
882 This is required to use SystemTap with %{name}%{?1:-%{1}}-%{KVERREL}.\
883 %{expand:%%global debuginfo_args %{?debuginfo_args} -p '/.*/%%{KVERREL}%{?1:\.%{1}}/.*|/.*%%{KVERREL}%{?1:\.%{1}}(\.debug)?' -o debuginfo%{?1}.list}\
884 %{nil}
885
886 #
887 # This macro creates a kernel-<subpackage>-devel package.
888 #       %%kernel_devel_package <subpackage> <pretty-name>
889 #
890 %define kernel_devel_package() \
891 %package %{?1:%{1}-}devel\
892 Summary: Development package for building kernel modules to match the %{?2:%{2} }kernel\
893 Group: System Environment/Kernel\
894 Provides: kernel%{?1:-%{1}}-devel-%{_target_cpu} = %{version}-%{release}\
895 Provides: kernel-devel-%{_target_cpu} = %{version}-%{release}%{?1:.%{1}}\
896 Provides: kernel-devel = %{version}-%{release}%{?1:.%{1}}\
897 Provides: kernel-devel-uname-r = %{KVERREL}%{?1:.%{1}}\
898 AutoReqProv: no\
899 Requires(pre): /usr/bin/find\
900 Requires: perl\
901 %description -n kernel%{?variant}%{?1:-%{1}}-devel\
902 This package provides kernel headers and makefiles sufficient to build modules\
903 against the %{?2:%{2} }kernel package.\
904 %{nil}
905
906 #
907 # This macro creates a kernel-<subpackage> and its -devel and -debuginfo too.
908 #       %%define variant_summary The Linux kernel compiled for <configuration>
909 #       %%kernel_variant_package [-n <pretty-name>] <subpackage>
910 #
911 %define kernel_variant_package(n:) \
912 %package %1\
913 Summary: %{variant_summary}\
914 Group: System Environment/Kernel\
915 %kernel_reqprovconf\
916 %{expand:%%kernel_devel_package %1 %{!?-n:%1}%{?-n:%{-n*}}}\
917 %{expand:%%kernel_debuginfo_package %1}\
918 %{nil}
919
920
921 # First the auxiliary packages of the main kernel package.
922 %kernel_devel_package
923 %kernel_debuginfo_package
924
925
926 # Now, each variant package.
927
928 %define variant_summary The Linux kernel compiled for SMP machines
929 %kernel_variant_package -n SMP smp
930 %description smp
931 This package includes a SMP version of the Linux kernel. It is
932 required only on machines with two or more CPUs as well as machines with
933 hyperthreading technology.
934
935 Install the kernel-smp package if your machine uses two or more CPUs.
936
937
938 %define variant_summary The Linux kernel compiled for PAE capable machines
939 %kernel_variant_package PAE
940 %description PAE
941 This package includes a version of the Linux kernel with support for up to
942 64GB of high memory. It requires a CPU with Physical Address Extensions (PAE).
943 The non-PAE kernel can only address up to 4GB of memory.
944 Install the kernel-PAE package if your machine has more than 4GB of memory.
945
946
947 %define variant_summary The Linux kernel compiled with extra debugging enabled for PAE capable machines
948 %kernel_variant_package PAEdebug
949 Obsoletes: kernel-PAE-debug
950 %description PAEdebug
951 This package includes a version of the Linux kernel with support for up to
952 64GB of high memory. It requires a CPU with Physical Address Extensions (PAE).
953 The non-PAE kernel can only address up to 4GB of memory.
954 Install the kernel-PAE package if your machine has more than 4GB of memory.
955
956 This variant of the kernel has numerous debugging options enabled.
957 It should only be installed when trying to gather additional information
958 on kernel bugs, as some of these options impact performance noticably.
959
960
961 %define variant_summary The Linux kernel compiled with extra debugging enabled
962 %kernel_variant_package debug
963 %description debug
964 The kernel package contains the Linux kernel (vmlinuz), the core of any
965 Linux operating system.  The kernel handles the basic functions
966 of the operating system:  memory allocation, process allocation, device
967 input and output, etc.
968
969 This variant of the kernel has numerous debugging options enabled.
970 It should only be installed when trying to gather additional information
971 on kernel bugs, as some of these options impact performance noticably.
972
973
974 %define variant_summary The Linux kernel compiled for TI-OMAP boards
975 %kernel_variant_package omap
976 %description omap
977 This package includes a version of the Linux kernel with support for
978 TI-OMAP based systems, i.e., BeagleBoard-xM.
979
980 %define variant_summary The Linux kernel compiled for tegra boards
981 %kernel_variant_package tegra
982 %description tegra
983 This package includes a version of the Linux kernel with support for
984 nvidia tegra based systems, i.e., trimslice, ac-100.
985
986
987 %prep
988 # do a few sanity-checks for --with *only builds
989 %if %{with_baseonly}
990 %if !%{with_up}%{with_pae}
991 echo "Cannot build --with baseonly, up build is disabled"
992 exit 1
993 %endif
994 %endif
995
996 %if %{with_smponly}
997 %if !%{with_smp}
998 echo "Cannot build --with smponly, smp build is disabled"
999 exit 1
1000 %endif
1001 %endif
1002
1003 # more sanity checking; do it quietly
1004 if [ "%{patches}" != "%%{patches}" ] ; then
1005   for patch in %{patches} ; do
1006     if [ ! -f $patch ] ; then
1007       echo "ERROR: Patch  ${patch##/*/}  listed in specfile but is missing"
1008       exit 1
1009     fi
1010   done
1011 fi 2>/dev/null
1012
1013 patch_command='patch -p1 -F1 -s'
1014 ApplyPatch()
1015 {
1016   local patch=$1
1017   shift
1018   if [ ! -f $RPM_SOURCE_DIR/$patch ]; then
1019     exit 1
1020   fi
1021 %if !%{using_upstream_branch}
1022   if ! grep -E "^Patch[0-9]+: $patch\$" %{_specdir}/kernel-3.1.spec ; then
1023     if [ "${patch:0:8}" != "patch-3." ] ; then
1024       echo "ERROR: Patch  $patch  not listed as a source patch in specfile"
1025       exit 1
1026     fi
1027   fi 2>/dev/null
1028 %endif
1029   case "$patch" in
1030   *.bz2) bunzip2 < "$RPM_SOURCE_DIR/$patch" | $patch_command ${1+"$@"} ;;
1031   *.gz) gunzip < "$RPM_SOURCE_DIR/$patch" | $patch_command ${1+"$@"} ;;
1032   *) $patch_command ${1+"$@"} < "$RPM_SOURCE_DIR/$patch" ;;
1033   esac
1034 }
1035
1036 # don't apply patch if it's empty
1037 ApplyOptionalPatch()
1038 {
1039   local patch=$1
1040   shift
1041   if [ ! -f $RPM_SOURCE_DIR/$patch ]; then
1042     exit 1
1043   fi
1044   local C=$(wc -l $RPM_SOURCE_DIR/$patch | awk '{print $1}')
1045   if [ "$C" -gt 9 ]; then
1046     ApplyPatch $patch ${1+"$@"}
1047   fi
1048 }
1049
1050 # we don't want a .config file when building firmware: it just confuses the build system
1051 %define build_firmware \
1052    mv .config .config.firmware_save \
1053    make INSTALL_FW_PATH=$RPM_BUILD_ROOT/lib/firmware firmware_install \
1054    mv .config.firmware_save .config
1055
1056 # First we unpack the kernel tarball.
1057 # If this isn't the first make prep, we use links to the existing clean tarball
1058 # which speeds things up quite a bit.
1059
1060 # Update to latest upstream.
1061 %if 0%{?released_kernel}
1062 %define vanillaversion 3.%{base_sublevel}
1063 # non-released_kernel case
1064 %else
1065 %if 0%{?rcrev}
1066 %define vanillaversion 3.%{upstream_sublevel}-rc%{rcrev}
1067 %if 0%{?gitrev}
1068 %define vanillaversion 3.%{upstream_sublevel}-rc%{rcrev}-git%{gitrev}
1069 %endif
1070 %else
1071 # pre-{base_sublevel+1}-rc1 case
1072 %if 0%{?gitrev}
1073 %define vanillaversion 3.%{base_sublevel}-git%{gitrev}
1074 %else
1075 %define vanillaversion 3.%{base_sublevel}
1076 %endif
1077 %endif
1078 %endif
1079
1080 # %%{vanillaversion} : the full version name, e.g. 2.6.35-rc6-git3
1081 # %%{kversion}       : the base version, e.g. 2.6.34
1082
1083 # Use kernel-%%{kversion}%%{?dist} as the top-level directory name
1084 # so we can prep different trees within a single git directory.
1085
1086 # Build a list of the other top-level kernel tree directories.
1087 # This will be used to hardlink identical vanilla subdirs.
1088 sharedirs=$(find "$PWD" -maxdepth 1 -type d -name 'kernel-3.*' \
1089             | grep -x -v "$PWD"/kernel-%{kversion}%{?dist}) ||:
1090
1091 if [ ! -d kernel-%{kversion}%{?dist}/vanilla-%{vanillaversion} ]; then
1092
1093   if [ -d kernel-%{kversion}%{?dist}/vanilla-%{kversion} ]; then
1094
1095     # The base vanilla version already exists.
1096     cd kernel-%{kversion}%{?dist}
1097
1098     # Any vanilla-* directories other than the base one are stale.
1099     for dir in vanilla-*; do
1100       [ "$dir" = vanilla-%{kversion} ] || rm -rf $dir &
1101     done
1102
1103   else
1104
1105     rm -f pax_global_header
1106     # Look for an identical base vanilla dir that can be hardlinked.
1107     for sharedir in $sharedirs ; do
1108       if [[ ! -z $sharedir  &&  -d $sharedir/vanilla-%{kversion} ]] ; then
1109         break
1110       fi
1111     done
1112     if [[ ! -z $sharedir  &&  -d $sharedir/vanilla-%{kversion} ]] ; then
1113 %setup -q -n kernel-%{kversion}%{?dist} -c -T
1114       cp -rl $sharedir/vanilla-%{kversion} .
1115     else
1116 %setup -q -n kernel-%{kversion}%{?dist} -c
1117       mv linux-%{kversion} vanilla-%{kversion}
1118     fi
1119
1120   fi
1121
1122 %if "%{kversion}" != "%{vanillaversion}"
1123
1124   for sharedir in $sharedirs ; do
1125     if [[ ! -z $sharedir  &&  -d $sharedir/vanilla-%{vanillaversion} ]] ; then
1126       break
1127     fi
1128   done
1129   if [[ ! -z $sharedir  &&  -d $sharedir/vanilla-%{vanillaversion} ]] ; then
1130
1131     cp -rl $sharedir/vanilla-%{vanillaversion} .
1132
1133   else
1134
1135     # Need to apply patches to the base vanilla version.
1136     cp -rl vanilla-%{kversion} vanilla-%{vanillaversion}
1137     cd vanilla-%{vanillaversion}
1138
1139 # Update vanilla to the latest upstream.
1140 # (non-released_kernel case only)
1141 %if 0%{?rcrev}
1142     ApplyPatch patch-3.%{upstream_sublevel}-rc%{rcrev}.bz2
1143 %if 0%{?gitrev}
1144     ApplyPatch patch-3.%{upstream_sublevel}-rc%{rcrev}-git%{gitrev}.bz2
1145 %endif
1146 %else
1147 # pre-{base_sublevel+1}-rc1 case
1148 %if 0%{?gitrev}
1149     ApplyPatch patch-3.%{base_sublevel}-git%{gitrev}.bz2
1150 %endif
1151 %endif
1152
1153     cd ..
1154
1155   fi
1156
1157 %endif
1158
1159 else
1160
1161   # We already have all vanilla dirs, just change to the top-level directory.
1162   cd kernel-%{kversion}%{?dist}
1163
1164 fi
1165
1166 # Now build the fedora kernel tree.
1167 if [ -d linux-%{kversion}.%{_target_cpu} ]; then
1168   # Just in case we ctrl-c'd a prep already
1169   rm -rf deleteme.%{_target_cpu}
1170   # Move away the stale away, and delete in background.
1171   mv linux-%{kversion}.%{_target_cpu} deleteme.%{_target_cpu}
1172   rm -rf deleteme.%{_target_cpu} &
1173 fi
1174
1175 cp -rl vanilla-%{vanillaversion} linux-%{kversion}.%{_target_cpu}
1176
1177 cd linux-%{kversion}.%{_target_cpu}
1178
1179 # released_kernel with possible stable updates
1180 %if 0%{?stable_base}
1181 ApplyPatch %{stable_patch_00}
1182 %endif
1183 %if 0%{?stable_rc}
1184 ApplyPatch %{stable_patch_01}
1185 %endif
1186
1187 %if %{using_upstream_branch}
1188 ### BRANCH APPLY ###
1189 %endif
1190
1191 # Drop some necessary files from the source dir into the buildroot
1192 cp $RPM_SOURCE_DIR/config-* .
1193 cp %{SOURCE15} .
1194
1195 # Dynamically generate kernel .config files from config-* files
1196 make -f %{SOURCE20} VERSION=%{version} configs
1197
1198 %if %{?all_arch_configs:1}%{!?all_arch_configs:0}
1199 #if a rhel kernel, apply the rhel config options
1200 %if 0%{?rhel}
1201   for i in %{all_arch_configs}
1202   do
1203     mv $i $i.tmp
1204     ./merge.pl config-rhel-generic $i.tmp > $i
1205     rm $i.tmp
1206   done
1207 %endif
1208
1209 # Merge in any user-provided local config option changes
1210 for i in %{all_arch_configs}
1211 do
1212   mv $i $i.tmp
1213   ./merge.pl %{SOURCE1000} $i.tmp > $i
1214   rm $i.tmp
1215 done
1216 %endif
1217
1218 ApplyOptionalPatch git-linus.diff
1219
1220 ApplyPatch linux-2.6-makefile-after_link.patch
1221
1222 #
1223 # misc small stuff to make things compile
1224 #
1225 ApplyOptionalPatch linux-2.6-compile-fixes.patch
1226
1227 %if !%{nopatches}
1228
1229 # revert patches from upstream that conflict or that we get via other means
1230 ApplyOptionalPatch linux-2.6-upstream-reverts.patch -R
1231
1232
1233 # Architecture patches
1234 # x86(-64)
1235
1236 #
1237 # ARM
1238 #
1239 ApplyPatch arm-omap-dt-compat.patch
1240 ApplyPatch arm-smsc-support-reading-mac-address-from-device-tree.patch
1241
1242 ApplyPatch taint-vbox.patch
1243 #
1244 # NX Emulation
1245 #
1246 ApplyPatch linux-2.6-32bit-mmap-exec-randomization.patch
1247 ApplyPatch linux-2.6-i386-nx-emulation.patch
1248
1249 #
1250 # bugfixes to drivers and filesystems
1251 #
1252
1253 # ext4
1254
1255 # xfs
1256 ApplyPatch xfs-Fix-possible-memory-corruption-in-xfs_readlink.patch
1257
1258 # btrfs
1259
1260
1261 # eCryptfs
1262
1263 # NFSv4
1264
1265 # USB
1266
1267 # WMI
1268
1269 # ACPI
1270 ApplyPatch linux-2.6-defaults-acpi-video.patch
1271 ApplyPatch linux-2.6-acpi-video-dos.patch
1272 ApplyPatch linux-2.6-acpi-debug-infinite-loop.patch
1273 ApplyPatch acpi-ensure-thermal-limits-match-cpu-freq.patch
1274 ApplyPatch acpi-sony-nonvs-blacklist.patch
1275
1276 # Various low-impact patches to aid debugging.
1277 ApplyPatch linux-2.6-debug-taint-vm.patch
1278
1279 #
1280 # PCI
1281 #
1282 # enable ASPM by default on hardware we expect to work
1283 ApplyPatch linux-2.6-defaults-aspm.patch
1284
1285 #
1286 # SCSI Bits.
1287 #
1288
1289 # ACPI
1290
1291 # ALSA
1292
1293 # Networking
1294
1295
1296 # Misc fixes
1297 # The input layer spews crap no-one cares about.
1298 ApplyPatch linux-2.6-input-kill-stupid-messages.patch
1299
1300 # stop floppy.ko from autoloading during udev...
1301 ApplyPatch die-floppy-die.patch
1302 ApplyPatch floppy-drop-disable_hlt-warning.patch
1303
1304 ApplyPatch linux-2.6.30-no-pcspkr-modalias.patch
1305
1306 # Allow to use 480600 baud on 16C950 UARTs
1307 ApplyPatch linux-2.6-serial-460800.patch
1308
1309 # Silence some useless messages that still get printed with 'quiet'
1310 ApplyPatch linux-2.6-silence-noise.patch
1311
1312 # Make fbcon not show the penguins with 'quiet'
1313 ApplyPatch linux-2.6-silence-fbcon-logo.patch
1314
1315 # Changes to upstream defaults.
1316
1317
1318 # /dev/crash driver.
1319 ApplyPatch linux-2.6-crash-driver.patch
1320
1321 # Hack e1000e to work on Montevina SDV
1322 ApplyPatch linux-2.6-e1000-ich9-montevina.patch
1323
1324 # crypto/
1325
1326 # Assorted Virt Fixes
1327 ApplyPatch fix_xen_guest_on_old_EC2.patch
1328
1329 # DRM core
1330
1331 # Nouveau DRM
1332 ApplyOptionalPatch drm-nouveau-updates.patch
1333
1334 # Intel DRM
1335 ApplyOptionalPatch drm-intel-next.patch
1336 ApplyPatch drm-intel-make-lvds-work.patch
1337 ApplyPatch drm-i915-fbc-stfu.patch
1338 ApplyPatch drm-i915-sdvo-lvds-is-digital.patch
1339
1340 ApplyPatch drm-lower-severity-radeon-lockup.diff
1341
1342 ApplyPatch linux-2.6-intel-iommu-igfx.patch
1343
1344 # silence the ACPI blacklist code
1345 ApplyPatch linux-2.6-silence-acpi-blacklist.patch
1346
1347 # V4L/DVB updates/fixes/experimental drivers
1348 #  apply if non-empty
1349 ApplyOptionalPatch linux-2.6-v4l-dvb-fixes.patch
1350 ApplyOptionalPatch linux-2.6-v4l-dvb-update.patch
1351 ApplyOptionalPatch linux-2.6-v4l-dvb-experimental.patch
1352 #ApplyPatch linux-2.6-v4l-dvb-uvcvideo-update.patch
1353
1354 # Patches headed upstream
1355 ApplyPatch rcutree-avoid-false-quiescent-states.patch
1356
1357 ApplyPatch disable-i8042-check-on-apple-mac.patch
1358
1359 ApplyPatch add-appleir-usb-driver.patch
1360
1361 ApplyPatch udlfb-bind-framebuffer-to-interface.patch
1362 ApplyPatch ums-realtek-driver-uses-stack-memory-for-DMA.patch
1363 ApplyPatch epoll-fix-spurious-lockdep-warnings.patch
1364 ApplyPatch epoll-limit-paths.patch
1365 ApplyPatch rcu-avoid-just-onlined-cpu-resched.patch
1366 ApplyPatch block-stray-block-put-after-teardown.patch
1367 ApplyPatch usb-add-quirk-for-logitech-webcams.patch
1368
1369 ApplyPatch crypto-register-cryptd-first.patch
1370
1371 # rhbz#605888
1372 ApplyPatch dmar-disable-when-ricoh-multifunction.patch
1373
1374 ApplyPatch revert-efi-rtclock.patch
1375 ApplyPatch efi-dont-map-boot-services-on-32bit.patch
1376
1377 ApplyPatch add-macbookair41-keyboard.patch
1378
1379 ApplyPatch hvcs_pi_buf_alloc.patch
1380
1381 ApplyPatch powerpc-Fix-deadlock-in-icswx-code.patch
1382
1383 ApplyPatch iwlagn-fix-ht_params-NULL-pointer-dereference.patch
1384
1385 #rhbz #722509
1386 ApplyPatch mmc-Always-check-for-lower-base-frequency-quirk-for-.patch
1387
1388 ApplyPatch media-DiBcom-protect-the-I2C-bufer-access.patch
1389 ApplyPatch media-dib0700-protect-the-dib0700-buffer-access.patch
1390 ApplyPatch media-dib0700-correct-error-message.patch
1391
1392 # utrace.
1393 ApplyPatch utrace.patch
1394
1395 #rhbz #735946
1396 ApplyPatch 0001-mm-vmscan-Limit-direct-reclaim-for-higher-order-allo.patch
1397 ApplyPatch 0002-mm-Abort-reclaim-compaction-if-compaction-can-procee.patch
1398
1399 #rhbz 748691
1400 ApplyPatch be2net-non-member-vlan-pkts-not-received-in-promisco.patch
1401 ApplyPatch benet-remove-bogus-unlikely-on-vlan-check.patch
1402
1403 #rhbz 750402
1404 ApplyPatch oom-fix-integer-overflow-of-points.patch
1405
1406 # END OF PATCH APPLICATIONS
1407
1408 # BEGIN Planet-Lab Patches
1409 # %(cat planetlab-patches.in)
1410 # END OF Planet-Lab Patches
1411
1412 %endif
1413
1414 # Any further pre-build tree manipulations happen here.
1415
1416 chmod +x scripts/checkpatch.pl
1417
1418 # This Prevents scripts/setlocalversion from mucking with our version numbers.
1419 touch .scmversion
1420
1421 # only deal with configs if we are going to build for the arch
1422 %ifnarch %nobuildarches
1423
1424 mkdir configs
1425
1426 # Remove configs not for the buildarch
1427 for cfg in kernel-%{version}-*.config; do
1428   if [ `echo %{all_arch_configs} | grep -c $cfg` -eq 0 ]; then
1429     rm -f $cfg
1430   fi
1431 done
1432
1433 %if !%{debugbuildsenabled}
1434 rm -f kernel-%{version}-*debug.config
1435 %endif
1436
1437 # now run oldconfig over all the config files
1438 for i in *.config
1439 do
1440   mv $i .config
1441   Arch=`head -1 .config | cut -b 3-`
1442   make ARCH=$Arch listnewconfig | grep -E '^CONFIG_' >.newoptions || true
1443 %if %{listnewconfig_fail}
1444   if [ -s .newoptions ]; then
1445     cat .newoptions
1446     exit 1
1447   fi
1448 %endif
1449   rm -f .newoptions
1450   make ARCH=$Arch oldnoconfig
1451   echo "# $Arch" > configs/$i
1452   cat .config >> configs/$i
1453 done
1454 # end of kernel config
1455 %endif
1456
1457 # get rid of unwanted files resulting from patch fuzz
1458 find . \( -name "*.orig" -o -name "*~" \) -exec rm -f {} \; >/dev/null
1459
1460 # remove unnecessary SCM files
1461 find . -name .gitignore -exec rm -f {} \; >/dev/null
1462
1463 cd ..
1464
1465 ###
1466 ### build
1467 ###
1468 %build
1469
1470 %if %{with_sparse}
1471 %define sparse_mflags   C=1
1472 %endif
1473
1474 %if %{fancy_debuginfo}
1475 # This override tweaks the kernel makefiles so that we run debugedit on an
1476 # object before embedding it.  When we later run find-debuginfo.sh, it will
1477 # run debugedit again.  The edits it does change the build ID bits embedded
1478 # in the stripped object, but repeating debugedit is a no-op.  We do it
1479 # beforehand to get the proper final build ID bits into the embedded image.
1480 # This affects the vDSO images in vmlinux, and the vmlinux image in bzImage.
1481 export AFTER_LINK=\
1482 'sh -xc "/usr/lib/rpm/debugedit -b $$RPM_BUILD_DIR -d /usr/src/debug \
1483                                 -i $@ > $@.id"'
1484 %endif
1485
1486 cp_vmlinux()
1487 {
1488   eu-strip --remove-comment -o "$2" "$1"
1489 }
1490
1491 BuildKernel() {
1492     MakeTarget=$1
1493     KernelImage=$2
1494     Flavour=$3
1495     InstallName=${4:-vmlinuz}
1496
1497     # Pick the right config file for the kernel we're building
1498     Config=kernel-%{version}-%{_target_cpu}${Flavour:+-${Flavour}}.config
1499     DevelDir=/usr/src/kernels/%{KVERREL}${Flavour:+.${Flavour}}
1500
1501     # When the bootable image is just the ELF kernel, strip it.
1502     # We already copy the unstripped file into the debuginfo package.
1503     if [ "$KernelImage" = vmlinux ]; then
1504       CopyKernel=cp_vmlinux
1505     else
1506       CopyKernel=cp
1507     fi
1508
1509     KernelVer=%{version}-%{release}.%{_target_cpu}${Flavour:+.${Flavour}}
1510     echo BUILDING A KERNEL FOR ${Flavour} %{_target_cpu}...
1511
1512     %if 0%{?stable_update}
1513     # make sure SUBLEVEL is incremented on a stable release.  Sigh 3.x.
1514     perl -p -i -e "s/^SUBLEVEL.*/SUBLEVEL = %{?stablerev}/" Makefile
1515     %endif
1516
1517     # make sure EXTRAVERSION says what we want it to say
1518     perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = -%{release}.%{_target_cpu}${Flavour:+.${Flavour}}/" Makefile
1519
1520     # if pre-rc1 devel kernel, must fix up PATCHLEVEL for our versioning scheme
1521     %if !0%{?rcrev}
1522     %if 0%{?gitrev}
1523     perl -p -i -e 's/^PATCHLEVEL.*/PATCHLEVEL = %{upstream_sublevel}/' Makefile
1524     %endif
1525     %endif
1526
1527     # and now to start the build process
1528
1529     make -s mrproper
1530     cp configs/$Config .config
1531
1532     Arch=`head -1 .config | cut -b 3-`
1533     echo USING ARCH=$Arch
1534
1535     make -s ARCH=$Arch oldnoconfig >/dev/null
1536     make -s ARCH=$Arch V=1 %{?_smp_mflags} $MakeTarget %{?sparse_mflags}
1537     make -s ARCH=$Arch V=1 %{?_smp_mflags} modules %{?sparse_mflags} || exit 1
1538
1539     # Start installing the results
1540 %if %{with_debuginfo}
1541     mkdir -p $RPM_BUILD_ROOT%{debuginfodir}/boot
1542     mkdir -p $RPM_BUILD_ROOT%{debuginfodir}/%{image_install_path}
1543 %endif
1544     mkdir -p $RPM_BUILD_ROOT/%{image_install_path}
1545     install -m 644 .config $RPM_BUILD_ROOT/boot/config-$KernelVer
1546     install -m 644 System.map $RPM_BUILD_ROOT/boot/System.map-$KernelVer
1547
1548     # We estimate the size of the initramfs because rpm needs to take this size
1549     # into consideration when performing disk space calculations. (See bz #530778)
1550     dd if=/dev/zero of=$RPM_BUILD_ROOT/boot/initramfs-$KernelVer.img bs=1M count=20
1551
1552     if [ -f arch/$Arch/boot/zImage.stub ]; then
1553       cp arch/$Arch/boot/zImage.stub $RPM_BUILD_ROOT/%{image_install_path}/zImage.stub-$KernelVer || :
1554     fi
1555     $CopyKernel $KernelImage \
1556                 $RPM_BUILD_ROOT/%{image_install_path}/$InstallName-$KernelVer
1557     chmod 755 $RPM_BUILD_ROOT/%{image_install_path}/$InstallName-$KernelVer
1558
1559     mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer
1560     # Override $(mod-fw) because we don't want it to install any firmware
1561     # We'll do that ourselves with 'make firmware_install'
1562     make -s ARCH=$Arch INSTALL_MOD_PATH=$RPM_BUILD_ROOT modules_install KERNELRELEASE=$KernelVer mod-fw=
1563 %ifarch %{vdso_arches}
1564     make -s ARCH=$Arch INSTALL_MOD_PATH=$RPM_BUILD_ROOT vdso_install KERNELRELEASE=$KernelVer
1565     if [ ! -s ldconfig-kernel.conf ]; then
1566       echo > ldconfig-kernel.conf "\
1567 # Placeholder file, no vDSO hwcap entries used in this kernel."
1568     fi
1569     %{__install} -D -m 444 ldconfig-kernel.conf \
1570         $RPM_BUILD_ROOT/etc/ld.so.conf.d/kernel-$KernelVer.conf
1571 %endif
1572
1573     # And save the headers/makefiles etc for building modules against
1574     #
1575     # This all looks scary, but the end result is supposed to be:
1576     # * all arch relevant include/ files
1577     # * all Makefile/Kconfig files
1578     # * all script/ files
1579
1580     rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
1581     rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/source
1582     mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
1583     (cd $RPM_BUILD_ROOT/lib/modules/$KernelVer ; ln -s build source)
1584     # dirs for additional modules per module-init-tools, kbuild/modules.txt
1585     mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/extra
1586     mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/updates
1587     # first copy everything
1588     cp --parents `find  -type f -name "Makefile*" -o -name "Kconfig*"` $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
1589     cp Module.symvers $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
1590     cp System.map $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
1591     if [ -s Module.markers ]; then
1592       cp Module.markers $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
1593     fi
1594     # then drop all but the needed Makefiles/Kconfig files
1595     rm -rf $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/Documentation
1596     rm -rf $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts
1597     rm -rf $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
1598     cp .config $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
1599     cp -a scripts $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
1600     if [ -d arch/$Arch/scripts ]; then
1601       cp -a arch/$Arch/scripts $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/arch/%{_arch} || :
1602     fi
1603     if [ -f arch/$Arch/*lds ]; then
1604       cp -a arch/$Arch/*lds $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/arch/%{_arch}/ || :
1605     fi
1606     rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/*.o
1607     rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/*/*.o
1608 %ifarch ppc
1609     cp -a --parents arch/powerpc/lib/crtsavres.[So] $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
1610 %endif
1611     if [ -d arch/%{asmarch}/include ]; then
1612       cp -a --parents arch/%{asmarch}/include $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
1613     fi
1614     cp -a include $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
1615
1616     # Make sure the Makefile and version.h have a matching timestamp so that
1617     # external modules can be built
1618     touch -r $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/Makefile $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include/linux/version.h
1619     touch -r $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/.config $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include/linux/autoconf.h
1620     # Copy .config to include/config/auto.conf so "make prepare" is unnecessary.
1621     cp $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/.config $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include/config/auto.conf
1622
1623 %if %{fancy_debuginfo}
1624     if test -s vmlinux.id; then
1625       cp vmlinux.id $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/vmlinux.id
1626     else
1627       echo >&2 "*** ERROR *** no vmlinux build ID! ***"
1628       exit 1
1629     fi
1630 %endif
1631
1632     #
1633     # save the vmlinux file for kernel debugging into the kernel-debuginfo rpm
1634     #
1635 %if %{with_debuginfo}
1636     mkdir -p $RPM_BUILD_ROOT%{debuginfodir}/lib/modules/$KernelVer
1637     cp vmlinux $RPM_BUILD_ROOT%{debuginfodir}/lib/modules/$KernelVer
1638 %endif
1639
1640     find $RPM_BUILD_ROOT/lib/modules/$KernelVer -name "*.ko" -type f >modnames
1641
1642     # mark modules executable so that strip-to-file can strip them
1643     xargs --no-run-if-empty chmod u+x < modnames
1644
1645     # Generate a list of modules for block and networking.
1646
1647     grep -F /drivers/ modnames | xargs --no-run-if-empty nm -upA |
1648     sed -n 's,^.*/\([^/]*\.ko\):  *U \(.*\)$,\1 \2,p' > drivers.undef
1649
1650     collect_modules_list()
1651     {
1652       sed -r -n -e "s/^([^ ]+) \\.?($2)\$/\\1/p" drivers.undef |
1653       LC_ALL=C sort -u > $RPM_BUILD_ROOT/lib/modules/$KernelVer/modules.$1
1654     }
1655
1656     collect_modules_list networking \
1657                          'register_netdev|ieee80211_register_hw|usbnet_probe|phy_driver_register|rt2x00(pci|usb)_probe'
1658     collect_modules_list block \
1659                          'ata_scsi_ioctl|scsi_add_host|scsi_add_host_with_dma|blk_init_queue|register_mtd_blktrans|scsi_esp_register|scsi_register_device_handler'
1660     collect_modules_list drm \
1661                          'drm_open|drm_init'
1662     collect_modules_list modesetting \
1663                          'drm_crtc_init'
1664
1665     # detect missing or incorrect license tags
1666     rm -f modinfo
1667     while read i
1668     do
1669       echo -n "${i#$RPM_BUILD_ROOT/lib/modules/$KernelVer/} " >> modinfo
1670       /sbin/modinfo -l $i >> modinfo
1671     done < modnames
1672
1673     grep -E -v \
1674           'GPL( v2)?$|Dual BSD/GPL$|Dual MPL/GPL$|GPL and additional rights$' \
1675           modinfo && exit 1
1676
1677     rm -f modinfo modnames
1678
1679     # remove files that will be auto generated by depmod at rpm -i time
1680     for i in alias alias.bin builtin.bin ccwmap dep dep.bin ieee1394map inputmap isapnpmap ofmap pcimap seriomap symbols symbols.bin usbmap
1681     do
1682       rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/modules.$i
1683     done
1684
1685     # Move the devel headers out of the root file system
1686     mkdir -p $RPM_BUILD_ROOT/usr/src/kernels
1687     mv $RPM_BUILD_ROOT/lib/modules/$KernelVer/build $RPM_BUILD_ROOT/$DevelDir
1688     ln -sf ../../..$DevelDir $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
1689
1690     # prune junk from kernel-devel
1691     find $RPM_BUILD_ROOT/usr/src/kernels -name ".*.cmd" -exec rm -f {} \;
1692 }
1693
1694 ###
1695 # DO it...
1696 ###
1697
1698 # prepare directories
1699 rm -rf $RPM_BUILD_ROOT
1700 mkdir -p $RPM_BUILD_ROOT/boot
1701 mkdir -p $RPM_BUILD_ROOT%{_libexecdir}
1702
1703 cd linux-%{kversion}.%{_target_cpu}
1704
1705 %if %{with_debug}
1706 BuildKernel %make_target %kernel_image debug
1707 %endif
1708
1709 %if %{with_pae_debug}
1710 BuildKernel %make_target %kernel_image PAEdebug
1711 %endif
1712
1713 %if %{with_pae}
1714 BuildKernel %make_target %kernel_image PAE
1715 %endif
1716
1717 %if %{with_omap}
1718 BuildKernel %make_target %kernel_image omap
1719 %endif
1720
1721 %if %{with_tegra}
1722 BuildKernel %make_target %kernel_image tegra
1723 %endif
1724
1725 %if %{with_up}
1726 BuildKernel %make_target %kernel_image
1727 %endif
1728
1729 %if %{with_smp}
1730 BuildKernel %make_target %kernel_image smp
1731 %endif
1732
1733 %if %{with_tools}
1734 # perf
1735 make %{?_smp_mflags} -C tools/perf -s V=1 HAVE_CPLUS_DEMANGLE=1 prefix=%{_prefix} all
1736 make %{?_smp_mflags} -C tools/perf -s V=1 prefix=%{_prefix} man || %{doc_build_fail}
1737
1738 %ifarch %{cpupowerarchs}
1739 # cpupower
1740 # make sure version-gen.sh is executable.
1741 chmod +x tools/power/cpupower/utils/version-gen.sh
1742 make %{?_smp_mflags} -C tools/power/cpupower CPUFREQ_BENCH=false
1743 %ifarch %{ix86}
1744     cd tools/power/cpupower/debug/i386
1745     make %{?_smp_mflags} centrino-decode powernow-k8-decode
1746     cd -
1747 %endif
1748 %ifarch x86_64
1749     cd tools/power/cpupower/debug/x86_64
1750     make %{?_smp_mflags} centrino-decode powernow-k8-decode
1751     cd -
1752 %endif
1753 %endif
1754 %endif
1755
1756 %if %{with_doc}
1757 # Make the HTML and man pages.
1758 make htmldocs mandocs || %{doc_build_fail}
1759
1760 # sometimes non-world-readable files sneak into the kernel source tree
1761 chmod -R a=rX Documentation
1762 find Documentation -type d | xargs chmod u+w
1763 %endif
1764
1765 ###
1766 ### Special hacks for debuginfo subpackages.
1767 ###
1768
1769 # This macro is used by %%install, so we must redefine it before that.
1770 %define debug_package %{nil}
1771
1772 %if %{fancy_debuginfo}
1773 %define __debug_install_post \
1774   /usr/lib/rpm/find-debuginfo.sh %{debuginfo_args} %{_builddir}/%{?buildsubdir}\
1775 %{nil}
1776 %endif
1777
1778 %if %{with_debuginfo}
1779 %ifnarch noarch
1780 %global __debug_package 1
1781 %files -f debugfiles.list debuginfo-common-%{_target_cpu}
1782 %defattr(-,root,root)
1783 %endif
1784 %endif
1785
1786 ###
1787 ### install
1788 ###
1789
1790 %install
1791
1792 cd linux-%{kversion}.%{_target_cpu}
1793
1794 %if %{with_doc}
1795 docdir=$RPM_BUILD_ROOT%{_datadir}/doc/kernel-doc-%{rpmversion}
1796 man9dir=$RPM_BUILD_ROOT%{_datadir}/man/man9
1797
1798 # copy the source over
1799 mkdir -p $docdir
1800 tar -f - --exclude=man --exclude='.*' -c Documentation | tar xf - -C $docdir
1801
1802 # Install man pages for the kernel API.
1803 mkdir -p $man9dir
1804 find Documentation/DocBook/man -name '*.9.gz' -print0 |
1805 xargs -0 --no-run-if-empty %{__install} -m 444 -t $man9dir $m
1806 ls $man9dir | grep -q '' || > $man9dir/BROKEN
1807 %endif # with_doc
1808
1809 # We have to do the headers install before the tools install because the
1810 # kernel headers_install will remove any header files in /usr/include that
1811 # it doesn't install itself.
1812
1813 %if %{with_headers}
1814 # Install kernel headers
1815 make ARCH=%{hdrarch} INSTALL_HDR_PATH=$RPM_BUILD_ROOT/usr headers_install
1816
1817 # Do headers_check but don't die if it fails.
1818 make ARCH=%{hdrarch} INSTALL_HDR_PATH=$RPM_BUILD_ROOT/usr headers_check \
1819      > hdrwarnings.txt || :
1820 if grep -q exist hdrwarnings.txt; then
1821    sed s:^$RPM_BUILD_ROOT/usr/include/:: hdrwarnings.txt
1822    # Temporarily cause a build failure if header inconsistencies.
1823    # exit 1
1824 fi
1825
1826 find $RPM_BUILD_ROOT/usr/include \
1827      \( -name .install -o -name .check -o \
1828         -name ..install.cmd -o -name ..check.cmd \) | xargs rm -f
1829
1830 # glibc provides scsi headers for itself, for now
1831 rm -rf $RPM_BUILD_ROOT/usr/include/scsi
1832 rm -f $RPM_BUILD_ROOT/usr/include/asm*/atomic.h
1833 rm -f $RPM_BUILD_ROOT/usr/include/asm*/io.h
1834 rm -f $RPM_BUILD_ROOT/usr/include/asm*/irq.h
1835 %endif
1836
1837 %if %{with_tools}
1838 # perf tool binary and supporting scripts/binaries
1839 make -C tools/perf -s V=1 DESTDIR=$RPM_BUILD_ROOT HAVE_CPLUS_DEMANGLE=1 prefix=%{_prefix} install
1840
1841 # perf man pages (note: implicit rpm magic compresses them later)
1842 make -C tools/perf  -s V=1 DESTDIR=$RPM_BUILD_ROOT HAVE_CPLUS_DEMANGLE=1 prefix=%{_prefix} install-man || %{doc_build_fail}
1843
1844 %ifarch %{cpupowerarchs}
1845 make -C tools/power/cpupower DESTDIR=$RPM_BUILD_ROOT libdir=%{_libdir} mandir=%{_mandir} CPUFREQ_BENCH=false install
1846 rm -f %{buildroot}%{_libdir}/*.{a,la}
1847 %find_lang cpupower
1848 mv cpupower.lang ../
1849 %ifarch %{ix86}
1850     cd tools/power/cpupower/debug/i386
1851     install -m755 centrino-decode %{buildroot}%{_bindir}/centrino-decode
1852     install -m755 powernow-k8-decode %{buildroot}%{_bindir}/powernow-k8-decode
1853     cd -
1854 %endif
1855 %ifarch x86_64
1856     cd tools/power/cpupower/debug/x86_64
1857     install -m755 centrino-decode %{buildroot}%{_bindir}/centrino-decode
1858     install -m755 powernow-k8-decode %{buildroot}%{_bindir}/powernow-k8-decode
1859     cd -
1860 %endif
1861 chmod 0755 %{buildroot}%{_libdir}/libcpupower.so*
1862 mkdir -p %{buildroot}%{_unitdir} %{buildroot}%{_sysconfdir}/sysconfig
1863 install -m644 %{SOURCE2000} %{buildroot}%{_unitdir}/cpupower.service
1864 install -m644 %{SOURCE2001} %{buildroot}%{_sysconfdir}/sysconfig/cpupower
1865 %endif
1866
1867 %endif
1868
1869 %if %{with_bootwrapper}
1870 make DESTDIR=$RPM_BUILD_ROOT bootwrapper_install WRAPPER_OBJDIR=%{_libdir}/kernel-wrapper WRAPPER_DTSDIR=%{_libdir}/kernel-wrapper/dts
1871 %endif
1872
1873
1874 ###
1875 ### clean
1876 ###
1877
1878 %clean
1879 rm -rf $RPM_BUILD_ROOT
1880
1881 ###
1882 ### scripts
1883 ###
1884
1885 %if %{with_tools}
1886 %post -n kernel-tools
1887 /sbin/ldconfig
1888
1889 %postun -n kernel-tools
1890 /sbin/ldconfig
1891 %endif
1892
1893 #
1894 # This macro defines a %%post script for a kernel*-devel package.
1895 #       %%kernel_devel_post [<subpackage>]
1896 #
1897 %define kernel_devel_post() \
1898 %{expand:%%post %{?1:%{1}-}devel}\
1899 if [ -f /etc/sysconfig/kernel ]\
1900 then\
1901     . /etc/sysconfig/kernel || exit $?\
1902 fi\
1903 if [ "$HARDLINK" != "no" -a -x /usr/sbin/hardlink ]\
1904 then\
1905     (cd /usr/src/kernels/%{KVERREL}%{?1:.%{1}} &&\
1906      /usr/bin/find . -type f | while read f; do\
1907        hardlink -c /usr/src/kernels/*.fc*.*/$f $f\
1908      done)\
1909 fi\
1910 %{nil}
1911
1912
1913 # This macro defines a %%posttrans script for a kernel package.
1914 #       %%kernel_variant_posttrans [<subpackage>]
1915 # More text can follow to go at the end of this variant's %%post.
1916 #
1917 %define kernel_variant_posttrans() \
1918 %{expand:%%posttrans %{?1}}\
1919 /sbin/new-kernel-pkg --package kernel%{?-v:-%{-v*}} --mkinitrd --dracut --depmod --update %{KVERREL}%{?-v:.%{-v*}} || exit $?\
1920 /sbin/new-kernel-pkg --package kernel%{?1:-%{1}} --rpmposttrans %{KVERREL}%{?1:.%{1}} || exit $?\
1921 pushd /boot || exit $?\
1922 /bin/ln -sf config-%{KVERREL}%{?1:.%{1}} config || exit $?\
1923 /bin/ln -sf config-%{KVERREL}%{?1:.%{1}} configsmp || exit $?\
1924 /bin/ln -sf initrd-%{KVERREL}%{?1:.%{1}}.img initrd-boot || exit $?\
1925 /bin/ln -sf initrd-%{KVERREL}%{?1:.%{1}}.img initrd-bootsmp || exit $?\
1926 /bin/ln -sf vmlinuz-%{KVERREL}%{?1:.%{1}} kernel-boot || exit $?\
1927 /bin/ln -sf vmlinuz-%{KVERREL}%{?1:.%{1}} kernel-bootsmp || exit $?\
1928 popd || exit $?\
1929 /bin/mkdir -p /etc/planetlab || exit $?\
1930 /bin/touch /etc/planetlab/update-reboot || exit $?\
1931 %{nil}
1932
1933 #
1934 # This macro defines a %%post script for a kernel package and its devel package.
1935 #       %%kernel_variant_post [-v <subpackage>] [-r <replace>]
1936 # More text can follow to go at the end of this variant's %%post.
1937 #
1938 %define kernel_variant_post(v:r:) \
1939 %{expand:%%kernel_devel_post %{?-v*}}\
1940 %{expand:%%kernel_variant_posttrans %{?-v*}}\
1941 %{expand:%%post %{?-v*}}\
1942 %{-r:\
1943 if [ `uname -i` == "x86_64" -o `uname -i` == "i386" ] &&\
1944    [ -f /etc/sysconfig/kernel ]; then\
1945   /bin/sed -r -i -e 's/^DEFAULTKERNEL=%{-r*}$/DEFAULTKERNEL=kernel%{?-v:-%{-v*}}/' /etc/sysconfig/kernel || exit $?\
1946 fi}\
1947 %{expand:\
1948 /sbin/new-kernel-pkg --package kernel%{?-v:-%{-v*}} --install %{KVERREL}%{?-v:.%{-v*}} || exit $?\
1949 }\
1950 %{nil}
1951
1952 #
1953 # This macro defines a %%preun script for a kernel package.
1954 #       %%kernel_variant_preun <subpackage>
1955 #
1956 %define kernel_variant_preun() \
1957 %{expand:%%preun %{?1}}\
1958 /sbin/new-kernel-pkg --rminitrd --rmmoddep --remove %{KVERREL}%{?1:.%{1}} || exit $?\
1959 %{nil}
1960
1961 %kernel_variant_preun
1962 %kernel_variant_post -r kernel-smp
1963
1964 %kernel_variant_preun smp
1965 %kernel_variant_post -v smp
1966
1967 %kernel_variant_preun PAE
1968 %kernel_variant_post -v PAE -r (kernel|kernel-smp)
1969
1970 %kernel_variant_preun debug
1971 %kernel_variant_post -v debug
1972
1973 %kernel_variant_post -v PAEdebug -r (kernel|kernel-smp)
1974 %kernel_variant_preun PAEdebug
1975
1976 %kernel_variant_preun omap
1977 %kernel_variant_post -v omap
1978
1979 %kernel_variant_preun tegra
1980 %kernel_variant_post -v tegra
1981
1982 pushd /boot || exit $?
1983 /bin/ln -sf config-%{KVERREL}%{?1:.%{1}} config || exit $?
1984 /bin/ln -sf config-%{KVERREL}%{?1:.%{1}} configsmp || exit $?
1985 /bin/ln -sf initrd-%{KVERREL}%{?1:.%{1}}.img initrd-boot || exit $?
1986 /bin/ln -sf initrd-%{KVERREL}%{?1:.%{1}}.img initrd-bootsmp || exit $?
1987 /bin/ln -sf vmlinuz-%{KVERREL}%{?1:.%{1}} kernel-boot || exit $?
1988 /bin/ln -sf vmlinuz-%{KVERREL}%{?1:.%{1}} kernel-bootsmp || exit $?
1989 popd || exit $?
1990 /bin/mkdir -p /etc/planetlab || exit $?
1991 /bin/touch /etc/planetlab/update-reboot || exit $?
1992
1993 if [ -x /sbin/ldconfig ]
1994 then
1995     /sbin/ldconfig -X || exit $?
1996 fi
1997
1998 ###
1999 ### file lists
2000 ###
2001
2002 %if %{with_headers}
2003 %files headers
2004 %defattr(-,root,root)
2005 /usr/include/*
2006 %endif
2007
2008 %if %{with_bootwrapper}
2009 %files bootwrapper
2010 %defattr(-,root,root)
2011 /usr/sbin/*
2012 %{_libdir}/kernel-wrapper
2013 %endif
2014
2015 # only some architecture builds need kernel-doc
2016 %if %{with_doc}
2017 %files doc
2018 %defattr(-,root,root)
2019 %{_datadir}/doc/kernel-doc-%{rpmversion}/Documentation/*
2020 %dir %{_datadir}/doc/kernel-doc-%{rpmversion}/Documentation
2021 %dir %{_datadir}/doc/kernel-doc-%{rpmversion}
2022 %{_datadir}/man/man9/*
2023 %endif
2024
2025 %if %{with_tools}
2026 #%files -n kernel-tools -f cpupower.lang
2027 %defattr(-,root,root)
2028 %{_bindir}/perf
2029 %dir %{_libexecdir}/perf-core
2030 %{_libexecdir}/perf-core/*
2031 %{_mandir}/man[1-8]/*
2032
2033 %ifarch %{cpupowerarchs}
2034 %{_bindir}/cpupower
2035 %ifarch %{ix86} x86_64
2036 %{_bindir}/centrino-decode
2037 %{_bindir}/powernow-k8-decode
2038 %endif
2039 %{_libdir}/libcpupower.so.0
2040 %{_libdir}/libcpupower.so.0.0.0
2041 %{_unitdir}/cpupower.service
2042 %config(noreplace) %{_sysconfdir}/sysconfig/cpupower
2043 %endif
2044
2045 %if %{with_debuginfo}
2046 %files -f kernel-tools-debuginfo.list -n kernel-tools-debuginfo
2047 %defattr(-,root,root)
2048 %endif
2049
2050 %ifarch %{cpupowerarchs}
2051 %files -n kernel-tools-devel
2052 %{_libdir}/libcpupower.so
2053 %{_includedir}/cpufreq.h
2054 %endif
2055 %endif
2056
2057 # This is %%{image_install_path} on an arch where that includes ELF files,
2058 # or empty otherwise.
2059 %define elf_image_install_path %{?kernel_image_elf:%{image_install_path}}
2060
2061 #
2062 # This macro defines the %%files sections for a kernel package
2063 # and its devel and debuginfo packages.
2064 #       %%kernel_variant_files [-k vmlinux] <condition> <subpackage>
2065 #
2066 %define kernel_variant_files(k:) \
2067 %if %{1}\
2068 %{expand:%%files %{?2}}\
2069 %defattr(-,root,root)\
2070 /%{image_install_path}/%{?-k:%{-k*}}%{!?-k:vmlinuz}-%{KVERREL}%{?2:.%{2}}\
2071 %attr(600,root,root) /boot/System.map-%{KVERREL}%{?2:.%{2}}\
2072 /boot/config-%{KVERREL}%{?2:.%{2}}\
2073 %dir /lib/modules/%{KVERREL}%{?2:.%{2}}\
2074 /lib/modules/%{KVERREL}%{?2:.%{2}}/kernel\
2075 /lib/modules/%{KVERREL}%{?2:.%{2}}/build\
2076 /lib/modules/%{KVERREL}%{?2:.%{2}}/source\
2077 /lib/modules/%{KVERREL}%{?2:.%{2}}/extra\
2078 /lib/modules/%{KVERREL}%{?2:.%{2}}/updates\
2079 %ifarch %{vdso_arches}\
2080 /lib/modules/%{KVERREL}%{?2:.%{2}}/vdso\
2081 /etc/ld.so.conf.d/kernel-%{KVERREL}%{?2:.%{2}}.conf\
2082 %endif\
2083 /lib/modules/%{KVERREL}%{?2:.%{2}}/modules.*\
2084 %ghost /boot/initramfs-%{KVERREL}%{?2:.%{2}}.img\
2085 %{expand:%%files %{?2:%{2}-}devel}\
2086 %defattr(-,root,root)\
2087 /usr/src/kernels/%{KVERREL}%{?2:.%{2}}\
2088 %if %{with_debuginfo}\
2089 %ifnarch noarch\
2090 %if %{fancy_debuginfo}\
2091 %{expand:%%files -f debuginfo%{?2}.list %{?2:%{2}-}debuginfo}\
2092 %else\
2093 %{expand:%%files %{?2:%{2}-}debuginfo}\
2094 %endif\
2095 %defattr(-,root,root)\
2096 %if !%{fancy_debuginfo}\
2097 %if "%{elf_image_install_path}" != ""\
2098 %{debuginfodir}/%{elf_image_install_path}/*-%{KVERREL}%{?2:.%{2}}.debug\
2099 %endif\
2100 %{debuginfodir}/lib/modules/%{KVERREL}%{?2:.%{2}}\
2101 %{debuginfodir}/usr/src/kernels/%{KVERREL}%{?2:.%{2}}\
2102 %endif\
2103 %endif\
2104 %endif\
2105 %endif\
2106 %{nil}
2107
2108
2109 %kernel_variant_files %{with_up}
2110 %kernel_variant_files %{with_smp} smp
2111 %kernel_variant_files %{with_debug} debug
2112 %kernel_variant_files %{with_pae} PAE
2113 %kernel_variant_files %{with_pae_debug} PAEdebug
2114 %kernel_variant_files %{with_omap} omap
2115 %kernel_variant_files %{with_tegra} tegra
2116
2117 # plz don't put in a version string unless you're going to tag
2118 # and build.
2119
2120 %changelog
2121 * Tue Nov  1 2011 Josh Boyer <jwboyer@redhat.com> 3.1.0-7
2122 - Drop x86-efi-Calling-__pa-with-an-ioremap-address-is-invalid (rhbz 748516)
2123
2124 * Mon Oct 31 2011 Josh Boyer <jwboyer@redhat.com>
2125 - CVE-2011-4097: oom_badness() integer overflow (rhbz 750402)
2126
2127 * Fri Oct 28 2011 Josh Boyer <jwboyer@redhat.com>
2128 - Add patch to prevent tracebacks on a warning in floppy.c (rhbz 749887)
2129
2130 * Wed Oct 26 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.0-5
2131 - Rebuilt for glibc bug#747377
2132
2133 * Wed Oct 26 2011 Josh Boyer <jwboyer@redhat.com>
2134 - CVE-2011-4077: xfs: potential buffer overflow in xfs_readlink() (rhbz 749166)
2135
2136 * Tue Oct 25 2011 Josh Boyer <jwboyer@redhat.com>
2137 - CVE-2011-3347: be2net: promiscuous mode and non-member VLAN packets DoS (rhbz 748691)
2138 - CVE-2011-1083: excessive in kernel CPU consumption when creating large nested epoll structures (rhbz 748668)
2139
2140 * Mon Oct 24 2011 Josh Boyer <jwboyer@redhat.com>
2141 - Backport 3 fixed from linux-next to fix dib0700 playback (rhbz 733827)
2142
2143 * Mon Oct 24 2011 Chuck Ebbert <cebbert@redhat.com> 3.1.0-1
2144 - Linux 3.1
2145
2146 * Fri Oct 21 2011 Chuck Ebbert <cebbert@redhat.com> 3.1.0-0.rc10.git1.1
2147 - Update to upstream HEAD (v3.1-rc10-42-g2efd7c0)
2148
2149 * Fri Oct 21 2011 Dave Jones <davej@redhat.com>
2150 - Lower severity of Radeon lockup messages.
2151
2152 * Wed Oct 19 2011 Dave Jones <davej@redhat.com>
2153 - Add Sony VGN-FW21E to nonvs blacklist. (rhbz 641789)
2154
2155 * Wed Oct 19 2011 Chuck Ebbert <cebbert@redhat.com> 3.1.0-0.rc10.git0.1
2156 - Fix divide-by-zero in nouveau driver (rhbz #747129)
2157
2158 * Tue Oct 18 2011 Chuck Ebbert <cebbert@redhat.com>
2159 - Fix lock inversion causing hangs in 3.1-rc9 (rhbz #746485)
2160 - Linux 3.1-rc10
2161
2162 * Tue Oct 18 2011 Josh Boyer <jwboyer@redhat.com>
2163 - Add patch to fix invalid EFI remap calls from Matt Fleming
2164
2165 * Mon Oct 17 2011 Josh Boyer <jwboyer@redhat.com>
2166 - Add two patches to fix stalls in khugepaged (rhbz 735946)
2167
2168 * Thu Oct 13 2011 Josh Boyer <jwboyer@redhat.com>
2169 - Update usb-add-quirk-for-logitech-webcams.patch with C600 ID (rhbz 742010)
2170
2171 * Thu Oct 13 2011 Adam Jackson <ajax@redhat.com>
2172 - drm/i915: Treat SDVO LVDS as digital when parsing EDID (#729882)
2173
2174 * Thu Oct 13 2011 Josh Boyer <jwboyer@redhat.com>
2175 - Add patch from Stanislaw Gruszka to fix iwlagn NULL dereference (rhbz 744155)
2176
2177 * Tue Oct 11 2011 Josh Boyer <jwboyer@redhat.com>
2178 - Disable CONFIG_XEN_BALLOON_MEMORY_HOTPLUG (rhbz 744408)
2179
2180 * Thu Oct 06 2011 Josh Boyer <jwboyer@redhat.com>
2181 - Add patch to fix base frequency check for Ricoh e823 devices (rhbz 722509)
2182
2183 * Thu Oct 06 2011 Dave Jones <davej@redhat.com>
2184 - Taint if virtualbox modules have been loaded.
2185
2186 * Wed Oct 05 2011 Chuck Ebbert <cebbert@redhat.com> 3.1.0-0.rc9.git0.0
2187 - Linux 3.1-rc9
2188
2189 * Mon Oct 03 2011 Chuck Ebbert <cebbert@redhat.com> 3.1.0-0.rc8.git0.1
2190 - block: Free queue resources at blk_release_queue()
2191
2192 * Thu Sep 29 2011 Chuck Ebbert <cebbert@redhat.com>
2193 - Require grubby >= 8.3-1 so initrd line gets added (rhbz #725185)
2194
2195 * Thu Sep 29 2011 Josh Boyer <jwboyer@redhat.com>
2196 - Update logitech USB quirk patch
2197
2198 * Tue Sep 27 2011 Chuck Ebbert <cebbert@redhat.com> 3.1.0-0.rc8.git0.0
2199 - Linux 3.1-rc8
2200 - New option: CONFIG_ARM_ERRATA_764369 is not set
2201 - Fix up utrace.patch to apply after commit f9d81f61c
2202
2203 * Thu Sep 22 2011 Dave Jones <davej@redhat.com>
2204 - Make CONFIG_XEN_PLATFORM_PCI=y (rhbz 740664)
2205
2206 * Thu Sep 22 2011 Dennis Gilmore <dennis@ausil.us>
2207 - build vmlinux image for sparc64
2208
2209 * Wed Sep 21 2011 Josh Boyer <jwboyer@redhat.com>
2210 - Linux 3.1-rc7
2211
2212 * Tue Sep 20 2011 Dave Jones <davej@redhat.com>
2213 - Limit 32-bit x86 kernels to 32 processors.
2214
2215 * Tue Sep 20 2011 Ben Skeggs <bskeggs@redhat.com> 3.1.0-0.rc6.git0.4.fc16
2216 - nouveau: patch in updates queued for 3.2, mostly new hw support (GF116/GF119)
2217
2218 * Fri Sep 16 2011 Josh Boyer <jwboyer@redhat.com> 3.1.0-0.rc6.git0.3.fc16
2219 - Add patch to fix deadlock in ipw2x00 (rhbz 738387)
2220 - Fixup kernel-tools file section for ppc/ppc64
2221
2222 * Thu Sep 15 2011 Josh Boyer <jwboyer@redhat.com>
2223 - CVE-2011-3191: cifs: fix possible memory corruption in CIFSFindNext
2224
2225 * Wed Sep 14 2011 Josh Boyer <jwboyer@redhat.com>
2226 - Add patch to fix deadlock in ppc64 icswx (rhbz 737984)
2227
2228 * Wed Sep 14 2011 Neil Horman <nhorman@redhat.com>
2229 - Enable CONFIG_IP_VS_IPV6 (bz 738194)
2230
2231 * Wed Sep 14 2011 Josh Boyer <jwboyer@redhat.com>
2232 - Add support for Macbook Air 4,1 keyboard, trackpad, and bluetooth
2233 - Add patch to fix HVCS on ppc64 (rhbz 738096)
2234 - Add various ibmveth driver fixes (rhbz 733766)
2235
2236 * Tue Sep 13 2011 Adam Jackson <ajax@redhat.com>
2237 - drm/i915: Shut the fbc messages up when drm.debug & 4
2238
2239 * Mon Sep 12 2011 Josh Boyer <jwboyer@redhat.com> 3.1.0-0.rc6.git0.0
2240 - Linux 3.1-rc6 (contains the fix for 737076)
2241 - Disable debug builds
2242
2243 * Fri Sep 09 2011 Josh Boyer <jwboyer@redhat.com>
2244 - Change to 64K page size for ppc64 kernels (rhbz 736751)
2245
2246 * Fri Sep 09 2011 Josh Boyer <jwboyer@redhat.com> 3.1.0-0.rc5.git0.0
2247 - Linux 3.1-rc5
2248
2249 * Wed Sep 07 2011 Josh Boyer <jwboyer@redhat.com>
2250 - Add patch to fix oops when linking entities in ucvideo (rhbz 735437)
2251
2252 * Fri Sep 02 2011 Dave Jones <davej@redhat.com>
2253 - Apply patch to fix lockdep reports from ext4 (rhbz 732572)
2254
2255 * Thu Sep 01 2011 Dave Jones <davej@redhat.com>
2256 - utrace: s390: fix the compile problem with traps.c (rhbz 735118)
2257
2258 * Tue Aug 30 2011 Dave Jones <davej@redhat.com>
2259 - Revert "x86: Serialize EFI time accesses on rtc_lock" (rhbz 732755)
2260
2261 * Tue Aug 30 2011 Josh Boyer <jwboyer@redhat.com>
2262 - Add patch to fix rhbz 606017
2263
2264 * Mon Aug 29 2011 Josh Boyer <jwboyer@redhat.com>
2265 - Linux 3.1-rc4
2266
2267 * Sat Aug 27 2011 Dave Jones <davej@redhat.com>
2268 - Fix get_gate_vma usage in i386 NX emulation
2269 - Bring back the 32bit mmap randomization patch for now.
2270   NX emulation is still too dependant upon it.
2271
2272 * Fri Aug 26 2011 Dave Jones <davej@redhat.com>
2273 - Enable CONFIG_DETECT_HUNG_TASK for debug builds & rawhide.
2274
2275 * Fri Aug 26 2011 Dave Jones <davej@redhat.com>
2276 - Drop linux-2.6-debug-vm-would-have-oomkilled.patch
2277   The oom-killer heuristics have improved enough that this should
2278   never be necessary (and it probably doesn't dtrt any more)
2279
2280 * Fri Aug 26 2011 Dave Jones <davej@redhat.com>
2281 - Drop linux-2.6-32bit-mmap-exec-randomization.patch
2282   Outlived it's usefulness (and made of ugly)
2283
2284 * Fri Aug 26 2011 Dave Jones <davej@redhat.com>
2285 - Drop acpi-ec-add-delay-before-write.patch (rhbz 733690)
2286
2287 * Fri Aug 26 2011 Josh Boyer <jwboyer@redhat.com>
2288 - Linux 3.1-rc3-git5
2289
2290 * Wed Aug 24 2011 Josh Boyer <jwboyer@redhat.com>
2291 - Revert 'iwlwifi: advertise max aggregate size'. (rhbz 708747)
2292
2293 * Mon Aug 22 2011 Josh Boyer <jwboyer@redhat.com>
2294 - Linux 3.1-rc3
2295 - Add patch to fix duplicate backlight registration (rhbz 732202)
2296
2297 * Mon Aug 22 2011 Dave Jones <davej@redhat.com>
2298 - Avoid false quiescent states in rcutree with CONFIG_RCU_FAST_NO_HZ. (rhbz 577968)
2299
2300 * Sat Aug 20 2011 Josh Boyer <jwboyer@redhat.com>
2301 - Linux 3.1-rc2-git7
2302 - Add a provides/obsoletes for cpupowerutils-devel
2303
2304 * Fri Aug 19 2011 Josh Boyer <jwboyer@redhat.com>
2305 - Add patch from upstream to fix 64-bit divide error in btrfs
2306 - Add BuildRequires on gettext for cpupowerutils translations
2307
2308 * Fri Aug 19 2011 Josh Boyer <jwboyer@redhat.com>
2309 - Linux 3.1-rc2-git5
2310 - Change XHCI to builtin (rhbz 731706)
2311 - Add patch to fix race between cryptd and aesni (rhbz 721002)
2312
2313 * Thu Aug 18 2011 Josh Boyer <jwboyer@redhat.com>
2314 - Adjust provides/obsoletes to replace the cpupowerutils package
2315
2316 * Wed Aug 17 2011 Josh Boyer <jwboyer@redhat.com>
2317 - Create the kernel-tools subpackages based on a start by davej
2318
2319 * Tue Aug 16 2011 Dave Jones <davej@redhat.com>
2320 - Prepare for packaging more of tools/ by renaming 'perf' subpackage
2321   to kernel-tools
2322
2323 * Tue Aug 16 2011 Dennis Gilmore <dennis@ausil.us>
2324 - add config for arm tegra devices
2325 - setup kernel to build omap image (patch from David Marlin)
2326 - setup kernel to build tegra image based on omap work
2327 - add arm device tree patches
2328
2329 * Sat Aug 13 2011 Dave Jones <davej@redhat.com>
2330 - CPU_FREQ drivers should now be built-in on x86-64.
2331
2332 * Thu Aug 11 2011 Josh Boyer <jwboyer@redhat.com>
2333 - Add patch davej applied to f15 for rhbz 729340
2334 - Add munged together patch for rhbz 729269
2335 - Build ide_pmac as a module (rhbz 730039)
2336
2337 * Tue Aug 09 2011 Josh Boyer <jwboyer@redhat.com>
2338 - Add Makefile.config and ARM config changes from David Marlin
2339
2340 * Tue Aug 09 2011 Josh Boyer <jwboyer@redhat.com>
2341 - Add patch davej applied to f15 for rhbz 728872
2342
2343 * Tue Aug 09 2011 Dave Jones <davej@redhat.com>
2344 - ptrace_report_syscall: check if TIF_SYSCALL_EMU is defined
2345
2346 * Tue Aug 09 2011 Dave Jones <davej@redhat.com>
2347 - Enable CONFIG_SAMSUNG_LAPTOP (rhbz 729363)
2348
2349 * Mon Aug 08 2011 Josh Boyer <jwboyer@redhat.com>
2350 - Bring in utrace fixes davej applied to f15. (rhbz 728379)
2351
2352 * Fri Aug 05 2011 Josh Boyer <jwboyer@redhat.com>
2353 - Adjust Makefile munging for new 3.x numbering scheme
2354
2355 * Fri Aug 05 2011 Dave Jones <davej@redhat.com>
2356 - Deselect CONFIG_DECNET. Unmaintained, and rubbish.
2357
2358 * Fri Aug 05 2011 Josh Boyer <jwboyer@redhat.com>
2359 - 3.0.1
2360
2361 * Fri Aug 05 2011 Josh Boyer <jwboyer@redhat.com>
2362 - Add patch for rhbz 726701 from Matthew Garrett
2363
2364 * Thu Aug 04 2011 Dave Jones <davej@redhat.com>
2365 - Drop neuter_intel_microcode_load.patch (rhbz 690930)
2366
2367 * Wed Aug 03 2011 John W. Linville <linville@redhat.com>
2368 - Disable CONFIG_BCMA since no driver currently uses it (rhbz 727796)
2369
2370 * Wed Aug 03 2011 Josh Boyer <jwboyer@redhat.com>
2371 - Add patch to fix backtrace in cdc_ncm driver (rhbz 720128)
2372 - Add patch to fix backtrace in usm-realtek driver (rhbz 720054)
2373
2374 * Tue Aug 02 2011 Josh Boyer <jwboyer@redhat.com>
2375 - Add patch to fix HFSPlus filesystem mounting (rhbz 720771)
2376
2377 * Tue Aug 02 2011 Dave Jones <davej@redhat.com>
2378 - Change USB_SERIAL_OPTION back to modular. (rhbz 727680)
2379
2380 * Tue Aug 02 2011 Josh Boyer <jwboyer@redhat.com>
2381 - Fix epoll recursive lockdep warnings (rhbz 722472)
2382 - Turn debug builds back on
2383
2384 * Tue Aug 02 2011 Josh Boyer <jwboyer@redhat.com>
2385 - Add change from Yanko Kaneti to get the rt2x00 drivers in modules.networking
2386   (rhbz 708314)
2387
2388 * Fri Jul 29 2011 Dave Jones <davej@redhat.com>
2389 - Fix scsi_dispatch_cmd oops (USB eject problems, etc).
2390
2391 * Thu Jul 28 2011 Dave Jones <davej@redhat.com>
2392 - module-init-tools needs to be a prereq, not a conflict.
2393
2394 * Thu Jul 28 2011 Josh Boyer <jwboyer@redhat.com>
2395 - Backport patch to correct udlfb removal events (rhbz 726163)
2396
2397 * Wed Jul 27 2011 Dave Jones <davej@redhat.com>
2398 - Turn off debug builds.
2399
2400 * Fri Jul 22 2011 Dave Jones <davej@redhat.com>
2401 - bootwrapper needs objcopy. Add it to requires: (wwoods)
2402
2403 * Fri Jul 22 2011 Kyle McMartin <kmcmartin@redhat.com> 3.0.0-1
2404 - Linux 3.0, but really 3.0.0 (sigh)
2405
2406 * Thu Jul 21 2011 Chuck Ebbert <cebbert@redhat.com>  3.0-0.rc7.git10.1
2407 - 3.0-rc7-git10
2408 - Use ext4 for ext2 and ext3 filesystems (CONFIG_EXT4_USE_FOR_EXT23=y)
2409
2410 * Thu Jul 21 2011 Dave Jones <davej@redhat.com>
2411 - Switch BLK_DEV_RAM to be modular (rhbz 720833)
2412
2413 * Wed Jul 20 2011 Chuck Ebbert <cebbert@redhat.com> 3.0-0.rc7.git8.1
2414 - 3.0-rc7-git8
2415
2416 * Fri Jul 15 2011 Dave Jones <davej@redhat.com> 3.0-0.rc7.git3.1
2417 - 3.0-rc7-git3
2418
2419 * Fri Jul 15 2011 Dave Jones <davej@redhat.com>
2420 - Bring back utrace until uprobes gets merged upstream.
2421
2422 * Wed Jul 13 2011 Kyle McMartin <kmcmartin@redhat.com> 3.0-0.rc7.git1.1
2423 - Update to snapshot 3.0-rc7-git1 for intel drm fixes.
2424
2425 * Tue Jul 12 2011 John W. Linville <linville@redhat.com>
2426 - zd1211rw: fix invalid signal values from device (rhbz 720093)
2427
2428 * Tue Jul 12 2011 John W. Linville <linville@redhat.com>
2429 - rt2x00: Add device ID for RT539F device. (rhbz 720594)
2430
2431 * Tue Jul 12 2011 Kyle McMartin <kmcmartin@redhat.com> 3.0-0.rc7.git0.1
2432 - Linux 3.0-rc7, hopefully the last before the Great Renumbering becomes
2433   official.
2434
2435 * Mon Jul 11 2011 Dave Jones <davej@redhat.com>
2436 - Change BINFMT_MISC to be modular. (rhbz 695415)
2437
2438 * Sun Jul 10 2011 Kyle McMartin <kmcmartin@redhat.com> 3.0-0.rc6.git6.1
2439 - Linux 3.0-rc6-git6
2440 - iwlagn-fix-dma-direction.patch: drop.
2441 - Revert CONFIG_X86_RESERVE_LOW=640, it breaks booting on x86_64.
2442
2443 * Thu Jul 07 2011 Dave Jones <davej@redhat.com>
2444 - Centralise CPU_FREQ options into config-generic.
2445   Switch to using ondemand by default. (rhbz 713572)
2446
2447 * Wed Jul 06 2011 Chuck Ebbert <cebbert@redhat.com>
2448 - Set CONFIG_X86_RESERVE_LOW=640 as requested by mjg
2449
2450 * Mon Jul 04 2011 Kyle McMartin <kmcmartin@redhat.com> 3.0-0.rc6.git0.1
2451 - Linux 3.0-rc6
2452 - [generic] SCSI_ISCI=m, because why not
2453
2454 * Sat Jul 02 2011 Kyle McMartin <kmcmartin@redhat.com> 3.0-0.rc5.git5.1
2455 - Linux 3.0-rc5-git5
2456
2457 * Mon Jun 27 2011 Kyle McMartin <kmcmartin@redhat.com> 3.0-0.rc5.git0.1
2458 - Linux 3.0-rc5
2459
2460 * Mon Jun 27 2011 Dave Jones <davej@redhat.com>
2461 - Disable CONFIG_CRYPTO_MANAGER_DISABLE_TESTS, as this also disables FIPS (rhbz 716942)
2462
2463 * Thu Jun 23 2011 Kyle McMartin <kmcmartin@redhat.com> 3.0-0.rc4.git3.1
2464 - Linux 3.0-rc4-git3
2465 - Drop linux-3.0-fix-uts-release.patch, and instead just perl the Makefile
2466 - linux-2.6-silence-noise.patch: fix context
2467 - iwlagn-fix-dma-direction.patch: fix DMAR errors (for me at least)
2468
2469 * Wed Jun 22 2011 Kyle McMartin <kmcmartin@redhat.com> 3.0-0.rc4.git0.2
2470 - Re-enable debuginfo generation. Thanks to Richard Jones for noticing... no
2471   wonder builds had been so quick lately.
2472
2473 * Tue Jun 21 2011 Kyle McMartin <kmcmartin@redhat.com> 3.0-0.rc4.git0.1
2474 - Linux 3.0-rc4 (getting closer...)
2475
2476 * Fri Jun 17 2011 Kyle McMartin <kmcmartin@redhat.com> 3.0-0.rc3.git6.1
2477 - Update to 3.0-rc3-git6
2478
2479 * Fri Jun 17 2011 Dave Jones <davej@redhat.com>
2480 - drop qcserial 'compile fix' that was just duplicating an include.
2481 - drop struct sizeof debug patch. (no real value. not upstreamable)
2482 - drop linux-2.6-debug-always-inline-kzalloc.patch.
2483   Can't recall why this was added. Can easily re-add if deemed necessary.
2484
2485 * Fri Jun 17 2011 Kyle McMartin <kmcmartin@redhat.com>
2486 - linux-2.6-defaults-pci_no_msi.patch: drop, haven't toggled the default
2487   in many moons.
2488 - linux-2.6-defaults-pci_use_crs.patch: ditto.
2489 - linux-2.6-selinux-mprotect-checks.patch: upstream a while ago.
2490 - drm-i915-gen4-has-non-power-of-two-strides.patch: drop buggy bugfix
2491 - drop some more unapplied crud.
2492 - We haven't applied firewire patches in a dogs age.
2493
2494 * Fri Jun 17 2011 Kyle McMartin <kmcmartin@redhat.com> 3.0-0.rc3.git5.1
2495 - Try updating to a git snapshot for the first time in 3.0-rc,
2496   update to 3.0-rc3-git5
2497 - Fix a subtle bug I introduced in 3.0-rc1, "patch-3." is 9 letters, not 10.
2498
2499 * Thu Jun 16 2011 Kyle McMartin <kmcmartin@redhat.com>
2500 - Disable mm patches which had been submitted against 2.6.39, as Rik reports
2501   they seem to aggravate a VM_BUG_ON. More investigation is necessary.
2502
2503 * Wed Jun 15 2011 Kyle McMartin <kmcmartin@redhat.com>
2504 - Conflict with pre-3.2.1-5 versions of mdadm. (#710646)
2505
2506 * Wed Jun 15 2011 Kyle McMartin <kmcmartin@redhat.com>
2507 - Build in aesni-intel on i686 for symmetry with 64-bit.
2508
2509 * Tue Jun 14 2011 Kyle McMartin <kmcmartin@redhat.com> 3.0-0.rc3.git0.3
2510 - Fix libdm conflict (whose bright idea was it to give subpackages differing
2511   version numbers?)
2512
2513 * Tue Jun 14 2011 Kyle McMartin <kmcmartin@redhat.com>
2514 - Update to 3.0-rc3, add another conflicts to deal with 2 digit
2515   versions (libdm.)
2516 - Simplify linux-3.0-fix-uts-release.patch now that SUBLEVEL is optional.
2517 - revert-ftrace-remove-unnecessary-disabling-of-irqs.patch: drop upstreamed
2518   patch.
2519 - drm-intel-eeebox-eb1007-quirk.patch: ditto.
2520 - ath5k-disable-fast-channel-switching-by-default.patch: ditto.
2521
2522 * Thu Jun 09 2011 Kyle McMartin <kmcmartin@redhat.com>
2523 - ath5k-disable-fast-channel-switching-by-default.patch (rhbz#709122)
2524   (korgbz#34992) [a99168ee in wireless-next]
2525
2526 * Thu Jun 09 2011 Kyle McMartin <kmcmartin@redhat.com> 3.0-0.rc2.git0.2
2527 - rhbz#710921: revert-ftrace-remove-unnecessary-disabling-of-irqs.patch
2528
2529 * Wed Jun 08 2011 Kyle McMartin <kmcmartin@redhat.com> 3.0-0.rc2.git0.1
2530 - Update to 3.0-rc2, rebase utsname fix.
2531 - Build IPv6 into the kernel for a variety of reasons
2532   (http://lists.fedoraproject.org/pipermail/kernel/2011-June/003105.html)
2533
2534 * Mon Jun 06 2011 Kyle McMartin <kmcmartin@redhat.com> 3.0-0.rc1.git0.3
2535 - Conflict with module-init-tools older than 3.13 to ensure the
2536   3.0 transition is handled correctly.
2537
2538 * Wed Jun 01 2011 Kyle McMartin <kmcmartin@redhat.com> 3.0-0.rc1.git0.2
2539 - Fix utsname for 3.0-rc1
2540
2541 * Mon May 30 2011 Kyle McMartin <kmcmartin@redhat.com> 3.0-0.rc1.git0.1
2542 - Linux 3.0-rc1 (won't build until module-init-tools gets an update.)
2543
2544 * Mon May 30 2011 Kyle McMartin <kyle@redhat.com>
2545 - Trimmed changelog, see fedpkg git for earlier history.
2546
2547 ###
2548 # The following Emacs magic makes C-c C-e use UTC dates.
2549 # Local Variables:
2550 # rpm-change-log-uses-utc: t
2551 # End:
2552 ###