From 8a748e32c258c19c74372dbbf7fcb0e8f6896b27 Mon Sep 17 00:00:00 2001 From: Michel Lind Date: Fri, 31 Jul 2026 11:53:05 +0100 Subject: [PATCH] fix to show SHA commit in help text - also ensure `make install` uses the right build flags - include all bundled projects' licenses Signed-off-by: Michel Lind --- wprof.spec | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/wprof.spec b/wprof.spec index 75eb082..d7a27d5 100644 --- a/wprof.spec +++ b/wprof.spec @@ -2,6 +2,11 @@ Version: 0.5 %forgemeta +# we need to declare this to show it in the version string +# since we 'backport' the first two commits after 0.5, just +# use the commit hash of the latest commit we use +%global wprof_commit 23cbea909d4365c804b1a8d3744d8afc2f314280 + # upstream build system requires the use of these sources %global blazesym_url https://github.com/libbpf/blazesym %global blazesym_commit ae290f612af8f0243b2a3f53ec7c0cf304e0bbad @@ -195,7 +200,7 @@ popd # build flags not set by default %set_build_flags %endif -%make_build -C src +%make_build -C src GIT_SHA=%{wprof_commit} for proj in blazesym src/demangle src/wpb; do pushd ${proj} @@ -206,18 +211,26 @@ for proj in blazesym src/demangle src/wpb; do done for proj in blazesym bpftool libbpf strobelight-libs usdt; do - mv ${proj}/LICENSE LICENSE.proj + mv ${proj}/LICENSE ./LICENSE.${proj} + # collect license texts, first one wins + if ls ${proj}/LICENSE.* >/dev/null 2>&1; then + mv -n ${proj}/LICENSE.* . + fi done %install -%make_install -C src prefix=%{_prefix} +%if 0%{?rhel} && 0%{?rhel} < 10 +# build flags not set by default +%set_build_flags +%endif +%make_install -C src prefix=%{_prefix} GIT_SHA=%{wprof_commit} %files -# strobelight-libs has the same licenses as libbpf -%license LICENSE* bpftool/LICENSE.* libbpf/LICENSE.* -%license blazesym/LICENSE.blazesym.dependencies src/demangle/LICENSE.demangle.dependencies src/wpb/LICENSE.wpb.dependencies +%license LICENSE* +# blazesym vendored deps already got collected earlier +%license src/demangle/LICENSE.demangle.dependencies src/wpb/LICENSE.wpb.dependencies %doc README.md UTRACE.md %{_bindir}/wprof