Skip to content

Vendor pinned GNU config scripts for Autoconf image - #1

Open
brettcannon with Copilot wants to merge 5 commits into
mainfrom
copilot/fix-gnu-config-script-download-failure
Open

Vendor pinned GNU config scripts for Autoconf image#1
brettcannon with Copilot wants to merge 5 commits into
mainfrom
copilot/fix-gnu-config-script-download-failure

Conversation

Copilot AI commented Sep 8, 2026

Copy link
Copy Markdown

Autoconf image builds were failing while BuildKit fetched pinned config.guess / config.sub from Savannah’s gitweb endpoint. Related upstream PRs showed the same shared download failure, not an action-specific regression.

  • GNU config inputs

    • Vendor config.guess and unpatched config.sub from GNU config revision 00b15927496058d23e6258a28d8996f87cf1f191.
    • Keep the existing pinned revision documented in the Dockerfile.
  • Docker build path

    • Replace remote Savannah ADD downloads with local executable COPY steps.
    COPY --chmod=755 config.guess /usr/local/share/autoconf/build-aux/config.guess
    COPY --chmod=755 config.sub /usr/local/share/autoconf/build-aux/config.sub
  • Patch behavior

    • Preserve the existing config.sub.patch flow for arm64_32 normalization and Apple simulator triples.

Co-authored-by: brettcannon <54418+brettcannon@users.noreply.github.com>
@brettcannon brettcannon changed the title [WIP] Validate and fix GNU config script download failure Vendor pinned GNU config scripts for Autoconf image Sep 8, 2026
Copilot AI requested a review from brettcannon September 8, 2026 21:34
Comment thread autoconf/config.guess Outdated

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this file being added when it wasn't necessary before?

Comment thread autoconf/config.sub Outdated

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this file being added when it wasn't necessary before?

Comment thread autoconf/Dockerfile Outdated
/usr/local/share/autoconf/build-aux/config.guess
ADD --chmod=755 https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=${CONFIG_GIT_REV} \
/usr/local/share/autoconf/build-aux/config.sub
COPY --chmod=755 config.guess /usr/local/share/autoconf/build-aux/config.guess

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Always download the file, don't check it in. Changing the environment variable should be all that's needed to update these files.

@brettcannon

Copy link
Copy Markdown
Owner

@copilot address the review comments

Co-authored-by: brettcannon <54418+brettcannon@users.noreply.github.com>

Copilot AI commented Sep 8, 2026

Copy link
Copy Markdown
Author

@copilot address the review comments

Addressed in ce00f70. The vendored files were removed, and the PR now keeps CONFIG_GIT_REV as the update point while switching the two downloads from gitweb to cgit. Local pre-commit and focused BuildKit URL checks passed; the new CI runs are awaiting approval.

@brettcannon
brettcannon marked this pull request as ready for review September 8, 2026 22:55
@brettcannon

Copy link
Copy Markdown
Owner

@copilot CI still fails

Co-authored-by: brettcannon <54418+brettcannon@users.noreply.github.com>

Copilot AI commented Sep 8, 2026

Copy link
Copy Markdown
Author

@copilot CI still fails

Addressed in f77c1e5. The failing job was still hitting BuildKit remote ADD cache-key fetches (config.sub returned 502), so I replaced the remote ADD steps with a pinned git fetch from the authoritative Savannah repo using CONFIG_GIT_REV, with bounded retries. The new workflow run is awaiting approval.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The PR title/description claims the scripts are vendored and copied via COPY, but the implementation still downloads them at build time via git fetch, so the PR metadata and code are materially out of sync.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review tier: Lite
Findings: 1 Low severity

New issues introduced by this change (1)
Severity Finding
Low severity autoconf/​Dockerfile — PR metadata says the pinned GNU config scripts are vendored and copied via `COPY --chmod=755…
What changed in this PR

Updates the Autoconf devcontainer image build to avoid failures when downloading pinned GNU config scripts from Savannah’s gitweb “blob_plain” endpoint, while keeping the pinned config.git revision and the existing config.sub patch flow.

Changes:

  • Replace remote ADD downloads of config.guess / config.sub with a git fetch-based retrieval and install into Autoconf’s build-aux directory.
  • Add a small retry/backoff loop around fetching the pinned CONFIG_GIT_REV.
File Description
autoconf/​Dockerfile Switches pinned GNU config script retrieval from ADD-from-gitweb to git fetch + install, preserving the pinned revision and downstream patch step.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread autoconf/Dockerfile Outdated
Comment thread autoconf/Dockerfile Outdated
RUN tmp=$(mktemp -d) \
&& git -C "$tmp" init \
&& git -C "$tmp" remote add origin https://git.savannah.gnu.org/git/config.git \
&& for attempt in {1..5}; do \

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot why the retries? Is that really the cause of the failures, or you're assuming and actually just using Git directly is enough?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call — the original failure was BuildKit ADD returning 502 while loading cache keys, not a proven transient git fetch issue. I removed the retry loop and kept a single pinned git fetch so the fix is just switching away from remote ADD behavior (8e3699d).

Co-authored-by: brettcannon <54418+brettcannon@users.noreply.github.com>
Copilot AI requested a review from brettcannon September 9, 2026 21:43
Comment thread autoconf/Dockerfile
Comment on lines +50 to +52
&& git -C "$tmp" init \
&& git -C "$tmp" remote add origin https://git.savannah.gnu.org/git/config.git \
&& git -C "$tmp" fetch --depth=1 origin "$CONFIG_GIT_REV" \

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot should a sparse checkout be used?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessary here. We already fetch a single pinned commit (--depth=1 + CONFIG_GIT_REV) and only check out config.guess/config.sub, so sparse checkout would add setup complexity without meaningful benefit.

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.

3 participants