[armhf][redis] compilation fixes for armhf arch (#5901)
1. Update SSL ca certificates for secure download [arm specific] 2. Using redis-tools from blob sonic-storage for docker-base-stretch Signed-off-by: Sabareesh Kumar Anandan <sanandan@marvell.com>
This commit is contained in:
parent
a704ded668
commit
6c362a08e7
@ -31,12 +31,7 @@ set -x -e
|
|||||||
CONFIGURED_ARCH=$([ -f .arch ] && cat .arch || echo amd64)
|
CONFIGURED_ARCH=$([ -f .arch ] && cat .arch || echo amd64)
|
||||||
|
|
||||||
## docker engine version (with platform)
|
## docker engine version (with platform)
|
||||||
if [[ $CONFIGURED_ARCH == armhf || $CONFIGURED_ARCH == arm64 ]]; then
|
|
||||||
# Version name differs between ARCH, copying same version as in sonic-slave docker
|
|
||||||
DOCKER_VERSION=18.06.3~ce~3-0~debian
|
|
||||||
else
|
|
||||||
DOCKER_VERSION=5:18.09.8~3-0~debian-$IMAGE_DISTRO
|
DOCKER_VERSION=5:18.09.8~3-0~debian-$IMAGE_DISTRO
|
||||||
fi
|
|
||||||
LINUX_KERNEL_VERSION=4.19.0-9-2
|
LINUX_KERNEL_VERSION=4.19.0-9-2
|
||||||
|
|
||||||
## Working directory to prepare the file system
|
## Working directory to prepare the file system
|
||||||
@ -202,6 +197,10 @@ sudo LANG=C chroot $FILESYSTEM_ROOT apt-get -y install apt-transport-https \
|
|||||||
curl \
|
curl \
|
||||||
gnupg2 \
|
gnupg2 \
|
||||||
software-properties-common
|
software-properties-common
|
||||||
|
if [[ $CONFIGURED_ARCH == armhf ]]; then
|
||||||
|
# update ssl ca certificates for secure pem
|
||||||
|
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT c_rehash
|
||||||
|
fi
|
||||||
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT curl -o /tmp/docker.gpg -fsSL https://download.docker.com/linux/debian/gpg
|
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT curl -o /tmp/docker.gpg -fsSL https://download.docker.com/linux/debian/gpg
|
||||||
sudo LANG=C chroot $FILESYSTEM_ROOT apt-key add /tmp/docker.gpg
|
sudo LANG=C chroot $FILESYSTEM_ROOT apt-key add /tmp/docker.gpg
|
||||||
sudo LANG=C chroot $FILESYSTEM_ROOT rm /tmp/docker.gpg
|
sudo LANG=C chroot $FILESYSTEM_ROOT rm /tmp/docker.gpg
|
||||||
|
@ -40,6 +40,7 @@ COPY ["no-check-valid-until", "/etc/apt/apt.conf.d"]
|
|||||||
# pre-install fundamental packages
|
# pre-install fundamental packages
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get -y install \
|
apt-get -y install \
|
||||||
|
curl \
|
||||||
less \
|
less \
|
||||||
perl \
|
perl \
|
||||||
procps \
|
procps \
|
||||||
@ -49,8 +50,6 @@ RUN apt-get update && \
|
|||||||
# Install dependencies of supervisor
|
# Install dependencies of supervisor
|
||||||
python-pkg-resources \
|
python-pkg-resources \
|
||||||
python-meld3 \
|
python-meld3 \
|
||||||
# Install redis-tools
|
|
||||||
redis-tools=5:5.0.3-3~bpo9+2 \
|
|
||||||
# common dependencies
|
# common dependencies
|
||||||
libpython2.7 \
|
libpython2.7 \
|
||||||
libdaemon0 \
|
libdaemon0 \
|
||||||
@ -70,6 +69,22 @@ RUN apt-get update && \
|
|||||||
# Install a newer version of rsyslog from stretch-backports to support -iNONE
|
# Install a newer version of rsyslog from stretch-backports to support -iNONE
|
||||||
RUN apt-get -y -t stretch-backports install rsyslog
|
RUN apt-get -y -t stretch-backports install rsyslog
|
||||||
|
|
||||||
|
# Install redis-tools
|
||||||
|
|
||||||
|
{% if CONFIGURED_ARCH == "armhf" %}
|
||||||
|
RUN curl -o redis-tools_6.0.6-1~bpo10+1_armhf.deb "https://sonicstorage.blob.core.windows.net/packages/redis/redis-tools_6.0.6-1_bpo10+1_armhf.deb?sv=2015-04-05&sr=b&sig=67vHAMxsl%2BS3X1KsqhdYhakJkGdg5FKSPgU8kUiw4as%3D&se=2030-10-24T04%3A22%3A40Z&sp=r"
|
||||||
|
RUN dpkg -i redis-tools_6.0.6-1~bpo10+1_armhf.deb || apt-get install -f -y
|
||||||
|
RUN rm redis-tools_6.0.6-1~bpo10+1_armhf.deb
|
||||||
|
{% elif CONFIGURED_ARCH == "arm64" %}
|
||||||
|
RUN curl -o redis-tools_6.0.6-1~bpo10+1_arm64.deb "https://sonicstorage.blob.core.windows.net/packages/redis/redis-tools_6.0.6-1_bpo10+1_arm64.deb?sv=2015-04-05&sr=b&sig=GbkJV2wWln3hoz27zKi5erdk3NDKrAFrQriA97bcRCY%3D&se=2030-10-24T04%3A22%3A21Z&sp=r"
|
||||||
|
RUN dpkg -i redis-tools_6.0.6-1~bpo10+1_arm64.deb || apt-get install -f -y
|
||||||
|
RUN rm redis-tools_6.0.6-1~bpo10+1_arm64.deb
|
||||||
|
{% else %}
|
||||||
|
RUN curl -o redis-tools_6.0.6-1~bpo10+1_amd64.deb "https://sonicstorage.blob.core.windows.net/packages/redis/redis-tools_6.0.6-1~bpo10+1_amd64.deb?sv=2015-04-05&sr=b&sig=73zbmjkf3pi%2Bn0R8Hy7CWT2EUvOAyzM5aLYJWCLySGM%3D&se=2030-09-06T19%3A44%3A59Z&sp=r"
|
||||||
|
RUN dpkg -i redis-tools_6.0.6-1~bpo10+1_amd64.deb || apt-get install -f -y
|
||||||
|
RUN rm redis-tools_6.0.6-1~bpo10+1_amd64.deb
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
# For templating
|
# For templating
|
||||||
RUN pip install j2cli
|
RUN pip install j2cli
|
||||||
|
|
||||||
|
@ -426,6 +426,9 @@ RUN apt-get install -y \
|
|||||||
curl \
|
curl \
|
||||||
gnupg2 \
|
gnupg2 \
|
||||||
software-properties-common
|
software-properties-common
|
||||||
|
{%- if CONFIGURED_ARCH == "armhf" %}
|
||||||
|
RUN update-ca-certificates --fresh
|
||||||
|
{%- endif %}
|
||||||
RUN curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
|
RUN curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
|
||||||
RUN add-apt-repository \
|
RUN add-apt-repository \
|
||||||
"deb [arch={{ CONFIGURED_ARCH }}] https://download.docker.com/linux/debian \
|
"deb [arch={{ CONFIGURED_ARCH }}] https://download.docker.com/linux/debian \
|
||||||
|
Reference in New Issue
Block a user