From 4fccda4ab9148cfffe94719093d7842d53e3406c Mon Sep 17 00:00:00 2001 From: xumia <59720581+xumia@users.noreply.github.com> Date: Mon, 21 Mar 2022 16:47:20 +0800 Subject: [PATCH] [Build]: Use one debian mirror config (#10274) Why I did it Use one debian mirror config. The empty config in https://github.com/Azure/sonic-buildimage/blob/master/files/image_config/apt/sources.list overrides the file https://github.com/Azure/sonic-buildimage/blob/master/files/apt/sources.list.amd64 (armhf/arm64), it does not make sense. All the content in files/image_config/apt is no use, any one wants to add mirror config, please add in files/apt. How I did it Remove files/image_config/apt and the reference. --- files/apt/sources.list.amd64 | 22 +++++++------- files/apt/sources.list.arm64 | 20 ++++++------- files/apt/sources.list.armhf | 20 ++++++------- .../build_templates/sonic_debian_extension.j2 | 6 ---- files/image_config/apt/sonic-dev.gpg.key | 30 ------------------- files/image_config/apt/sources.list | 0 ...ian_archive_trafficmanager_net_debian.list | 3 -- .../arm64/debian_mirror_arm64.list | 9 ------ .../armhf/debian_mirror_armhf.list | 9 ------ 9 files changed, 30 insertions(+), 89 deletions(-) delete mode 100644 files/image_config/apt/sonic-dev.gpg.key delete mode 100644 files/image_config/apt/sources.list delete mode 100644 files/image_config/apt/sources.list.d/amd64/debian_archive_trafficmanager_net_debian.list delete mode 100644 files/image_config/apt/sources.list.d/arm64/debian_mirror_arm64.list delete mode 100644 files/image_config/apt/sources.list.d/armhf/debian_mirror_armhf.list diff --git a/files/apt/sources.list.amd64 b/files/apt/sources.list.amd64 index 04a2b14353..fb0a1e9949 100644 --- a/files/apt/sources.list.amd64 +++ b/files/apt/sources.list.amd64 @@ -1,15 +1,13 @@ ## Debian mirror on Microsoft Azure ## Ref: http://debian-archive.trafficmanager.net/ -deb [arch=amd64] http://deb.debian.org/debian/ bullseye main contrib non-free -deb-src [arch=amd64] http://deb.debian.org/debian/ bullseye main contrib non-free -#deb [arch=amd64] http://debian-archive.trafficmanager.net/debian/ bullseye main contrib non-free -#deb-src [arch=amd64] http://debian-archive.trafficmanager.net/debian/ bullseye main contrib non-free -#deb [arch=amd64] http://debian-archive.trafficmanager.net/debian-security/ bullseye/updates main contrib non-free -#deb-src [arch=amd64] http://debian-archive.trafficmanager.net/debian-security/ bullseye/updates main contrib non-free -#deb [arch=amd64] http://debian-archive.trafficmanager.net/debian/ bullseye-backports main contrib non-free -#deb [arch=amd64] http://packages.trafficmanager.net/debian/debian bullseye main contrib non-free -#deb-src [arch=amd64] http://packages.trafficmanager.net/debian/debian bullseye main contrib non-free -#deb [arch=amd64] http://packages.trafficmanager.net/debian/debian-security/ bullseye_updates main contrib non-free -#deb-src [arch=amd64] http://packages.trafficmanager.net/debian/debian-security/ bullseye_updates main contrib non-free -#deb [arch=amd64] http://packages.trafficmanager.net/debian/debian bullseye-backports main contrib non-free +deb [arch=amd64] http://debian-archive.trafficmanager.net/debian/ bullseye main contrib non-free +deb-src [arch=amd64] http://debian-archive.trafficmanager.net/debian/ bullseye main contrib non-free +deb [arch=amd64] http://debian-archive.trafficmanager.net/debian-security/ bullseye-security main contrib non-free +deb-src [arch=amd64] http://debian-archive.trafficmanager.net/debian-security/ bullseye-security main contrib non-free +deb [arch=amd64] http://debian-archive.trafficmanager.net/debian/ bullseye-backports main contrib non-free +deb [arch=amd64] http://packages.trafficmanager.net/debian/debian bullseye main contrib non-free +deb-src [arch=amd64] http://packages.trafficmanager.net/debian/debian bullseye main contrib non-free +deb [arch=amd64] http://packages.trafficmanager.net/debian/debian-security/ bullseye-security main contrib non-free +deb-src [arch=amd64] http://packages.trafficmanager.net/debian/debian-security/ bullseye-security main contrib non-free +deb [arch=amd64] http://packages.trafficmanager.net/debian/debian bullseye-backports main contrib non-free diff --git a/files/apt/sources.list.arm64 b/files/apt/sources.list.arm64 index abd6250704..75bebe1a91 100644 --- a/files/apt/sources.list.arm64 +++ b/files/apt/sources.list.arm64 @@ -1,13 +1,13 @@ ## Debian mirror for ARM ## Not the repo mirror site can change in future, and needs to be updated to be in sync -deb [arch=arm64] http://deb.debian.org/debian bullseye main contrib non-free -deb-src [arch=arm64] http://deb.debian.org/debian bullseye main contrib non-free -deb [arch=arm64] http://deb.debian.org/debian bullseye-updates main contrib non-free -deb-src [arch=arm64] http://deb.debian.org/debian bullseye-updates main contrib non-free -deb [arch=arm64] http://ftp.debian.org/debian bullseye-backports main -# deb [arch=arm64] http://packages.trafficmanager.net/debian/debian bullseye main contrib non-free -# deb-src [arch=arm64] http://packages.trafficmanager.net/debian/debian bullseye main contrib non-free -# deb [arch=arm64] http://packages.trafficmanager.net/debian/debian bullseye-updates main contrib non-free -# deb-src [arch=arm64] http://packages.trafficmanager.net/debian/debian bullseye-updates main contrib non-free -# deb [arch=arm64] http://packages.trafficmanager.net/debian/debian bullseye-backports main +deb [arch=arm64] http://debian-archive.trafficmanager.net/debian/ bullseye main contrib non-free +deb-src [arch=arm64] http://debian-archive.trafficmanager.net/debian/ bullseye main contrib non-free +deb [arch=arm64] http://debian-archive.trafficmanager.net/debian-security/ bullseye-security main contrib non-free +deb-src [arch=arm64] http://debian-archive.trafficmanager.net/debian-security/ bullseye-security main contrib non-free +deb [arch=arm64] http://debian-archive.trafficmanager.net/debian/ bullseye-backports main contrib non-free +deb [arch=arm64] http://packages.trafficmanager.net/debian/debian bullseye main contrib non-free +deb-src [arch=arm64] http://packages.trafficmanager.net/debian/debian bullseye main contrib non-free +deb [arch=arm64] http://packages.trafficmanager.net/debian/debian-security/ bullseye-security main contrib non-free +deb-src [arch=arm64] http://packages.trafficmanager.net/debian/debian-security/ bullseye-security main contrib non-free +deb [arch=arm64] http://packages.trafficmanager.net/debian/debian bullseye-backports main contrib non-free diff --git a/files/apt/sources.list.armhf b/files/apt/sources.list.armhf index ded8e27e6b..378aa08452 100644 --- a/files/apt/sources.list.armhf +++ b/files/apt/sources.list.armhf @@ -1,13 +1,13 @@ ## Debian mirror for ARM ## Not the repo mirror site can change in future, and needs to be updated to be in sync -deb [arch=armhf] http://deb.debian.org/debian bullseye main contrib non-free -deb-src [arch=armhf] http://deb.debian.org/debian bullseye main contrib non-free -deb [arch=armhf] http://deb.debian.org/debian bullseye-updates main contrib non-free -deb-src [arch=armhf] http://deb.debian.org/debian bullseye-updates main contrib non-free -deb [arch=armhf] http://ftp.debian.org/debian bullseye-backports main -# deb [arch=armhf] http://packages.trafficmanager.net/debian/debian bullseye main contrib non-free -# deb-src [arch=armhf] http://packages.trafficmanager.net/debian/debian bullseye main contrib non-free -# deb [arch=armhf] http://packages.trafficmanager.net/debian/debian bullseye-updates main contrib non-free -# deb-src [arch=armhf] http://packages.trafficmanager.net/debian/debian bullseye-updates main contrib non-free -# deb [arch=armhf] http://packages.trafficmanager.net/debian/debian bullseye-backports main +deb [arch=armhf] http://debian-archive.trafficmanager.net/debian/ bullseye main contrib non-free +deb-src [arch=armhf] http://debian-archive.trafficmanager.net/debian/ bullseye main contrib non-free +deb [arch=armhf] http://debian-archive.trafficmanager.net/debian-security/ bullseye-security main contrib non-free +deb-src [arch=armhf] http://debian-archive.trafficmanager.net/debian-security/ bullseye-security main contrib non-free +deb [arch=armhf] http://debian-archive.trafficmanager.net/debian/ bullseye-backports main contrib non-free +deb [arch=armhf] http://packages.trafficmanager.net/debian/debian bullseye main contrib non-free +deb-src [arch=armhf] http://packages.trafficmanager.net/debian/debian bullseye main contrib non-free +deb [arch=armhf] http://packages.trafficmanager.net/debian/debian-security/ bullseye-security main contrib non-free +deb-src [arch=armhf] http://packages.trafficmanager.net/debian/debian-security/ bullseye-security main contrib non-free +deb [arch=armhf] http://packages.trafficmanager.net/debian/debian bullseye-backports main contrib non-free diff --git a/files/build_templates/sonic_debian_extension.j2 b/files/build_templates/sonic_debian_extension.j2 index 4d3ec87660..7dae46be99 100644 --- a/files/build_templates/sonic_debian_extension.j2 +++ b/files/build_templates/sonic_debian_extension.j2 @@ -75,12 +75,6 @@ else sudo chroot $FILESYSTEM_ROOT $DOCKER_CTL_SCRIPT start fi -# Apply apt configuration files -sudo cp $IMAGE_CONFIGS/apt/sources.list $FILESYSTEM_ROOT/etc/apt/ -sudo mkdir -p $FILESYSTEM_ROOT/etc/apt/sources.list.d/ -sudo cp -R $IMAGE_CONFIGS/apt/sources.list.d/${CONFIGURED_ARCH}/* $FILESYSTEM_ROOT/etc/apt/sources.list.d/ -cat $IMAGE_CONFIGS/apt/sonic-dev.gpg.key | sudo LANG=C chroot $FILESYSTEM_ROOT apt-key add - - # Update apt's snapshot of its repos sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get update diff --git a/files/image_config/apt/sonic-dev.gpg.key b/files/image_config/apt/sonic-dev.gpg.key deleted file mode 100644 index fb9a37901b..0000000000 --- a/files/image_config/apt/sonic-dev.gpg.key +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1 - -mQENBFQ1bTIBCAC7oGfkv/ck0XsLuG8cdcSB2ISqxFAcBvH9BitEtxmpW2uhykKk -xY4rVD/4Uys1s3PF1/64QfPR+hYcewueOwz0ZAcLyFXXk4McICXaPq3NrLiWYKKX -UZLnrPzcrGZoW/kHDDp4OmBiDmT1PGvZlpuimwkMCusUzIr7Cbbp2dIy8MERL5tA -LcgLu3KL6clJ+aTW2jgepI1D7sTepOeGd7eRSb5njKg2M7k/93v/7MipZxiVtyXH -B74YiK6jSbst5JpuYsLa/Dqryvx7Xq3n53oif892pv3euTduo1fYw8Hgh/OOYdeT -c9WCj03KA1jCSFURjdrug0kR8BPlfjqtRLXFABEBAAG0JE1TIE9wZW4gVGVjaCA8 -aW50ZXJvcEBtaWNyb3NvZnQuY29tPokBOAQTAQIAIgUCVDVtMgIbAwYLCQgHAwIG -FQgCCQoLBBYCAwECHgECF4AACgkQsCxG30F6CJO1uAf/cmL68bM8YgF/61hkaY56 -LqrppUTJH/w4fKq47Pf6KfgSLvxfNU6soi2KHYRjIvTRx3tV4vUM5n2plaQg2s8V -/Epg4FeIRTk75YwiHAzLhLnp5cdUaTvC4j4mwxoB6j9Ty+fXJwQ0MvpDhIZb9vM4 -GXw/fEQHCT4f3gx4nReeqE+FB2wVHleX9+Lpodu98JyJTKJRBRHYLqy6S+/lyp2W -aBlsI1LOqBcx1uRK24U7duIpbYwIyrx0cafSruqR2GjVdu+imkhHyUn52VbzYhq1 -af0rqYiZ1VOamVOG0By8+hVyNa1MLc1K2uWGs0o5fDe9F5/swbvLHVXI+M50Vs+m -J7kBDQRUNW0yAQgAu7DkTVj0ZQC4F7bFivAwrdby8gCakTXOl1kcK622hjRJ8nam -aZeW+eADfLRsTmdUmXgZu1YWS5Gn2ZVngC8SGPUBT071+oRETCz4uNB7IimB9QfP -++orI6o2vmnVVsq5wWCbEdNU+TCVv1zjrYev5lwckkKpjHt6o8MNoX2DFuQymSyR -eZKaqhdKmcji4Ke7OIYqwgPjch3wxzE1b5gNOR/iwxWyjjOffZPLr/VhIfIJRs86 -dSXrwjHtEh810SKDLghHM0VAdY34nyC5ZZ61yhts5HtQDFK+9mNpH1mkc4gDBlgG -266pVvknumK6lPNm/osF/cpjWmEw24ypcQIvOQARAQABiQEfBBgBAgAJBQJUNW0y -AhsMAAoJELAsRt9BegiTMBUH/0sZ6gZy7mCTSAYT+NSXLFtGC2zNUVL80SWvfgYm -k9XPVI22MrefZfQ6M01RylyxtWXjRM8UoN8SDKWPpXumzJf831f/7om5zwutaG7b -tjDPYqRKJSbAIFZu2mN+uLrNQ2SV6XK7FoV0dtcrEX9S7RICb6i19D+70+Oh/qgU -R04H1jqS29XBzqAlIzdBoA+sYAwbOIJsSL3YyNQcUv3B5+5yR/bo/L8pnUJt6iuL -nWW+mi7r8gWPHDSrcdYq1TmmlOM7CwZPgWRZzkQPSeZz52Tt7IP47eyGJ09U4PIf -FtMH1ElL2UgHoA/F9Q88e7LkztaTqE59uXWbIYyuSMJVvRU= -=sb3d ------END PGP PUBLIC KEY BLOCK----- diff --git a/files/image_config/apt/sources.list b/files/image_config/apt/sources.list deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/files/image_config/apt/sources.list.d/amd64/debian_archive_trafficmanager_net_debian.list b/files/image_config/apt/sources.list.d/amd64/debian_archive_trafficmanager_net_debian.list deleted file mode 100644 index db55f3dd60..0000000000 --- a/files/image_config/apt/sources.list.d/amd64/debian_archive_trafficmanager_net_debian.list +++ /dev/null @@ -1,3 +0,0 @@ -deb [arch=amd64] http://debian-archive.trafficmanager.net/debian/ bullseye main contrib non-free -#deb [arch=amd64] http://debian-archive.trafficmanager.net/debian-security/ bullseye/updates main contrib non-free -deb [arch=amd64] http://debian-archive.trafficmanager.net/debian/ bullseye-backports main contrib non-free diff --git a/files/image_config/apt/sources.list.d/arm64/debian_mirror_arm64.list b/files/image_config/apt/sources.list.d/arm64/debian_mirror_arm64.list deleted file mode 100644 index a34ce92658..0000000000 --- a/files/image_config/apt/sources.list.d/arm64/debian_mirror_arm64.list +++ /dev/null @@ -1,9 +0,0 @@ -deb [arch=arm64] http://deb.debian.org/debian bullseye main contrib non-free -deb-src [arch=arm64] http://deb.debian.org/debian bullseye main contrib non-free -deb [arch=arm64] http://deb.debian.org/debian bullseye-updates main contrib non-free -deb-src [arch=arm64] http://deb.debian.org/debian bullseye-updates main contrib non-free -deb [arch=arm64] http://security.debian.org bullseye-security main contrib non-free -deb-src [arch=arm64] http://security.debian.org bullseye-security main contrib non-free -deb [arch=arm64] https://download.docker.com/linux/debian bullseye stable -deb [arch=arm64] http://ftp.debian.org/debian bullseye-backports main - diff --git a/files/image_config/apt/sources.list.d/armhf/debian_mirror_armhf.list b/files/image_config/apt/sources.list.d/armhf/debian_mirror_armhf.list deleted file mode 100644 index 7c4865525f..0000000000 --- a/files/image_config/apt/sources.list.d/armhf/debian_mirror_armhf.list +++ /dev/null @@ -1,9 +0,0 @@ -deb [arch=armhf] http://deb.debian.org/debian bullseye main contrib non-free -deb-src [arch=armhf] http://deb.debian.org/debian bullseye main contrib non-free -deb [arch=armhf] http://deb.debian.org/debian bullseye-updates main contrib non-free -deb-src [arch=armhf] http://deb.debian.org/debian bullseye-updates main contrib non-free -deb [arch=armhf] http://security.debian.org bullseye-security main contrib non-free -deb-src [arch=armhf] http://security.debian.org bullseye-security main contrib non-free -deb [arch=armhf] https://download.docker.com/linux/debian bullseye stable -deb [arch=armhf] http://ftp.debian.org/debian bullseye-backports main -