Skip to content

Commit

Permalink
pkgdep/git: Set bcc's git refspec
Browse files Browse the repository at this point in the history
When bcc is handled as a bpftrace's submodule, it's not able to
detect its own revision as it depends on .git/HEAD which does
not exist in such a case. This taints the build log with warn
similar to:

CMake Warning at cmake/version.cmake:31 (message):
  Could not extract major/minor/patch from revision EAD-HASH-NOTFOUND-
Call Stack (most recent call first):
  CMakeLists.txt:98 (include)
-- Revision is EAD-HASH-NOTFOUND- (major , minor , patch )

which at very best is just confusing so make sure the log is clean.

Change-Id: Id215174f3187ca1180abcf75a6eeab799d74808b
Signed-off-by: Michal Berger <[email protected]>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17636
Tested-by: SPDK CI Jenkins <[email protected]>
Reviewed-by: Kamil Godzwon <[email protected]>
Reviewed-by: Jim Harris <[email protected]>
Reviewed-by: Konrad Sztyber <[email protected]>
  • Loading branch information
mikeBashStuff authored and ksztyber committed May 15, 2023
1 parent 60305d0 commit 96e8630
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/common/config/pkgdep/git
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ function install_lcov() {
}

function install_bpftrace() {
local deps=()
local deps=() bcc_rev

deps+=(cereal-devel)
deps+=(clang-devel)
Expand Down Expand Up @@ -391,6 +391,11 @@ function install_bpftrace() {
sed -i -e 's/set(MAX_LLVM_MAJOR 15)/set(MAX_LLVM_MAJOR 16)/g' \
"$GIT_REPOS/bpftrace/CMakeLists.txt"
fi

bcc_rev=$(git -C "$GIT_REPOS/bpftrace/bcc" describe --tags --abbrev=0) bcc_rev=${bcc_rev#v}
echo "REVISION:STRING=$bcc_rev" >> "$GIT_REPOS/bpftrace/build/build-libs/bcc/CMakeCache.txt"


# Use build-libs.sh to build necessary libraries in the bpftrace tree
(cd $GIT_REPOS/bpftrace/build && ../build-libs.sh)

Expand Down

0 comments on commit 96e8630

Please sign in to comment.