Skip to content
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

[master] deb: buildx, compose: include packaging revision and distro version in version #822

Merged
merged 3 commits into from
Jan 11, 2023

Conversation

thaJeztah
Copy link
Member

@thaJeztah thaJeztah commented Jan 11, 2023

deb: introduce PKG_REVISION variable

This variable can be used as packaging-revision in package versions

deb: buildx: include packaging revision and distro version in version

Aligning the plugin's version with the format used for docker-ce and
docker-ce-cli, as updated in 39772a7

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

deb: compose: include packaging revision and distro version in version

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

This variable can be used as packaging-revision in package versions

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:

    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 <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>
@thaJeztah thaJeztah changed the title deb: buildx, compose: include packaging revision and distro version in version [master] deb: buildx, compose: include packaging revision and distro version in version Jan 11, 2023
@thaJeztah
Copy link
Member Author

Thx!

I'll cherry-pick the compose changes to the 20.10 branch, so that we don't have a clash in package names if we release from that

@thaJeztah thaJeztah merged commit 7855700 into docker:master Jan 11, 2023
@thaJeztah thaJeztah deleted the plugins_include_distro branch January 11, 2023 20:25
@tianon
Copy link
Contributor

tianon commented Jan 11, 2023

		dh_gencontrol -pdocker-scan-plugin -- -v$${SCAN_DEB_VERSION#v}~$${DISTRO}-$${SUITE}; \

This needs to change too, right? (https://github.com/docker/docker-ce-packaging/pull/825/files#r1067525089)

@thaJeztah
Copy link
Member Author

@@ -111,11 +114,11 @@ 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}
Copy link
Contributor

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-buildx-plugin -- -v$${BUILDX_DEB_VERSION#v}-$${PKG_REVISION}~$${DISTRO}.$${VERSION_ID}-$${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)
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}
Copy link
Contributor

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-compose-plugin -- -v$${COMPOSE_DEB_VERSION#v}-$${PKG_REVISION}~$${DISTRO}.$${VERSION_ID}-$${SUITE}
dh_gencontrol -pdocker-compose-plugin -- -v$${COMPOSE_DEB_VERSION#v}-$${PKG_REVISION}~$${DISTRO}.$${VERSION_ID}~$${SUITE}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

docker-buildx-plugin packages use incorrect version format
3 participants