Conversation
This change is the first commit in a long (and potentially futile) journey to move from portage-stable to plain Gentoo. It introduces a Gentoo git submodule and respective .gitmodule config. A cursory search+replace of portage-stable => gentoo was started in the scripts root and build library (but not completed). What works: - Start SDK container - run ./update_chroot --toolchain_boards="amd64-usr arm64-usr" What doesn't: - everything else - update_chroot removes cross compiler toolchains - setup_board is broken because it cannot find or build cross compiler toolchains Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
It used to just pick the first overlay. Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
This change adds a workaround required to build a gentoo-based SDK container from a protage-stable based one using update_sdk_container. Current state of this branch: - Gentoo based SDK can be built from existing SDK using update_sdk_container - OS packages and image can be built using the new SDK container TODO: - Build a full SDK from scratch, see if that works - Integrate devcontainer initialisation with gentoo changes (ship a full snapshot of Gentoo ebuild contents maybe?)
This matches what Gentoo does. There is no reason to be different here. Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
This change switches from upstream Gentoo to our fork at https://github.com/flatcar-hub/gentoo. If you're using the previous submodule, after pulling this change, run * rm -rf .git/modules/sdk_container * rm -rf sdk_container/src/third_party/gentoo * git submodule sync * git submodule update --depth=1 Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
This ensures that we don't get caught out by Gentoo adding new packages that we already have in our overlays. Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
The revbump did not involve a rebuild. If we need to rebuild, we can use _p rather than -r. Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
This was redundant even before we started moving away from portage-stable. Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
We cannot update the GLSA metadata ahead of the rest of the Gentoo repo now that it is a submodule. Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
This change removes the crossdev initialisation workaround from sdk_lib/Dockerfile.sdk-update as it is not needed anymore. We also add a new command line option to update_sdk_container_image to skip building arch container images, which speeds up the build.
These haven't been relevant since portage-stable and coreos-overlay were submodules. show-changes no longer uses them. Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
How did I miss this!? Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
This change has Dockerfile.sdk-update regenerate chroot, crossdev, and board configurations before trying anything else, to allow for more thorough changes. Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
We stopped committing the md5-cache to the repo many years ago. We may still want to generate it, but it should never be committed. Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
I doubt anyone uses this script now, but it still works. Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
I can't find any reference to this anywhere, and it hasn't changed since 2019. The commit message style it uses is not present in the scripts repo at all. Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
This hasn't worked since portage-stable and coreos-overlay were submodules. We now have gentoo as a submodule, but it generally won't have our own tags and branches. Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
The dev container only includes the repository profiles and metadata rather than actual ebuilds, so increased size from switching to the upstream gentoo repo is not a concern. Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
To update your local system: - git submodule init # not needed if already on gentoo submodule - git submodule update --depth=1 - ./run_sdk_container -t # to pull new nightly SKD; exit the container after pull - ./update_sdk_container_image 4824.0.0-nightly-20260915-2100-gentoo You can now run the new Gentoo SDK container with ./run_sdk_container -t -C ghcr.io/flatcar/flatcar-sdk-all:4824.0.0-nightly-20260915-2100-gentoo Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
This repoints the gentoo submodule to the latest without actually cloning it. The latest is determined with `git ls-remote`. A PR is still created, but an existing open PR is reused to prevent these from accumulating now that the job is run every weekday. A Jenkins build is automatically triggered by the PR. Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
The dev container has always included the Portage profiles and metadata, but this no longer appears necessary. This can be fetched later by emerge-gitclone, along with the ebuilds. Putting everything (including scripts) under /var/lib/portage is also weird. Use the default Portage locations, except for the package repositories, which now reference the repositories within /home/core/scripts. Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
We want to optionally be able to use Gentoo stage3 tarballs for seeds, and we should verify the digests when fetching them. They no longer use MD5 or SHA1 like we currently do, and these are no longer worth a damn. Also take the opportunity to just clean this code up. It's not used anywhere else, and the make_digests function is not used at all. We won't be able to use an existing Flatcar SDK tarball to build a new SDK due to the mismatching digests, but we'll probably need to use a Gentoo stage3 to migrate away from portage-stable anyway. Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
When a URL is given, the digests are still fetched and verified. Gentoo publishes them in the same way that we do. Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
Signed-off-by: flatcar-ci <infra+ci@flatcar-linux.org>
Signed-off-by: flatcar-ci <infra+ci@flatcar-linux.org>
This change removes prefix-overlay and updates PREFIX.md to call out that porting is needed. It explicitly does not remove `setup_prefix` and `build_library/prefix_util.sh` because this code is still of value, though in need of porting. Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
A local tarball is always used for stage 4, so this was broken in the mainline case. Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
A typo turned this from an array into a string. Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
This branch is waiting to be deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

NOTE: When merging this please make sure to use a SQUASH MERGE.
This project aims to replace portage-stable with pure Gentoo.
Gentoo is imported as a git submodule from our self-rebasing tracking fork here: https://github.com/flatcar-hub/gentoo/
Auto-generated package masks are used to force use of coreos-overlay packages over Gentoo ones, even if newer versions are available in Gentoo. We're planning to integrate this feature into Portage directly, but that's out of scope for this PR,
What works:
bootstrap_sdkwill build a Gentoo based SDKbuild_packages,build_image, andimage_to_vm.shwill build a qemu OS image (other vendors not tested but expected to work)How to use
git submodule init; git submodule updaterun_sdk_container(use the-C ...command line option) to build OS imagesTesting done
Built SDK container and OS images. No Kola runs yet.