SDK container: spelling + cp optimisation from code review

Add suggestions by @pothos from code review
- use `cp --reflink=auto`
- spelling error fixes

Co-authored-by: Kai Lüke <pothos@users.noreply.github.com>
This commit is contained in:
Thilo Fromm 2021-10-27 12:10:58 +02:00 committed by flatcar-ci
parent 9fba5789f9
commit 337e0d7c3c
4 changed files with 6 additions and 6 deletions

View File

@ -25,7 +25,7 @@ Integrated mode will closely integrate with the Scripts directory and bind-mount
## Standalone mode
In standalone mode, the SDK is just another Docker container. Interaction with the container happens via use of `docker` directly. Use for experimenting and for throw-away work only, otherwise please use ingetrated mode (see below).
In standalone mode, the SDK is just another Docker container. Interaction with the container happens via use of `docker` directly. Use for experimenting and for throw-away work only, otherwise please use integrated mode (see below).
* Check the list of available versions and pick a version to use. The SDK Major versions correspond to Flatcar Major release versions.
List of images: `https://github.com/orgs/flatcar-linux/packages/container/package/flatcar-sdk-all`
@ -50,7 +50,7 @@ To start a container in privileged mode with `/dev` available use:
## Integrated mode
This is the preferred mode of working with the SDK.
Interaction with the container happnes via wrapper scripts from the Scripts repository.
Interaction with the container happens via wrapper scripts from the Scripts repository.
Both the host's scripts repo as well as its submodules (portage-stable and coreos-overlay) are made available in the container, allowing for work on these repos directly.
The wrapper scripts will re-use existing containers instead of creating new ones to preserve your work in the container, enabling consistency.
@ -91,4 +91,4 @@ When using `-v`, the corresponding release version of the Scripts repository is
# Bootstrapping a new SDK tarball using the SDK container
THe script `./bootstrap_sdk_container` bootstraps a new SDK tarball using an existing SDK container and seed tarball. Specifying the seed version is required for this script.
The script `./bootstrap_sdk_container` bootstraps a new SDK tarball using an existing SDK container and seed tarball. Specifying the seed version is required for this script.

View File

@ -161,7 +161,7 @@ else
# since toolchains build uses catalyst which requires privileged access.
tarball_copied=""
if [ "$(basename "${tarball}")" != "${tarball}" ] ; then
cp "${tarball}" ./
cp --reflink=auto "${tarball}" ./
tarball="$(basename "${tarball}")"
tarball_copied="${tarball}"
fi

View File

@ -3,7 +3,7 @@
Scripts in this directory aim to ease automation of Flatcar builds in continuous integration systems.
Each script represents a distinct build step; each step ingests the container image of the previous step and produces a new container image for the next step.
Notable exceptions are "SDK Bootstrap" (`sdk.sh`) which only creates an SDK tarball, and "VMs build` which does not output a container but only VM (vendor) images.
Notable exceptions are "SDK Bootstrap" (`sdk.sh`) which only creates an SDK tarball, and "VMs build" which does not output a container but only VM (vendor) images.
Please refer to the individual scripts for prerequisites, input parameters, and outputs.

View File

@ -70,7 +70,7 @@ function vm_build() {
# copy resulting images + push to buildcache
./run_sdk_container -n "${vms_container}" \
-v "${vernum}" \
cp -R "${CONTAINER_IMAGE_ROOT}/${arch}-usr/" "./${images_out}/"
cp --reflink=auto -R "${CONTAINER_IMAGE_ROOT}/${arch}-usr/" "./${images_out}/"
cd "images/latest"
copy_to_buildcache "images/${arch}/${vernum}/" *