Skip to content

[git] - Fixing installation from source with new version 2.55.0#1678

Merged
abdurriq merged 1 commit into
devcontainers:mainfrom
Kaniska244:git-feature-failed-install-src
Jun 30, 2026
Merged

[git] - Fixing installation from source with new version 2.55.0#1678
abdurriq merged 1 commit into
devcontainers:mainfrom
Kaniska244:git-feature-failed-install-src

Conversation

@Kaniska244

@Kaniska244 Kaniska244 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Starting with Git 2.55.0, the upstream build system enables Rust by default. As a result, the git feature's "from source" build (src/git/install.sh) now fails when it tries to compile the latest Git on images that don't ship a Rust toolchain.

This PR fixes installation from source by explicitly opting out of Rust during the build (NO_RUST=YesPlease), restoring successful builds for latest/current/lts and any pinned >= 2.55.0 version across all supported distros.
Reference: What's new in Git 2.55.0? — Evolution of Rust in the Git codebase

Problem

The git feature builds Git from source for non-OS-provided versions. Because this feature auto-detects and installs the latest stable Git, it began picking up 2.55.0, and the build now fails on images without a Rust toolchain — which is the case for the dependency sets installed in install.sh (Debian/Ubuntu, Alpine, and RHEL/Fedora/Mariner). None of these install Rust, so the default Rust-enabled build cannot complete.

Changes

  • src/git/install.sh — Add NO_RUST=YesPlease to the git_options passed to make, so the source build keeps working without requiring a Rust toolchain:

    git_options=("prefix=/usr/local")
    git_options+=("sysconfdir=/etc")
    git_options+=("USE_LIBPCRE=YesPlease")
    git_options+=("NO_RUST=YesPlease")
  • src/git/devcontainer-feature.json — Bump the feature version 1.3.51.3.6.

Why opt out instead of installing Rust?

Adding a full Rust toolchain to every build would significantly increase image build time and footprint across all supported distros, for a feature whose purpose is simply to provide an up-to-date Git binary. Opting out via NO_RUST keeps builds fast and lean while remaining fully supported by upstream for the 2.x series. This mirrors how several distro package recipes are handling the transition.

Follow-up / future work

NO_RUST is a temporary opt-out and is slated for removal in Git 3.0. Before Git 3.0 lands, this feature will need a follow-up to provision a Rust toolchain (or otherwise satisfy the Rust build requirement) so source builds continue to succeed. Tracking this as a known future task.

Testing

  • Build the latest Git (>= 2.55.0) from source on Debian/Ubuntu
  • Build on Alpine
  • Build on RHEL/Fedora/Mariner
  • Verify git version reports the expected >= 2.55.0 version after install

@Kaniska244 Kaniska244 marked this pull request as ready for review June 30, 2026 07:44
@Kaniska244 Kaniska244 requested a review from a team as a code owner June 30, 2026 07:44
@abdurriq abdurriq merged commit 0eb1750 into devcontainers:main Jun 30, 2026
12 checks passed
@Kaniska244 Kaniska244 deleted the git-feature-failed-install-src branch June 30, 2026 11:23
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.

2 participants