From e5d0cba49ed5e3d2f6d3fb093a10d9b5b45910fa Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 24 Oct 2023 18:31:03 +0200 Subject: [PATCH] sdk_lib: Use new manifests location --- sdk_lib/Dockerfile.lean-arch | 5 ++++- sdk_lib/sdk_container_common.sh | 2 +- sdk_lib/sdk_entry.sh | 2 +- sdk_lib/sdk_init_selfcontained.sh | 4 +++- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/sdk_lib/Dockerfile.lean-arch b/sdk_lib/Dockerfile.lean-arch index ee3bbf68ed..e9d3015330 100644 --- a/sdk_lib/Dockerfile.lean-arch +++ b/sdk_lib/Dockerfile.lean-arch @@ -13,8 +13,11 @@ RUN if [ -n "$RMARCH" ]; then \ sudo rm -f /usr/local/bin/*-$RMARCH; \ fi -# Note: .repo/manifests/version.txt will survive this. That's intended. +# Note: Preserve manifests. +RUN sudo mv /mnt/host/source/src/scripts/manifests /manifests RUN sudo rm -rf /mnt/host/source/* +RUN sudo mkdir -p /mnt/host/source/src/scripts +RUN sudo mv /manifests /mnt/host/source/src/scripts/manifests FROM scratch diff --git a/sdk_lib/sdk_container_common.sh b/sdk_lib/sdk_container_common.sh index 55fdcc5b7e..56751663d1 100644 --- a/sdk_lib/sdk_container_common.sh +++ b/sdk_lib/sdk_container_common.sh @@ -7,7 +7,7 @@ # # globals # -sdk_container_common_versionfile="sdk_container/.repo/manifests/version.txt" +sdk_container_common_versionfile="manifests/version.txt" sdk_container_common_registry="ghcr.io/flatcar" sdk_container_common_env_file="sdk_container/.sdkenv" diff --git a/sdk_lib/sdk_entry.sh b/sdk_lib/sdk_entry.sh index eca47d7fa8..bb86be133b 100755 --- a/sdk_lib/sdk_entry.sh +++ b/sdk_lib/sdk_entry.sh @@ -15,7 +15,7 @@ chown -R sdk:sdk /home/sdk # chroot portage conf to point to the correct binhost. ( source /etc/lsb-release # SDK version in DISTRIB_RELEASE - source /mnt/host/source/.repo/manifests/version.txt # OS image version in FLATCAR_VERSION_ID + source /mnt/host/source/src/scripts/manifests/version.txt # OS image version in FLATCAR_VERSION_ID version="${FLATCAR_VERSION_ID}" # If this is a nightly build tag we can use pre-built binaries directly from the diff --git a/sdk_lib/sdk_init_selfcontained.sh b/sdk_lib/sdk_init_selfcontained.sh index 76b08b3c21..2292a4698b 100755 --- a/sdk_lib/sdk_init_selfcontained.sh +++ b/sdk_lib/sdk_init_selfcontained.sh @@ -26,8 +26,10 @@ function clone_version() { } # -- -version="$(source /mnt/host/source/.repo/manifests/version.txt; echo $FLATCAR_VERSION)" +version=$(source /mnt/host/source/src/scripts/manifests/version.txt; echo "$FLATCAR_VERSION") mkdir -p /home/sdk/trunk/src/third_party/ +# Drop the manifests dir, it will be replaced by one from scripts repo. +rm -rf /home/sdk/trunk/src/scripts clone_version scripts /home/sdk/trunk/src/scripts "$version"