/[packages]/backports/8/kernel/current/SPECS/kernel.spec
ViewVC logotype

Contents of /backports/8/kernel/current/SPECS/kernel.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1903761 - (show annotations) (download)
Sat Nov 5 11:47:54 2022 UTC (16 months, 3 weeks ago) by tmb
File size: 53529 byte(s)
update to 6.0.7
1 # -*- Mode: rpm-spec -*-
2 #
3 # This Specfile is based on kernel-tmb spec done by
4 # Thomas Backlund <tmb@mandriva.org>
5 #
6 # The mkflavour() macroization done by Anssi Hannula <anssi@mandriva.org>
7 #
8 # ----------------------------------------------------------------------------
9 # Consult this page for extra docs:
10 #
11 # https://wiki.mageia.org/en/Kernel_update_workflow
12 #
13 # (feel free to adjust the wiki-page when adding or removing features
14 # to the spec file).
15 #
16 # After building a new kernel, remember to push:
17 #
18 # kmod-virtualbox
19 # kmod-vboxadditions
20 # kmod-xtables-addons
21 # drakx-installer-images (both core and nonfree)
22 # ----------------------------------------------------------------------------
23 #
24 # Aarch64 still has problems with multithreaded rpmbuild 4.15-rc
25 %if 0%{?mageia} >= 8
26 %ifarch aarch64
27 %global _smp_nthreads_max 1
28 %endif
29 %endif
30
31 #
32 # Mageia kernels use kernel.org versioning
33 #
34 %define kernelversion 6
35 # WARNING: when patchlevel is bumped, please update drakx/kernel/list_modules.pm for new modules!!!
36 %define patchlevel 0
37 # sublevel is now used for -stable patches
38 %define sublevel 7
39
40 # Package release
41 %define mgarel 1
42
43 # kernel Makefile extraversion is substituted by
44 # rcX which are either 0 (empty), X (as in rcX)
45 %define rcX 0
46
47 # kernel base name (also name of srpm)
48 %define kname kernel
49
50 # Patch tarball tag
51 %define ktag mga
52
53 %define rpmtag %{distsuffix}%{mgaver}
54 %if %{rcX}
55 %define rpmrel %mkrel 0.rc%{rcX}.%{mgarel}
56 %else
57 %define rpmrel %mkrel %{mgarel}
58 %endif
59
60 # fakerel and fakever never change, they are used to fool
61 # rpm/urpmi/smart and ensure the kernels are installed,
62 # not upgraded so old kernel is not overwritten or removed
63 %define fakever 1
64 %define fakerel %mkrel 1
65
66 # version defines
67 %define kversion %{kernelversion}.%{patchlevel}.%{sublevel}
68 %define kverrel %{kversion}-%{rpmrel}
69
70 # When we are using a rcX patch, the tarball is a sublevel -1
71 %if %{rcX}
72 %if %sublevel
73 %define tar_ver %{kernelversion}.%{patchlevel}
74 %else
75 %define tar_ver %{kernelversion}.%(expr %{patchlevel} - 1)
76 %endif
77 %else
78 %define tar_ver %{kernelversion}.%{patchlevel}
79 %endif
80
81 # Used for not making too long names for rpms or search paths
82 %if %rcX
83 %define buildrpmrel 0.rc%{rcX}.%{mgarel}%{rpmtag}
84 %else
85 %define buildrpmrel %{mgarel}%{rpmtag}
86 %endif
87 %define buildrel %{kversion}-%{buildrpmrel}
88
89 # libbpf major
90 %define bpfmajor 1
91
92 # Having different top level names for packges means that you have to remove
93 # them by hard :(
94 %define top_dir_name %{kname}-%{_arch}
95
96 %define build_dir ${RPM_BUILD_DIR}/%{top_dir_name}
97 %define src_dir %{build_dir}/linux-%{tar_ver}
98
99 # Disable useless debug rpms...
100 %global _enable_debug_packages %{nil}
101 %global debug_package %{nil}
102 %global __debug_package %{nil}
103 %global __debug_install_post %{nil}
104 %global _build_id_links none
105
106 # no bytecompiling wanted as it breaks build on selftests we dont even ship
107 # for older buildsystems
108 %global _python_bytecompile_build 0
109 # for systems with >= rpm-mageia-setup-2.29-1.mga7
110 %global __brp_python_bytecompile %nil
111
112 # Build defines
113 %define build_doc 1
114 %define build_uheaders 1
115 %define build_source 1
116 %define build_devel 1
117
118 %define build_debug 0
119
120 # Build desktop i586 / 4GB
121 %ifarch %{ix86}
122 %define build_desktop586 1
123 %endif
124
125 # Build desktop (i686 / 64GB) / x86_64 / arm / aarch64
126 %define build_desktop 1
127
128 # Build server (i686 / 64GB)/x86_64 / aarch64
129 %ifnarch %{arm}
130 %define build_server 1
131 %else
132 %define build_server 0
133 %endif
134
135 # build cpupower
136 %ifnarch %{arm} aarch64
137 %define build_cpupower 1
138 %else
139 %define build_cpupower 0
140 %endif
141
142 # build perf
143 %define build_perf 1
144
145 # bpf
146 %define build_bpftool 1
147 %define build_libbpf 1
148
149 # compress modules with xz
150 %ifnarch %{arm}
151 %define build_modxz 1
152 %else
153 %define build_modxz 0
154 %endif
155 # End of user definitions
156
157 # buildtime override flags
158 %{?_without_desktop586: %global build_desktop586 0}
159 %{?_without_desktop: %global build_desktop 0}
160 %{?_without_server: %global build_server 0}
161 %{?_without_doc: %global build_doc 0}
162 %{?_without_uheaders: %global build_uheaders 0}
163 %{?_without_source: %global build_source 0}
164 %{?_without_devel: %global build_devel 0}
165 %{?_without_debug: %global build_debug 0}
166 %{?_without_perf: %global build_perf 0}
167 %{?_without_cpupower: %global build_cpupower 0}
168 %{?_without_bpftool: %global build_bpftool 0}
169 %{?_without_libbpf: %global build_libbpf 0}
170 %{?_without_modxz: %global build_modxz 0}
171
172 %{?_with_desktop586: %global build_desktop586 1}
173 %{?_with_desktop: %global build_desktop 1}
174 %{?_with_server: %global build_server 1}
175 %{?_with_doc: %global build_doc 1}
176 %{?_with_uheaders: %global build_uheaders 1}
177 %{?_with_source: %global build_source 1}
178 %{?_with_devel: %global build_devel 1}
179 %{?_with_debug: %global build_debug 1}
180 %{?_with_perf: %global build_perf 1}
181 %{?_with_cpupower: %global build_cpupower 1}
182 %{?_with_bpftool: %global build_bpftool 1}
183 %{?_with_libbpf: %global build_libbpf 1}
184 %{?_with_modxz: %global build_modxz 1}
185
186 # For the .nosrc.rpm
187 %define build_nosrc 0
188 %{?_with_nosrc: %global build_nosrc 1}
189
190 %if %(if [ -z "$CC" ] ; then echo 0; else echo 1; fi)
191 %define kmake %make_build CC="$CC"
192 %else
193 %define kmake %make_build
194 %endif
195 # there are places where parallel make don't work
196 %define smake make
197
198 # Parallelize xargs invocations on smp machines
199 %define kxargs xargs %([ -z "$RPM_BUILD_NCPUS" ] \\\
200 && RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"; \\\
201 [ "$RPM_BUILD_NCPUS" -gt 1 ] && echo "-P $RPM_BUILD_NCPUS")
202
203 # arm(64) arch matching
204 %define target_arch %(echo %{_arch} | sed -e 's/arm.*/arm/' -e 's/aarch64/arm64/')
205
206
207 #
208 # SRC RPM description
209 #
210 Summary: Linux kernel built for Mageia
211 Name: %{kname}
212 Version: %{kversion}
213 Release: %{rpmrel}
214 License: GPLv2
215 Group: System/Kernel and hardware
216 ExclusiveArch: %{ix86} x86_64 %{arm} aarch64
217 ExclusiveOS: Linux
218 URL: https://www.kernel.org/
219
220 ####################################################################
221 #
222 # Sources
223 #
224 ### This is for full SRC RPM
225 Source0: https://cdn.kernel.org/pub/linux/kernel/v%{kernelversion}.x/linux-%{tar_ver}.tar.xz
226 Source1: https://cdn.kernel.org/pub/linux/kernel/v%{kernelversion}.x/linux-%{tar_ver}.tar.sign
227 ### This is for stripped SRC RPM
228 %if %build_nosrc
229 NoSource: 0
230 %endif
231 # This is for disabling *config, mrproper, prepare, scripts on -devel rpms
232 Source2: disable-mrproper-in-devel-rpms.patch
233
234 Source4: README.kernel-sources
235
236 # for creating stable queue patchlist
237 Source5: generate-patchlist.sh
238
239 # copy to patched source tree along with the defconfigs and run it
240 Source10: defconfig-updater.sh
241 Source09: defconfig-updater-simple.sh
242 # x86_64 defconfigs
243 Source11: defconfig-x86_64-desktop
244 Source12: defconfig-x86_64-server
245 # i386 defconfigs
246 Source13: defconfig-i386-desktop586
247 Source14: defconfig-i386-desktop
248 Source15: defconfig-i386-server
249 # arm64 defconfigs
250 Source16: defconfig-arm64-desktop
251 Source17: defconfig-arm64-server
252 # arm defconfigs
253 Source18: defconfig-arm-desktop
254
255 # config and systemd service file from fedora
256 Source50: cpupower.service
257 Source51: cpupower.config
258
259 ####################################################################
260 #
261 # Patches
262
263 #
264 # Patch0 to Patch10 are for core kernel upgrades.
265 #
266
267 %if %sublevel
268 Patch1: https://cdn.kernel.org/pub/linux/kernel/v%{kernelversion}.x/patch-%{kernelversion}.%{patchlevel}.%{sublevel}.xz
269 %endif
270 %if %{rcX}
271 # (tmb) Created with:
272 # wget https://git.kernel.org/torvalds/p/v5.10-rc7/v5.9 -O patch-5.10-rc7
273 # xz -6e patch-5.10-rc7
274 Patch2: patch-%{kernelversion}.%{patchlevel}-rc%{rcX}.xz
275 %endif
276
277 ###
278 ### Stable Queue can be big
279 ### Patches from 100-999
280 ###
281 ### add patches here by copying contents of kernel matching queue-x.y from:
282 ### https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git/tree/
283 ### to SOURCES, generate patchlist with generate-patchlist.sh and paste it here
284 ###
285
286 ###
287 ### Arch
288 ### Patches from 1000
289 ###
290
291 # laptop needing pci=assign-busses (#18989, needs to be submitted upstream)
292 Patch1000: x86-pci-toshiba-equium-a60-assign-busses.patch
293
294 # If users choose a bad video mode, allow to jump to
295 # a working one (TTL: forever)
296 Patch1001: x86-boot-video-80x25-if-break.patch
297
298 # Allow poweroff on UP machines running SMP kernels
299 Patch1005: x86-default_poweroff_up_machines.patch
300
301 # raise vmalloc to fix https://bugs.mageia.org/show_bug.cgi?id=904
302 Patch1010: x86-increase-default-minimum-vmalloc-area-by-64MB-to-192MB.patch
303
304 # slows down boot
305 Patch1015: Revert-cpufreq-pcc-Enable-autoload-of-pcc-cpufreq-fo.patch
306
307 # perf rapl ids
308 Patch1020: perf-x86-rapl-Add-support-for-Intel-AlderLake-N.patch
309 Patch1021: perf-x86-rapl-Add-support-for-Intel-Raptor-Lake.patch
310
311 ###
312 ### ACPI
313 ###
314
315 # CLEVO M360S acpi irq workaround
316 Patch1100: acpi-CLEVO-M360S-disable_acpi_irq.patch
317
318 # Clevo M720SR freezes with C3
319 Patch1105: acpi-processor-M720SR-limit-to-C2.patch
320
321 # ACPI PM fixes (TTL: 5.18)
322 Patch1130: x86-ACPI-State-Optimize-C3-entry-on-AMD-CPUs.patch
323
324 ###
325 ### Block
326 ###
327
328 # FIXME: Don't know know why this is needed
329 Patch1200: scsi-megaraid-new-sysfs-name.patch
330
331 # adds aliases to support upgrade from old dm-raid45 patch
332 Patch1215: dm-raid-aliases.patch
333
334 # disable floppy autoloading (mga #4696)
335 Patch1220: block-floppy-disable-pnp-modalias.patch
336
337 ###
338 ### bpf
339 ###
340
341 ###
342 ### Crypto
343 ###
344
345 ###
346 ### dma
347 ###
348
349 ###
350 ### File-system
351 ###
352
353 ###
354 ### FireWire
355 ###
356
357 # adding module aliases to ease upgrade from ieee1394
358 Patch1400: firewire-ieee1394-module-aliases.patch
359
360 ###
361 ### Firmware
362 ###
363
364 ###
365 ### GPU/DRM
366 ###
367
368 # mga compat option
369 Patch1500: drm-gpu-drm-treat-nokmsboot-as-nomodeset.patch
370
371 # amdgpu
372 # switch SI and CIK from radeon to amdgpu
373 Patch1520: drm-amdgpu-SI-and-CIK-enabled-by-default.patch
374
375 # new Q57 Host Bridge id
376 Patch1530: char-agp-intel-new-Q57-id.patch
377
378 # i915
379 # TGL
380 Patch1546: drm-i915-psr-Disable-PSR2-selective-fetch-for-all-TGL-steps.patch
381
382 # https://bugzilla.kernel.org/show_bug.cgi?id=206653#c19
383 Patch1552: i2c_nvidia_gpu-change-err-into-info.patch
384
385 ###
386 ### gpio
387 ###
388
389 ###
390 ### hwmon
391 ###
392
393 ###
394 ### i2c
395 ###
396
397 ###
398 ### io_uring
399 ###
400
401 ###
402 ### iommu
403 ###
404
405 ###
406 ### Input
407 ###
408
409 ###
410 ### HID
411 ###
412
413 ###
414 ### kernel
415 ###
416
417 ###
418 ### MFD
419 ###
420
421 ###
422 ### MM
423 ###
424
425 ###
426 ### Network
427 ###
428
429 # SiS 190 fixes
430 Patch1900: net-sis190-fix-list-usage.patch
431
432 # netfilter IFWLOG support
433 Patch1910: net-netfilter-IFWLOG.patch
434 Patch1911: net-netfilter-IFWLOG-mdv.patch
435 Patch1912: net-netfilter-IFWLOG-2.6.35-buildfix.patch
436 Patch1913: net-netfilter-IFWLOG-2.6.37-buildfix.patch
437 Patch1914: net-ipv4-netfilter-ipt_IFWLOG-3.6-buildfix.patch
438 Patch1915: net-netfilter-IFWLOG-3.7-buildfix.patch
439 Patch1916: net-netfilter-IFWLOG-remove-unused-label.patch
440 Patch1917: net-netfilter-ipt_IFWLOG-4.12-buildfix.patch
441 Patch1918: net-netfilter-IFWLOG-5.0-buildfix.patch
442
443 # netfilter psd support
444 Patch1920: net-netfilter-psd.patch
445 Patch1921: net-netfilter-psd-mdv.patch
446 Patch1922: net-netfilter-psd-2.6.35-buildfix.patch
447 Patch1923: net-netfilter-psd-fix-redefines.patch
448
449 # rtw88 wifi
450 # add alias for the replaced r8822be staging driver
451 Patch1930: net-wireless-rtw88-add-r8822be-alias.patch
452 # add alias for the replaced 8723de 3rdparty driver
453 Patch1931: net-wireless-rtw88-add-8723de-alias.patch
454
455 # iwlfiwi
456 Patch1980: net-wireless-iwlwifi-add-new-pci-id-for-6235.patch
457
458 ###
459 ### PCI
460 ###
461
462 ###
463 ### pinctrl
464 ###
465
466 ###
467 ### Platform
468 ###
469
470 # Allow access to Shuttle WMI interface controls
471 # (Mainly allow turning on/off webcam and wireless on Shuttle DA18IE and DA18IM)
472 Patch2050: platform-x86-add-shuttle-wmi-driver.patch
473 Patch2051: platform-x86-shuttle-wmi-drop-devinit-exit.patch
474 Patch2052: platform-x86-shuttle-wmi-4.2-buildfix.patch
475 Patch2053: platform-x86-shuttle-wmi-4.13-buildfix.patch
476 Patch2054: platform-x86-shuttle-wmi-kernel-5.5.patch
477
478 #
479 Patch2060: platform-x86-intel-pmc-core-Add-Raptor-Lake-support-.patch
480
481 ###
482 ### PM
483 ###
484
485 ###
486 ### Sound
487 ###
488
489 ###
490 ### SPI
491 ###
492
493 ###
494 ### Staging
495 ###
496
497 ###
498 ### Thermal
499 ###
500
501 ###
502 ### Thunderbolt
503 ###
504
505 ###
506 ### USB
507 ###
508
509 Patch2300: hid-usbhid-IBM-BladeCenterHS20-quirk.patch
510
511 Patch2310: usb-storage-unusual_devs-add-id.patch
512 Patch2311: usb-storage-unusual_devs-add-id-2.6.37-buildfix.patch
513
514 ###
515 ### V4L
516 ###
517
518 # pwc driver name in /proc/bus/devices, /sys fix and "advertisement" removal
519 Patch2400: media-usb-pwc-lie-in-proc-usb-devices.patch
520
521 ###
522 ### Video
523 ###
524
525 # Mageia framebuffer boot logo
526 Patch2500: video-mageia-logo.patch
527
528 ###
529 ### Virt
530 ###
531
532 # fix gcc-10 build
533 Patch2550: KVM-squelch-uninitialized-variable-warning.patch
534
535 ###
536 ### Tools
537 ###
538
539 # wipe powerpc refrence so we can nuke dangling symlinks (mga#17676)
540 Patch2600: tools-testing-selftest-Makefile-remove-powerpc-reference.patch
541
542 # fix perf build
543 Patch2605: tools-perf-ui-include-slang.patch
544
545 ###
546 ### UAPI
547 ###
548
549 Patch2700: uapi-avoid-namespace-conflict-in-linux-posix_types.h.patch
550
551 ###
552 ### 3rdparty
553 ###
554
555 Patch3000: 3rd-3rdparty-tree.patch
556 Patch3001: 3rd-3rdparty-merge.patch
557
558 # add rtl8812 support (mga#21043)
559 # from https://github.com/aircrack-ng/rtl8812au.git
560 Patch3200: 3rd-rtl8812au.patch
561 Patch3201: 3rd-rtl8812au-Kconfig-Makefile.patch
562 Patch3202: 3rd-rtl8812au-rename.patch
563 Patch3203: 3rd-rtl8812au-kernel-5.17.patch
564 Patch3204: 3rd-rtl8812au-kernel-5.18.patch
565 Patch3205: 3rd-rtl8812au-kernel-5.19.2.patch
566 Patch3206: 3rd-rtl8812au-kernel-6.0.patch
567
568 # add rtl8723de support (mga#22559)
569 Patch3300: 3rd-rtl8723de.patch
570 Patch3301: 3rd-rtl8723de-Kconfig-Makefile.patch
571 Patch3302: 3rd-rtl8723de-fix-redefine.patch
572 Patch3303: 3rd-rtl8723de-nodebug.patch
573 Patch3304: 3rd-rtl8223de-kernel-5.6.patch
574 Patch3305: 3rd-rtl8723de-add-kernel-5.8-support.patch
575
576 # viahss
577 Patch3400: 3rd-viahss-0.92.patch
578 Patch3401: 3rd-viahss-config.patch
579 Patch3402: 3rd-viahss-module-license.patch
580 Patch3403: 3rd-viahss-2.6.35-buildfix.patch
581 Patch3404: 3rd-viahss-3.0-buildfix.patch
582 Patch3405: 3rd-viahss-Kconfig-Makefile.patch
583
584 # fix Kconfig files for 3rdparty:
585 Patch3900: 3rd-fix-kconfig.patch
586
587 ###
588 ### Python fixes
589 ###
590 Patch4000: linux-6.0-python3.patch
591
592 ###
593 ### TTY
594 ###
595
596 # broken rtla cleaner
597 Patch6000: hack-broken-rtla-cleaner.patch
598
599
600 ### Fixes from FC kernel
601 # Inspur Advantech PCI ids
602 Patch7000: 0001-scsi-smartpqi-add-inspur-advantech-ids.patch
603 # Vulcan AHCI PCI bar (aarch64)
604 Patch7001: 0001-Vulcan-AHCI-PCI-bar-fix-for-Broadcom-Vulcan-early-si.patch
605
606 #END
607 ####################################################################
608
609 # Defines for the things that are needed for all the kernels
610 #
611 %define common_desc_kernel The kernel package contains the Linux kernel (vmlinuz), the core of your \
612 Mageia operating system. The kernel handles the basic functions \
613 of the operating system: memory allocation, process allocation, device \
614 input and output, etc.
615
616 %define common_desc_kernel_smp This kernel relies on in-kernel smp alternatives to switch between up & smp \
617 mode depending on detected hardware. To force the kernel to boot in single \
618 processor mode, use the "nosmp" boot parameter.
619
620 ### Global Requires/Provides
621 %define requires1 bootloader-utils >= 1.16-1
622 %define requires2 dracut >= 046-2
623 %define requires3 kmod >= 12-2
624 %define requires4 sysfsutils >= 2.1.0-16
625 %define requires5 kernel-firmware >= 20190603-1
626 # ldetect-lst with SI/CIK swich from radeon to amdgpu
627 %define requires6 ldetect-lst >= 0.6.25-1
628
629 %define kprovides1 %{kname} = %{kverrel}
630 %define kprovides2 kernel = %{tar_ver}
631 %define kprovides3 alsa = 1.0.26
632 %define kprovides_server drbd-api = 88
633
634 # conflict dkms packages that dont support kernel-5.19
635 %define kconflicts1 dkms-broadcom-wl < 6.30.223.271-64
636 %define kconflicts2 dkms-nvidia-current < 470.141.03-1
637 %define kconflicts3 dkms-nvidia470 < 470.141.03-1
638 %define kconflicts4 dkms-nvidia390 < 390.154-1
639 %define kconflicts5 dkms-virtualbox < 6.1.36-1
640 %define kconflicts6 dkms-xtables-addons < 3.21-1
641 # (tmb) conflict older btrfs-progs to get the new in same transaction and in initrd
642 %define kconflicts8 btrfs-progs < 5.10-1
643 # (tmb) conflict too old radeon-firmware to get the uvd firmwares in initrd
644 %define kconflicts9 radeon-firmware < 20201218-1
645 # (tmb) conflict old firmware to get the firmwares in initrd
646 %define kconflicts10 kernel-firmware-nonfree < 20201230-1
647 # (tmb) conflict old microcode to get updated ones in initrd for early loading
648 %define kconflicts11 microcode < 0.20201118-2
649 # (tmb) conflict old theme to get mga8 theme in initrd
650 %define kconflicts12 mageia-gfxboot-theme < 4.5.14.11-2
651 # (tmb) conflict too old grub2(-efi)
652 %define kconflicts13 grub2 < 2.02.0-15
653 %define kconflicts14 grub2-efi < 2.02.0-15
654 # (tmb) conflict too old efibootmgr
655 %define kconflicts15 efibootmgr < 16-3
656 # (tmb) force new theme in initrd
657 %define kconflicts16 mageia-theme < 8.0-2
658
659 Autoreqprov: no
660
661 # require new gcc & binutils
662 BuildRequires: gcc >= 10.4.0-2
663 BuildRequires: binutils >= 1:2.36.1-1.4
664 #
665 BuildRequires: kmod >= 12-2
666 BuildRequires: bc
667 # for crypto stuff
668 BuildRequires: pkgconfig(openssl)
669 # since 4.16
670 BuildRequires: bison
671 BuildRequires: diffutils
672 BuildRequires: elfutils-devel
673 BuildRequires: flex
674 # for headers_install
675 BuildRequires: rsync
676 # for cpupower
677 %if %{build_cpupower}
678 BuildRequires: pkgconfig(libpci)
679 %endif
680 # for perf
681 %if %{build_perf}
682 BuildRequires: audit-devel
683 BuildRequires: binutils-devel
684 BuildRequires: gtk2-devel
685 BuildRequires: libunwind-devel
686 BuildRequires: newt-devel
687 BuildRequires: python3-devel
688 BuildRequires: zlib-devel
689 BuildRequires: asciidoc
690 BuildRequires: xmlto-notex
691 BuildRequires: perl-devel
692 %if 0%{?mageia} >= 8
693 BuildRequires: systemtap-sdt-devel
694 BuildRequires: babeltrace-devel
695 %else
696 BuildRequires: libbabeltrace-devel
697 %endif
698 %ifarch %{ix86} x86_64
699 BuildRequires: numa-devel
700 %endif
701 %endif
702 %if %{build_bpftool}
703 BuildRequires: python3-docutils
704 BuildRequires: cap-devel
705 %endif
706
707 %description
708 %common_desc_kernel
709 %ifnarch %{arm}
710 %common_desc_kernel_smp
711 %endif
712
713 # mkflavour() name flavour processor
714 # name: the flavour name in the package name
715 # flavour: first parameter of CreateKernel()
716 %define mkflavour() \
717 %package -n %{kname}-%{1}-%{buildrel} \
718 Version: %{fakever} \
719 Release: %{fakerel} \
720 Provides: %kprovides1 %kprovides2 %kprovides3 \
721 %{expand:%%{?kprovides_%{1}:Provides: %{kprovides_%{1}}}} \
722 Provides: %{kname}-%{1} \
723 Requires(pre): %requires1 %requires2 %requires3 %requires4 \
724 Requires: %requires2 %requires5 %requires6 \
725 Conflicts: %kconflicts1 %kconflicts2 %kconflicts3 \
726 Conflicts: %kconflicts4 %kconflicts5 %kconflicts6 \
727 Conflicts: %kconflicts8 %kconflicts9 \
728 Conflicts: %kconflicts10 %kconflicts11 %kconflicts12 \
729 Conflicts: %kconflicts13 %kconflicts14 %kconflicts15 \
730 Conflicts: %kconflicts16 \
731 %if 0%{?mageia} >= 8 \
732 Obsoletes: crda \
733 Obsoletes: crda-devel \
734 Obsoletes: fuse-exfat \
735 %endif \
736 Provides: should-restart = system \
737 Provides: installonlypkg(kernel) \
738 Recommends: iw cpupower microcode \
739 Recommends: %{kname}-%{1}-latest \
740 %ifarch %{ix86} \
741 Conflicts: arch(x86_64) \
742 %endif \
743 Summary: %{expand:%{summary_%(echo %{1} | sed -e "s/-/_/")}} \
744 Group: System/Kernel and hardware \
745 %description -n %{kname}-%{1}-%{buildrel} \
746 %common_desc_kernel %{expand:%{info_%(echo %{1} | sed -e "s/-/_/")}} \
747 %ifnarch %{arm} \
748 %common_desc_kernel_smp \
749 %endif \
750 \
751 %if %build_devel \
752 %package -n %{kname}-%{1}-devel-%{buildrel} \
753 Version: %{fakever} \
754 Release: %{fakerel} \
755 Requires: glibc-devel ncurses-devel make gcc perl \
756 Requires: gcc >= 5.5.0-1 \
757 %ifarch x86_64 \
758 Requires: pkgconfig(libelf) \
759 %endif \
760 Summary: The kernel-devel files for %{kname}-%{1}-%{buildrel} \
761 Group: Development/Kernel \
762 Provides: %{kname}-devel = %{kverrel} \
763 Provides: %{kname}-%{1}-devel \
764 Recommends: %{kname}-%{1}-devel-latest \
765 %ifarch %{ix86} \
766 Conflicts: arch(x86_64) \
767 %endif \
768 %description -n %{kname}-%{1}-devel-%{buildrel} \
769 This package contains the kernel files (headers and build tools) \
770 that should be enough to build additional drivers for \
771 use with %{kname}-%{1}-%{buildrel}. \
772 \
773 If you want to build your own kernel, you need to install the full \
774 %{kname}-source-%{buildrel} rpm. \
775 \
776 %endif \
777 \
778 %if %build_debug \
779 %package -n %{kname}-%{1}-%{buildrel}-debuginfo \
780 Version: %{fakever} \
781 Release: %{fakerel} \
782 Summary: Files with debuginfo for %{kname}-%{1}-%{buildrel} \
783 Group: Development/Debug \
784 Provides: kernel-debug = %{kverrel} \
785 %ifarch %{ix86} \
786 Conflicts: arch(x86_64) \
787 %endif \
788 %description -n %{kname}-%{1}-%{buildrel}-debuginfo \
789 This package contains the files with debuginfo to aid in debug tasks \
790 when using %{kname}-%{1}-%{buildrel}. \
791 \
792 If you need to look at debug information or use some application that \
793 needs debugging info from the kernel, this package may help. \
794 \
795 %endif \
796 \
797 %package -n %{kname}-%{1}-latest \
798 Version: %{kversion} \
799 Release: %{rpmrel} \
800 Summary: Virtual rpm for latest %{kname}-%{1} \
801 Group: System/Kernel and hardware \
802 Requires: %{kname}-%{1}-%{buildrel} \
803 %ifarch %{ix86} \
804 Conflicts: arch(x86_64) \
805 %endif \
806 Obsoletes: vboxadditions-kernel-%{1}-latest \
807 Obsoletes: kernel-tmb-%{1}-latest \
808 %description -n %{kname}-%{1}-latest \
809 This package is a virtual rpm that aims to make sure you always have the \
810 latest %{kname}-%{1} installed... \
811 \
812 %if %build_devel \
813 %package -n %{kname}-%{1}-devel-latest \
814 Version: %{kversion} \
815 Release: %{rpmrel} \
816 Summary: Virtual rpm for latest %{kname}-%{1}-devel \
817 Group: Development/Kernel \
818 Requires: %{kname}-%{1}-devel-%{buildrel} \
819 %ifarch %{ix86} \
820 Conflicts: arch(x86_64) \
821 %endif \
822 Provides: %{kname}-devel-latest \
823 Obsoletes: kernel-tmb-%{1}-devel-latest \
824 %description -n %{kname}-%{1}-devel-latest \
825 This package is a virtual rpm that aims to make sure you always have the \
826 latest %{kname}-%{1}-devel installed... \
827 \
828 %endif \
829 \
830 %posttrans -n %{kname}-%{1}-%{buildrel} -f kernel_files.%{1}-posttrans \
831 %postun -n %{kname}-%{1}-%{buildrel} -f kernel_files.%{1}-postun \
832 \
833 %if %build_devel \
834 %post -n %{kname}-%{1}-devel-%{buildrel} -f kernel_devel_files.%{1}-post \
835 %preun -n %{kname}-%{1}-devel-%{buildrel} -f kernel_devel_files.%{1}-preun \
836 %postun -n %{kname}-%{1}-devel-%{buildrel} -f kernel_devel_files.%{1}-postun \
837 %endif \
838 \
839 %files -n %{kname}-%{1}-%{buildrel} -f kernel_files.%{1} \
840 %files -n %{kname}-%{1}-latest \
841 \
842 %if %build_devel \
843 %files -n %{kname}-%{1}-devel-%{buildrel} -f kernel_devel_files.%{1} \
844 %files -n %{kname}-%{1}-devel-latest \
845 %endif \
846 \
847 %if %build_debug \
848 %files -n %{kname}-%{1}-%{buildrel}-debuginfo -f kernel_debug_files.%{1} \
849 %endif
850
851 %ifarch %{ix86}
852 #
853 # kernel-desktop586: i586, smp-alternatives, 4GB
854 #
855 %if %build_desktop586
856 %define summary_desktop586 Linux kernel for desktop use with i586 and less than 4GB RAM
857 %define info_desktop586 This kernel is compiled for desktop use, single or \
858 multiple i586 processor(s)/core(s) and less than 4GB RAM (usually 3-3.5GB \
859 detected, if you need/want to use all 4GB or more, install kernel-server), \
860 using HZ_1000, voluntary preempt, CFS cpu scheduler and cfq i/o scheduler.
861 %mkflavour desktop586
862 %endif
863 %endif
864
865 #
866 # kernel-desktop: i686, smp-alternatives, 64 GB / x86_64 / arm / aarch64
867 #
868 %if %build_desktop
869 %ifarch %{ix86}
870 %define summary_desktop Linux Kernel for desktop use with i686 and up to 64GB RAM
871 %define info_desktop This kernel is compiled for desktop use, single or \
872 multiple i686 processor(s)/core(s) and up to 64GB RAM, using HZ_1000, \
873 voluntary preempt, CFS cpu scheduler and cfq i/o scheduler.
874 %else
875 %define summary_desktop Linux Kernel for desktop use with %{_arch}
876 %define info_desktop This kernel is compiled for desktop use, single or \
877 multiple %{_arch} processor(s)/core(s), using HZ_1000, voluntary preempt, \
878 CFS cpu scheduler and cfq i/o scheduler.
879 %endif
880 %mkflavour desktop
881 %endif
882
883 #
884 # kernel-server: i686, smp-alternatives, 64 GB / x86_64 / aarch64
885 #
886 %if %build_server
887 %ifarch %{ix86}
888 %define summary_server Linux Kernel for server use with i686 & 64GB RAM
889 %define info_server This kernel is compiled for server use, single or \
890 multiple i686 processor(s)/core(s) and up to 64GB RAM using PAE, using \
891 no preempt, HZ_100, CFS cpu scheduler and cfq i/o scheduler.
892 %else
893 %define summary_server Linux Kernel for server use with %{_arch}
894 %define info_server This kernel is compiled for server use, single or \
895 multiple %{_arch} processor(s)/core(s), using no preempt, HZ_100, \
896 CFS cpu scheduler and cfq i/o scheduler.
897 %endif
898 %mkflavour server
899 %endif
900
901 #
902 # kernel-source
903 #
904 %if %build_source
905 %package -n %{kname}-source-%{buildrel}
906 Version: %{fakever}
907 Release: %{fakerel}
908 Requires: glibc-devel, ncurses-devel, make, gcc, perl, diffutils
909 Summary: The Linux source code for %{kname}-%{buildrel}
910 Group: Development/Kernel
911 Autoreqprov: no
912 Provides: kernel-source = %{kverrel}
913 Buildarch: noarch
914
915 %description -n %{kname}-source-%{buildrel}
916 The %{kname}-source package contains the source code files for the Mageia
917 kernel. Theese source files are only needed if you want to build your
918 own custom kernel that is better tuned to your particular hardware.
919
920 If you only want the files needed to build 3rdparty (nVidia, Ati, dkms-*,...)
921 drivers against, install the *-devel-* rpm that is matching your kernel.
922
923 #
924 # kernel-source-latest: virtual rpm
925 #
926 %package -n %{kname}-source-latest
927 Version: %{kversion}
928 Release: %{rpmrel}
929 Summary: Virtual rpm for latest %{kname}-source
930 Group: Development/Kernel
931 Requires: %{kname}-source-%{buildrel}
932 Buildarch: noarch
933
934 %description -n %{kname}-source-latest
935 This package is a virtual rpm that aims to make sure you always have the
936 latest %{kname}-source installed...
937 %endif
938
939 #
940 # kernel-doc: documentation for the Linux kernel
941 #
942 %if %build_doc
943 %package -n %{kname}-doc
944 Version: %{kversion}
945 Release: %{rpmrel}
946 Summary: Various documentation bits found in the %{kname} source
947 Group: Documentation
948 Buildarch: noarch
949
950 %description -n %{kname}-doc
951 This package contains documentation files from the %{kname} source.
952 Various bits of information about the Linux kernel and the device drivers
953 shipped with it are documented in these files. You also might want install
954 this package if you need a reference to the options that can be passed to
955 Linux kernel modules at load time.
956 %endif
957
958 #
959 # kernel userspace-headers
960 #
961 %if %{build_uheaders}
962 %package -n %{kname}-userspace-headers
963 Version: %{kversion}
964 Release: %{rpmrel}
965 Summary: Linux kernel header files for userspace
966 Group: System/Kernel and hardware
967 %rename linux-userspace-headers
968 Provides: kernel-headers = 1:%{version}-%{release}
969
970 %description -n %{kname}-userspace-headers
971 C header files from the Linux kernel. The header files define structures
972 and constants that are needed for building most standard programs.
973
974 This package is not suitable for building kernel modules.
975 %endif
976
977 #
978 # kernel/tools
979 #
980 %if %{build_perf}
981 %package -n perf
982 Version: %{kversion}
983 Release: %{rpmrel}
984 Summary: perf tool and the supporting documentation
985 Group: System/Kernel and hardware
986
987 %description -n perf
988 the perf tool and the supporting documentation.
989 %endif
990
991 %if %{build_cpupower}
992 %package -n cpupower
993 Version: %{kversion}
994 Release: %{rpmrel}
995 Summary: the cpupower tools
996 Group: System/Kernel and hardware
997 Requires(post): rpm-helper >= 0.24.8-1
998 Requires(preun): rpm-helper >= 0.24.8-1
999 Obsoletes: cpufreq cpufrequtils
1000
1001 %description -n cpupower
1002 the cpupower tools.
1003
1004 %post -n cpupower
1005 %_post_service cpupower
1006
1007 %preun -n cpupower
1008 %_preun_service cpupower
1009
1010 %package -n cpupower-devel
1011 Version: %{kversion}
1012 Release: %{rpmrel}
1013 Summary: devel files for cpupower
1014 Group: Development/Kernel
1015 Requires: cpupower = %{kversion}-%{rpmrel}
1016 Conflicts: %{_lib}cpufreq-devel
1017
1018 %description -n cpupower-devel
1019 This package contains the development files for cpupower.
1020 %endif
1021
1022 %if %{build_bpftool}
1023 %package -n bpftool
1024 Summary: Inspection and simple manipulation of eBPF programs and maps
1025 Group: System/Kernel and hardware
1026
1027 %description -n bpftool
1028 This package contains the bpftool, which allows inspection and simple
1029 manipulation of eBPF programs and maps.
1030 %endif
1031
1032 %if %{build_libbpf}
1033 %package -n %{_lib}bpf%{bpfmajor}
1034 Summary: The bpf library from kernel source
1035 Group: System/Libraries
1036
1037 %description -n %{_lib}bpf%{bpfmajor}
1038 This package contains the kernel source bpf library.
1039
1040 %package -n %{_lib}bpf-devel
1041 Summary: Developement files for the bpf library from kernel source
1042 Group: Development/Kernel
1043 Requires: %{_lib}bpf%{bpfmajor}
1044
1045 %description -n %{_lib}bpf-devel
1046 This package includes libraries and header files needed for development
1047 of applications which use bpf library from kernel source.
1048 %endif
1049
1050 #
1051 # End packages - here begins build stage
1052 #
1053 %prep
1054 %setup -q -n %top_dir_name -c
1055
1056 cd %src_dir
1057
1058 %autopatch -p1
1059
1060 # PATCH END
1061
1062 #
1063 # Setup Begin
1064 #
1065
1066 # install x86 defconfigs
1067 install -m 644 %{SOURCE11} %{SOURCE12} %{SOURCE13} %{SOURCE14} %{SOURCE15} arch/x86/configs/
1068 # install arm64 defconfigs
1069 install -m 644 %{SOURCE16} %{SOURCE17} arch/arm64/configs/
1070 # install arm defconfigs
1071 install -m 644 %{SOURCE18} arch/arm/configs/
1072
1073 # make sure the kernel has the sublevel we know it has...
1074 LC_ALL=C perl -p -i -e "s/^SUBLEVEL.*/SUBLEVEL = %{sublevel}/" Makefile
1075
1076 # get rid of unwanted files
1077 find . -name '*~' -o -name '*.orig' -o -name '*.append' | %kxargs rm -f
1078
1079 # fix missing exec flag on file introduced in 4.14.10-rc1
1080 chmod 755 tools/objtool/sync-check.sh
1081
1082 %build
1083 # Common target directories
1084 %define _kerneldir /usr/src/kernel-%{kversion}-%{buildrpmrel}
1085 %define _bootdir /boot
1086 %define _modulesdir /lib/modules
1087 %define _efidir %{_bootdir}/efi/mageia
1088
1089 # Directories definition needed for building
1090 %define temp_root %{build_dir}/temp-root
1091 %define temp_source %{temp_root}%{_kerneldir}
1092 %define temp_boot %{temp_root}%{_bootdir}
1093 %define temp_modules %{temp_root}%{_modulesdir}
1094
1095 PrepareKernel() {
1096 name=$1
1097 extension=$2
1098
1099 echo "Make config for kernel $extension"
1100
1101 %smake ARCH=%{target_arch} -s mrproper
1102
1103 if [ "%{target_arch}" == "i386" -o "%{target_arch}" == "x86_64" ]; then
1104 conf_dir=arch/x86/configs
1105 else
1106 conf_dir=arch/%{target_arch}/configs
1107 fi
1108 if [ -z "$name" ]; then
1109 cp $conf_dir/defconfig-%{target_arch}-desktop .config
1110 else
1111 cp $conf_dir/defconfig-%{target_arch}-$name .config
1112 fi
1113
1114 # make sure EXTRAVERSION says what we want it to say
1115 LC_ALL=C perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = -$extension/" Makefile
1116
1117 %smake ARCH=%{target_arch} oldconfig
1118 }
1119
1120 BuildKernel() {
1121 KernelVer=$1
1122
1123 echo "Building kernel $KernelVer"
1124
1125 %kmake ARCH=%{target_arch} -s all
1126
1127 # Start installing stuff
1128 install -d %{temp_boot}
1129 install -m 644 System.map %{temp_boot}/System.map-$KernelVer
1130 install -m 644 .config %{temp_boot}/config-$KernelVer
1131 xz -c Module.symvers > %{temp_boot}/symvers-$KernelVer.xz
1132
1133 %ifarch %{arm}
1134 IMAGE=zImage
1135 %else
1136 %ifarch aarch64
1137 IMAGE=Image.gz
1138 %else
1139 IMAGE=bzImage
1140 %endif
1141 %endif
1142 cp -f arch/%{target_arch}/boot/$IMAGE %{temp_boot}/vmlinuz-$KernelVer
1143
1144 %ifarch %{arm} aarch64
1145 install -d %{temp_root}%{_libdir}/linux-$KernelVer/
1146 find arch/%{target_arch}/boot/dts/ -name *.dtb -execdir install -D -m644 {} %{temp_root}%{_libdir}/linux-$KernelVer/{} \;
1147 %endif
1148
1149 # modules
1150 install -d %{temp_modules}/$KernelVer
1151 %smake ARCH=%{target_arch} INSTALL_MOD_PATH=%{temp_root} KERNELRELEASE=$KernelVer modules_install
1152 }
1153
1154 SaveDevel() {
1155 devel_flavour=$1
1156
1157 DevelRoot=/usr/src/kernel-%{kversion}-$devel_flavour-%{buildrpmrel}
1158 TempDevelRoot=%{temp_root}$DevelRoot
1159
1160 mkdir -p $TempDevelRoot
1161 for i in $(find . -name 'Makefile*'); do cp -R --parents $i $TempDevelRoot;done
1162 for i in $(find . -name 'Kconfig*' -o -name 'Kbuild*'); do cp -R --parents $i $TempDevelRoot;done
1163 cp -fR include $TempDevelRoot
1164 cp -fR scripts $TempDevelRoot
1165 cp -fR kernel/bounds.c $TempDevelRoot/kernel
1166 cp -fR tools/include $TempDevelRoot/tools/
1167 # needed for selinux
1168 cp -R --parents security/selinux/include/*.h $TempDevelRoot
1169 %ifarch %{arm}
1170 cp -fR arch/%{target_arch}/tools $TempDevelRoot/arch/%{target_arch}/
1171 cp -fR arch/%{target_arch}/kernel/signal.h $TempDevelRoot/arch/%{target_arch}/kernel/
1172 %endif
1173 %ifarch aarch64
1174 cp -fR arch/x86/entry/syscalls/syscall_32.tbl $TempDevelRoot/arch/x86/entry/syscalls/
1175 cp -fR arch/arm64/kernel/vdso/*.{S,sh} $TempDevelRoot/arch/arm64/kernel/vdso/
1176 cp -fR arch/arm64/kernel/vdso/vgettimeofday.c $TempDevelRoot/arch/arm64/kernel/vdso/
1177 cp -fR arch/arm64/tools/{cpucaps,gen-cpucaps.awk,gen-sysreg.awk,sysreg} $TempDevelRoot/arch/arm64/tools/
1178 # aarch64 build wants x86 syscall tables
1179 cp -fR arch/x86/entry/syscalls/syscall_{32,64}.tbl $TempDevelRoot/arch/x86/entry/syscalls/
1180 cp -fR lib/vdso/gettimeofday.c $TempDevelRoot/lib/vdso/
1181 %endif
1182 %ifarch %{ix86} x86_64
1183 cp -fR arch/x86/kernel/asm-offsets.{c,s} $TempDevelRoot/arch/x86/kernel/
1184 cp -fR arch/x86/kernel/asm-offsets_{32,64}.c $TempDevelRoot/arch/x86/kernel/
1185 mkdir -p $TempDevelRoot/arch/x86/kvm/vmx
1186 cp -fR arch/x86/kvm/vmx/*.h $TempDevelRoot/arch/x86/kvm/vmx/
1187 cp -fR arch/x86/kvm/*.h $TempDevelRoot/arch/x86/kvm/
1188 cp -fR arch/x86/lib/insn.c $TempDevelRoot/arch/x86/lib/
1189 cp -fR arch/x86/purgatory/* $TempDevelRoot/arch/x86/purgatory/
1190 cp -fR arch/x86/entry/syscalls/syscall* $TempDevelRoot/arch/x86/entry/syscalls/
1191 cp -fR arch/x86/include $TempDevelRoot/arch/x86/
1192 cp -fR arch/x86/tools $TempDevelRoot/arch/x86/
1193 %else
1194 cp -fR arch/%{target_arch}/kernel/asm-offsets.{c,s} $TempDevelRoot/arch/%{target_arch}/kernel/
1195 for f in $(find arch/%{target_arch} -name include); do cp -fR --parents $f $TempDevelRoot; done
1196 %endif
1197 cp -fR .config Module.symvers $TempDevelRoot
1198
1199 # Needed for truecrypt build (Danny)
1200 cp -fR drivers/md/dm.h $TempDevelRoot/drivers/md/
1201
1202 # needed by include/generated/timeconst.h
1203 cp -fR kernel/time/timeconst.bc $TempDevelRoot/kernel/time/
1204
1205 # Needed for lirc_gpio (#39004)
1206 cp -fR drivers/media/pci/bt8xx/bttv{,p}.h $TempDevelRoot/drivers/media/pci/bt8xx/
1207 cp -fR drivers/media/pci/bt8xx/bt848.h $TempDevelRoot/drivers/media/pci/bt8xx/
1208 cp -fR drivers/media/common/btcx-risc.h $TempDevelRoot/drivers/media/common/
1209
1210 # rtl8812au
1211 mkdir -p $TempDevelRoot/3rdparty/rtl8812au/hal/phydm/
1212 cp -fR 3rdparty/rtl8812au/hal/phydm/phydm.mk $TempDevelRoot/3rdparty/rtl8812au/hal/phydm/
1213
1214 %ifarch x86_64
1215 # orc unwinder needs theese
1216 cp -fR tools/build/Build{,.include} $TempDevelRoot/tools/build
1217 cp -fR tools/build/fixdep.c $TempDevelRoot/tools/build
1218 cp -fR tools/lib/{rbtree.c,ctype.c,str_error_r.c,string.c} $TempDevelRoot/tools/lib
1219 cp -fR tools/lib/subcmd/* $TempDevelRoot/tools/lib/subcmd
1220 cp -fR tools/objtool/* $TempDevelRoot/tools/objtool
1221 cp -fR tools/scripts/utilities.mak $TempDevelRoot/tools/scripts
1222 mkdir -p $TempDevelRoot/tools/arch/x86/tools
1223 cp -fR tools/arch/x86/tools/gen-insn-attr-x86.awk $TempDevelRoot/tools/arch/x86/tools/
1224 mkdir -p $TempDevelRoot/tools/arch/x86/lib
1225 cp -fR tools/arch/x86/lib/{inat.c,insn.c,x86-opcode-map.txt} $TempDevelRoot/tools/arch/x86/lib/
1226 mkdir -p $TempDevelRoot/tools/arch/x86/include/asm
1227 cp -fR tools/arch/x86/include/asm/{asm.h,emulate_prefix.h,inat.h,inat_types.h,insn.h,nops.h,orc_types.h} $TempDevelRoot/tools/arch/x86/include/asm/
1228 %endif
1229
1230 for i in alpha arc avr32 blackfin c6x cris csky frv h8300 hexagon ia64 loongarch m32r m68k m68knommu metag microblaze \
1231 mips mn10300 nds32 nios2 openrisc parisc powerpc riscv s390 score sh sparc tile unicore32 xtensa; do
1232 rm -rf $TempDevelRoot/arch/$i
1233 rm -rf $TempDevelRoot/scripts/dtc/include-prefixes/$i
1234 rm -rf $TempDevelRoot/tools/arch/$i
1235 done
1236
1237 %ifnarch %{arm} aarch64
1238 rm -rf $TempDevelRoot/arch/arm*
1239 rm -rf $TempDevelRoot/include/kvm/arm*
1240 rm -rf $TempDevelRoot/include/soc
1241 rm -rf $TempDevelRoot/scripts/dtc/include-prefixes/arm*
1242 rm -rf $TempDevelRoot/tools/arch/arm*
1243 %endif
1244 %ifnarch %{ix86} x86_64
1245 rm -rf $TempDevelRoot/arch/x86
1246 rm -rf $TempDevelRoot/tools/arch/x86
1247 # arch/x86/ras/Kconfig is included by drivers/ras/Kconfig
1248 # and kconfig's source command seems to be evaluated even under a false conditional
1249 mkdir -p $TempDevelRoot/arch/x86/ras
1250 cp -fR arch/x86/ras/Kconfig $TempDevelRoot/arch/x86/ras
1251 %endif
1252
1253 # Clean the scripts tree, and make sure everything is ok (sanity check)
1254 # running prepare+scripts (tree was already "prepared" in build)
1255 pushd $TempDevelRoot >/dev/null
1256 %smake ARCH=%{target_arch} -s prepare scripts
1257 %smake ARCH=%{target_arch} -s clean
1258 popd >/dev/null
1259 rm -f $TempDevelRoot/.config.old
1260
1261 # fix permissions
1262 chmod -R a+rX $TempDevelRoot
1263
1264 # disable mrproper in -devel rpms
1265 patch -p1 --fuzz=0 -d $TempDevelRoot -i %{SOURCE2}
1266
1267 kernel_devel_files=../kernel_devel_files.$devel_flavour
1268
1269
1270 ### Create the kernel_devel_files.*
1271 cat > $kernel_devel_files <<EOF
1272 %dir $DevelRoot
1273 %dir $DevelRoot/arch
1274 %dir $DevelRoot/include
1275 $DevelRoot/3rdparty
1276 $DevelRoot/Documentation
1277 %ifarch %{arm} aarch64
1278 $DevelRoot/arch/arm
1279 $DevelRoot/arch/arm64
1280 %endif
1281 $DevelRoot/arch/um
1282 %ifarch %{ix86} x86_64
1283 $DevelRoot/arch/x86
1284 %else
1285 $DevelRoot/arch/x86/ras
1286 %endif
1287 $DevelRoot/block
1288 $DevelRoot/certs
1289 $DevelRoot/crypto
1290 $DevelRoot/drivers
1291 $DevelRoot/fs
1292 $DevelRoot/include/acpi
1293 $DevelRoot/include/asm-generic
1294 $DevelRoot/include/clocksource
1295 $DevelRoot/include/config
1296 $DevelRoot/include/crypto
1297 $DevelRoot/include/drm
1298 $DevelRoot/include/dt-bindings
1299 $DevelRoot/include/generated
1300 $DevelRoot/include/keys
1301 $DevelRoot/include/kunit
1302 $DevelRoot/include/kvm
1303 $DevelRoot/include/linux
1304 $DevelRoot/include/math-emu
1305 $DevelRoot/include/media
1306 $DevelRoot/include/memory
1307 $DevelRoot/include/misc
1308 $DevelRoot/include/net
1309 $DevelRoot/include/pcmcia
1310 $DevelRoot/include/ras
1311 $DevelRoot/include/rdma
1312 $DevelRoot/include/rv
1313 $DevelRoot/include/scsi
1314 %ifarch %{arm} aarch64
1315 $DevelRoot/include/soc
1316 %endif
1317 $DevelRoot/include/sound
1318 $DevelRoot/include/target
1319 $DevelRoot/include/trace
1320 $DevelRoot/include/uapi
1321 $DevelRoot/include/ufs
1322 $DevelRoot/include/vdso/*.h
1323 $DevelRoot/include/video
1324 $DevelRoot/include/xen
1325 $DevelRoot/init
1326 $DevelRoot/io_uring
1327 $DevelRoot/ipc
1328 $DevelRoot/kernel
1329 $DevelRoot/lib
1330 $DevelRoot/mm
1331 $DevelRoot/net
1332 $DevelRoot/samples
1333 $DevelRoot/scripts
1334 $DevelRoot/security
1335 $DevelRoot/sound
1336 $DevelRoot/tools
1337 $DevelRoot/usr
1338 $DevelRoot/virt
1339 $DevelRoot/.config
1340 $DevelRoot/Kbuild
1341 $DevelRoot/Kconfig
1342 $DevelRoot/Makefile
1343 $DevelRoot/Module.symvers
1344 $DevelRoot/arch/Kconfig
1345 EOF
1346
1347
1348 ### Create -devel Post script on the fly
1349 cat > $kernel_devel_files-post <<EOF
1350 if [ -d /lib/modules/%{kversion}-$devel_flavour-%{buildrpmrel} ]; then
1351 rm -f /lib/modules/%{kversion}-$devel_flavour-%{buildrpmrel}/{build,source}
1352 ln -sf $DevelRoot /lib/modules/%{kversion}-$devel_flavour-%{buildrpmrel}/build
1353 ln -sf $DevelRoot /lib/modules/%{kversion}-$devel_flavour-%{buildrpmrel}/source
1354 fi
1355 EOF
1356
1357
1358 ### Create -devel Preun script on the fly
1359 cat > $kernel_devel_files-preun <<EOF
1360 if [ -L /lib/modules/%{kversion}-$devel_flavour-%{buildrpmrel}/build ]; then
1361 rm -f /lib/modules/%{kversion}-$devel_flavour-%{buildrpmrel}/build
1362 fi
1363 if [ -L /lib/modules/%{kversion}-$devel_flavour-%{buildrpmrel}/source ]; then
1364 rm -f /lib/modules/%{kversion}-$devel_flavour-%{buildrpmrel}/source
1365 fi
1366 exit 0
1367 EOF
1368
1369 ### Create -devel Postun script on the fly
1370 cat > $kernel_devel_files-postun <<EOF
1371 rm -rf /usr/src/kernel-%{kversion}-$devel_flavour-%{buildrpmrel} >/dev/null
1372 EOF
1373 }
1374
1375 SaveDebug() {
1376 debug_flavour=$1
1377
1378 install -m 644 vmlinux \
1379 %{temp_boot}/vmlinux-%{kversion}-$debug_flavour-%{buildrpmrel}
1380 kernel_debug_files=../kernel_debug_files.$debug_flavour
1381 echo "%{_bootdir}/vmlinux-%{kversion}-$debug_flavour-%{buildrpmrel}" \
1382 >> $kernel_debug_files
1383
1384 find %{temp_modules}/%{kversion}-$debug_flavour-%{buildrpmrel}/kernel \
1385 -name "*.ko" | \
1386 %kxargs -I '{}' objcopy --only-keep-debug '{}' '{}'.debug
1387 find %{temp_modules}/%{kversion}-$debug_flavour-%{buildrpmrel}/kernel \
1388 -name "*.ko" | %kxargs -I '{}' \
1389 sh -c 'cd `dirname {}`; \
1390 objcopy --add-gnu-debuglink=`basename {}`.debug \
1391 --strip-debug `basename {}`'
1392
1393 pushd %{temp_modules}
1394 find %{kversion}-$debug_flavour-%{buildrpmrel}/kernel \
1395 -name "*.ko.debug" > debug_module_list
1396 popd
1397 cat %{temp_modules}/debug_module_list | \
1398 sed 's|\(.*\)|%{_modulesdir}/\1|' >> $kernel_debug_files
1399 cat %{temp_modules}/debug_module_list | \
1400 sed 's|\(.*\)|%exclude %{_modulesdir}/\1|' \
1401 >> ../kernel_exclude_debug_files.$debug_flavour
1402 rm -f %{temp_modules}/debug_module_list
1403 }
1404
1405 CreateFiles() {
1406 kernel_flavour=$1
1407
1408 kernel_files=../kernel_files.$kernel_flavour
1409
1410 ker="vmlinuz"
1411 ### Create the kernel_files.*
1412 cat > $kernel_files <<EOF
1413 %{_bootdir}/System.map-%{kversion}-$kernel_flavour-%{buildrpmrel}
1414 %{_bootdir}/symvers-%{kversion}-$kernel_flavour-%{buildrpmrel}.xz
1415 %{_bootdir}/config-%{kversion}-$kernel_flavour-%{buildrpmrel}
1416 %{_bootdir}/$ker-%{kversion}-$kernel_flavour-%{buildrpmrel}
1417 %dir %{_modulesdir}/%{kversion}-$kernel_flavour-%{buildrpmrel}/
1418 %{_modulesdir}/%{kversion}-$kernel_flavour-%{buildrpmrel}/kernel
1419 %{_modulesdir}/%{kversion}-$kernel_flavour-%{buildrpmrel}/modules.*
1420 %doc README.kernel-sources
1421 %ifarch %arm aarch64
1422 %dir %{_libdir}/linux-%{kversion}-$kernel_flavour-%{buildrpmrel}
1423 %{_libdir}/linux-%{kversion}-$kernel_flavour-%{buildrpmrel}/*.dtb
1424 %endif
1425 EOF
1426
1427 %if %build_debug
1428 cat ../kernel_exclude_debug_files.$kernel_flavour >> $kernel_files
1429 %endif
1430
1431 ### Create kernel Posttrans script
1432 cat > $kernel_files-posttrans <<EOF
1433 %if %build_devel
1434 # create kernel-devel symlinks if matching -devel- rpm is installed
1435 if [ -d /usr/src/kernel-%{kversion}-$kernel_flavour-%{buildrpmrel} ]; then
1436 ln -sf /usr/src/kernel-%{kversion}-$kernel_flavour-%{buildrpmrel} /lib/modules/%{kversion}-$kernel_flavour-%{buildrpmrel}/build
1437 ln -sf /usr/src/kernel-%{kversion}-$kernel_flavour-%{buildrpmrel} /lib/modules/%{kversion}-$kernel_flavour-%{buildrpmrel}/source
1438 fi
1439 %endif
1440 if [ -z "$DURING_INSTALL" ] ; then
1441 if [ -x /usr/sbin/dkms_autoinstaller -a -d /usr/src/kernel-%{kversion}-$kernel_flavour-%{buildrpmrel} ]; then
1442 /usr/sbin/dkms_autoinstaller start %{kversion}-$kernel_flavour-%{buildrpmrel}
1443 fi
1444 fi
1445 /sbin/installkernel %{kversion}-$kernel_flavour-%{buildrpmrel}
1446 pushd /boot > /dev/null
1447 if [ -e initrd-%{kversion}-$kernel_flavour-%{buildrpmrel}.img ]; then
1448 ln -sf vmlinuz-%{kversion}-$kernel_flavour-%{buildrpmrel} vmlinuz-$kernel_flavour
1449 ln -sf vmlinuz-%{kversion}-$kernel_flavour-%{buildrpmrel} vmlinuz
1450 ln -sf initrd-%{kversion}-$kernel_flavour-%{buildrpmrel}.img initrd-$kernel_flavour.img
1451 ln -sf initrd-%{kversion}-$kernel_flavour-%{buildrpmrel}.img initrd.img
1452 fi
1453 popd > /dev/null
1454 EOF
1455
1456 ### Create kernel Postun script on the fly
1457 cat > $kernel_files-postun <<EOF
1458 pushd /boot > /dev/null
1459 if [ -f "vmlinuz-%{kversion}-$kernel_flavour-%{buildrpmrel}" ]; then
1460 echo "The kernel is still installed in postun, probably a reinstall, skipping cleanup." >&2
1461 exit
1462 fi
1463 if [ -L vmlinuz-$kernel_flavour ]; then
1464 if [ "$(readlink vmlinuz-$kernel_flavour)" = "vmlinuz-%{kversion}-$kernel_flavour-%{buildrpmrel}" ]; then
1465 rm -f vmlinuz-$kernel_flavour
1466 fi
1467 fi
1468 if [ -L initrd-$kernel_flavour.img ]; then
1469 if [ "$(readlink initrd-$kernel_flavour.img)" = "initrd-%{kversion}-$kernel_flavour-%{buildrpmrel}.img" ]; then
1470 rm -f initrd-$kernel_flavour.img
1471 fi
1472 fi
1473 popd > /dev/null
1474 rm -rf /lib/modules/%{kversion}-$kernel_flavour-%{buildrpmrel} >/dev/null
1475 /sbin/kernel_remove_initrd %{kversion}-$kernel_flavour-%{buildrpmrel}
1476 /sbin/installkernel -R %{kversion}-$kernel_flavour-%{buildrpmrel}
1477 if [ -d /var/lib/dkms ]; then
1478 rm -f /var/lib/dkms/*/kernel-%{kversion}-$devel_flavour-%{buildrpmrel}-%{_target_cpu} >/dev/null
1479 rm -rf /var/lib/dkms/*/*/%{kversion}-$devel_flavour-%{buildrpmrel} >/dev/null
1480 rm -f /var/lib/dkms-binary/*/kernel-%{kversion}-$devel_flavour-%{buildrpmrel}-%{_target_cpu} >/dev/null
1481 rm -rf /var/lib/dkms-binary/*/*/%{kversion}-$devel_flavour-%{buildrpmrel} >/dev/null
1482 fi
1483 EOF
1484 }
1485
1486
1487 CreateKernel() {
1488 flavour=$1
1489
1490 PrepareKernel $flavour $flavour-%{buildrpmrel}
1491
1492 BuildKernel %{kversion}-$flavour-%{buildrpmrel}
1493 %if %build_devel
1494 SaveDevel $flavour
1495 %endif
1496 %if %build_debug
1497 SaveDebug $flavour
1498 %endif
1499 CreateFiles $flavour
1500 }
1501
1502
1503 ###
1504 # DO it...
1505 ###
1506
1507
1508 # Create a simulacro of buildroot
1509 rm -rf %{temp_root}
1510 install -d %{temp_root}
1511
1512
1513 # make sure we are in the directory
1514 cd %src_dir
1515
1516 %ifarch %{ix86}
1517 %if %build_desktop586
1518 CreateKernel desktop586
1519 %endif
1520 %endif
1521
1522 %if %build_desktop
1523 CreateKernel desktop
1524 %endif
1525
1526 %if %build_server
1527 CreateKernel server
1528 %endif
1529
1530 # set extraversion to match srpm to get nice version reported by the tools
1531 LC_ALL=C perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = -%{rpmrel}/" Makefile
1532
1533 # build perf
1534 %if %{build_perf}
1535 # perf
1536 %smake -s -C tools/perf NO_PERF_READ_VDSO32=1 NO_PERF_READ_VDSOX32=1 WERROR=0 NO_LIBUNWIND=1 \
1537 HAVE_CPLUS_DEMANGLE=1 NO_GTK2=1 NO_STRLCPY=1 NO_BIONIC=1 NO_JVMTI=1 prefix=%{_prefix} lib=%{_lib} all
1538 %smake -C tools/perf -s prefix=%{_prefix} man
1539 %endif
1540
1541 %if %{build_cpupower}
1542 # cpupower
1543 # make sure version-gen.sh is executable.
1544 chmod +x tools/power/cpupower/utils/version-gen.sh
1545 %make_build -C tools/power/cpupower CPUFREQ_BENCH=false
1546 %endif
1547
1548 # build bpftool
1549 %if %{build_bpftool}
1550 pushd tools/bpf/bpftool
1551 make
1552 popd
1553 %endif
1554
1555 # build libbpf
1556 %if %{build_libbpf}
1557 pushd tools/lib/bpf
1558 make V=1
1559 popd
1560 %endif
1561
1562 # We don't make to repeat the depend code at the install phase
1563 %if %build_source
1564 PrepareKernel "" %{buildrpmrel}custom
1565 %smake ARCH=%{target_arch} -s mrproper
1566 %endif
1567
1568
1569 ###
1570 ### install
1571 ###
1572 %install
1573 install -m 644 %{SOURCE4} .
1574
1575 cd %src_dir
1576
1577 # Directories definition needed for installing
1578 %define target_source %{buildroot}%{_kerneldir}
1579 %define target_boot %{buildroot}%{_bootdir}
1580 %define target_modules %{buildroot}%{_modulesdir}
1581 %define target_headers %{buildroot}%{_prefix}
1582
1583 # We want to be able to test several times the install part
1584 rm -rf %{buildroot}
1585 cp -a %{temp_root} %{buildroot}
1586
1587 # Create directories infastructure
1588 %if %build_source
1589 install -d %{target_source}
1590
1591 tar cf - . | tar xf - -C %{target_source}
1592 chmod -R a+rX %{target_source}
1593
1594 # we remove all the source files that we don't ship
1595 # first architecture files
1596 for i in alpha arc avr32 blackfin c6x cris csky frv h8300 hexagon ia64 loongarch m32r m68k m68knommu metag microblaze \
1597 mips nds32 nios2 openrisc parisc powerpc riscv s390 score sh sh64 sparc tile unicore32 v850 xtensa mn10300; do
1598 rm -rf %{target_source}/arch/$i
1599 rm -rf %{target_source}/scripts/dtc/include-prefixes/$i
1600 rm -rf %{target_source}/tools/arch/$i
1601 rm -rf %{target_source}/tools/testing/selftests/$i
1602 done
1603 %ifnarch %{arm} aarch64
1604 rm -rf %{target_source}/include/kvm/arm*
1605 rm -rf %{target_source}/scripts/dtc/include-prefixes/arm*
1606 rm -rf %{target_source}/tools/arch/arm*
1607 %endif
1608
1609 # other misc files
1610 rm -f %{target_source}/{.clang-format,.config.old,.config.cmd,.lst,.mailmap,.get_maintainer.ignore}
1611 rm -f %{target_source}/{.missing-syscalls.d,.cocciconfig,.gitattributes}
1612 rm -rf %{target_source}/.tmp_depmod/
1613
1614 # more cleaning
1615 pushd %{target_source}
1616 # lots of gitignore files
1617 find -iname ".gitignore" -delete
1618 # clean tools tree
1619 %smake -C tools clean
1620 %smake -C tools/build clean
1621 %smake -C tools/build/feature clean
1622 # dont ship generated vdso.so*
1623 %ifarch aarch64
1624 rm -f arch/arm64/kernel/vdso/vdso.so*
1625 %endif
1626 popd
1627
1628 # nuke last as it gets re-created
1629 rm -f %{target_source}/.cache.mk
1630
1631 #endif %build_source
1632 %endif
1633
1634 # compressing modules
1635 %if %{build_modxz}
1636 find %{target_modules} -name "*.ko" | %kxargs xz -6
1637 %else
1638 find %{target_modules} -name "*.ko" | %kxargs gzip -9
1639 %endif
1640
1641 # We used to have a copy of PrepareKernel here
1642 # Now, we make sure that the thing in the linux dir is what we want it to be
1643 for i in %{target_modules}/*; do
1644 rm -f $i/build $i/source
1645 done
1646
1647 # sniff, if we compressed all the modules, we change the stamp :(
1648 # we really need the depmod -ae here
1649 pushd %{target_modules}
1650 for i in *; do
1651 /sbin/depmod -ae -b %{buildroot} -F %{target_boot}/System.map-$i $i
1652 echo $?
1653 done
1654
1655 for i in *; do
1656 pushd $i
1657 echo "Creating modules.description for $i"
1658 modules=`find . -name "*.ko.[g,x]z"`
1659 echo $modules | xargs /sbin/modinfo \
1660 | perl -lne 'print "$name\t$1" if $name && /^description:\s*(.*)/; $name = $1 if m!^filename:\s*(.*)\.k?o!; $name =~ s!.*/!!' > modules.description
1661 popd
1662 done
1663 popd
1664
1665 # need to set extraversion to match srpm again to avoid rebuild
1666 LC_ALL=C perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = -%{rpmrel}/" Makefile
1667
1668 # install userspace-headers
1669 %if %{build_uheaders}
1670 %smake ARCH=%{target_arch} headers_install INSTALL_HDR_PATH=%{target_headers}
1671 # for drakx
1672 cp include/linux/pci_ids.h %{target_headers}/include/linux/
1673 %endif
1674
1675 %if %{build_perf}
1676 # perf tool binary and supporting scripts/binaries
1677 %smake -s -C tools/perf V=1 DESTDIR=%{buildroot} NO_PERF_READ_VDSO32=1 NO_PERF_READ_VDSOX32=1 WERROR=0 NO_LIBUNWIND=1 \
1678 HAVE_CPLUS_DEMANGLE=1 NO_GTK2=1 NO_STRLCPY=1 NO_BIONIC=1 NO_JVMTI=1 prefix=%{_prefix} lib=%{_lib} install
1679
1680 # perf man pages (note: implicit rpm magic compresses them later)
1681 make -C tools/perf V=1 DESTDIR=%{buildroot} prefix=%{_prefix} install-man
1682
1683 # remove perf files we dont ship
1684 rm -rf %{buildroot}/usr/lib/perf/examples
1685 rm -rf %{buildroot}/usr/lib/perf/include/bpf
1686 rm -rf %{buildroot}/usr/include/perf/perf_dlfilter.h
1687 %endif
1688
1689 %if %{build_cpupower}
1690 make -C tools/power/cpupower DESTDIR=%{buildroot} libdir=%{_libdir} mandir=%{_mandir} CPUFREQ_BENCH=false install
1691 rm -f %{buildroot}%{_libdir}/*.{a,la}
1692 %find_lang cpupower
1693 mv cpupower.lang ../
1694 chmod 0755 %{buildroot}%{_libdir}/libcpupower.so*
1695 mkdir -p %{buildroot}%{_unitdir} %{buildroot}%{_sysconfdir}/sysconfig
1696 install -m644 %{SOURCE50} %{buildroot}%{_unitdir}/cpupower.service
1697 install -m644 %{SOURCE51} %{buildroot}%{_sysconfdir}/sysconfig/cpupower
1698 %endif
1699
1700 # install bpftool
1701 %if %{build_bpftool}
1702 pushd tools/bpf/bpftool
1703 make DESTDIR=%{buildroot} prefix=%{_prefix} bash_compdir=%{_sysconfdir}/bash_completion.d/ mandir=%{_mandir} install doc-install
1704 popd
1705 %endif
1706
1707 # install libbpf
1708 %if %{build_libbpf}
1709 pushd tools/lib/bpf
1710 make DESTDIR=%{buildroot} prefix=%{_prefix} libdir=%{_libdir} V=1 install install_headers
1711 popd
1712 %endif
1713
1714 ###
1715 ### clean
1716 ###
1717 %clean
1718 rm -rf %{buildroot}
1719
1720
1721 # We don't want to remove this, the whole reason of its existence is to be
1722 # able to do several rpm --short-circuit -bi for testing install
1723 # phase without repeating compilation phase
1724 #rm -rf %{temp_root}
1725
1726 ###
1727 ### source and doc file lists
1728 ###
1729
1730 %if %build_source
1731 %files -n %{kname}-source-%{buildrel}
1732 %doc %{_kerneldir}/LICENSES
1733 %dir %{_kerneldir}
1734 %dir %{_kerneldir}/arch
1735 %dir %{_kerneldir}/include
1736 %{_kerneldir}/3rdparty
1737 %{_kerneldir}/Documentation
1738 %{_kerneldir}/arch/Kconfig
1739 %{_kerneldir}/arch/arm
1740 %{_kerneldir}/arch/arm64
1741 %{_kerneldir}/arch/um
1742 %{_kerneldir}/arch/x86
1743 %{_kerneldir}/block
1744 %{_kerneldir}/certs
1745 %{_kerneldir}/crypto
1746 %{_kerneldir}/drivers
1747 %{_kerneldir}/fs
1748 %{_kerneldir}/include/acpi
1749 %{_kerneldir}/include/asm-generic
1750 %{_kerneldir}/include/clocksource
1751 %{_kerneldir}/include/crypto
1752 %{_kerneldir}/include/drm
1753 %{_kerneldir}/include/dt-bindings
1754 %{_kerneldir}/include/keys
1755 %{_kerneldir}/include/kunit
1756 %{_kerneldir}/include/kvm
1757 %{_kerneldir}/include/linux
1758 %{_kerneldir}/include/math-emu
1759 %{_kerneldir}/include/media
1760 %{_kerneldir}/include/memory
1761 %{_kerneldir}/include/misc
1762 %{_kerneldir}/include/net
1763 %{_kerneldir}/include/pcmcia
1764 %{_kerneldir}/include/ras
1765 %{_kerneldir}/include/rdma
1766 %{_kerneldir}/include/rv
1767 %{_kerneldir}/include/scsi
1768 %{_kerneldir}/include/soc
1769 %{_kerneldir}/include/sound
1770 %{_kerneldir}/include/target
1771 %{_kerneldir}/include/trace
1772 %{_kerneldir}/include/uapi
1773 %{_kerneldir}/include/ufs
1774 %{_kerneldir}/include/vdso/*.h
1775 %{_kerneldir}/include/video
1776 %{_kerneldir}/include/xen
1777 %{_kerneldir}/init
1778 %{_kerneldir}/io_uring
1779 %{_kerneldir}/ipc
1780 %{_kerneldir}/kernel
1781 %{_kerneldir}/lib
1782 %{_kerneldir}/mm
1783 %{_kerneldir}/net
1784 %{_kerneldir}/virt
1785 %{_kerneldir}/samples
1786 %{_kerneldir}/scripts
1787 %{_kerneldir}/security
1788 %{_kerneldir}/sound
1789 %{_kerneldir}/tools
1790 %{_kerneldir}/usr
1791 %{_kerneldir}/COPYING
1792 %{_kerneldir}/CREDITS
1793 %{_kerneldir}/Kbuild
1794 %{_kerneldir}/Kconfig
1795 %{_kerneldir}/MAINTAINERS
1796 %{_kerneldir}/Makefile
1797 %{_kerneldir}/README
1798 %doc README.kernel-sources
1799
1800 %files -n %{kname}-source-latest
1801 %endif
1802
1803 %if %build_doc
1804 %files -n %{kname}-doc
1805 %doc linux-%{tar_ver}/Documentation/*
1806 %endif
1807
1808 %if %build_uheaders
1809 %files -n %{kname}-userspace-headers
1810 %defattr(0644,root,root,0755)
1811 %{_includedir}/asm/
1812 %{_includedir}/asm-generic/
1813 %{_includedir}/drm/
1814 %{_includedir}/linux/
1815 %{_includedir}/misc/
1816 %{_includedir}/mtd/
1817 %{_includedir}/rdma/
1818 %{_includedir}/scsi/
1819 %{_includedir}/sound/
1820 %{_includedir}/video/
1821 %{_includedir}/xen/
1822 %endif
1823
1824 %if %{build_perf}
1825 %files -n perf
1826 %{_bindir}/perf
1827 %{_bindir}/trace
1828 %{_datadir}/perf-core/strace/groups/file
1829 %{_datadir}/perf-core/strace/groups/string
1830 %{_datadir}/doc/perf-tip/tips.txt
1831 %dir %{_libdir}/traceevent
1832 %dir %{_libdir}/traceevent/plugins
1833 %{_libdir}/traceevent/plugins/plugin_*
1834 %dir %{_prefix}/libexec/perf-core
1835 %{_prefix}/libexec/perf-core/*
1836 %{_mandir}/man[1-8]/perf*
1837 %{_sysconfdir}/bash_completion.d/perf
1838 %endif
1839
1840 %if %{build_cpupower}
1841 %files -n cpupower -f cpupower.lang
1842 %config(noreplace) %{_sysconfdir}/sysconfig/cpupower
1843 %{_bindir}/cpupower
1844 %{_datadir}/bash-completion/completions/cpupower
1845 %{_libdir}/libcpupower.so.0
1846 %{_libdir}/libcpupower.so.0.0.1
1847 %{_unitdir}/cpupower.service
1848 %{_mandir}/man[1-8]/cpupower*
1849
1850 %files -n cpupower-devel
1851 %{_libdir}/libcpupower.so
1852 %{_includedir}/cpuidle.h
1853 %{_includedir}/cpufreq.h
1854 %endif
1855
1856 %if %{build_bpftool}
1857 %files -n bpftool
1858 %{_sbindir}/bpftool
1859 %{_sysconfdir}/bash_completion.d/bpftool
1860 %{_mandir}/man8/bpftool-*.8*
1861 %{_mandir}/man8/bpftool.8*
1862 %endif
1863
1864 %if %{build_libbpf}
1865 %files -n %{_lib}bpf%{bpfmajor}
1866 %{_libdir}/libbpf.so.%{bpfmajor}{,.*}
1867
1868 %files -n %{_lib}bpf-devel
1869 %{_libdir}/libbpf.a
1870 %{_libdir}/libbpf.so
1871 %{_libdir}/pkgconfig/libbpf.pc
1872 %{_includedir}/bpf/bpf.h
1873 %{_includedir}/bpf/bpf_core_read.h
1874 %{_includedir}/bpf/bpf_endian.h
1875 %{_includedir}/bpf/bpf_helper_defs.h
1876 %{_includedir}/bpf/bpf_helpers.h
1877 %{_includedir}/bpf/bpf_tracing.h
1878 %{_includedir}/bpf/btf.h
1879 %{_includedir}/bpf/libbpf.h
1880 %{_includedir}/bpf/libbpf_common.h
1881 %{_includedir}/bpf/libbpf_legacy.h
1882 %{_includedir}/bpf/libbpf_version.h
1883 %{_includedir}/bpf/skel_internal.h
1884 %{_includedir}/bpf/usdt.bpf.h
1885 %endif

  ViewVC Help
Powered by ViewVC 1.1.30