diff --git a/build/container/Makefile b/build/container/Makefile index 32fd8fa6..808a6c0f 100644 --- a/build/container/Makefile +++ b/build/container/Makefile @@ -105,24 +105,20 @@ $(BUILD_TARGETS): build-%: $(ARTIFACTS_ROOT) build-ubuntu%: BASE_DIST = $(*) build-ubuntu%: DOCKERFILE_SUFFIX := ubuntu build-ubuntu%: PACKAGE_DIST = ubuntu18.04 -build-ubuntu%: PACKAGE_VERSION := $(LIB_VERSION)$(if $(LIB_TAG),~$(LIB_TAG)) build-ubuntu%: LIBNVIDIA_CONTAINER0_DEPENDENCY=$(LIBNVIDIA_CONTAINER0_VERSION) build-ubi8: BASE_DIST := ubi8 build-ubi8: DOCKERFILE_SUFFIX := centos build-ubi8: PACKAGE_DIST = centos8 -build-ubi8: PACKAGE_VERSION := $(LIB_VERSION)-$(if $(LIB_TAG),0.1.$(LIB_TAG),1) build-centos7: BASE_DIST = $(*) build-centos7: DOCKERFILE_SUFFIX := centos build-centos7: PACKAGE_DIST = $(BASE_DIST) -build-centos7: PACKAGE_VERSION := $(LIB_VERSION)-$(if $(LIB_TAG),0.1.$(LIB_TAG),1) build-packaging: BASE_DIST := ubuntu20.04 build-packaging: DOCKERFILE_SUFFIX := packaging build-packaging: PACKAGE_ARCH := amd64 build-packaging: PACKAGE_DIST = all -build-packaging: PACKAGE_VERSION := $(LIB_VERSION)$(if $(LIB_TAG),-$(LIB_TAG)) # Test targets test-%: DIST = $(*) diff --git a/docker/docker.mk b/docker/docker.mk index 372a3a35..8250904e 100644 --- a/docker/docker.mk +++ b/docker/docker.mk @@ -88,8 +88,6 @@ docker-all: $(AMD64_TARGETS) $(X86_64_TARGETS) \ LIBNVIDIA_CONTAINER_VERSION ?= $(LIB_VERSION) LIBNVIDIA_CONTAINER_TAG ?= $(LIB_TAG) -LIB_VERSION := $(LIB_VERSION)$(if $(LIB_TAG),~$(LIB_TAG)) -PKG_REV := 1 LIBNVIDIA_CONTAINER_TOOLS_VERSION := $(LIBNVIDIA_CONTAINER_VERSION)$(if $(LIBNVIDIA_CONTAINER_TAG),~$(LIBNVIDIA_CONTAINER_TAG))-1 # private ubuntu target @@ -143,8 +141,8 @@ docker-build-%: --build-arg BASEIMAGE="$(BASEIMAGE)" \ --build-arg GOLANG_VERSION="$(GOLANG_VERSION)" \ --build-arg PKG_NAME="$(LIB_NAME)" \ - --build-arg PKG_VERS="$(LIB_VERSION)" \ - --build-arg PKG_REV="$(PKG_REV)" \ + --build-arg PKG_VERS="$(PACKAGE_VERSION)" \ + --build-arg PKG_REV="$(PACKAGE_REVISION)" \ --build-arg LIBNVIDIA_CONTAINER_TOOLS_VERSION="$(LIBNVIDIA_CONTAINER_TOOLS_VERSION)" \ --build-arg CONFIG_TOML_SUFFIX="$(CONFIG_TOML_SUFFIX)" \ --build-arg GIT_COMMIT="$(GIT_COMMIT)" \ diff --git a/versions.mk b/versions.mk index 5b2e7fd3..701d52b2 100644 --- a/versions.mk +++ b/versions.mk @@ -16,6 +16,11 @@ LIB_NAME := nvidia-container-toolkit LIB_VERSION := 1.13.0 LIB_TAG := rc.1 +# The package version is the combination of the library version and tag. +# If the tag is specified the two components are joined with a tilde (~). +PACKAGE_VERSION := $(LIB_VERSION)$(if $(LIB_TAG),~$(LIB_TAG)) +PACKAGE_REVISION := 1 + # Specify the nvidia-docker2 and nvidia-container-runtime package versions. # Note: The build tooling uses `LIB_TAG` above as the version tag. # This is appended to the versions below if specified.