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

Added an error message when using enableFakechroot under darwin #327336

Conversation

Mastermindaxe
Copy link
Contributor

@Mastermindaxe Mastermindaxe commented Jul 15, 2024

Description of changes

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@ofborg ofborg bot added the 6.topic: darwin Running or building packages on Darwin label Jul 15, 2024
@Mastermindaxe
Copy link
Contributor Author

Uses the following patch from @the-sun-will-rise-tomorrow : #327311 (comment)

@@ -561,6 +561,8 @@ This allows the function to produce reproducible images.
This allows scripts that perform installation in `/` to work as expected.
This can be seen as an equivalent of `RUN ...` in a `Dockerfile`.

This does not work under `darwin`!

Choose a reason for hiding this comment

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

I am not sure about this, as I don't see a similar mention elsewhere in the documentation - not sure if that's simply because there's a convention of not mentioning incompatibilities due to bugs or implementation deficiencies, or simply because the situation doesn't occur that much. Regardless, I think this needs to be aligned with the paragraph above.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@NixOS/documentation-team Do you guys have input on this? Is there a convention we're not aware of? And would you think this is fitting? Any input is appreciated! 🫶

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the ping. I'm not excited about leaving documentation that may get out of date. Sure, reading that in the manual before running into the problem would be great, but I'd err towards maintainability here. If the error is self-explanatory, it should be good enough. I strongly recommend explaining in the error message why it doesn't work on Darwin and what to do about it (e.g. workarounds or upvoting an issue so we can keep track of interest).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've removed the documentation part and have added a bit more text to the assert error message. Thanks for the input!

Really helpful to get those kind of insights when only starting the journey of contributing. Thank you!

@Mastermindaxe Mastermindaxe force-pushed the 327311_add_error_message_to_enableFakechroot_under_darwin branch from 4d53d08 to 075dcc2 Compare July 15, 2024 12:02
@Mastermindaxe Mastermindaxe force-pushed the 327311_add_error_message_to_enableFakechroot_under_darwin branch from 075dcc2 to 7348878 Compare July 17, 2024 07:47
@Mastermindaxe Mastermindaxe changed the title Added an error message when using enableFakechroot under darwin and a… Added an error message when using enableFakechroot under darwin Jul 17, 2024
pkgs/build-support/docker/default.nix Outdated Show resolved Hide resolved
@fricklerhandwerk
Copy link
Contributor

@Mastermindaxe thanks a lot, this is a nice self-contained contribution that makes an obvious improvement to user experience. Keep at it!

@fricklerhandwerk fricklerhandwerk merged commit e18d3b4 into NixOS:master Jul 17, 2024
8 of 9 checks passed
@Mastermindaxe
Copy link
Contributor Author

@Mastermindaxe thanks a lot, this is a nice self-contained contribution that makes an obvious improvement to user experience. Keep at it!

@fricklerhandwerk Thank you for that!

@Mastermindaxe Mastermindaxe deleted the 327311_add_error_message_to_enableFakechroot_under_darwin branch July 17, 2024 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants