Skip to content

systemd: set dontCheckForBrokenSymlinks#376218

Closed
ConnorBaker wants to merge 1 commit intoNixOS:stagingfrom
ConnorBaker:fix/systemd-no-broken-symlinks-hook
Closed

systemd: set dontCheckForBrokenSymlinks#376218
ConnorBaker wants to merge 1 commit intoNixOS:stagingfrom
ConnorBaker:fix/systemd-no-broken-symlinks-hook

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.

@ConnorBaker ConnorBaker self-assigned this Jan 23, 2025
@github-actions github-actions bot added the 6.topic: systemd Software suite that provides an array of system components for Linux operating systems. label Jan 23, 2025
@github-actions github-actions bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. labels Jan 23, 2025
@nix-owners nix-owners bot requested a review from kloenk January 23, 2025 21:02
@ConnorBaker ConnorBaker force-pushed the fix/systemd-no-broken-symlinks-hook branch from 6854aa7 to 504cb88 Compare January 23, 2025 21:15
@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

Labels

6.topic: systemd Software suite that provides an array of system components for Linux operating systems. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants