[master] deb: fix plugin versions to have correct format for deb packages#820
Merged
Merged
Conversation
We already had code for this in the RPM packages, but were missing this
in the deb variants. Because of this, pre-release packages used a hyphen
(-) as separator for pre-releases, which get sorted as a "higher" version
than a non-pre-release:
dpkg --compare-versions "0.10.0" ">>" "0.10.0-rc2" && echo "OK" || echo "KO"
KO
With this patch, the packages have a correctly formatted version, using
a tilde (~) as separator for the pre-release suffix:
make DOCKER_CLI_REF=f163d2441e214176db89c63ffc557012113e28d8 DOCKER_ENGINE_REF=9fd3a437a6027637301b0952f7578644d7dff321 VERSION=23.0.0-rc.2 ubuntu-jammy
tree deb/debbuild/
deb/debbuild/
└── ubuntu-jammy
├── docker-buildx-plugin_0.10.0~rc2~ubuntu-jammy_arm64.deb
├── docker-ce-cli_23.0.0~rc.2-0~ubuntu.22.04.0~jammy_arm64.deb
├── docker-ce-rootless-extras_23.0.0~rc.2-0~ubuntu.22.04.0~jammy_arm64.deb
├── docker-ce_23.0.0~rc.2-0~ubuntu.22.04.0~jammy.dsc
├── docker-ce_23.0.0~rc.2-0~ubuntu.22.04.0~jammy.tar.gz
├── docker-ce_23.0.0~rc.2-0~ubuntu.22.04.0~jammy_arm64.buildinfo
├── docker-ce_23.0.0~rc.2-0~ubuntu.22.04.0~jammy_arm64.changes
├── docker-ce_23.0.0~rc.2-0~ubuntu.22.04.0~jammy_arm64.deb
└── docker-compose-plugin_2.15.1~ubuntu-jammy_arm64.deb
Using a tilde makes sure that pre-releases are sorted correctly:
dpkg --compare-versions "0.10.0" ">>" "0.10.0~rc2" && echo "OK" || echo "KO"
OK
The version reported through `docker buildx version` still uses the version
as tagged in the repository (using a hyphen (-));
make IMAGE=ubuntu:jammy verify
+ verify_binaries
...
+ docker buildx version
github.com/docker/buildx v0.10.0-rc2 64e4c19
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Member
Author
|
@crazy-max @tianon ptal (one more change coming after this) |
crazy-max
approved these changes
Jan 11, 2023
Member
Author
|
Thx! Let me get this one in, and work on the final bits 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We already had code for this in the RPM packages, but were missing this in the deb variants. Because of this, pre-release packages used a hyphen (-) as separator for pre-releases, which get sorted as a "higher" version than a non-pre-release:
With this patch, the packages have a correctly formatted version, using a tilde (~) as separator for the pre-release suffix:
Using a tilde makes sure that pre-releases are sorted correctly:
The version reported through
docker buildx versionstill uses the version as tagged in the repository (using a hyphen (-));