Skip to content
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

Always cache the default tools tree #3612

Merged
merged 7 commits into from
Mar 24, 2025
Merged

Conversation

DaanDeMeyer
Copy link
Contributor

For the default tools tree, the cached image and the final image
are the same for all intents and purposes, so let's stop storing both
a cached image and a final image for the default tools tree and instead
only store the final image and use it as the cached image by always
writing a cache manifest next to it.

At the same time always use the name mkosi.tools to reduce the chance
of conflicts as "tools" is an incredibly common directory name.

Let's not return the mkosi specific directory, but the wider runtime
directory.
Let's simplify and mount in the entirety of /home, /run and the
invoking user's environment to make stuff just work more often than
not and avoid too many implementation details of specific tools leaking
into mkosi itself.
Let's simplify things and make the entirety of /home available. The
relaxed sandbox is not about security, and permissions already make sure
only the user's own home can be accessed.
For the default tools tree, the cached image and the final image
are the same for all intents and purposes, so let's stop storing both
a cached image and a final image for the default tools tree and instead
only store the final image and use it as the cached image by always
writing a cache manifest next to it.

At the same time always use the name mkosi.tools to reduce the chance
of conflicts as "tools" is an incredibly common directory name.
Copy link
Contributor

@behrmann behrmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable to me, but I'll be surprised if the rework of INVOKING_USER won't break something, so far it always did.

@DaanDeMeyer DaanDeMeyer merged commit 24111d4 into systemd:main Mar 24, 2025
34 of 35 checks passed
@DaanDeMeyer DaanDeMeyer deleted the fixes branch March 24, 2025 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants