# - with_grsec_minimal
# - with_grsec_full
#
+# LATEST VERSION CHECKER:
+# # curl -s http://www.kernel.org/kdist/finger_banner
+#
# TODO:
# - benchmark NO_HZ & HZ=1000 vs HZ=300 on i686
-# - add a subpackage (kernel-firmware?) for ~35 firmware files
-# - aufs1 patches 145, 146 to remove or update (not maintained)
-# - update or remove tahoe9xx patch2
+# - update or remove tahoe9xx patch2
# - update or remove mpt-fusion patch90
# - update grsec_minimal patch1000:
# fs/proc/base.c:1484: error: 'struct task_struct' has no member named 'uid'
#
# Conditional build:
%bcond_without source # don't build kernel-source package
+%bcond_without doc # don't build kernel-doc package
%bcond_without pcmcia # don't build pcmcia
%bcond_with verbose # verbose build (V=1)
%define have_pcmcia 0
%endif
-%define basever 2.6.30
-%define postver .5
-%define rel 0.2
+%define basever 2.6.32
+%define postver .63
+%define rel 1
%define _enable_debug_packages 0
-%define squashfs_version 3.4
%define tuxonice_version 3.0.1
%define netfilter_snap 20070806
%define alt_kernel myown
%endif
%else
-%if %{without rescuecd}
%define __alt_kernel %{?with_pax:pax}%{!?with_grsec_full:nogrsecurity}%{!?with_apparmor:noaa}%{?with_pae:pae}
%if "%{__alt_kernel}" != ""
%define alt_kernel %{__alt_kernel}
%endif
-%else
-%define alt_kernel rescuecd
%endif
+
+%if %{with rescuecd}
+%define alt_kernel rescuecd
%endif
# kernel release (used in filesystem and eventually in uname -r)
License: GPL v2
Group: Base/Kernel
Source0: http://www.kernel.org/pub/linux/kernel/v2.6/linux-%{basever}.tar.bz2
-# Source0-md5: 7a80058a6382e5108cdb5554d1609615
+# Source0-md5: 260551284ac224c3a43c4adac7df4879
%if "%{postver}" != "%{nil}"
-Source1: http://www.kernel.org/pub/linux/kernel/v2.6/patch-%{version}.bz2
-# Source1-md5: 47841c7ff5c81a7b349a79f2fa8e9138
+Source1: http://www.kernel.org/pub/linux/kernel/v2.6/longterm/v%{basever}/patch-%{version}.xz
+# Source1-md5: bcde8b57108d4989765a616b4b8ff301
%endif
Source3: kernel-autoconf.h
Source4: kernel-config.h
-Source5: kernel-ppclibs.Makefile
Source6: kernel-config.awk
Source7: kernel-module-build.pl
Source8: kernel-track-config-change.awk
# netfilter related stuff mostly based on patch-o-matic-ng
# snapshot 20070806 with some fixes. Some modules
-# were ported to nf_conntrack.
+# were ported to nf_conntrack.
Patch10: kernel-pom-ng-IPV4OPTSSTRIP.patch
Patch11: kernel-pom-ng-ipv4options.patch
# http://zph.bratcheda.org/linux-2.6.26.3-zph.patch
Patch49: kernel-zph.patch
-# based on http://www.linuximq.net/patchs/linux-2.6.29.1-imq-test2.diff
+# http://www.linuximq.net/patchs/linux-2.6.32-imq-test2.diff
Patch50: kernel-imq.patch
# http://www.kernel.org/pub/linux/kernel/people/edward/reiser4/reiser4-for-2.6/reiser4-for-2.6.28.patch.bz2
Patch55: kernel-atm-vbr.patch
Patch56: kernel-atmdd.patch
-# http://www.ntop.org/PF_RING.html 20090721
-# svn co https://svn.ntop.org/svn/ntop/trunk/PF_RING/ and use mkpatch.sh
-Patch58: kernel-PF_RING.patch
-
# http://synce.svn.sourceforge.net/svnroot/synce/trunk/patches/linux-2.6.22-rndis_host-wm5.patch
Patch59: kernel-rndis_host-wm5.patch
# Project suspend2 renamed to tuxonice
-# http://www.tuxonice.net/downloads/all/current-tuxonice-for-2.6.30.patch-20090620-v1.bz2
+# http://www.tuxonice.net/downloads/all/tuxonice-3.0.99.32-for-2.6.32.patch.bz2
Patch69: kernel-tuxonice.patch
Patch70: kernel-tuxonice-headers.patch
# Taken from http://download.opensuse.org/factory/repo/src-oss/suse/src/kernel-source-2.6.30-10.3.src.rpm
Patch90: kernel-mpt-fusion.patch
-# based on http://vserver.13thfloor.at/Experimental/patch-2.6.30.2-vs2.3.0.36.14-pre4.diff
+# based on http://vserver.13thfloor.at/Experimental/patch-2.6.32.63-vs2.3.0.36.30.diff
Patch100: kernel-vserver-2.3.patch
Patch101: kernel-vserver-fixes.patch
# Fix verified for that kernel version.
Patch130: kernel-forcedeth-WON.patch
-# http://download.filesystems.org/unionfs/unionfs-2.x/unionfs-2.5.1_for_2.6.28.1.diff.gz
+# http://download.filesystems.org/unionfs/unionfs-2.x/unionfs-2.5.3_for_2.6.31.diff.gz
Patch140: kernel-unionfs.patch
# aufs1, http://aufs.sourceforge.net/
Patch150: kernel-ppc-crtsavres.patch
+# git://git.kernel.org/pub/scm/linux/kernel/git/pkl/squashfs-devel.git
+Patch160: kernel-squashfs-lzma.patch
+
Patch200: kernel-ppc-ICE-hacks.patch
# The following patch extend the routing functionality in Linux
# (only warnings, so just remove parts of this patch if conflics)
Patch2500: kernel-warnings.patch
-# git://kernel.ubuntu.com/jj/apparmor-karmic-tree.git
-# git diff 0c9f19b4dd23620fb32116922b0d93e8aca6c911..HEAD
+# git://kernel.ubuntu.com/ubuntu/ubuntu-karmic.git
+# see ubuntu/apparmor dir
Patch5000: kernel-apparmor.patch
# for rescuecd
# based on http://ftp.leg.uct.ac.za/pub/linux/rip/inittmpfs-2.6.14.diff.gz
Patch7000: kernel-inittmpfs.patch
-# based on http://www.grsecurity.net/~spender/grsecurity-2.1.14-2.6.30.4-200908132040.patch
+# based on http://www.grsecurity.net/~spender/grsecurity-2.1.14-2.6.32.7-201001291848.patch kernel-grsec_full.patch
# NOTE: put raw upstream patches on kernel-grsec_full.patch:GRSECURITY_RAW for reference
# (since upstream deletes older patches)
Patch9999: kernel-grsec_full.patch
Patch10000: kernel-grsec-caps.patch
Patch10001: kernel-grsec-common.patch
Patch10002: kernel-grsec_fixes.patch
-Patch10003: kernel-grsec-no-stupid-SbO.patch
URL: http://www.kernel.org/
BuildRequires: binutils >= 3:2.18
%ifarch ppc
BuildRequires: uboot-mkimage
%endif
-AutoReqProv: no
BuildRequires: /sbin/depmod
+##BuildRequires: gcc < 6:4.6
BuildRequires: gcc >= 5:3.2
+BuildRequires: tar >= 1:1.22
BuildRequires: xz >= 1:4.999.7
+AutoReqProv: no
# for hostname command
BuildRequires: net-tools
BuildRequires: perl-base
Provides: %{name}(netfilter) = %{netfilter_snap}
Provides: %{name}(vermagic) = %{kernel_release}
Obsoletes: kernel%{_alt_kernel}-isdn-mISDN
+Obsoletes: kernel-firmware
Obsoletes: kernel-misc-acer_acpi
Obsoletes: kernel-misc-fuse
Obsoletes: kernel-misc-uvc
%define defconfig arch/%{target_arch_dir}/defconfig
# No ELF objects there to strip (skips processing 27k files)
-%define _noautostrip .*%{_kernelsrcdir}/.*
+%define _noautostrip \\(.*%{_kernelsrcdir}/.*\\|.*/vmlinux.*\\)
%define _noautochrpath .*%{_kernelsrcdir}/.*
%ifarch ia64
%define topdir %{_builddir}/%{name}-%{version}
%define srcdir %{topdir}/linux-%{basever}
%define objdir %{topdir}/%{targetobj}
-%define targetobj %{_target_base_arch}-gcc-%(%{kgcc} -dumpversion)
+%define targetobj %{_target_base_arch}-gcc-%(%{__cc} -dumpversion)
%define _kernelsrcdir /usr/src/linux%{_alt_kernel}-%{version}
%description vmlinux -l pl.UTF-8
vmlinux - rozpakowany obraz jądra.
-%package dirs
-Summary: common dirs for kernel packages
-Summary(pl.UTF-8): Katalogi wspólne dla pakietów kernela
-Group: Base/Kernel
-
-%description dirs
-This package provides common dirs shared between various kernel
-packages.
-
-%description dirs -l pl.UTF-8
-Katalog ten udostepnia katalogi współdzielone pomiędzy różnymi
-pakietami kernela.
-
%package drm
Summary: DRM kernel modules
Summary(de.UTF-8): DRM Kernel Treiber
Requires(postun): %{name} = %{epoch}:%{version}-%{release}
Requires: %{name} = %{epoch}:%{version}-%{release}
Obsoletes: kernel-smp-drm
-Autoreqprov: no
+AutoReqProv: no
%description drm
DRM kernel modules.
Obsoletes: kernel-smp-pcmcia
Conflicts: pcmcia-cs < 3.1.21
Conflicts: pcmciautils < 004
-Autoreqprov: no
+AutoReqProv: no
%description pcmcia
PCMCIA modules.
%description pcmcia -l pl.UTF-8
Moduły PCMCIA.
-%package libs
-Summary: Libraries for preparing bootable kernel on PowerPCs
-Summary(pl.UTF-8): Biblioteki do przygotowania bootowalnego jądra dla PowerPC
-Group: Base/Kernel
-Requires: %{name} = %{epoch}:%{version}-%{release}
-Requires: mkvmlinuz >= 1.3
-Obsoletes: kernel-smp-libs
-Autoreqprov: no
-
-%description libs
-Libraries for preparing bootable kernel on PowerPCs. Script called
-mkvmlinuz may be useful for this.
-
-%description libs -l pl.UTF-8
-Biblioteki do przygotowania bootowalnego jądra dla PowerPC. Skrypt
-mkvmlinuz może być do tego przydatny.
-
%package sound-alsa
Summary: ALSA kernel modules
Summary(de.UTF-8): ALSA Kernel Module
Requires(postun): %{name} = %{epoch}:%{version}-%{release}
Requires: %{name} = %{epoch}:%{version}-%{release}
Obsoletes: kernel-smp-sound-alsa
-Autoreqprov: no
+AutoReqProv: no
%description sound-alsa
ALSA (Advanced Linux Sound Architecture) sound drivers.
Requires(postun): %{name} = %{epoch}:%{version}-%{release}
Requires: %{name} = %{epoch}:%{version}-%{release}
Obsoletes: kernel-smp-sound-oss
-Autoreqprov: no
+AutoReqProv: no
%description sound-oss
OSS (Open Sound System) drivers.
Summary(pl.UTF-8): Pliki nagłówkowe jądra Linuksa
Group: Development/Building
Provides: %{name}-headers(netfilter) = %{netfilter_snap}
-Autoreqprov: no
+AutoReqProv: no
%description headers
These are the C header files for the Linux kernel, which define
Group: Development/Building
Requires: %{name}-headers = %{epoch}:%{version}-%{release}
Conflicts: rpmbuild(macros) < 1.321
-Autoreqprov: no
+AutoReqProv: no
%description module-build
Development files from kernel source tree needed to build Linux kernel
Summary(pl.UTF-8): Kod źródłowy jądra Linuksa
Group: Development/Building
Requires: %{name}-module-build = %{epoch}:%{version}-%{release}
-Autoreqprov: no
+AutoReqProv: no
%description source
This is the source code for the Linux kernel. You can build a custom
Summary(de.UTF-8): Kernel Dokumentation
Summary(pl.UTF-8): Dokumentacja do jądra Linuksa
Group: Documentation
-Autoreqprov: no
+AutoReqProv: no
%description doc
This is the documentation for the Linux kernel, as found in
cd linux-%{basever}
# hack against warning in pax/grsec
-%ifarch alpha
sed -i 's/-Werror//' arch/alpha/kernel/Makefile
-%endif
-
-%ifarch ppc
-install %{SOURCE5} Makefile.ppclibs
-%endif
%if "%{postver}" != "%{nil}"
%{__bzip2} -dc %{SOURCE1} | patch -p1 -s
%patch55 -p1
%patch56 -p1
-%patch58 -p1
-
# kernel-rndis_host-wm5.patch
%patch59 -p1
# forcedeth
%patch130 -p1
-# unionfs (disabled for rescuecd - problems with aufs2)
+# unionfs (problems with aufs2, needed for aufs1 patch)
%if %{without rescuecd}
%patch140 -p1
%endif
# aufs2
%patch148 -p1
%else
-# aufs1: 2.6.29 FIXME - needs port to creds
-#%patch145 -p1
-#%patch146 -p1
+# aufs1
+#patch145 -p1
+#patch146 -p1
%endif
%patch2500 -p1
%{?with_vserver:%patch10000 -p1}
%{?with_vserver:%patch10001 -p1}
%{?with_vserver:%patch10002 -p1}
-%{?with_vserver:%patch10003 -p1}
%endif
%endif
#
%patch5000 -p1
%endif
-%patch150 -p1
+# FIXME
+#%patch150 -p1
+
+%patch160 -p1
%ifarch ppc ppc64
#patch200 -p1
# Now we have to check MAC system integration. Grsecurity (full) uses PAX_HAVE_ACL_FLAGS
# setting (direct acces). grsec_minimal probably have no idea about PaX so we probably
# could use PAX_NO_ACL_FLAGS, but for testing the hooks setting will be used
- # PAX_HOOK_ACL_FLAGS.
+ # PAX_HOOK_ACL_FLAGS.
%if %{with grsec_full}
# Hardening grsec options if with pax
CONFIG_AUFS=y
CONFIG_AUFS_FS=y
CONFIG_AUFS_BR_RAMFS=y
+ CONFIG_AUFS_RDU=y
CONFIG_BLK_DEV_LOOP=y
CONFIG_ISO9660_FS=y
CONFIG_NLS_UTF8=y
CONFIG_HIGHMEM4G=n
CONFIG_HIGHMEM64G=y
CONFIG_X86_PAE=y
+ CONFIG_NUMA=n
%endif
%endif
install -d $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/misc
-%if %{with myown}
# create directories which may be missing, to simplyfy %files
-install -d $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/kernel/sound
-%endif
+install -d $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/kernel/{arch,sound,mm}
# rpm obeys filelinkto checks for ghosted symlinks, convert to files
rm -f $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/{build,source}
touch $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/{build,source}
+# no point embed content for %ghost files. empty them
+for a in \
+ dep{,.bin} \
+ alias{,.bin} \
+ symbols{,.bin} \
+ {pci,usb,ccw,isapnp,input,ieee1394,serio,of}map \
+; do
+ > $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/modules.$a
+done
+
# /boot
install -d $RPM_BUILD_ROOT/boot
cp -a %{objdir}/System.map $RPM_BUILD_ROOT/boot/System.map-%{kernel_release}
%ifarch %{ix86} %{x8664}
cp -a %{objdir}/arch/%{target_arch_dir}/boot/bzImage $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release}
-install %{objdir}/vmlinux $RPM_BUILD_ROOT/boot/vmlinux-%{kernel_release}
+install -p %{objdir}/vmlinux $RPM_BUILD_ROOT/boot/vmlinux-%{kernel_release}
%endif
%ifarch ppc ppc64
-install %{objdir}/vmlinux $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release}
-install %{objdir}/vmlinux $RPM_BUILD_ROOT/boot/vmlinux-%{kernel_release}
+install -p %{objdir}/vmlinux $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release}
+install -p %{objdir}/vmlinux $RPM_BUILD_ROOT/boot/vmlinux-%{kernel_release}
%endif
%ifarch ia64
%{__gzip} -cfv %{objdir}/vmlinux > %{objdir}/vmlinuz
%{__perl} %{topdir}/kernel-module-build.pl %{_kernelsrcdir} $fileoutdir
cd -
+# move to %{_docdir} so we wouldn't depend on any kernel package for dirs
+install -d $RPM_BUILD_ROOT%{_docdir}
+mv $RPM_BUILD_ROOT{%{_kernelsrcdir}/Documentation,%{_docdir}/%{name}-%{version}}
+
+rm -f $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/dontdiff
+rm -f $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/Makefile
+rm -f $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/*/Makefile
+rm -f $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/*/*/Makefile
+
%clean
rm -rf $RPM_BUILD_ROOT
ln -sf initrd-%{kernel_release}.gz %{initrd_dir}/initrd
%{?alt_kernel:ln -sf initrd-%{kernel_release}.gz %{initrd_dir}/initrd%{_alt_kernel}}
+if [ -x /sbin/update-grub ]; then
+ /sbin/update-grub >/dev/null 2>&1
+fi
if [ -x /sbin/new-kernel-pkg ]; then
/sbin/new-kernel-pkg --initrdfile=%{initrd_dir}/initrd-%{kernel_release}.gz --install %{kernel_release} --banner "PLD Linux (%{pld_release})%{?alt_kernel: / %{alt_kernel}}"
-elif [ -x /sbin/rc-boot ]; then
+fi
+if [ -x /sbin/rc-boot ]; then
/sbin/rc-boot 1>&2 || :
fi
ln -sf vmlinux-%{kernel_release} /boot/vmlinux
%{?alt_kernel:ln -sf vmlinux-%{kernel_release} /boot/vmlinux-%{alt_kernel}}
-%post libs
-%{_sbindir}/mkvmlinuz /boot/zImage-%{kernel_release} %{kernel_release}
-
%post drm
%depmod %{kernel_release}
%dir /lib/modules/%{kernel_release}
%dir /lib/modules/%{kernel_release}/kernel
-%ifnarch sparc
/lib/modules/%{kernel_release}/kernel/arch
-%endif
/lib/modules/%{kernel_release}/kernel/crypto
/lib/modules/%{kernel_release}/kernel/drivers
%if %{have_drm}
/lib/modules/%{kernel_release}/kernel/kernel
/lib/modules/%{kernel_release}/kernel/lib
/lib/modules/%{kernel_release}/kernel/net
+/lib/modules/%{kernel_release}/kernel/mm
%if %{have_sound}
%dir /lib/modules/%{kernel_release}/kernel/sound
/lib/modules/%{kernel_release}/kernel/sound/ac97_bus.ko*
%if %{with myown}
/lib/modules/%{kernel_release}/kernel/sound
%endif
-%ghost /lib/modules/%{kernel_release}/modules.*
+
+%dir %{_sysconfdir}/modprobe.d/%{kernel_release}
+
+# provided by build
+/lib/modules/%{kernel_release}/modules.order
+
+# rest modules.* are ghost (regenerated by post depmod -a invocation)
+%ghost /lib/modules/%{kernel_release}/modules.alias
+%ghost /lib/modules/%{kernel_release}/modules.alias.bin
+%ghost /lib/modules/%{kernel_release}/modules.ccwmap
+%ghost /lib/modules/%{kernel_release}/modules.dep
+%ghost /lib/modules/%{kernel_release}/modules.dep.bin
+%ghost /lib/modules/%{kernel_release}/modules.ieee1394map
+%ghost /lib/modules/%{kernel_release}/modules.inputmap
+%ghost /lib/modules/%{kernel_release}/modules.isapnpmap
+%ghost /lib/modules/%{kernel_release}/modules.ofmap
+%ghost /lib/modules/%{kernel_release}/modules.pcimap
+%ghost /lib/modules/%{kernel_release}/modules.seriomap
+%ghost /lib/modules/%{kernel_release}/modules.symbols
+%ghost /lib/modules/%{kernel_release}/modules.symbols.bin
+%ghost /lib/modules/%{kernel_release}/modules.usbmap
+
# symlinks pointing to kernelsrcdir
%ghost /lib/modules/%{kernel_release}/build
%ghost /lib/modules/%{kernel_release}/source
-%dir %{_sysconfdir}/modprobe.d/%{kernel_release}
-
-%files dirs
-%defattr(644,root,root,755)
-%dir %{_kernelsrcdir}
%ifarch alpha %{ix86} %{x8664} ppc ppc64 sparc sparc64
%files vmlinux
/lib/modules/%{kernel_release}/kernel/drivers/usb/host/sl811_cs.ko*
%endif
-%ifarch ppc-broken
-%if "%{_arch}" == "ppc"
-%files libs
-%defattr(644,root,root,755)
-%dir /boot/libs-%{kernel_release}
-/boot/libs-%{kernel_release}/common
-/boot/libs-%{kernel_release}/kernel
-/boot/libs-%{kernel_release}/lib
-/boot/libs-%{kernel_release}/of1275
-/boot/libs-%{kernel_release}/openfirmware
-/boot/libs-%{kernel_release}/simple
-%dir /boot/libs-%{kernel_release}/utils
-%attr(755,root,root) /boot/libs-%{kernel_release}/utils/*
-/boot/libs-%{kernel_release}/ld.script
-%endif
-%endif
-
%if %{have_sound}
%files sound-alsa
%defattr(644,root,root,755)
%endif
%endif
-%files headers
+%files headers -f files.headers_exclude_kbuild
%defattr(644,root,root,755)
+%dir %{_kernelsrcdir}
%{_kernelsrcdir}/include
%dir %{_kernelsrcdir}/arch
%dir %{_kernelsrcdir}/arch/[!K]*
%{_kernelsrcdir}/config-dist
%{_kernelsrcdir}/Module.symvers-dist
-%files module-build -f aux_files
+%files module-build -f files.mb_include_modulebuild_and_dirs
%defattr(644,root,root,755)
%ifarch ppc ppc64
%{_kernelsrcdir}/arch/powerpc/lib/crtsavres.*
%endif
+%exclude %dir %{_kernelsrcdir}/arch/m68knommu
+%exclude %dir %{_kernelsrcdir}/arch/um
%{_kernelsrcdir}/arch/*/kernel/asm-offsets*
%{_kernelsrcdir}/arch/*/kernel/sigframe*.h
%{_kernelsrcdir}/drivers/lguest/lg.h
%{_kernelsrcdir}/kernel/bounds.c
%dir %{_kernelsrcdir}/scripts
-%dir %{_kernelsrcdir}/scripts/kconfig
%{_kernelsrcdir}/scripts/Kbuild.include
%{_kernelsrcdir}/scripts/Makefile*
%{_kernelsrcdir}/scripts/basic
+%{_kernelsrcdir}/scripts/kconfig
+%{_kernelsrcdir}/scripts/mkcompile_h
%{_kernelsrcdir}/scripts/mkmakefile
%{_kernelsrcdir}/scripts/mod
+%{_kernelsrcdir}/scripts/module-common.lds
%{_kernelsrcdir}/scripts/setlocalversion
%{_kernelsrcdir}/scripts/*.c
%{_kernelsrcdir}/scripts/*.sh
-%{_kernelsrcdir}/scripts/kconfig/*
-%{_kernelsrcdir}/scripts/mkcompile_h
%dir %{_kernelsrcdir}/scripts/selinux
%{_kernelsrcdir}/scripts/selinux/Makefile
%dir %{_kernelsrcdir}/scripts/selinux/mdp
%{_kernelsrcdir}/scripts/selinux/mdp/Makefile
%{_kernelsrcdir}/scripts/selinux/mdp/*.c
+%exclude %dir %{_kernelsrcdir}/security
+%exclude %dir %{_kernelsrcdir}/security/selinux
+%if %{with doc}
%files doc
%defattr(644,root,root,755)
-%{_kernelsrcdir}/Documentation
+%dir %{_docdir}/%{name}-%{version}
+
+%{_docdir}/%{name}-%{version}/[!jkz]*
+%{_docdir}/%{name}-%{version}/[jkz]*.txt
+%{_docdir}/%{name}-%{version}/kbuild
+%{_docdir}/%{name}-%{version}/kdump
+%{_docdir}/%{name}-%{version}/kvm
+%lang(ja) %{_docdir}/%{name}-%{version}/ja_JP
+%lang(ko) %{_docdir}/%{name}-%{version}/ko_KR
+%lang(zh_CN) %{_docdir}/%{name}-%{version}/zh_CN
+%endif
%if %{with source}
-%files source -f aux_files_exc
+%files source -f files.source_exclude_modulebuild_and_dirs
%defattr(644,root,root,755)
%{_kernelsrcdir}/arch/*/[!Mik]*
%{_kernelsrcdir}/arch/*/kernel/[!M]*
%{_kernelsrcdir}/arch/ia64/install.sh
%{_kernelsrcdir}/arch/m68k/ifpsp060/[!M]*
%{_kernelsrcdir}/arch/m68k/ifpsp060/MISC
+%{_kernelsrcdir}/arch/m68k/install.sh
%{_kernelsrcdir}/arch/parisc/install.sh
%{_kernelsrcdir}/arch/x86/ia32/[!M]*
%{_kernelsrcdir}/arch/ia64/kvm
%exclude %{_kernelsrcdir}/scripts/Makefile*
%exclude %{_kernelsrcdir}/scripts/basic
%exclude %{_kernelsrcdir}/scripts/kconfig
+%exclude %{_kernelsrcdir}/scripts/mkcompile_h
%exclude %{_kernelsrcdir}/scripts/mkmakefile
%exclude %{_kernelsrcdir}/scripts/mod
+%exclude %{_kernelsrcdir}/scripts/module-common.lds
%exclude %{_kernelsrcdir}/scripts/setlocalversion
%exclude %{_kernelsrcdir}/scripts/*.c
%exclude %{_kernelsrcdir}/scripts/*.sh
+%exclude %dir %{_kernelsrcdir}/scripts/selinux
+%exclude %{_kernelsrcdir}/scripts/selinux/Makefile
+%exclude %dir %{_kernelsrcdir}/scripts/selinux/mdp
+%exclude %{_kernelsrcdir}/scripts/selinux/mdp/Makefile
+%exclude %{_kernelsrcdir}/scripts/selinux/mdp/*.c
%{_kernelsrcdir}/sound
%{_kernelsrcdir}/security
%exclude %{_kernelsrcdir}/security/selinux/include
+%{_kernelsrcdir}/tools
%{_kernelsrcdir}/usr
%{_kernelsrcdir}/COPYING
%{_kernelsrcdir}/CREDITS