From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7278939938131804160 X-Received: by 2002:a2e:a16f:0:b0:2b9:4891:a9ad with SMTP id u15-20020a2ea16f000000b002b94891a9admr774580ljl.11.1695373823096; Fri, 22 Sep 2023 02:10:23 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a2e:bcc4:0:b0:2b9:722f:8f69 with SMTP id z4-20020a2ebcc4000000b002b9722f8f69ls586954ljp.1.-pod-prod-03-eu; Fri, 22 Sep 2023 02:10:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGfncq03xMJB/iGMDB1thi3v8gJGzaqxqqmXG5TJ9OQ67APPd+dWm8OkmqHjlSZHVm6Lglc X-Received: by 2002:a2e:924d:0:b0:2c0:2f51:cb98 with SMTP id v13-20020a2e924d000000b002c02f51cb98mr7040540ljg.11.1695373820880; Fri, 22 Sep 2023 02:10:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695373820; cv=none; d=google.com; s=arc-20160816; b=IWsXKr46VO/Ft+yJZodgcpJgPX7YQH1DPqN6auFbj1Or+O3J9fjeVsAT/NlG8tcppw U1yaD9lNAYe/nCCcwCd/X+LySigUWKiZsqXN4SZZUb29Xeh8nXN4YUerZzbSmb6VuIpF LkbqNpfGPtOrCY7r8DAPAFvBwVLpIDW4g6tmhtAzv99NwhLzsCNgAbTX5NvgDI0SjOFG 8sQoa1p8Bb/bNeNWS/vLa3DfqMymMEypwLXf7pEP708HkHStNgC23/MJDe34M8Jpk2bl CW1ZoSLvQ1u6PYIgs11KvF8LqfpptjEaGCjH4iMf4z7bhDqvWhOrewsBA1V3pb3FJYmM IZ5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from; bh=8CY7HhlJimauZaWLYx1l+JWGceoqTuwtXnIfQ0/CMH4=; fh=7tclEdh7YbwSQowgJ6LNq720O7H5HTEaqj22NJWRE2E=; b=yuyzEX/cm222pK2F1y0gedpkkdT+awFRM12g7kDmgIz9enCXIhKWDw19mLhWvKV9NN 8zWcyBNvMwg22WFtcHy27DVxj5pGqRcfQ0YOd6bN8q0ltunp8oOprtT0vSY3BLFoWTvx FTUWZnCxazoPV2r+NUCoisppRlSf9+MtOicRN3OIpC/XW5bY1MgU9DiVPIDKofrxDrhd 5qk4MUqUx3lL2HJZHil7aO3uF5fFPmOBFF9GByV3mC5zNQPflHUBZ0WTcGMK0ihNbazz 4OmlcVqomyHVzC3aYgb4b93IQ1rk9fAg97rLz0VvwTryGxsQ3DDB2bl8mLbIY9jpsnIm Lxzg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Return-Path: Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id u3-20020a17090657c300b009adbab54deesi241946ejr.2.2023.09.22.02.10.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 22 Sep 2023 02:10:20 -0700 (PDT) Received-SPF: pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Received: from baighyz.m.ilbers.de (host-80-81-17-52.static.customer.m-online.net [80.81.17.52]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 38M9A3Z6031991 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 22 Sep 2023 11:10:20 +0200 From: Uladzimir Bely To: isar-users@googlegroups.com Subject: [PATCH v4 03/13] kas: Add mirror selection Date: Fri, 22 Sep 2023 11:09:53 +0200 Message-Id: <20230922091003.20763-4-ubely@ilbers.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230922091003.20763-1-ubely@ilbers.de> References: <20230922091003.20763-1-ubely@ilbers.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-TUID: FvM8GoRC6K7M This allows to select better (faster) mirror for Debian and Ubuntu distributions. Isar DISTRO_APT_PREMIRRORS is used under the hood. Signed-off-by: Uladzimir Bely --- Kconfig | 1 + kas/opt/Kconfig | 42 ++++++++++++++++++++++++++++++++++++++ kas/opt/mirror-debian.yaml | 10 +++++++++ kas/opt/mirror-ubuntu.yaml | 10 +++++++++ 4 files changed, 63 insertions(+) create mode 100644 kas/opt/Kconfig create mode 100644 kas/opt/mirror-debian.yaml create mode 100644 kas/opt/mirror-ubuntu.yaml diff --git a/Kconfig b/Kconfig index 591fe765..a62fbf6c 100644 --- a/Kconfig +++ b/Kconfig @@ -16,3 +16,4 @@ config KAS_BUILD_SYSTEM source "kas/distro/Kconfig" source "kas/machine/Kconfig" +source "kas/opt/Kconfig" diff --git a/kas/opt/Kconfig b/kas/opt/Kconfig new file mode 100644 index 00000000..06a9e3e5 --- /dev/null +++ b/kas/opt/Kconfig @@ -0,0 +1,42 @@ +# This software is a part of ISAR. +# Copyright (C) 2023 ilbers GmbH +# +# Authors: +# Uladzimir Bely + +menu "Mirror selection" + +config MIRROR_DEBIAN + bool "Use specific Debian mirror" + depends on DEBIAN_BUSTER || DEBIAN_BULLSEYE || DEBIAN_BOOKWORM + help + Select better local Debian mirror instead of deb.debian.org + +config MIRROR_DEBIAN_URL + string "URL of Debian mirror" + default "http://deb.debian.org" + depends on MIRROR_DEBIAN + +config KAS_INCLUDE_MIRROR_DEBIAN + string + default "kas/opt/mirror-debian.yaml" + depends on MIRROR_DEBIAN + + +config MIRROR_UBUNTU + bool "Use specific Ubuntu mirror" + depends on UBUNTU_FOCAL || UBUNTU_JAMMY + help + Select better local Ubuntu mirror instead of archive.ubuntu.com + +config MIRROR_UBUNTU_URL + string "URL of Ubuntu mirror" + default "http://archive.ubuntu.com" + depends on MIRROR_UBUNTU + +config KAS_INCLUDE_MIRROR_UBUNTU + string + default "kas/opt/mirror-ubuntu.yaml" + depends on MIRROR_UBUNTU + +endmenu diff --git a/kas/opt/mirror-debian.yaml b/kas/opt/mirror-debian.yaml new file mode 100644 index 00000000..4dd4fc17 --- /dev/null +++ b/kas/opt/mirror-debian.yaml @@ -0,0 +1,10 @@ +# This software is a part of ISAR. +# Copyright (C) 2023 ilbers GmbH + +header: + version: 14 + +local_conf_header: + mirror-debian: | + DISTRO_APT_PREMIRRORS += "\ + http://deb\.debian\.org ${MIRROR_DEBIAN_URL}\n" diff --git a/kas/opt/mirror-ubuntu.yaml b/kas/opt/mirror-ubuntu.yaml new file mode 100644 index 00000000..3774b079 --- /dev/null +++ b/kas/opt/mirror-ubuntu.yaml @@ -0,0 +1,10 @@ +# This software is a part of ISAR. +# Copyright (C) 2023 ilbers GmbH + +header: + version: 14 + +local_conf_header: + mirror-ubuntu: | + DISTRO_APT_PREMIRRORS += "\ + http://archive\.ubuntu\.com ${MIRROR_UBUNTU_URL}\n" -- 2.20.1