Skip to content

systemd: 249 -> 250#156096

Merged
flokli merged 9 commits intoNixOS:stagingfrom
jonringer:systemd-250
Mar 5, 2022
Merged

systemd: 249 -> 250#156096
flokli merged 9 commits intoNixOS:stagingfrom
jonringer:systemd-250

Conversation

@jonringer
Copy link
Contributor

Motivation for this change

Continuation of #150491

Opening PR so I can start large build job before getting on a plane.

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • 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/)
  • 22.05 Release Notes (or backporting 21.11 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
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 6.topic: systemd Software suite that provides an array of system components for Linux operating systems. 8.has: changelog This PR adds or changes release notes 8.has: documentation This PR adds or changes documentation 8.has: module (update) This PR changes an existing module in `nixos/` labels Jan 21, 2022
@ofborg ofborg bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Jan 21, 2022
@flokli
Copy link
Member

flokli commented Jan 21, 2022

This needs to target staging, and needs to be bumped to systemd/systemd-stable v250.3.

Furthermore, we should at least skim over the changes from v250..v250.3 and verify that they don't break any NixOS things.

@jonringer
Copy link
Contributor Author

Yea, traveling right now. I'll mark as draft until it's actually ready

@jonringer
Copy link
Contributor Author

I'll do a proper rebase and merge conflict analysis once I get home.

@jonringer
Copy link
Contributor Author

@ofborg eval

@ofborg ofborg bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Jan 22, 2022
@ofborg ofborg bot requested review from andir, edolstra, flokli and kloenk January 23, 2022 00:04
@ofborg ofborg bot added 10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. labels Jan 23, 2022
@ofborg ofborg bot requested a review from flokli January 23, 2022 19:46
@Izorkin
Copy link
Contributor

Izorkin commented Jan 23, 2022

@jonringer commit systemd: 249.5 -> 250.3 needed rename to systemd: 249.7 -> 250.3

@jonringer
Copy link
Contributor Author

jonringer commented Jan 23, 2022

rebased on latest master, will rebase onto staging once it's ready to merge. I would like to wait a staging cycle, as there was the python changes merged to staging, which I would prefer to stabilize in a different staging-next cycle from systemd changes

@Mic92
Copy link
Member

Mic92 commented Jan 24, 2022

I saw your PR too late and opened up #156438

@Mic92 Mic92 mentioned this pull request Jan 24, 2022
13 tasks
@Mic92
Copy link
Member

Mic92 commented Jan 24, 2022

I am closing this just now to avoid pings on rebase...

@Mic92 Mic92 closed this Jan 24, 2022
@Mic92 Mic92 reopened this Jan 24, 2022
@jonringer
Copy link
Contributor Author

I'm running a hydra job on this: https://hydra.jonringer.us/jobset/nixpkgs/systemd250

@ofborg ofborg bot requested review from WilliButz, globin, kalbasit and mmahut February 7, 2022 00:06
@flokli
Copy link
Member

flokli commented Feb 28, 2022

I think we could probably merge into staging after next staging-next cycle begins

@jonringer there have been some more staging cycles (#158080, #158080).

This also needs a rebase, as there have been some conflicts. Is there anything else preventing this from being merged? (I see the PR title still contains a "WIP" too).

@Mic92
Copy link
Member

Mic92 commented Feb 28, 2022

I am using this for some time on my laptop now without noticeable impact so far.

@jonringer
Copy link
Contributor Author

@flokli I was going to use this staging cycle for glibc #133431 (comment). Once it begins, I think we can merge this.

@jonringer
Copy link
Contributor Author

I can still rebase though

Copy link
Contributor

@ius ius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fails to build on EFI enabled RISC-V because the requested EFI linker (efi-ld=gold) is unsupported. According to Wikipedia gold only supports x86, x86-64, ARM, PowerPC, TileGX.

If there is no particular reason to pick gold over bfd, I suggest passing -Defi-ld=bfd instead.

Edit: I suggest just removing the option altogether, so it will figure out a suitable default by itself. See comment about changed semantics below as to why this is okay for v250.

Copy link
Contributor

@ius ius Mar 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drop this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did this build before this PR?

Copy link
Contributor

@ius ius Mar 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. In systemd v249.7 the variable was used to invoke the linker directly (see meson.build), so that's why ld was valid and defaulted to bfd.

In systemd v250.3 it's passed to -fuse-ld instead. meson.build

Actually, because of these new semantics, we can just drop the option. It will figure out the default linker by itself, or use bfd if it's anything other than bfd or gold.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

andir and others added 9 commits March 5, 2022 21:26
We don't have to do that as we already set all the feature flags to
null. Setting individual libraries to null instead of disabling their
feature flag will lead with bad example that will cause each of the
features to be disabled with multiple flags in the systemdMinimal
variant.

If a dependency is pulled in via another feature we should disable that
rather than setting it to null. Overriding a given package should be the
last resort.
This allows us to make test-only dependencies optional in builds that
aren't running tests (sadly all of our builds).
When initializing a system (e.g. first boot / livecd) we have no good
reference source for time. systemd-timesyncd however would revert back
to its configured fallback time (in our case 01.01.1980). Since we
probably don't want to hardcode a specific date as fallback we are now
using the current system time (wherever that might have come from) to
initialize the reference clock file.

The only systems that might be remotely affected by this change are
machines that have highly unreliable RTCs or those where the battery
that backs the RTC is running empty.

Historically these systems always had a tough time with anything time
related and likely required manual intervention.

For stateless systems (those that wipe / between reboots or our
installer CDs) this has the consequence that time will always be reset
to whatever the system comes up with on boot. This is likely the correct
time coming from an RTC. No harm done here the situation is likely
unchanged for them.

For stateful systems (those that retain the / partition across reboots)
there shouldn't be a change at all. They'll provide an initial clock
value once on their lifetime (during first boot / after installation).
From then onwards systemd-timesyncd will update the file with the newer
fallback time (that will be picked up on the next boot).
This helps systemd during runtime to make decisions about the sanity of
the system clock. See the references news article for more details on
the matter.
We do not run them, so it is unnecessary work.
As reported in
NixOS#156096 (review),
this fails to build on EFI enabled RISC-V because the requested EFI
linker (efi-ld=gold) is unsupported. According to Wikipedia gold only
supports x86, x86-64, ARM, PowerPC, TileGX.

Removing this option alltogether will cause meson to figure out the
default linker by itself.
@flokli
Copy link
Member

flokli commented Mar 5, 2022

I rebased this onto latest staging, fixed the conflicts, and dropped -Defi-ld=gold as suggested in #156096 (comment).

Considering this has been open for quite some time, and tested by some people already, I'll run the nixosTests.systemd{-boot} tests once more, and then we should merge this.

@flokli
Copy link
Member

flokli commented Mar 5, 2022

nixosTests.systemd-boot succeeded.

nixosTests.systemd couldn't run, due to /nix/store/i3axx4kkdbfl01r0dfsps9qnj8biryxh-python3.9-scikit-build-0.12.0.drv being broken right now. However, this has been sufficiently tested previously.

Let's get this into staging.

@flokli flokli merged commit 180c7c7 into NixOS:staging Mar 5, 2022
@vcunat
Copy link
Member

vcunat commented Mar 17, 2022

This merge broke nixosTests.containers-ip. I checked the commit right before this merge and the merge commit (after some bisection steps, as I started with a range of many hundred commits).

Maybe also some other small-channel blockers from this list regressed together with it: https://hydra.nixos.org/eval/1748773#tabs-still-fail (you can see logs there or reproduce cheaply on that particular commit)

@flokli
Copy link
Member

flokli commented Mar 17, 2022 via email

@flokli
Copy link
Member

flokli commented Mar 17, 2022

I built this locally. The container startup fails while trying to bind-mount /nix/var/nix/daemon-socket into the container:

machine # [    5.364468] systemd[1]: Starting Container 'webserver'...
machine # [    5.448067] container webserver[879]: Spawning container webserver on /var/lib/containers/webserver.
machine # [    5.448712] container webserver[879]: Press ^] three times within 1s to kill container.
machine # [    5.450500] container webserver[885]: Failed to stat /nix/var/nix/daemon-socket: No such file or directory
machine # [    5.454873] systemd[1]: container@webserver.service: Main process exited, code=exited, status=1/FAILURE
machine # [    5.455510] systemd[1]: container@webserver.service: Failed with result 'exit-code'.
machine # [    5.456098] systemd[1]: Failed to start Container 'webserver'.
machine # [    5.763319] systemd[1]: container@webserver.service: Scheduled restart job, restart counter is at 2.
machine # [    5.769093] systemd[1]: Stopped Container 'webserver'.
machine # [    5.770123] systemd[1]: Starting Container 'webserver'...

I ran the interactive test driver, and looked at the VM. Indeed /nix/var/nix/daemon-socket doesn't exist, because nix-daemon.socket failed to activate:

[  237.187747] systemd[1]: Nix Daemon Socket was skipped because of a failed condition check (ConditionPathIsReadWrite=/nix/var/nix/daemon-socket).

@flokli
Copy link
Member

flokli commented Mar 17, 2022

Okay, I figured this out - this is actually a bug in the upstream nix-daemon.socket unit.

I have a workaround in nixpkgs, and will send a fix to the Nix repo.

@flokli
Copy link
Member

flokli commented Mar 17, 2022

@vcunat the workaround is in #164644, and the proper fix in Nix is in NixOS/nix#6282.

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

Labels

6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 6.topic: systemd Software suite that provides an array of system components for Linux operating systems. 8.has: changelog This PR adds or changes release notes 8.has: documentation This PR adds or changes documentation 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches.

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

8 participants