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: 245.6 -> 246 #94354

Merged
merged 50 commits into from Aug 24, 2020
Merged

systemd: 245.6 -> 246 #94354

merged 50 commits into from Aug 24, 2020

Conversation

flokli
Copy link
Contributor

@flokli flokli commented Jul 31, 2020

Motivation for this change

This bumps systemd to its latest version, containing many fixes. See https://github.com/systemd/systemd/blob/v246/NEWS for release notes.

This is still WIP - libsystemd.so.0.29.0 from the lib output refers back to the out output, causing a cyclic dependency.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@ajs124
Copy link
Member

ajs124 commented Jul 31, 2020

Reading through the changelog, this might require a change in some module:

nss-mymachines lost support for resolution of users and groups, and
          now only does resolution of hostnames. This functionality is now
          provided by nss-systemd. Thus, the 'mymachines' entry should be
          removed from the 'passwd:' and 'group:' lines in /etc/nsswitch.conf
          (and 'systemd' added if it is not already there).

@dasJ
Copy link
Member

dasJ commented Jul 31, 2020

@ajs124 These are the corresponding lines: https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/system/boot/systemd.nix#L902,L916

@flokli
Copy link
Contributor Author

flokli commented Jul 31, 2020

We also should review #91960 before merging this, rebase this PR on top and update the options in there.

@flokli
Copy link
Contributor Author

flokli commented Aug 6, 2020

I rebased this on latest staging, and updated the documentation regarding on how to do updates as suggested by @andersk in #94681 (comment).

Still haven't yet looked into how to fix the cyclic dependency between the different outputs - help appreciated.

@andir
Copy link
Member

andir commented Aug 6, 2020 via email

@flokli
Copy link
Contributor Author

flokli commented Aug 7, 2020

I did look a bit at this with @arianvp. libsystemd-shared.so contains some code used by many of the systemd binaries. It itself uses libsystemd.so (which is in the lib output). I think this is fine.

What's not fine (and seems to have changed in 9c5bb2033db0c0927593b929ff760b69295a9f70) is that libsystemd.so now contains a get_path helper function containing references to ROOTPREFIX (which points back to ${systemd.out} in our case).

I'm not yet sure on whether these are used (and simply not garbage collected), similar to the situation on aarch64.

@flokli
Copy link
Contributor Author

flokli commented Aug 12, 2020

Apparently these paths are in the library are now also exposed by sd_path_lookup*, which seems public libsystemd API :-/ (thanks @jtojnar)

I'm not really if it's wise to put all this logic into a generic library other applications link against, if it still contains hardcoded paths - IMHO, these applications should either ask the systemd .pc files during build-time, or if this can change at runtime, the libsystemd API should ask the running systemd for the paths currently active on the system, by asking pid 1 via IPC.

I'll take a look where this method is used inside of systemd itself, and whether we can/want to point these paths to something else (either by changing meson flags, or by patching the code). It seems some of the code added in above commit doesn't properly honor the path structure anyways, but uses some hardcoded strings in first place - maybe we should have a discussion with upstream about how to structure these paths.

If this all doesn't work out, we might have to give up the multi-output nature of systemd (and ship everything in a bigger single output).

@flokli
Copy link
Contributor Author

flokli commented Aug 16, 2020

Yeah, I planned to talk more with upstream and see if we can get some of the path handling there unified. For now it's probably fine to drop the lib output.

This PR probably just needs some more thorough testing in everyday usage, and someone toying with the watchdog options.

Edit: I opened systemd/systemd#16747 for now and will have some more discussion in the following days, but none of this blocks that PR.

@FRidh
Copy link
Member

FRidh commented Aug 24, 2020

What's the status of this PR?

@flokli
Copy link
Contributor Author

flokli commented Aug 24, 2020

I ran this on my laptop for a week or two and didn't spot any issues. I haven't figured yet out why the watchdog part of the test is failing.

I propose commenting this out and then merging this in.

I'd really like to see this in 20.09, and we'd still need to have it go through a staging round.

@FRidh
Copy link
Member

FRidh commented Aug 24, 2020

Right. I am about to start a new staging-next iteration which most likely would be the last one.

@flokli
Copy link
Contributor Author

flokli commented Aug 24, 2020

Alright, let me fix the test and then merge this in.

@flokli
Copy link
Contributor Author

flokli commented Aug 24, 2020

There will likely be some follow-up PRs to expose new systemd options in the module system, but that's no world rebuild, so should be fine.

For some reason, this value isn't updated, at least not inside the VM.

Uncomment it, so we still test the rest. Needs to be investigated
further.
@flokli flokli merged commit 40d2968 into NixOS:staging Aug 24, 2020
systemd automation moved this from To Do to Done Aug 24, 2020
20.09 Blockers automation moved this from In progress to Done Aug 24, 2020
@flokli flokli deleted the systemd-246 branch August 24, 2020 10:42
@FRidh FRidh mentioned this pull request Aug 25, 2020
10 tasks
@andersk
Copy link
Contributor

andersk commented Aug 30, 2020

This broke fwupd: #96663.

hswong3i added a commit to alvistack/containers-crun that referenced this pull request Sep 11, 2020
Also update systemd 246 as per NixOS/nixpkgs#94354

Signed-off-by: Wong Hoi Sing Edison <hswong3i@gmail.com>
hswong3i added a commit to alvistack/containers-conmon that referenced this pull request Sep 11, 2020
Backport changes from https://github.com/cri-o/cri-o/pull/4065/files#diff-1d37e48f9ceff6d8030570cd36286a61R189-R197

Also update systemd 246 as per NixOS/nixpkgs#94354

Fix containers#206

Signed-off-by: Wong Hoi Sing Edison <hswong3i@gmail.com>

Signed-off-by: Wong Hoi Sing Edison <hswong3i@gmail.com>
hswong3i added a commit to alvistack/containers-conmon that referenced this pull request Sep 11, 2020
Backport changes from https://github.com/cri-o/cri-o/pull/4065/files#diff-1d37e48f9ceff6d8030570cd36286a61R189-R197

Also update systemd 246 as per NixOS/nixpkgs#94354

Fix containers#206

Signed-off-by: Wong Hoi Sing Edison <hswong3i@gmail.com>
hswong3i added a commit to alvistack/containers-conmon that referenced this pull request Sep 13, 2020
Backport changes from https://github.com/cri-o/cri-o/pull/4065/files#diff-1d37e48f9ceff6d8030570cd36286a61R189-R197

Also update systemd 246 as per NixOS/nixpkgs#94354

Fix containers#206

Signed-off-by: Wong Hoi Sing Edison <hswong3i@gmail.com>
hswong3i added a commit to alvistack/containers-crun that referenced this pull request Sep 13, 2020
Also update systemd 246 as per NixOS/nixpkgs#94354

Signed-off-by: Wong Hoi Sing Edison <hswong3i@gmail.com>
haircommander pushed a commit to containers/conmon that referenced this pull request Sep 14, 2020
Backport changes from https://github.com/cri-o/cri-o/pull/4065/files#diff-1d37e48f9ceff6d8030570cd36286a61R189-R197

Also update systemd 246 as per NixOS/nixpkgs#94354

Fix #206

Signed-off-by: Wong Hoi Sing Edison <hswong3i@gmail.com>
@arianvp arianvp mentioned this pull request Oct 2, 2020
10 tasks
@worldofpeace worldofpeace added this to In progress in 20.09 Blockers via automation Oct 5, 2020
@worldofpeace worldofpeace removed this from Done in 20.09 Blockers Oct 5, 2020
@worldofpeace worldofpeace moved this from In progress to Done in 20.09 Blockers Oct 5, 2020
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/marketing-team-can-we-present-nix-nixos-better/6249/106

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
systemd
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

10 participants