Merge pull request #205 from flatcar-linux/t-lo/fix-sdk_entry-setup_board-fallout

fix sdk_entry.sh setup_board fallout
This commit is contained in:
Thilo Fromm 2022-01-07 13:26:38 +01:00 committed by GitHub
commit ee43062399
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -6,6 +6,10 @@ RUN touch /etc/debian_chroot
RUN chmod 644 /etc/passwd
RUN chmod 644 /etc/group
# User "root" is not in /etc/passwd / group in the SDK tarball
RUN echo 'root:x:0:0:root:/root:/bin/bash' >>/etc/passwd
RUN echo 'root:x:0:' >>/etc/group
RUN if ! grep -q portage /etc/group ; then \
echo "portage::250:portage" >>/etc/group; \
fi
@ -46,6 +50,7 @@ RUN echo "if [ -f /mnt/host/source/.sdkenv ]; then source /mnt/host/source/.sdke
COPY --chown=sdk:sdk sdk_lib/sdk_entry.sh /home/sdk
RUN chmod 755 /home/sdk/sdk_entry.sh
USER root:root
# This should be a NOP; if you see packages being rebuilt
# it's likely that submodules and SDK tarball are out of sync
RUN /home/sdk/sdk_entry.sh ./update_chroot --toolchain_boards="amd64-usr arm64-usr"

View File

@ -18,6 +18,9 @@ chown -R sdk:sdk /home/sdk
if [ "${FLATCAR_VERSION_ID}" != "${DISTRIB_RELEASE}" ] ; then
for target in amd64-usr arm64-usr; do
if [ ! -d "/build/$target" ] ; then
continue
fi
if [ -f "/build/$target/etc/target-version.txt" ] ; then
source "/build/$target/etc/target-version.txt"
if [ "${TARGET_FLATCAR_VERSION_ID}" = "${FLATCAR_VERSION_ID}" ] ; then