diff --git a/bootstrap_sdk b/bootstrap_sdk index bf094e28a79..8a36665b64d 100755 --- a/bootstrap_sdk +++ b/bootstrap_sdk @@ -59,12 +59,6 @@ TYPE="flatcar-sdk" . "${BUILD_LIBRARY_DIR}/release_util.sh" || exit 1 -DEFINE_string stage1_portage_path "" \ - "Path to custom portage ebuilds tree to use in stage 1 (DANGEROUS; USE WITH CAUTION)" -DEFINE_string stage1_overlay_path "" \ - "Path to custom overlay ebuilds tree to use in stage 1 (DANGEROUS; USE WITH CAUTION)" - - ## Define the stage4 config template catalyst_stage4() { cat <>"$TEMPDIR/stage1.spec" - fi - - rm -f "${update_seed_file}" - - # Finally, build stage 1 - build_stage stage1 -} - -if [[ "$STAGES" =~ stage1 ]]; then - build_stage1 - STAGES="${STAGES/stage1/}" - SEED="${TYPE}/stage1-${ARCH}-latest" -fi - catalyst_build if [[ "$STAGES" =~ stage4 ]]; then diff --git a/build_library/build_image_util.sh b/build_library/build_image_util.sh index 4abef8f0ef4..285ed519708 100755 --- a/build_library/build_image_util.sh +++ b/build_library/build_image_util.sh @@ -365,7 +365,7 @@ get_metadata() { local mirror="$(echo "${v}" | grep mirror:// | cut -d '/' -f 3)" if [ -n "${mirror}" ]; then # Take only first mirror, those not working should be removed - local location="$(grep "^${mirror}"$'\t' /var/gentoo/repos/gentoo/profiles/thirdpartymirrors | cut -d $'\t' -f 2- | cut -d ' ' -f 1 | tr -d $'\t')" + local location="$(grep "^${mirror}"$'\t' /mnt/host/source/src/third_party/portage-stable/profiles/thirdpartymirrors | cut -d $'\t' -f 2- | cut -d ' ' -f 1 | tr -d $'\t')" v="$(echo "${v}" | sed "s#mirror://${mirror}/#${location}#g")" fi new_val+="${v} " @@ -491,7 +491,6 @@ EOF local license_dirs=( "/mnt/host/source/src/third_party/coreos-overlay/licenses/" "/mnt/host/source/src/third_party/portage-stable/" - "/var/gentoo/repos/gentoo/licenses/" "none" ) for license_file in ${license_list}; do diff --git a/build_library/catalyst.sh b/build_library/catalyst.sh index ef08aa5f8b6..fab4a947c1e 100644 --- a/build_library/catalyst.sh +++ b/build_library/catalyst.sh @@ -104,7 +104,8 @@ catalyst_stage1() { cat <"${update_seed_file}" diff --git a/sdk_container/src/third_party/coreos-overlay/coreos/stage1_hooks/0001-update-profile-coreos-overlay.sh b/sdk_container/src/third_party/coreos-overlay/coreos/stage1_hooks/0001-update-profile-coreos-overlay.sh deleted file mode 100755 index e9a01036aed..00000000000 --- a/sdk_container/src/third_party/coreos-overlay/coreos/stage1_hooks/0001-update-profile-coreos-overlay.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash -set -x -set -euo pipefail - -stage1_repo="${1}" -new_repo="${2}" -parent_file='profiles/coreos/amd64/parent' -old_parent_line='portage-stable:default/linux/amd64/17.0/no-multilib/hardened' -stage1_parent="${stage1_repo}/${parent_file}" -new_parent="${new_repo}/${parent_file}" - -if [[ ! -e "${new_parent}" ]]; then - echo "no file '${parent_file}' in new repo, nothing to do" - exit 0 -fi - -if [[ ! -e "${stage1_parent}" ]]; then - echo "no file '${parent_file}' in stage1 repo, nothing to do" - exit 0 -fi - -if grep --quiet --fixed-strings --line-regexp --regexp="${old_parent_line}" -- "${stage1_parent}"; then - rm -f "${stage1_parent}" - cp -a "${new_parent}" "${stage1_parent}" -fi diff --git a/sdk_container/src/third_party/coreos-overlay/coreos/stage1_hooks/0002-glibc-crypt-coreos-overlay.sh b/sdk_container/src/third_party/coreos-overlay/coreos/stage1_hooks/0002-glibc-crypt-coreos-overlay.sh deleted file mode 100755 index e8891c76a33..00000000000 --- a/sdk_container/src/third_party/coreos-overlay/coreos/stage1_hooks/0002-glibc-crypt-coreos-overlay.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash -set -x -set -euo pipefail - -stage1_repo=${1} -new_repo=${2} -update_seed_file=${3} - -base_profile_dir='profiles/coreos/base' - -declare -A fixups_old=( - ['package.mask']='>=virtual/libcrypt-2' - ['package.unmask']='=virtual/libcrypt-1-r1' - ['package.use.force']='sys-libs/glibc crypt' - ['package.use.mask']='sys-libs/glibc -crypt' -) - -declare -A fixups_new=( - ['package.mask']='>=virtual/libcrypt-2' - ['package.unmask']='"${ff}" - done - echo x >"${update_seed_file}" - exit 0 -done diff --git a/sdk_container/src/third_party/coreos-overlay/coreos/stage1_hooks/README.md b/sdk_container/src/third_party/coreos-overlay/coreos/stage1_hooks/README.md deleted file mode 100644 index d31163fe6c2..00000000000 --- a/sdk_container/src/third_party/coreos-overlay/coreos/stage1_hooks/README.md +++ /dev/null @@ -1,18 +0,0 @@ -The scripts in this directory are called by the SDK bootstrapping -script when setting up the portage-stable and coreos-overlay repos for -the stage1 build. The scripts are invoked with two arguments - a path -to the stage1 repository, and a path to the current repository. The -difference between the two is that the stage1 repository is a copy of -a repository saved in the seed SDK (thus it's going to be an older -version of the repository), whereas the current repository is a -repository that will be a base of the new SDK. The idea here is that -something in the stage1 repository may be too old, thus it should be -replaced with its equivalent from the current repository. - -For more information about the bootstrap process, please see the -`bootstrap_sdk` script in [the scripts -repository](https://github.com/flatcar/scripts). - -The script for portage-stable should end with `-portage-stable.sh`, -and the script for coreos-overlay with '-coreos-overlay.sh`. For -example: `0000-replace-ROOTPATH-coreos-overlay.sh`.