-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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 dependency to systemd #199425
added dependency to systemd #199425
Conversation
26219f8
to
e9315a2
Compare
This bakes the path to systemd into nixos-enter at nixos-enter's build time. I'm worried that the path to system might change between nixos-enter's build time and its run time -- for example, if the user updates channels in the install environment. Instead of changing PATH and finding systemd-tmpfiles with a PATH lookp, consider specifying the full path to systemd-tmpfiles as Also, it would be great to have a test that could have caught this. I appear to have somehow neglected to submit the tests linked in #39140 (comment) (oops!), but they would not have caught this problem because the nixos-installer has a PATH that will find a systemd-tmpfiles in the chroot. It's the users trying to install from environments like Kimsufi's rescue environment that were exposed to this error. But setting up a new installer test from a wierd but realistic environment is ~1000x more work than just making this fix, so don't let that block merge of this PR. Thanks for fixing this! |
This is my first pull request to this repo, so I'm sorry if I'm not familiar with common practices here: |
Fantastic! Welcome! Concretely, I mean that this change would be a better way to fix this problem than the changes this PR is currently proposing. Mechanically, I meant to suggest that you change this PR to propose that change instead, by force-pushing https://github.com/Mikilio/nixpkgs to be a single commit that makes that change. One way to do that would be to Alternatively, if you prefer, I could propose that change as a new PR. (I introduced this bug in #80769 . Thank you for identifying the problem and helping get it fixed.) |
Ok! Since I agree with your points I'll change my PR. Thanks for the advice! |
Great! Next, among other things, that "Fits CONTRIBUTING.md." checkbox in the PR template is meant to encourage good, uniform commit messages. So please skim that, look at the commit messages of some other commits in that place, change your commit message to follow those conventions (concretely: such as with And thanks for bearing with the get-to-know-the-project-conventions first-PR back-and-forth. :) |
Thank you for the guidance! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change looks good so I'm going to merge now, but I'm curious why the chosen route was to make nixos-enter create its own /tmp
, instead of simply fixing TMPDIR in nixos-install? By that point we've already created a temporary directory under the mountpoint, so TMPDIR=${TMPDIR#"$mountPoint"} nixos-enter ...
should suffice?
Calling systemd-tmpfiles
in the nixos-enter environment also has the annoying side-effect that it prints a bunch of red warnings like
/etc/tmpfiles.d/systemd.conf:23: Failed to replace specifiers in '/run/log/journal/%m': No such file or directory
because /etc/machine-id
does not exist in the mounted root.
EDIT: I see now that creating /tmp
in nixos-enter is needed for nix-build to work.
Successfully created backport PR #208607 for |
Successfully created backport PR #208608 for |
Git push to origin failed for release-22.05 with exitcode 1 |
Git push to origin failed for release-22.11 with exitcode 1 |
Description of changes
Fix for issue #39140
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes