From b3d1694a02c1d4339f5b6f60c2f77464200df3fc Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Wed, 13 Nov 2024 20:08:13 +0800 Subject: [PATCH] dist: spec: Include bpftool man pages with correct extension in bpftool RPM The previous kernel RPM spec file did not accurately specify the extension for bpftool man pages. This could lead to build errors on certain architectures where the generated man pages might use a different extension than the expected `.gz`. For example, on LoongArch, building a kernel RPM could result in the following errors: Error: File not found: ... /loongarch64/usr/share/man/man8/bpftool.8.gz Error: File not found: ... /loongarch64/usr/share/man/man8/bpftool-*.8.gz This is because the bpftool man pages are actually generated with the `.zst` extension on LoongArch: bpftool.8.zst bpftool-cgroup.8.zst bpftool-gen.8.zst bpftool-link.8.zst ... This commit modifies the kernel.template.spec file to use a wildcard extension when including bpftool man pages. This ensures that all generated man pages are included in the RPM package, regardless of their extension. Signed-off-by: Ming Wang --- dist/templates/kernel.template.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/templates/kernel.template.spec b/dist/templates/kernel.template.spec index ce8557b02f01..8de1b8c7abe3 100644 --- a/dist/templates/kernel.template.spec +++ b/dist/templates/kernel.template.spec @@ -1650,8 +1650,8 @@ fi %defattr(-,root,root) %{_sbindir}/bpftool %{_sysconfdir}/bash_completion.d/bpftool -%{_mandir}/man8/bpftool.8.gz -%{_mandir}/man8/bpftool-*.8.gz +%{_mandir}/man8/bpftool.8.* +%{_mandir}/man8/bpftool-*.8.* %if %{with_debuginfo} %files -f bpftool-debuginfo.list -n bpftool-debuginfo -- Gitee