Commit 96e86305 authored by Michal Berger's avatar Michal Berger Committed by Konrad Sztyber
Browse files

pkgdep/git: Set bcc's git refspec



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: default avatarMichal Berger <michal.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17636


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarKamil Godzwon <kamilx.godzwon@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
parent 60305d01
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -356,7 +356,7 @@ function install_lcov() {
}

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

	deps+=(cereal-devel)
	deps+=(clang-devel)
@@ -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)