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

install-multi-user: check if selinux is enabled and if it is then abort #6639

Merged
merged 1 commit into from
Jun 13, 2022

Conversation

Artturin
Copy link
Member

@Artturin Artturin commented Jun 9, 2022

Prevents messed up installs and manual cleanup #2374

Not tested yet

@abathur
Copy link
Member

abathur commented Jun 9, 2022

If you create a cachix cache using the naming convention in #4577 and add a secret with the token, the CI run in your fork can generate and test the installer (well--confirm it doesn't cause trouble on ubuntu or macOS).

@Artturin
Copy link
Member Author

If you create a cachix cache using the naming convention in #4577 and add a secret with the token, the CI run in your fork can generate and test the installer (well--confirm it doesn't cause trouble on ubuntu or macOS).

Thanks! could someone add it to https://github.com/NixOS/nix/blob/master/doc/manual/src/contributing/hacking.md so more people would know about it?

@Artturin
Copy link
Member Author

the installer tests succeeded https://github.com/Artturin/nix/actions/runs/2472299209

@abathur
Copy link
Member

abathur commented Jun 10, 2022

If anyone around is set up to confirm (from a Fedora VM?), you can use the generated installer URL (and stable tarball-url-prefix) from the test: https://github.com/Artturin/nix/runs/6824433318?check_suite_focus=true#step:4:3

You just invoke the install like:

sh <(curl -L https://artturin-nix-install-tests.cachix.org/serve/wnnlsx7rygx1z5pj7lq65fhlrslr9vlg/install) --tarball-url-prefix https://artturin-nix-install-tests.cachix.org/serve

@Artturin
Copy link
Member Author

image

Copy link
Contributor

@stelcodes stelcodes left a comment

Choose a reason for hiding this comment

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

I think technically someone could create proper Nix SELinux rules before installation. It's not that Nix isn't compatible with SELinux, it's just that most users will not have the correct rules in place before trying to install. I think there should be a prompt that says something like "SELinux is enabled on your machine. The installation process is likely to fail due to permission errors since Nix does not include SELinux rules. Abort? (Y/n)"

@yawaramin
Copy link

I think the error message is fine as is. It's concise, to the point, and links to the relevant issue.

@edolstra edolstra merged commit 9a26a01 into NixOS:master Jun 13, 2022
@Artturin Artturin deleted the checkse branch June 13, 2022 14:52
@thomasjcf21
Copy link

I've raised #6881 as the solution provided in #6639 prevents install on a system with SELinux set to permissive. For all intents and purposes disabled and permissive should be treated the same (as far as nix is concerned).

I've gone into further detail on the PR.

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

Successfully merging this pull request may close these issues.

6 participants