debian: Use minbase variant for debootstrap

By default debootstrap creates a base Debian installation with all
packages of a priority required and important. This includes packages
such as systemd, systemd-sys, and systemd-timesyncd. This creates a
race condition when debootstrap is complete and then the starlingx
packages are updated after. This is most notable while trying to
install ntpd and systemd-timesyncd is already installed.

When using the minbase variant debootstrap will only install the
required packages in order to use a Debian system. This includes
apt, base-files, base-passwd, bash, and etc. The full list of
packages that are installed, can be determined by
running the following command:

dpkg-query -W --showformat='${Package}\t${Priority}\n' | grep "required$"

Using the minbase variant option with debootstrap allows the build-image
script to install the StarlingX packages over on top of the base
system created by debootstrap.

The side affect of this is that it will speed up image builds when
using the build-image since debootstrap is only installing the
required packages. Another benefit is that it will create
a smaller /sysroot footprint.

This dockerfile change is a temporary workaround so that
LAT can add this change to the StarlingX Debian build system.
Once this change has been added then it can be dropped.

Test Plan
PASS build docker containers with stx-init-env --rebuild
PASS Build new ISO
PASS Run new ISO and make sure that you get a login prompt.

Partial-Bug: 1959607

Signed-off-by: Charles Short <charles.short@windriver.com>
Change-Id: I858ff95d54808cefd816874e3029e92a240619f1
This commit is contained in:
Charles Short 2022-01-31 18:04:17 +00:00
parent 17d69346ac
commit a2a8ce7834

View File

@ -39,5 +39,10 @@ ADD ${LAT_BINARY_RESOURCE_PATH}/lat-sdk.sh /opt/LAT/AppSDK.sh
RUN chmod +x /opt/LAT/AppSDK.sh
RUN /opt/LAT/AppSDK.sh -d /opt/LAT/SDK -y
# Workaround for using minbase variant for debootstrap
# See https://bugs.launchpad.net/starlingx/+bug/1959607
RUN sed -i -e 's#--no-check-gpg#--variant=minbase --no-check-gpg#g' \
/opt/LAT/SDK/sysroots/x86_64-wrlinuxsdk-linux/usr/lib/python3.10/site-packages/genimage/package_manager/deb/__init__.py
ENTRYPOINT ["/usr/bin/tini", "--"]
CMD ["/opt/LAT/lat/latd"]