-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sysext: Add python sysext #1979
Conversation
It kind of makes sense because one otherwise needs to use a pypy build or similar as Ansible bootstrap command. |
Build action triggered: https://github.com/flatcar/scripts/actions/runs/9448288856 |
A problem with
Note: Tested this not on the built image because of slow download, used an older nightly and |
I haven't tested this myself but I'm guessing I know where it comes from: ensurepip isn't installed. I did notice but didn't think it would matter seeing as pip is already installed. Fixing it would be easy, it's just a USE flag that s been disabled. I'll do that later. As for the Azure extension, the nicest and most reliable solution would likely be to have it depend on this sysext, but there is no scheme for that. Building that also might not be so easy. I can't really test the Azure case myself though. |
Thanks for looking into this. I don't expect that we support every python dev flow but with venv and pip most things should be covered for running simple things.
We could do that by detecting that we are on Azure and then synthesizing this extension enablement entry in the initrd, update postinst action, and flatcar-update but we don't yet have a nice way to prepopulate the Azure image. We could place it on the rootfs as stop-gap solution but that means it gets downloaded when one reformats the rootfs. Okay for Azure but not for airgapped envs. We had the idea to repurpose the empty |
That's a strange place for the tests to fail given what this changes. Do I perhaps have to update the version number or something along those lines? |
The two failed tests are a problem with the CI setup, sorry for the confusion they cause. Would be nice if someone could finish the review here (Test pip venv, check if the pip enablement makes a difference for the Azure or GCE OEMs - I guess not?), CC: @flatcar/flatcar-maintainers |
I'd love to see this make it in before the next alpha, such that it can easily be used, anything I can help with to that end still? |
Sorry I missed that, I was AFK until the beginning of this week. Will have a look / test things! Thanks for this contribution. 💪 |
...ainer/src/third_party/coreos-overlay/coreos-devel/board-packages/board-packages-0.0.1.ebuild
Show resolved
Hide resolved
sdk_container/src/third_party/portage-stable/dev-python/ensurepip-setuptools/Manifest
Outdated
Show resolved
Hide resolved
I tested on the built image: no issue.
|
sdk_container/src/third_party/portage-stable/dev-python/ensurepip-wheels/metadata.xml
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great thanks, overall it looks good now. Any chance to rebase before I kick off a last CI to run more some tests on other providers?
Done, rebased onto current main |
Not entirely sure what those errors are about, but I don't think they have anything to do with the PR again. |
sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.use.mask
Outdated
Show resolved
Hide resolved
88bdc4a
to
cc5734a
Compare
Minimal sysext containing dev-lang/python and dev-python/pip. Enabled ensurepip for python and added required packages from Gentoo.
@JeWe37 thanks a lot for your contribution. As a final step, can I ask you to provide a small entry in this table to reference the podman and python extensions: https://www.flatcar.org/docs/latest/provisioning/sysext/#flatcar-release-extensions (https://github.com/flatcar/flatcar-website/blob/d92622d131661e8562df0c90df401b4a13ecdd13/content/docs/latest/provisioning/sysext/_index.md?plain=1#L27) ? |
sysext: Add python sysext
Minimal sysext containing dev-lang/python and dev-python/pip. Not wanting to include python in the base image makes sense, but as an optional sysext I do believe it makes sense, especially considering that a lot of configuration tooling is python based.
How to use
Inside the SDK container
Testing done
Installed a package via pip and checked that it could be used from python REPL.
changelog/
directory (user-facing change, bug fix, security fix, update)/boot
and/usr
size, packages, list files for any missing binaries, kernel modules, config files, kernel modules, etc.