diff mbox series

[wrynose,19/19] mirrors: Disable YP mirrors on autobuilder

Message ID f7397af248e1e338929d70a910b0fbc2341528ec.1787576160.git.yoann.congal@smile.fr
State New
Headers show
Series [wrynose,01/19] busybox: patch CVE-2026-38754 | expand

Commit Message

Yoann Congal Aug. 24, 2026, 1 p.m. UTC
From: Richard Purdie <richard.purdie@linuxfoundation.org>

The YP mirrors (and hence some bits of kernel.org) are initially populated by the
autobuilder, so having it reference itself creates a log of stress and delay when
things go wrong (such as a missing kernel revision).

Trying to remove those but not the others is hard to maintain, so add a
variable specifically to allow it. Use that variable from the autobuilder
configuration.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 2a7e73e90a66611ce358601b041d5cd81ad61ed2)
Signed-off-by: Fabien Thomas <fabien.thomas@smile.fr>
---
 meta/classes-global/mirrors.bbclass           | 19 ++++++++++++-------
 .../yocto-autobuilder/autobuilder.conf        |  1 +
 2 files changed, 13 insertions(+), 7 deletions(-)
diff mbox series

Patch

diff --git a/meta/classes-global/mirrors.bbclass b/meta/classes-global/mirrors.bbclass
index 6f54b257f2c..04b7a25106e 100644
--- a/meta/classes-global/mirrors.bbclass
+++ b/meta/classes-global/mirrors.bbclass
@@ -5,6 +5,7 @@ 
 #
 
 MIRRORS += "\
+${YOCTO_MIRRORS} \
 ${DEBIAN_MIRROR}	http://snapshot.debian.org/archive/debian/20180310T215105Z/pool \
 ${DEBIAN_MIRROR}	http://snapshot.debian.org/archive/debian/20250101T023759Z/pool \
 ${DEBIAN_MIRROR}	http://snapshot.debian.org/archive/debian-archive/20120328T092752Z/debian/pool \
@@ -29,14 +30,18 @@  ${SAVANNAH_NONGNU_MIRROR} http://download-mirror.savannah.nongnu.org/releases \
 ftp://sourceware.org/pub http://mirrors.edge.kernel.org/sourceware \
 ftp://sourceware.org/pub http://gd.tuwien.ac.at/gnu/sourceware \
 ftp://sourceware.org/pub http://ftp.gwdg.de/pub/linux/sources.redhat.com/sourceware \
-svn://.*/.*     http://downloads.yoctoproject.org/mirror/sources/ \
-git://.*/.*     http://downloads.yoctoproject.org/mirror/sources/ \
-gitsm://.*/.*   http://downloads.yoctoproject.org/mirror/sources/ \
-hg://.*/.*      http://downloads.yoctoproject.org/mirror/sources/ \
-https?://.*/.*  http://downloads.yoctoproject.org/mirror/sources/ \
-ftp://.*/.*     http://downloads.yoctoproject.org/mirror/sources/ \
-npm://.*/?.*    http://downloads.yoctoproject.org/mirror/sources/ \
 ${CPAN_MIRROR}  https://cpan.metacpan.org/ \
+"
+
+# Having a way to disable the Yocto Project related mirrors for YP CI purposes is valuable.
+YOCTO_MIRRORS ??= "\
+svn://.*/.*     https://downloads.yoctoproject.org/mirror/sources/ \
+git://.*/.*     https://downloads.yoctoproject.org/mirror/sources/ \
+gitsm://.*/.*   https://downloads.yoctoproject.org/mirror/sources/ \
+hg://.*/.*      https://downloads.yoctoproject.org/mirror/sources/ \
+https?://.*/.*  https://downloads.yoctoproject.org/mirror/sources/ \
+ftp://.*/.*     https://downloads.yoctoproject.org/mirror/sources/ \
+npm://.*/?.*    https://downloads.yoctoproject.org/mirror/sources/ \
 https?://downloads.yoctoproject.org/releases/uninative/ https://mirrors.edge.kernel.org/yocto/uninative/ \
 https?://downloads.yoctoproject.org/mirror/sources/ https://mirrors.edge.kernel.org/yocto-sources/ \
 "
diff --git a/meta/conf/fragments/yocto-autobuilder/autobuilder.conf b/meta/conf/fragments/yocto-autobuilder/autobuilder.conf
index a9ae99a451e..ad874384a9f 100644
--- a/meta/conf/fragments/yocto-autobuilder/autobuilder.conf
+++ b/meta/conf/fragments/yocto-autobuilder/autobuilder.conf
@@ -11,4 +11,5 @@  SDK_INCLUDE_TOOLCHAIN = '1'
 ESDK_LOCALCONF_REMOVE:append = 'BB_HASHSERVE'
 SDK_TOOLCHAIN_LANGS += 'go rust'
 PTEST_EXPECT_FAILURE = '1'
+YOCTO_MIRRORS = ""