]> git.pld-linux.org Git - packages/kernel.git/blobdiff - kernel.spec
build without grsec and old module-init-tools
[packages/kernel.git] / kernel.spec
index 90976b51d00e92128e9622c0b2f94ea421f2fdff..75e37c126f3855b5efd34cb46d2a54214969a0a5 100644 (file)
@@ -6,11 +6,12 @@
 #   - 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'
@@ -24,6 +25,7 @@
 #
 # 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)
@@ -154,15 +155,13 @@ Epoch:            3
 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
+Patch1:                http://www.kernel.org/pub/linux/kernel/v2.6/longterm/v%{basever}/patch-%{version}.xz
+# Patch1-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
@@ -202,7 +201,7 @@ Patch4:             kernel-fbcon-margins.patch
 
 # 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
@@ -236,7 +235,7 @@ Patch41:    kernel-ipvs-nfct.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
@@ -256,15 +255,11 @@ Patch54:  kernel-toshiba_acpi.patch
 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
 
@@ -275,7 +270,7 @@ Patch85:    kernel-hostap.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
 
@@ -283,7 +278,7 @@ 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/
@@ -295,6 +290,9 @@ Patch148:   kernel-aufs2.patch
 
 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
@@ -315,22 +313,21 @@ Patch2003:        kernel-regressions.patch
 # (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
@@ -340,10 +337,12 @@ BuildRequires:    elftoaout
 %ifarch ppc
 BuildRequires: uboot-mkimage
 %endif
-AutoReqProv:   no
+##BuildRequires:       gcc < 6:4.6
 BuildRequires: /sbin/depmod
 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
@@ -359,6 +358,7 @@ Requires:   module-init-tools >= 0.9.9
 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
@@ -410,7 +410,7 @@ BuildRoot:  %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %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
@@ -422,7 +422,7 @@ BuildRoot:  %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %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}
 
@@ -514,19 +514,6 @@ vmlinux - dekompressiertes Kernel Bild.
 %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
@@ -535,7 +522,7 @@ Group:              Base/Kernel
 Requires(postun):      %{name} = %{epoch}:%{version}-%{release}
 Requires:      %{name} = %{epoch}:%{version}-%{release}
 Obsoletes:     kernel-smp-drm
-Autoreqprov:   no
+AutoReqProv:   no
 
 %description drm
 DRM kernel modules.
@@ -556,7 +543,7 @@ Requires:   %{name} = %{epoch}:%{version}-%{release}
 Obsoletes:     kernel-smp-pcmcia
 Conflicts:     pcmcia-cs < 3.1.21
 Conflicts:     pcmciautils < 004
-Autoreqprov:   no
+AutoReqProv:   no
 
 %description pcmcia
 PCMCIA modules.
@@ -567,23 +554,6 @@ PCMCIA Module.
 %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
@@ -592,7 +562,7 @@ Group:              Base/Kernel
 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.
@@ -611,7 +581,7 @@ Group:              Base/Kernel
 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.
@@ -628,7 +598,7 @@ Summary(de.UTF-8):  Header Dateien für den Linux-Kernel
 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
@@ -651,7 +621,7 @@ Summary(pl.UTF-8):  Pliki służące do budowania modułów jądra
 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
@@ -671,7 +641,7 @@ Summary(de.UTF-8):  Der Kernel Quelltext
 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
@@ -701,7 +671,7 @@ Summary:    Kernel documentation
 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
@@ -722,16 +692,10 @@ ln -s %{SOURCE10} Makefile
 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
+%patch1 -p1
 %endif
 
 # tuxonice:
@@ -819,8 +783,6 @@ install %{SOURCE5} Makefile.ppclibs
 %patch55 -p1
 %patch56 -p1
 
-%patch58 -p1
-
 # kernel-rndis_host-wm5.patch
 %patch59 -p1
 
@@ -840,7 +802,7 @@ install %{SOURCE5} Makefile.ppclibs
 # forcedeth
 %patch130 -p1
 
-# unionfs (disabled for rescuecd - problems with aufs2)
+# unionfs (problems with aufs2, needed for aufs1 patch)
 %if %{without rescuecd}
 %patch140 -p1
 %endif
@@ -849,9 +811,9 @@ install %{SOURCE5} Makefile.ppclibs
 # 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
@@ -875,7 +837,6 @@ install %{SOURCE5} Makefile.ppclibs
 %{?with_vserver:%patch10000 -p1}
 %{?with_vserver:%patch10001 -p1}
 %{?with_vserver:%patch10002 -p1}
-%{?with_vserver:%patch10003 -p1}
 %endif
 %endif
 #
@@ -886,7 +847,10 @@ install %{SOURCE5} Makefile.ppclibs
 %patch5000 -p1
 %endif
 
-%patch150 -p1
+# FIXME
+#%patch150 -p1
+
+%patch160 -p1
 
 %ifarch ppc ppc64
 #patch200 -p1
@@ -950,7 +914,7 @@ PaXconfig() {
        # 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
@@ -997,6 +961,7 @@ RescueConfig() {
                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
@@ -1040,6 +1005,7 @@ BuildConfig() {
                CONFIG_HIGHMEM4G=n
                CONFIG_HIGHMEM64G=y
                CONFIG_X86_PAE=y
+               CONFIG_NUMA=n
   %endif
 %endif
 
@@ -1154,25 +1120,35 @@ rm -rf $RPM_BUILD_ROOT
 
 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} \
+       devname \
+       softdep \
+       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
@@ -1229,6 +1205,15 @@ cd $RPM_BUILD_ROOT%{_kernelsrcdir}
 %{__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
 
@@ -1261,9 +1246,13 @@ mv -f %{initrd_dir}/initrd{,.old} 2> /dev/null
 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
 
@@ -1273,9 +1262,6 @@ mv -f /boot/vmlinux{,.old} 2> /dev/null
 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}
 
@@ -1336,9 +1322,7 @@ fi
 
 %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}
@@ -1348,6 +1332,7 @@ fi
 /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*
@@ -1383,15 +1368,33 @@ fi
 %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.devname
+%ghost /lib/modules/%{kernel_release}/modules.softdep
+%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
@@ -1428,23 +1431,6 @@ fi
 /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)
@@ -1469,8 +1455,9 @@ fi
 %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]*
@@ -1481,39 +1468,54 @@ fi
 %{_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]*
@@ -1521,6 +1523,7 @@ fi
 %{_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
@@ -1555,14 +1558,22 @@ fi
 %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
This page took 0.150215 seconds and 4 git commands to generate.