From 3e7b469e3c5aaf5bc4bcaeee825e6a353b157fa3 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 11 Jan 2023 20:24:11 +0100 Subject: [PATCH 1/3] deb: introduce PKG_REVISION variable This variable can be used as packaging-revision in package versions Signed-off-by: Sebastiaan van Stijn --- deb/common/rules | 3 +++ 1 file changed, 3 insertions(+) diff --git a/deb/common/rules b/deb/common/rules index d9e53a6311..a948ed2bdd 100755 --- a/deb/common/rules +++ b/deb/common/rules @@ -2,6 +2,9 @@ VERSION ?= $(shell cat engine/VERSION) TARGET_ARCH = $(shell dpkg-architecture -qDEB_TARGET_ARCH) +# TODO(thaJeztah): allow passing this version when building. +PKG_REVISION ?= 1 +export PKG_REVISION # force packages to be built with xz compression, as Ubuntu 21.10 and up use # zstd compression, which is non-standard, and breaks 'dpkg-sig --verify' From a08b6b4a31dbee63c5c2d19ebba345f412176cd5 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 11 Jan 2023 19:22:38 +0100 Subject: [PATCH 2/3] deb: buildx: include packaging revision and distro version in version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Aligning the plugin's version with the format used for docker-ce and docker-ce-cli, as updated in 39772a761dfdf810cc23a1ec6084ea3100e6abf0 Before this patch: tree deb/debbuild/ deb/debbuild/ └── ubuntu-jammy ├── docker-buildx-plugin_0.10.0~ubuntu-jammy_arm64.deb ├── docker-ce-cli_23.0.0~rc.2-1~ubuntu.22.04~jammy_arm64.deb ├── docker-ce-rootless-extras_23.0.0~rc.2-1~ubuntu.22.04~jammy_arm64.deb ├── docker-ce_23.0.0~rc.2-1~ubuntu.22.04~jammy_arm64.deb └── docker-compose-plugin_2.15.1~ubuntu-jammy_arm64.deb With this patch: deb/debbuild/ └── ubuntu-jammy ├── docker-buildx-plugin_0.10.0-1~ubuntu.22.04-jammy_arm64.deb ├── docker-ce-cli_23.0.0~rc.2-1~ubuntu.22.04~jammy_arm64.deb ├── docker-ce-rootless-extras_23.0.0~rc.2-1~ubuntu.22.04~jammy_arm64.deb ├── docker-ce_23.0.0~rc.2-1~ubuntu.22.04~jammy_arm64.deb └── docker-compose-plugin_2.15.1~ubuntu-jammy_arm64.deb Signed-off-by: Sebastiaan van Stijn --- deb/common/rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deb/common/rules b/deb/common/rules index a948ed2bdd..4b147c3a12 100755 --- a/deb/common/rules +++ b/deb/common/rules @@ -114,7 +114,7 @@ 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_DEB_VERSION#v}~$${DISTRO}-$${SUITE} + dh_gencontrol -pdocker-buildx-plugin -- -v$${BUILDX_DEB_VERSION#v}-$${PKG_REVISION}~$${DISTRO}.$${VERSION_ID}-$${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) From cdca6d2276639516615cc726d7361d31aa0d0976 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 11 Jan 2023 20:23:23 +0100 Subject: [PATCH 3/3] deb: compose: include packaging revision and distro version in version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Aligning the plugin's version with the format used for docker-ce and docker-ce-cli, as updated in 39772a761dfdf810cc23a1ec6084ea3100e6abf0 Before this patch: deb/debbuild/ └── ubuntu-jammy ├── docker-buildx-plugin_0.10.0-1~ubuntu.22.04-jammy_arm64.deb ├── docker-ce-cli_23.0.0~rc.2-1~ubuntu.22.04~jammy_arm64.deb ├── docker-ce-rootless-extras_23.0.0~rc.2-1~ubuntu.22.04~jammy_arm64.deb ├── docker-ce_23.0.0~rc.2-1~ubuntu.22.04~jammy_arm64.deb └── docker-compose-plugin_2.15.1~ubuntu-jammy_arm64.deb With this patch: deb/debbuild/ └── ubuntu-jammy ├── docker-buildx-plugin_0.10.0-1~ubuntu.22.04-jammy_arm64.deb ├── docker-ce-cli_23.0.0~rc.2-1~ubuntu.22.04~jammy_arm64.deb ├── docker-ce-rootless-extras_23.0.0~rc.2-1~ubuntu.22.04~jammy_arm64.deb ├── docker-ce_23.0.0~rc.2-1~ubuntu.22.04~jammy_arm64.deb └── docker-compose-plugin_2.15.1-1~ubuntu.22.04-jammy_arm64.deb Signed-off-by: Sebastiaan van Stijn --- deb/common/rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deb/common/rules b/deb/common/rules index 4b147c3a12..2933c7bf63 100755 --- a/deb/common/rules +++ b/deb/common/rules @@ -118,7 +118,7 @@ override_dh_gencontrol: # 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_DEB_VERSION#v}~$${DISTRO}-$${SUITE} + dh_gencontrol -pdocker-compose-plugin -- -v$${COMPOSE_DEB_VERSION#v}-$${PKG_REVISION}~$${DISTRO}.$${VERSION_ID}-$${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)