-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[20.10 backport] fix plugin package versioning for compose #825
Merged
thaJeztah
merged 7 commits into
docker:20.10
from
thaJeztah:20.10_backport_compose_versioning
Jan 18, 2023
Merged
[20.10 backport] fix plugin package versioning for compose #825
thaJeztah
merged 7 commits into
docker:20.10
from
thaJeztah:20.10_backport_compose_versioning
Jan 18, 2023
Conversation
This file contains 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
Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit e49e4d7) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
For easier comparing :) Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit 0f8737c) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
We'll be using VERSION_ID in other places, so adding it in the Dockerfile makes sure it's always present, without having to depend on /etc/os-release. Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit e1551c7) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
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> (cherry picked from commit e8d994c) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This variable can be used as packaging-revision in package versions Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit 3e7b469) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Aligning the plugin's version with the format used for docker-ce and docker-ce-cli, as updated in 39772a7 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 <github@gone.nl> (cherry picked from commit cdca6d2) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
3 tasks
tianon
reviewed
Jan 11, 2023
tianon
reviewed
Jan 11, 2023
|
||
# 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}; \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
dh_gencontrol -pdocker-scan-plugin -- -v$${SCAN_DEB_VERSION#v}~$${DISTRO}-$${SUITE}; \ | |
dh_gencontrol -pdocker-scan-plugin -- -v$${SCAN_DEB_VERSION#v}-$${PKG_REVISION}~$${DISTRO}.$${VERSION_ID}~$${SUITE}; \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The scan changes will be handled in #826
Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit 9e92e21) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
tianon
approved these changes
Jan 11, 2023
Let me bring this one in so that the next build of the compose plugin has the new version format 👍 |
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.
Partial (as buildx package is not built in this branch) backports of: