diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000000..d7d526ae8e --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +__build__ +sdk_container/.cache diff --git a/.gitignore b/.gitignore index cf694dcf24..a62ac41ee1 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,15 @@ *.pyc *~ /cbuildbot_package.list + +# Flatcar SDK tarballs +*.tar.bz2 + +# SDK container env passing helpers +sdk_container/.env +sdk_container/.sdkenv + +# build cache / artefacts directories +__build__/ +sdk_container/.cache +sdk_container/.config diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000000..e026cc5d93 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,6 @@ +[submodule "sdk_container/src/third_party/coreos-overlay"] + path = sdk_container/src/third_party/coreos-overlay + url = https://github.com/flatcar/coreos-overlay.git +[submodule "sdk_container/src/third_party/portage-stable"] + path = sdk_container/src/third_party/portage-stable + url = https://github.com/flatcar/portage-stable.git diff --git a/bootstrap_sdk b/bootstrap_sdk index 9bfbe92c77..8646267867 100755 --- a/bootstrap_sdk +++ b/bootstrap_sdk @@ -40,7 +40,6 @@ TYPE="flatcar-sdk" # include upload options . "${BUILD_LIBRARY_DIR}/release_util.sh" || exit 1 -ROOT_OVERLAY=${TEMPDIR}/stage4_overlay ## Define the stage4 config template catalyst_stage4() { @@ -63,6 +62,7 @@ export GENTOO_MIRRORS catalyst_init "$@" check_gsutil_opts +ROOT_OVERLAY=${TEMPDIR}/stage4_overlay if [[ "$STAGES" =~ stage4 ]]; then info "Setting release to ${FLATCAR_VERSION}" @@ -107,9 +107,11 @@ if [[ "$STAGES" =~ stage4 ]]; then sign_and_upload_files "packages" "${def_upload_path}" "pkgs/" \ "${BINPKGS}"/* - # Upload the SDK toolchain packages - sign_and_upload_files "cross toolchain packages" "${def_upload_path}" \ - "toolchain/" "${BINPKGS}/crossdev"/* + if [ -d "${BINPKGS}/crossdev" ]; then + # Upload the SDK toolchain packages + sign_and_upload_files "cross toolchain packages" "${def_upload_path}" \ + "toolchain/" "${BINPKGS}/crossdev"/* + fi fi command_completed diff --git a/bootstrap_sdk_container b/bootstrap_sdk_container new file mode 100755 index 0000000000..6384e69e49 --- /dev/null +++ b/bootstrap_sdk_container @@ -0,0 +1,79 @@ +#!/bin/bash +# +# Copyright (c) 2021 The Flatcar Maintainers. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +set -eu + +cd $(dirname "$0") +source sdk_lib/sdk_container_common.sh + +seed_version="" +target_version="" + +declare -a cleanup + +# -- + +usage() { + echo " Usage:" + echo " $0 [-x ]" + echo + echo " This script will bootstrap a new SDK tarball using an SDK container." + echo " '$sdk_container_common_versionfile' will be updated to the target version." + echo + echo " - SDK version number (e.g. '3005.0.0') to use for bootstrapping." + echo " The SDK container will be pulled and the tarball" + echo " downloaded if necessary." + echo " - SDK version number (e.g. '3027.0.0') of the new SDK." + echo " -x - For each resource generated during build (container etc.)" + echo " add a cleanup line to