Update the base Debian system installation script to get Bullseye
Python 2 is no longer available, so remove those packages, and remove the pip2 commands. For picocom and systemd, just install from the regular repo, since there's no backports yet. Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
This commit is contained in:
parent
371f496340
commit
b8a7a6355b
@ -281,8 +281,7 @@ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y in
|
||||
dbus \
|
||||
ntpstat \
|
||||
openssh-server \
|
||||
python \
|
||||
python-apt \
|
||||
python3-apt \
|
||||
traceroute \
|
||||
iputils-ping \
|
||||
net-tools \
|
||||
@ -314,12 +313,12 @@ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y in
|
||||
ndisc6 \
|
||||
makedumpfile \
|
||||
conntrack \
|
||||
python-pip \
|
||||
python3 \
|
||||
python3-distutils \
|
||||
python3-pip \
|
||||
python-is-python3 \
|
||||
cron \
|
||||
libprotobuf17 \
|
||||
libprotobuf23 \
|
||||
libgrpc++ \
|
||||
haveged \
|
||||
jq
|
||||
@ -350,9 +349,7 @@ sudo sed -i '/^#.* en_US.* /s/^#//' $FILESYSTEM_ROOT/etc/locale.gen && \
|
||||
sudo LANG=en_US.UTF-8 DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT update-locale "LANG=en_US.UTF-8"
|
||||
sudo LANG=C chroot $FILESYSTEM_ROOT bash -c "find /usr/share/i18n/locales/ ! -name 'en_US' -type f -exec rm -f {} +"
|
||||
|
||||
# Install certain fundamental packages from $IMAGE_DISTRO-backports in order to get
|
||||
# more up-to-date (but potentially less stable) versions
|
||||
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y -t $IMAGE_DISTRO-backports install \
|
||||
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install \
|
||||
picocom \
|
||||
systemd \
|
||||
systemd-sysv
|
||||
@ -425,13 +422,10 @@ done < files/image_config/sysctl/sysctl-net.conf
|
||||
sudo augtool --autosave "$sysctl_net_cmd_string" -r $FILESYSTEM_ROOT
|
||||
|
||||
# Upgrade pip via PyPI and uninstall the Debian version
|
||||
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip2 install --upgrade 'pip<21'
|
||||
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install --upgrade pip
|
||||
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get purge -y python-pip python3-pip
|
||||
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get purge -y python3-pip
|
||||
|
||||
# For building Python packages
|
||||
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip2 install 'setuptools==40.8.0'
|
||||
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip2 install 'wheel==0.35.1'
|
||||
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install 'setuptools==49.6.00'
|
||||
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install 'wheel==0.35.1'
|
||||
|
||||
|
@ -1,13 +1,13 @@
|
||||
## Debian mirror on Microsoft Azure
|
||||
## Ref: http://debian-archive.trafficmanager.net/
|
||||
|
||||
deb [arch=amd64] http://debian-archive.trafficmanager.net/debian/ buster main contrib non-free
|
||||
deb-src [arch=amd64] http://debian-archive.trafficmanager.net/debian/ buster main contrib non-free
|
||||
deb [arch=amd64] http://debian-archive.trafficmanager.net/debian-security/ buster/updates main contrib non-free
|
||||
deb-src [arch=amd64] http://debian-archive.trafficmanager.net/debian-security/ buster/updates main contrib non-free
|
||||
deb [arch=amd64] http://debian-archive.trafficmanager.net/debian/ buster-backports main contrib non-free
|
||||
deb [arch=amd64] http://packages.trafficmanager.net/debian/debian buster main contrib non-free
|
||||
deb-src [arch=amd64] http://packages.trafficmanager.net/debian/debian buster main contrib non-free
|
||||
deb [arch=amd64] http://packages.trafficmanager.net/debian/debian-security/ buster_updates main contrib non-free
|
||||
deb-src [arch=amd64] http://packages.trafficmanager.net/debian/debian-security/ buster_updates main contrib non-free
|
||||
deb [arch=amd64] http://packages.trafficmanager.net/debian/debian buster-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/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
|
||||
|
@ -144,8 +144,6 @@ sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip2 install ipaddr
|
||||
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install ipaddr
|
||||
|
||||
# Install Python module for grpcio and grpcio-toole
|
||||
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip install "grpcio==1.39.0"
|
||||
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip install "grpcio-tools==1.39.0"
|
||||
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install "grpcio==1.39.0"
|
||||
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install "grpcio-tools==1.39.0"
|
||||
|
||||
@ -281,12 +279,10 @@ sudo cp -f $IMAGE_CONFIGS/bash/bash.bashrc $FILESYSTEM_ROOT/etc/
|
||||
|
||||
# Install prerequisites needed for installing the dependent Python packages of sonic-host-services
|
||||
# These packages can be uninstalled after installation
|
||||
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install libcairo2-dev libdbus-1-dev libgirepository1.0-dev pkg-config
|
||||
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y -t $IMAGE_DISTRO-backports install libsystemd-dev
|
||||
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install libcairo2-dev libdbus-1-dev libgirepository1.0-dev libsystemd-dev pkg-config
|
||||
|
||||
# Manually install runtime dependencies to avoid them being auto-removed while uninstalling build dependencies
|
||||
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install gir1.2-glib-2.0 libdbus-1-3 libgirepository-1.0-1
|
||||
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y -t $IMAGE_DISTRO-backports install libsystemd0
|
||||
# Mark runtime dependencies as manually installed to avoid them being auto-removed while uninstalling build dependencies
|
||||
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-mark manual gir1.2-glib-2.0 libdbus-1-3 libgirepository-1.0-1 libsystemd0
|
||||
|
||||
# Install SONiC host services package
|
||||
SONIC_HOST_SERVICES_PY3_WHEEL_NAME=$(basename {{sonic_host_services_py3_wheel_path}})
|
||||
@ -340,7 +336,7 @@ sudo sed -i -e '/^passwd/s/ radius//' $FILESYSTEM_ROOT/etc/nsswitch.conf
|
||||
# Install a custom version of kdump-tools (and its dependencies via 'apt-get -y install -f')
|
||||
if [[ $CONFIGURED_ARCH == amd64 ]]; then
|
||||
sudo DEBIAN_FRONTEND=noninteractive dpkg --root=$FILESYSTEM_ROOT -i $debs_path/kdump-tools_*.deb || \
|
||||
sudo LANG=C DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true chroot $FILESYSTEM_ROOT apt-get -q --no-install-suggests --no-install-recommends --force-no install
|
||||
sudo LANG=C DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true chroot $FILESYSTEM_ROOT apt-get -q --no-install-suggests --no-install-recommends install
|
||||
cat $IMAGE_CONFIGS/kdump/kdump-tools | sudo tee -a $FILESYSTEM_ROOT/etc/default/kdump-tools > /dev/null
|
||||
fi
|
||||
|
||||
@ -854,7 +850,7 @@ sudo LANG=C chroot $FILESYSTEM_ROOT systemctl enable sonic.target
|
||||
sudo cp $BUILD_TEMPLATES/sonic-delayed.target $FILESYSTEM_ROOT_USR_LIB_SYSTEMD_SYSTEM
|
||||
sudo LANG=C chroot $FILESYSTEM_ROOT systemctl enable sonic-delayed.target
|
||||
|
||||
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get purge -y python-dev python3-dev
|
||||
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get purge -y python3-dev
|
||||
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get purge -y build-essential libssl-dev swig
|
||||
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get purge -y libcairo2-dev libdbus-1-dev libgirepository1.0-dev libsystemd-dev pkg-config
|
||||
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get clean -y
|
||||
|
@ -1,3 +1,3 @@
|
||||
deb [arch=amd64] http://debian-archive.trafficmanager.net/debian/ buster main contrib non-free
|
||||
deb [arch=amd64] http://debian-archive.trafficmanager.net/debian-security/ buster/updates main contrib non-free
|
||||
deb [arch=amd64] http://debian-archive.trafficmanager.net/debian/ buster-backports main contrib non-free
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user