Skip to content

systemd: 258.3 -> 259#472008

Merged
arianvp merged 3 commits intoNixOS:stagingfrom
arianvp:systemd-259
Jan 30, 2026
Merged

systemd: 258.3 -> 259#472008
arianvp merged 3 commits intoNixOS:stagingfrom
arianvp:systemd-259

Conversation

@arianvp
Copy link
Member

@arianvp arianvp commented Dec 18, 2025

Things done

  • Built on platform:
    • x86_64-linux (glibc)
    • x86_64-linux (musl)
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

return log_error_errno(errno, "Failed to open keyboard mapping list: %m");
if (!cached)
- cached = secure_getenv("SYSTEMD_XKB_DIRECTORY") ?: "/usr/share/X11/xkb";
+ cached = secure_getenv("SYSTEMD_XKB_DIRECTORY") ?: "/etc/X11/xkb";
Copy link
Member Author

Choose a reason for hiding this comment

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

I think this might mean we can drop this patch by wrapProgram'ing localectl

(lib.mesonOption "umount-path" "${lib.getOutput "mount" util-linux}/bin/umount")

# Swap
(lib.mesonOption "swapon-path" "${lib.getOutput "swap" util-linux}/sbin/swapon")
Copy link
Member Author

Choose a reason for hiding this comment

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

an agetty-path was also added. We're not setting it as we override the entire agetty.service in NixOS module but maybe we should so that the one shipped with systemd actually works on NixOS

);

doCheck = true;
doCheck = false;
Copy link
Member Author

@arianvp arianvp Dec 18, 2025

Choose a reason for hiding this comment

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

This reverts #404902 (comment)

Without this I get linker errors. And we have withTests = false anyway so I don't think this did anything useful in 258.2 in the first place.

systemd tests on NixOS is probably a multiple-month engineering effort as it's full of hardcoded FHS assumptions and requires mkosi. Neither of which work on NixOS

@arianvp
Copy link
Member Author

arianvp commented Dec 18, 2025

@alyssais care to look at the musl stuff? It seems musl is now supported in 259 so I feel we can drop a lot off these patches?

@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. 6.topic: systemd Software suite that provides an array of system components for Linux operating systems. labels Dec 18, 2025
@stelcodes

This comment was marked as resolved.

@arianvp

This comment was marked as resolved.

@arianvp

This comment was marked as resolved.

@alyssais
Copy link
Member

@alyssais care to look at the musl stuff? It seems musl is now supported in 259 so I feel we can drop a lot off these patches?

Can try to have a look but @LordGrimmauld might be a better ask at this point since they actually use musl systemd on NixOS with all its features.

@LordGrimmauld
Copy link
Contributor

My musl VM does not currently compile as bootstrap tools are broken until #473403 gets resolved. Iirc that one is waiting for infra team. Building my own bootstrap tools, i got slightly further, but not super far with gcc 15. I'll need to revisit this, and there is significant work to do.

That said: We should be able to just blanket-drop all musl specific patches here.

@LordGrimmauld LordGrimmauld changed the base branch from master to staging December 29, 2025 15:16
@nixpkgs-ci nixpkgs-ci bot closed this Dec 29, 2025
@nixpkgs-ci nixpkgs-ci bot reopened this Dec 29, 2025
@LordGrimmauld
Copy link
Contributor

this needs to go against staging, and has merge conflicts with the systemd 258.3 update merged earlier

@nixpkgs-ci nixpkgs-ci bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Dec 29, 2025
@LordGrimmauld
Copy link
Contributor

On musl:

  • all musl-specific patches can/should be dropped (most fail to apply, all are unnecessary)
  • doCheck needs to be disabled on musl, as tests fail to link
  • the musl-specific "-D__UAPI_DEF_ETHHDR=0" can be removed

I'll push the relevant updates to my musl VM shortly.

@LordGrimmauld
Copy link
Contributor

https://git.grimmauld.de/Grimmauld/grimm-musl/commit/064dd8afcfc41c2083c0b8842b60e99bf6282fb5

image

#473403, #453557, #472008, #473068 on musl nixos and current staging, with a couple other fixes

@LordGrimmauld LordGrimmauld mentioned this pull request Dec 29, 2025
13 tasks
@nixpkgs-ci nixpkgs-ci bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Dec 29, 2025
@LordGrimmauld
Copy link
Contributor

LordGrimmauld commented Dec 29, 2025

Okay, I now built systemd successfully on x86_64-linux, both musl and glibc.

Some general housekeeping things we can do:

diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix
index 5d9d1eff074a..0b9e4e952676 100644
--- a/pkgs/os-specific/linux/systemd/default.nix
+++ b/pkgs/os-specific/linux/systemd/default.nix
@@ -5,7 +5,6 @@
   pkgsCross,
   testers,
   fetchFromGitHub,
-  fetchzip,
   buildPackages,
   makeBinaryWrapper,
   ninja,
@@ -17,7 +16,6 @@
   getent,
   glibcLocales,
   autoPatchelfHook,
-  fetchpatch,
 
   # glib is only used during tests (test-bus-gvariant, test-bus-marshal)
   glib,
@@ -509,7 +507,6 @@ stdenv.mkDerivation (finalAttrs: {
     (lib.mesonEnable "libcurl" wantCurl)
     (lib.mesonEnable "libidn" false)
     (lib.mesonEnable "libidn2" withLibidn2)
-    (lib.mesonEnable "libiptc" false)
     (lib.mesonEnable "repart" withRepart)
     (lib.mesonEnable "sysupdate" withSysupdate)
     (lib.mesonEnable "sysupdated" withSysupdate)

We are at a point where we can start thinking about running the test suite and aarch64 tests.

@rhendric
Copy link
Member

Per NEWS, we should be able to drop the libcap dependency here.

@arianvp arianvp marked this pull request as ready for review January 17, 2026 17:11
@nixpkgs-ci nixpkgs-ci bot requested a review from LordGrimmauld January 17, 2026 17:16
@arianvp arianvp changed the title systemd: 258.2 -> 259 systemd: 258.3 -> 259 Jan 17, 2026
arianvp and others added 3 commits January 17, 2026 21:55
Had to revert NixOS#404902 as it gives
linker errors. And I don't think the systemd tests work on NixOS anyway.
woohoo! one less circular dep to worry about

from NEWS:
systemd no longer links against libcap at all. The simple system call
wrappers and other APIs it provides have been reimplemented directly
in systemd, which reduced the codebase and the dependency tree.
@nixpkgs-ci nixpkgs-ci bot added the 8.has: package (update) This PR updates a package to a newer version label Jan 27, 2026
Copy link
Member

@WilliButz WilliButz left a comment

Choose a reason for hiding this comment

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

rebased the commits locally on a recent staging rev, built a couple of images and ran a some of the in-tree + some downstream integration tests. LGTM 👍

@nixpkgs-ci nixpkgs-ci bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Jan 29, 2026
@arianvp arianvp added this pull request to the merge queue Jan 30, 2026
Merged via the queue into NixOS:staging with commit 020ced9 Jan 30, 2026
31 of 33 checks passed
@arianvp arianvp deleted the systemd-259 branch January 30, 2026 01:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: systemd Software suite that provides an array of system components for Linux operating systems. 8.has: package (update) This PR updates a package to a newer version 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 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. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants