Repository navigation
fix: select APT Docker versions at literal component boundaries - #5
Merged
Merged
Conversation
Match the madison version field for Engine and CLI, preserving optional epochs, partial pins and Debian prerelease spelling. Add offline installer-flow regression coverage and a dedicated CI job. Inspired-by: docker#571 Signed-off-by: Su Yang <soulteary@users.noreply.github.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Problem
VERSION=24.0can select Docker 28.4.0 on Ubuntu noble because the existing lookup searches an entireapt-cache madisonrow and matches24.04in the distribution suffix. It can also confuse24.0.1with24.0.10, or22.0with22.02.1, because the requested version is interpreted as an unbounded regular expression.This change selects the first package whose version field begins with the requested literal Docker version at a component boundary. An unavailable pin follows the existing error path before package installation.
Changes
vshorthand, historical-cereleases, and Debian~pre-release spelling. Docker-pre-release separators are normalized to~before literal matching.grepcannot interpret later fragments as additional expressions.shandbash, and document what the checks establish.Validation
c57bd823: the first fixture fails and recordsdocker-ce=5:28.4.0-1~ubuntu.24.04~nobleforVERSION=24.0. With this change the same fixture recordsdocker-ce=5:24.0.9-1~ubuntu.24.04~noble.VERSION=24.0.1. The new helper selects 24.0.1.shandbashin an Ubuntu 24.04 container with networking disabled and a read-only repository mount. The installer executes its APT installation flow against package-list fixtures; platform detection is fixed, repository/configuration commands are intercepted, and the final package installation arguments are recorded instead of executed.sh -nandbash -npass for the installer and new regression script.git diff --checkpasses.These are offline selection checks. Live repository availability, package downloads, actual installation, and daemon startup have not been tested.
--dry-runstill does not resolve version pins and is not used as proof of selection. RPM selection and distribution/mirror support are outside this change; the existing behavior for a missing separate CLI package is retained.Source and attribution
Inspired by docker/docker-install#571, by fudianchn (付典), and its original signed-off commit. This is a fresh implementation that extends the reported fix with literal matching, version-component boundaries, and installer-flow regressions. The commit carries Su Yang's DCO sign-off.
Submission
This PR targets
soulteary/docker-install:main. A separate branch based on upstreammastercontains only this fix, without the fork's mirror changes. Open the upstream comparison for manual submission. No upstream PR has been created.