From d3255c0bbc50dc6b71f73f76961047c0e9846172 Mon Sep 17 00:00:00 2001 From: James Le Cuirot Date: Mon, 20 May 2024 17:26:22 +0100 Subject: [PATCH] Move and rename package repositories (part 2) Catalyst 4 has totally changed the way repositories are handled. It only works when the name of the directory containing the repository matches the configured name of that repository. We already renamed coreos to coreos-overlay accordingly, but we actually want entirely different names and more convenient locations too. The repositories are now known as gentoo-subset and flatcar-overlay, and they live under scripts/repos. Using the same name as upstream Gentoo would have been problematic, and just "flatcar" would have looked awkward in documentation. Signed-off-by: James Le Cuirot --- .github/workflows/common.sh | 3 +- ...kages-list => gentoo-subset-packages-list} | 0 .github/workflows/image_changes.sh | 4 +-- ...ate-gentoo-subset-packages-from-list.yaml} | 12 +++---- .github/workflows/update-metadata-glsa.yaml | 4 +-- PREFIX.md | 2 +- README.md | 18 +++++------ bootstrap_sdk | 14 ++++---- build_library/build_image_util.sh | 6 ++-- build_library/catalyst.sh | 24 +++++++------- build_library/dev_container_util.sh | 23 +++++++------ build_library/prefix_util.sh | 2 +- .../sysext_mangle_containerd-flatcar | 2 +- build_library/sysext_mangle_docker-flatcar | 2 +- build_library/toolchain_util.sh | 16 +++++----- build_library/vm_image_util.sh | 2 +- build_sysext | 4 +-- changelog/changes/2024-07-15-repo-rename.md | 2 +- checkout | 23 +++++++------ ci-automation/README.md | 2 +- ci-automation/image_changes.sh | 6 ++-- find_overlay_dups | 12 +++---- generate_payload | 12 +++---- jenkins/manifest.sh | 4 +-- repos/flatcar-overlay/.travis.yml | 21 ------------ repos/flatcar-overlay/.travis/coreos.conf | 8 ----- .../flatcar-overlay/.travis/setup_repoman.sh | 23 ------------- repos/flatcar-overlay/README.md | 6 ++-- .../app-containers/docker-cli/README.md | 2 +- .../app-containers/docker/README.md | 2 +- .../app-emulation/open-vm-tools/README.md | 2 +- .../flatcar-selinux-patches/README.md | 2 +- repos/flatcar-overlay/metadata/layout.conf | 2 +- .../metadata/repoman/repository.yaml | 2 +- .../profiles/coreos/amd64/parent | 2 +- .../profiles/coreos/arm64/parent | 2 +- .../coreos/base/package.accept_keywords | 2 +- .../profiles/coreos/base/package.mask | 2 +- .../profiles/coreos/base/package.unmask | 2 +- .../profiles/coreos/base/package.use | 2 +- .../profiles/coreos/base/package.use.mask | 2 +- .../profiles/coreos/base/parent | 2 +- .../profiles/coreos/base/profile.bashrc | 2 +- .../base/profile.bashrc.slsa-provenance | 2 +- .../profiles/coreos/targets/generic/use.force | 2 +- .../profiles/coreos/targets/generic/use.mask | 2 +- repos/flatcar-overlay/profiles/repo_name | 2 +- .../sys-apps/ignition/files/README.md | 6 ++-- .../sys-auth/pambase/README.md | 2 +- .../grub-2.06-add-gpt-partition-scheme.patch | 2 +- .../files/grub-2.06-add-verity-hash.patch | 2 +- repos/flatcar-overlay/sys-fs/lvm2/README.md | 2 +- repos/gentoo-subset/README.md | 12 +++---- repos/gentoo-subset/profiles/repo_name | 2 +- sdk_container/src/third_party/coreos-overlay | 1 + sdk_container/src/third_party/portage-stable | 1 + .../prefix-overlay/metadata/layout.conf | 2 +- .../skel/etc/portage/repos.conf/coreos.conf | 10 +++--- sdk_lib/sdk_entry.sh | 26 +++++++++++++-- sdk_lib/sdk_init_selfcontained.sh | 4 --- setup_board | 7 ++-- setup_prefix | 2 +- tag_release | 2 +- update_chroot | 32 +++++++++---------- update_distfiles | 2 +- update_ebuilds | 11 +++---- update_metadata | 2 +- update_sdk_container_image | 2 +- 68 files changed, 198 insertions(+), 229 deletions(-) rename .github/workflows/{portage-stable-packages-list => gentoo-subset-packages-list} (100%) rename .github/workflows/{update-portage-stable-packages-from-list.yaml => update-gentoo-subset-packages-from-list.yaml} (86%) delete mode 100644 repos/flatcar-overlay/.travis.yml delete mode 100644 repos/flatcar-overlay/.travis/coreos.conf delete mode 100755 repos/flatcar-overlay/.travis/setup_repoman.sh create mode 120000 sdk_container/src/third_party/coreos-overlay create mode 120000 sdk_container/src/third_party/portage-stable diff --git a/.github/workflows/common.sh b/.github/workflows/common.sh index 0c3b11e011a..f584e313e8f 100644 --- a/.github/workflows/common.sh +++ b/.github/workflows/common.sh @@ -13,9 +13,10 @@ if [[ ! -d "${WORK_SCRIPTS_DIR:-}" ]]; then fail "WORK_SCRIPTS_DIR env var does not point to a directory. It should point to the scripts repo which will be updated." fi +# Update these to use the new repo location once LTS has migrated. readonly SDK_OUTER_TOPDIR="${WORK_SCRIPTS_DIR}" readonly SDK_OUTER_OVERLAY="${SDK_OUTER_TOPDIR}/sdk_container/src/third_party/coreos-overlay" -readonly SDK_INNER_SRCDIR="/mnt/host/source/src" +readonly SDK_INNER_SRCDIR="/mnt/host/source/src/scripts/sdk_container/src" readonly SDK_INNER_OVERLAY="${SDK_INNER_SRCDIR}/third_party/coreos-overlay" readonly BUILDBOT_USERNAME="Flatcar Buildbot" diff --git a/.github/workflows/portage-stable-packages-list b/.github/workflows/gentoo-subset-packages-list similarity index 100% rename from .github/workflows/portage-stable-packages-list rename to .github/workflows/gentoo-subset-packages-list diff --git a/.github/workflows/image_changes.sh b/.github/workflows/image_changes.sh index 8008f0bd786..42fd2214151 100755 --- a/.github/workflows/image_changes.sh +++ b/.github/workflows/image_changes.sh @@ -25,8 +25,8 @@ function github_ricj_callback() { show_changes_env+=( # Override the default locations of repositories. "SCRIPTS_REPO=." - "COREOS_OVERLAY_REPO=../coreos-overlay" - "PORTAGE_STABLE_REPO=../portage-stable" + "FLATCAR_OVERLAY_REPO=../flatcar-overlay" + "GENTOO_SUBSET_REPO=../gentoo-subset" ) show_changes_params+=( # We may not have a tag handy, so we tell show-changes diff --git a/.github/workflows/update-portage-stable-packages-from-list.yaml b/.github/workflows/update-gentoo-subset-packages-from-list.yaml similarity index 86% rename from .github/workflows/update-portage-stable-packages-from-list.yaml rename to .github/workflows/update-gentoo-subset-packages-from-list.yaml index 044b77af865..d778df0b9f6 100644 --- a/.github/workflows/update-portage-stable-packages-from-list.yaml +++ b/.github/workflows/update-gentoo-subset-packages-from-list.yaml @@ -1,4 +1,4 @@ -name: Keep portage-stable packages updated +name: Keep gentoo-subset packages updated on: schedule: - cron: '0 7 * * 1' @@ -35,10 +35,10 @@ jobs: git config --global user.name "Flatcar Buildbot" git config --global user.email "buildbot@flatcar-linux.org" old_head=$(git -C scripts rev-parse HEAD) - packages_list=$(realpath scripts/.github/workflows/portage-stable-packages-list) + packages_list=$(realpath scripts/.github/workflows/gentoo-subset-packages-list) gentoo_repo=$(realpath gentoo) build_scripts=$(realpath flatcar-build-scripts) - pushd scripts/sdk_container/src/third_party/portage-stable + pushd scripts/repos/gentoo-subset while read -r package; do if [[ ! -e "${package}" ]]; then # If this happens, it means that the package was moved to overlay @@ -50,7 +50,7 @@ jobs: # If this happens, it means that the package was obsoleted or moved # in Gentoo. The obsoletion needs to be handled in the case-by-case # manner, while move should be handled by doing the same move - # in portage-stable. The build should not break because of the move, + # in gentoo-subset. The build should not break because of the move, # because most likely it's already reflected in the profiles/updates # directory. echo "::warning title=${package}::Obsolete or moved package" @@ -73,10 +73,10 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} path: scripts - branch: buildbot/weekly-portage-stable-package-updates-${{steps.update-listed-packages.outputs.TODAYDATE }} + branch: buildbot/weekly-gentoo-subset-package-updates-${{steps.update-listed-packages.outputs.TODAYDATE }} delete-branch: true base: main - title: Weekly portage-stable package updates ${{steps.update-listed-packages.outputs.TODAYDATE }} + title: Weekly gentoo-subset package updates ${{steps.update-listed-packages.outputs.TODAYDATE }} body: | CI: TODO diff --git a/.github/workflows/update-metadata-glsa.yaml b/.github/workflows/update-metadata-glsa.yaml index ead1c2a4065..de3af834112 100644 --- a/.github/workflows/update-metadata-glsa.yaml +++ b/.github/workflows/update-metadata-glsa.yaml @@ -15,7 +15,7 @@ jobs: - name: Update GLSA metadata id: update-glsa-metadata run: | - glsa_dir='sdk_container/src/third_party/portage-stable/metadata/glsa' + glsa_dir='repos/gentoo-subset/metadata/glsa' rm -rf "${glsa_dir}" mkdir --parents "${glsa_dir}" rsync --archive rsync://rsync.gentoo.org/gentoo-portage/metadata/glsa/* "${glsa_dir}" @@ -30,6 +30,6 @@ jobs: base: main title: Monthly GLSA metadata ${{steps.update-glsa-metadata.outputs.TODAYDATE }} body: Updated GLSA metadata - commit-message: "portage-stable/metadata: Monthly GLSA metadata updates" + commit-message: "gentoo-subset/metadata: Monthly GLSA metadata updates" author: Flatcar Buildbot labels: main diff --git a/PREFIX.md b/PREFIX.md index e353a0d5b62..1d6b6d17106 100644 --- a/PREFIX.md +++ b/PREFIX.md @@ -35,7 +35,7 @@ Prefix uses a _staging environment_ to build binary packages, then installs thes The _staging environment_ contains toolchains and all build tools required to create binary packages (a full `@system`). The _final environment_ only contains run-time dependencies. -Packages are built from ebuilds in coreos-overlay, portage-stable, and prefix-overlay. +Packages are built from ebuilds in flatcar-overlay, gentoo-subset, and prefix-overlay. A QoL `emerge` wrapper is included to install packages to the prefix. diff --git a/README.md b/README.md index 262180cec55..9ad11ddad95 100644 --- a/README.md +++ b/README.md @@ -14,20 +14,18 @@ The SDK can be used to # Using the scripts repository The repository is meant to be the entry point for Flatcar builds and development. -Ebuilds for all packages reside in one of 2 subdirectories - [coreos-overlay](sdk_container/src/third_party/coreos-overlay) and [portage-stable](sdk_container/src/third_party/portage-stable/): +Ebuilds for all packages reside in one of 2 subdirectories - [flatcar-overlay](repos/flatcar-overlay) and [gentoo-subset](repos/gentoo-subset/): ``` scripts - +--sdk_container - +---------src - +--third_party - +------coreos-overlay - +------portage-stable + +--repos + +--flatcar-overlay + +--gentoo-subset ``` -`portage-stable` is kept in alignment with upstream Gentoo and should not contain any modifications (with only minor, well-justified exceptions). +`gentoo-subset` is kept in alignment with upstream Gentoo and should not contain any modifications (with only minor, well-justified exceptions). Consider it a small sub-set of Gentoo. -`coreos-overlay` contains significantly modified or even entirely self-written ebuilds. +`flatcar-overlay` contains significantly modified or even entirely self-written ebuilds. The `scripts` repository makes ample use of tags to mark releases. Sometimes, local and origin tags can diverge (e.g. when re-tagging something locally to test a build). @@ -52,7 +50,7 @@ While work on a native ARM64 native SDK is ongoing, it's unfortunately not ready The container can be run in one of two ways - "standalone", or integrated with the [scripts](https://github.com/flatcar/scripts) repo: * Standalone mode will use no host volumes and will allow you to play with the SDK in a sandboxed throw-away environment. In standalone mode, you interface with Docker directly to use the SDK container. -* Integrated mode will closely integrate with the scripts repo directory and bind-mount it as well as the portage-stable and coreos-overlay directories into the container. Integrated mode uses wrapper scripts to interact with the SDK container. This is the recommended way for developing patches for Flatcar. +* Integrated mode will closely integrate with the scripts repo directory and bind-mount it as well as the gentoo-subset and flatcar-overlay directories into the container. Integrated mode uses wrapper scripts to interact with the SDK container. This is the recommended way for developing patches for Flatcar. ## Standalone mode @@ -82,7 +80,7 @@ To start a container in privileged mode with `/dev` available use: This is the preferred mode of working with the SDK. Interaction with the container happens via wrapper scripts from the scripts repository. -Both the host's scripts repo as well as the ebuild paths (portage-stable and coreos-overlay) are made available in the container, allowing for work on these directly. +Both the host's scripts repo as well as the ebuild paths (gentoo-subset and flatcar-overlay) are made available in the container, allowing for work on these directly. The wrapper scripts will re-use existing containers instead of creating new ones to preserve your work in the container, enabling consistency. To clone the scripts repo and pick a version: diff --git a/bootstrap_sdk b/bootstrap_sdk index 36bda6ecca9..357f4179197 100755 --- a/bootstrap_sdk +++ b/bootstrap_sdk @@ -18,13 +18,13 @@ # will be linked against the SEED SDK libraries, NOT against libraries built # in stage 1. # -# 3. stage2: Run portage-stable/scripts/bootstrap.sh +# 3. stage2: Run gentoo-subset/scripts/bootstrap.sh # This rebuilds the toolchain using Gentoo bootstrapping, ensuring it's not linked # to or otherwise influenced by whatever was in the "seed" tarball. # The toolchain rebuild may contain updated package ebuilds from -# third_party/(portage-stable|coreos-overlay). -# This and all following stages use portage-stable and coreos-overlay -# from third_party/... (see 1.) +# repos/(gentoo-subset|flatcar-overlay). +# This and all following stages use gentoo-subset and flatcar-overlay +# from repos/... (see 1.) # # 4. stage3: Run emerge -e system to rebuild everything using the fresh updated # toolchain from 3., using the normal USE flags provided by the profile. This @@ -95,11 +95,11 @@ chmod 1777 "${ROOT_OVERLAY}/tmp" cp "${BUILD_LIBRARY_DIR}/toolchain_util.sh" "${ROOT_OVERLAY}/tmp" -# Stage 1 uses "known-good" ebuilds (from both coreos-overlay and portage-stable) +# Stage 1 uses "known-good" ebuilds (from both flatcar-overlay and gentoo-subset) # to build a minimal toolchain (USE="-*") for stage 2. # -# No package updates must happen in stage 1, so we use the portage-stable and -# coreos-overlay paths included with the current SDK (from the SDK chroot's +# No package updates must happen in stage 1, so we use the gentoo-subset and +# flatcar-overlay paths included with the current SDK (from the SDK chroot's # /var/gentoo/repos/). "Current SDK" refers to the SDK we entered with # 'cork enter', i.e. the SDK we run ./bootstrap_sdk in. # diff --git a/build_library/build_image_util.sh b/build_library/build_image_util.sh index 7712141c36a..e394287175f 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' /mnt/host/source/src/third_party/portage-stable/profiles/thirdpartymirrors | cut -d $'\t' -f 2- | cut -d ' ' -f 1 | tr -d $'\t')" + local location="$(grep "^${mirror}"$'\t' /var/gentoo/repos/gentoo-subset/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} " @@ -489,8 +489,8 @@ EOF local license_list # define before assignment because it would mask any error license_list="$(jq -r '.[] | "\(.licenses | .[])"' "${json_input}" | sort | uniq)" local license_dirs=( - "/mnt/host/source/src/third_party/coreos-overlay/licenses/" - "/mnt/host/source/src/third_party/portage-stable/licenses/" + "/mnt/host/source/src/scripts/repos/flatcar-overlay/licenses/" + "/mnt/host/source/src/scripts/repos/gentoo-subset/licenses/" "none" ) for license_file in ${license_list}; do diff --git a/build_library/catalyst.sh b/build_library/catalyst.sh index 4512091dfc7..244c8bb0193 100644 --- a/build_library/catalyst.sh +++ b/build_library/catalyst.sh @@ -28,10 +28,10 @@ STAGES= DEFINE_string catalyst_root "${DEFAULT_CATALYST_ROOT}" \ "Path to directory for all catalyst images and other files." -DEFINE_string portage_stable "${SRC_ROOT}/third_party/portage-stable" \ - "Path to the portage-stable git checkout." -DEFINE_string coreos_overlay "${SRC_ROOT}/third_party/coreos-overlay" \ - "Path to the coreos-overlay git checkout." +DEFINE_string gentoo_subset "${SCRIPTS_DIR}/repos/gentoo-subset" \ + "Path to the gentoo-subset git checkout." +DEFINE_string flatcar_overlay "${SCRIPTS_DIR}/repos/flatcar-overlay" \ + "Path to the flatcar-overlay git checkout." DEFINE_string seed_tarball "${DEFAULT_SEED}" \ "Path to an existing stage tarball to start from." DEFINE_string version "${FLATCAR_VERSION}" \ @@ -62,8 +62,8 @@ storedir="$CATALYST_ROOT" distdir="$DISTDIR" envscript="$TEMPDIR/catalystrc" port_logdir="$CATALYST_ROOT/log" -repo_basedir="/mnt/host/source/src/third_party" -repo_name="portage-stable" +repo_basedir="/mnt/host/source/src/scripts/repos" +repo_name="gentoo-subset" EOF } @@ -87,8 +87,8 @@ target: stage$1 subarch: $ARCH rel_type: $TYPE portage_confdir: $TEMPDIR/portage -repos: $FLAGS_coreos_overlay -keep_repos: portage-stable coreos-overlay +repos: $FLAGS_flatcar_overlay +keep_repos: gentoo-subset flatcar-overlay profile: $FLAGS_profile snapshot_treeish: $FLAGS_version version_stamp: $FLAGS_version @@ -231,7 +231,7 @@ write_configs() { info "Configuring Portage..." cp -r "${BUILD_LIBRARY_DIR}"/portage/ "${TEMPDIR}/" - ln -sfT '/mnt/host/source/src/third_party/coreos-overlay/coreos/user-patches' \ + ln -sfT '/var/gentoo/repos/flatcar-overlay/coreos/user-patches' \ "${TEMPDIR}"/portage/patches } @@ -264,10 +264,10 @@ build_stage() { build_snapshot() { local repo_dir snapshot snapshots_dir snapshot_path - repo_dir=${1:-"${FLAGS_portage_stable}"} + repo_dir=${1:-"${FLAGS_gentoo_subset}"} snapshot=${2:-"${FLAGS_version}"} snapshots_dir="${CATALYST_ROOT}/snapshots" - snapshot_path="${snapshots_dir}/portage-stable-${snapshot}.sqfs" + snapshot_path="${snapshots_dir}/gentoo-subset-${snapshot}.sqfs" if [[ -f ${snapshot_path} && $FLAGS_rebuild == $FLAGS_FALSE ]] then info "Skipping snapshot, ${snapshot_path} exists" @@ -325,5 +325,5 @@ catalyst_build() { fi # Cleanup snapshots, we don't use them - rm -rf "$CATALYST_ROOT/snapshots/${FLAGS_portage_stable##*/}-${FLAGS_version}.sqfs"* + rm -rf "$CATALYST_ROOT/snapshots/${FLAGS_gentoo_subset##*/}-${FLAGS_version}.sqfs"* } diff --git a/build_library/dev_container_util.sh b/build_library/dev_container_util.sh index 3d702c32eb1..b09060058ce 100755 --- a/build_library/dev_container_util.sh +++ b/build_library/dev_container_util.sh @@ -20,11 +20,11 @@ configure_dev_portage() { # Need profiles at the bare minimum local repo - for repo in portage-stable coreos-overlay; do + for repo in gentoo-subset flatcar-overlay; do sudo mkdir -p "${root_fs_dir}/var/lib/portage/${repo}" sudo rsync -rtl --exclude=md5-cache \ - "${SRC_ROOT}/third_party/${repo}/metadata" \ - "${SRC_ROOT}/third_party/${repo}/profiles" \ + "${SRC_ROOT}/scripts/repos/${repo}/metadata" \ + "${SRC_ROOT}/scripts/repos/${repo}/profiles" \ "${root_fs_dir}/var/lib/portage/${repo}" done @@ -42,12 +42,17 @@ PORTAGE_BINHOST="$(get_binhost_url "${binhost}" "${update_group}" 'pkgs') $(get_binhost_url "${binhost}" "${update_group}" 'toolchain')" EOF - sudo_clobber "${root_fs_dir}/etc/portage/repos.conf/portage-stable.conf" <>> NOTICE: $0: removing 'gen-manpages', 'containerd-stress' from sysext" rm -f "${rootfs}/usr/bin/gen-manpages" "${rootfs}/usr/bin/containerd-stress" script_root="$(cd "$(dirname "$0")/../"; pwd)" -files_dir="${script_root}/sdk_container/src/third_party/coreos-overlay/coreos/sysext/containerd" +files_dir="${script_root}/repos/flatcar-overlay/coreos/sysext/containerd" echo ">>> NOTICE $0: installing extra files from '${files_dir}'" cp -va "${files_dir}/"* "${rootfs}" diff --git a/build_library/sysext_mangle_docker-flatcar b/build_library/sysext_mangle_docker-flatcar index b2c055324dc..5188ddd33e9 100755 --- a/build_library/sysext_mangle_docker-flatcar +++ b/build_library/sysext_mangle_docker-flatcar @@ -8,7 +8,7 @@ echo ">>> NOTICE: $0: removing '/usr/lib/debug/', '/usr/share/docker/contrib' fr rm -rf "${rootfs}/usr/lib/debug/" "${rootfs}/usr/share/docker/contrib/" script_root="$(cd "$(dirname "$0")/../"; pwd)" -files_dir="${script_root}/sdk_container/src/third_party/coreos-overlay/coreos/sysext/docker" +files_dir="${script_root}/repos/flatcar-overlay/coreos/sysext/docker" echo ">>> NOTICE $0: installing extra files from '${files_dir}'" cp -va "${files_dir}/"* "${rootfs}" diff --git a/build_library/toolchain_util.sh b/build_library/toolchain_util.sh index 65848e91309..f304cdb1015 100644 --- a/build_library/toolchain_util.sh +++ b/build_library/toolchain_util.sh @@ -14,18 +14,18 @@ TOOLCHAIN_PKGS=( # This is only used as an intermediate step to be able to use the cross # compiler to build a full native toolchain. Packages are not uploaded. declare -A CROSS_PROFILES -CROSS_PROFILES["x86_64-cros-linux-gnu"]="coreos-overlay:coreos/amd64/generic" -CROSS_PROFILES["aarch64-cros-linux-gnu"]="coreos-overlay:coreos/arm64/generic" +CROSS_PROFILES["x86_64-cros-linux-gnu"]="flatcar-overlay:coreos/amd64/generic" +CROSS_PROFILES["aarch64-cros-linux-gnu"]="flatcar-overlay:coreos/arm64/generic" # Map board names to CHOSTs and portage profiles. This is the # definitive list, there is assorted code new and old that either # guesses or hard-code these. All that should migrate to this list. declare -A BOARD_CHOSTS BOARD_PROFILES BOARD_CHOSTS["amd64-usr"]="x86_64-cros-linux-gnu" -BOARD_PROFILES["amd64-usr"]="coreos-overlay:coreos/amd64/generic" +BOARD_PROFILES["amd64-usr"]="flatcar-overlay:coreos/amd64/generic" BOARD_CHOSTS["arm64-usr"]="aarch64-cros-linux-gnu" -BOARD_PROFILES["arm64-usr"]="coreos-overlay:coreos/arm64/generic" +BOARD_PROFILES["arm64-usr"]="flatcar-overlay:coreos/arm64/generic" BOARD_NAMES=( "${!BOARD_CHOSTS[@]}" ) @@ -169,7 +169,7 @@ get_sdk_arch() { } get_sdk_profile() { - echo "coreos-overlay:coreos/$(get_sdk_arch)/sdk" + echo "flatcar-overlay:coreos/$(get_sdk_arch)/sdk" } get_sdk_libdir() { @@ -244,7 +244,7 @@ configure_crossdev_overlay() { echo "x-crossdev" | \ "${sudo[@]}" tee "${root}${location}/profiles/repo_name" > /dev/null "${sudo[@]}" tee "${root}${location}/metadata/layout.conf" > /dev/null <] " echo " Check our a tag or branch and synchronise git submodules" - echo " coreos-overlay and portage-stable." + echo " flatcar-overlay and gentoo-subset." echo " By default, $0 tries to auto-detect whether to handle a tag or a branch," echo " with tags being prioritised over branches of the same name." echo echo " Name of the tag or branch to check out." - echo " BRANCH: Check out the branch in scripts, coreos-overlay" - echo " and portage-stable, and fast-forward to the" + echo " BRANCH: Check out the branch in scripts, flatcar-overlay" + echo " and gentoo-subset, and fast-forward to the" echo " latest changes by default (but see '-u' below)." echo " TAG: Check out the tag in scripts, and update submodules." echo @@ -90,8 +90,8 @@ esac # make sure submodules are initialised git submodule init -for dir in sdk_container/src/third_party/coreos-overlay \ - sdk_container/src/third_party/portage-stable ; do +for dir in repos/flatcar-overlay \ + repos/gentoo-subset ; do if [ ! -f "$dir"/.git ] ; then git submodule update -N "$dir" fi @@ -111,10 +111,10 @@ function check_all() { return fi - local overlay="$(git -C sdk_container/src/third_party/coreos-overlay $gitcmd \ + local overlay="$(git -C repos/flatcar-overlay $gitcmd \ | sed -e 's/^[[:space:]]*//' -e 's:remotes/[^/]\+/::' \ | grep -m1 -E "^$name\$")" - local portage="$(git -C sdk_container/src/third_party/portage-stable $gitcmd \ + local portage="$(git -C repos/gentoo-subset $gitcmd \ | sed -e 's/^[[:space:]]*//' -e 's:remotes/[^/]\+/::' \ | grep -m1 -E "^$name\$")" @@ -129,8 +129,8 @@ function check_all() { # if ! $force_branch; then for dir in . \ - sdk_container/src/third_party/coreos-overlay \ - sdk_container/src/third_party/portage-stable ; do + repos/flatcar-overlay \ + repos/gentoo-subset ; do git -C "$dir" fetch --tags --force --prune --prune-tags done tag="$(check_all 'tag -l' "$name")" @@ -166,8 +166,8 @@ echo echo "Checking out BRANCH '$branch'" echo "----------------------------------" for dir in . \ - sdk_container/src/third_party/coreos-overlay \ - sdk_container/src/third_party/portage-stable ; do + repos/flatcar-overlay \ + repos/gentoo-subset ; do git -C "$dir" checkout "$branch" if [ -n "$update_strategy" ] ; then @@ -175,4 +175,3 @@ for dir in . \ git -C "$dir" pull "$update_strategy" fi done - diff --git a/ci-automation/README.md b/ci-automation/README.md index aef5b76fa34..0760b02bf20 100644 --- a/ci-automation/README.md +++ b/ci-automation/README.md @@ -39,7 +39,7 @@ image_build amd64 ### SDK bootstrap build 1. SDK Bootstrap (`sdk.sh`): Use a seed SDK tarball and seed SDK container image to build a new SDK tarball. - The resulting SDK tarball will ship packages and versions from the updated coreos-overlay and portage-stable ebuild directories. + The resulting SDK tarball will ship packages and versions from the updated flatcar-overlay and gentoo-subset ebuild directories. This step updates the versionfile, recording the SDK container version just built. It will generate and push a new version tag to the scripts repo. 2. SDK container build (`sdk_container.sh`) : use SDK tarball to build an SDK container image. diff --git a/ci-automation/image_changes.sh b/ci-automation/image_changes.sh index 6af4be47eb1..5ad51958a14 100644 --- a/ci-automation/image_changes.sh +++ b/ci-automation/image_changes.sh @@ -81,8 +81,8 @@ function ricj_callback() { "PATH=${PATH}:${PWD}/ci-automation/python-bin" # Override the default locations of repositories. "SCRIPTS_REPO=." - "COREOS_OVERLAY_REPO=../coreos-overlay" - "PORTAGE_STABLE_REPO=../portage-stable" + "FLATCAR_OVERLAY_REPO=../flatcar-overlay" + "GENTOO_SUBSET_REPO=../gentoo-subset" ) show_changes_params+=( # The show-changes script expects a tag name, so using git tag @@ -251,7 +251,7 @@ function get_oem_id_list() { arch=${1}; shift list_var_name=${1}; shift - local -a ebuilds=("${scripts_repo}/sdk_container/src/third_party/coreos-overlay/coreos-base/common-oem-files/common-oem-files-"*'.ebuild') + local -a ebuilds=("${scripts_repo}/repos/flatcar-overlay/coreos-base/common-oem-files/common-oem-files-"*'.ebuild') if [[ ${#ebuilds[@]} -eq 0 ]] || [[ ! -e ${ebuilds[0]} ]]; then echo "No coreos-base/common-oem-files ebuilds?!" >&2 exit 1 diff --git a/find_overlay_dups b/find_overlay_dups index c76a1042014..d41edb48e42 100755 --- a/find_overlay_dups +++ b/find_overlay_dups @@ -1,14 +1,14 @@ #!/bin/bash -# Prints packages which are in both portage-stable and coreos-overlay +# Prints packages which are in both gentoo-subset and flatcar-overlay SCRIPT_ROOT=$(dirname $(readlink -f "$0")) . "${SCRIPT_ROOT}/common.sh" || exit 1 -DEFINE_string overlay_path "${SRC_ROOT}/third_party/coreos-overlay" \ +DEFINE_string overlay_path "${SCRIPT_ROOT}/repos/flatcar-overlay" \ "Directory containing the overlay" -DEFINE_string portage_stable_path "${SRC_ROOT}/third_party/portage-stable" \ - "Path to portage-stable" +DEFINE_string gentoo_subset_path "${SCRIPT_ROOT}/repos/gentoo-subset" \ + "Path to gentoo-subset" # Parse flags FLAGS "$@" || exit 1 @@ -19,10 +19,10 @@ function get_tree_packages() { find "$1" -maxdepth 3 -type f -name "*.ebuild" -printf "%P\n" | xargs dirname | sort | uniq } -portage_stable_packages=$(get_tree_packages ${FLAGS_portage_stable_path}) +gentoo_subset_packages=$(get_tree_packages ${FLAGS_gentoo_subset_path}) overlay_packages=$(get_tree_packages ${FLAGS_overlay_path}) -all_packages="$portage_stable_packages $overlay_packages" +all_packages="$gentoo_subset_packages $overlay_packages" dups=$(sort <<< "$all_packages" | uniq -D | uniq) if [[ -z "$dups" ]]; then diff --git a/generate_payload b/generate_payload index 39bfddc44a3..ccdf359c53e 100755 --- a/generate_payload +++ b/generate_payload @@ -388,7 +388,7 @@ for d in ./data/*/*; do for FILE_PATH in "${DATA_DIR}"/*.sig; do gpg --verify "${FILE_PATH}" done - + echo "Generating extension payloads for ${DATA_DIR}" shopt -s nullglob for EXTENSION_PATH in "${DATA_DIR}/flatcar-"*.raw "${DATA_DIR}/oem-"*.raw; do @@ -401,7 +401,7 @@ for d in ./data/*/*; do --image "${EXTENSION_PATH}" \ --output "${OUTPUT_PATH}" \ --private_keys "${PRIVATE_KEYS}" \ - --public_keys "/mnt/host/source/src/scripts/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-au-key/files/official-v2.pub.pem" \ + --public_keys "/mnt/host/source/src/scripts/repos/flatcar-overlay/coreos-base/coreos-au-key/files/official-v2.pub.pem" \ --keys_separator "+" else echo "ERROR: Found update payload already: ${OUTPUT_PATH}." @@ -409,10 +409,10 @@ for d in ./data/*/*; do fi done shopt -u nullglob - + echo "Extracting flatcar_production_update.bin.bz2 for ${DATA_DIR}" bunzip2 -f -k "${DATA_DIR}/flatcar_production_update.bin.bz2" - + echo "Generating generic update payload for ${DATA_DIR}" OUTPUT_PATH="${DATA_DIR}/flatcar_production_update.gz" if [ ! -f "${OUTPUT_PATH}" ]; then @@ -422,12 +422,12 @@ for d in ./data/*/*; do --kernel "${DATA_DIR}/flatcar_production_image.vmlinuz" \ --output "${OUTPUT_PATH}" \ --private_keys "${PRIVATE_KEYS}" \ - --public_keys "/mnt/host/source/src/scripts/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-au-key/files/official-v2.pub.pem" \ + --public_keys "/mnt/host/source/src/scripts/repos/flatcar-overlay/coreos-base/coreos-au-key/files/official-v2.pub.pem" \ --keys_separator "+" else echo "ERROR: Found update payload already: ${OUTPUT_PATH}." exit 1 fi - + echo "Payload generated: ${OUTPUT_PATH}" done diff --git a/jenkins/manifest.sh b/jenkins/manifest.sh index 94573f89663..555e4fb35ec 100755 --- a/jenkins/manifest.sh +++ b/jenkins/manifest.sh @@ -117,11 +117,11 @@ then fi if [[ -n "${OVERLAY_REF}" ]] then - setup_manifest_ref coreos-overlay "${OVERLAY_REF}" + setup_manifest_ref flatcar-overlay "${OVERLAY_REF}" fi if [[ -n "${PORTAGE_REF}" ]] then - setup_manifest_ref portage-stable "${PORTAGE_REF}" + setup_manifest_ref gentoo-subset "${PORTAGE_REF}" fi ln -fns "${FLATCAR_BUILD_ID}.xml" manifest/default.xml diff --git a/repos/flatcar-overlay/.travis.yml b/repos/flatcar-overlay/.travis.yml deleted file mode 100644 index 5afcfddad57..00000000000 --- a/repos/flatcar-overlay/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -# Derived from https://github.com/mrueg/repoman-travis/ - -sudo: required -language: python -python: - - pypy - -# For some reason portage is defaulting to lbzip2/lbunzip2 here and then complaining when they don't -# exist, so use plain old b{,un}zip2. -env: - - PORTAGE_VER="2.3.40" PORTAGE_BZIP2_COMMAND="bzip2" PORTAGE_BUNZIP2_COMMAND="bunzip2" - -before_install: - - sudo apt-get -qq update - - pip install lxml pyyaml - -before_script: ./.travis/setup_repoman.sh - -script: - - cd /usr/coreos-overlay - - /tmp/portage/portage-${PORTAGE_VER}/repoman/bin/repoman --experimental-repository-modules=y -dx full diff --git a/repos/flatcar-overlay/.travis/coreos.conf b/repos/flatcar-overlay/.travis/coreos.conf deleted file mode 100644 index f95be5e1788..00000000000 --- a/repos/flatcar-overlay/.travis/coreos.conf +++ /dev/null @@ -1,8 +0,0 @@ -[DEFAULT] -main-repo = portage-stable - -[coreos] -location = /usr/coreos-overlay - -[portage-stable] -location = /usr/portage diff --git a/repos/flatcar-overlay/.travis/setup_repoman.sh b/repos/flatcar-overlay/.travis/setup_repoman.sh deleted file mode 100755 index bfad0f2cf6c..00000000000 --- a/repos/flatcar-overlay/.travis/setup_repoman.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -set -euo pipefail - -# Set up directory permissions/portage user and group. -sudo chmod a+rwX /etc/passwd /etc/group /etc /usr -echo "portage:x:250:250:portage:/var/tmp/portage:/bin/false" >> /etc/passwd -echo "portage::250:portage,travis" >> /etc/group - -# Shuffle portage repositories around into the right places. -mkdir -p /etc/portage/repos.conf /usr/coreos-overlay -mv * /usr/coreos-overlay/ -mv .git /usr/coreos-overlay/ -git clone https://github.com/coreos/portage-stable /usr/portage/ -cp .travis/coreos.conf /etc/portage/repos.conf/ -ln -s /usr/coreos-overlay/profiles/coreos/amd64/sdk /etc/portage/make.profile -mkdir -p /usr/portage/metadata/{dtd,xml-schema} -wget -O /usr/portage/metadata/dtd/metadata.dtd https://www.gentoo.org/dtd/metadata.dtd -wget -O /usr/portage/metadata/xml-schema/metadata.xsd https://www.gentoo.org/xml-schema/metadata.xsd - -# Download portage. -mkdir /tmp/portage && cd /tmp/portage -wget -qO - "https://gitweb.gentoo.org/proj/portage.git/snapshot/portage-${PORTAGE_VER}.tar.gz" | tar xz diff --git a/repos/flatcar-overlay/README.md b/repos/flatcar-overlay/README.md index 150fb7b6493..0abdb7773c1 100644 --- a/repos/flatcar-overlay/README.md +++ b/repos/flatcar-overlay/README.md @@ -3,7 +3,7 @@ This overlay contains Container Linux specific packages and Gentoo packages that differ from their upstream Gentoo versions. -See the [portage-stable](https://github.com/coreos/portage-stable) repo +See the [gentoo-subset](https://github.com/flatcar/scripts/repos/gentoo-subset) repo for packages which do not have Container Linux specific changes. Licensing information can be found in the respective files, so consult @@ -29,7 +29,7 @@ development or production image, plus any OEM specific packages. that belong in the OEM partition. Any RDEPENDS from these packages should be copied to the RDEPENDS in `board-packages` to ensure they are built. -`coreos-base/coreos-oem-*` are metapackages for OEM specific ACIs. +`coreos-base/coreos-oem-*` are metapackages for OEM specific ACIs. # Updating @@ -39,7 +39,7 @@ To update follow the following steps: upstream Gentoo, not only resetting the ebuild file but also any additional files like patches or downstream additions under `files`. * Run `~/trunk/src/scripts/update_ebuilds --portage_stable . CATEGORY/PACKAGE` - in the `coreos-overlay` folder to import a new version from upstream Gentoo. + in the `flatcar-overlay` folder to import a new version from upstream Gentoo. Drop the ebuild files that you don't plan to use. * Commit the changes with a message like `CATEGORY/PACKAGE: Sync from Gentoo`, and mention the the commit ID in the body (`git show update_ebuilds/master`). diff --git a/repos/flatcar-overlay/app-containers/docker-cli/README.md b/repos/flatcar-overlay/app-containers/docker-cli/README.md index 052c52cfc3f..99d075dee49 100644 --- a/repos/flatcar-overlay/app-containers/docker-cli/README.md +++ b/repos/flatcar-overlay/app-containers/docker-cli/README.md @@ -1 +1 @@ -This is a temporary overlay over portage-stable until Gentoo catches up with package versions. +This is a temporary overlay over gentoo-subset until Gentoo catches up with package versions. diff --git a/repos/flatcar-overlay/app-containers/docker/README.md b/repos/flatcar-overlay/app-containers/docker/README.md index 052c52cfc3f..99d075dee49 100644 --- a/repos/flatcar-overlay/app-containers/docker/README.md +++ b/repos/flatcar-overlay/app-containers/docker/README.md @@ -1 +1 @@ -This is a temporary overlay over portage-stable until Gentoo catches up with package versions. +This is a temporary overlay over gentoo-subset until Gentoo catches up with package versions. diff --git a/repos/flatcar-overlay/coreos/user-patches/app-emulation/open-vm-tools/README.md b/repos/flatcar-overlay/coreos/user-patches/app-emulation/open-vm-tools/README.md index 370ddcdaf48..2afc83bb305 100644 --- a/repos/flatcar-overlay/coreos/user-patches/app-emulation/open-vm-tools/README.md +++ b/repos/flatcar-overlay/coreos/user-patches/app-emulation/open-vm-tools/README.md @@ -1,6 +1,6 @@ The patch for configure.ac is not upstreamable at all, we either need to modify the ebuild or the build system. We went with the latter, so -the ebuild could eventually be moved to portage-stable. +the ebuild could eventually be moved to gentoo-subset. Git repo of open-vm-tools has a different layout of files than the tarball. The files that are in toplevel directory in tarball (like diff --git a/repos/flatcar-overlay/coreos/user-patches/sec-policy/flatcar-selinux-patches/README.md b/repos/flatcar-overlay/coreos/user-patches/sec-policy/flatcar-selinux-patches/README.md index a7cb18f1641..399ae1055c1 100644 --- a/repos/flatcar-overlay/coreos/user-patches/sec-policy/flatcar-selinux-patches/README.md +++ b/repos/flatcar-overlay/coreos/user-patches/sec-policy/flatcar-selinux-patches/README.md @@ -5,7 +5,7 @@ The following steps were needed to make these patches: - Checkout the appropriate tag: - For example `RELEASE_2_20231002`. - Apply the Gentoo patch: - - See the sec-policy/selinux-base ebuild in portage-stable for the + - See the sec-policy/selinux-base ebuild in gentoo-subset for the patch tarball URL. - Apply our changes: - `git am -p2 ` should do the trick. Try adding `-3` flag diff --git a/repos/flatcar-overlay/metadata/layout.conf b/repos/flatcar-overlay/metadata/layout.conf index a83f5b12222..0bae123418d 100644 --- a/repos/flatcar-overlay/metadata/layout.conf +++ b/repos/flatcar-overlay/metadata/layout.conf @@ -1,4 +1,4 @@ -masters = portage-stable +masters = gentoo-subset thin-manifests = true use-manifests = strict cache-format = md5-dict diff --git a/repos/flatcar-overlay/metadata/repoman/repository.yaml b/repos/flatcar-overlay/metadata/repoman/repository.yaml index d38f71c6db0..aef02f4236f 100644 --- a/repos/flatcar-overlay/metadata/repoman/repository.yaml +++ b/repos/flatcar-overlay/metadata/repoman/repository.yaml @@ -15,7 +15,7 @@ repoman_version: 2.3.3 # noise than signal. # * The `profile` module, among other issues, generates a huge number (>10000) of dependency.bad # errors. This is due to unmodified (or minimally modified) ebuilds from Gentoo upstream that -# depend on ebuilds not present in coreos-overlay or portage-stable. These dependencies are hidden +# depend on ebuilds not present in flatcar-overlay or gentoo-subset. These dependencies are hidden # behind USE flags or otherwise unused in Container Linux, so the missing ebuilds aren't a # problem, but the amount of noise generated by this module makes it unusable. # diff --git a/repos/flatcar-overlay/profiles/coreos/amd64/parent b/repos/flatcar-overlay/profiles/coreos/amd64/parent index b15d5c1cf90..947746e3149 100644 --- a/repos/flatcar-overlay/profiles/coreos/amd64/parent +++ b/repos/flatcar-overlay/profiles/coreos/amd64/parent @@ -1,2 +1,2 @@ -portage-stable:default/linux/amd64/17.1/no-multilib/hardened +gentoo-subset:default/linux/amd64/17.1/no-multilib/hardened :coreos/base diff --git a/repos/flatcar-overlay/profiles/coreos/arm64/parent b/repos/flatcar-overlay/profiles/coreos/arm64/parent index ffc428f7733..3bcde1a5daf 100644 --- a/repos/flatcar-overlay/profiles/coreos/arm64/parent +++ b/repos/flatcar-overlay/profiles/coreos/arm64/parent @@ -1,2 +1,2 @@ -portage-stable:default/linux/arm64/17.0/hardened +gentoo-subset:default/linux/arm64/17.0/hardened :coreos/base diff --git a/repos/flatcar-overlay/profiles/coreos/base/package.accept_keywords b/repos/flatcar-overlay/profiles/coreos/base/package.accept_keywords index d4a4548aa26..b88475412b1 100644 --- a/repos/flatcar-overlay/profiles/coreos/base/package.accept_keywords +++ b/repos/flatcar-overlay/profiles/coreos/base/package.accept_keywords @@ -23,7 +23,7 @@ dev-util/catalyst ~amd64 ~arm64 =app-containers/podman-5.0.2 ~amd64 ~arm64 =app-containers/runc-1.1.13 ~amd64 ~arm64 -# Seems to be the only available ebuild in portage-stable right now. +# Seems to be the only available ebuild in gentoo-subset right now. =app-crypt/adcli-0.9.2 ~amd64 ~arm64 # Needed by arm64-native SDK diff --git a/repos/flatcar-overlay/profiles/coreos/base/package.mask b/repos/flatcar-overlay/profiles/coreos/base/package.mask index 1b68e837616..30601e51512 100644 --- a/repos/flatcar-overlay/profiles/coreos/base/package.mask +++ b/repos/flatcar-overlay/profiles/coreos/base/package.mask @@ -11,7 +11,7 @@ # certificate store provided in NSS rather than the Gentoo/Debian package. >=app-misc/ca-certificates-20000000 -# Python 3.12 is in portage-stable (currently testing), so avoid picking it +# Python 3.12 is in gentoo-subset (currently testing), so avoid picking it # up. Update this to mask later versions when we switch to 3.11. >=dev-lang/python-3.12 diff --git a/repos/flatcar-overlay/profiles/coreos/base/package.unmask b/repos/flatcar-overlay/profiles/coreos/base/package.unmask index 7eebbb56b18..0cd2429bb46 100644 --- a/repos/flatcar-overlay/profiles/coreos/base/package.unmask +++ b/repos/flatcar-overlay/profiles/coreos/base/package.unmask @@ -1,4 +1,4 @@ -# Overwrite portage-stable mask. We haven't seen LLVM related problems +# Overwrite gentoo-subset mask. We haven't seen LLVM related problems # with rust so far, so keep using 1.70.0. ~dev-lang/rust-1.79.0 ~virtual/rust-1.79.0 diff --git a/repos/flatcar-overlay/profiles/coreos/base/package.use b/repos/flatcar-overlay/profiles/coreos/base/package.use index b4cba830553..993a026d626 100644 --- a/repos/flatcar-overlay/profiles/coreos/base/package.use +++ b/repos/flatcar-overlay/profiles/coreos/base/package.use @@ -146,7 +146,7 @@ net-analyzer/tcpdump -ssl -smi -samba # selinux: to find files with a particular SElinux label sys-apps/findutils selinux -# Flatcar defaults formerly defined in coreos-overlay ebuilds +# Flatcar defaults formerly defined in flatcar-overlay ebuilds app-containers/containerd btrfs device-mapper app-containers/docker btrfs device-mapper overlay seccomp app-containers/docker-cli hardened diff --git a/repos/flatcar-overlay/profiles/coreos/base/package.use.mask b/repos/flatcar-overlay/profiles/coreos/base/package.use.mask index 0e3644833e2..2bffe822e76 100644 --- a/repos/flatcar-overlay/profiles/coreos/base/package.use.mask +++ b/repos/flatcar-overlay/profiles/coreos/base/package.use.mask @@ -14,7 +14,7 @@ sys-libs/ncurses cxx # stage1, because ncurses >= 6.2_p20210619 which does not have the USE # flag at all. # To fix that, exclude the unicode USE flag from packages.use.force list, -# which is defined in portage-stable. +# which is defined in gentoo-subset. app-editors/nano unicode # Pulls dev-python/sphinx, which in turn pulls a lot of other python stuff. diff --git a/repos/flatcar-overlay/profiles/coreos/base/parent b/repos/flatcar-overlay/profiles/coreos/base/parent index e00b432785f..df895ded22d 100644 --- a/repos/flatcar-overlay/profiles/coreos/base/parent +++ b/repos/flatcar-overlay/profiles/coreos/base/parent @@ -1,2 +1,2 @@ -portage-stable:targets/systemd +gentoo-subset:targets/systemd :features/systemd diff --git a/repos/flatcar-overlay/profiles/coreos/base/profile.bashrc b/repos/flatcar-overlay/profiles/coreos/base/profile.bashrc index 7abb2c7af01..a9cc9b10c27 100644 --- a/repos/flatcar-overlay/profiles/coreos/base/profile.bashrc +++ b/repos/flatcar-overlay/profiles/coreos/base/profile.bashrc @@ -3,7 +3,7 @@ CROS_BUILD_BOARD_TREE="${SYSROOT}/build" CROS_BUILD_BOARD_BIN="${CROS_BUILD_BOARD_TREE}/bin" -CROS_ADDONS_TREE="/mnt/host/source/src/third_party/coreos-overlay/coreos" +CROS_ADDONS_TREE="/mnt/host/source/src/scripts/repos/flatcar-overlay/coreos" # Are we merging for the board sysroot, or for the cros sdk, or for # the target hardware? Returns a string: diff --git a/repos/flatcar-overlay/profiles/coreos/base/profile.bashrc.slsa-provenance b/repos/flatcar-overlay/profiles/coreos/base/profile.bashrc.slsa-provenance index 66926477480..db59ac8372d 100644 --- a/repos/flatcar-overlay/profiles/coreos/base/profile.bashrc.slsa-provenance +++ b/repos/flatcar-overlay/profiles/coreos/base/profile.bashrc.slsa-provenance @@ -123,7 +123,7 @@ __slsa_provenance_resolved_dependencies() { einfo " Provenance: recording ebuild material (input) '${spm_repo}/${ebuild}'" local repo_uri uri - repo_uri="https://raw.githubusercontent.com/flatcar/scripts/${scripts_hash}/sdk_container/src/third_party/${spm_repo}" + repo_uri="https://raw.githubusercontent.com/flatcar/scripts/${scripts_hash}/repos/${spm_repo}" uri="${repo_uri}/${ebuild}" __slsa_rd_printf "${uri}" 'sha1' "${csum}" diff --git a/repos/flatcar-overlay/profiles/coreos/targets/generic/use.force b/repos/flatcar-overlay/profiles/coreos/targets/generic/use.force index f29fb18c73e..f6caa9f531a 100644 --- a/repos/flatcar-overlay/profiles/coreos/targets/generic/use.force +++ b/repos/flatcar-overlay/profiles/coreos/targets/generic/use.force @@ -1,4 +1,4 @@ # We don't have a separate /{bin,lib} and /usr/{bin,lib}. But the base -# profile in portage-stable forces split-usr, so here we unforce it +# profile in gentoo-subset forces split-usr, so here we unforce it # and in use.mask we mask it. -split-usr diff --git a/repos/flatcar-overlay/profiles/coreos/targets/generic/use.mask b/repos/flatcar-overlay/profiles/coreos/targets/generic/use.mask index 9a467dab418..8bfa1d9b89d 100644 --- a/repos/flatcar-overlay/profiles/coreos/targets/generic/use.mask +++ b/repos/flatcar-overlay/profiles/coreos/targets/generic/use.mask @@ -1,4 +1,4 @@ # We don't have a separate /{bin,lib} and /usr/{bin,lib}. But the base -# profile in portage-stable forces split-usr, so in use.force we +# profile in gentoo-subset forces split-usr, so in use.force we # unforce it and here we mask it. split-usr diff --git a/repos/flatcar-overlay/profiles/repo_name b/repos/flatcar-overlay/profiles/repo_name index cf96a73002d..bbdbb6051a9 100644 --- a/repos/flatcar-overlay/profiles/repo_name +++ b/repos/flatcar-overlay/profiles/repo_name @@ -1 +1 @@ -coreos-overlay +flatcar-overlay diff --git a/repos/flatcar-overlay/sys-apps/ignition/files/README.md b/repos/flatcar-overlay/sys-apps/ignition/files/README.md index f040413103d..ec7e5e4a5fc 100644 --- a/repos/flatcar-overlay/sys-apps/ignition/files/README.md +++ b/repos/flatcar-overlay/sys-apps/ignition/files/README.md @@ -12,7 +12,7 @@ For this, we can just apply the current patches and fix any broken stuff: git clone https://github.com/coreos/ignition cd ignition git checkout "${RELEASE}" -git am --3way /path/to/coreos-overlay/sys-apps/ignition/files/00* +git am --3way /path/to/flatcar-overlay/sys-apps/ignition/files/00* ``` Once done, we can generate the new set of patches: @@ -20,9 +20,9 @@ Once done, we can generate the new set of patches: git format-patch "${RELEASE}" ``` -Copy the new patches to `::coreos-overlay` +Copy the new patches to `::flatcar-overlay` ``` -cp 00* /path/to/coreos-overlay/sys-apps/ignition/files/ +cp 00* /path/to/flatcar-overlay/sys-apps/ignition/files/ ``` :warning: We might need to update the applied patches' names in the Ignition ebuild. diff --git a/repos/flatcar-overlay/sys-auth/pambase/README.md b/repos/flatcar-overlay/sys-auth/pambase/README.md index 4b3cb979e10..382116d6a50 100644 --- a/repos/flatcar-overlay/sys-auth/pambase/README.md +++ b/repos/flatcar-overlay/sys-auth/pambase/README.md @@ -1,5 +1,5 @@ This is a not-really-a-fork of gentoo's `sys-auth/pambase` -package. The main reasons for having it in `coreos-overlay` are: +package. The main reasons for having it in `flatcar-overlay` are: 1. The `sys-apps/baselayout` package replaced it, so this package became a stub. diff --git a/repos/flatcar-overlay/sys-boot/grub/files/grub-2.06-add-gpt-partition-scheme.patch b/repos/flatcar-overlay/sys-boot/grub/files/grub-2.06-add-gpt-partition-scheme.patch index cef57e856a9..dad7b2d776f 100644 --- a/repos/flatcar-overlay/sys-boot/grub/files/grub-2.06-add-gpt-partition-scheme.patch +++ b/repos/flatcar-overlay/sys-boot/grub/files/grub-2.06-add-gpt-partition-scheme.patch @@ -13,7 +13,7 @@ gptrepair, search commands. The patch is prepared using the coreos/grub PRs, picking the only required ones, and dropping the others. The README.md file in the -coreos-overlay/sys-boot/grub/ contains more contexual information +flatcar-overlay/sys-boot/grub/ contains more contexual information along with the commits used to create the patch. Authored-by: Michael Marineau diff --git a/repos/flatcar-overlay/sys-boot/grub/files/grub-2.06-add-verity-hash.patch b/repos/flatcar-overlay/sys-boot/grub/files/grub-2.06-add-verity-hash.patch index ed892d90dd2..d4c748a1507 100644 --- a/repos/flatcar-overlay/sys-boot/grub/files/grub-2.06-add-verity-hash.patch +++ b/repos/flatcar-overlay/sys-boot/grub/files/grub-2.06-add-verity-hash.patch @@ -8,7 +8,7 @@ system via the kernel command line The patch is prepared using the coreos/grub PRs, picking the only required ones, and dropping the others. The README.md file in the -coreos-overlay/sys-boot/grub/ contains more contexual information +flatcar-overlay/sys-boot/grub/ contains more contexual information along with the commits used to create the patch. Authored-by: Matthew Garrett diff --git a/repos/flatcar-overlay/sys-fs/lvm2/README.md b/repos/flatcar-overlay/sys-fs/lvm2/README.md index 379916ebf07..1c9314e2f41 100644 --- a/repos/flatcar-overlay/sys-fs/lvm2/README.md +++ b/repos/flatcar-overlay/sys-fs/lvm2/README.md @@ -1,7 +1,7 @@ We keep this package in overlay, because we carry one extra patch for the unit generator. It was posted upstream and remains unacknowledged. We could try sending the patch to gentoo, so we can -bring this package back to portage-stable. +bring this package back to gentoo-subset. The lvm2-activation(-early).service was triggered multiple times which if done too quickly leads to a failure like this: diff --git a/repos/gentoo-subset/README.md b/repos/gentoo-subset/README.md index 2d42d1b212b..db0faea5564 100644 --- a/repos/gentoo-subset/README.md +++ b/repos/gentoo-subset/README.md @@ -22,7 +22,7 @@ If you'd prefer to use a local copy of the portage tree, you can point Licensing information can be found in the respective files, so consult them directly. Most ebuilds are licensed under the GPL version 2. -Upstream Gentoo sources: http://sources.gentoo.org/gentoo-x86/ +Upstream Gentoo sources: https://gitweb.gentoo.org/repo/gentoo.git/ # Removing packages @@ -55,7 +55,7 @@ Furthermore, the SDK bootstrapping process uses a list of packages defined the b file. Install `dev-util/catalyst` and run `/usr/lib64/catalyst/targets/stage1/build.py` to get a list of packages needed for the boostrapping process, then run `emerge --emptytree` on that list. -A package's ebuild must be removed from `portage-stable` _and_ the package must be removed locally. If only the +A package's ebuild must be removed from `gentoo-subset` _and_ the package must be removed locally. If only the ebuild is removed, the package will be silently elided in the `emerge --emptytree` dependency list. To see if there are any packages installed without ebuilds run `eix -tTc`. There are no `eix--usr` wrappers, so double check the packages are also unmerged via the `emerge--usr` commands. Make sure to run @@ -72,9 +72,9 @@ See [this bug](https://bugs.gentoo.org/127956). ## grep, git grep, repo grep, ripgrep, find, etc Use your favorite grep variant to see if the package is used anywhere. Good places to double check are -coreos-overlay, manifest, scripts, and portage-stable, as well as anything specific to the package. +flatcar-overlay, manifest, scripts, and gentoo-subset, as well as anything specific to the package. -Be sure to check `coreos-overlay` to ensure there are no use flags, accept_keywords, or other leftover bits +Be sure to check `flatcar-overlay` to ensure there are no use flags, accept_keywords, or other leftover bits relating to the package being removed. ## Updating the metadata cache @@ -82,9 +82,9 @@ relating to the package being removed. If you remove a package, make sure to delete the corresponding files in metadata/md5cache, or run use egencache to do it for you: ``` - egencache --update --repo portage-stable + egencache --update --repo gentoo-subset ``` -There is also `scripts/update_metadata` which will update both `portage-stable` and `coreos-overlay` +There is also `scripts/update_metadata` which will update both `gentoo-subset` and `flatcar-overlay` and optionally generate a commit message. ## Testing changes diff --git a/repos/gentoo-subset/profiles/repo_name b/repos/gentoo-subset/profiles/repo_name index 316c11ecc49..34eeccda8cf 100644 --- a/repos/gentoo-subset/profiles/repo_name +++ b/repos/gentoo-subset/profiles/repo_name @@ -1 +1 @@ -portage-stable +gentoo-subset diff --git a/sdk_container/src/third_party/coreos-overlay b/sdk_container/src/third_party/coreos-overlay new file mode 120000 index 00000000000..ef693a03b09 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay @@ -0,0 +1 @@ +../../../repos/flatcar-overlay \ No newline at end of file diff --git a/sdk_container/src/third_party/portage-stable b/sdk_container/src/third_party/portage-stable new file mode 120000 index 00000000000..2b517835535 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable @@ -0,0 +1 @@ +../../../repos/gentoo-subset \ No newline at end of file diff --git a/sdk_container/src/third_party/prefix-overlay/metadata/layout.conf b/sdk_container/src/third_party/prefix-overlay/metadata/layout.conf index a83f5b12222..0bae123418d 100644 --- a/sdk_container/src/third_party/prefix-overlay/metadata/layout.conf +++ b/sdk_container/src/third_party/prefix-overlay/metadata/layout.conf @@ -1,4 +1,4 @@ -masters = portage-stable +masters = gentoo-subset thin-manifests = true use-manifests = strict cache-format = md5-dict diff --git a/sdk_container/src/third_party/prefix-overlay/skel/etc/portage/repos.conf/coreos.conf b/sdk_container/src/third_party/prefix-overlay/skel/etc/portage/repos.conf/coreos.conf index d73d1434874..978e210ca26 100644 --- a/sdk_container/src/third_party/prefix-overlay/skel/etc/portage/repos.conf/coreos.conf +++ b/sdk_container/src/third_party/prefix-overlay/skel/etc/portage/repos.conf/coreos.conf @@ -1,8 +1,8 @@ [DEFAULT] -main-repo = portage-stable +main-repo = gentoo-subset -[coreos] -location = /mnt/host/source/src/third_party/coreos-overlay +[flatcar-overlay] +location = /mnt/host/source/src/scripts/repos/flatcar-overlay -[portage-stable] -location = /mnt/host/source/src/third_party/portage-stable +[gentoo-subset] +location = /mnt/host/source/src/scripts/repos/gentoo-subset diff --git a/sdk_lib/sdk_entry.sh b/sdk_lib/sdk_entry.sh index 9ebc141771b..7535b5173fb 100755 --- a/sdk_lib/sdk_entry.sh +++ b/sdk_lib/sdk_entry.sh @@ -10,9 +10,29 @@ fi chown -R sdk:sdk /home/sdk -# Fix up SDK repo configuration to use the new coreos-overlay name. -sed -i -r 's/^\[coreos\]/[coreos-overlay]/' /etc/portage/repos.conf/coreos.conf 2>/dev/null -sed -i -r '/^masters =/s/\bcoreos(\s|$)/coreos-overlay\1/g' /usr/local/portage/crossdev/metadata/layout.conf 2>/dev/null +# Fix up SDK repo configuration to use the new layout. +cat > "/etc/portage/repos.conf/gentoo-subset.conf" < "/etc/portage/repos.conf/flatcar-overlay.conf" </dev/null # Check if the OS image version we're working on is newer than # the SDK container version and if it is, update the boards diff --git a/sdk_lib/sdk_init_selfcontained.sh b/sdk_lib/sdk_init_selfcontained.sh index c5006f841e8..188a21df12b 100755 --- a/sdk_lib/sdk_init_selfcontained.sh +++ b/sdk_lib/sdk_init_selfcontained.sh @@ -30,8 +30,4 @@ function clone_version() { sudo chown -R sdk:sdk /home/sdk /mnt/host/source version="$(source /mnt/host/source/.repo/manifests/version.txt; echo $FLATCAR_VERSION)" - -rmdir /mnt/host/source/src/third_party -ln -s /mnt/host/source/src/scripts/sdk_container/src/third_party /mnt/host/source/src/ - clone_version scripts /home/sdk/trunk/src/scripts "$version" diff --git a/setup_board b/setup_board index bba9251ab7e..64c41c9670b 100755 --- a/setup_board +++ b/setup_board @@ -154,8 +154,8 @@ fi get_board_and_variant $FLAGS_board $FLAGS_variant # Locations we will need -COREOS_OVERLAY="${REPO_ROOT}/src/third_party/coreos-overlay" -COREOS_CONFIG="${COREOS_OVERLAY}/coreos/config" +FLATCAR_OVERLAY="${SCRIPTS_DIR}/repos/flatcar-overlay" +COREOS_CONFIG="${FLATCAR_OVERLAY}/coreos/config" BOARD_ROOT="/build/${BOARD_VARIANT}" BOARD_ETC="${BOARD_ROOT}/etc" BOARD_ARCH=$(get_board_arch "$BOARD") @@ -233,9 +233,10 @@ fi info "Configuring portage in ${BOARD_ROOT}" sudo mkdir -p "${BOARD_ETC}/portage/"{profile,repos.conf} -sudo ln -sfT "$(portageq get_repo_path / coreos-overlay)/coreos/user-patches" \ +sudo ln -sfT "$(portageq get_repo_path / flatcar-overlay)/coreos/user-patches" \ "${BOARD_ETC}/portage/patches" sudo cp /etc/portage/repos.conf/* "${BOARD_ETC}"/portage/repos.conf/ +sudo rm -f "${BOARD_ETC}"/portage/repos.conf/coreos.conf sudo ROOT="${BOARD_ROOT}" eselect profile set --force "${PORTAGE_PROFILE}" # Cleanup/migrate from older make.conf files diff --git a/setup_prefix b/setup_prefix index dd0c8ade678..20f451f6c5b 100755 --- a/setup_prefix +++ b/setup_prefix @@ -96,7 +96,7 @@ function check_force_dirs() { # set_prefix_vars "${name}" "${prefix}" -prefix_repo="$(dirname "$(EPREFIX="" portageq get_repo_path / portage-stable)")/prefix-overlay" +prefix_repo="$(dirname "$(EPREFIX="" portageq get_repo_path / gentoo-subset)")/prefix-overlay" if [ "${FLAGS_uninstall}" = "${FLAGS_TRUE}" ] ; then warn "Removing prefix '${name}' and all associated direcroties and wrappers." diff --git a/tag_release b/tag_release index f97ee53aac4..291f1dbe140 100755 --- a/tag_release +++ b/tag_release @@ -37,7 +37,7 @@ if [[ "${DEFAULT_MANIFEST}" != master.xml ]]; then DEFAULT_MAJOR=${CURRENT_VERSION[0]} DEFAULT_BRANCH=${FLAGS_TRUE} else - DEFAULT_BRANCH_PROJECTS='coreos-overlay portage-stable scripts' + DEFAULT_BRANCH_PROJECTS='flatcar-overlay gentoo-subset scripts' fi # Increment $MINOR if we already made a major release. diff --git a/update_chroot b/update_chroot index 2a9cbeb3212..cbd58caa5a8 100755 --- a/update_chroot +++ b/update_chroot @@ -61,10 +61,10 @@ if [[ -n "${FLAGS_dev_builds_sdk}" ]]; then FLATCAR_DEV_BUILDS_SDK="${FLAGS_dev_builds_sdk}" fi -PORTAGE_STABLE_OVERLAY="${REPO_ROOT}/src/third_party/portage-stable" +GENTOO_SUBSET_OVERLAY="${SCRIPTS_DIR}/repos/gentoo-subset" CROSSDEV_OVERLAY="/usr/local/portage/crossdev" -COREOS_OVERLAY="${REPO_ROOT}/src/third_party/coreos-overlay" -COREOS_CONFIG="${COREOS_OVERLAY}/coreos/config" +FLATCAR_OVERLAY="${SCRIPTS_DIR}/repos/flatcar-overlay" +COREOS_CONFIG="${FLATCAR_OVERLAY}/coreos/config" PORTAGE_BINHOST="$FLAGS_binhost $(get_sdk_binhost)" # PORTAGE_USERNAME may already be in the env but set just to be safe. @@ -83,7 +83,7 @@ info "Setting up portage..." sudo mkdir -p "${REPO_CACHE_DIR}/distfiles" sudo chown "${PORTAGE_USERNAME}:portage" "${REPO_CACHE_DIR}/distfiles" sudo mkdir -p /etc/portage/repos.conf /var/lib/portage/pkgs -sudo ln -sfT "${COREOS_OVERLAY}/coreos/user-patches" '/etc/portage/patches' +sudo ln -sfT "${FLATCAR_OVERLAY}/coreos/user-patches" '/etc/portage/patches' sudo touch /etc/portage/make.conf.user sudo_clobber "/etc/portage/make.conf" < profiles/repo_name + echo gentoo-subset > profiles/repo_name fi git add -A "$pkg" @@ -90,4 +90,3 @@ EOF else git status fi - diff --git a/update_metadata b/update_metadata index fd9972d4fd5..57eecf8a3fc 100755 --- a/update_metadata +++ b/update_metadata @@ -16,7 +16,7 @@ eval set -- "${FLAGS_ARGV}" switch_to_strict_mode if [[ $# -eq 0 ]]; then - eval set -- portage-stable coreos-overlay + eval set -- gentoo-subset coreos fi update_overlay() { diff --git a/update_sdk_container_image b/update_sdk_container_image index b11f383f573..60b9971a2d2 100755 --- a/update_sdk_container_image +++ b/update_sdk_container_image @@ -23,7 +23,7 @@ cleanup="" usage() { echo " $0 - Update SDK container image." echo " Create a new container image based on the current SDK ($base_sdk_version)" - echo " with current changes from coreos-overlay and portage-stable." + echo " with current changes from flatcar-overlay and gentoo-subset." echo echo " Just like build_sdk_container_image the resulting container comes in 3 flavours:" echo " 1. flatcar-sdk-all - includes both ARM64 and AMD64 support"