kernel.spec: build kernel tools for 64KB version

In order to build kernel tools for 64KB version,
partially revert commit 61bb128dae4c0 ("aarch64: support standalone 64kb PAGE_SIZE build").

Signed-off-by: Zheng Zengkai <zhengzengkai@huawei.com>
This commit is contained in:
Zheng Zengkai 2024-09-06 17:26:56 +08:00
parent 7be8255426
commit ed4b685c30

View File

@ -11,7 +11,7 @@
%global upstream_sublevel 0 %global upstream_sublevel 0
%global devel_release 248 %global devel_release 248
%global maintenance_release .0.0 %global maintenance_release .0.0
%global pkg_release .148 %global pkg_release .149
%define with_debuginfo 1 %define with_debuginfo 1
# Do not recompute the build-id of vmlinux in find-debuginfo.sh # Do not recompute the build-id of vmlinux in find-debuginfo.sh
@ -161,7 +161,6 @@ Requires: perl findutils
This package provides kernel headers and makefiles sufficient to build modules This package provides kernel headers and makefiles sufficient to build modules
against the %{KernelVer} kernel package. against the %{KernelVer} kernel package.
%if !%{with_64kb}
%package tools %package tools
Summary: Assortment of tools for the Linux kernel Summary: Assortment of tools for the Linux kernel
Provides: %{name}-tools-libs Provides: %{name}-tools-libs
@ -221,7 +220,6 @@ manipulation of eBPF programs and maps.
Summary: the kernel source Summary: the kernel source
%description source %description source
This package contains vaious source files from the kernel. This package contains vaious source files from the kernel.
%endif
%if 0%{?with_debuginfo} %if 0%{?with_debuginfo}
%define _debuginfo_template %{nil} %define _debuginfo_template %{nil}
@ -239,10 +237,6 @@ Debug information is useful when developing applications that use this\
package or when debugging this package.\ package or when debugging this package.\
%{nil} %{nil}
%if %{with_64kb}
%debuginfo_template -n kernel
%files -n kernel-debuginfo -f debugfiles.list
%else
%debuginfo_template -n kernel %debuginfo_template -n kernel
%files -n kernel-debuginfo -f debugfiles.list %files -n kernel-debuginfo -f debugfiles.list
@ -270,8 +264,6 @@ package or when debugging this package.\
%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} -p '.*%{python3_sitearch}/perf.*(.debug)?|XXX' -o python3-perf-debugfiles.list} %{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} -p '.*%{python3_sitearch}/perf.*(.debug)?|XXX' -o python3-perf-debugfiles.list}
#with_perf #with_perf
%endif %endif
#with_64kb
%endif
%endif %endif
%prep %prep
@ -456,7 +448,6 @@ make BPFTOOL=../../tools/bpf/bpftool/bpftool
popd popd
%install %install
%if !%{with_64kb}
%if 0%{?with_source} %if 0%{?with_source}
%define _python_bytecompile_errors_terminate_build 0 %define _python_bytecompile_errors_terminate_build 0
mkdir -p $RPM_BUILD_ROOT/usr/src/ mkdir -p $RPM_BUILD_ROOT/usr/src/
@ -464,7 +455,6 @@ popd
cp linux-%{KernelVer}/.config $RPM_BUILD_ROOT/usr/src/linux-%{KernelVer}/ cp linux-%{KernelVer}/.config $RPM_BUILD_ROOT/usr/src/linux-%{KernelVer}/
cp linux-%{KernelVer}/.scmversion $RPM_BUILD_ROOT/usr/src/linux-%{KernelVer}/ cp linux-%{KernelVer}/.scmversion $RPM_BUILD_ROOT/usr/src/linux-%{KernelVer}/
%endif %endif
%endif
cd linux-%{KernelVer} cd linux-%{KernelVer}
@ -673,7 +663,6 @@ popd
## install tools ## install tools
%if !%{with_64kb}
%if %{with_perf} %if %{with_perf}
# perf # perf
# perf tool binary and supporting scripts/binaries # perf tool binary and supporting scripts/binaries
@ -755,7 +744,6 @@ popd
pushd tools/netacc pushd tools/netacc
make INSTALL_ROOT=%{buildroot} install make INSTALL_ROOT=%{buildroot} install
popd popd
%endif
%define __spec_install_post\ %define __spec_install_post\
%{?__debug_package:%{__debug_install_post}}\ %{?__debug_package:%{__debug_install_post}}\
@ -812,7 +800,6 @@ then
done) done)
fi fi
%if !%{with_64kb}
%post -n %{name}-tools %post -n %{name}-tools
/sbin/ldconfig /sbin/ldconfig
%systemd_post cpupower.service %systemd_post cpupower.service
@ -823,7 +810,6 @@ fi
%postun -n %{name}-tools %postun -n %{name}-tools
/sbin/ldconfig /sbin/ldconfig
%systemd_postun cpupower.service %systemd_postun cpupower.service
%endif
%files %files
%defattr (-, root, root) %defattr (-, root, root)
@ -856,7 +842,6 @@ fi
%defattr (-, root, root) %defattr (-, root, root)
/usr/include/* /usr/include/*
%if !%{with_64kb}
%if %{with_perf} %if %{with_perf}
%files -n perf %files -n perf
%{_bindir}/perf %{_bindir}/perf
@ -946,10 +931,10 @@ fi
/usr/src/linux-%{KernelVer}/.scmversion /usr/src/linux-%{KernelVer}/.scmversion
%endif %endif
#with_64kb
%endif
%changelog %changelog
* Thu Feb 06 2025 Zheng Zengkai <zhengzengkai@huawei.com> - 5.10.0-248.0.0.149
- kernel.spec: build kernel tools for 64KB version
* Thu Feb 06 2025 Zheng Zengkai <zhengzengkai@huawei.com> - 5.10.0-248.0.0.148 * Thu Feb 06 2025 Zheng Zengkai <zhengzengkai@huawei.com> - 5.10.0-248.0.0.148
- kernel.spec: avoid kernel package name dependency by other software packages for 64KB page size kernel - kernel.spec: avoid kernel package name dependency by other software packages for 64KB page size kernel