Skip to contentSkip to conversation

ci: fix jobs failing on Ubuntu 26.04

PATCH In review Harald Nordgren via GitGitGadget 2 participants 5 messages Nov 1 – Nov 3

lore
Share & tools
lore
#0 lore raw

cover ci: fix jobs failing on Ubuntu 26.04

Four CI jobs fail since ubuntu-latest moved to Ubuntu 26.04.

* documentation, fuzz smoke test and static-analysis fail with ln: failed to create symbolic link '/usr/bin/dirname': Already exists. Run the ln with sudo.
* linux32 cannot resolve deb.debian.org. Pin it to ubuntu-24.04. The Docker update in actions/runner-images#15205 fixes this on 26.04, but a new runner image will take a long time to roll out, and CI should not stay broken while we wait.
* Use apt-get in linux32 to get rid of the apt does not have a stable CLI interface warnings.

The first two are based on Johannes Schindelin's fixes in Git for Windows (git-for-windows/git#6473).

Harald Nordgren (3):
ci: use apt-get in the linux32 job
install-dependencies: work around a permission problem
ci: pin linux32 to ubuntu-24.04 to restore networking

 .github/workflows/main.yml | 6 ++++--
 ci/install-dependencies.sh | 2 +-
 2 files changed, 5 insertions(+), 3 deletions(-)

base-commit: 50fe5cc63f9cd6e89b87a2c9ccf96a444f4cfdb7
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2478%2FHaraldNordgren%2Fci-linux32-apt-get-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2478/HaraldNordgren/ci-linux32-apt-get-v1
Pull-Request: https://github.com/git/git/pull/2478

Signature · 1 line
gitgitgadget
#1 lore raw

PATCH 1/3 ci: use apt-get in the linux32 job

From: Harald Nordgren <[email protected]>

The linux32 job prints

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

twice, once for "apt update" and once for "apt install". apt is meant for interactive use. Call apt-get instead, like ci/install-dependencies.sh already does.

---
 .github/workflows/main.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
.github/workflows/main.yml +1 -1
index d488fd10db..b564927e2c 100644
@@ -449,7 +449,7 @@ jobs:
     steps:
     - name: prepare libc6 for actions
       if: matrix.vector.jobname == 'linux32'
-      run: apt -q update && apt -q -y install libc6-amd64 lib64stdc++6
+      run: apt-get -q update && apt-get -q -y install libc6-amd64 lib64stdc++6
     - name: install git in container
       run: |
         if command -v git
Signature · 1 line
gitgitgadget
#2 lore raw

PATCH 2/3 install-dependencies: work around a permission problem

In reply to Harald Nordgren via GitGitGadget

From: Harald Nordgren <[email protected]>

When replacing dirname, elevation is required, otherwise the command will fail with:

+ ln -sfT /usr/bin/gnudirname /usr/bin/dirname
ln: failed to create symbolic link '/usr/bin/dirname': Already exists

as observed in
https://github.com/git-for-windows/git/actions/runs/40223871341/job/121274294974?pr=6473#step:3:909

---
 ci/install-dependencies.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
ci/install-dependencies.sh +1 -1
index 4b1733ad15..ed2d09a0a9 100755
@@ -80,7 +80,7 @@ ubuntu-*|i386/debian-*|debian-*)
 	# See <https://github.com/uutils/coreutils/issues/10508>.
 	if test -x /usr/bin/gnudirname
 	then
-		ln -sfT /usr/bin/gnudirname /usr/bin/dirname
+		sudo ln -sfT /usr/bin/gnudirname /usr/bin/dirname
 	fi
 
 	case "$distro" in
Signature · 1 line
gitgitgadget
#3 lore raw

PATCH 3/3 ci: pin linux32 to ubuntu-24.04 to restore networking

In reply to Harald Nordgren via GitGitGadget

From: Harald Nordgren <[email protected]>

The linux32 job fails DNS resolution before checkout because Docker 29.4.2's seccomp profile on Ubuntu 26.04 blocks socketcall in i386 glibc containers. Ubuntu 24.04 avoids this host-side regression.

https://github.com/actions/runner-images/issues/14790

---
 .github/workflows/main.yml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
.github/workflows/main.yml +3 -1
index b564927e2c..d9149e9ecb 100644
@@ -442,7 +442,9 @@ jobs:
       CC: ${{matrix.vector.cc}}
       CI_JOB_IMAGE: ${{matrix.vector.image}}
       CUSTOM_PATH: /custom
-    runs-on: ubuntu-latest
+    runs-on: >-
+      ${{ matrix.vector.jobname == 'linux32'
+          && 'ubuntu-24.04' || 'ubuntu-latest' }}
     container:
       image: ${{ matrix.vector.image }}
       options: ${{ github.repository_visibility == 'private' && '--pids-limit 16384 --ulimit nproc=16384:16384 --ulimit nofile=32768:32768' || '' }}
Signature · 1 line
gitgitgadget
#4 lore raw
In reply to Harald Nordgren via GitGitGadget
Quoted 5 lines · Harald Nordgren via GitGitGadget

Four CI jobs fail since ubuntu-latest moved to Ubuntu 26.04.

* documentation, fuzz smoke test and static-analysis fail with ln: failed to create symbolic link '/usr/bin/dirname': Already exists. Run the ln with sudo.

I see this breakage. Haven't they corrected the Rust rewrite of dirname by now, by the way, to make this overwrite unnecessary yet?

Quoted 4 lines

* linux32 cannot resolve deb.debian.org. Pin it to ubuntu-24.04. The Docker update in actions/runner-images#15205 fixes this on 26.04, but a new runner image will take a long time to roll out, and CI should not stay broken while we wait.

Sigh, but this one is rather straightforward. We need to be aware of this change so that we can revert it when it becomes unnecessary.

Quoted 2 lines

* Use apt-get in linux32 to get rid of the apt does not have a stable CLI interface warnings.

I can see this well, but it is a warning only, so I do not know how much value in addressing it would be.

Quoted 7 lines

The first two are based on Johannes Schindelin's fixes in Git for Windows (git-for-windows/git#6473).

Harald Nordgren (3):
ci: use apt-get in the linux32 job
install-dependencies: work around a permission problem
ci: pin linux32 to ubuntu-24.04 to restore networking

Will queue. Thanks.

Quoted 10 lines
 .github/workflows/main.yml | 6 ++++--
 ci/install-dependencies.sh | 2 +-
 2 files changed, 5 insertions(+), 3 deletions(-)

base-commit: 50fe5cc63f9cd6e89b87a2c9ccf96a444f4cfdb7
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2478%2FHaraldNordgren%2Fci-linux32-apt-get-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2478/HaraldNordgren/ci-linux32-apt-get-v1
Pull-Request: https://github.com/git/git/pull/2478