From 91f9b6f4e42f658c8a0194b75acbc8f8e8187fb0 Mon Sep 17 00:00:00 2001 From: Saikrishna Arcot Date: Fri, 23 Jul 2021 09:28:36 -0700 Subject: [PATCH] Add cron and the python 3 mock packages to the Bullseye slave image When using dpkg with the --root flag to install a deb package in a chroot, dpkg checks to see if the users and groups specified in the /var/lib/dpkg/statoverride file are valid. The problem is, it checks against the host system's /etc/passwd and /etc/group files, instead of /etc/passwd and /etc/group inside the chroot. In the slave image for Buster, cron appears to have been automatically installed, and so the crontab group existed. This doesn't appear to be true for Bullseye, so explicitly install it. This makes sure that the crontab group exists on the slave image itself. Also install the mock python 3 package, this is needed by some test. Signed-off-by: Saikrishna Arcot --- sonic-slave-bullseye/Dockerfile.j2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sonic-slave-bullseye/Dockerfile.j2 b/sonic-slave-bullseye/Dockerfile.j2 index c2a7fd7ab4ac..fac3bbe2b4aa 100644 --- a/sonic-slave-bullseye/Dockerfile.j2 +++ b/sonic-slave-bullseye/Dockerfile.j2 @@ -72,6 +72,7 @@ RUN apt-get update && apt-get install -y \ libzmq5 \ libzmq3-dev \ jq \ + cron \ # For quagga build libreadline-dev \ texlive-latex-base \ @@ -398,7 +399,7 @@ RUN pip3 install setuptools==49.6.00 RUN pip3 install wheel==0.35.1 # For building sonic-utilities -RUN pip3 install fastentrypoints +RUN pip3 install fastentrypoints mock # For running Python unit tests RUN pip3 install pytest-runner==5.2