Skip to content

Commit

Permalink
[Build]: Use one debian mirror config (#10274)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
xumia authored Mar 21, 2022
1 parent 87af565 commit 1017ee6
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 89 deletions.
22 changes: 10 additions & 12 deletions files/apt/sources.list.amd64
Original file line number Diff line number Diff line change
@@ -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
20 changes: 10 additions & 10 deletions files/apt/sources.list.arm64
Original file line number Diff line number Diff line change
@@ -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
20 changes: 10 additions & 10 deletions files/apt/sources.list.armhf
Original file line number Diff line number Diff line change
@@ -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
6 changes: 0 additions & 6 deletions files/build_templates/sonic_debian_extension.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
30 changes: 0 additions & 30 deletions files/image_config/apt/sonic-dev.gpg.key

This file was deleted.

Empty file.

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 1017ee6

Please sign in to comment.