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
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: 0d3df7cec2f43acf0e63c16ee11e9dd7
36 Source2: kernel-module-build.pl
39 Source10: kernel-x86.config
40 Source11: kernel-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)
69 Suggests: linux-firmware
70 Provides: %{name}(netfilter) = 20070806
71 Provides: %{name}(vermagic) = %{kernel_release}
72 Obsoletes: kernel%{_alt_kernel}-vanilla
73 Obsoletes: kernel-firmware
74 Obsoletes: kernel-modules
75 Conflicts: e2fsprogs < 1.29
76 Conflicts: isdn4k-utils < 3.1pre1
77 Conflicts: jfsutils < 1.1.3
78 Conflicts: linux-firmware < 20120720
79 Conflicts: lvm2 < 2.02.40
80 Conflicts: module-init-tools < 3.16
81 Conflicts: nfs-utils < 1.0.5
82 Conflicts: oprofile < 0.9
83 Conflicts: ppp < 1:2.4.0
84 Conflicts: procps < 3.2.0
85 Conflicts: quota-tools < 3.09
86 Conflicts: reiserfsprogs < 3.6.3
87 Conflicts: rpm < 4.4.2-0.2
88 Conflicts: udev < 1:081
89 Conflicts: util-linux < 2.10o
90 Conflicts: xfsprogs < 2.6.0
91 ExclusiveArch: i686 x86_64
93 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
96 %define target_arch_dir x86
98 %define target_arch_dir %{_target_base_arch}
101 %define defconfig arch/%{target_arch_dir}/defconfig
103 # No ELF objects there to strip (skips processing 27k files)
104 %define _noautostrip \\(.*%{_kernelsrcdir}/.*\\|.*/vmlinux.*\\)
105 %define _noautochrpath .*%{_kernelsrcdir}/.*
106 %define _enable_debug_packages 0
108 %define initrd_dir /boot
110 %define topdir %{_builddir}/%{name}-%{version}
111 %define srcdir %{topdir}/linux-%{basever}
112 %define objdir %{topdir}/%{targetobj}
113 %define targetobj %{_target_base_arch}-gcc-%(%{kgcc} -dumpversion)
115 %define _kernelsrcdir /usr/src/linux%{_alt_kernel}-%{version}
117 %if "%{_target_base_arch}" != "%{_host_base_arch}"
118 %define CrossOpts ARCH=%{_target_base_arch} CROSS_COMPILE=%{_target_cpu}-tld-linux-
119 %define DepMod /bin/true
121 %if "%{_host_base_arch}" == "x86_64" && "%{_target_base_arch}" == "i386"
122 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
123 %define DepMod /sbin/depmod
127 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
128 %define DepMod /sbin/depmod
130 %define MakeOpts %{CrossOpts} HOSTCC="%{__cc}"
133 This package contains the Linux kernel that is used to boot and run
134 your system. It contains few device drivers for specific hardware.
135 Most hardware is instead supported by modules loaded after booting.
137 %description -l de.UTF-8
138 Das Kernel-Paket enthält den Linux-Kernel (vmlinuz), den Kern des
139 Linux-Betriebssystems. Der Kernel ist für grundliegende
140 Systemfunktionen verantwortlich: Speicherreservierung,
141 Prozeß-Management, Geräte Ein- und Ausgaben, usw.
143 %description -l fr.UTF-8
144 Le package kernel contient le kernel linux (vmlinuz), la partie
145 centrale d'un système d'exploitation Linux. Le noyau traite les
146 fonctions basiques d'un système d'exploitation: allocation mémoire,
147 allocation de process, entrée/sortie de peripheriques, etc.
149 %description -l pl.UTF-8
150 Pakiet zawiera jądro Linuksa niezbędne do prawidłowego działania
151 Twojego komputera. Zawiera w sobie sterowniki do sprzętu znajdującego
152 się w komputerze, takiego jak sterowniki dysków itp.
155 Summary: vmlinux - uncompressed kernel image
156 Summary(de.UTF-8): vmlinux - dekompressiertes Kernel Bild
157 Summary(pl.UTF-8): vmlinux - rozpakowany obraz jądra
159 Obsoletes: kernel-smp-vmlinux
160 Obsoletes: kernel%{_alt_kernel}-vanilla-vmlinux
163 vmlinux - uncompressed kernel image.
165 %description vmlinux -l de.UTF-8
166 vmlinux - dekompressiertes Kernel Bild.
168 %description vmlinux -l pl.UTF-8
169 vmlinux - rozpakowany obraz jądra.
172 Summary: DRM kernel modules
173 Summary(de.UTF-8): DRM Kernel Treiber
174 Summary(pl.UTF-8): Sterowniki DRM
176 Requires(postun): %{name} = %{epoch}:%{version}-%{release}
177 Requires: %{name} = %{epoch}:%{version}-%{release}
178 Obsoletes: kernel-smp-drm
179 Obsoletes: kernel%{_alt_kernel}-vanilla-drm
185 %description drm -l de.UTF-8
188 %description drm -l pl.UTF-8
192 Summary: PCMCIA modules
193 Summary(de.UTF-8): PCMCIA Module
194 Summary(pl.UTF-8): Moduły PCMCIA
196 Requires(postun): %{name} = %{epoch}:%{version}-%{release}
197 Requires: %{name} = %{epoch}:%{version}-%{release}
198 Obsoletes: kernel-smp-pcmcia
199 Obsoletes: kernel%{_alt_kernel}-vanilla-pcmcia
200 Conflicts: pcmcia-cs < 3.1.21
201 Conflicts: pcmciautils < 004
207 %description pcmcia -l de.UTF-8
210 %description pcmcia -l pl.UTF-8
214 Summary: ALSA kernel modules
215 Summary(de.UTF-8): ALSA Kernel Module
216 Summary(pl.UTF-8): Sterowniki dźwięku ALSA
218 Requires(postun): %{name} = %{epoch}:%{version}-%{release}
219 Requires: %{name} = %{epoch}:%{version}-%{release}
220 Obsoletes: kernel-smp-sound-alsa
221 Obsoletes: kernel%{_alt_kernel}-vanilla-sound-alsa
224 %description sound-alsa
225 ALSA (Advanced Linux Sound Architecture) sound drivers.
227 %description sound-alsa -l de.UTF-8
228 ALSA (Advanced Linux Sound Architecture) Sound-Treiber.
230 %description sound-alsa -l pl.UTF-8
231 Sterowniki dźwięku ALSA (Advanced Linux Sound Architecture).
234 Summary: Header files for the Linux kernel
235 Summary(de.UTF-8): Header Dateien für den Linux-Kernel
236 Summary(pl.UTF-8): Pliki nagłówkowe jądra Linuksa
237 Group: Development/Building
238 Provides: %{name}-headers(netfilter) = 20070806
239 Obsoletes: kernel%{_alt_kernel}-vanilla-headers
243 These are the C header files for the Linux kernel, which define
244 structures and constants that are needed when rebuilding the kernel or
245 building kernel modules.
247 %description headers -l de.UTF-8
248 Dies sind die C Header Dateien für den Linux-Kernel, die definierte
249 Strukturen und Konstante beinhalten, die beim rekompilieren des
250 Kernels oder bei Kernel Modul kompilationen gebraucht werden.
252 %description headers -l pl.UTF-8
253 Pakiet zawiera pliki nagłówkowe jądra, niezbędne do rekompilacji jądra
254 oraz budowania modułów jądra.
256 %package module-build
257 Summary: Development files for building kernel modules
258 Summary(de.UTF-8): Development Dateien die beim Kernel Modul kompilationen gebraucht werden
259 Summary(pl.UTF-8): Pliki służące do budowania modułów jądra
260 Group: Development/Building
261 Requires: %{name}-headers = %{epoch}:%{version}-%{release}
262 Obsoletes: kernel%{_alt_kernel}-vanilla-module-build
263 Conflicts: rpmbuild(macros) < 1.652
266 %description module-build
267 Development files from kernel source tree needed to build Linux kernel
268 modules from external packages.
270 %description module-build -l de.UTF-8
271 Development Dateien des Linux-Kernels die beim kompilieren externer
272 Kernel Module gebraucht werden.
274 %description module-build -l pl.UTF-8
275 Pliki ze drzewa źródeł jądra potrzebne do budowania modułów jądra
276 Linuksa z zewnętrznych pakietów.
279 Summary: Kernel source tree
280 Summary(de.UTF-8): Der Kernel Quelltext
281 Summary(pl.UTF-8): Kod źródłowy jądra Linuksa
282 Group: Development/Building
283 Requires: %{name}-module-build = %{epoch}:%{version}-%{release}
284 Obsoletes: kernel%{_alt_kernel}-vanilla-source
288 This is the source code for the Linux kernel. You can build a custom
289 kernel that is better tuned to your particular hardware.
291 %description source -l de.UTF-8
292 Das Kernel-Source-Paket enthält den source code (C/Assembler-Code) des
293 Linux-Kernels. Die Source-Dateien werden gebraucht, um viele
294 C-Programme zu kompilieren, da sie auf Konstanten zurückgreifen, die
295 im Kernel-Source definiert sind. Die Source-Dateien können auch
296 benutzt werden, um einen Kernel zu kompilieren, der besser auf Ihre
297 Hardware ausgerichtet ist.
299 %description source -l fr.UTF-8
300 Le package pour le kernel-source contient le code source pour le noyau
301 linux. Ces sources sont nécessaires pour compiler la plupart des
302 programmes C, car il dépend de constantes définies dans le code
303 source. Les sources peuvent être aussi utilisée pour compiler un noyau
304 personnalisé pour avoir de meilleures performances sur des matériels
307 %description source -l pl.UTF-8
308 Pakiet zawiera kod źródłowy jądra systemu.
311 Summary: Kernel documentation
312 Summary(de.UTF-8): Kernel Dokumentation
313 Summary(pl.UTF-8): Dokumentacja do jądra Linuksa
315 Obsoletes: kernel%{_alt_kernel}-vanilla-doc
319 This is the documentation for the Linux kernel, as found in
320 /usr/src/linux/Documentation directory.
322 %description doc -l de.UTF-8
323 Dies ist die Kernel Dokumentation wie sie im 'Documentation'
324 Verzeichniss vorgefunden werden kann.
326 %description doc -l pl.UTF-8
327 Pakiet zawiera dokumentację do jądra Linuksa pochodzącą z katalogu
328 /usr/src/linux/Documentation.
332 ln -s %{SOURCE2} kernel-module-build.pl
333 ln -s %{SOURCE3} Makefile
336 %if "%{postver}" != "0"
337 %{__xz} -dc %{SOURCE1} | patch -p1 -s
340 # Fix EXTRAVERSION in main Makefile
341 sed -i 's#EXTRAVERSION =.*#EXTRAVERSION = %{?alt_kernel:-%{alt_kernel}}#g' Makefile
343 # cleanup backups after patching
344 find '(' -name '*~' -o -name '*.orig' -o -name '.gitignore' ')' -print0 | xargs -0 -r -l512 rm -f
348 cat > %{targetobj}.mk <<'EOF'
349 # generated by %{name}.spec
350 KERNELSRC := %{srcdir}
351 KERNELOUTPUT := %{objdir}
353 SRCARCH := %{target_arch_dir}
354 ARCH := %{_target_base_arch}
355 Q := %{!?with_verbose:@}
356 MAKE_OPTS := %{MakeOpts}
357 DEFCONFIG := %{defconfig}
361 install -d arch/%{target_arch_dir}
363 cat %{SOURCE10} > %{defconfig}
366 cat %{SOURCE11} > %{defconfig}
368 sed -i "s:CONFIG_LOCALVERSION=\"\":CONFIG_LOCALVERSION=\"-%{localversion}\":" %{defconfig}
370 ln -sf %{defconfig} .config
374 TARGETOBJ=%{targetobj} \
375 %{?with_verbose:V=1} \
380 TARGETOBJ=%{targetobj} \
381 %{?with_verbose:V=1} \
385 rm -rf $RPM_BUILD_ROOT
386 %{__make} %{MakeOpts} -j1 %{!?with_verbose:-s} modules_install \
388 %{?with_verbose:V=1} \
390 mod_compress_cmd=true \
391 INSTALL_MOD_PATH=$RPM_BUILD_ROOT \
392 KERNELRELEASE=%{kernel_release}
394 install -d $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/misc
396 # create directories which may be missing, to simplyfy %files
397 install -d $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/kernel/{arch,sound,mm}
399 # rpm obeys filelinkto checks for ghosted symlinks, convert to files
400 rm -f $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/{build,source}
401 touch $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/{build,source}
403 # no point embed content for %ghost files. empty them
411 test -f $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/modules.$a
412 > $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/modules.$a
416 install -d $RPM_BUILD_ROOT/boot
417 cp -a %{objdir}/System.map $RPM_BUILD_ROOT/boot/System.map-%{kernel_release}
418 cp -aL %{objdir}/.config $RPM_BUILD_ROOT/boot/config-%{kernel_release}
419 cp -a %{objdir}/arch/%{target_arch_dir}/boot/bzImage $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release}
420 install -p %{objdir}/vmlinux $RPM_BUILD_ROOT/boot/vmlinux-%{kernel_release}
423 touch $RPM_BUILD_ROOT%{initrd_dir}/initramfs-%{kernel_release}.img
425 %if "%{_target_base_arch}" != "%{_host_base_arch}"
426 touch $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/modules.dep
430 install -d $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/%{kernel_release}
433 install -d $RPM_BUILD_ROOT%{_kernelsrcdir}
435 # test if we can hardlink -- %{_builddir} and $RPM_BUILD_ROOT on same partition
436 if cp -al %{srcdir}/COPYING $RPM_BUILD_ROOT/COPYING 2>/dev/null; then
438 rm -f $RPM_BUILD_ROOT/COPYING
441 cp -a$l %{srcdir}/* $RPM_BUILD_ROOT%{_kernelsrcdir}
442 cp -a %{objdir}/Module.symvers $RPM_BUILD_ROOT%{_kernelsrcdir}
443 cp -aL %{objdir}/.config $RPM_BUILD_ROOT%{_kernelsrcdir}
444 cp -a %{objdir}/include $RPM_BUILD_ROOT%{_kernelsrcdir}
445 # copy arch/x86/include/generated
446 for dir in $(cd %{objdir} && find arch -name generated -type d); do
447 cp -a %{objdir}/$dir $RPM_BUILD_ROOT%{_kernelsrcdir}/$dir
448 find $RPM_BUILD_ROOT%{_kernelsrcdir}/$dir -name '.*.cmd' -exec rm "{}" ";"
451 # version.h location changed in 3.7, but a lot of external modules don't know about it
452 # add a compatibility symlink
453 ln -s ../generated/uapi/linux/version.h $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux/version.h
455 # disable this here, causes a lot of build-time problems and our rpm-build disables it anyway
456 %{__sed} -i -e 's|\(CONSTIFY_PLUGIN.*:=.*\)|# \1|' $RPM_BUILD_ROOT%{_kernelsrcdir}/Makefile
458 # collect module-build files and directories
459 # Usage: kernel-module-build.pl $rpmdir $fileoutdir
461 cd $RPM_BUILD_ROOT%{_kernelsrcdir}
462 %{__perl} %{topdir}/kernel-module-build.pl %{_kernelsrcdir} $fileoutdir
465 for f in `find %{objdir}/scripts -type f -print | grep -v "/\.\|\.o$"` ; do
468 echo "%attr(755,root,root) %{_kernelsrcdir}/$ff" >>files.mb_include_modulebuild_and_dirs
470 echo "%{_kernelsrcdir}/$ff" >>files.mb_include_modulebuild_and_dirs
472 echo "%exclude %{_kernelsrcdir}/$ff" >>files.source_exclude_modulebuild_and_dirs
473 cp -a "$f" "$RPM_BUILD_ROOT%{_kernelsrcdir}/$ff"
477 # move to %{_docdir} so we wouldn't depend on any kernel package for dirs
478 install -d $RPM_BUILD_ROOT%{_docdir}
479 mv $RPM_BUILD_ROOT{%{_kernelsrcdir}/Documentation,%{_docdir}/%{name}-%{version}}
481 %{__rm} $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/dontdiff
482 %{__rm} $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/Makefile
483 %{__rm} $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/*/Makefile
484 %{__rm} $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/*/*/Makefile
486 %{__rm} -r $RPM_BUILD_ROOT%{_kernelsrcdir}/Documentation
490 rm -rf $RPM_BUILD_ROOT
493 if [ -x /sbin/new-kernel-pkg ]; then
494 /sbin/new-kernel-pkg --remove %{kernel_release}
498 %depmod %{kernel_release}
502 if [ -x /sbin/dracut ]; then
503 /sbin/dracut --force --quiet /boot/initramfs-%{kernel_release}.img %{kernel_release}
506 if [ -x /sbin/update-grub -a -f /etc/sysconfig/grub ]; then
507 if [ "$(. /etc/sysconfig/grub; echo ${UPDATE_GRUB:-yes})" = "yes" ]; then
508 /sbin/update-grub >/dev/null
513 %depmod %{kernel_release}
516 %depmod %{kernel_release}
519 %depmod %{kernel_release}
522 %depmod %{kernel_release}
525 %depmod %{kernel_release}
528 %depmod %{kernel_release}
531 ln -snf %{basename:%{_kernelsrcdir}} %{_prefix}/src/linux%{_alt_kernel}
534 if [ "$1" = "0" ]; then
535 if [ -L %{_prefix}/src/linux%{_alt_kernel} ]; then
536 if [ "$(readlink %{_prefix}/src/linux%{_alt_kernel})" = "linux%{_alt_kernel}-%{version}" ]; then
537 rm -f %{_prefix}/src/linux%{_alt_kernel}
542 %triggerin module-build -- %{name} = %{epoch}:%{version}-%{release}
543 ln -sfn %{_kernelsrcdir} /lib/modules/%{kernel_release}/build
544 ln -sfn %{_kernelsrcdir} /lib/modules/%{kernel_release}/source
546 %triggerun module-build -- %{name} = %{epoch}:%{version}-%{release}
547 if [ "$1" = 0 ]; then
548 rm -f /lib/modules/%{kernel_release}/{build,source}
552 %defattr(644,root,root,755)
553 /boot/vmlinuz-%{kernel_release}
554 /boot/System.map-%{kernel_release}
555 /boot/config-%{kernel_release}
556 %ghost %{initrd_dir}/initramfs-%{kernel_release}.img
558 %dir /lib/modules/%{kernel_release}
559 %dir /lib/modules/%{kernel_release}/kernel
560 /lib/modules/%{kernel_release}/kernel/arch
561 /lib/modules/%{kernel_release}/kernel/block
562 /lib/modules/%{kernel_release}/kernel/crypto
563 /lib/modules/%{kernel_release}/kernel/drivers
564 %exclude /lib/modules/%{kernel_release}/kernel/drivers/gpu
565 /lib/modules/%{kernel_release}/kernel/fs
566 /lib/modules/%{kernel_release}/kernel/kernel
567 /lib/modules/%{kernel_release}/kernel/lib
568 /lib/modules/%{kernel_release}/kernel/net
569 /lib/modules/%{kernel_release}/kernel/mm
570 %dir /lib/modules/%{kernel_release}/kernel/sound
571 /lib/modules/%{kernel_release}/kernel/sound/ac97_bus.ko*
572 /lib/modules/%{kernel_release}/kernel/sound/sound*.ko*
573 %exclude /lib/modules/%{kernel_release}/kernel/drivers/media/pci/cx88/cx88-alsa.ko*
574 %exclude /lib/modules/%{kernel_release}/kernel/drivers/media/usb/em28xx/em28xx-alsa.ko*
575 %exclude /lib/modules/%{kernel_release}/kernel/drivers/media/pci/saa7134/saa7134-alsa.ko*
576 %dir /lib/modules/%{kernel_release}/misc
577 %exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/[!p]*
578 %exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/pd6729.ko*
579 %exclude /lib/modules/%{kernel_release}/kernel/drivers/*/pcmcia
580 %exclude /lib/modules/%{kernel_release}/kernel/drivers/ata/pata_pcmcia.ko*
581 %exclude /lib/modules/%{kernel_release}/kernel/drivers/bluetooth/*_cs.ko*
582 %exclude /lib/modules/%{kernel_release}/kernel/drivers/ide/ide-cs.ko*
583 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/*_cs.ko*
584 %exclude /lib/modules/%{kernel_release}/kernel/drivers/parport/parport_cs.ko*
585 %exclude /lib/modules/%{kernel_release}/kernel/drivers/tty/serial/8250/serial_cs.ko*
586 %exclude /lib/modules/%{kernel_release}/kernel/drivers/usb/host/sl811_cs.ko*
587 /lib/modules/%{kernel_release}/kernel/security
588 /lib/modules/%{kernel_release}/kernel/virt
590 %dir %{_sysconfdir}/modprobe.d/%{kernel_release}
593 /lib/modules/%{kernel_release}/modules.order
594 /lib/modules/%{kernel_release}/modules.builtin*
596 # rest modules.* are ghost (regenerated by post depmod -a invocation)
597 %ghost /lib/modules/%{kernel_release}/modules.alias
598 %ghost /lib/modules/%{kernel_release}/modules.alias.bin
599 %ghost /lib/modules/%{kernel_release}/modules.dep
600 %ghost /lib/modules/%{kernel_release}/modules.dep.bin
601 %ghost /lib/modules/%{kernel_release}/modules.devname
602 %ghost /lib/modules/%{kernel_release}/modules.softdep
603 %ghost /lib/modules/%{kernel_release}/modules.symbols
604 %ghost /lib/modules/%{kernel_release}/modules.symbols.bin
606 # symlinks pointing to kernelsrcdir
607 %ghost /lib/modules/%{kernel_release}/build
608 %ghost /lib/modules/%{kernel_release}/source
611 %defattr(644,root,root,755)
612 /boot/vmlinux-%{kernel_release}
615 %defattr(644,root,root,755)
616 /lib/modules/%{kernel_release}/kernel/drivers/gpu
619 %defattr(644,root,root,755)
620 /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/*ko*
621 /lib/modules/%{kernel_release}/kernel/drivers/*/pcmcia
622 %exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/pcmcia*ko*
623 /lib/modules/%{kernel_release}/kernel/drivers/bluetooth/*_cs.ko*
624 /lib/modules/%{kernel_release}/kernel/drivers/ata/pata_pcmcia.ko*
625 /lib/modules/%{kernel_release}/kernel/drivers/ide/ide-cs.ko*
626 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/*_cs.ko*
627 /lib/modules/%{kernel_release}/kernel/drivers/parport/parport_cs.ko*
628 /lib/modules/%{kernel_release}/kernel/drivers/tty/serial/8250/serial_cs.ko*
629 /lib/modules/%{kernel_release}/kernel/drivers/usb/host/sl811_cs.ko*
632 %defattr(644,root,root,755)
633 /lib/modules/%{kernel_release}/kernel/sound
634 %exclude %dir /lib/modules/%{kernel_release}/kernel/sound
635 %exclude /lib/modules/%{kernel_release}/kernel/sound/ac97_bus.ko*
636 %exclude /lib/modules/%{kernel_release}/kernel/sound/sound*.ko*
637 /lib/modules/%{kernel_release}/kernel/drivers/media/pci/cx88/cx88-alsa.ko*
638 /lib/modules/%{kernel_release}/kernel/drivers/media/usb/em28xx/em28xx-alsa.ko*
639 /lib/modules/%{kernel_release}/kernel/drivers/media/pci/saa7134/saa7134-alsa.ko*
641 %files headers -f files.headers_exclude_kbuild
642 %defattr(644,root,root,755)
643 %dir %{_kernelsrcdir}
644 %{_kernelsrcdir}/include
645 %dir %{_kernelsrcdir}/arch
646 %dir %{_kernelsrcdir}/arch/[!K]*
647 %{_kernelsrcdir}/arch/*/include
648 %dir %{_kernelsrcdir}/security
649 %dir %{_kernelsrcdir}/security/selinux
650 %{_kernelsrcdir}/security/selinux/include
651 %dir %{_kernelsrcdir}/usr
652 %dir %{_kernelsrcdir}/usr/include
653 %{_kernelsrcdir}/.config
654 %{_kernelsrcdir}/Module.symvers
656 %files module-build -f files.mb_include_modulebuild_and_dirs
657 %defattr(644,root,root,755)
658 %exclude %dir %{_kernelsrcdir}/arch/um
659 %{_kernelsrcdir}/arch/*/kernel/asm-offsets*
660 %{_kernelsrcdir}/arch/*/kernel/sigframe*.h
661 %{_kernelsrcdir}/drivers/media/pci/bt8xx/bttv.h
662 %{_kernelsrcdir}/kernel/bounds.c
663 %{_kernelsrcdir}/scripts/basic/*.c
664 %attr(755,root,root) %{_kernelsrcdir}/scripts/kconfig/*.sh
665 %{_kernelsrcdir}/scripts/kconfig/*.pl
666 %{_kernelsrcdir}/scripts/kconfig/*.glade
667 %{_kernelsrcdir}/scripts/kconfig/*.cc
668 %{_kernelsrcdir}/scripts/kconfig/*.y
669 %{_kernelsrcdir}/scripts/kconfig/*.l
670 %{_kernelsrcdir}/scripts/kconfig/[c-k]*.c
671 %{_kernelsrcdir}/scripts/kconfig/[c-k]*.h
672 %{_kernelsrcdir}/scripts/kconfig/l*.h
673 %{_kernelsrcdir}/scripts/kconfig/[m-o]*.c
674 %{_kernelsrcdir}/scripts/kconfig/[m-o]*.h
675 %{_kernelsrcdir}/scripts/kconfig/preprocess.c
676 %{_kernelsrcdir}/scripts/kconfig/[q-u]*.c
677 %{_kernelsrcdir}/scripts/kconfig/[q-u]*.h
678 %{_kernelsrcdir}/scripts/kconfig/lxdialog
679 %{_kernelsrcdir}/scripts/mod/*.c
680 %{_kernelsrcdir}/scripts/mod/modpost.h
681 %attr(755,root,root) %{_kernelsrcdir}/scripts/mkcompile_h
682 %{_kernelsrcdir}/scripts/mkmakefile
683 %{_kernelsrcdir}/scripts/module-common.lds
684 %attr(755,root,root) %{_kernelsrcdir}/scripts/setlocalversion
685 %{_kernelsrcdir}/scripts/subarch.include
686 %{_kernelsrcdir}/scripts/*.c
687 %{_kernelsrcdir}/scripts/*.h
688 %attr(755,root,root) %{_kernelsrcdir}/scripts/*.sh
689 %{_kernelsrcdir}/scripts/selinux/genheaders/*.c
690 %{_kernelsrcdir}/scripts/selinux/mdp/*.c
691 %exclude %dir %{_kernelsrcdir}/security
692 %exclude %dir %{_kernelsrcdir}/security/selinux
696 %defattr(644,root,root,755)
697 %dir %{_docdir}/%{name}-%{version}
699 %{_docdir}/%{name}-%{version}/[!jkz]*
700 %{_docdir}/%{name}-%{version}/[jkz]*.txt
701 %{_docdir}/%{name}-%{version}/kbuild
702 %{_docdir}/%{name}-%{version}/kernel-hacking
706 %files source -f files.source_exclude_modulebuild_and_dirs
707 %defattr(644,root,root,755)
708 %{_kernelsrcdir}/arch/*/[!Mik]*
709 %{_kernelsrcdir}/arch/*/kernel/[!M]*
710 %{_kernelsrcdir}/arch/ia64/install.sh
711 %{_kernelsrcdir}/arch/m68k/ifpsp060/[!M]*
712 %{_kernelsrcdir}/arch/m68k/ifpsp060/MISC
713 %{_kernelsrcdir}/arch/m68k/install.sh
714 %{_kernelsrcdir}/arch/parisc/install.sh
715 %{_kernelsrcdir}/arch/x86/ia32/[!M]*
716 %{_kernelsrcdir}/arch/arm/kvm
717 %{_kernelsrcdir}/arch/arm64/kvm
718 %{_kernelsrcdir}/arch/mips/kvm
719 %{_kernelsrcdir}/arch/powerpc/kvm
720 %{_kernelsrcdir}/arch/s390/kvm
721 %{_kernelsrcdir}/arch/x86/kvm
722 %exclude %{_kernelsrcdir}/arch/*/kernel/asm-offsets*
723 %exclude %{_kernelsrcdir}/arch/*/kernel/sigframe*.h
724 %exclude %{_kernelsrcdir}/drivers/media/pci/bt8xx/bttv.h
725 %{_kernelsrcdir}/block
726 %{_kernelsrcdir}/certs
727 %{_kernelsrcdir}/crypto
728 %{_kernelsrcdir}/drivers
730 %{_kernelsrcdir}/init
732 %{_kernelsrcdir}/kernel
733 %exclude %{_kernelsrcdir}/kernel/bounds.c
737 %{_kernelsrcdir}/virt
738 %{_kernelsrcdir}/samples
739 %{_kernelsrcdir}/scripts/*
740 %exclude %{_kernelsrcdir}/scripts/Kbuild.include
741 %exclude %{_kernelsrcdir}/scripts/Makefile*
742 %exclude %{_kernelsrcdir}/scripts/basic
743 %exclude %{_kernelsrcdir}/scripts/kconfig
744 %exclude %{_kernelsrcdir}/scripts/mkcompile_h
745 %exclude %{_kernelsrcdir}/scripts/mkmakefile
746 %exclude %{_kernelsrcdir}/scripts/mod
747 %exclude %{_kernelsrcdir}/scripts/module-common.lds
748 %exclude %{_kernelsrcdir}/scripts/setlocalversion
749 %exclude %{_kernelsrcdir}/scripts/*.c
750 %exclude %{_kernelsrcdir}/scripts/*.h
751 %exclude %{_kernelsrcdir}/scripts/*.sh
752 %exclude %dir %{_kernelsrcdir}/scripts/selinux
753 %exclude %{_kernelsrcdir}/scripts/selinux/Makefile
754 %exclude %dir %{_kernelsrcdir}/scripts/selinux/genheaders
755 %exclude %{_kernelsrcdir}/scripts/selinux/genheaders/Makefile
756 %exclude %{_kernelsrcdir}/scripts/selinux/genheaders/*.c
757 %exclude %dir %{_kernelsrcdir}/scripts/selinux/mdp
758 %exclude %{_kernelsrcdir}/scripts/selinux/mdp/Makefile
759 %exclude %{_kernelsrcdir}/scripts/selinux/mdp/*.c
760 %{_kernelsrcdir}/sound
761 %{_kernelsrcdir}/security
762 %exclude %{_kernelsrcdir}/security/selinux/include
763 %{_kernelsrcdir}/tools/*
765 %{_kernelsrcdir}/COPYING
766 %{_kernelsrcdir}/CREDITS
767 %{_kernelsrcdir}/LICENSES
768 %{_kernelsrcdir}/MAINTAINERS
769 %{_kernelsrcdir}/README