Skip to contentSkip to conversation

CI: use mirrors for GNU tools

PATCH In review Quentin Schulz 2 participants 5 messages Nov 27, 2025 – Dec 1, 2025

lore
Share & tools
lore
#0 lore raw

v2 cover CI: use mirrors for GNU tools

I have to add one (1) package to the Dockerfile as a new dependency and wanted to build the image to verify it works. I wasn't able to because GNU servers are just not reliable at all.

The git server URL we're using doesn't seem to be a mirrored one, and switching to mirror URLs seem to make fetching possible again.

Unfortunately, we don't have the option to do that for coreboot's dependencies, though we can ask coreboot to download the dependencies through its own mirror, which we do in this series.

---
Changes in v2:
- use GNULIB_URL for bootstrapping grub instead of manually cloning the git repo as done in v1,
- added R-b,
- rebased on top of next,
- Link to v1: https://patch.msgid.link/[email protected]

---
Quentin Schulz (3):
CI: use GNU mirror for grub (and switch to HTTPS)
CI: use mirror for gnulib dependency of grub
CI: use coreboot mirror for GNU dependencies of coreboot

 tools/docker/Dockerfile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

---
base-commit: 4a4871e3dc38f3f771d2713b805e79e6191b4297
change-id: 20251121-gnu-mirror-98bbfa305caa

Best regards,

Signature · 1 line
Quentin Schulz <[email protected]>
#1 lore raw

PATCH v2 1/3 CI: use GNU mirror for grub (and switch to HTTPS)

From: Quentin Schulz <[email protected]>

GNU announced they activated mirrors for git servers[1] in May this year.

The main git server keeps being very unreliable and switching to those mirrors seems to improve reliability (albeit somewhat slow).

Yes, the URL in this patch has nothing in common with the URL in the linked mail, it was extracted from the Clone section in the mirrored cgit page[2].

While at it, switch to the HTTPS clone which is "more secure" than git protocol.

[1] https://lists.gnu.org/archive/html/savannah-users/2025-05/msg00002.html
[2] https://cgit.git.savannah.gnu.org/cgit/grub.git/

---
 tools/docker/Dockerfile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/docker/Dockerfile +1 -1
index 630b7f0e141..402901c2d82 100644
@@ -148,7 +148,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
 	zip
 
 # Build GRUB UEFI targets for ARM & RISC-V, 32-bit and 64-bit
-RUN git clone git://git.savannah.gnu.org/grub.git /tmp/grub && \
+RUN git clone https://https.git.savannah.gnu.org/git/grub.git /tmp/grub && \
 	cd /tmp/grub && \
 	git checkout grub-2.12 && \
 	git config --global user.name "GitLab CI Runner" && \
Signature · 1 line
2.52.0
#2 lore raw

PATCH v2 2/3 CI: use mirror for gnulib dependency of grub

In reply to Quentin Schulz

From: Quentin Schulz <[email protected]>

grub bootstrap script downloads gnulib from a non-mirror URL and thus is unreliable.

One can specify the URL to fetch from with GNULIB_URL environment variable, so let's make this variable point at a mirror URL.

---
 tools/docker/Dockerfile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/docker/Dockerfile +1 -1
index 402901c2d82..440a3c39293 100644
@@ -153,7 +153,7 @@ RUN git clone https://https.git.savannah.gnu.org/git/grub.git /tmp/grub && \
 	git checkout grub-2.12 && \
 	git config --global user.name "GitLab CI Runner" && \
 	git config --global user.email [email protected] && \
-	./bootstrap && \
+	GNULIB_URL=https://https.git.savannah.gnu.org/git/gnulib.git ./bootstrap && \
 	mkdir -p /opt/grub && \
 	./configure --target=aarch64 --with-platform=efi \
 	CC=gcc \
Signature · 1 line
2.52.0
#3 lore raw

PATCH v2 3/3 CI: use coreboot mirror for GNU dependencies of coreboot

In reply to Quentin Schulz

From: Quentin Schulz <[email protected]>

coreboot buildgcc script downloads GNU dependencies from GNU FTP server. For some reason, this is also as unreliable as their git main server. There's no option to use a GNU mirror (and I'm not even sure if there's one for FTP), so we simply pass --mirror to the buildgcc script via the BUILDGCC_OPTIONS variable so that it makes use of coreboot's mirror. Hopefully, this proves more reliable than GNU original FTP server.

---
 tools/docker/Dockerfile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/docker/Dockerfile +1 -1
index 440a3c39293..bc45f59d6e7 100644
@@ -329,7 +329,7 @@ RUN mkdir /tmp/trace && \
 # Build coreboot
 RUN wget -O - https://coreboot.org/releases/coreboot-25.03.tar.xz | tar -C /tmp -xJ && \
     cd /tmp/coreboot-25.03 && \
-    make crossgcc-i386 CPUS=$(nproc) && \
+    make BUILDGCC_OPTIONS="--mirror" crossgcc-i386 CPUS=$(nproc) && \
     make -C payloads/coreinfo olddefconfig && \
     make -C payloads/coreinfo && \
     make olddefconfig && \
Signature · 1 line
2.52.0
#4 lore raw
In reply to Quentin Schulz
Quoted 8 lines · Quentin Schulz

I have to add one (1) package to the Dockerfile as a new dependency and wanted to build the image to verify it works. I wasn't able to because GNU servers are just not reliable at all.

The git server URL we're using doesn't seem to be a mirrored one, and switching to mirror URLs seem to make fetching possible again.

[...]

Applied to u-boot/next, thanks!

[1/3] CI: use GNU mirror for grub (and switch to HTTPS)

      commit: e0c72161710e3df45ed41302643b20952528eb4d
[2/3] CI: use mirror for gnulib dependency of grub
      commit: 93316f15339d6b696f58a0ef99b057bd45b76c2b
[3/3] CI: use coreboot mirror for GNU dependencies of coreboot
      commit: 6e39395a1869d9fb850e5bf5e9ba2da4663ac873
Signature · 1 line
Tom