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_firmware %{?_with_firmware: 1} %{?!_with_firmware: 0}
117 %define with_tools %{?_without_tools: 0} %{?!_without_tools: 1}
119 %define with_debuginfo %{?_without_debuginfo: 0} %{?!_without_debuginfo: 1}
120 # kernel-bootwrapper (for creating zImages from kernel + initrd)
121 %define with_bootwrapper %{?_without_bootwrapper: 0} %{?!_without_bootwrapper: 1}
122 # Want to build a the vsdo directories installed
123 %define with_vdso_install %{?_without_vdso_install: 0} %{?!_without_vdso_install: 1}
124 # ARM OMAP (Beagle/Panda Board)
125 %define with_omap %{?_without_omap: 0} %{?!_without_omap: 1}
126 # kernel-tegra (only valid for arm)
127 %define with_tegra %{?_without_tegra: 0} %{?!_without_tegra: 1}
129 # Build the kernel-doc package, but don't fail the build if it botches.
130 # Here "true" means "continue" and "false" means "fail the build".
131 %if 0%{?released_kernel}
132 %define doc_build_fail false
134 %define doc_build_fail true
137 %define rawhide_skip_docs 0
138 %if 0%{?rawhide_skip_docs}
140 %define doc_build_fail true
143 # Additional options for user-friendly one-off kernel building:
145 # Only build the base kernel (--with baseonly):
146 %define with_baseonly %{?_with_baseonly: 1} %{?!_with_baseonly: 0}
147 # Only build the smp kernel (--with smponly):
148 %define with_smponly %{?_with_smponly: 1} %{?!_with_smponly: 0}
149 # Only build the pae kernel (--with paeonly):
150 %define with_paeonly %{?_with_paeonly: 1} %{?!_with_paeonly: 0}
151 # Only build the debug kernel (--with dbgonly):
152 %define with_dbgonly %{?_with_dbgonly: 1} %{?!_with_dbgonly: 0}
154 # should we do C=1 builds with sparse
155 %define with_sparse %{?_with_sparse: 1} %{?!_with_sparse: 0}
157 # Set debugbuildsenabled to 1 for production (build separate debug kernels)
158 # and 0 for rawhide (all kernels are debug kernels).
159 # See also 'make debug' and 'make release'.
160 %define debugbuildsenabled 1
162 # Want to build a vanilla kernel build without any non-upstream patches?
163 %define with_vanilla %{?_with_vanilla: 1} %{?!_with_vanilla: 0}
165 # pkg_release is what we'll fill in for the rpm Release: field
166 %if 0%{?released_kernel}
169 %define stable_rctag .rc%{stable_rc}
171 %define pkg_release %{fedora_build}%{?stable_rctag}%{?buildid}%{?dist}
175 # non-released_kernel
177 %define rctag .rc%rcrev
182 %define gittag .git%gitrev
186 %define pkg_release 0%{?rctag}%{?gittag}.%{fedora_build}%{?buildid}%{?dist}
190 # The kernel tarball/base version
191 %define kversion 3.%{base_sublevel}
193 %define make_target bzImage
195 %define KVERREL %{version}-%{release}.%{_target_cpu}
196 %define hdrarch %_target_cpu
197 %define asmarch %_target_cpu
199 %if 0%{!?nopatches:1}
208 %define with_bootwrapper 0
209 %define variant -vanilla
211 %define variant_fedora -fedora
214 %define using_upstream_branch 0
215 %if 0%{?upstream_branch:1}
216 %define stable_update 0
217 %define using_upstream_branch 1
218 %define variant -%{upstream_branch}%{?variant_fedora}
219 %define pkg_release 0.%{fedora_build}%{upstream_branch_tag}%{?buildid}%{?dist}
222 %if !%{debugbuildsenabled}
226 %if !%{with_debuginfo}
227 %define _enable_debug_packages 0
229 %define debuginfodir /usr/lib/debug
231 # kernel-PAE is only built on i686.
236 # kernel-tegra and omap is only built on armv7 hard and softfp
237 %ifnarch armv7hl armv7l
242 # if requested, only build base kernel
249 # if requested, only build smp kernel
256 # if requested, only build pae kernel
263 # if requested, only build debug kernel
265 %if %{debugbuildsenabled}
274 %define all_x86 i386 i686
276 %if %{with_vdso_install}
277 # These arches install vdso/ directories.
278 %define vdso_arches %{all_x86} x86_64 ppc ppc64
281 # Overrides for generic default options
283 # only ppc and alphav56 need separate smp kernels
284 %ifnarch ppc alphaev56
288 # don't do debug builds on anything but i686 and x86_64
293 # only package docs noarch
298 # don't build noarch kernels or headers (duh)
301 %define with_headers 0
303 %define all_arch_configs kernel-%{version}-*.config
304 %define with_firmware %{?_with_firmware: 1} %{?!_with_firmware: 0}
307 # bootwrapper is only on ppc
309 %define with_bootwrapper 0
312 # sparse blows up on ppc64 alpha and sparc64
313 %ifarch ppc64 ppc alpha sparc64
314 %define with_sparse 0
322 %define all_arch_configs kernel-%{version}-i?86*.config
323 %define image_install_path boot
324 %define kernel_image arch/x86/boot/bzImage
329 %define all_arch_configs kernel-%{version}-x86_64*.config
330 %define image_install_path boot
331 %define kernel_image arch/x86/boot/bzImage
335 %define asmarch powerpc
336 %define hdrarch powerpc
337 %define all_arch_configs kernel-%{version}-ppc64*.config
338 %define image_install_path boot
339 %define make_target vmlinux
340 %define kernel_image vmlinux
341 %define kernel_image_elf 1
347 %define all_arch_configs kernel-%{version}-s390x.config
348 %define image_install_path boot
349 %define make_target image
350 %define kernel_image arch/s390/boot/image
355 %define asmarch sparc
356 %define all_arch_configs kernel-%{version}-sparc64*.config
357 %define make_target vmlinux
358 %define kernel_image vmlinux
359 %define image_install_path boot
364 %define hdrarch sparc
368 %define asmarch powerpc
369 %define hdrarch powerpc
370 %define all_arch_configs kernel-%{version}-ppc{-,.}*config
371 %define image_install_path boot
372 %define make_target vmlinux
373 %define kernel_image vmlinux
374 %define kernel_image_elf 1
378 %define all_arch_configs kernel-%{version}-ia64*.config
379 %define image_install_path boot/efi/EFI/redhat
380 %define make_target compressed
381 %define kernel_image vmlinux.gz
384 %ifarch alpha alphaev56
385 %define all_arch_configs kernel-%{version}-alpha*.config
386 %define image_install_path boot
387 %define make_target vmlinux
388 %define kernel_image vmlinux
392 %define all_arch_configs kernel-%{version}-arm*.config
393 %define image_install_path boot
396 %define make_target bzImage
397 %define kernel_image arch/arm/boot/zImage
398 # we build a up kernel on armv5tel. its used for qemu.
402 # we only build headers on the base arm arches
403 # just like we used to only build them on i386 for x86
404 %ifnarch armv5tel armv7hl
405 %define with_headers 0
411 # XXX temporary until last vdso patches are upstream
412 %define vdso_arches ppc ppc64
415 # Should make listnewconfig fail if there's config options
417 %if %{nopatches}%{using_upstream_branch}
418 %define listnewconfig_fail 0
420 %define listnewconfig_fail 1
423 # To temporarily exclude an architecture from being built, add it to
424 # %%nobuildarches. Do _NOT_ use the ExclusiveArch: line, because if we
425 # don't build kernel-headers then the new build system will no longer let
426 # us use the previous build of that package -- it'll just be completely AWOL.
427 # Which is a BadThing(tm).
429 # We only build kernel-headers on the following...
430 %define nobuildarches i386 s390 sparc sparcv9
432 %ifarch %nobuildarches
436 %define with_debuginfo 0
438 %define _enable_debug_packages 0
441 %define with_pae_debug 0
443 %define with_pae_debug %{with_debug}
446 # Architectures we build tools/cpupower on
447 %define cpupowerarchs %{ix86} x86_64 ppc ppc64
450 # Three sets of minimum package version requirements in the form of Conflicts:
451 # to versions below the minimum
455 # First the general kernel 2.6 required versions as per
456 # Documentation/Changes
458 %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
461 # Then a series of requirements that are distribution specific, either
462 # because we add patches for something, or the older versions have
463 # problems with the newer kernel or lack certain things that make
464 # integration in the distro harder than needed.
466 %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
468 # We moved the drm include files into kernel-headers, make sure there's
469 # a recent enough libdrm-devel on the system that doesn't have those.
470 %define kernel_headers_conflicts libdrm-devel < 2.4.0-0.15
473 # Packages that need to be installed before the kernel is, because the %%post
476 %define kernel_prereq fileutils, module-init-tools >= 3.11.1, initscripts >= 8.11.1-1, grubby >= 7.0.1
477 %define initrd_prereq dracut >= 001-7
480 # This macro does requires, provides, conflicts, obsoletes for a kernel package.
481 # %%kernel_reqprovconf <subpackage>
482 # It uses any kernel_<subpackage>_conflicts and kernel_<subpackage>_obsoletes
483 # macros defined above.
485 %define kernel_reqprovconf \
486 Provides: kernel = %{rpmversion}-%{pkg_release}\
487 Provides: kernel-%{_target_cpu} = %{rpmversion}-%{pkg_release}%{?1:.%{1}}\
488 Provides: kernel-drm = 4.3.0\
489 Provides: kernel-drm-nouveau = 16\
490 Provides: kernel-modeset = 1\
491 Provides: kernel-uname-r = %{KVERREL}%{?1:.%{1}}\
492 Requires(pre): %{kernel_prereq}\
493 Requires(pre): %{initrd_prereq}\
494 %if %{with_firmware}\
495 Requires(pre): kernel-firmware >= %{rpmversion}-%{pkg_release}\
497 Requires(pre): linux-firmware >= 20100806-2\
499 Requires(post): /sbin/new-kernel-pkg\
500 Requires(preun): /sbin/new-kernel-pkg\
501 Conflicts: %{kernel_dot_org_conflicts}\
502 Conflicts: %{package_conflicts}\
503 %{expand:%%{?kernel%{?1:_%{1}}_conflicts:Conflicts: %%{kernel%{?1:_%{1}}_conflicts}}}\
504 %{expand:%%{?kernel%{?1:_%{1}}_obsoletes:Obsoletes: %%{kernel%{?1:_%{1}}_obsoletes}}}\
505 %{expand:%%{?kernel%{?1:_%{1}}_provides:Provides: %%{kernel%{?1:_%{1}}_provides}}}\
506 # We can't let RPM do the dependencies automatic because it'll then pick up\
507 # a correct but undesirable perl dependency from the module headers which\
508 # isn't required for the kernel proper to function\
513 Name: kernel%{?variant}
514 Group: System Environment/Kernel
516 URL: http://www.kernel.org/
517 Version: %{rpmversion}
518 Release: %{pkg_release}
519 # DO NOT CHANGE THE 'ExclusiveArch' LINE TO TEMPORARILY EXCLUDE AN ARCHITECTURE BUILD.
520 # SET %%nobuildarches (ABOVE) INSTEAD
521 ExclusiveArch: noarch %{all_x86} x86_64 ppc ppc64 ia64 %{sparc} s390 s390x alpha alphaev56 %{arm}
527 # List the packages used during the kernel build
529 BuildRequires: module-init-tools, patch >= 2.5.4, bash >= 2.03, sh-utils, tar
530 BuildRequires: bzip2, findutils, gzip, m4, perl, make >= 3.78, diffutils, gawk
531 BuildRequires: gcc >= 3.4.2, binutils >= 2.12, redhat-rpm-config
532 BuildRequires: net-tools
533 BuildRequires: xmlto, asciidoc
535 BuildRequires: sparse >= 0.4.1
538 #BuildRequires: elfutils-devel zlib-devel binutils-devel newt-devel python-devel perl(ExtUtils::Embed) pciutils-devel gettext
540 BuildConflicts: rhbuildsys(DiskFree) < 500Mb
542 %define fancy_debuginfo 0
543 %if %{with_debuginfo}
544 %if 0%{?fedora} >= 8 || 0%{?rhel} >= 6
545 %define fancy_debuginfo 1
549 %if %{fancy_debuginfo}
550 # Fancy new debuginfo generation introduced in Fedora 8.
551 BuildRequires: rpm-build >= 4.4.2.1-4
552 %define debuginfo_args --strict-build-id
555 Source0: ftp://ftp.kernel.org/pub/linux/kernel/v3.0/linux-%{kversion}.tar.bz2
558 Source14: find-provides
561 Source20: Makefile.config
562 Source21: config-debug
563 Source22: config-nodebug
564 Source23: config-generic
565 Source24: config-rhel-generic
567 Source30: config-x86-generic
568 Source31: config-i686-PAE
569 Source32: config-x86-32-generic
571 Source40: config-x86_64-generic
573 Source50: config-powerpc-generic
574 Source51: config-powerpc32-generic
575 Source52: config-powerpc32-smp
576 Source53: config-powerpc64
578 Source60: config-ia64-generic
580 Source70: config-s390x
582 Source90: config-sparc64-generic
584 Source100: config-arm-generic
585 Source110: config-arm-omap-generic
586 Source111: config-arm-tegra
588 # This file is intentionally left empty in the stock kernel. Its a nicety
589 # added for those wanting to do custom rebuilds with altered config opts.
590 Source1000: config-local
592 # Sources for kernel-tools
593 Source2000: cpupower.service
594 Source2001: cpupower.config
596 # Here should be only the patches up to the upstream canonical Linus tree.
598 # For a stable release kernel
599 %if 0%{?stable_update}
601 %define stable_patch_00 patch-3.%{base_sublevel}.%{stable_base}.bz2
602 Patch00: %{stable_patch_00}
605 %define stable_patch_01 patch-3.%{base_sublevel}.%{stable_update}-rc%{stable_rc}.bz2
606 Patch01: %{stable_patch_01}
609 # non-released_kernel case
610 # These are automagically defined by the rcrev and gitrev values set up
611 # near the top of this spec file.
614 Patch00: patch-3.%{upstream_sublevel}-rc%{rcrev}.bz2
616 Patch01: patch-3.%{upstream_sublevel}-rc%{rcrev}-git%{gitrev}.bz2
619 # pre-{base_sublevel+1}-rc1 case
621 Patch00: patch-3.%{base_sublevel}-git%{gitrev}.bz2
626 %if %{using_upstream_branch}
630 Patch02: git-linus.diff
632 # we also need compile fixes for -vanilla
633 Patch04: linux-2.6-compile-fixes.patch
635 # build tweak for build ID magic, even for -vanilla
636 Patch05: linux-2.6-makefile-after_link.patch
641 # revert upstream patches we get via other methods
642 Patch09: linux-2.6-upstream-reverts.patch
647 Patch100: taint-vbox.patch
648 Patch160: linux-2.6-32bit-mmap-exec-randomization.patch
649 Patch161: linux-2.6-i386-nx-emulation.patch
651 Patch202: linux-2.6-debug-taint-vm.patch
653 Patch383: linux-2.6-defaults-aspm.patch
655 Patch390: linux-2.6-defaults-acpi-video.patch
656 Patch391: linux-2.6-acpi-video-dos.patch
657 Patch394: linux-2.6-acpi-debug-infinite-loop.patch
658 Patch395: acpi-ensure-thermal-limits-match-cpu-freq.patch
659 Patch396: acpi-sony-nonvs-blacklist.patch
661 Patch450: linux-2.6-input-kill-stupid-messages.patch
662 Patch452: linux-2.6.30-no-pcspkr-modalias.patch
664 Patch460: linux-2.6-serial-460800.patch
666 Patch470: die-floppy-die.patch
667 Patch471: floppy-drop-disable_hlt-warning.patch
669 Patch510: linux-2.6-silence-noise.patch
670 Patch530: linux-2.6-silence-fbcon-logo.patch
672 Patch700: linux-2.6-e1000-ich9-montevina.patch
674 Patch800: linux-2.6-crash-driver.patch
679 Patch1500: fix_xen_guest_on_old_EC2.patch
683 # nouveau + drm fixes
684 Patch1810: drm-nouveau-updates.patch
685 # intel drm is all merged upstream
686 Patch1824: drm-intel-next.patch
687 # make sure the lvds comes back on lid open
688 Patch1825: drm-intel-make-lvds-work.patch
689 # hush the i915 fbc noise
690 Patch1826: drm-i915-fbc-stfu.patch
691 # rhbz#729882, https://bugs.freedesktop.org/attachment.cgi?id=49069
692 Patch1827: drm-i915-sdvo-lvds-is-digital.patch
694 Patch1850: drm-lower-severity-radeon-lockup.diff
696 Patch1900: linux-2.6-intel-iommu-igfx.patch
699 # silence the ACPI blacklist code
700 Patch2802: linux-2.6-silence-acpi-blacklist.patch
703 Patch2899: linux-2.6-v4l-dvb-fixes.patch
704 Patch2900: linux-2.6-v4l-dvb-update.patch
705 Patch2901: linux-2.6-v4l-dvb-experimental.patch
706 Patch2902: linux-2.6-v4l-dvb-uvcvideo-update.patch
708 Patch2903: media-DiBcom-protect-the-I2C-bufer-access.patch
709 Patch2904: media-dib0700-protect-the-dib0700-buffer-access.patch
710 Patch2905: media-dib0700-correct-error-message.patch
712 Patch3000: rcutree-avoid-false-quiescent-states.patch
718 # patches headed upstream
719 Patch12010: add-appleir-usb-driver.patch
721 Patch12016: disable-i8042-check-on-apple-mac.patch
723 Patch12021: udlfb-bind-framebuffer-to-interface.patch
725 Patch12023: ums-realtek-driver-uses-stack-memory-for-DMA.patch
726 Patch12024: epoll-fix-spurious-lockdep-warnings.patch
727 Patch12025: rcu-avoid-just-onlined-cpu-resched.patch
728 Patch12026: block-stray-block-put-after-teardown.patch
729 Patch12027: usb-add-quirk-for-logitech-webcams.patch
730 Patch12029: crypto-register-cryptd-first.patch
731 Patch12030: epoll-limit-paths.patch
733 Patch12303: dmar-disable-when-ricoh-multifunction.patch
735 Patch13002: revert-efi-rtclock.patch
736 Patch13003: efi-dont-map-boot-services-on-32bit.patch
738 Patch13007: add-macbookair41-keyboard.patch
740 Patch13009: hvcs_pi_buf_alloc.patch
742 Patch13013: powerpc-Fix-deadlock-in-icswx-code.patch
744 Patch13014: iwlagn-fix-ht_params-NULL-pointer-dereference.patch
746 Patch20000: utrace.patch
748 # Flattened devicetree support
749 Patch21000: arm-omap-dt-compat.patch
750 Patch21001: arm-smsc-support-reading-mac-address-from-device-tree.patch
753 Patch21002: mmc-Always-check-for-lower-base-frequency-quirk-for-.patch
756 Patch21020: 0001-mm-vmscan-Limit-direct-reclaim-for-higher-order-allo.patch
757 Patch21021: 0002-mm-Abort-reclaim-compaction-if-compaction-can-procee.patch
760 Patch21030: be2net-non-member-vlan-pkts-not-received-in-promisco.patch
761 Patch21031: benet-remove-bogus-unlikely-on-vlan-check.patch
764 Patch21050: xfs-Fix-possible-memory-corruption-in-xfs_readlink.patch
766 Patch21070: oom-fix-integer-overflow-of-points.patch
770 BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root
773 The kernel package contains the Linux kernel (vmlinuz), the core of any
774 Linux operating system. The kernel handles the basic functions
775 of the operating system: memory allocation, process allocation, device
776 input and output, etc.
780 Summary: Various documentation bits found in the kernel source
783 This package contains documentation files from the kernel
784 source. Various bits of information about the Linux kernel and the
785 device drivers shipped with it are documented in these files.
787 You'll want to install this package if you need a reference to the
788 options that can be passed to Linux kernel modules at load time.
792 Summary: Header files for the Linux kernel for use by glibc
793 Group: Development/System
794 Obsoletes: glibc-kernheaders < 3.0-46
795 Provides: glibc-kernheaders = 3.0-46
797 Kernel-headers includes the C header files that specify the interface
798 between the Linux kernel and userspace libraries and programs. The
799 header files define structures and constants that are needed for
800 building most standard programs and are also needed for rebuilding the
804 Summary: Firmware files used by the Linux kernel
805 Group: Development/System
806 # This is... complicated.
807 # Look at the WHENCE file.
808 License: GPL+ and GPLv2+ and MIT and Redistributable, no modification permitted
809 %if "x%{?variant}" != "x"
810 Provides: kernel-firmware = %{rpmversion}-%{pkg_release}
812 %description firmware
813 Kernel-firmware includes firmware files required for some devices to
817 Summary: Boot wrapper files for generating combined kernel + initrd images
818 Group: Development/System
819 Requires: gzip binutils
820 %description bootwrapper
821 Kernel-bootwrapper contains the wrapper code which makes bootable "zImage"
822 files combining both kernel and initial ramdisk.
824 %package debuginfo-common-%{_target_cpu}
825 Summary: Kernel source files used by %{name}-debuginfo packages
826 Group: Development/Debug
827 %description debuginfo-common-%{_target_cpu}
828 This package is required by %{name}-debuginfo subpackages.
829 It provides the kernel source files common to all builds.
832 #%package -n kernel-tools
833 #Summary: Assortment of tools for the Linux kernel
834 #Group: Development/System
838 #Provides: cpupowerutils = 1:009-0.6.p1
839 #Obsoletes: cpupowerutils < 1:009-0.6.p1
840 #Provides: cpufreq-utils = 1:009-0.6.p1
841 #Provides: cpufrequtils = 1:009-0.6.p1
842 #Obsoletes: cpufreq-utils < 1:009-0.6.p1
843 #Obsoletes: cpufrequtils < 1:009-0.6.p1
844 #Obsoletes: cpuspeed < 1:1.5-16
845 #%description -n kernel-tools
846 #This package contains the tools/ directory from the kernel source
847 #- the perf tool and the supporting documentation.
849 #%package -n kernel-tools-devel
850 #Summary: Assortment of tools for the Linux kernel
851 #Group: Development/System
853 #Requires: kernel-tools = %{version}-%{release}
854 #Provides: cpupowerutils-devel = 1:009-0.6.p1
855 #Obsoletes: cpupowerutils-devel < 1:009-0.6.p1
856 #%description -n kernel-tools-devel
857 #This package contains the development files for the tools/ directory from
860 #%package -n kernel-tools-debuginfo
861 #Summary: Debug information for package kernel-tools
862 #Group: Development/Debug
863 #Requires: %{name}-debuginfo-common-%{_target_cpu} = %{version}-%{release}
865 #%description -n kernel-tools-debuginfo
866 #This package provides debug information for package kernel-tools.
868 ## Note that this pattern only works right to match the .build-id
869 ## symlinks because of the trailing nonmatching alternation and
870 ## the leading .*, because of find-debuginfo.sh's buggy handling
871 ## of matching the pattern against the symlinks file.
872 #%{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}
877 # This macro creates a kernel-<subpackage>-debuginfo package.
878 # %%kernel_debuginfo_package <subpackage>
880 %define kernel_debuginfo_package() \
881 %package %{?1:%{1}-}debuginfo\
882 Summary: Debug information for package %{name}%{?1:-%{1}}\
883 Group: Development/Debug\
884 Requires: %{name}-debuginfo-common-%{_target_cpu} = %{version}-%{release}\
885 Provides: %{name}%{?1:-%{1}}-debuginfo-%{_target_cpu} = %{version}-%{release}\
887 %description -n %{name}%{?1:-%{1}}-debuginfo\
888 This package provides debug information for package %{name}%{?1:-%{1}}.\
889 This is required to use SystemTap with %{name}%{?1:-%{1}}-%{KVERREL}.\
890 %{expand:%%global debuginfo_args %{?debuginfo_args} -p '/.*/%%{KVERREL}%{?1:\.%{1}}/.*|/.*%%{KVERREL}%{?1:\.%{1}}(\.debug)?' -o debuginfo%{?1}.list}\
894 # This macro creates a kernel-<subpackage>-devel package.
895 # %%kernel_devel_package <subpackage> <pretty-name>
897 %define kernel_devel_package() \
898 %package %{?1:%{1}-}devel\
899 Summary: Development package for building kernel modules to match the %{?2:%{2} }kernel\
900 Group: System Environment/Kernel\
901 Provides: kernel%{?1:-%{1}}-devel-%{_target_cpu} = %{version}-%{release}\
902 Provides: kernel-devel-%{_target_cpu} = %{version}-%{release}%{?1:.%{1}}\
903 Provides: kernel-devel = %{version}-%{release}%{?1:.%{1}}\
904 Provides: kernel-devel-uname-r = %{KVERREL}%{?1:.%{1}}\
906 Requires(pre): /usr/bin/find\
908 %description -n kernel%{?variant}%{?1:-%{1}}-devel\
909 This package provides kernel headers and makefiles sufficient to build modules\
910 against the %{?2:%{2} }kernel package.\
914 # This macro creates a kernel-<subpackage> and its -devel and -debuginfo too.
915 # %%define variant_summary The Linux kernel compiled for <configuration>
916 # %%kernel_variant_package [-n <pretty-name>] <subpackage>
918 %define kernel_variant_package(n:) \
920 Summary: %{variant_summary}\
921 Group: System Environment/Kernel\
923 %{expand:%%kernel_devel_package %1 %{!?-n:%1}%{?-n:%{-n*}}}\
924 %{expand:%%kernel_debuginfo_package %1}\
928 # First the auxiliary packages of the main kernel package.
929 %kernel_devel_package
930 %kernel_debuginfo_package
933 # Now, each variant package.
935 %define variant_summary The Linux kernel compiled for SMP machines
936 %kernel_variant_package -n SMP smp
938 This package includes a SMP version of the Linux kernel. It is
939 required only on machines with two or more CPUs as well as machines with
940 hyperthreading technology.
942 Install the kernel-smp package if your machine uses two or more CPUs.
945 %define variant_summary The Linux kernel compiled for PAE capable machines
946 %kernel_variant_package PAE
948 This package includes a version of the Linux kernel with support for up to
949 64GB of high memory. It requires a CPU with Physical Address Extensions (PAE).
950 The non-PAE kernel can only address up to 4GB of memory.
951 Install the kernel-PAE package if your machine has more than 4GB of memory.
954 %define variant_summary The Linux kernel compiled with extra debugging enabled for PAE capable machines
955 %kernel_variant_package PAEdebug
956 Obsoletes: kernel-PAE-debug
957 %description PAEdebug
958 This package includes a version of the Linux kernel with support for up to
959 64GB of high memory. It requires a CPU with Physical Address Extensions (PAE).
960 The non-PAE kernel can only address up to 4GB of memory.
961 Install the kernel-PAE package if your machine has more than 4GB of memory.
963 This variant of the kernel has numerous debugging options enabled.
964 It should only be installed when trying to gather additional information
965 on kernel bugs, as some of these options impact performance noticably.
968 %define variant_summary The Linux kernel compiled with extra debugging enabled
969 %kernel_variant_package debug
971 The kernel package contains the Linux kernel (vmlinuz), the core of any
972 Linux operating system. The kernel handles the basic functions
973 of the operating system: memory allocation, process allocation, device
974 input and output, etc.
976 This variant of the kernel has numerous debugging options enabled.
977 It should only be installed when trying to gather additional information
978 on kernel bugs, as some of these options impact performance noticably.
981 %define variant_summary The Linux kernel compiled for TI-OMAP boards
982 %kernel_variant_package omap
984 This package includes a version of the Linux kernel with support for
985 TI-OMAP based systems, i.e., BeagleBoard-xM.
987 %define variant_summary The Linux kernel compiled for tegra boards
988 %kernel_variant_package tegra
990 This package includes a version of the Linux kernel with support for
991 nvidia tegra based systems, i.e., trimslice, ac-100.
995 # do a few sanity-checks for --with *only builds
997 %if !%{with_up}%{with_pae}
998 echo "Cannot build --with baseonly, up build is disabled"
1005 echo "Cannot build --with smponly, smp build is disabled"
1010 # more sanity checking; do it quietly
1011 if [ "%{patches}" != "%%{patches}" ] ; then
1012 for patch in %{patches} ; do
1013 if [ ! -f $patch ] ; then
1014 echo "ERROR: Patch ${patch##/*/} listed in specfile but is missing"
1020 patch_command='patch -p1 -F1 -s'
1025 if [ ! -f $RPM_SOURCE_DIR/$patch ]; then
1028 %if !%{using_upstream_branch}
1029 if ! grep -E "^Patch[0-9]+: $patch\$" %{_specdir}/kernel-3.1.spec ; then
1030 if [ "${patch:0:8}" != "patch-3." ] ; then
1031 echo "ERROR: Patch $patch not listed as a source patch in specfile"
1037 *.bz2) bunzip2 < "$RPM_SOURCE_DIR/$patch" | $patch_command ${1+"$@"} ;;
1038 *.gz) gunzip < "$RPM_SOURCE_DIR/$patch" | $patch_command ${1+"$@"} ;;
1039 *) $patch_command ${1+"$@"} < "$RPM_SOURCE_DIR/$patch" ;;
1043 # don't apply patch if it's empty
1044 ApplyOptionalPatch()
1048 if [ ! -f $RPM_SOURCE_DIR/$patch ]; then
1051 local C=$(wc -l $RPM_SOURCE_DIR/$patch | awk '{print $1}')
1052 if [ "$C" -gt 9 ]; then
1053 ApplyPatch $patch ${1+"$@"}
1057 # we don't want a .config file when building firmware: it just confuses the build system
1058 %define build_firmware \
1059 mv .config .config.firmware_save \
1060 make INSTALL_FW_PATH=$RPM_BUILD_ROOT/lib/firmware firmware_install \
1061 mv .config.firmware_save .config
1063 # First we unpack the kernel tarball.
1064 # If this isn't the first make prep, we use links to the existing clean tarball
1065 # which speeds things up quite a bit.
1067 # Update to latest upstream.
1068 %if 0%{?released_kernel}
1069 %define vanillaversion 3.%{base_sublevel}
1070 # non-released_kernel case
1073 %define vanillaversion 3.%{upstream_sublevel}-rc%{rcrev}
1075 %define vanillaversion 3.%{upstream_sublevel}-rc%{rcrev}-git%{gitrev}
1078 # pre-{base_sublevel+1}-rc1 case
1080 %define vanillaversion 3.%{base_sublevel}-git%{gitrev}
1082 %define vanillaversion 3.%{base_sublevel}
1087 # %%{vanillaversion} : the full version name, e.g. 2.6.35-rc6-git3
1088 # %%{kversion} : the base version, e.g. 2.6.34
1090 # Use kernel-%%{kversion}%%{?dist} as the top-level directory name
1091 # so we can prep different trees within a single git directory.
1093 # Build a list of the other top-level kernel tree directories.
1094 # This will be used to hardlink identical vanilla subdirs.
1095 sharedirs=$(find "$PWD" -maxdepth 1 -type d -name 'kernel-3.*' \
1096 | grep -x -v "$PWD"/kernel-%{kversion}%{?dist}) ||:
1098 if [ ! -d kernel-%{kversion}%{?dist}/vanilla-%{vanillaversion} ]; then
1100 if [ -d kernel-%{kversion}%{?dist}/vanilla-%{kversion} ]; then
1102 # The base vanilla version already exists.
1103 cd kernel-%{kversion}%{?dist}
1105 # Any vanilla-* directories other than the base one are stale.
1106 for dir in vanilla-*; do
1107 [ "$dir" = vanilla-%{kversion} ] || rm -rf $dir &
1112 rm -f pax_global_header
1113 # Look for an identical base vanilla dir that can be hardlinked.
1114 for sharedir in $sharedirs ; do
1115 if [[ ! -z $sharedir && -d $sharedir/vanilla-%{kversion} ]] ; then
1119 if [[ ! -z $sharedir && -d $sharedir/vanilla-%{kversion} ]] ; then
1120 %setup -q -n kernel-%{kversion}%{?dist} -c -T
1121 cp -rl $sharedir/vanilla-%{kversion} .
1123 %setup -q -n kernel-%{kversion}%{?dist} -c
1124 mv linux-%{kversion} vanilla-%{kversion}
1129 %if "%{kversion}" != "%{vanillaversion}"
1131 for sharedir in $sharedirs ; do
1132 if [[ ! -z $sharedir && -d $sharedir/vanilla-%{vanillaversion} ]] ; then
1136 if [[ ! -z $sharedir && -d $sharedir/vanilla-%{vanillaversion} ]] ; then
1138 cp -rl $sharedir/vanilla-%{vanillaversion} .
1142 # Need to apply patches to the base vanilla version.
1143 cp -rl vanilla-%{kversion} vanilla-%{vanillaversion}
1144 cd vanilla-%{vanillaversion}
1146 # Update vanilla to the latest upstream.
1147 # (non-released_kernel case only)
1149 ApplyPatch patch-3.%{upstream_sublevel}-rc%{rcrev}.bz2
1151 ApplyPatch patch-3.%{upstream_sublevel}-rc%{rcrev}-git%{gitrev}.bz2
1154 # pre-{base_sublevel+1}-rc1 case
1156 ApplyPatch patch-3.%{base_sublevel}-git%{gitrev}.bz2
1168 # We already have all vanilla dirs, just change to the top-level directory.
1169 cd kernel-%{kversion}%{?dist}
1173 # Now build the fedora kernel tree.
1174 if [ -d linux-%{kversion}.%{_target_cpu} ]; then
1175 # Just in case we ctrl-c'd a prep already
1176 rm -rf deleteme.%{_target_cpu}
1177 # Move away the stale away, and delete in background.
1178 mv linux-%{kversion}.%{_target_cpu} deleteme.%{_target_cpu}
1179 rm -rf deleteme.%{_target_cpu} &
1182 cp -rl vanilla-%{vanillaversion} linux-%{kversion}.%{_target_cpu}
1184 cd linux-%{kversion}.%{_target_cpu}
1186 # released_kernel with possible stable updates
1187 %if 0%{?stable_base}
1188 ApplyPatch %{stable_patch_00}
1191 ApplyPatch %{stable_patch_01}
1194 %if %{using_upstream_branch}
1195 ### BRANCH APPLY ###
1198 # Drop some necessary files from the source dir into the buildroot
1199 cp $RPM_SOURCE_DIR/config-* .
1202 # Dynamically generate kernel .config files from config-* files
1203 make -f %{SOURCE20} VERSION=%{version} configs
1205 %if %{?all_arch_configs:1}%{!?all_arch_configs:0}
1206 #if a rhel kernel, apply the rhel config options
1208 for i in %{all_arch_configs}
1211 ./merge.pl config-rhel-generic $i.tmp > $i
1216 # Merge in any user-provided local config option changes
1217 for i in %{all_arch_configs}
1220 ./merge.pl %{SOURCE1000} $i.tmp > $i
1225 ApplyOptionalPatch git-linus.diff
1227 ApplyPatch linux-2.6-makefile-after_link.patch
1230 # misc small stuff to make things compile
1232 ApplyOptionalPatch linux-2.6-compile-fixes.patch
1236 # revert patches from upstream that conflict or that we get via other means
1237 ApplyOptionalPatch linux-2.6-upstream-reverts.patch -R
1240 # Architecture patches
1246 ApplyPatch arm-omap-dt-compat.patch
1247 ApplyPatch arm-smsc-support-reading-mac-address-from-device-tree.patch
1249 ApplyPatch taint-vbox.patch
1253 ApplyPatch linux-2.6-32bit-mmap-exec-randomization.patch
1254 ApplyPatch linux-2.6-i386-nx-emulation.patch
1257 # bugfixes to drivers and filesystems
1263 ApplyPatch xfs-Fix-possible-memory-corruption-in-xfs_readlink.patch
1277 ApplyPatch linux-2.6-defaults-acpi-video.patch
1278 ApplyPatch linux-2.6-acpi-video-dos.patch
1279 ApplyPatch linux-2.6-acpi-debug-infinite-loop.patch
1280 ApplyPatch acpi-ensure-thermal-limits-match-cpu-freq.patch
1281 ApplyPatch acpi-sony-nonvs-blacklist.patch
1283 # Various low-impact patches to aid debugging.
1284 ApplyPatch linux-2.6-debug-taint-vm.patch
1289 # enable ASPM by default on hardware we expect to work
1290 ApplyPatch linux-2.6-defaults-aspm.patch
1304 # The input layer spews crap no-one cares about.
1305 ApplyPatch linux-2.6-input-kill-stupid-messages.patch
1307 # stop floppy.ko from autoloading during udev...
1308 ApplyPatch die-floppy-die.patch
1309 ApplyPatch floppy-drop-disable_hlt-warning.patch
1311 ApplyPatch linux-2.6.30-no-pcspkr-modalias.patch
1313 # Allow to use 480600 baud on 16C950 UARTs
1314 ApplyPatch linux-2.6-serial-460800.patch
1316 # Silence some useless messages that still get printed with 'quiet'
1317 ApplyPatch linux-2.6-silence-noise.patch
1319 # Make fbcon not show the penguins with 'quiet'
1320 ApplyPatch linux-2.6-silence-fbcon-logo.patch
1322 # Changes to upstream defaults.
1325 # /dev/crash driver.
1326 ApplyPatch linux-2.6-crash-driver.patch
1328 # Hack e1000e to work on Montevina SDV
1329 ApplyPatch linux-2.6-e1000-ich9-montevina.patch
1333 # Assorted Virt Fixes
1334 ApplyPatch fix_xen_guest_on_old_EC2.patch
1339 ApplyOptionalPatch drm-nouveau-updates.patch
1342 ApplyOptionalPatch drm-intel-next.patch
1343 ApplyPatch drm-intel-make-lvds-work.patch
1344 ApplyPatch drm-i915-fbc-stfu.patch
1345 ApplyPatch drm-i915-sdvo-lvds-is-digital.patch
1347 ApplyPatch drm-lower-severity-radeon-lockup.diff
1349 ApplyPatch linux-2.6-intel-iommu-igfx.patch
1351 # silence the ACPI blacklist code
1352 ApplyPatch linux-2.6-silence-acpi-blacklist.patch
1354 # V4L/DVB updates/fixes/experimental drivers
1355 # apply if non-empty
1356 ApplyOptionalPatch linux-2.6-v4l-dvb-fixes.patch
1357 ApplyOptionalPatch linux-2.6-v4l-dvb-update.patch
1358 ApplyOptionalPatch linux-2.6-v4l-dvb-experimental.patch
1359 #ApplyPatch linux-2.6-v4l-dvb-uvcvideo-update.patch
1361 # Patches headed upstream
1362 ApplyPatch rcutree-avoid-false-quiescent-states.patch
1364 ApplyPatch disable-i8042-check-on-apple-mac.patch
1366 ApplyPatch add-appleir-usb-driver.patch
1368 ApplyPatch udlfb-bind-framebuffer-to-interface.patch
1369 ApplyPatch ums-realtek-driver-uses-stack-memory-for-DMA.patch
1370 ApplyPatch epoll-fix-spurious-lockdep-warnings.patch
1371 ApplyPatch epoll-limit-paths.patch
1372 ApplyPatch rcu-avoid-just-onlined-cpu-resched.patch
1373 ApplyPatch block-stray-block-put-after-teardown.patch
1374 ApplyPatch usb-add-quirk-for-logitech-webcams.patch
1376 ApplyPatch crypto-register-cryptd-first.patch
1379 ApplyPatch dmar-disable-when-ricoh-multifunction.patch
1381 ApplyPatch revert-efi-rtclock.patch
1382 ApplyPatch efi-dont-map-boot-services-on-32bit.patch
1384 ApplyPatch add-macbookair41-keyboard.patch
1386 ApplyPatch hvcs_pi_buf_alloc.patch
1388 ApplyPatch powerpc-Fix-deadlock-in-icswx-code.patch
1390 ApplyPatch iwlagn-fix-ht_params-NULL-pointer-dereference.patch
1393 ApplyPatch mmc-Always-check-for-lower-base-frequency-quirk-for-.patch
1395 ApplyPatch media-DiBcom-protect-the-I2C-bufer-access.patch
1396 ApplyPatch media-dib0700-protect-the-dib0700-buffer-access.patch
1397 ApplyPatch media-dib0700-correct-error-message.patch
1400 ApplyPatch utrace.patch
1403 ApplyPatch 0001-mm-vmscan-Limit-direct-reclaim-for-higher-order-allo.patch
1404 ApplyPatch 0002-mm-Abort-reclaim-compaction-if-compaction-can-procee.patch
1407 ApplyPatch be2net-non-member-vlan-pkts-not-received-in-promisco.patch
1408 ApplyPatch benet-remove-bogus-unlikely-on-vlan-check.patch
1411 ApplyPatch oom-fix-integer-overflow-of-points.patch
1413 # END OF PATCH APPLICATIONS
1415 # BEGIN Planet-Lab Patches
1416 # %(cat planetlab-patches.in)
1417 # END OF Planet-Lab Patches
1421 # Any further pre-build tree manipulations happen here.
1423 chmod +x scripts/checkpatch.pl
1425 # This Prevents scripts/setlocalversion from mucking with our version numbers.
1428 # only deal with configs if we are going to build for the arch
1429 %ifnarch %nobuildarches
1433 # Remove configs not for the buildarch
1434 for cfg in kernel-%{version}-*.config; do
1435 if [ `echo %{all_arch_configs} | grep -c $cfg` -eq 0 ]; then
1440 %if !%{debugbuildsenabled}
1441 rm -f kernel-%{version}-*debug.config
1444 # now run oldconfig over all the config files
1448 Arch=`head -1 .config | cut -b 3-`
1449 make ARCH=$Arch listnewconfig | grep -E '^CONFIG_' >.newoptions || true
1450 %if %{listnewconfig_fail}
1451 if [ -s .newoptions ]; then
1457 make ARCH=$Arch oldnoconfig
1458 echo "# $Arch" > configs/$i
1459 cat .config >> configs/$i
1461 # end of kernel config
1464 # get rid of unwanted files resulting from patch fuzz
1465 find . \( -name "*.orig" -o -name "*~" \) -exec rm -f {} \; >/dev/null
1467 # remove unnecessary SCM files
1468 find . -name .gitignore -exec rm -f {} \; >/dev/null
1478 %define sparse_mflags C=1
1481 %if %{fancy_debuginfo}
1482 # This override tweaks the kernel makefiles so that we run debugedit on an
1483 # object before embedding it. When we later run find-debuginfo.sh, it will
1484 # run debugedit again. The edits it does change the build ID bits embedded
1485 # in the stripped object, but repeating debugedit is a no-op. We do it
1486 # beforehand to get the proper final build ID bits into the embedded image.
1487 # This affects the vDSO images in vmlinux, and the vmlinux image in bzImage.
1489 'sh -xc "/usr/lib/rpm/debugedit -b $$RPM_BUILD_DIR -d /usr/src/debug \
1495 eu-strip --remove-comment -o "$2" "$1"
1502 InstallName=${4:-vmlinuz}
1504 # Pick the right config file for the kernel we're building
1505 Config=kernel-%{version}-%{_target_cpu}${Flavour:+-${Flavour}}.config
1506 DevelDir=/usr/src/kernels/%{KVERREL}${Flavour:+.${Flavour}}
1508 # When the bootable image is just the ELF kernel, strip it.
1509 # We already copy the unstripped file into the debuginfo package.
1510 if [ "$KernelImage" = vmlinux ]; then
1511 CopyKernel=cp_vmlinux
1516 KernelVer=%{version}-%{release}.%{_target_cpu}${Flavour:+.${Flavour}}
1517 echo BUILDING A KERNEL FOR ${Flavour} %{_target_cpu}...
1519 %if 0%{?stable_update}
1520 # make sure SUBLEVEL is incremented on a stable release. Sigh 3.x.
1521 perl -p -i -e "s/^SUBLEVEL.*/SUBLEVEL = %{?stablerev}/" Makefile
1524 # make sure EXTRAVERSION says what we want it to say
1525 perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = -%{release}.%{_target_cpu}${Flavour:+.${Flavour}}/" Makefile
1527 # if pre-rc1 devel kernel, must fix up PATCHLEVEL for our versioning scheme
1530 perl -p -i -e 's/^PATCHLEVEL.*/PATCHLEVEL = %{upstream_sublevel}/' Makefile
1534 # and now to start the build process
1537 cp configs/$Config .config
1539 Arch=`head -1 .config | cut -b 3-`
1540 echo USING ARCH=$Arch
1542 make -s ARCH=$Arch oldnoconfig >/dev/null
1543 make -s ARCH=$Arch V=1 %{?_smp_mflags} $MakeTarget %{?sparse_mflags}
1544 make -s ARCH=$Arch V=1 %{?_smp_mflags} modules %{?sparse_mflags} || exit 1
1546 # Start installing the results
1547 %if %{with_debuginfo}
1548 mkdir -p $RPM_BUILD_ROOT%{debuginfodir}/boot
1549 mkdir -p $RPM_BUILD_ROOT%{debuginfodir}/%{image_install_path}
1551 mkdir -p $RPM_BUILD_ROOT/%{image_install_path}
1552 install -m 644 .config $RPM_BUILD_ROOT/boot/config-$KernelVer
1553 install -m 644 System.map $RPM_BUILD_ROOT/boot/System.map-$KernelVer
1555 # We estimate the size of the initramfs because rpm needs to take this size
1556 # into consideration when performing disk space calculations. (See bz #530778)
1557 dd if=/dev/zero of=$RPM_BUILD_ROOT/boot/initramfs-$KernelVer.img bs=1M count=20
1559 if [ -f arch/$Arch/boot/zImage.stub ]; then
1560 cp arch/$Arch/boot/zImage.stub $RPM_BUILD_ROOT/%{image_install_path}/zImage.stub-$KernelVer || :
1562 $CopyKernel $KernelImage \
1563 $RPM_BUILD_ROOT/%{image_install_path}/$InstallName-$KernelVer
1564 chmod 755 $RPM_BUILD_ROOT/%{image_install_path}/$InstallName-$KernelVer
1566 mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer
1567 # Override $(mod-fw) because we don't want it to install any firmware
1568 # We'll do that ourselves with 'make firmware_install'
1569 make -s ARCH=$Arch INSTALL_MOD_PATH=$RPM_BUILD_ROOT modules_install KERNELRELEASE=$KernelVer mod-fw=
1570 %ifarch %{vdso_arches}
1571 make -s ARCH=$Arch INSTALL_MOD_PATH=$RPM_BUILD_ROOT vdso_install KERNELRELEASE=$KernelVer
1572 if [ ! -s ldconfig-kernel.conf ]; then
1573 echo > ldconfig-kernel.conf "\
1574 # Placeholder file, no vDSO hwcap entries used in this kernel."
1576 %{__install} -D -m 444 ldconfig-kernel.conf \
1577 $RPM_BUILD_ROOT/etc/ld.so.conf.d/kernel-$KernelVer.conf
1580 # And save the headers/makefiles etc for building modules against
1582 # This all looks scary, but the end result is supposed to be:
1583 # * all arch relevant include/ files
1584 # * all Makefile/Kconfig files
1585 # * all script/ files
1587 rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
1588 rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/source
1589 mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
1590 (cd $RPM_BUILD_ROOT/lib/modules/$KernelVer ; ln -s build source)
1591 # dirs for additional modules per module-init-tools, kbuild/modules.txt
1592 mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/extra
1593 mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/updates
1594 # first copy everything
1595 cp --parents `find -type f -name "Makefile*" -o -name "Kconfig*"` $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
1596 cp Module.symvers $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
1597 cp System.map $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
1598 if [ -s Module.markers ]; then
1599 cp Module.markers $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
1601 # then drop all but the needed Makefiles/Kconfig files
1602 rm -rf $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/Documentation
1603 rm -rf $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts
1604 rm -rf $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
1605 cp .config $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
1606 cp -a scripts $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
1607 if [ -d arch/$Arch/scripts ]; then
1608 cp -a arch/$Arch/scripts $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/arch/%{_arch} || :
1610 if [ -f arch/$Arch/*lds ]; then
1611 cp -a arch/$Arch/*lds $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/arch/%{_arch}/ || :
1613 rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/*.o
1614 rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/*/*.o
1616 cp -a --parents arch/powerpc/lib/crtsavres.[So] $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
1618 if [ -d arch/%{asmarch}/include ]; then
1619 cp -a --parents arch/%{asmarch}/include $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
1621 cp -a include $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
1623 # Make sure the Makefile and version.h have a matching timestamp so that
1624 # external modules can be built
1625 touch -r $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/Makefile $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include/linux/version.h
1626 touch -r $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/.config $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include/linux/autoconf.h
1627 # Copy .config to include/config/auto.conf so "make prepare" is unnecessary.
1628 cp $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/.config $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include/config/auto.conf
1630 %if %{fancy_debuginfo}
1631 if test -s vmlinux.id; then
1632 cp vmlinux.id $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/vmlinux.id
1634 echo >&2 "*** ERROR *** no vmlinux build ID! ***"
1640 # save the vmlinux file for kernel debugging into the kernel-debuginfo rpm
1642 %if %{with_debuginfo}
1643 mkdir -p $RPM_BUILD_ROOT%{debuginfodir}/lib/modules/$KernelVer
1644 cp vmlinux $RPM_BUILD_ROOT%{debuginfodir}/lib/modules/$KernelVer
1647 find $RPM_BUILD_ROOT/lib/modules/$KernelVer -name "*.ko" -type f >modnames
1649 # mark modules executable so that strip-to-file can strip them
1650 xargs --no-run-if-empty chmod u+x < modnames
1652 # Generate a list of modules for block and networking.
1654 grep -F /drivers/ modnames | xargs --no-run-if-empty nm -upA |
1655 sed -n 's,^.*/\([^/]*\.ko\): *U \(.*\)$,\1 \2,p' > drivers.undef
1657 collect_modules_list()
1659 sed -r -n -e "s/^([^ ]+) \\.?($2)\$/\\1/p" drivers.undef |
1660 LC_ALL=C sort -u > $RPM_BUILD_ROOT/lib/modules/$KernelVer/modules.$1
1663 collect_modules_list networking \
1664 'register_netdev|ieee80211_register_hw|usbnet_probe|phy_driver_register|rt2x00(pci|usb)_probe'
1665 collect_modules_list block \
1666 'ata_scsi_ioctl|scsi_add_host|scsi_add_host_with_dma|blk_init_queue|register_mtd_blktrans|scsi_esp_register|scsi_register_device_handler'
1667 collect_modules_list drm \
1669 collect_modules_list modesetting \
1672 # detect missing or incorrect license tags
1676 echo -n "${i#$RPM_BUILD_ROOT/lib/modules/$KernelVer/} " >> modinfo
1677 /sbin/modinfo -l $i >> modinfo
1681 'GPL( v2)?$|Dual BSD/GPL$|Dual MPL/GPL$|GPL and additional rights$' \
1684 rm -f modinfo modnames
1686 # remove files that will be auto generated by depmod at rpm -i time
1687 for i in alias alias.bin builtin.bin ccwmap dep dep.bin ieee1394map inputmap isapnpmap ofmap pcimap seriomap symbols symbols.bin usbmap
1689 rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/modules.$i
1692 # Move the devel headers out of the root file system
1693 mkdir -p $RPM_BUILD_ROOT/usr/src/kernels
1694 mv $RPM_BUILD_ROOT/lib/modules/$KernelVer/build $RPM_BUILD_ROOT/$DevelDir
1695 ln -sf ../../..$DevelDir $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
1697 # prune junk from kernel-devel
1698 find $RPM_BUILD_ROOT/usr/src/kernels -name ".*.cmd" -exec rm -f {} \;
1705 # prepare directories
1706 rm -rf $RPM_BUILD_ROOT
1707 mkdir -p $RPM_BUILD_ROOT/boot
1708 mkdir -p $RPM_BUILD_ROOT%{_libexecdir}
1710 cd linux-%{kversion}.%{_target_cpu}
1713 BuildKernel %make_target %kernel_image debug
1716 %if %{with_pae_debug}
1717 BuildKernel %make_target %kernel_image PAEdebug
1721 BuildKernel %make_target %kernel_image PAE
1725 BuildKernel %make_target %kernel_image omap
1729 BuildKernel %make_target %kernel_image tegra
1733 BuildKernel %make_target %kernel_image
1737 BuildKernel %make_target %kernel_image smp
1742 #make %{?_smp_mflags} -C tools/perf -s V=1 HAVE_CPLUS_DEMANGLE=1 prefix=%{_prefix} all
1743 #make %{?_smp_mflags} -C tools/perf -s V=1 prefix=%{_prefix} man || %{doc_build_fail}
1745 #%ifarch %{cpupowerarchs}
1747 ## make sure version-gen.sh is executable.
1748 #chmod +x tools/power/cpupower/utils/version-gen.sh
1749 #make %{?_smp_mflags} -C tools/power/cpupower CPUFREQ_BENCH=false
1751 # cd tools/power/cpupower/debug/i386
1752 # make %{?_smp_mflags} centrino-decode powernow-k8-decode
1756 # cd tools/power/cpupower/debug/x86_64
1757 # make %{?_smp_mflags} centrino-decode powernow-k8-decode
1764 # Make the HTML and man pages.
1765 make htmldocs mandocs || %{doc_build_fail}
1767 # sometimes non-world-readable files sneak into the kernel source tree
1768 chmod -R a=rX Documentation
1769 find Documentation -type d | xargs chmod u+w
1773 ### Special hacks for debuginfo subpackages.
1776 # This macro is used by %%install, so we must redefine it before that.
1777 %define debug_package %{nil}
1779 %if %{fancy_debuginfo}
1780 %define __debug_install_post \
1781 /usr/lib/rpm/find-debuginfo.sh %{debuginfo_args} %{_builddir}/%{?buildsubdir}\
1785 %if %{with_debuginfo}
1787 %global __debug_package 1
1788 %files -f debugfiles.list debuginfo-common-%{_target_cpu}
1789 %defattr(-,root,root)
1799 cd linux-%{kversion}.%{_target_cpu}
1802 docdir=$RPM_BUILD_ROOT%{_datadir}/doc/kernel-doc-%{rpmversion}
1803 man9dir=$RPM_BUILD_ROOT%{_datadir}/man/man9
1805 # copy the source over
1807 tar -f - --exclude=man --exclude='.*' -c Documentation | tar xf - -C $docdir
1809 # Install man pages for the kernel API.
1811 find Documentation/DocBook/man -name '*.9.gz' -print0 |
1812 xargs -0 --no-run-if-empty %{__install} -m 444 -t $man9dir $m
1813 ls $man9dir | grep -q '' || > $man9dir/BROKEN
1816 # We have to do the headers install before the tools install because the
1817 # kernel headers_install will remove any header files in /usr/include that
1818 # it doesn't install itself.
1821 # Install kernel headers
1822 make ARCH=%{hdrarch} INSTALL_HDR_PATH=$RPM_BUILD_ROOT/usr headers_install
1824 # Do headers_check but don't die if it fails.
1825 make ARCH=%{hdrarch} INSTALL_HDR_PATH=$RPM_BUILD_ROOT/usr headers_check \
1826 > hdrwarnings.txt || :
1827 if grep -q exist hdrwarnings.txt; then
1828 sed s:^$RPM_BUILD_ROOT/usr/include/:: hdrwarnings.txt
1829 # Temporarily cause a build failure if header inconsistencies.
1833 find $RPM_BUILD_ROOT/usr/include \
1834 \( -name .install -o -name .check -o \
1835 -name ..install.cmd -o -name ..check.cmd \) | xargs rm -f
1837 # glibc provides scsi headers for itself, for now
1838 rm -rf $RPM_BUILD_ROOT/usr/include/scsi
1839 rm -f $RPM_BUILD_ROOT/usr/include/asm*/atomic.h
1840 rm -f $RPM_BUILD_ROOT/usr/include/asm*/io.h
1841 rm -f $RPM_BUILD_ROOT/usr/include/asm*/irq.h
1845 ## perf tool binary and supporting scripts/binaries
1846 #make -C tools/perf -s V=1 DESTDIR=$RPM_BUILD_ROOT HAVE_CPLUS_DEMANGLE=1 prefix=%{_prefix} install
1848 ## perf man pages (note: implicit rpm magic compresses them later)
1849 #make -C tools/perf -s V=1 DESTDIR=$RPM_BUILD_ROOT HAVE_CPLUS_DEMANGLE=1 prefix=%{_prefix} install-man || %{doc_build_fail}
1851 #%ifarch %{cpupowerarchs}
1852 #make -C tools/power/cpupower DESTDIR=$RPM_BUILD_ROOT libdir=%{_libdir} mandir=%{_mandir} CPUFREQ_BENCH=false install
1853 #rm -f %{buildroot}%{_libdir}/*.{a,la}
1854 #%find_lang cpupower
1855 #mv cpupower.lang ../
1857 # cd tools/power/cpupower/debug/i386
1858 # install -m755 centrino-decode %{buildroot}%{_bindir}/centrino-decode
1859 # install -m755 powernow-k8-decode %{buildroot}%{_bindir}/powernow-k8-decode
1863 # cd tools/power/cpupower/debug/x86_64
1864 # install -m755 centrino-decode %{buildroot}%{_bindir}/centrino-decode
1865 # install -m755 powernow-k8-decode %{buildroot}%{_bindir}/powernow-k8-decode
1868 #chmod 0755 %{buildroot}%{_libdir}/libcpupower.so*
1869 #mkdir -p %{buildroot}%{_unitdir} %{buildroot}%{_sysconfdir}/sysconfig
1870 #install -m644 %{SOURCE2000} %{buildroot}%{_unitdir}/cpupower.service
1871 #install -m644 %{SOURCE2001} %{buildroot}%{_sysconfdir}/sysconfig/cpupower
1876 %if %{with_firmware}
1880 %if %{with_bootwrapper}
1881 make DESTDIR=$RPM_BUILD_ROOT bootwrapper_install WRAPPER_OBJDIR=%{_libdir}/kernel-wrapper WRAPPER_DTSDIR=%{_libdir}/kernel-wrapper/dts
1890 rm -rf $RPM_BUILD_ROOT
1897 #%post -n kernel-tools
1900 #%postun -n kernel-tools
1905 # This macro defines a %%post script for a kernel*-devel package.
1906 # %%kernel_devel_post [<subpackage>]
1908 %define kernel_devel_post() \
1909 %{expand:%%post %{?1:%{1}-}devel}\
1910 if [ -f /etc/sysconfig/kernel ]\
1912 . /etc/sysconfig/kernel || exit $?\
1914 if [ "$HARDLINK" != "no" -a -x /usr/sbin/hardlink ]\
1916 (cd /usr/src/kernels/%{KVERREL}%{?1:.%{1}} &&\
1917 /usr/bin/find . -type f | while read f; do\
1918 hardlink -c /usr/src/kernels/*.fc*.*/$f $f\
1924 # This macro defines a %%posttrans script for a kernel package.
1925 # %%kernel_variant_posttrans [<subpackage>]
1926 # More text can follow to go at the end of this variant's %%post.
1928 %define kernel_variant_posttrans() \
1929 %{expand:%%posttrans %{?1}}\
1930 /sbin/new-kernel-pkg --package kernel%{?-v:-%{-v*}} --mkinitrd --dracut --depmod --update %{KVERREL}%{?-v:.%{-v*}} || exit $?\
1931 /sbin/new-kernel-pkg --package kernel%{?1:-%{1}} --rpmposttrans %{KVERREL}%{?1:.%{1}} || exit $?\
1932 pushd /boot || exit $?\
1933 /bin/ln -sf config-%{KVERREL}%{?1:.%{1}} config || exit $?\
1934 /bin/ln -sf config-%{KVERREL}%{?1:.%{1}} configsmp || exit $?\
1935 /bin/ln -sf initrd-%{KVERREL}%{?1:.%{1}}.img initrd-boot || exit $?\
1936 /bin/ln -sf initrd-%{KVERREL}%{?1:.%{1}}.img initrd-bootsmp || exit $?\
1937 /bin/ln -sf vmlinuz-%{KVERREL}%{?1:.%{1}} kernel-boot || exit $?\
1938 /bin/ln -sf vmlinuz-%{KVERREL}%{?1:.%{1}} kernel-bootsmp || exit $?\
1940 /bin/mkdir -p /etc/planetlab || exit $?\
1941 /bin/touch /etc/planetlab/update-reboot || exit $?\
1945 # This macro defines a %%post script for a kernel package and its devel package.
1946 # %%kernel_variant_post [-v <subpackage>] [-r <replace>]
1947 # More text can follow to go at the end of this variant's %%post.
1949 %define kernel_variant_post(v:r:) \
1950 %{expand:%%kernel_devel_post %{?-v*}}\
1951 %{expand:%%kernel_variant_posttrans %{?-v*}}\
1952 %{expand:%%post %{?-v*}}\
1954 if [ `uname -i` == "x86_64" -o `uname -i` == "i386" ] &&\
1955 [ -f /etc/sysconfig/kernel ]; then\
1956 /bin/sed -r -i -e 's/^DEFAULTKERNEL=%{-r*}$/DEFAULTKERNEL=kernel%{?-v:-%{-v*}}/' /etc/sysconfig/kernel || exit $?\
1959 /sbin/new-kernel-pkg --package kernel%{?-v:-%{-v*}} --install %{KVERREL}%{?-v:.%{-v*}} || exit $?\
1964 # This macro defines a %%preun script for a kernel package.
1965 # %%kernel_variant_preun <subpackage>
1967 %define kernel_variant_preun() \
1968 %{expand:%%preun %{?1}}\
1969 /sbin/new-kernel-pkg --rminitrd --rmmoddep --remove %{KVERREL}%{?1:.%{1}} || exit $?\
1972 %kernel_variant_preun
1973 %kernel_variant_post -r kernel-smp
1975 %kernel_variant_preun smp
1976 %kernel_variant_post -v smp
1978 %kernel_variant_preun PAE
1979 %kernel_variant_post -v PAE -r (kernel|kernel-smp)
1981 %kernel_variant_preun debug
1982 %kernel_variant_post -v debug
1984 %kernel_variant_post -v PAEdebug -r (kernel|kernel-smp)
1985 %kernel_variant_preun PAEdebug
1987 %kernel_variant_preun omap
1988 %kernel_variant_post -v omap
1990 %kernel_variant_preun tegra
1991 %kernel_variant_post -v tegra
1993 if [ -x /sbin/ldconfig ]
1995 /sbin/ldconfig -X || exit $?
2004 %defattr(-,root,root)
2008 %if %{with_firmware}
2010 %defattr(-,root,root)
2012 %doc linux-%{kversion}.%{_target_cpu}/firmware/WHENCE
2015 %if %{with_bootwrapper}
2017 %defattr(-,root,root)
2019 %{_libdir}/kernel-wrapper
2022 # only some architecture builds need kernel-doc
2025 %defattr(-,root,root)
2026 %{_datadir}/doc/kernel-doc-%{rpmversion}/Documentation/*
2027 %dir %{_datadir}/doc/kernel-doc-%{rpmversion}/Documentation
2028 %dir %{_datadir}/doc/kernel-doc-%{rpmversion}
2029 %{_datadir}/man/man9/*
2033 ##%files -n kernel-tools -f cpupower.lang
2034 #%defattr(-,root,root)
2036 #%dir %{_libexecdir}/perf-core
2037 #%{_libexecdir}/perf-core/*
2038 #%{_mandir}/man[1-8]/*
2040 #%ifarch %{cpupowerarchs}
2041 #%{_bindir}/cpupower
2042 #%ifarch %{ix86} x86_64
2043 #%{_bindir}/centrino-decode
2044 #%{_bindir}/powernow-k8-decode
2046 #%{_libdir}/libcpupower.so.0
2047 #%{_libdir}/libcpupower.so.0.0.0
2048 #%{_unitdir}/cpupower.service
2049 #%config(noreplace) %{_sysconfdir}/sysconfig/cpupower
2052 #%if %{with_debuginfo}
2053 #%files -f kernel-tools-debuginfo.list -n kernel-tools-debuginfo
2054 #%defattr(-,root,root)
2057 #%ifarch %{cpupowerarchs}
2058 #%files -n kernel-tools-devel
2059 #%{_libdir}/libcpupower.so
2060 #%{_includedir}/cpufreq.h
2064 # This is %%{image_install_path} on an arch where that includes ELF files,
2065 # or empty otherwise.
2066 %define elf_image_install_path %{?kernel_image_elf:%{image_install_path}}
2069 # This macro defines the %%files sections for a kernel package
2070 # and its devel and debuginfo packages.
2071 # %%kernel_variant_files [-k vmlinux] <condition> <subpackage>
2073 %define kernel_variant_files(k:) \
2075 %{expand:%%files %{?2}}\
2076 %defattr(-,root,root)\
2077 /%{image_install_path}/%{?-k:%{-k*}}%{!?-k:vmlinuz}-%{KVERREL}%{?2:.%{2}}\
2078 %attr(600,root,root) /boot/System.map-%{KVERREL}%{?2:.%{2}}\
2079 /boot/config-%{KVERREL}%{?2:.%{2}}\
2080 %dir /lib/modules/%{KVERREL}%{?2:.%{2}}\
2081 /lib/modules/%{KVERREL}%{?2:.%{2}}/kernel\
2082 /lib/modules/%{KVERREL}%{?2:.%{2}}/build\
2083 /lib/modules/%{KVERREL}%{?2:.%{2}}/source\
2084 /lib/modules/%{KVERREL}%{?2:.%{2}}/extra\
2085 /lib/modules/%{KVERREL}%{?2:.%{2}}/updates\
2086 %ifarch %{vdso_arches}\
2087 /lib/modules/%{KVERREL}%{?2:.%{2}}/vdso\
2088 /etc/ld.so.conf.d/kernel-%{KVERREL}%{?2:.%{2}}.conf\
2090 /lib/modules/%{KVERREL}%{?2:.%{2}}/modules.*\
2091 %ghost /boot/initramfs-%{KVERREL}%{?2:.%{2}}.img\
2092 %{expand:%%files %{?2:%{2}-}devel}\
2093 %defattr(-,root,root)\
2094 /usr/src/kernels/%{KVERREL}%{?2:.%{2}}\
2095 %if %{with_debuginfo}\
2097 %if %{fancy_debuginfo}\
2098 %{expand:%%files -f debuginfo%{?2}.list %{?2:%{2}-}debuginfo}\
2100 %{expand:%%files %{?2:%{2}-}debuginfo}\
2102 %defattr(-,root,root)\
2103 %if !%{fancy_debuginfo}\
2104 %if "%{elf_image_install_path}" != ""\
2105 %{debuginfodir}/%{elf_image_install_path}/*-%{KVERREL}%{?2:.%{2}}.debug\
2107 %{debuginfodir}/lib/modules/%{KVERREL}%{?2:.%{2}}\
2108 %{debuginfodir}/usr/src/kernels/%{KVERREL}%{?2:.%{2}}\
2116 %kernel_variant_files %{with_up}
2117 %kernel_variant_files %{with_smp} smp
2118 %kernel_variant_files %{with_debug} debug
2119 %kernel_variant_files %{with_pae} PAE
2120 %kernel_variant_files %{with_pae_debug} PAEdebug
2121 %kernel_variant_files %{with_omap} omap
2122 %kernel_variant_files %{with_tegra} tegra
2124 # plz don't put in a version string unless you're going to tag
2128 * Tue Nov 1 2011 Josh Boyer <jwboyer@redhat.com> 3.1.0-7
2129 - Drop x86-efi-Calling-__pa-with-an-ioremap-address-is-invalid (rhbz 748516)
2131 * Mon Oct 31 2011 Josh Boyer <jwboyer@redhat.com>
2132 - CVE-2011-4097: oom_badness() integer overflow (rhbz 750402)
2134 * Fri Oct 28 2011 Josh Boyer <jwboyer@redhat.com>
2135 - Add patch to prevent tracebacks on a warning in floppy.c (rhbz 749887)
2137 * Wed Oct 26 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.0-5
2138 - Rebuilt for glibc bug#747377
2140 * Wed Oct 26 2011 Josh Boyer <jwboyer@redhat.com>
2141 - CVE-2011-4077: xfs: potential buffer overflow in xfs_readlink() (rhbz 749166)
2143 * Tue Oct 25 2011 Josh Boyer <jwboyer@redhat.com>
2144 - CVE-2011-3347: be2net: promiscuous mode and non-member VLAN packets DoS (rhbz 748691)
2145 - CVE-2011-1083: excessive in kernel CPU consumption when creating large nested epoll structures (rhbz 748668)
2147 * Mon Oct 24 2011 Josh Boyer <jwboyer@redhat.com>
2148 - Backport 3 fixed from linux-next to fix dib0700 playback (rhbz 733827)
2150 * Mon Oct 24 2011 Chuck Ebbert <cebbert@redhat.com> 3.1.0-1
2153 * Fri Oct 21 2011 Chuck Ebbert <cebbert@redhat.com> 3.1.0-0.rc10.git1.1
2154 - Update to upstream HEAD (v3.1-rc10-42-g2efd7c0)
2156 * Fri Oct 21 2011 Dave Jones <davej@redhat.com>
2157 - Lower severity of Radeon lockup messages.
2159 * Wed Oct 19 2011 Dave Jones <davej@redhat.com>
2160 - Add Sony VGN-FW21E to nonvs blacklist. (rhbz 641789)
2162 * Wed Oct 19 2011 Chuck Ebbert <cebbert@redhat.com> 3.1.0-0.rc10.git0.1
2163 - Fix divide-by-zero in nouveau driver (rhbz #747129)
2165 * Tue Oct 18 2011 Chuck Ebbert <cebbert@redhat.com>
2166 - Fix lock inversion causing hangs in 3.1-rc9 (rhbz #746485)
2169 * Tue Oct 18 2011 Josh Boyer <jwboyer@redhat.com>
2170 - Add patch to fix invalid EFI remap calls from Matt Fleming
2172 * Mon Oct 17 2011 Josh Boyer <jwboyer@redhat.com>
2173 - Add two patches to fix stalls in khugepaged (rhbz 735946)
2175 * Thu Oct 13 2011 Josh Boyer <jwboyer@redhat.com>
2176 - Update usb-add-quirk-for-logitech-webcams.patch with C600 ID (rhbz 742010)
2178 * Thu Oct 13 2011 Adam Jackson <ajax@redhat.com>
2179 - drm/i915: Treat SDVO LVDS as digital when parsing EDID (#729882)
2181 * Thu Oct 13 2011 Josh Boyer <jwboyer@redhat.com>
2182 - Add patch from Stanislaw Gruszka to fix iwlagn NULL dereference (rhbz 744155)
2184 * Tue Oct 11 2011 Josh Boyer <jwboyer@redhat.com>
2185 - Disable CONFIG_XEN_BALLOON_MEMORY_HOTPLUG (rhbz 744408)
2187 * Thu Oct 06 2011 Josh Boyer <jwboyer@redhat.com>
2188 - Add patch to fix base frequency check for Ricoh e823 devices (rhbz 722509)
2190 * Thu Oct 06 2011 Dave Jones <davej@redhat.com>
2191 - Taint if virtualbox modules have been loaded.
2193 * Wed Oct 05 2011 Chuck Ebbert <cebbert@redhat.com> 3.1.0-0.rc9.git0.0
2196 * Mon Oct 03 2011 Chuck Ebbert <cebbert@redhat.com> 3.1.0-0.rc8.git0.1
2197 - block: Free queue resources at blk_release_queue()
2199 * Thu Sep 29 2011 Chuck Ebbert <cebbert@redhat.com>
2200 - Require grubby >= 8.3-1 so initrd line gets added (rhbz #725185)
2202 * Thu Sep 29 2011 Josh Boyer <jwboyer@redhat.com>
2203 - Update logitech USB quirk patch
2205 * Tue Sep 27 2011 Chuck Ebbert <cebbert@redhat.com> 3.1.0-0.rc8.git0.0
2207 - New option: CONFIG_ARM_ERRATA_764369 is not set
2208 - Fix up utrace.patch to apply after commit f9d81f61c
2210 * Thu Sep 22 2011 Dave Jones <davej@redhat.com>
2211 - Make CONFIG_XEN_PLATFORM_PCI=y (rhbz 740664)
2213 * Thu Sep 22 2011 Dennis Gilmore <dennis@ausil.us>
2214 - build vmlinux image for sparc64
2216 * Wed Sep 21 2011 Josh Boyer <jwboyer@redhat.com>
2219 * Tue Sep 20 2011 Dave Jones <davej@redhat.com>
2220 - Limit 32-bit x86 kernels to 32 processors.
2222 * Tue Sep 20 2011 Ben Skeggs <bskeggs@redhat.com> 3.1.0-0.rc6.git0.4.fc16
2223 - nouveau: patch in updates queued for 3.2, mostly new hw support (GF116/GF119)
2225 * Fri Sep 16 2011 Josh Boyer <jwboyer@redhat.com> 3.1.0-0.rc6.git0.3.fc16
2226 - Add patch to fix deadlock in ipw2x00 (rhbz 738387)
2227 - Fixup kernel-tools file section for ppc/ppc64
2229 * Thu Sep 15 2011 Josh Boyer <jwboyer@redhat.com>
2230 - CVE-2011-3191: cifs: fix possible memory corruption in CIFSFindNext
2232 * Wed Sep 14 2011 Josh Boyer <jwboyer@redhat.com>
2233 - Add patch to fix deadlock in ppc64 icswx (rhbz 737984)
2235 * Wed Sep 14 2011 Neil Horman <nhorman@redhat.com>
2236 - Enable CONFIG_IP_VS_IPV6 (bz 738194)
2238 * Wed Sep 14 2011 Josh Boyer <jwboyer@redhat.com>
2239 - Add support for Macbook Air 4,1 keyboard, trackpad, and bluetooth
2240 - Add patch to fix HVCS on ppc64 (rhbz 738096)
2241 - Add various ibmveth driver fixes (rhbz 733766)
2243 * Tue Sep 13 2011 Adam Jackson <ajax@redhat.com>
2244 - drm/i915: Shut the fbc messages up when drm.debug & 4
2246 * Mon Sep 12 2011 Josh Boyer <jwboyer@redhat.com> 3.1.0-0.rc6.git0.0
2247 - Linux 3.1-rc6 (contains the fix for 737076)
2248 - Disable debug builds
2250 * Fri Sep 09 2011 Josh Boyer <jwboyer@redhat.com>
2251 - Change to 64K page size for ppc64 kernels (rhbz 736751)
2253 * Fri Sep 09 2011 Josh Boyer <jwboyer@redhat.com> 3.1.0-0.rc5.git0.0
2256 * Wed Sep 07 2011 Josh Boyer <jwboyer@redhat.com>
2257 - Add patch to fix oops when linking entities in ucvideo (rhbz 735437)
2259 * Fri Sep 02 2011 Dave Jones <davej@redhat.com>
2260 - Apply patch to fix lockdep reports from ext4 (rhbz 732572)
2262 * Thu Sep 01 2011 Dave Jones <davej@redhat.com>
2263 - utrace: s390: fix the compile problem with traps.c (rhbz 735118)
2265 * Tue Aug 30 2011 Dave Jones <davej@redhat.com>
2266 - Revert "x86: Serialize EFI time accesses on rtc_lock" (rhbz 732755)
2268 * Tue Aug 30 2011 Josh Boyer <jwboyer@redhat.com>
2269 - Add patch to fix rhbz 606017
2271 * Mon Aug 29 2011 Josh Boyer <jwboyer@redhat.com>
2274 * Sat Aug 27 2011 Dave Jones <davej@redhat.com>
2275 - Fix get_gate_vma usage in i386 NX emulation
2276 - Bring back the 32bit mmap randomization patch for now.
2277 NX emulation is still too dependant upon it.
2279 * Fri Aug 26 2011 Dave Jones <davej@redhat.com>
2280 - Enable CONFIG_DETECT_HUNG_TASK for debug builds & rawhide.
2282 * Fri Aug 26 2011 Dave Jones <davej@redhat.com>
2283 - Drop linux-2.6-debug-vm-would-have-oomkilled.patch
2284 The oom-killer heuristics have improved enough that this should
2285 never be necessary (and it probably doesn't dtrt any more)
2287 * Fri Aug 26 2011 Dave Jones <davej@redhat.com>
2288 - Drop linux-2.6-32bit-mmap-exec-randomization.patch
2289 Outlived it's usefulness (and made of ugly)
2291 * Fri Aug 26 2011 Dave Jones <davej@redhat.com>
2292 - Drop acpi-ec-add-delay-before-write.patch (rhbz 733690)
2294 * Fri Aug 26 2011 Josh Boyer <jwboyer@redhat.com>
2295 - Linux 3.1-rc3-git5
2297 * Wed Aug 24 2011 Josh Boyer <jwboyer@redhat.com>
2298 - Revert 'iwlwifi: advertise max aggregate size'. (rhbz 708747)
2300 * Mon Aug 22 2011 Josh Boyer <jwboyer@redhat.com>
2302 - Add patch to fix duplicate backlight registration (rhbz 732202)
2304 * Mon Aug 22 2011 Dave Jones <davej@redhat.com>
2305 - Avoid false quiescent states in rcutree with CONFIG_RCU_FAST_NO_HZ. (rhbz 577968)
2307 * Sat Aug 20 2011 Josh Boyer <jwboyer@redhat.com>
2308 - Linux 3.1-rc2-git7
2309 - Add a provides/obsoletes for cpupowerutils-devel
2311 * Fri Aug 19 2011 Josh Boyer <jwboyer@redhat.com>
2312 - Add patch from upstream to fix 64-bit divide error in btrfs
2313 - Add BuildRequires on gettext for cpupowerutils translations
2315 * Fri Aug 19 2011 Josh Boyer <jwboyer@redhat.com>
2316 - Linux 3.1-rc2-git5
2317 - Change XHCI to builtin (rhbz 731706)
2318 - Add patch to fix race between cryptd and aesni (rhbz 721002)
2320 * Thu Aug 18 2011 Josh Boyer <jwboyer@redhat.com>
2321 - Adjust provides/obsoletes to replace the cpupowerutils package
2323 * Wed Aug 17 2011 Josh Boyer <jwboyer@redhat.com>
2324 - Create the kernel-tools subpackages based on a start by davej
2326 * Tue Aug 16 2011 Dave Jones <davej@redhat.com>
2327 - Prepare for packaging more of tools/ by renaming 'perf' subpackage
2330 * Tue Aug 16 2011 Dennis Gilmore <dennis@ausil.us>
2331 - add config for arm tegra devices
2332 - setup kernel to build omap image (patch from David Marlin)
2333 - setup kernel to build tegra image based on omap work
2334 - add arm device tree patches
2336 * Sat Aug 13 2011 Dave Jones <davej@redhat.com>
2337 - CPU_FREQ drivers should now be built-in on x86-64.
2339 * Thu Aug 11 2011 Josh Boyer <jwboyer@redhat.com>
2340 - Add patch davej applied to f15 for rhbz 729340
2341 - Add munged together patch for rhbz 729269
2342 - Build ide_pmac as a module (rhbz 730039)
2344 * Tue Aug 09 2011 Josh Boyer <jwboyer@redhat.com>
2345 - Add Makefile.config and ARM config changes from David Marlin
2347 * Tue Aug 09 2011 Josh Boyer <jwboyer@redhat.com>
2348 - Add patch davej applied to f15 for rhbz 728872
2350 * Tue Aug 09 2011 Dave Jones <davej@redhat.com>
2351 - ptrace_report_syscall: check if TIF_SYSCALL_EMU is defined
2353 * Tue Aug 09 2011 Dave Jones <davej@redhat.com>
2354 - Enable CONFIG_SAMSUNG_LAPTOP (rhbz 729363)
2356 * Mon Aug 08 2011 Josh Boyer <jwboyer@redhat.com>
2357 - Bring in utrace fixes davej applied to f15. (rhbz 728379)
2359 * Fri Aug 05 2011 Josh Boyer <jwboyer@redhat.com>
2360 - Adjust Makefile munging for new 3.x numbering scheme
2362 * Fri Aug 05 2011 Dave Jones <davej@redhat.com>
2363 - Deselect CONFIG_DECNET. Unmaintained, and rubbish.
2365 * Fri Aug 05 2011 Josh Boyer <jwboyer@redhat.com>
2368 * Fri Aug 05 2011 Josh Boyer <jwboyer@redhat.com>
2369 - Add patch for rhbz 726701 from Matthew Garrett
2371 * Thu Aug 04 2011 Dave Jones <davej@redhat.com>
2372 - Drop neuter_intel_microcode_load.patch (rhbz 690930)
2374 * Wed Aug 03 2011 John W. Linville <linville@redhat.com>
2375 - Disable CONFIG_BCMA since no driver currently uses it (rhbz 727796)
2377 * Wed Aug 03 2011 Josh Boyer <jwboyer@redhat.com>
2378 - Add patch to fix backtrace in cdc_ncm driver (rhbz 720128)
2379 - Add patch to fix backtrace in usm-realtek driver (rhbz 720054)
2381 * Tue Aug 02 2011 Josh Boyer <jwboyer@redhat.com>
2382 - Add patch to fix HFSPlus filesystem mounting (rhbz 720771)
2384 * Tue Aug 02 2011 Dave Jones <davej@redhat.com>
2385 - Change USB_SERIAL_OPTION back to modular. (rhbz 727680)
2387 * Tue Aug 02 2011 Josh Boyer <jwboyer@redhat.com>
2388 - Fix epoll recursive lockdep warnings (rhbz 722472)
2389 - Turn debug builds back on
2391 * Tue Aug 02 2011 Josh Boyer <jwboyer@redhat.com>
2392 - Add change from Yanko Kaneti to get the rt2x00 drivers in modules.networking
2395 * Fri Jul 29 2011 Dave Jones <davej@redhat.com>
2396 - Fix scsi_dispatch_cmd oops (USB eject problems, etc).
2398 * Thu Jul 28 2011 Dave Jones <davej@redhat.com>
2399 - module-init-tools needs to be a prereq, not a conflict.
2401 * Thu Jul 28 2011 Josh Boyer <jwboyer@redhat.com>
2402 - Backport patch to correct udlfb removal events (rhbz 726163)
2404 * Wed Jul 27 2011 Dave Jones <davej@redhat.com>
2405 - Turn off debug builds.
2407 * Fri Jul 22 2011 Dave Jones <davej@redhat.com>
2408 - bootwrapper needs objcopy. Add it to requires: (wwoods)
2410 * Fri Jul 22 2011 Kyle McMartin <kmcmartin@redhat.com> 3.0.0-1
2411 - Linux 3.0, but really 3.0.0 (sigh)
2413 * Thu Jul 21 2011 Chuck Ebbert <cebbert@redhat.com> 3.0-0.rc7.git10.1
2415 - Use ext4 for ext2 and ext3 filesystems (CONFIG_EXT4_USE_FOR_EXT23=y)
2417 * Thu Jul 21 2011 Dave Jones <davej@redhat.com>
2418 - Switch BLK_DEV_RAM to be modular (rhbz 720833)
2420 * Wed Jul 20 2011 Chuck Ebbert <cebbert@redhat.com> 3.0-0.rc7.git8.1
2423 * Fri Jul 15 2011 Dave Jones <davej@redhat.com> 3.0-0.rc7.git3.1
2426 * Fri Jul 15 2011 Dave Jones <davej@redhat.com>
2427 - Bring back utrace until uprobes gets merged upstream.
2429 * Wed Jul 13 2011 Kyle McMartin <kmcmartin@redhat.com> 3.0-0.rc7.git1.1
2430 - Update to snapshot 3.0-rc7-git1 for intel drm fixes.
2432 * Tue Jul 12 2011 John W. Linville <linville@redhat.com>
2433 - zd1211rw: fix invalid signal values from device (rhbz 720093)
2435 * Tue Jul 12 2011 John W. Linville <linville@redhat.com>
2436 - rt2x00: Add device ID for RT539F device. (rhbz 720594)
2438 * Tue Jul 12 2011 Kyle McMartin <kmcmartin@redhat.com> 3.0-0.rc7.git0.1
2439 - Linux 3.0-rc7, hopefully the last before the Great Renumbering becomes
2442 * Mon Jul 11 2011 Dave Jones <davej@redhat.com>
2443 - Change BINFMT_MISC to be modular. (rhbz 695415)
2445 * Sun Jul 10 2011 Kyle McMartin <kmcmartin@redhat.com> 3.0-0.rc6.git6.1
2446 - Linux 3.0-rc6-git6
2447 - iwlagn-fix-dma-direction.patch: drop.
2448 - Revert CONFIG_X86_RESERVE_LOW=640, it breaks booting on x86_64.
2450 * Thu Jul 07 2011 Dave Jones <davej@redhat.com>
2451 - Centralise CPU_FREQ options into config-generic.
2452 Switch to using ondemand by default. (rhbz 713572)
2454 * Wed Jul 06 2011 Chuck Ebbert <cebbert@redhat.com>
2455 - Set CONFIG_X86_RESERVE_LOW=640 as requested by mjg
2457 * Mon Jul 04 2011 Kyle McMartin <kmcmartin@redhat.com> 3.0-0.rc6.git0.1
2459 - [generic] SCSI_ISCI=m, because why not
2461 * Sat Jul 02 2011 Kyle McMartin <kmcmartin@redhat.com> 3.0-0.rc5.git5.1
2462 - Linux 3.0-rc5-git5
2464 * Mon Jun 27 2011 Kyle McMartin <kmcmartin@redhat.com> 3.0-0.rc5.git0.1
2467 * Mon Jun 27 2011 Dave Jones <davej@redhat.com>
2468 - Disable CONFIG_CRYPTO_MANAGER_DISABLE_TESTS, as this also disables FIPS (rhbz 716942)
2470 * Thu Jun 23 2011 Kyle McMartin <kmcmartin@redhat.com> 3.0-0.rc4.git3.1
2471 - Linux 3.0-rc4-git3
2472 - Drop linux-3.0-fix-uts-release.patch, and instead just perl the Makefile
2473 - linux-2.6-silence-noise.patch: fix context
2474 - iwlagn-fix-dma-direction.patch: fix DMAR errors (for me at least)
2476 * Wed Jun 22 2011 Kyle McMartin <kmcmartin@redhat.com> 3.0-0.rc4.git0.2
2477 - Re-enable debuginfo generation. Thanks to Richard Jones for noticing... no
2478 wonder builds had been so quick lately.
2480 * Tue Jun 21 2011 Kyle McMartin <kmcmartin@redhat.com> 3.0-0.rc4.git0.1
2481 - Linux 3.0-rc4 (getting closer...)
2483 * Fri Jun 17 2011 Kyle McMartin <kmcmartin@redhat.com> 3.0-0.rc3.git6.1
2484 - Update to 3.0-rc3-git6
2486 * Fri Jun 17 2011 Dave Jones <davej@redhat.com>
2487 - drop qcserial 'compile fix' that was just duplicating an include.
2488 - drop struct sizeof debug patch. (no real value. not upstreamable)
2489 - drop linux-2.6-debug-always-inline-kzalloc.patch.
2490 Can't recall why this was added. Can easily re-add if deemed necessary.
2492 * Fri Jun 17 2011 Kyle McMartin <kmcmartin@redhat.com>
2493 - linux-2.6-defaults-pci_no_msi.patch: drop, haven't toggled the default
2495 - linux-2.6-defaults-pci_use_crs.patch: ditto.
2496 - linux-2.6-selinux-mprotect-checks.patch: upstream a while ago.
2497 - drm-i915-gen4-has-non-power-of-two-strides.patch: drop buggy bugfix
2498 - drop some more unapplied crud.
2499 - We haven't applied firewire patches in a dogs age.
2501 * Fri Jun 17 2011 Kyle McMartin <kmcmartin@redhat.com> 3.0-0.rc3.git5.1
2502 - Try updating to a git snapshot for the first time in 3.0-rc,
2503 update to 3.0-rc3-git5
2504 - Fix a subtle bug I introduced in 3.0-rc1, "patch-3." is 9 letters, not 10.
2506 * Thu Jun 16 2011 Kyle McMartin <kmcmartin@redhat.com>
2507 - Disable mm patches which had been submitted against 2.6.39, as Rik reports
2508 they seem to aggravate a VM_BUG_ON. More investigation is necessary.
2510 * Wed Jun 15 2011 Kyle McMartin <kmcmartin@redhat.com>
2511 - Conflict with pre-3.2.1-5 versions of mdadm. (#710646)
2513 * Wed Jun 15 2011 Kyle McMartin <kmcmartin@redhat.com>
2514 - Build in aesni-intel on i686 for symmetry with 64-bit.
2516 * Tue Jun 14 2011 Kyle McMartin <kmcmartin@redhat.com> 3.0-0.rc3.git0.3
2517 - Fix libdm conflict (whose bright idea was it to give subpackages differing
2520 * Tue Jun 14 2011 Kyle McMartin <kmcmartin@redhat.com>
2521 - Update to 3.0-rc3, add another conflicts to deal with 2 digit
2523 - Simplify linux-3.0-fix-uts-release.patch now that SUBLEVEL is optional.
2524 - revert-ftrace-remove-unnecessary-disabling-of-irqs.patch: drop upstreamed
2526 - drm-intel-eeebox-eb1007-quirk.patch: ditto.
2527 - ath5k-disable-fast-channel-switching-by-default.patch: ditto.
2529 * Thu Jun 09 2011 Kyle McMartin <kmcmartin@redhat.com>
2530 - ath5k-disable-fast-channel-switching-by-default.patch (rhbz#709122)
2531 (korgbz#34992) [a99168ee in wireless-next]
2533 * Thu Jun 09 2011 Kyle McMartin <kmcmartin@redhat.com> 3.0-0.rc2.git0.2
2534 - rhbz#710921: revert-ftrace-remove-unnecessary-disabling-of-irqs.patch
2536 * Wed Jun 08 2011 Kyle McMartin <kmcmartin@redhat.com> 3.0-0.rc2.git0.1
2537 - Update to 3.0-rc2, rebase utsname fix.
2538 - Build IPv6 into the kernel for a variety of reasons
2539 (http://lists.fedoraproject.org/pipermail/kernel/2011-June/003105.html)
2541 * Mon Jun 06 2011 Kyle McMartin <kmcmartin@redhat.com> 3.0-0.rc1.git0.3
2542 - Conflict with module-init-tools older than 3.13 to ensure the
2543 3.0 transition is handled correctly.
2545 * Wed Jun 01 2011 Kyle McMartin <kmcmartin@redhat.com> 3.0-0.rc1.git0.2
2546 - Fix utsname for 3.0-rc1
2548 * Mon May 30 2011 Kyle McMartin <kmcmartin@redhat.com> 3.0-0.rc1.git0.1
2549 - Linux 3.0-rc1 (won't build until module-init-tools gets an update.)
2551 * Mon May 30 2011 Kyle McMartin <kyle@redhat.com>
2552 - Trimmed changelog, see fedpkg git for earlier history.
2555 # The following Emacs magic makes C-c C-e use UTC dates.
2557 # rpm-change-log-uses-utc: t