[PATCH 1/1] kas container: switch to debian bookworm

33 views
Skip to first unread message

Felix Moessbauer

unread,
May 22, 2023, 1:56:05 AM5/22/23
to kas-...@googlegroups.com, jan.k...@siemens.com, Felix Moessbauer
This patch uses the debian bookworm base image for the kas container. By
that, we can also use the distro version of python3-kconfiglib. In
addition, pip3 on bookworm adds more guards to protect the system from
incompatible global python dependencies. By that, we need to explicitly
tell pip3 install that the way we install kas is safe.

Signed-off-by: Felix Moessbauer <felix.mo...@siemens.com>
---
Note to the maintainer:

As bookworm is not released yet, I'm thinking about delaying this patch till the release.
However, due to the dpkg zstd issue in debian based distributions we get more and more
pressure to have dpkg >= 1.21 which is only shipped from bookworm on.

Opinions?

Felix

Dockerfile | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index 4c5c14a..0ca1adb 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -21,7 +21,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

-FROM debian:bullseye-slim as kas-base
+FROM debian:bookworm-slim as kas-base

ARG TARGETPLATFORM
ARG DEBIAN_FRONTEND=noninteractive
@@ -31,7 +31,7 @@ RUN apt-get update && \
localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 && \
apt-get install --no-install-recommends -y \
python3-pip python3-setuptools python3-wheel python3-yaml python3-distro python3-jsonschema \
- python3-newt python3-colorlog \
+ python3-newt python3-colorlog python3-kconfiglib \
gosu lsb-release file vim less procps tree tar bzip2 zstd pigz lz4 unzip tmux libncurses-dev \
git-lfs mercurial iproute2 ssh-client telnet curl rsync gnupg awscli sudo \
socat bash-completion && \
@@ -41,8 +41,12 @@ RUN apt-get update && \
COPY . /kas
RUN chmod -R o-w /kas

-RUN pip3 --proxy=$https_proxy install --no-deps kconfiglib && \
- pip3 --proxy=$https_proxy install --no-deps /kas && kas --version && \
+RUN pip3 --proxy=$https_proxy install \
+ --no-deps \
+ --no-build-isolation \
+ --break-system-packages \
+ /kas && \
+ kas --version && \
rm -rf $(pip3 cache dir)

RUN ln -s /kas/contrib/oe-git-proxy /usr/bin/
--
2.39.2

Jan Kiszka

unread,
May 22, 2023, 2:00:17 AM5/22/23
to Felix Moessbauer, kas-...@googlegroups.com, Klincov, Wadim
On 22.05.23 07:55, Felix Moessbauer wrote:
> This patch uses the debian bookworm base image for the kas container. By
> that, we can also use the distro version of python3-kconfiglib. In
> addition, pip3 on bookworm adds more guards to protect the system from
> incompatible global python dependencies. By that, we need to explicitly
> tell pip3 install that the way we install kas is safe.
>
> Signed-off-by: Felix Moessbauer <felix.mo...@siemens.com>
> ---
> Note to the maintainer:
>
> As bookworm is not released yet, I'm thinking about delaying this patch till the release.
> However, due to the dpkg zstd issue in debian based distributions we get more and more
> pressure to have dpkg >= 1.21 which is only shipped from bookworm on.
>
> Opinions?

As the official release is scheduled for early June, I would simply wait
a bit more for now. Maybe I will merge in a week or so and leave things
testing in next.

Jan

--
Siemens AG, Technology
Competence Center Embedded Linux

Jan Kiszka

unread,
May 31, 2023, 2:31:06 AM5/31/23
to kas-devel, Moessbauer, Felix (T CED SES-DE), Klincov, Wadim
From: Felix Moessbauer <felix.mo...@siemens.com>

This patch uses the debian bookworm base image for the kas container. By
that, we can also use the distro version of python3-kconfiglib. In
addition, pip3 on bookworm adds more guards to protect the system from
incompatible global python dependencies. By that, we need to explicitly
tell pip3 install that the way we install kas is safe.

Signed-off-by: Felix Moessbauer <felix.mo...@siemens.com>
[Jan: replace pylint3 with pylint]
Signed-off-by: Jan Kiszka <jan.k...@siemens.com>
---
Dockerfile | 21 +++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index 4c5c14a..ec85d7a 100644
@@ -89,15 +93,16 @@ USER builder

FROM kas-base as kas

-# The install package list are actually taking 1:1 from their documentation,
-# so there some packages that can already installed by other downstream layers.
-# This will not change any image sizes on all the layers in use.
+# The install package list are actually taking 1:1 from their documentation
+# (exception: pylint3 -> pylint), so there some packages that can already
+# installed by other downstream layers. This will not change any image sizes
+# on all the layers in use.
RUN apt-get update && \
apt-get install --no-install-recommends -y \
gawk wget git diffstat unzip texinfo \
gcc build-essential chrpath socat cpio python3 python3-pip python3-pexpect \
xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev \
- pylint3 xterm python3-subunit mesa-common-dev zstd liblz4-tool && \
+ pylint xterm python3-subunit mesa-common-dev zstd liblz4-tool && \
if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
apt-get install --no-install-recommends -y gcc-multilib g++-multilib; \
fi && \
--
2.35.3

Jan Kiszka

unread,
Jun 1, 2023, 3:17:28 AM6/1/23
to kas-devel, Moessbauer, Felix (T CED SES-DE), Klincov, Wadim
Just a heads-up: I've merged this into next, but kas-isar:next is
showing in some scenarios now problems. Still trying to identify the
trigger(s).
Reply all
Reply to author
Forward
0 new messages