diff --git a/SPECS/kernel-6.0.spec b/SPECS/kernel-6.0.spec index 1fdb1f4..76d0133 100755 --- a/SPECS/kernel-6.0.spec +++ b/SPECS/kernel-6.0.spec @@ -1,7 +1,7 @@ %global __spec_install_pre %{___build_pre} # Define the version of the Linux Kernel Archive tarball. -%define LKAver 6.0 +%define LKAver 6.0.1 # Define the buildid, if required. #define buildid . @@ -114,8 +114,8 @@ # # Packages that need to be installed before the kernel because the %%post scripts make use of them. # -%define kernel_prereq coreutils, module-init-tools >= 3.16-2, initscripts >= 8.11.1-1, grubby >= 8.28-2 -%define initrd_prereq dracut >= 001-7 +%define kernel_prereq coreutils, systemd >= 203-2, /usr/bin/kernel-install +%define initrd_prereq dracut >= 027 Name: kernel Summary: The Linux kernel. (The core of any Linux-based operating system.) @@ -555,9 +555,17 @@ BuildKernel /usr/bin/find Documentation -type d | xargs %{__chmod} u+w %endif +%if %{with_bpftool} +# Generate a vmlinux.h file. +bpftool btf dump file vmlinux format c > tools/bpf/bpftool/vmlinux.h +RPM_VMLINUX_H=vmlinux.h +%endif + + %if %{with_perf} %global perf_make \ - %{__make} -s -C tools/perf %{?_smp_mflags} WERROR=0 NO_LIBUNWIND=1 HAVE_CPLUS_DEMANGLE=1 NO_GTK2=1 NO_STRLCPY=1 prefix=%{_prefix} + %{__make} -s -C tools/perf NO_PERF_READ_VDSO32=1 NO_PERF_READ_VDSOX32=1 WERROR=0 NO_LIBUNWIND=1 HAVE_CPLUS_DEMANGLE=1 NO_GTK2=1 NO_STRLCPY=1 NO_BIONIC=1 LIBTRACEEVENT_DYNAMIC=1 %{?perf_build_extra_opts} prefix=%{_prefix} PYTHON=%{__python3} + %{perf_make} all %{perf_make} man @@ -571,17 +579,35 @@ pushd tools/power/cpupower > /dev/null popd > /dev/null %ifarch x86_64 pushd tools/power/cpupower/debug/x86_64 > /dev/null -%{__make} -s %{?_smp_mflags} centrino-decode +%{__make} -s %{?_smp_mflags} centrino-decode powernow-k8-decode popd > /dev/null pushd tools/power/x86/x86_energy_perf_policy > /dev/null -%{__make} -s +%{__make} -s %{?_smp_mflags} popd > /dev/null pushd tools/power/x86/turbostat > /dev/null -%{__make} -s +%{__make} -s %{?_smp_mflags} +popd > /dev/null +pushd tools/power/x86/intel-speed-select > /dev/null +%{__make} -s %{?_smp_mflags} popd > /dev/null %endif pushd tools/thermal/tmon > /dev/null -%{__make} -s +%{__make} -s %{?_smp_mflags} +popd > /dev/null +pushd tools/iio > /dev/null +%{__make} -s %{?_smp_mflags} +popd > /dev/null +pushd tools/gpio > /dev/null +%{__make} -s %{?_smp_mflags} +popd > /dev/null +pushd tools/vm > /dev/null +%{__make} -s %{?_smp_mflags} slabinfo page_owner_sort +popd > /dev/null +%endif + +%if %{with_bpftool} +pushd tools/bpf/bpftool > /dev/null +%{__make} -s EXTRA_CFLAGS="${RPM_OPT_FLAGS}" EXTRA_LDFLAGS="%{__global_ldflags}" DESTDIR=$RPM_BUILD_ROOT VMLINUX_H="${RPM_VMLINUX_H}" popd > /dev/null %endif @@ -649,6 +675,7 @@ mv cpupower.lang ../ %ifarch x86_64 pushd tools/power/cpupower/debug/x86_64 > /dev/null %{__install} -m755 centrino-decode %{buildroot}%{_bindir}/centrino-decode +%{__install} -m755 powernow-k8-decode %{buildroot}%{_bindir}/powernow-k8-decode popd > /dev/null %endif %{__chmod} 0755 %{buildroot}%{_libdir}/libcpupower.so* @@ -658,16 +685,39 @@ popd > /dev/null %{__mkdir_p} %{buildroot}%{_mandir}/man8 %ifarch x86_64 pushd tools/power/x86/x86_energy_perf_policy > /dev/null -%{__make} -s DESTDIR=%{buildroot} install +%{__make} -s %{?_smp_mflags} DESTDIR=%{buildroot} install popd > /dev/null pushd tools/power/x86/turbostat > /dev/null -%{__make} -s DESTDIR=%{buildroot} install +%{__make} -s %{?_smp_mflags} DESTDIR=%{buildroot} install popd > /dev/null %endif pushd tools/thermal/tmon > /dev/null %{__install} -m755 tmon %{buildroot}%{_bindir}/tmon popd > /dev/null %endif +pushd tools/iio > /dev/null +%{__make} -s %{?_smp_mflags} DESTDIR=$RPM_BUILD_ROOT install +popd > /dev/null +pushd tools/gpio > /dev/null +%{__make} -s %{?_smp_mflags} DESTDIR=$RPM_BUILD_ROOT install +popd > /dev/null +install -m644 -D %{SOURCE2002} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/kvm_stat +pushd tools/kvm/kvm_stat > /dev/null +%{__make} -s INSTALL_ROOT=$RPM_BUILD_ROOT install-tools +%{__make} -s INSTALL_ROOT=$RPM_BUILD_ROOT install-man +install -m644 -D kvm_stat.service $RPM_BUILD_ROOT%{_unitdir}/kvm_stat.service +popd > /dev/null +pushd tools/vm > /dev/null +install -m755 slabinfo $RPM_BUILD_ROOT%{_bindir}/slabinfo +install -m755 page_owner_sort $RPM_BUILD_ROOT%{_bindir}/page_owner_sort +popd > /dev/null +%endif + +%if %{with_bpftool} +pushd tools/bpf/bpftool > /dev/null +%{bpftool_make} prefix=%{_prefix} bash_compdir=%{_sysconfdir}/bash_completion.d/ mandir=%{_mandir} install doc-install +popd > /dev/null +%endif %if %{with_bootwrapper} make DESTDIR=$RPM_BUILD_ROOT bootwrapper_install WRAPPER_OBJDIR=%{_libdir}/kernel-wrapper WRAPPER_DTSDIR=%{_libdir}/kernel-wrapper/dts @@ -689,19 +739,25 @@ popd > /dev/null # Scripts section. %if %{with_default} %posttrans -%{_sbindir}/new-kernel-pkg --package %{name} --mkinitrd --dracut --depmod --update %{version}-%{release}.%{_target_cpu} || exit $? -%{_sbindir}/new-kernel-pkg --package %{name} --rpmposttrans %{version}-%{release}.%{_target_cpu} || exit $? -if [ -x %{_sbindir}/weak-modules ]; then - %{_sbindir}/weak-modules --add-kernel %{version}-%{release}.%{_target_cpu} || exit $? -fi +if [ -x %{_sbindir}/weak-modules ] +then + %{_sbindir}/weak-modules --add-kernel %{KVERREL}%{?1:+%{1}} || exit $? +fi\ +/bin/kernel-install add %{KVERREL}%{?1:+%{1}} /lib/modules/%{KVERREL}%{?1:+%{1}}/vmlinuz || exit $? %post -%{_sbindir}/new-kernel-pkg --package %{name} --install %{version}-%{release}.%{_target_cpu} || exit $? +if [ -x %{_sbindir}/weak-modules ] +then + %{_sbindir}/weak-modules --add-kernel %{KVERREL}%{?1:+%{1}} || exit $? +fi +/bin/kernel-install add %{KVERREL}%{?1:+%{1}} /lib/modules/%{KVERREL}%{?1:+%{1}}/vmlinuz || exit $? +/sbin/depmod -a %{KVERREL}%{?1:+%{1}} %preun -%{_sbindir}/new-kernel-pkg --rminitrd --rmmoddep --remove %{version}-%{release}.%{_target_cpu} || exit $? -if [ -x %{_sbindir}/weak-modules ]; then - %{_sbindir}/weak-modules --remove-kernel %{version}-%{release}.%{_target_cpu} || exit $? +/bin/kernel-install remove %{KVERREL}%{?1:+%{1}} /lib/modules/%{KVERREL}%{?1:+%{1}}/vmlinuz || exit $? +if [ -x %{_sbindir}/weak-modules ] +then + %{_sbindir}/weak-modules --remove-kernel %{KVERREL}%{?1:+%{1}} || exit $? fi %post devel @@ -810,12 +866,27 @@ fi %{_datadir}/bash-completion/completions/cpupower %ifarch x86_64 %{_bindir}/centrino-decode +%{_bindir}/powernow-k8-decode %{_bindir}/x86_energy_perf_policy %{_mandir}/man8/x86_energy_perf_policy* %{_bindir}/turbostat %{_mandir}/man8/turbostat* +%{_bindir}/intel-speed-select %endif %{_bindir}/tmon +%{_bindir}/iio_event_monitor +%{_bindir}/iio_generic_buffer +%{_bindir}/lsiio +%{_bindir}/lsgpio +%{_bindir}/gpio-hammer +%{_bindir}/gpio-event-mon +%{_bindir}/gpio-watch +%{_mandir}/man1/kvm_stat* +%{_bindir}/kvm_stat +%{_unitdir}/kvm_stat.service +%config(noreplace) %{_sysconfdir}/logrotate.d/kvm_stat +%{_bindir}/page_owner_sort +%{_bindir}/slabinfo %files -n %{name}-tools-libs %defattr(-,root,root) @@ -835,4 +906,23 @@ fi %{_libdir}/kernel-wrapper %endif +%if %{with_bpftool} +%files -n bpftool +%{_sbindir}/bpftool +%{_sysconfdir}/bash_completion.d/bpftool +%{_mandir}/man8/bpftool-cgroup.8.gz +%{_mandir}/man8/bpftool-gen.8.gz +%{_mandir}/man8/bpftool-iter.8.gz +%{_mandir}/man8/bpftool-link.8.gz +%{_mandir}/man8/bpftool-map.8.gz +%{_mandir}/man8/bpftool-prog.8.gz +%{_mandir}/man8/bpftool-perf.8.gz +%{_mandir}/man8/bpftool.8.gz +%{_mandir}/man8/bpftool-net.8.gz +%{_mandir}/man8/bpftool-feature.8.gz +%{_mandir}/man8/bpftool-btf.8.gz +%{_mandir}/man8/bpftool-struct_ops.8.gz +%endif + + %changelog