--- Makefile.orig 2021-02-19 09:28:00 UTC +++ Makefile @@ -49,7 +49,7 @@ GOLANGCI_LINT_OPTIONS ?= GOLANGCI_LINT_CONFIG ?= ${SOURCE_DIR}/.golangci.yml # Build information -BUNDLE_FLAGS ?= $(shell test -f ${SOURCE_DIR}/../.gdk-install-root && echo --no-deployment || echo --deployment) +BUNDLE_FLAGS ?= $(shell test -f ${SOURCE_DIR}/../.gdk-install-root && echo --no-deployment || echo --local) GITALY_PACKAGE := gitlab.com/gitlab-org/gitaly BUILD_TIME := $(shell date +"%Y%m%d.%H%M%S") GITALY_VERSION := $(shell git describe --match v* 2>/dev/null | sed 's/^v//' || cat ${SOURCE_DIR}/VERSION 2>/dev/null || echo unknown) @@ -174,7 +174,7 @@ all: INSTALL_DEST_DIR = ${SOURCE_DIR} all: install .PHONY: build -build: ${SOURCE_DIR}/.ruby-bundle libgit2 +build: ${SOURCE_DIR}/.ruby-bundle go install ${GO_LDFLAGS} -tags "${GO_BUILD_TAGS}" $(addprefix ${GITALY_PACKAGE}/cmd/, $(call find_commands)) .PHONY: install @@ -212,7 +212,7 @@ assemble-ruby: .PHONY: binaries binaries: assemble ${Q}if [ ${ARCH} != 'x86_64' ]; then echo Incorrect architecture for build: ${ARCH}; exit 1; fi - ${Q}cd ${ASSEMBLY_ROOT} && sha256sum bin/* | tee checksums.sha256.txt + ${Q}cd ${ASSEMBLY_ROOT} && sha256 bin/* | tee checksums.sha256.txt .PHONY: prepare-tests prepare-tests: git libgit2 prepare-test-repos ${SOURCE_DIR}/.ruby-bundle @@ -374,8 +374,7 @@ libgit2: ${LIBGIT2_INSTALL_DIR}/lib/libgit2.a # step. Both Omnibus and CNG assume it is in the Gitaly root, not in # _build. Hence the '../' in front. ${SOURCE_DIR}/.ruby-bundle: ${GITALY_RUBY_DIR}/Gemfile.lock ${GITALY_RUBY_DIR}/Gemfile - ${Q}cd ${GITALY_RUBY_DIR} && bundle config # for debugging - ${Q}cd ${GITALY_RUBY_DIR} && bundle install ${BUNDLE_FLAGS} + ${Q}cd ${GITALY_RUBY_DIR} && rm -f Gemfile.lock && bundle install ${BUNDLE_FLAGS} ${Q}touch $@ ${SOURCE_DIR}/NOTICE: ${BUILD_DIR}/NOTICE @@ -405,17 +404,17 @@ ${BUILD_DIR}/tools: | ${BUILD_DIR} # jobs of a CI pipeline, we start depending on its hash. Like this, we only # rebuild if the Makefile actually has changed contents. ${BUILD_DIR}/Makefile.sha256: Makefile | ${BUILD_DIR} - ${Q}sha256sum -c $@ >/dev/null 2>&1 || >$@ sha256sum Makefile + ${Q}sha256 -c $@ >/dev/null 2>&1 || >$@ sha256 Makefile ${BUILD_DIR}/protoc.zip: ${BUILD_DIR}/Makefile.sha256 ${Q}if [ -z "${PROTOC_URL}" ]; then echo "Cannot generate protos on unsupported platform ${OS}" && exit 1; fi curl -o $@.tmp --silent --show-error -L ${PROTOC_URL} - ${Q}printf '${PROTOC_HASH} $@.tmp' | sha256sum -c - + ${Q}printf '${PROTOC_HASH} $@.tmp' | sha256 -c - ${Q}mv $@.tmp $@ ${BUILD_DIR}/git_full_bins.tgz: ${BUILD_DIR}/Makefile.sha256 curl -o $@.tmp --silent --show-error -L ${GIT_BINARIES_URL} - ${Q}printf '${GIT_BINARIES_HASH} $@.tmp' | sha256sum -c - + ${Q}printf '${GIT_BINARIES_HASH} $@.tmp' | sha256 -c - ${Q}mv $@.tmp $@ ${LIBGIT2_INSTALL_DIR}/lib/libgit2.a: ${BUILD_DIR}/Makefile.sha256