1 # We have to override the new %%install behavior because, well... the kernel is special.
2 %global __spec_install_pre %{___build_pre}
4 Summary: The Linux kernel
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
9 %global released_kernel 1
11 # Save original buildid for later if it's defined
13 %global orig_buildid %{buildid}
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.
24 # (Uncomment the '#' and both spaces below to set the buildid.)
26 %define buildid .planetlab
27 ###################################################################
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}
34 %global srpm_buildid %{buildid}
35 %define buildid %{srpm_buildid}%{orig_buildid}
37 %define buildid %{orig_buildid}
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.
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.
51 # For non-released -rc kernels, this will be prepended with "0.", so
52 # for example a 3 here will become 0.3
55 %global fedora_build %{baserelease}
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
62 ## If this is a released kernel ##
63 %if 0%{?released_kernel}
65 # Do we have a -stable update to apply?
66 %define stable_update 0
69 # Set rpm version accordingly
70 %if 0%{?stable_update}
71 %define stablerev %{stable_update}
72 %define stable_base %{stable_update}
74 # stable RCs are incremental patches, so we need the previous stable patch
75 %define stable_base %(echo $((%{stable_update} - 1)))
78 %define rpmversion 3.%{base_sublevel}.%{stable_update}
80 ## The not-released-kernel case ##
82 # The next upstream release sublevel (base_sublevel+1)
83 %define upstream_sublevel %(echo $((%{base_sublevel} + 1)))
84 # The rc snapshot level
86 # The git snapshot level
88 # Set rpm version accordingly
89 %define rpmversion 3.%{upstream_sublevel}.0
91 # Nb: The above rcrev and gitrev values automagically define Patch00 and Patch01 below.
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.
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.
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}
109 %define with_debug %{?_without_debug: 0} %{?!_without_debug: 1}
111 %define with_doc %{?_without_doc: 0} %{?!_without_doc: 1}
113 %define with_headers %{?_without_headers: 0} %{?!_without_headers: 1}
115 %define with_tools %{?_without_tools: 0} %{?!_without_tools: 1}
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}
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
132 %define doc_build_fail true
135 %define rawhide_skip_docs 0
136 %if 0%{?rawhide_skip_docs}
138 %define doc_build_fail true
141 # Additional options for user-friendly one-off kernel building:
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}
152 # should we do C=1 builds with sparse
153 %define with_sparse %{?_with_sparse: 1} %{?!_with_sparse: 0}
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
160 # Want to build a vanilla kernel build without any non-upstream patches?
161 %define with_vanilla %{?_with_vanilla: 1} %{?!_with_vanilla: 0}
163 # pkg_release is what we'll fill in for the rpm Release: field
164 %if 0%{?released_kernel}
167 %define stable_rctag .rc%{stable_rc}
169 %define pkg_release %{fedora_build}%{?stable_rctag}%{?buildid}%{?dist}
173 # non-released_kernel
175 %define rctag .rc%rcrev
180 %define gittag .git%gitrev
184 %define pkg_release 0%{?rctag}%{?gittag}.%{fedora_build}%{?buildid}%{?dist}
188 # The kernel tarball/base version
189 %define kversion 3.%{base_sublevel}
191 %define make_target bzImage
193 %define KVERREL %{version}-%{release}.%{_target_cpu}
194 %define hdrarch %_target_cpu
195 %define asmarch %_target_cpu
197 %if 0%{!?nopatches:1}
206 %define with_bootwrapper 0
207 %define variant -vanilla
209 %define variant_fedora -fedora
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}
220 %if !%{debugbuildsenabled}
224 %if !%{with_debuginfo}
225 %define _enable_debug_packages 0
227 %define debuginfodir /usr/lib/debug
229 # kernel-PAE is only built on i686.
234 # kernel-tegra and omap is only built on armv7 hard and softfp
235 %ifnarch armv7hl armv7l
240 # if requested, only build base kernel
247 # if requested, only build smp kernel
254 # if requested, only build pae kernel
261 # if requested, only build debug kernel
263 %if %{debugbuildsenabled}
272 %define all_x86 i386 i686
274 %if %{with_vdso_install}
275 # These arches install vdso/ directories.
276 %define vdso_arches %{all_x86} x86_64 ppc ppc64
279 # Overrides for generic default options
281 # only ppc and alphav56 need separate smp kernels
282 %ifnarch ppc alphaev56
286 # don't do debug builds on anything but i686 and x86_64
291 # only package docs noarch
296 # don't build noarch kernels or headers (duh)
299 %define with_headers 0
301 %define all_arch_configs kernel-%{version}-*.config
304 # bootwrapper is only on ppc
306 %define with_bootwrapper 0
309 # sparse blows up on ppc64 alpha and sparc64
310 %ifarch ppc64 ppc alpha sparc64
311 %define with_sparse 0
319 %define all_arch_configs kernel-%{version}-i?86*.config
320 %define image_install_path boot
321 %define kernel_image arch/x86/boot/bzImage
326 %define all_arch_configs kernel-%{version}-x86_64*.config
327 %define image_install_path boot
328 %define kernel_image arch/x86/boot/bzImage
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
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
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
361 %define hdrarch sparc
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
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
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
389 %define all_arch_configs kernel-%{version}-arm*.config
390 %define image_install_path boot
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.
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
408 # XXX temporary until last vdso patches are upstream
409 %define vdso_arches ppc ppc64
412 # Should make listnewconfig fail if there's config options
414 %if %{nopatches}%{using_upstream_branch}
415 %define listnewconfig_fail 0
417 %define listnewconfig_fail 1
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).
426 # We only build kernel-headers on the following...
427 %define nobuildarches i386 s390 sparc sparcv9
429 %ifarch %nobuildarches
433 %define with_debuginfo 0
435 %define _enable_debug_packages 0
438 %define with_pae_debug 0
440 %define with_pae_debug %{with_debug}
443 # Architectures we build tools/cpupower on
444 %define cpupowerarchs %{ix86} x86_64 ppc ppc64
445 #%define cpupowerarchs ppc ppc64
448 # Three sets of minimum package version requirements in the form of Conflicts:
449 # to versions below the minimum
453 # First the general kernel 2.6 required versions as per
454 # Documentation/Changes
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
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.
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
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
471 # Packages that need to be installed before the kernel is, because the %%post
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
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.
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\
506 Name: kernel%{?variant}
507 Group: System Environment/Kernel
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}
520 # List the packages used during the kernel build
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
528 BuildRequires: sparse >= 0.4.1
531 BuildRequires: elfutils-devel zlib-devel binutils-devel newt-devel python-devel perl(ExtUtils::Embed) pciutils-devel gettext
533 BuildConflicts: rhbuildsys(DiskFree) < 500Mb
535 %define fancy_debuginfo 0
536 %if %{with_debuginfo}
537 %if 0%{?fedora} >= 8 || 0%{?rhel} >= 6
538 %define fancy_debuginfo 1
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
548 Source0: ftp://ftp.kernel.org/pub/linux/kernel/v3.0/linux-%{kversion}.tar.bz2
551 Source14: find-provides
554 Source20: Makefile.config
555 Source21: config-debug
556 Source22: config-nodebug
557 Source23: config-generic
558 Source24: config-rhel-generic
560 Source30: config-x86-generic
561 Source31: config-i686-PAE
562 Source32: config-x86-32-generic
564 Source40: config-x86_64-generic
566 Source50: config-powerpc-generic
567 Source51: config-powerpc32-generic
568 Source52: config-powerpc32-smp
569 Source53: config-powerpc64
571 Source60: config-ia64-generic
573 Source70: config-s390x
575 Source90: config-sparc64-generic
577 Source100: config-arm-generic
578 Source110: config-arm-omap-generic
579 Source111: config-arm-tegra
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
585 # Sources for kernel-tools
586 Source2000: cpupower.service
587 Source2001: cpupower.config
589 # Here should be only the patches up to the upstream canonical Linus tree.
591 # For a stable release kernel
592 %if 0%{?stable_update}
594 %define stable_patch_00 patch-3.%{base_sublevel}.%{stable_base}.bz2
595 Patch00: %{stable_patch_00}
598 %define stable_patch_01 patch-3.%{base_sublevel}.%{stable_update}-rc%{stable_rc}.bz2
599 Patch01: %{stable_patch_01}
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.
607 Patch00: patch-3.%{upstream_sublevel}-rc%{rcrev}.bz2
609 Patch01: patch-3.%{upstream_sublevel}-rc%{rcrev}-git%{gitrev}.bz2
612 # pre-{base_sublevel+1}-rc1 case
614 Patch00: patch-3.%{base_sublevel}-git%{gitrev}.bz2
619 %if %{using_upstream_branch}
623 Patch02: git-linus.diff
625 # we also need compile fixes for -vanilla
626 Patch04: linux-2.6-compile-fixes.patch
628 # build tweak for build ID magic, even for -vanilla
629 Patch05: linux-2.6-makefile-after_link.patch
634 # revert upstream patches we get via other methods
635 Patch09: linux-2.6-upstream-reverts.patch
640 Patch100: taint-vbox.patch
641 Patch160: linux-2.6-32bit-mmap-exec-randomization.patch
642 Patch161: linux-2.6-i386-nx-emulation.patch
644 Patch202: linux-2.6-debug-taint-vm.patch
646 Patch383: linux-2.6-defaults-aspm.patch
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
654 Patch450: linux-2.6-input-kill-stupid-messages.patch
655 Patch452: linux-2.6.30-no-pcspkr-modalias.patch
657 Patch460: linux-2.6-serial-460800.patch
659 Patch470: die-floppy-die.patch
660 Patch471: floppy-drop-disable_hlt-warning.patch
662 Patch510: linux-2.6-silence-noise.patch
663 Patch530: linux-2.6-silence-fbcon-logo.patch
665 Patch700: linux-2.6-e1000-ich9-montevina.patch
667 Patch800: linux-2.6-crash-driver.patch
672 Patch1500: fix_xen_guest_on_old_EC2.patch
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
687 Patch1850: drm-lower-severity-radeon-lockup.diff
689 Patch1900: linux-2.6-intel-iommu-igfx.patch
692 # silence the ACPI blacklist code
693 Patch2802: linux-2.6-silence-acpi-blacklist.patch
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
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
705 Patch3000: rcutree-avoid-false-quiescent-states.patch
711 # patches headed upstream
712 Patch12010: add-appleir-usb-driver.patch
714 Patch12016: disable-i8042-check-on-apple-mac.patch
716 Patch12021: udlfb-bind-framebuffer-to-interface.patch
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
726 Patch12303: dmar-disable-when-ricoh-multifunction.patch
728 Patch13002: revert-efi-rtclock.patch
729 Patch13003: efi-dont-map-boot-services-on-32bit.patch
731 Patch13007: add-macbookair41-keyboard.patch
733 Patch13009: hvcs_pi_buf_alloc.patch
735 Patch13013: powerpc-Fix-deadlock-in-icswx-code.patch
737 Patch13014: iwlagn-fix-ht_params-NULL-pointer-dereference.patch
739 Patch20000: utrace.patch
741 # Flattened devicetree support
742 Patch21000: arm-omap-dt-compat.patch
743 Patch21001: arm-smsc-support-reading-mac-address-from-device-tree.patch
746 Patch21002: mmc-Always-check-for-lower-base-frequency-quirk-for-.patch
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
753 Patch21030: be2net-non-member-vlan-pkts-not-received-in-promisco.patch
754 Patch21031: benet-remove-bogus-unlikely-on-vlan-check.patch
757 Patch21050: xfs-Fix-possible-memory-corruption-in-xfs_readlink.patch
759 Patch21070: oom-fix-integer-overflow-of-points.patch
763 BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root
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.
773 Summary: Various documentation bits found in the kernel source
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.
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.
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
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
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}
805 %description firmware
806 Kernel-firmware includes firmware files required for some devices to
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.
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.
825 %package -n kernel-tools
826 Summary: Assortment of tools for the Linux kernel
827 Group: Development/System
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.
842 %package -n kernel-tools-devel
843 Summary: Assortment of tools for the Linux kernel
844 Group: Development/System
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
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}
858 %description -n kernel-tools-debuginfo
859 This package provides debug information for package kernel-tools.
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}
870 # This macro creates a kernel-<subpackage>-debuginfo package.
871 # %%kernel_debuginfo_package <subpackage>
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}\
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}\
887 # This macro creates a kernel-<subpackage>-devel package.
888 # %%kernel_devel_package <subpackage> <pretty-name>
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}}\
899 Requires(pre): /usr/bin/find\
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.\
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>
911 %define kernel_variant_package(n:) \
913 Summary: %{variant_summary}\
914 Group: System Environment/Kernel\
916 %{expand:%%kernel_devel_package %1 %{!?-n:%1}%{?-n:%{-n*}}}\
917 %{expand:%%kernel_debuginfo_package %1}\
921 # First the auxiliary packages of the main kernel package.
922 %kernel_devel_package
923 %kernel_debuginfo_package
926 # Now, each variant package.
928 %define variant_summary The Linux kernel compiled for SMP machines
929 %kernel_variant_package -n SMP 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.
935 Install the kernel-smp package if your machine uses two or more CPUs.
938 %define variant_summary The Linux kernel compiled for PAE capable machines
939 %kernel_variant_package 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.
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.
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.
961 %define variant_summary The Linux kernel compiled with extra debugging enabled
962 %kernel_variant_package 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.
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.
974 %define variant_summary The Linux kernel compiled for TI-OMAP boards
975 %kernel_variant_package omap
977 This package includes a version of the Linux kernel with support for
978 TI-OMAP based systems, i.e., BeagleBoard-xM.
980 %define variant_summary The Linux kernel compiled for tegra boards
981 %kernel_variant_package tegra
983 This package includes a version of the Linux kernel with support for
984 nvidia tegra based systems, i.e., trimslice, ac-100.
988 # do a few sanity-checks for --with *only builds
990 %if !%{with_up}%{with_pae}
991 echo "Cannot build --with baseonly, up build is disabled"
998 echo "Cannot build --with smponly, smp build is disabled"
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"
1013 patch_command='patch -p1 -F1 -s'
1018 if [ ! -f $RPM_SOURCE_DIR/$patch ]; then
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"
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" ;;
1036 # don't apply patch if it's empty
1037 ApplyOptionalPatch()
1041 if [ ! -f $RPM_SOURCE_DIR/$patch ]; then
1044 local C=$(wc -l $RPM_SOURCE_DIR/$patch | awk '{print $1}')
1045 if [ "$C" -gt 9 ]; then
1046 ApplyPatch $patch ${1+"$@"}
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
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.
1060 # Update to latest upstream.
1061 %if 0%{?released_kernel}
1062 %define vanillaversion 3.%{base_sublevel}
1063 # non-released_kernel case
1066 %define vanillaversion 3.%{upstream_sublevel}-rc%{rcrev}
1068 %define vanillaversion 3.%{upstream_sublevel}-rc%{rcrev}-git%{gitrev}
1071 # pre-{base_sublevel+1}-rc1 case
1073 %define vanillaversion 3.%{base_sublevel}-git%{gitrev}
1075 %define vanillaversion 3.%{base_sublevel}
1080 # %%{vanillaversion} : the full version name, e.g. 2.6.35-rc6-git3
1081 # %%{kversion} : the base version, e.g. 2.6.34
1083 # Use kernel-%%{kversion}%%{?dist} as the top-level directory name
1084 # so we can prep different trees within a single git directory.
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}) ||:
1091 if [ ! -d kernel-%{kversion}%{?dist}/vanilla-%{vanillaversion} ]; then
1093 if [ -d kernel-%{kversion}%{?dist}/vanilla-%{kversion} ]; then
1095 # The base vanilla version already exists.
1096 cd kernel-%{kversion}%{?dist}
1098 # Any vanilla-* directories other than the base one are stale.
1099 for dir in vanilla-*; do
1100 [ "$dir" = vanilla-%{kversion} ] || rm -rf $dir &
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
1112 if [[ ! -z $sharedir && -d $sharedir/vanilla-%{kversion} ]] ; then
1113 %setup -q -n kernel-%{kversion}%{?dist} -c -T
1114 cp -rl $sharedir/vanilla-%{kversion} .
1116 %setup -q -n kernel-%{kversion}%{?dist} -c
1117 mv linux-%{kversion} vanilla-%{kversion}
1122 %if "%{kversion}" != "%{vanillaversion}"
1124 for sharedir in $sharedirs ; do
1125 if [[ ! -z $sharedir && -d $sharedir/vanilla-%{vanillaversion} ]] ; then
1129 if [[ ! -z $sharedir && -d $sharedir/vanilla-%{vanillaversion} ]] ; then
1131 cp -rl $sharedir/vanilla-%{vanillaversion} .
1135 # Need to apply patches to the base vanilla version.
1136 cp -rl vanilla-%{kversion} vanilla-%{vanillaversion}
1137 cd vanilla-%{vanillaversion}
1139 # Update vanilla to the latest upstream.
1140 # (non-released_kernel case only)
1142 ApplyPatch patch-3.%{upstream_sublevel}-rc%{rcrev}.bz2
1144 ApplyPatch patch-3.%{upstream_sublevel}-rc%{rcrev}-git%{gitrev}.bz2
1147 # pre-{base_sublevel+1}-rc1 case
1149 ApplyPatch patch-3.%{base_sublevel}-git%{gitrev}.bz2
1161 # We already have all vanilla dirs, just change to the top-level directory.
1162 cd kernel-%{kversion}%{?dist}
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} &
1175 cp -rl vanilla-%{vanillaversion} linux-%{kversion}.%{_target_cpu}
1177 cd linux-%{kversion}.%{_target_cpu}
1179 # released_kernel with possible stable updates
1180 %if 0%{?stable_base}
1181 ApplyPatch %{stable_patch_00}
1184 ApplyPatch %{stable_patch_01}
1187 %if %{using_upstream_branch}
1188 ### BRANCH APPLY ###
1191 # Drop some necessary files from the source dir into the buildroot
1192 cp $RPM_SOURCE_DIR/config-* .
1195 # Dynamically generate kernel .config files from config-* files
1196 make -f %{SOURCE20} VERSION=%{version} configs
1198 %if %{?all_arch_configs:1}%{!?all_arch_configs:0}
1199 #if a rhel kernel, apply the rhel config options
1201 for i in %{all_arch_configs}
1204 ./merge.pl config-rhel-generic $i.tmp > $i
1209 # Merge in any user-provided local config option changes
1210 for i in %{all_arch_configs}
1213 ./merge.pl %{SOURCE1000} $i.tmp > $i
1218 ApplyOptionalPatch git-linus.diff
1220 ApplyPatch linux-2.6-makefile-after_link.patch
1223 # misc small stuff to make things compile
1225 ApplyOptionalPatch linux-2.6-compile-fixes.patch
1229 # revert patches from upstream that conflict or that we get via other means
1230 ApplyOptionalPatch linux-2.6-upstream-reverts.patch -R
1233 # Architecture patches
1239 ApplyPatch arm-omap-dt-compat.patch
1240 ApplyPatch arm-smsc-support-reading-mac-address-from-device-tree.patch
1242 ApplyPatch taint-vbox.patch
1246 ApplyPatch linux-2.6-32bit-mmap-exec-randomization.patch
1247 ApplyPatch linux-2.6-i386-nx-emulation.patch
1250 # bugfixes to drivers and filesystems
1256 ApplyPatch xfs-Fix-possible-memory-corruption-in-xfs_readlink.patch
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
1276 # Various low-impact patches to aid debugging.
1277 ApplyPatch linux-2.6-debug-taint-vm.patch
1282 # enable ASPM by default on hardware we expect to work
1283 ApplyPatch linux-2.6-defaults-aspm.patch
1297 # The input layer spews crap no-one cares about.
1298 ApplyPatch linux-2.6-input-kill-stupid-messages.patch
1300 # stop floppy.ko from autoloading during udev...
1301 ApplyPatch die-floppy-die.patch
1302 ApplyPatch floppy-drop-disable_hlt-warning.patch
1304 ApplyPatch linux-2.6.30-no-pcspkr-modalias.patch
1306 # Allow to use 480600 baud on 16C950 UARTs
1307 ApplyPatch linux-2.6-serial-460800.patch
1309 # Silence some useless messages that still get printed with 'quiet'
1310 ApplyPatch linux-2.6-silence-noise.patch
1312 # Make fbcon not show the penguins with 'quiet'
1313 ApplyPatch linux-2.6-silence-fbcon-logo.patch
1315 # Changes to upstream defaults.
1318 # /dev/crash driver.
1319 ApplyPatch linux-2.6-crash-driver.patch
1321 # Hack e1000e to work on Montevina SDV
1322 ApplyPatch linux-2.6-e1000-ich9-montevina.patch
1326 # Assorted Virt Fixes
1327 ApplyPatch fix_xen_guest_on_old_EC2.patch
1332 ApplyOptionalPatch drm-nouveau-updates.patch
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
1340 ApplyPatch drm-lower-severity-radeon-lockup.diff
1342 ApplyPatch linux-2.6-intel-iommu-igfx.patch
1344 # silence the ACPI blacklist code
1345 ApplyPatch linux-2.6-silence-acpi-blacklist.patch
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
1354 # Patches headed upstream
1355 ApplyPatch rcutree-avoid-false-quiescent-states.patch
1357 ApplyPatch disable-i8042-check-on-apple-mac.patch
1359 ApplyPatch add-appleir-usb-driver.patch
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
1369 ApplyPatch crypto-register-cryptd-first.patch
1372 ApplyPatch dmar-disable-when-ricoh-multifunction.patch
1374 ApplyPatch revert-efi-rtclock.patch
1375 ApplyPatch efi-dont-map-boot-services-on-32bit.patch
1377 ApplyPatch add-macbookair41-keyboard.patch
1379 ApplyPatch hvcs_pi_buf_alloc.patch
1381 ApplyPatch powerpc-Fix-deadlock-in-icswx-code.patch
1383 ApplyPatch iwlagn-fix-ht_params-NULL-pointer-dereference.patch
1386 ApplyPatch mmc-Always-check-for-lower-base-frequency-quirk-for-.patch
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
1393 ApplyPatch utrace.patch
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
1400 ApplyPatch be2net-non-member-vlan-pkts-not-received-in-promisco.patch
1401 ApplyPatch benet-remove-bogus-unlikely-on-vlan-check.patch
1404 ApplyPatch oom-fix-integer-overflow-of-points.patch
1406 # END OF PATCH APPLICATIONS
1408 # BEGIN Planet-Lab Patches
1409 %(cat planetlab-patches.in)
1410 # END OF Planet-Lab Patches
1414 # Any further pre-build tree manipulations happen here.
1416 chmod +x scripts/checkpatch.pl
1418 # This Prevents scripts/setlocalversion from mucking with our version numbers.
1421 # only deal with configs if we are going to build for the arch
1422 %ifnarch %nobuildarches
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
1433 %if !%{debugbuildsenabled}
1434 rm -f kernel-%{version}-*debug.config
1437 # now run oldconfig over all the config files
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
1450 make ARCH=$Arch oldnoconfig
1451 echo "# $Arch" > configs/$i
1452 cat .config >> configs/$i
1454 # end of kernel config
1457 # get rid of unwanted files resulting from patch fuzz
1458 find . \( -name "*.orig" -o -name "*~" \) -exec rm -f {} \; >/dev/null
1460 # remove unnecessary SCM files
1461 find . -name .gitignore -exec rm -f {} \; >/dev/null
1471 %define sparse_mflags C=1
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.
1482 'sh -xc "/usr/lib/rpm/debugedit -b $$RPM_BUILD_DIR -d /usr/src/debug \
1488 eu-strip --remove-comment -o "$2" "$1"
1495 InstallName=${4:-vmlinuz}
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}}
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
1509 KernelVer=%{version}-%{release}.%{_target_cpu}${Flavour:+.${Flavour}}
1510 echo BUILDING A KERNEL FOR ${Flavour} %{_target_cpu}...
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
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
1520 # if pre-rc1 devel kernel, must fix up PATCHLEVEL for our versioning scheme
1523 perl -p -i -e 's/^PATCHLEVEL.*/PATCHLEVEL = %{upstream_sublevel}/' Makefile
1527 # and now to start the build process
1530 cp configs/$Config .config
1532 Arch=`head -1 .config | cut -b 3-`
1533 echo USING ARCH=$Arch
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
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}
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
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
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 || :
1555 $CopyKernel $KernelImage \
1556 $RPM_BUILD_ROOT/%{image_install_path}/$InstallName-$KernelVer
1557 chmod 755 $RPM_BUILD_ROOT/%{image_install_path}/$InstallName-$KernelVer
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."
1569 %{__install} -D -m 444 ldconfig-kernel.conf \
1570 $RPM_BUILD_ROOT/etc/ld.so.conf.d/kernel-$KernelVer.conf
1573 # And save the headers/makefiles etc for building modules against
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
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
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} || :
1603 if [ -f arch/$Arch/*lds ]; then
1604 cp -a arch/$Arch/*lds $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/arch/%{_arch}/ || :
1606 rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/*.o
1607 rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/*/*.o
1609 cp -a --parents arch/powerpc/lib/crtsavres.[So] $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
1611 if [ -d arch/%{asmarch}/include ]; then
1612 cp -a --parents arch/%{asmarch}/include $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
1614 cp -a include $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
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
1623 %if %{fancy_debuginfo}
1624 if test -s vmlinux.id; then
1625 cp vmlinux.id $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/vmlinux.id
1627 echo >&2 "*** ERROR *** no vmlinux build ID! ***"
1633 # save the vmlinux file for kernel debugging into the kernel-debuginfo rpm
1635 %if %{with_debuginfo}
1636 mkdir -p $RPM_BUILD_ROOT%{debuginfodir}/lib/modules/$KernelVer
1637 cp vmlinux $RPM_BUILD_ROOT%{debuginfodir}/lib/modules/$KernelVer
1640 find $RPM_BUILD_ROOT/lib/modules/$KernelVer -name "*.ko" -type f >modnames
1642 # mark modules executable so that strip-to-file can strip them
1643 xargs --no-run-if-empty chmod u+x < modnames
1645 # Generate a list of modules for block and networking.
1647 grep -F /drivers/ modnames | xargs --no-run-if-empty nm -upA |
1648 sed -n 's,^.*/\([^/]*\.ko\): *U \(.*\)$,\1 \2,p' > drivers.undef
1650 collect_modules_list()
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
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 \
1662 collect_modules_list modesetting \
1665 # detect missing or incorrect license tags
1669 echo -n "${i#$RPM_BUILD_ROOT/lib/modules/$KernelVer/} " >> modinfo
1670 /sbin/modinfo -l $i >> modinfo
1674 'GPL( v2)?$|Dual BSD/GPL$|Dual MPL/GPL$|GPL and additional rights$' \
1677 rm -f modinfo modnames
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
1682 rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/modules.$i
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
1690 # prune junk from kernel-devel
1691 find $RPM_BUILD_ROOT/usr/src/kernels -name ".*.cmd" -exec rm -f {} \;
1698 # prepare directories
1699 rm -rf $RPM_BUILD_ROOT
1700 mkdir -p $RPM_BUILD_ROOT/boot
1701 mkdir -p $RPM_BUILD_ROOT%{_libexecdir}
1703 cd linux-%{kversion}.%{_target_cpu}
1706 BuildKernel %make_target %kernel_image debug
1709 %if %{with_pae_debug}
1710 BuildKernel %make_target %kernel_image PAEdebug
1714 BuildKernel %make_target %kernel_image PAE
1718 BuildKernel %make_target %kernel_image omap
1722 BuildKernel %make_target %kernel_image tegra
1726 BuildKernel %make_target %kernel_image
1730 BuildKernel %make_target %kernel_image smp
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}
1738 %ifarch %{cpupowerarchs}
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
1744 cd tools/power/cpupower/debug/i386
1745 make %{?_smp_mflags} centrino-decode powernow-k8-decode
1749 cd tools/power/cpupower/debug/x86_64
1750 make %{?_smp_mflags} centrino-decode powernow-k8-decode
1757 # Make the HTML and man pages.
1758 make htmldocs mandocs || %{doc_build_fail}
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
1766 ### Special hacks for debuginfo subpackages.
1769 # This macro is used by %%install, so we must redefine it before that.
1770 %define debug_package %{nil}
1772 %if %{fancy_debuginfo}
1773 %define __debug_install_post \
1774 /usr/lib/rpm/find-debuginfo.sh %{debuginfo_args} %{_builddir}/%{?buildsubdir}\
1778 %if %{with_debuginfo}
1780 %global __debug_package 1
1781 %files -f debugfiles.list debuginfo-common-%{_target_cpu}
1782 %defattr(-,root,root)
1792 cd linux-%{kversion}.%{_target_cpu}
1795 docdir=$RPM_BUILD_ROOT%{_datadir}/doc/kernel-doc-%{rpmversion}
1796 man9dir=$RPM_BUILD_ROOT%{_datadir}/man/man9
1798 # copy the source over
1800 tar -f - --exclude=man --exclude='.*' -c Documentation | tar xf - -C $docdir
1802 # Install man pages for the kernel API.
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
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.
1814 # Install kernel headers
1815 make ARCH=%{hdrarch} INSTALL_HDR_PATH=$RPM_BUILD_ROOT/usr headers_install
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.
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
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
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
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}
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}
1848 mv cpupower.lang ../
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
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
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
1869 %if %{with_bootwrapper}
1870 make DESTDIR=$RPM_BUILD_ROOT bootwrapper_install WRAPPER_OBJDIR=%{_libdir}/kernel-wrapper WRAPPER_DTSDIR=%{_libdir}/kernel-wrapper/dts
1879 rm -rf $RPM_BUILD_ROOT
1886 %post -n kernel-tools
1889 %postun -n kernel-tools
1894 # This macro defines a %%post script for a kernel*-devel package.
1895 # %%kernel_devel_post [<subpackage>]
1897 %define kernel_devel_post() \
1898 %{expand:%%post %{?1:%{1}-}devel}\
1899 if [ -f /etc/sysconfig/kernel ]\
1901 . /etc/sysconfig/kernel || exit $?\
1903 if [ "$HARDLINK" != "no" -a -x /usr/sbin/hardlink ]\
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\
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.
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 $?\
1929 /bin/mkdir -p /etc/planetlab || exit $?\
1930 /bin/touch /etc/planetlab/update-reboot || exit $?\
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.
1938 %define kernel_variant_post(v:r:) \
1939 %{expand:%%kernel_devel_post %{?-v*}}\
1940 %{expand:%%kernel_variant_posttrans %{?-v*}}\
1941 %{expand:%%post %{?-v*}}\
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 $?\
1948 /sbin/new-kernel-pkg --package kernel%{?-v:-%{-v*}} --install %{KVERREL}%{?-v:.%{-v*}} || exit $?\
1953 # This macro defines a %%preun script for a kernel package.
1954 # %%kernel_variant_preun <subpackage>
1956 %define kernel_variant_preun() \
1957 %{expand:%%preun %{?1}}\
1958 /sbin/new-kernel-pkg --rminitrd --rmmoddep --remove %{KVERREL}%{?1:.%{1}} || exit $?\
1961 %kernel_variant_preun
1962 %kernel_variant_post -r kernel-smp
1964 %kernel_variant_preun smp
1965 %kernel_variant_post -v smp
1967 %kernel_variant_preun PAE
1968 %kernel_variant_post -v PAE -r (kernel|kernel-smp)
1970 %kernel_variant_preun debug
1971 %kernel_variant_post -v debug
1973 %kernel_variant_post -v PAEdebug -r (kernel|kernel-smp)
1974 %kernel_variant_preun PAEdebug
1976 %kernel_variant_preun omap
1977 %kernel_variant_post -v omap
1979 %kernel_variant_preun tegra
1980 %kernel_variant_post -v tegra
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 $?
1990 /bin/mkdir -p /etc/planetlab || exit $?
1991 /bin/touch /etc/planetlab/update-reboot || exit $?
1993 if [ -x /sbin/ldconfig ]
1995 /sbin/ldconfig -X || exit $?
2004 %defattr(-,root,root)
2008 %if %{with_bootwrapper}
2010 %defattr(-,root,root)
2012 %{_libdir}/kernel-wrapper
2015 # only some architecture builds need kernel-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/*
2026 %files -n kernel-tools -f cpupower.lang
2027 %defattr(-,root,root)
2029 %dir %{_libexecdir}/perf-core
2030 %{_libexecdir}/perf-core/*
2031 %{_mandir}/man[1-8]/*
2033 %ifarch %{cpupowerarchs}
2035 %ifarch %{ix86} x86_64
2036 %{_bindir}/centrino-decode
2037 %{_bindir}/powernow-k8-decode
2039 %{_libdir}/libcpupower.so.0
2040 %{_libdir}/libcpupower.so.0.0.0
2041 %{_unitdir}/cpupower.service
2042 %config(noreplace) %{_sysconfdir}/sysconfig/cpupower
2045 %if %{with_debuginfo}
2046 %files -f kernel-tools-debuginfo.list -n kernel-tools-debuginfo
2047 %defattr(-,root,root)
2050 %ifarch %{cpupowerarchs}
2051 %files -n kernel-tools-devel
2052 %{_libdir}/libcpupower.so
2053 %{_includedir}/cpufreq.h
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}}
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>
2066 %define kernel_variant_files(k:) \
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\
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}\
2090 %if %{fancy_debuginfo}\
2091 %{expand:%%files -f debuginfo%{?2}.list %{?2:%{2}-}debuginfo}\
2093 %{expand:%%files %{?2:%{2}-}debuginfo}\
2095 %defattr(-,root,root)\
2096 %if !%{fancy_debuginfo}\
2097 %if "%{elf_image_install_path}" != ""\
2098 %{debuginfodir}/%{elf_image_install_path}/*-%{KVERREL}%{?2:.%{2}}.debug\
2100 %{debuginfodir}/lib/modules/%{KVERREL}%{?2:.%{2}}\
2101 %{debuginfodir}/usr/src/kernels/%{KVERREL}%{?2:.%{2}}\
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
2117 # plz don't put in a version string unless you're going to tag
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)
2124 * Mon Oct 31 2011 Josh Boyer <jwboyer@redhat.com>
2125 - CVE-2011-4097: oom_badness() integer overflow (rhbz 750402)
2127 * Fri Oct 28 2011 Josh Boyer <jwboyer@redhat.com>
2128 - Add patch to prevent tracebacks on a warning in floppy.c (rhbz 749887)
2130 * Wed Oct 26 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.0-5
2131 - Rebuilt for glibc bug#747377
2133 * Wed Oct 26 2011 Josh Boyer <jwboyer@redhat.com>
2134 - CVE-2011-4077: xfs: potential buffer overflow in xfs_readlink() (rhbz 749166)
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)
2140 * Mon Oct 24 2011 Josh Boyer <jwboyer@redhat.com>
2141 - Backport 3 fixed from linux-next to fix dib0700 playback (rhbz 733827)
2143 * Mon Oct 24 2011 Chuck Ebbert <cebbert@redhat.com> 3.1.0-1
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)
2149 * Fri Oct 21 2011 Dave Jones <davej@redhat.com>
2150 - Lower severity of Radeon lockup messages.
2152 * Wed Oct 19 2011 Dave Jones <davej@redhat.com>
2153 - Add Sony VGN-FW21E to nonvs blacklist. (rhbz 641789)
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)
2158 * Tue Oct 18 2011 Chuck Ebbert <cebbert@redhat.com>
2159 - Fix lock inversion causing hangs in 3.1-rc9 (rhbz #746485)
2162 * Tue Oct 18 2011 Josh Boyer <jwboyer@redhat.com>
2163 - Add patch to fix invalid EFI remap calls from Matt Fleming
2165 * Mon Oct 17 2011 Josh Boyer <jwboyer@redhat.com>
2166 - Add two patches to fix stalls in khugepaged (rhbz 735946)
2168 * Thu Oct 13 2011 Josh Boyer <jwboyer@redhat.com>
2169 - Update usb-add-quirk-for-logitech-webcams.patch with C600 ID (rhbz 742010)
2171 * Thu Oct 13 2011 Adam Jackson <ajax@redhat.com>
2172 - drm/i915: Treat SDVO LVDS as digital when parsing EDID (#729882)
2174 * Thu Oct 13 2011 Josh Boyer <jwboyer@redhat.com>
2175 - Add patch from Stanislaw Gruszka to fix iwlagn NULL dereference (rhbz 744155)
2177 * Tue Oct 11 2011 Josh Boyer <jwboyer@redhat.com>
2178 - Disable CONFIG_XEN_BALLOON_MEMORY_HOTPLUG (rhbz 744408)
2180 * Thu Oct 06 2011 Josh Boyer <jwboyer@redhat.com>
2181 - Add patch to fix base frequency check for Ricoh e823 devices (rhbz 722509)
2183 * Thu Oct 06 2011 Dave Jones <davej@redhat.com>
2184 - Taint if virtualbox modules have been loaded.
2186 * Wed Oct 05 2011 Chuck Ebbert <cebbert@redhat.com> 3.1.0-0.rc9.git0.0
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()
2192 * Thu Sep 29 2011 Chuck Ebbert <cebbert@redhat.com>
2193 - Require grubby >= 8.3-1 so initrd line gets added (rhbz #725185)
2195 * Thu Sep 29 2011 Josh Boyer <jwboyer@redhat.com>
2196 - Update logitech USB quirk patch
2198 * Tue Sep 27 2011 Chuck Ebbert <cebbert@redhat.com> 3.1.0-0.rc8.git0.0
2200 - New option: CONFIG_ARM_ERRATA_764369 is not set
2201 - Fix up utrace.patch to apply after commit f9d81f61c
2203 * Thu Sep 22 2011 Dave Jones <davej@redhat.com>
2204 - Make CONFIG_XEN_PLATFORM_PCI=y (rhbz 740664)
2206 * Thu Sep 22 2011 Dennis Gilmore <dennis@ausil.us>
2207 - build vmlinux image for sparc64
2209 * Wed Sep 21 2011 Josh Boyer <jwboyer@redhat.com>
2212 * Tue Sep 20 2011 Dave Jones <davej@redhat.com>
2213 - Limit 32-bit x86 kernels to 32 processors.
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)
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
2222 * Thu Sep 15 2011 Josh Boyer <jwboyer@redhat.com>
2223 - CVE-2011-3191: cifs: fix possible memory corruption in CIFSFindNext
2225 * Wed Sep 14 2011 Josh Boyer <jwboyer@redhat.com>
2226 - Add patch to fix deadlock in ppc64 icswx (rhbz 737984)
2228 * Wed Sep 14 2011 Neil Horman <nhorman@redhat.com>
2229 - Enable CONFIG_IP_VS_IPV6 (bz 738194)
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)
2236 * Tue Sep 13 2011 Adam Jackson <ajax@redhat.com>
2237 - drm/i915: Shut the fbc messages up when drm.debug & 4
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
2243 * Fri Sep 09 2011 Josh Boyer <jwboyer@redhat.com>
2244 - Change to 64K page size for ppc64 kernels (rhbz 736751)
2246 * Fri Sep 09 2011 Josh Boyer <jwboyer@redhat.com> 3.1.0-0.rc5.git0.0
2249 * Wed Sep 07 2011 Josh Boyer <jwboyer@redhat.com>
2250 - Add patch to fix oops when linking entities in ucvideo (rhbz 735437)
2252 * Fri Sep 02 2011 Dave Jones <davej@redhat.com>
2253 - Apply patch to fix lockdep reports from ext4 (rhbz 732572)
2255 * Thu Sep 01 2011 Dave Jones <davej@redhat.com>
2256 - utrace: s390: fix the compile problem with traps.c (rhbz 735118)
2258 * Tue Aug 30 2011 Dave Jones <davej@redhat.com>
2259 - Revert "x86: Serialize EFI time accesses on rtc_lock" (rhbz 732755)
2261 * Tue Aug 30 2011 Josh Boyer <jwboyer@redhat.com>
2262 - Add patch to fix rhbz 606017
2264 * Mon Aug 29 2011 Josh Boyer <jwboyer@redhat.com>
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.
2272 * Fri Aug 26 2011 Dave Jones <davej@redhat.com>
2273 - Enable CONFIG_DETECT_HUNG_TASK for debug builds & rawhide.
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)
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)
2284 * Fri Aug 26 2011 Dave Jones <davej@redhat.com>
2285 - Drop acpi-ec-add-delay-before-write.patch (rhbz 733690)
2287 * Fri Aug 26 2011 Josh Boyer <jwboyer@redhat.com>
2288 - Linux 3.1-rc3-git5
2290 * Wed Aug 24 2011 Josh Boyer <jwboyer@redhat.com>
2291 - Revert 'iwlwifi: advertise max aggregate size'. (rhbz 708747)
2293 * Mon Aug 22 2011 Josh Boyer <jwboyer@redhat.com>
2295 - Add patch to fix duplicate backlight registration (rhbz 732202)
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)
2300 * Sat Aug 20 2011 Josh Boyer <jwboyer@redhat.com>
2301 - Linux 3.1-rc2-git7
2302 - Add a provides/obsoletes for cpupowerutils-devel
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
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)
2313 * Thu Aug 18 2011 Josh Boyer <jwboyer@redhat.com>
2314 - Adjust provides/obsoletes to replace the cpupowerutils package
2316 * Wed Aug 17 2011 Josh Boyer <jwboyer@redhat.com>
2317 - Create the kernel-tools subpackages based on a start by davej
2319 * Tue Aug 16 2011 Dave Jones <davej@redhat.com>
2320 - Prepare for packaging more of tools/ by renaming 'perf' subpackage
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
2329 * Sat Aug 13 2011 Dave Jones <davej@redhat.com>
2330 - CPU_FREQ drivers should now be built-in on x86-64.
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)
2337 * Tue Aug 09 2011 Josh Boyer <jwboyer@redhat.com>
2338 - Add Makefile.config and ARM config changes from David Marlin
2340 * Tue Aug 09 2011 Josh Boyer <jwboyer@redhat.com>
2341 - Add patch davej applied to f15 for rhbz 728872
2343 * Tue Aug 09 2011 Dave Jones <davej@redhat.com>
2344 - ptrace_report_syscall: check if TIF_SYSCALL_EMU is defined
2346 * Tue Aug 09 2011 Dave Jones <davej@redhat.com>
2347 - Enable CONFIG_SAMSUNG_LAPTOP (rhbz 729363)
2349 * Mon Aug 08 2011 Josh Boyer <jwboyer@redhat.com>
2350 - Bring in utrace fixes davej applied to f15. (rhbz 728379)
2352 * Fri Aug 05 2011 Josh Boyer <jwboyer@redhat.com>
2353 - Adjust Makefile munging for new 3.x numbering scheme
2355 * Fri Aug 05 2011 Dave Jones <davej@redhat.com>
2356 - Deselect CONFIG_DECNET. Unmaintained, and rubbish.
2358 * Fri Aug 05 2011 Josh Boyer <jwboyer@redhat.com>
2361 * Fri Aug 05 2011 Josh Boyer <jwboyer@redhat.com>
2362 - Add patch for rhbz 726701 from Matthew Garrett
2364 * Thu Aug 04 2011 Dave Jones <davej@redhat.com>
2365 - Drop neuter_intel_microcode_load.patch (rhbz 690930)
2367 * Wed Aug 03 2011 John W. Linville <linville@redhat.com>
2368 - Disable CONFIG_BCMA since no driver currently uses it (rhbz 727796)
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)
2374 * Tue Aug 02 2011 Josh Boyer <jwboyer@redhat.com>
2375 - Add patch to fix HFSPlus filesystem mounting (rhbz 720771)
2377 * Tue Aug 02 2011 Dave Jones <davej@redhat.com>
2378 - Change USB_SERIAL_OPTION back to modular. (rhbz 727680)
2380 * Tue Aug 02 2011 Josh Boyer <jwboyer@redhat.com>
2381 - Fix epoll recursive lockdep warnings (rhbz 722472)
2382 - Turn debug builds back on
2384 * Tue Aug 02 2011 Josh Boyer <jwboyer@redhat.com>
2385 - Add change from Yanko Kaneti to get the rt2x00 drivers in modules.networking
2388 * Fri Jul 29 2011 Dave Jones <davej@redhat.com>
2389 - Fix scsi_dispatch_cmd oops (USB eject problems, etc).
2391 * Thu Jul 28 2011 Dave Jones <davej@redhat.com>
2392 - module-init-tools needs to be a prereq, not a conflict.
2394 * Thu Jul 28 2011 Josh Boyer <jwboyer@redhat.com>
2395 - Backport patch to correct udlfb removal events (rhbz 726163)
2397 * Wed Jul 27 2011 Dave Jones <davej@redhat.com>
2398 - Turn off debug builds.
2400 * Fri Jul 22 2011 Dave Jones <davej@redhat.com>
2401 - bootwrapper needs objcopy. Add it to requires: (wwoods)
2403 * Fri Jul 22 2011 Kyle McMartin <kmcmartin@redhat.com> 3.0.0-1
2404 - Linux 3.0, but really 3.0.0 (sigh)
2406 * Thu Jul 21 2011 Chuck Ebbert <cebbert@redhat.com> 3.0-0.rc7.git10.1
2408 - Use ext4 for ext2 and ext3 filesystems (CONFIG_EXT4_USE_FOR_EXT23=y)
2410 * Thu Jul 21 2011 Dave Jones <davej@redhat.com>
2411 - Switch BLK_DEV_RAM to be modular (rhbz 720833)
2413 * Wed Jul 20 2011 Chuck Ebbert <cebbert@redhat.com> 3.0-0.rc7.git8.1
2416 * Fri Jul 15 2011 Dave Jones <davej@redhat.com> 3.0-0.rc7.git3.1
2419 * Fri Jul 15 2011 Dave Jones <davej@redhat.com>
2420 - Bring back utrace until uprobes gets merged upstream.
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.
2425 * Tue Jul 12 2011 John W. Linville <linville@redhat.com>
2426 - zd1211rw: fix invalid signal values from device (rhbz 720093)
2428 * Tue Jul 12 2011 John W. Linville <linville@redhat.com>
2429 - rt2x00: Add device ID for RT539F device. (rhbz 720594)
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
2435 * Mon Jul 11 2011 Dave Jones <davej@redhat.com>
2436 - Change BINFMT_MISC to be modular. (rhbz 695415)
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.
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)
2447 * Wed Jul 06 2011 Chuck Ebbert <cebbert@redhat.com>
2448 - Set CONFIG_X86_RESERVE_LOW=640 as requested by mjg
2450 * Mon Jul 04 2011 Kyle McMartin <kmcmartin@redhat.com> 3.0-0.rc6.git0.1
2452 - [generic] SCSI_ISCI=m, because why not
2454 * Sat Jul 02 2011 Kyle McMartin <kmcmartin@redhat.com> 3.0-0.rc5.git5.1
2455 - Linux 3.0-rc5-git5
2457 * Mon Jun 27 2011 Kyle McMartin <kmcmartin@redhat.com> 3.0-0.rc5.git0.1
2460 * Mon Jun 27 2011 Dave Jones <davej@redhat.com>
2461 - Disable CONFIG_CRYPTO_MANAGER_DISABLE_TESTS, as this also disables FIPS (rhbz 716942)
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)
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.
2473 * Tue Jun 21 2011 Kyle McMartin <kmcmartin@redhat.com> 3.0-0.rc4.git0.1
2474 - Linux 3.0-rc4 (getting closer...)
2476 * Fri Jun 17 2011 Kyle McMartin <kmcmartin@redhat.com> 3.0-0.rc3.git6.1
2477 - Update to 3.0-rc3-git6
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.
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
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.
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.
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.
2503 * Wed Jun 15 2011 Kyle McMartin <kmcmartin@redhat.com>
2504 - Conflict with pre-3.2.1-5 versions of mdadm. (#710646)
2506 * Wed Jun 15 2011 Kyle McMartin <kmcmartin@redhat.com>
2507 - Build in aesni-intel on i686 for symmetry with 64-bit.
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
2513 * Tue Jun 14 2011 Kyle McMartin <kmcmartin@redhat.com>
2514 - Update to 3.0-rc3, add another conflicts to deal with 2 digit
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
2519 - drm-intel-eeebox-eb1007-quirk.patch: ditto.
2520 - ath5k-disable-fast-channel-switching-by-default.patch: ditto.
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]
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
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)
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.
2538 * Wed Jun 01 2011 Kyle McMartin <kmcmartin@redhat.com> 3.0-0.rc1.git0.2
2539 - Fix utsname for 3.0-rc1
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.)
2544 * Mon May 30 2011 Kyle McMartin <kyle@redhat.com>
2545 - Trimmed changelog, see fedpkg git for earlier history.
2548 # The following Emacs magic makes C-c C-e use UTC dates.
2550 # rpm-change-log-uses-utc: t