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

systemd: set dontCheckForBrokenSymlinks #376218

Conversation

ConnorBaker
Copy link
Contributor

@ConnorBaker ConnorBaker commented Jan 23, 2025

Followup for #370750.

Should fix #370750 (comment).

Thank you for all the systemd help, @jmbaur!

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/)
  • 25.05 Release Notes (or backporting 24.11 and 25.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.

@jmbaur
Copy link
Contributor

jmbaur commented Jan 23, 2025

My bad, this is actually not the right fix. In this case, this broken symlink (to /etc/environment) is intentional by systemd. The symlink is created as a backward compat to the environment.d tooling (see the bottom of https://www.freedesktop.org/software/systemd/man/latest/environment.d.html#Description). So in the sandbox, the symlink would be broken, but at runtime it might not be. Stock NixOS does not populate /etc/environment, however users would be free to do this, so we should not break that and go against what is stated in the official documentation.

@ConnorBaker ConnorBaker force-pushed the fix/systemd-no-broken-symlinks-hook branch from 504cb88 to d273f42 Compare January 23, 2025 22:31
@ConnorBaker ConnorBaker changed the title systemd: patch meson build file for environmentd generator to include missing conditional systemd: set dontCheckForBrokenSymlinks Jan 23, 2025
@ConnorBaker
Copy link
Contributor Author

Closed in favor of #376261.

@ConnorBaker ConnorBaker deleted the fix/systemd-no-broken-symlinks-hook branch January 24, 2025 16:56
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.

2 participants