2 %bcond_without source # don't build kernel-source package
3 %bcond_without doc # don't build kernel-doc package
4 %bcond_with verbose # verbose build (V=1)
10 %define alt_kernel 5.4-vanilla
12 # kernel release (used in filesystem and eventually in uname -r)
13 # modules will be looked from /lib/modules/%{kernel_release}
14 # localversion is just that without version for "> localversion"
15 %define localversion %{rel}
16 %define kernel_release %{version}%{?alt_kernel:-%{alt_kernel}}-%{localversion}
18 Summary: The Linux kernel (the core of the Linux operating system)
19 Summary(de.UTF-8): Der Linux-Kernel (Kern des Linux-Betriebssystems)
20 Summary(et.UTF-8): Linuxi kernel (ehk operatsioonisüsteemi tuum)
21 Summary(fr.UTF-8): Le Kernel-Linux (La partie centrale du systeme)
22 Summary(pl.UTF-8): Jądro Linuksa
23 Name: kernel%{_alt_kernel}
24 Version: %{basever}.%{postver}
29 Source0: http://www.kernel.org/pub/linux/kernel/v5.x/linux-%{basever}.tar.xz
30 # Source0-md5: ce9b2d974d27408a61c53a30d3f98fb9
31 %if "%{postver}" != "0"
32 Source1: http://www.kernel.org/pub/linux/kernel/v5.x/patch-%{version}.xz
33 # Source1-md5: a8a2ed15946480d4a01494870e0c9b0c
36 Source2: kernel-module-build.pl
39 Source10: kernel-vanilla-x86.config
40 Source11: kernel-vanilla-x86_64.config
42 URL: http://www.kernel.org/
43 BuildRequires: binutils >= 3:2.18
45 BuildRequires: /sbin/depmod
46 BuildRequires: elfutils-devel
48 BuildRequires: gcc >= 5:3.2
49 BuildRequires: gcc-plugin-devel
50 BuildRequires: xz >= 1:4.999.7
52 BuildRequires: hostname
54 BuildRequires: openssl-devel
55 BuildRequires: perl-base
56 BuildRequires: rpm >= 4.5-74
57 BuildRequires: rpmbuild(macros) >= 1.652
58 Requires(post): coreutils
59 Requires(post): dracut
60 Requires(post): kmod >= 12-2
61 Requires: /sbin/depmod
64 Requires: kmod >= 12-2
66 Requires: cpuinfo(pae)
70 Suggests: linux-firmware
71 Provides: %{name}(netfilter) = 20070806
72 Provides: %{name}(vermagic) = %{kernel_release}
73 Obsoletes: kernel%{_alt_kernel}-char-lirc-ene0100
74 Obsoletes: kernel%{_alt_kernel}-char-lirc-it87
75 Obsoletes: kernel%{_alt_kernel}-char-lirc-ite8709
76 Obsoletes: kernel%{_alt_kernel}-char-lirc-mceusb
77 Obsoletes: kernel%{_alt_kernel}-char-lirc-streamzap
78 Obsoletes: kernel%{_alt_kernel}-isdn-mISDN
79 Obsoletes: kernel-firmware
80 Obsoletes: kernel-misc-acer_acpi
81 Obsoletes: kernel-misc-fuse
82 Obsoletes: kernel-misc-uvc
83 Obsoletes: kernel-modules
84 Obsoletes: kernel-net-ar81
85 Obsoletes: kernel-net-hostap
86 Obsoletes: kernel-net-ieee80211
87 Obsoletes: kernel-net-ipp2p
88 Obsoletes: kernel-net-rt61
90 Conflicts: e2fsprogs < 1.29
91 Conflicts: isdn4k-utils < 3.1pre1
92 Conflicts: jfsutils < 1.1.3
93 Conflicts: linux-firmware < 20120720
94 Conflicts: lvm2 < 2.02.40
95 Conflicts: module-init-tools < 3.16
96 Conflicts: nfs-utils < 1.0.5
97 Conflicts: oprofile < 0.9
98 Conflicts: ppp < 1:2.4.0
99 Conflicts: procps < 3.2.0
100 Conflicts: quota-tools < 3.09
101 Conflicts: reiserfsprogs < 3.6.3
102 Conflicts: rpm < 4.4.2-0.2
103 Conflicts: udev < 1:081
104 Conflicts: util-linux < 2.10o
105 Conflicts: xfsprogs < 2.6.0
106 ExclusiveArch: i686 x86_64
108 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
111 %define target_arch_dir x86
113 %define target_arch_dir %{_target_base_arch}
116 %define defconfig arch/%{target_arch_dir}/defconfig
118 # No ELF objects there to strip (skips processing 27k files)
119 %define _noautostrip \\(.*%{_kernelsrcdir}/.*\\|.*/vmlinux.*\\)
120 %define _noautochrpath .*%{_kernelsrcdir}/.*
121 %define _enable_debug_packages 0
123 %define initrd_dir /boot
125 %define topdir %{_builddir}/%{name}-%{version}
126 %define srcdir %{topdir}/linux-%{basever}
127 %define objdir %{topdir}/%{targetobj}
128 %define targetobj %{_target_base_arch}-gcc-%(%{kgcc} -dumpversion)
130 %define _kernelsrcdir /usr/src/linux%{_alt_kernel}-%{version}
132 %if "%{_target_base_arch}" != "%{_host_base_arch}"
133 %define CrossOpts ARCH=%{_target_base_arch} CROSS_COMPILE=%{_target_cpu}-tld-linux-
134 %define DepMod /bin/true
136 %if "%{_host_base_arch}" == "x86_64" && "%{_target_base_arch}" == "i386"
137 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
138 %define DepMod /sbin/depmod
142 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
143 %define DepMod /sbin/depmod
145 %define MakeOpts %{CrossOpts} HOSTCC="%{__cc}"
148 This package contains the Linux kernel that is used to boot and run
149 your system. It contains few device drivers for specific hardware.
150 Most hardware is instead supported by modules loaded after booting.
152 %description -l de.UTF-8
153 Das Kernel-Paket enthält den Linux-Kernel (vmlinuz), den Kern des
154 Linux-Betriebssystems. Der Kernel ist für grundliegende
155 Systemfunktionen verantwortlich: Speicherreservierung,
156 Prozeß-Management, Geräte Ein- und Ausgaben, usw.
158 %description -l fr.UTF-8
159 Le package kernel contient le kernel linux (vmlinuz), la partie
160 centrale d'un système d'exploitation Linux. Le noyau traite les
161 fonctions basiques d'un système d'exploitation: allocation mémoire,
162 allocation de process, entrée/sortie de peripheriques, etc.
164 %description -l pl.UTF-8
165 Pakiet zawiera jądro Linuksa niezbędne do prawidłowego działania
166 Twojego komputera. Zawiera w sobie sterowniki do sprzętu znajdującego
167 się w komputerze, takiego jak sterowniki dysków itp.
170 Summary: vmlinux - uncompressed kernel image
171 Summary(de.UTF-8): vmlinux - dekompressiertes Kernel Bild
172 Summary(pl.UTF-8): vmlinux - rozpakowany obraz jądra
174 Obsoletes: kernel-smp-vmlinux
177 vmlinux - uncompressed kernel image.
179 %description vmlinux -l de.UTF-8
180 vmlinux - dekompressiertes Kernel Bild.
182 %description vmlinux -l pl.UTF-8
183 vmlinux - rozpakowany obraz jądra.
186 Summary: DRM kernel modules
187 Summary(de.UTF-8): DRM Kernel Treiber
188 Summary(pl.UTF-8): Sterowniki DRM
190 Requires(postun): %{name} = %{epoch}:%{version}-%{release}
191 Requires: %{name} = %{epoch}:%{version}-%{release}
192 Obsoletes: kernel-smp-drm
198 %description drm -l de.UTF-8
201 %description drm -l pl.UTF-8
205 Summary: PCMCIA modules
206 Summary(de.UTF-8): PCMCIA Module
207 Summary(pl.UTF-8): Moduły PCMCIA
209 Requires(postun): %{name} = %{epoch}:%{version}-%{release}
210 Requires: %{name} = %{epoch}:%{version}-%{release}
211 Obsoletes: kernel-smp-pcmcia
212 Conflicts: pcmcia-cs < 3.1.21
213 Conflicts: pcmciautils < 004
219 %description pcmcia -l de.UTF-8
222 %description pcmcia -l pl.UTF-8
226 Summary: ALSA kernel modules
227 Summary(de.UTF-8): ALSA Kernel Module
228 Summary(pl.UTF-8): Sterowniki dźwięku ALSA
230 Requires(postun): %{name} = %{epoch}:%{version}-%{release}
231 Requires: %{name} = %{epoch}:%{version}-%{release}
232 Obsoletes: kernel-smp-sound-alsa
235 %description sound-alsa
236 ALSA (Advanced Linux Sound Architecture) sound drivers.
238 %description sound-alsa -l de.UTF-8
239 ALSA (Advanced Linux Sound Architecture) Sound-Treiber.
241 %description sound-alsa -l pl.UTF-8
242 Sterowniki dźwięku ALSA (Advanced Linux Sound Architecture).
245 Summary: Header files for the Linux kernel
246 Summary(de.UTF-8): Header Dateien für den Linux-Kernel
247 Summary(pl.UTF-8): Pliki nagłówkowe jądra Linuksa
248 Group: Development/Building
249 Provides: %{name}-headers(netfilter) = 20070806
253 These are the C header files for the Linux kernel, which define
254 structures and constants that are needed when rebuilding the kernel or
255 building kernel modules.
257 %description headers -l de.UTF-8
258 Dies sind die C Header Dateien für den Linux-Kernel, die definierte
259 Strukturen und Konstante beinhalten, die beim rekompilieren des
260 Kernels oder bei Kernel Modul kompilationen gebraucht werden.
262 %description headers -l pl.UTF-8
263 Pakiet zawiera pliki nagłówkowe jądra, niezbędne do rekompilacji jądra
264 oraz budowania modułów jądra.
266 %package module-build
267 Summary: Development files for building kernel modules
268 Summary(de.UTF-8): Development Dateien die beim Kernel Modul kompilationen gebraucht werden
269 Summary(pl.UTF-8): Pliki służące do budowania modułów jądra
270 Group: Development/Building
271 Requires: %{name}-headers = %{epoch}:%{version}-%{release}
272 Conflicts: rpmbuild(macros) < 1.652
275 %description module-build
276 Development files from kernel source tree needed to build Linux kernel
277 modules from external packages.
279 %description module-build -l de.UTF-8
280 Development Dateien des Linux-Kernels die beim kompilieren externer
281 Kernel Module gebraucht werden.
283 %description module-build -l pl.UTF-8
284 Pliki ze drzewa źródeł jądra potrzebne do budowania modułów jądra
285 Linuksa z zewnętrznych pakietów.
288 Summary: Kernel source tree
289 Summary(de.UTF-8): Der Kernel Quelltext
290 Summary(pl.UTF-8): Kod źródłowy jądra Linuksa
291 Group: Development/Building
292 Requires: %{name}-module-build = %{epoch}:%{version}-%{release}
296 This is the source code for the Linux kernel. You can build a custom
297 kernel that is better tuned to your particular hardware.
299 %description source -l de.UTF-8
300 Das Kernel-Source-Paket enthält den source code (C/Assembler-Code) des
301 Linux-Kernels. Die Source-Dateien werden gebraucht, um viele
302 C-Programme zu kompilieren, da sie auf Konstanten zurückgreifen, die
303 im Kernel-Source definiert sind. Die Source-Dateien können auch
304 benutzt werden, um einen Kernel zu kompilieren, der besser auf Ihre
305 Hardware ausgerichtet ist.
307 %description source -l fr.UTF-8
308 Le package pour le kernel-source contient le code source pour le noyau
309 linux. Ces sources sont nécessaires pour compiler la plupart des
310 programmes C, car il dépend de constantes définies dans le code
311 source. Les sources peuvent être aussi utilisée pour compiler un noyau
312 personnalisé pour avoir de meilleures performances sur des matériels
315 %description source -l pl.UTF-8
316 Pakiet zawiera kod źródłowy jądra systemu.
319 Summary: Kernel documentation
320 Summary(de.UTF-8): Kernel Dokumentation
321 Summary(pl.UTF-8): Dokumentacja do jądra Linuksa
326 This is the documentation for the Linux kernel, as found in
327 /usr/src/linux/Documentation directory.
329 %description doc -l de.UTF-8
330 Dies ist die Kernel Dokumentation wie sie im 'Documentation'
331 Verzeichniss vorgefunden werden kann.
333 %description doc -l pl.UTF-8
334 Pakiet zawiera dokumentację do jądra Linuksa pochodzącą z katalogu
335 /usr/src/linux/Documentation.
339 ln -s %{SOURCE2} kernel-module-build.pl
340 ln -s %{SOURCE3} Makefile
343 %if "%{postver}" != "0"
344 %{__xz} -dc %{SOURCE1} | patch -p1 -s
347 # Fix EXTRAVERSION in main Makefile
348 sed -i 's#EXTRAVERSION =.*#EXTRAVERSION = %{?alt_kernel:-%{alt_kernel}}#g' Makefile
350 # cleanup backups after patching
351 find '(' -name '*~' -o -name '*.orig' -o -name '.gitignore' ')' -print0 | xargs -0 -r -l512 rm -f
355 cat > %{targetobj}.mk <<'EOF'
356 # generated by %{name}.spec
357 KERNELSRC := %{srcdir}
358 KERNELOUTPUT := %{objdir}
360 SRCARCH := %{target_arch_dir}
361 ARCH := %{_target_base_arch}
362 Q := %{!?with_verbose:@}
363 MAKE_OPTS := %{MakeOpts}
364 DEFCONFIG := %{defconfig}
368 install -d arch/%{target_arch_dir}
370 cat %{SOURCE10} > %{defconfig}
373 cat %{SOURCE11} > %{defconfig}
375 sed -i "s:CONFIG_LOCALVERSION=\"\":CONFIG_LOCALVERSION=\"-%{localversion}\":" %{defconfig}
377 ln -sf %{defconfig} .config
381 TARGETOBJ=%{targetobj} \
382 %{?with_verbose:V=1} \
387 TARGETOBJ=%{targetobj} \
388 %{?with_verbose:V=1} \
392 rm -rf $RPM_BUILD_ROOT
393 %{__make} %{MakeOpts} -j1 %{!?with_verbose:-s} modules_install \
395 %{?with_verbose:V=1} \
397 mod_compress_cmd=true \
398 INSTALL_MOD_PATH=$RPM_BUILD_ROOT \
399 KERNELRELEASE=%{kernel_release}
401 install -d $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/misc
403 # create directories which may be missing, to simplyfy %files
404 install -d $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/kernel/{arch,sound,mm}
406 # rpm obeys filelinkto checks for ghosted symlinks, convert to files
407 rm -f $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/{build,source}
408 touch $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/{build,source}
410 # no point embed content for %ghost files. empty them
418 test -f $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/modules.$a
419 > $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/modules.$a
423 install -d $RPM_BUILD_ROOT/boot
424 cp -a %{objdir}/System.map $RPM_BUILD_ROOT/boot/System.map-%{kernel_release}
425 cp -aL %{objdir}/.config $RPM_BUILD_ROOT/boot/config-%{kernel_release}
426 cp -a %{objdir}/arch/%{target_arch_dir}/boot/bzImage $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release}
427 install -p %{objdir}/vmlinux $RPM_BUILD_ROOT/boot/vmlinux-%{kernel_release}
430 touch $RPM_BUILD_ROOT%{initrd_dir}/initramfs-%{kernel_release}.img
432 %if "%{_target_base_arch}" != "%{_host_base_arch}"
433 touch $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/modules.dep
437 install -d $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/%{kernel_release}
440 install -d $RPM_BUILD_ROOT%{_kernelsrcdir}
442 # test if we can hardlink -- %{_builddir} and $RPM_BUILD_ROOT on same partition
443 if cp -al %{srcdir}/COPYING $RPM_BUILD_ROOT/COPYING 2>/dev/null; then
445 rm -f $RPM_BUILD_ROOT/COPYING
448 cp -a$l %{srcdir}/* $RPM_BUILD_ROOT%{_kernelsrcdir}
449 cp -a %{objdir}/Module.symvers $RPM_BUILD_ROOT%{_kernelsrcdir}
450 cp -aL %{objdir}/.config $RPM_BUILD_ROOT%{_kernelsrcdir}
451 cp -a %{objdir}/include $RPM_BUILD_ROOT%{_kernelsrcdir}
452 # copy arch/x86/include/generated
453 for dir in $(cd %{objdir} && find arch -name generated -type d); do
454 cp -a %{objdir}/$dir $RPM_BUILD_ROOT%{_kernelsrcdir}/$dir
455 find $RPM_BUILD_ROOT%{_kernelsrcdir}/$dir -name '.*.cmd' -exec rm "{}" ";"
458 # version.h location changed in 3.7, but a lot of external modules don't know about it
459 # add a compatibility symlink
460 ln -s ../generated/uapi/linux/version.h $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux/version.h
462 # disable this here, causes a lot of build-time problems and our rpm-build disables it anyway
463 %{__sed} -i -e 's|\(CONSTIFY_PLUGIN.*:=.*\)|# \1|' $RPM_BUILD_ROOT%{_kernelsrcdir}/Makefile
465 # collect module-build files and directories
466 # Usage: kernel-module-build.pl $rpmdir $fileoutdir
468 cd $RPM_BUILD_ROOT%{_kernelsrcdir}
469 %{__perl} %{topdir}/kernel-module-build.pl %{_kernelsrcdir} $fileoutdir
472 for f in `find %{objdir}/scripts -type f -print | grep -v "/\.\|\.o$"` ; do
475 echo "%attr(755,root,root) %{_kernelsrcdir}/$ff" >>files.mb_include_modulebuild_and_dirs
477 echo "%{_kernelsrcdir}/$ff" >>files.mb_include_modulebuild_and_dirs
479 echo "%exclude %{_kernelsrcdir}/$ff" >>files.source_exclude_modulebuild_and_dirs
480 cp -a "$f" "$RPM_BUILD_ROOT%{_kernelsrcdir}/$ff"
484 # move to %{_docdir} so we wouldn't depend on any kernel package for dirs
485 install -d $RPM_BUILD_ROOT%{_docdir}
486 mv $RPM_BUILD_ROOT{%{_kernelsrcdir}/Documentation,%{_docdir}/%{name}-%{version}}
488 %{__rm} $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/dontdiff
489 %{__rm} $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/Makefile
490 %{__rm} $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/*/Makefile
491 %{__rm} $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/*/*/Makefile
493 %{__rm} -r $RPM_BUILD_ROOT%{_kernelsrcdir}/Documentation
497 rm -rf $RPM_BUILD_ROOT
500 if [ -x /sbin/new-kernel-pkg ]; then
501 /sbin/new-kernel-pkg --remove %{kernel_release}
505 %depmod %{kernel_release}
509 if [ -x /sbin/dracut ]; then
510 /sbin/dracut --force --quiet /boot/initramfs-%{kernel_release}.img %{kernel_release}
513 if [ -x /sbin/update-grub -a -f /etc/sysconfig/grub ]; then
514 if [ "$(. /etc/sysconfig/grub; echo ${UPDATE_GRUB:-yes})" = "yes" ]; then
515 /sbin/update-grub >/dev/null
520 %depmod %{kernel_release}
523 %depmod %{kernel_release}
526 %depmod %{kernel_release}
529 %depmod %{kernel_release}
532 %depmod %{kernel_release}
535 %depmod %{kernel_release}
538 ln -snf %{basename:%{_kernelsrcdir}} %{_prefix}/src/linux%{_alt_kernel}
541 if [ "$1" = "0" ]; then
542 if [ -L %{_prefix}/src/linux%{_alt_kernel} ]; then
543 if [ "$(readlink %{_prefix}/src/linux%{_alt_kernel})" = "linux%{_alt_kernel}-%{version}" ]; then
544 rm -f %{_prefix}/src/linux%{_alt_kernel}
549 %triggerin module-build -- %{name} = %{epoch}:%{version}-%{release}
550 ln -sfn %{_kernelsrcdir} /lib/modules/%{kernel_release}/build
551 ln -sfn %{_kernelsrcdir} /lib/modules/%{kernel_release}/source
553 %triggerun module-build -- %{name} = %{epoch}:%{version}-%{release}
554 if [ "$1" = 0 ]; then
555 rm -f /lib/modules/%{kernel_release}/{build,source}
559 %defattr(644,root,root,755)
560 /boot/vmlinuz-%{kernel_release}
561 /boot/System.map-%{kernel_release}
562 /boot/config-%{kernel_release}
563 %ghost %{initrd_dir}/initramfs-%{kernel_release}.img
565 %dir /lib/modules/%{kernel_release}
566 %dir /lib/modules/%{kernel_release}/kernel
567 /lib/modules/%{kernel_release}/kernel/arch
568 /lib/modules/%{kernel_release}/kernel/block
569 /lib/modules/%{kernel_release}/kernel/crypto
570 /lib/modules/%{kernel_release}/kernel/drivers
571 %exclude /lib/modules/%{kernel_release}/kernel/drivers/gpu
572 /lib/modules/%{kernel_release}/kernel/fs
573 /lib/modules/%{kernel_release}/kernel/kernel
574 /lib/modules/%{kernel_release}/kernel/lib
575 /lib/modules/%{kernel_release}/kernel/net
576 /lib/modules/%{kernel_release}/kernel/mm
577 %dir /lib/modules/%{kernel_release}/kernel/sound
578 /lib/modules/%{kernel_release}/kernel/sound/ac97_bus.ko*
579 /lib/modules/%{kernel_release}/kernel/sound/sound*.ko*
580 %exclude /lib/modules/%{kernel_release}/kernel/drivers/media/pci/cx88/cx88-alsa.ko*
581 %exclude /lib/modules/%{kernel_release}/kernel/drivers/media/usb/em28xx/em28xx-alsa.ko*
582 %exclude /lib/modules/%{kernel_release}/kernel/drivers/media/pci/saa7134/saa7134-alsa.ko*
583 %dir /lib/modules/%{kernel_release}/misc
584 %exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/[!p]*
585 %exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/pd6729.ko*
586 %exclude /lib/modules/%{kernel_release}/kernel/drivers/*/pcmcia
587 %exclude /lib/modules/%{kernel_release}/kernel/drivers/ata/pata_pcmcia.ko*
588 %exclude /lib/modules/%{kernel_release}/kernel/drivers/bluetooth/*_cs.ko*
589 %exclude /lib/modules/%{kernel_release}/kernel/drivers/ide/ide-cs.ko*
590 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/*_cs.ko*
591 %exclude /lib/modules/%{kernel_release}/kernel/drivers/parport/parport_cs.ko*
592 %exclude /lib/modules/%{kernel_release}/kernel/drivers/tty/serial/8250/serial_cs.ko*
593 %exclude /lib/modules/%{kernel_release}/kernel/drivers/usb/host/sl811_cs.ko*
594 /lib/modules/%{kernel_release}/kernel/security
595 /lib/modules/%{kernel_release}/kernel/virt
597 %dir %{_sysconfdir}/modprobe.d/%{kernel_release}
600 /lib/modules/%{kernel_release}/modules.order
601 /lib/modules/%{kernel_release}/modules.builtin*
603 # rest modules.* are ghost (regenerated by post depmod -a invocation)
604 %ghost /lib/modules/%{kernel_release}/modules.alias
605 %ghost /lib/modules/%{kernel_release}/modules.alias.bin
606 %ghost /lib/modules/%{kernel_release}/modules.dep
607 %ghost /lib/modules/%{kernel_release}/modules.dep.bin
608 %ghost /lib/modules/%{kernel_release}/modules.devname
609 %ghost /lib/modules/%{kernel_release}/modules.softdep
610 %ghost /lib/modules/%{kernel_release}/modules.symbols
611 %ghost /lib/modules/%{kernel_release}/modules.symbols.bin
613 # symlinks pointing to kernelsrcdir
614 %ghost /lib/modules/%{kernel_release}/build
615 %ghost /lib/modules/%{kernel_release}/source
618 %defattr(644,root,root,755)
619 /boot/vmlinux-%{kernel_release}
622 %defattr(644,root,root,755)
623 /lib/modules/%{kernel_release}/kernel/drivers/gpu
626 %defattr(644,root,root,755)
627 /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/*ko*
628 /lib/modules/%{kernel_release}/kernel/drivers/*/pcmcia
629 %exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/pcmcia*ko*
630 /lib/modules/%{kernel_release}/kernel/drivers/bluetooth/*_cs.ko*
631 /lib/modules/%{kernel_release}/kernel/drivers/ata/pata_pcmcia.ko*
632 /lib/modules/%{kernel_release}/kernel/drivers/ide/ide-cs.ko*
633 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/*_cs.ko*
634 /lib/modules/%{kernel_release}/kernel/drivers/parport/parport_cs.ko*
635 /lib/modules/%{kernel_release}/kernel/drivers/tty/serial/8250/serial_cs.ko*
636 /lib/modules/%{kernel_release}/kernel/drivers/usb/host/sl811_cs.ko*
639 %defattr(644,root,root,755)
640 /lib/modules/%{kernel_release}/kernel/sound
641 %exclude %dir /lib/modules/%{kernel_release}/kernel/sound
642 %exclude /lib/modules/%{kernel_release}/kernel/sound/ac97_bus.ko*
643 %exclude /lib/modules/%{kernel_release}/kernel/sound/sound*.ko*
644 /lib/modules/%{kernel_release}/kernel/drivers/media/pci/cx88/cx88-alsa.ko*
645 /lib/modules/%{kernel_release}/kernel/drivers/media/usb/em28xx/em28xx-alsa.ko*
646 /lib/modules/%{kernel_release}/kernel/drivers/media/pci/saa7134/saa7134-alsa.ko*
648 %files headers -f files.headers_exclude_kbuild
649 %defattr(644,root,root,755)
650 %dir %{_kernelsrcdir}
651 %{_kernelsrcdir}/include
652 %dir %{_kernelsrcdir}/arch
653 %dir %{_kernelsrcdir}/arch/[!K]*
654 %{_kernelsrcdir}/arch/*/include
655 %dir %{_kernelsrcdir}/security
656 %dir %{_kernelsrcdir}/security/selinux
657 %{_kernelsrcdir}/security/selinux/include
658 %dir %{_kernelsrcdir}/usr
659 %dir %{_kernelsrcdir}/usr/include
660 %{_kernelsrcdir}/.config
661 %{_kernelsrcdir}/Module.symvers
663 %files module-build -f files.mb_include_modulebuild_and_dirs
664 %defattr(644,root,root,755)
665 %exclude %dir %{_kernelsrcdir}/arch/um
666 %{_kernelsrcdir}/arch/*/kernel/asm-offsets*
667 %{_kernelsrcdir}/arch/*/kernel/sigframe*.h
668 %{_kernelsrcdir}/drivers/media/pci/bt8xx/bttv.h
669 %{_kernelsrcdir}/kernel/bounds.c
670 %{_kernelsrcdir}/scripts/basic/*.c
671 %attr(755,root,root) %{_kernelsrcdir}/scripts/kconfig/*.sh
672 %{_kernelsrcdir}/scripts/kconfig/*.pl
673 %{_kernelsrcdir}/scripts/kconfig/*.glade
674 %{_kernelsrcdir}/scripts/kconfig/*.cc
675 %{_kernelsrcdir}/scripts/kconfig/*.y
676 %{_kernelsrcdir}/scripts/kconfig/*.l
677 %{_kernelsrcdir}/scripts/kconfig/[c-k]*.c
678 %{_kernelsrcdir}/scripts/kconfig/[c-k]*.h
679 %{_kernelsrcdir}/scripts/kconfig/l*.h
680 %{_kernelsrcdir}/scripts/kconfig/[m-o]*.c
681 %{_kernelsrcdir}/scripts/kconfig/[m-o]*.h
682 %{_kernelsrcdir}/scripts/kconfig/preprocess.c
683 %{_kernelsrcdir}/scripts/kconfig/[q-u]*.c
684 %{_kernelsrcdir}/scripts/kconfig/[q-u]*.h
685 %{_kernelsrcdir}/scripts/kconfig/lxdialog
686 %{_kernelsrcdir}/scripts/mod/*.c
687 %{_kernelsrcdir}/scripts/mod/modpost.h
688 %attr(755,root,root) %{_kernelsrcdir}/scripts/mkcompile_h
689 %{_kernelsrcdir}/scripts/mkmakefile
690 %{_kernelsrcdir}/scripts/module-common.lds
691 %attr(755,root,root) %{_kernelsrcdir}/scripts/setlocalversion
692 %{_kernelsrcdir}/scripts/subarch.include
693 %{_kernelsrcdir}/scripts/*.c
694 %{_kernelsrcdir}/scripts/*.h
695 %attr(755,root,root) %{_kernelsrcdir}/scripts/*.sh
696 %{_kernelsrcdir}/scripts/selinux/genheaders/*.c
697 %{_kernelsrcdir}/scripts/selinux/mdp/*.c
698 %exclude %dir %{_kernelsrcdir}/security
699 %exclude %dir %{_kernelsrcdir}/security/selinux
703 %defattr(644,root,root,755)
704 %dir %{_docdir}/%{name}-%{version}
706 %{_docdir}/%{name}-%{version}/[!jkz]*
707 %{_docdir}/%{name}-%{version}/[jkz]*.txt
708 %{_docdir}/%{name}-%{version}/kbuild
709 %{_docdir}/%{name}-%{version}/kernel-hacking
713 %files source -f files.source_exclude_modulebuild_and_dirs
714 %defattr(644,root,root,755)
715 %{_kernelsrcdir}/arch/*/[!Mik]*
716 %{_kernelsrcdir}/arch/*/kernel/[!M]*
717 %{_kernelsrcdir}/arch/ia64/install.sh
718 %{_kernelsrcdir}/arch/m68k/ifpsp060/[!M]*
719 %{_kernelsrcdir}/arch/m68k/ifpsp060/MISC
720 %{_kernelsrcdir}/arch/m68k/install.sh
721 %{_kernelsrcdir}/arch/parisc/install.sh
722 %{_kernelsrcdir}/arch/x86/ia32/[!M]*
723 %{_kernelsrcdir}/arch/arm/kvm
724 %{_kernelsrcdir}/arch/arm64/kvm
725 %{_kernelsrcdir}/arch/mips/kvm
726 %{_kernelsrcdir}/arch/powerpc/kvm
727 %{_kernelsrcdir}/arch/s390/kvm
728 %{_kernelsrcdir}/arch/x86/kvm
729 %exclude %{_kernelsrcdir}/arch/*/kernel/asm-offsets*
730 %exclude %{_kernelsrcdir}/arch/*/kernel/sigframe*.h
731 %exclude %{_kernelsrcdir}/drivers/media/pci/bt8xx/bttv.h
732 %{_kernelsrcdir}/block
733 %{_kernelsrcdir}/certs
734 %{_kernelsrcdir}/crypto
735 %{_kernelsrcdir}/drivers
737 %{_kernelsrcdir}/init
739 %{_kernelsrcdir}/kernel
740 %exclude %{_kernelsrcdir}/kernel/bounds.c
744 %{_kernelsrcdir}/virt
745 %{_kernelsrcdir}/samples
746 %{_kernelsrcdir}/scripts/*
747 %exclude %{_kernelsrcdir}/scripts/Kbuild.include
748 %exclude %{_kernelsrcdir}/scripts/Makefile*
749 %exclude %{_kernelsrcdir}/scripts/basic
750 %exclude %{_kernelsrcdir}/scripts/kconfig
751 %exclude %{_kernelsrcdir}/scripts/mkcompile_h
752 %exclude %{_kernelsrcdir}/scripts/mkmakefile
753 %exclude %{_kernelsrcdir}/scripts/mod
754 %exclude %{_kernelsrcdir}/scripts/module-common.lds
755 %exclude %{_kernelsrcdir}/scripts/setlocalversion
756 %exclude %{_kernelsrcdir}/scripts/*.c
757 %exclude %{_kernelsrcdir}/scripts/*.h
758 %exclude %{_kernelsrcdir}/scripts/*.sh
759 %exclude %dir %{_kernelsrcdir}/scripts/selinux
760 %exclude %{_kernelsrcdir}/scripts/selinux/Makefile
761 %exclude %dir %{_kernelsrcdir}/scripts/selinux/genheaders
762 %exclude %{_kernelsrcdir}/scripts/selinux/genheaders/Makefile
763 %exclude %{_kernelsrcdir}/scripts/selinux/genheaders/*.c
764 %exclude %dir %{_kernelsrcdir}/scripts/selinux/mdp
765 %exclude %{_kernelsrcdir}/scripts/selinux/mdp/Makefile
766 %exclude %{_kernelsrcdir}/scripts/selinux/mdp/*.c
767 %{_kernelsrcdir}/sound
768 %{_kernelsrcdir}/security
769 %exclude %{_kernelsrcdir}/security/selinux/include
770 %{_kernelsrcdir}/tools/*
772 %{_kernelsrcdir}/COPYING
773 %{_kernelsrcdir}/CREDITS
774 %{_kernelsrcdir}/LICENSES
775 %{_kernelsrcdir}/MAINTAINERS
776 %{_kernelsrcdir}/README