Skip to content
This repository has been archived by the owner on Mar 26, 2020. It is now read-only.

Commit

Permalink
build: Use random build id
Browse files Browse the repository at this point in the history
Using Git hash leaves all built binaries (glusterd2 & glustercli) with
the same build-id, which causes rpmbuild to fail.
  • Loading branch information
kshlm authored and Atin Mukherjee committed Dec 11, 2018
1 parent cf00bdf commit 755eff7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ GIT_SHA=${GIT_SHA:-$(git rev-parse --short HEAD || echo "undefined")}
GIT_SHA_FULL=${GIT_SHA_FULL:-$(git rev-parse HEAD || echo "undefined")}

LDFLAGS="-X ${REPO_PATH}/version.GlusterdVersion=${VERSION} -X ${REPO_PATH}/version.GitSHA=${GIT_SHA}"
LDFLAGS+=" -B 0x${GIT_SHA_FULL}"
LDFLAGS+=" -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')"

if [ "$BIN" == "glusterd2" ]; then
LDFLAGS+=" -X main.defaultPathPrefix=${BASE_PREFIX}"
Expand Down

0 comments on commit 755eff7

Please sign in to comment.