Skip to content

release: make apt non-interactive in the build container - #312

Merged
pierre-warnier merged 1 commit into
mainfrom
fix/release-apt-noninteractive
Sep 15, 2026
Merged

pierre-warnier merged 1 commit into
mainfrom
fix/release-apt-noninteractive

Conversation

@pierre-warnier

Copy link
Copy Markdown
Collaborator

The 0.5.1 release pipeline failed on both architectures before building anything. dist installs the apt dependencies from dist-workspace.toml with a plain apt-get install, no -y, and inside the buildpack-deps container apt asked Do you want to continue? and answered itself Abort. That step is generated by dist and takes no flags (axodotdev/cargo-dist#2353); on GitHub's own runners it works only because their apt is configured to assume yes, which the container's is not. The same workflow built 0.5.0 eight days earlier on an earlier build of the same image.

Fix. dist's github-build-setup inserts steps into every build job before it installs dist and its dependencies. The one added here writes APT::Get::Assume-Yes "true" into the container's apt configuration and sets DEBIAN_FRONTEND=noninteractive, so dist's own line succeeds whatever the image does. release.yml regenerated with dist 0.33.0; the diff is the inserted step, landing before Install dist and Install dependencies.

Verified by running the step and then dist's exact apt line, stdin closed, in buildpack-deps:22.04: libpam0g-dev installs, exit 0, pam_appl.h present.

After merge the 0.5.1 tag is moved to the new main commit and the pipeline rerun; no release object or asset was ever published for the first attempt, so nothing downstream has seen the old tag.

The 0.5.1 pipeline failed on both architectures before building
anything: dist installs the apt dependencies from dist-workspace.toml
with a plain `apt-get install`, no `-y`, and inside the buildpack-deps
container apt asked "Do you want to continue?" and answered itself
"Abort". The step is generated by dist and takes no flags (axodotdev/
cargo-dist#2353); on GitHub's own runners it works only because their
apt is configured to assume yes, which the container's is not. The
same workflow built 0.5.0 eight days earlier on an earlier build of the
same image.

dist's github-build-setup inserts steps into every build job before it
installs dist and its dependencies. The one added here configures apt
the way the runners do and sets DEBIAN_FRONTEND, in the container, so
dist's own line succeeds whatever the image does. Verified by running
the step and then dist's exact apt line, stdin closed, in
buildpack-deps:22.04: libpam0g-dev installs, exit 0.

release.yml regenerated with dist 0.33.0; the diff is the inserted
step.
@pierre-warnier
pierre-warnier merged commit c6c2d8f into main Sep 15, 2026
13 checks passed
@pierre-warnier
pierre-warnier deleted the fix/release-apt-noninteractive branch September 15, 2026 09:34
pierre-warnier added a commit that referenced this pull request Sep 15, 2026
…ectory (#313)

GitHub reads every YAML file directly under .github/workflows as a
workflow. The build-setup file added for dist is a bare list of steps,
not a workflow, and GitHub reported it as a failing one on every push
to main since #312. dist resolves github-build-setup relative to
.github/workflows, so the file moves one directory down, where GitHub
does not look. release.yml regenerated: identical, the steps it inlines
are the same.
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.

1 participant