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
Don't replace /etc in fhs-userenv #80457
Conversation
/marvin opt-in |
Hi! I'm an experimental bot. My goal is to guide this PR through its stages, hopefully ending with a merge. You can read up on the usage here. |
/status needs_reviewer |
Bot mistake. |
Setting @abbradar as a reviewer for now |
@@ -68,60 +68,10 @@ let | |||
${profile} | |||
''; | |||
|
|||
# Compose /etc for the chroot environment | |||
etcPkg = stdenv.mkDerivation { |
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.
The only reason I can think of is to provide /etc/ld.so.conf
but this is not provided here either.
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.
cc @vcunat @matthewbauer Any idea why this was added in the first place? Is there some impurity introduced if we keep the original /etc
?
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.
Is this maybe needed on non-nixos distributions because /etc/ld.so.conf
could mess with the build?
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.
My guess of the intention: link as little as possible, thus reducing impurity brought from the host OS. EDIT: say, why should config of most OS services be visible in there?
@glittershark please review. |
not really familiar enough with the original reasoning here to confidently review. |
I guess at least this behaviour should be made optional. I'd be happy to work on this, but perhaps I should wait until a decision has been reached about #55973. Closing for now. |
Motivation for this change
buildFHSUserEnv currently replaces /etc, selectively symlinking over some files from the host /etc into the chroot.
This means some things will be missing - which is inconvenient when using buildFHSUserEnv to spin up an interactive nix-shell.
This PR is not yet for merging at this point, but for testing and discussing whether doing this (either by default or somehow as an option) makes sense at all.
It seems to work for me ;)
/cc @abbradar looks like you have a lot of background about this part of the system ;)