Skip to content

Comments

nixos/systemd: make sure all the device nodes are created in stage1#179693

Closed
K900 wants to merge 1 commit intoNixOS:masterfrom
K900:systemd-initrd-fixes
Closed

nixos/systemd: make sure all the device nodes are created in stage1#179693
K900 wants to merge 1 commit intoNixOS:masterfrom
K900:systemd-initrd-fixes

Conversation

@K900
Copy link
Contributor

@K900 K900 commented Jun 30, 2022

Description of changes

The ConditionFileNotEmpty override patch wasn't correct for stage1, which does have the modules in /lib. So, remove the condition instead, and set the right path with overrides in both stage1 and the final system.

Also, make sure systemd-tmpfiles-setup-dev is pulled in to create all the necessary symlinks.

Unfortunately requires a systemd rebuild.

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.11 Release Notes (or backporting 22.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
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

The ConditionFileNotEmpty override patch wasn't correct for stage1, which
does have the modules in /lib. So, remove the condition instead, and set
the right path with overrides in both stage1 and the final system.

Also, make sure systemd-tmpfiles-setup-dev is pulled in to create
all the necessary symlinks.
@K900 K900 requested a review from a team as a code owner June 30, 2022 10:00
@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: module (update) This PR changes an existing module in `nixos/` labels Jun 30, 2022
@flokli
Copy link
Member

flokli commented Jul 3, 2022

@K900 with #80038 in mind, this looks like we can drop the patch in the systemd derivation alltogether, and only override it via the module system in the non-initrd case?

@K900
Copy link
Contributor Author

K900 commented Jul 3, 2022

We can, yes. I'm not sure this is any better than shipping the patch though.

@K900
Copy link
Contributor Author

K900 commented Jul 8, 2022

@flokli do you know where the patch series comes from?

@vcunat vcunat changed the base branch from staging to master July 20, 2022 18:38
@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 Jul 20, 2022
@flokli
Copy link
Member

flokli commented Jul 22, 2022

The patch series is only maintained in nixpkgs these days.

Please remove the patch, reformat/rename patches according to the comment at https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/linux/systemd/default.nix#L150-L153, and then open a new PR, targeting staging, linking to it from here.

@K900
Copy link
Contributor Author

K900 commented Jul 22, 2022

Maybe we should have a NixOS/systemd fork then?

@arianvp
Copy link
Member

arianvp commented Jul 22, 2022

We used to have a systemd fork but we moved away from and moved to patch sets to make our life as maintainers slightly easier as we have been on a multi-year effort to drop or upstream as many patches as possible. We want to run systemd as vanilla as possible as it lowers maintenance burden for us.

And the fact that we can remove this patch again signals this is the better choice from a maintenance perspective :)

@K900 K900 closed this Jul 22, 2022
@K900 K900 deleted the systemd-initrd-fixes branch July 22, 2022 07:00
@K900
Copy link
Contributor Author

K900 commented Jul 22, 2022

Let's continue in #182436.

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: 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

None yet

Development

Successfully merging this pull request may close these issues.

3 participants