Skip to content

fix(build): resolve podman at /usr/local/bin - #4880

Closed
castrojo wants to merge 1 commit into
mainfrom
castrojo/fix-podman-path
Closed

fix(build): resolve podman at /usr/local/bin#4880
castrojo wants to merge 1 commit into
mainfrom
castrojo/fix-podman-path

Conversation

@castrojo

@castrojo castrojo commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Problem

Every Latest Images build has been failing:

> [base 1/4] FROM ghcr.io/ublue-os/silverblue-main:44@sha256:da9d42d...
ERROR: failed to build: failed to solve: failed to register layer: max depth exceeded

Root cause

GitHub's ubuntu-24.04 runner image bumped from 20260720.247.2 to 20260804.265.1. Per install-container-tools.sh, podman is no longer installed via apt — it now ships as a static bundle at /usr/local/bin/podman (4.9.3 → 5.8.4). Only buildah, skopeo and uidmap still come from apt, and none of them pull in podman, so /usr/bin/podman no longer exists.

The Justfile probed /usr/bin/podman only, so it silently fell through to docker.

Docker's overlay2 driver caps stacked lower dirs at 128. Layer counts:

Image Layers
silverblue-main:43 99
silverblue-main:44 259

F43 squeaked under the cap, so the fallback went unnoticed. F44 does not, and the build dies at the FROM line before running a single build script.

Evidence that podman is fine with the identical base — the passing Stable job on the older runner:

+ /usr/bin/podman build --build-arg IMAGE_FLAVOR=dx ...
[4/4] STEP 1/16: FROM ghcr.io/ublue-os/silverblue-main:44 AS base

vs. the failing Latest job on the new runner:

+ docker build --build-arg IMAGE_FLAVOR=dx ...
#0 building with "default" instance using docker driver

Same base image, same recipe — only the builder differs.

Fix

Probe /usr/local/bin/podman before falling back to docker. Line 19 of the Justfile is the only place in the repo hardcoding these paths.

Verification

Exercised every branch against a sandboxed path tree with just --evaluate:

Scenario Resolves to PULL_POLICY
podman in /usr/bin (old runner) /usr/bin/podman newer
podman in /usr/local/bin (new runner) /usr/local/bin/podman newer
docker only docker missing
nothing installed exit 1 ;
PODMAN=/custom/podman /custom/podman

Only the second row changes behavior; everything else is byte-identical to before. just check and pre-commit pass.

Notes

Not adopting aurora's buildah + BTRFS-loopback pipeline here — that repo is green on the same 257-layer F44 base, but its approach changes storage, caching and build semantics. Bluefin's existing podman build handles the base fine once it's actually found.

Follow-ups worth considering separately (all pre-existing):

  • The docker fallback is now a silent downgrade to a builder that cannot build these images. It should probably warn or fail loudly rather than degrade into a cryptic max depth exceeded an hour later.
  • PULL_POLICY := if PODMAN =~ "docker" is a substring test; a path like /opt/docker-tools/podman would be misclassified.

Assisted-by: Claude Opus 5 via GitHub Copilot CLI

GitHub's ubuntu-24.04 runner image 20260804.265 replaced the apt podman
package with a static bundle installed to /usr/local/bin/podman. The
Justfile only probed /usr/bin/podman, so it silently fell back to docker.

Docker's overlay2 driver caps stacked lower dirs at 128, and
silverblue-main:44 has 259 layers, so every Latest build died with
"failed to register layer: max depth exceeded" before running a single
build script. Podman has no such limit and builds the same base fine.

Probe /usr/local/bin/podman before falling back to docker. Existing
resolution order and the PODMAN env override are unchanged.

Assisted-by: Claude Opus 5 via GitHub Copilot CLI

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@castrojo
castrojo requested a review from p5 as a code owner August 7, 2026 01:02
Copilot AI lite review requested due to automatic review settings August 7, 2026 01:02
@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. area/just Justfile things kind/bug Something isn't working labels Aug 7, 2026
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Copilot AI left a comment

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.

Pull request overview

Updates Bluefin’s build orchestration (Justfile) to correctly prefer Podman on newer GitHub-hosted runners where Podman is shipped as a static binary under /usr/local/bin, preventing unintended fallback to Docker (and avoiding Docker’s overlay2 layer-depth limitation when building Fedora 44–based images).

Changes:

  • Extend the Podman detection logic to probe /usr/local/bin/podman before falling back to Docker.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Justfile
export SUDOIF := if `id -u` == "0" { "" } else { "sudo" }
export PODMAN := if path_exists("/usr/bin/podman") == "true" { env("PODMAN", "/usr/bin/podman") } else if path_exists("/usr/bin/docker") == "true" { env("PODMAN", "docker") } else { env("PODMAN", "exit 1 ; ") }
export PODMAN := if path_exists("/usr/bin/podman") == "true" { env("PODMAN", "/usr/bin/podman") } else if path_exists("/usr/local/bin/podman") == "true" { env("PODMAN", "/usr/local/bin/podman") } else if path_exists("/usr/bin/docker") == "true" { env("PODMAN", "docker") } else { env("PODMAN", "exit 1 ; ") }
export PULL_POLICY := if PODMAN =~ "docker" { "missing" } else { "newer" }
@castrojo

castrojo commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator Author

Superseded by #4881, which moved builds to ubuntu-26.04 where podman is installed from apt at /usr/bin/podman. The /usr/local/bin probe was only needed for the ubuntu-24.04 static bundle layout, so this is now speculative. Closing as redundant.

@castrojo castrojo closed this Aug 7, 2026
@castrojo
castrojo deleted the castrojo/fix-podman-path branch August 7, 2026 01:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/just Justfile things kind/bug Something isn't working size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants