diff --git a/deb/Makefile b/deb/Makefile index 6e040a595b..724cbeee57 100644 --- a/deb/Makefile +++ b/deb/Makefile @@ -5,6 +5,9 @@ GO_BASE_IMAGE=golang GO_IMAGE?=$(GO_BASE_IMAGE):$(GO_VERSION)-buster EPOCH?=5 GEN_DEB_VER=$(shell ./gen-deb-ver $(realpath $(CURDIR)/../src/github.com/docker/cli) "$(VERSION)") +GEN_BUILDX_DEB_VER=$(shell ./gen-deb-ver $(realpath $(CURDIR)/../src/github.com/docker/buildx) "$(DOCKER_BUILDX_REF)") +GEN_COMPOSE_DEB_VER=$(shell ./gen-deb-ver $(realpath $(CURDIR)/../src/github.com/docker/compose) "$(DOCKER_COMPOSE_REF)") +GEN_SCAN_DEB_VER=$(shell ./gen-deb-ver $(realpath $(CURDIR)/../src/github.com/docker/scan-cli-plugin) "$(DOCKER_SCAN_REF)") CLI_GITCOMMIT?=$(shell cd $(realpath $(CURDIR)/../src/github.com/docker/cli) && git rev-parse --short HEAD) ENGINE_GITCOMMIT?=$(shell cd $(realpath $(CURDIR)/../src/github.com/docker/docker) && git rev-parse --short HEAD) SCAN_GITCOMMIT?=$(shell cd $(realpath $(CURDIR)/../src/github.com/docker/scan-cli-plugin) && git rev-parse --short HEAD) @@ -34,9 +37,12 @@ RUN?=docker run --rm \ -e CLI_GITCOMMIT=$(CLI_GITCOMMIT) \ -e ENGINE_GITCOMMIT=$(ENGINE_GITCOMMIT) \ -e BUILDX_VERSION=$(DOCKER_BUILDX_REF) \ + -e BUILDX_DEB_VERSION=$(word 1, $(GEN_BUILDX_DEB_VER)) \ -e BUILDX_GITCOMMIT=$(BUILDX_GITCOMMIT) \ -e COMPOSE_VERSION=$(DOCKER_COMPOSE_REF) \ + -e COMPOSE_DEB_VERSION=$(word 1, $(GEN_COMPOSE_DEB_VER)) \ -e SCAN_VERSION=$(DOCKER_SCAN_REF) \ + -e SCAN_DEB_VERSION=$(word 1, $(GEN_SCAN_DEB_VER)) \ -e SCAN_GITCOMMIT=$(SCAN_GITCOMMIT) \ -v $(CURDIR)/debbuild/$@:/build \ $(RUN_FLAGS) \ diff --git a/deb/common/rules b/deb/common/rules index a610dac2d3..d9e53a6311 100755 --- a/deb/common/rules +++ b/deb/common/rules @@ -111,17 +111,17 @@ override_dh_install: override_dh_gencontrol: # Use separate version for the buildx-plugin package, then generate the other control files as usual # TODO override "Source" field in control as well (to point to buildx, as it doesn't match the package name) - dh_gencontrol -pdocker-buildx-plugin -- -v$${BUILDX_VERSION#v}~$${DISTRO}-$${SUITE} + dh_gencontrol -pdocker-buildx-plugin -- -v$${BUILDX_DEB_VERSION#v}~$${DISTRO}-$${SUITE} # Use separate version for the compose-plugin package, then generate the other control files as usual # TODO override "Source" field in control as well (to point to compose, as it doesn't match the package name) - dh_gencontrol -pdocker-compose-plugin -- -v$${COMPOSE_VERSION#v}~$${DISTRO}-$${SUITE} + dh_gencontrol -pdocker-compose-plugin -- -v$${COMPOSE_DEB_VERSION#v}~$${DISTRO}-$${SUITE} # Use separate version for the scan-plugin package, then generate the other control files as usual # TODO override "Source" field in control as well (to point to scan-cli-plugin, as it doesn't match the package name) # TODO change once we support scan-plugin on other architectures (see dpkg-architecture -L) if [ "$(TARGET_ARCH)" = "amd64" ]; then \ - dh_gencontrol -pdocker-scan-plugin -- -v$${SCAN_VERSION#v}~$${DISTRO}-$${SUITE}; \ + dh_gencontrol -pdocker-scan-plugin -- -v$${SCAN_DEB_VERSION#v}~$${DISTRO}-$${SUITE}; \ fi dh_gencontrol --remaining-packages