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

Don't replace /etc in fhs-userenv #80457

Closed
wants to merge 1 commit into from

Conversation

raboof
Copy link
Member

@raboof raboof commented Feb 18, 2020

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 ;)

@raboof
Copy link
Member Author

raboof commented Jul 7, 2020

/marvin opt-in

@marvin-mk2 marvin-mk2 bot added the marvin label Jul 7, 2020
@marvin-mk2
Copy link

marvin-mk2 bot commented Jul 7, 2020

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.

@raboof
Copy link
Member Author

raboof commented Jul 7, 2020

/status needs_reviewer

@timokau
Copy link
Member

timokau commented Jul 7, 2020

Bot mistake.
/status needs_reviewer

@fgaz
Copy link
Member

fgaz commented Jul 8, 2020

Setting @abbradar as a reviewer for now

@@ -68,60 +68,10 @@ let
${profile}
'';

# Compose /etc for the chroot environment
etcPkg = stdenv.mkDerivation {
Copy link
Member

@Mic92 Mic92 Jul 25, 2020

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.

Copy link
Member

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?

Copy link
Member

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?

Copy link
Member

@vcunat vcunat Aug 1, 2020

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?

@marvin-mk2
Copy link

marvin-mk2 bot commented Jul 28, 2020

@glittershark please review.

@glittershark
Copy link
Member

not really familiar enough with the original reasoning here to confidently review.

@raboof
Copy link
Member Author

raboof commented Jul 31, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants