From 031cd3b2138f95d855b22e4a259087283659c389 Mon Sep 17 00:00:00 2001 From: Thomas Parrott Date: Thu, 24 Oct 2024 10:37:16 +0100 Subject: [PATCH] Makefile: Use dqlite lts-1.17.x when building deps and making dist tarball And log what is happening. Signed-off-by: Thomas Parrott (cherry picked from commit 46e0a4aab8ef209c725adb2f773fbfae842fb816) --- Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 6fc5031cc032..1b9e839e1eb6 100644 --- a/Makefile +++ b/Makefile @@ -11,6 +11,7 @@ GOPATH ?= $(shell go env GOPATH) CGO_LDFLAGS_ALLOW ?= (-Wl,-wrap,pthread_create)|(-Wl,-z,now) SPHINXENV=doc/.sphinx/venv/bin/activate GOMIN=1.22.7 +DQLITE_BRANCH=lts-1.17.x ifneq "$(wildcard vendor)" "" DQLITE_PATH=$(CURDIR)/vendor/dqlite @@ -57,8 +58,10 @@ lxd-migrate: deps: # dqlite (+raft) @if [ ! -e "$(DQLITE_PATH)" ]; then \ - git clone --depth=1 "https://github.com/canonical/dqlite" "$(DQLITE_PATH)"; \ + echo "Retrieving dqlite from ${DQLITE_BRANCH} branch"; \ + git clone --depth=1 --branch "${DQLITE_BRANCH}" "https://github.com/canonical/dqlite" "$(DQLITE_PATH)"; \ elif [ -e "$(DQLITE_PATH)/.git" ]; then \ + echo "Updating existing dqlite branch"; \ cd "$(DQLITE_PATH)"; git pull; \ fi @@ -191,7 +194,7 @@ dist: doc (cd $(TMP)/lxd-$(VERSION) ; go mod vendor) # Download the dqlite library - git clone --depth=1 https://github.com/canonical/dqlite $(TMP)/lxd-$(VERSION)/vendor/dqlite + git clone --depth=1 --branch "${DQLITE_BRANCH}" https://github.com/canonical/dqlite $(TMP)/lxd-$(VERSION)/vendor/dqlite (cd $(TMP)/lxd-$(VERSION)/vendor/dqlite ; git show-ref HEAD | cut -d' ' -f1 > .gitref) # Copy doc output