-
-
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
systemd: 243.7 -> 245 #85334
systemd: 243.7 -> 245 #85334
Conversation
6197fc5
to
00854a8
Compare
Note that a lot of stuff currently doesn't build on staging - I see gstreamer as a qemu dependency failing on some bash completions… Until this is sorted out, I propose testing this against master. |
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.
Did some testing in the past days based on these changes. So far no regression that I could find. 👍
Sorry if I cannot use git anymore for patch management I don't want to maintain this anymore as it is too much work to fix those patches manually. |
The patches are ordered alphabetically. The idea is that you can still I didn't do that while folding patches together, as in fact I mostly dropped patches and it made the diffs more readable, and for the bump from 244 to 245, touching the patches at all wasn't required, as the (reduced amount of) patches just applied. #80038 explains why using patches instead of "magic git revs pushed somewhere" makes things easier". On top of that, the amount of patches is only going to get down - there's quite some comments about ways to upstream more of these patches on the original wip branch (flokli@90f9b47) I had some similar discussions with @andir who also didn't really like the patches at first, but I could convince him as long as the "import and export from and to git" stays a simple |
Hmm, I should probably look into that. cc @jtojnar wasn't there a bash completions update? |
Opened few upstream MRs for the bash-completion issue: |
Here is what I've come up with as things we still have to figure out before merging this:
|
Fair enough. I feel that I am a bit out of the loop with systemd updates. As we seem to have active group carrying about systemd I will probably step back from this one and focus on other areas. |
@Mic92 fair enough. Take care, and thanks for your work so far :-) |
On a similar note However i'm also open for just keeping them both there; so people can experiment with it and break things with a low barrier :) |
807fb26
to
2098825
Compare
I rebased on top of latest staging (hoping staging has been fixed in the meantime). Bumped to 245.3 and explicitly disabled homed and portabled. Let's re-enable this once we have tests and can ensure it works, instead of shipping halfway broken pieces. |
These patches removed logic in the meson install phase invoking `journalctl --update-catalog` and `systemd-hwdb update`, which would mutate the running system, and obviously fails in the sandbox. Upstream also knows this is a bad thing if you're not on the machine you want to deploy to, so there's logic in there to not execute it when DESTDIR isn't empty. In our case, it is - as we set --prefix instead for other reasons, but by just setting DESTIDIR to "/", we can still trigger these things to be skipped. The patches removed some context from 0018-Install-default-configuration-into-out-share-factory.patch, which we need to introduce there to make that patch still apply.
…patch This was simply undoing a hunk from 0008-Don-t-try-to-unmount-nix-or-nix-store.patch, so drop that one from there and omit 0017-Fix-mount-option-x-initrd.mount-handling-35268-16.patch entirely.
The previous patch just removed a `ConditionFileNotEmpty=…` line from `kmod-static-nodes.service` referring to a location not existing on NixOS. We know better, and can actually replace this Condition to point to `run/booted-system/kernel-modules/lib/modules/%v/`, instead of just patching it out.
This required some changes in how we treat DEFAULT_PATH_NORMAL.
We don't currently have tests to ensure it works and keeps working. So instead of having it accidentially working, and possibly breaking it in the future, disable it for now.
This hasn't worked with 243, let's disable it for now, until we have tests and can ensure it works and keeps working.
3a1f3f7
to
b3f1410
Compare
I added some more comments on the commit message and the |
pkgs/os-specific/linux/systemd/0007-Add-some-NixOS-specific-unit-directories.patch
Show resolved
Hide resolved
pkgs/os-specific/linux/systemd/0021-add-rootprefix-to-lookup-dir-paths.patch
Show resolved
Hide resolved
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.
First of all thanks a lot for the hard work! I just updated my local systemd to v245 by setting systemd.package
to pkgs.systemd
from this PR's base branch.
I didn't have any issues when switching to the new configuration, systemd re-execed itself without any problems. Also (re)booting into a NixOS configuration with systemd
v245 worked perfectly fine.
I'll keep using this systemd version for at least a few days now to ensure that I don't stumble upon any issues.
However I guess I found some kind of regression:
in my sway config I run systemctl --user import-environment
and systemctl --user start graphical-session.target
after that.
However, the nextcloud-client.service
from home-manager
(which is triggered by the graphical-session.target
that is started from the sway-config) breaks since it's missing needed env-vars like $WAYLAND_DISPLAY
.
As an ugly, temporary workaround, I'm now running exec systemctl --user import-environment && sleep 2
before starting the graphical-session.target
which appears to fix the issue. Unfortunately this isn't an issue that just happened to occur once, I rebooted several times and the issue was completely reproducible.
Is this explanation sufficient for you or do you need e.g. a VM declaration to reproduce this? :)
I'm currently not using sway, still on X :-) Reading up on https://wiki.archlinux.org/index.php/Systemd/User#Environment_variables, I'd assume this might be some sort of racyness, I don't really understand why it works in my X setup - |
Hmm, didn't know about the |
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.
So long story short, after posting my last comment I realized that I had to reboot for a kernel update anyway and I decided to try using systemctl --user --wait import-environment
which is working perfectly fine now -> big 👍 from my side :)
All my points were mostly bikesheds. which shouldn't be adressed now. From my point this seems ready to merge |
Maybe worth updating the archlinux wiki to include a note like that, if sway with a systemd user session is usually run like this. |
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.
I've been running 245.3 for 3 days on my main system without running into any problems.
LGTM.
Decided in |
Motivation for this change
This bumps systemd to its latest stable release.
As explained in #80038, we moved away from a custom systemd fork in the NixOS organization to some NixOS-specific patches inside nixpkgs.
Maintaining custom branches in a fork turned out to be very error-prone. Obsolete patches accidentially got re-introduced, maintaining things in the custom fork required write access to that repo, syncing back and forth with a corresponding nixpkgs PR, and the patches themselves became very unmanage-able as well. For example, some of the patches were partial reverts of earlier patches, not improving in getting the total patch count down ;-)
This PR intentionally isn't squashed together, as it makes it understandable how patches were folded together / became obsolete. I removed the comments originally introduced in 0e66f6b - these comments should still be acted upon in a followup PR.
I ran quite some VM tests, and switched
systemd.package
on my laptop to 90f9b47 (a version of this against master). So far, this seems to work, and should probably receive some broader testing :-)Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)