From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7278939938131804160 X-Received: by 2002:ac2:59cf:0:b0:501:b1c0:d545 with SMTP id x15-20020ac259cf000000b00501b1c0d545mr1359586lfn.3.1695192868154; Tue, 19 Sep 2023 23:54:28 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a19:5f57:0:b0:500:83e8:9d2c with SMTP id a23-20020a195f57000000b0050083e89d2cls3896lfj.1.-pod-prod-04-eu; Tue, 19 Sep 2023 23:54:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH4NCdrJuNt/3xP259YgPqftYkxwfEe3SqWOCtXOJp+yOKL3ciYWDThW0sDquc6dUUzYGXg X-Received: by 2002:ac2:5224:0:b0:501:bd6f:7c1e with SMTP id i4-20020ac25224000000b00501bd6f7c1emr1357340lfl.33.1695192866102; Tue, 19 Sep 2023 23:54:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695192866; cv=none; d=google.com; s=arc-20160816; b=sjCOLpblKJPEwVgCj/AAvbpbQETuB8QNO0EsUN6Y65TSrzmcxtBToa7/2jp/lzI1ym eGn48Nh1vTUDwB4p3vG7gf5Bwb9E5waHpw+pMd2nBj7NQZQAGEItyHq4bnXv9aa++Y4Z Zu1INlKBE2Rt+odhcMdg+kkAZ6pvZ8qWxyhGv0A+vkBORrDaXdbm5+EcG9TjE1XeY+Wb AQMPEYB/es8jWp4QbR8Ob0vEgKAKHF+HJ986yqDMZyEj9edlMRRstEObZ5FzjVf9O3Kc AAKtecHobp9/1ebYPWmZ4Ip5XbOjzkzYmdgf/r3GbhaQXtqzYqJ1grpLc3jUXbeBXJtv AsJg== 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=pKvV5GqODq1/MEKqQDzHSNAbr2gtp+X9PORm5xciswM=; fh=7tclEdh7YbwSQowgJ6LNq720O7H5HTEaqj22NJWRE2E=; b=jyAUeOcv9XTjIpZ5rHeZXbwen0E6cbjfobQfCYMcuLj5sT2BZF+sU+znNX2gIjkgH1 KLzjSY2iL/Ajrck54ZegnQyczFzlyFkG3wWjyJZwbUZO6/nwZjzCTghfDlxSrZs7WA8p JNlOWwWjSbCgY7a8xMMdxrjPVzvuNZObHGkGJJU6XOhyjPtX0288ZwpS+OYslvNtqyYC /dBX5W2tRFr8vuzvhDPXeK6zE5UOI15eFKEc/3T+Kph2FqK1mLqtoJ0pP51l7jYrzl7N cuZtBxRqz+enFBfzszO6+Fp8/rSn9ASBizM7IH4U7/hS4znQwLtuzM8tz9DZXpKPQYo4 iasw== 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 c19-20020a056512075300b004fe3e3471c8si1058564lfs.10.2023.09.19.23.54.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Sep 2023 23:54:25 -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 38K6sL1A019812 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 20 Sep 2023 08:54:24 +0200 From: Uladzimir Bely To: isar-users@googlegroups.com Subject: [PATCH v3 03/12] kas: Add mirror selection Date: Wed, 20 Sep 2023 08:54:11 +0200 Message-Id: <20230920065420.11399-4-ubely@ilbers.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230920065420.11399-1-ubely@ilbers.de> References: <20230920065420.11399-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: nLk3o8OflTu7 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 | 36 ++++++++++++++++++++++++++++++++++++ kas/opt/mirror-debian.yaml | 7 +++++++ kas/opt/mirror-ubuntu.yaml | 7 +++++++ 4 files changed, 51 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 624237a5..f48c56cf 100644 --- a/Kconfig +++ b/Kconfig @@ -10,3 +10,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..1f04d1ba --- /dev/null +++ b/kas/opt/Kconfig @@ -0,0 +1,36 @@ +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..ad708f2e --- /dev/null +++ b/kas/opt/mirror-debian.yaml @@ -0,0 +1,7 @@ +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..beb73d59 --- /dev/null +++ b/kas/opt/mirror-ubuntu.yaml @@ -0,0 +1,7 @@ +header: + version: 14 + +local_conf_header: + mirror-ubuntu: | + DISTRO_APT_PREMIRRORS += "\ + http://archive\.ubuntu\.com ${MIRROR_UBUNTU_URL}\n" -- 2.20.1