Skip to content

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

Merged
thaJeztah merged 3 commits into
docker:masterfrom
thaJeztah:plugins_include_distro
Jan 11, 2023
Merged

[master] deb: buildx, compose: include packaging revision and distro version in version#822
thaJeztah merged 3 commits into
docker:masterfrom
thaJeztah:plugins_include_distro

Conversation

@thaJeztah
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member Author

Comment thread deb/common/rules
# 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
Copy Markdown
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}

Comment thread deb/common/rules
# 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
Copy Markdown
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