Skip to content

[staging-next] nixos/systemd: patch to avoid update-utmp failure with audit 4.2 - #547195

Merged
ElvishJerricco merged 1 commit into
NixOS:staging-nextfrom
whispersofthedawn:p/systemd/audit-patch
Jul 30, 2026
Merged

ElvishJerricco merged 1 commit into
NixOS:staging-nextfrom
whispersofthedawn:p/systemd/audit-patch

Conversation

@whispersofthedawn

@whispersofthedawn whispersofthedawn commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

see discussion in #staging:nixos.org starting at https://matrix.to/#/!UNVBThoJtlIiVwiDjU:nixos.org/$nUMH0ULEV7kMmSOMrOiCZI3rb2yGvXDGn_yY-wNYmDU?via=nixos.org&via=matrix.org&via=tchncs.de for much more context.

audit 4.2 rejects overlong values (max 15 bytes) for the kernel comm. systemd attempts to send the full 19 bytes of "systemd-update-utmp", and the systemd-update-utmp service fails to start. this was changed to truncate instead of reject in audit 4.2.1, but until we can take the mass rebuild on staging, we fetch the systemd patch which shortens "systemd-update-utmp" to "update-utmp". this is in the nixos module as apply instead of part of the systemd package as that would be a larger rebuild and would delay other fixes making their way to master.

original commit: linux-audit/audit-userspace@d7ea982
switch to truncate: linux-audit/audit-userspace@d7ea982
systemd pr: systemd/systemd#43144

tested: nixosTests.login had logs of utmp failing to start before, and no longer does with this. also tested on my laptop running staging-next.

Things done

@nixpkgs-ci
nixpkgs-ci Bot requested a review from a team July 29, 2026 20:33
@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-nixos-tests This PR causes rebuilds for all NixOS tests and should normally target the staging branches. 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` labels Jul 29, 2026
audit 4.2 rejects overlong values (max 15 bytes) for the kernel comm.
systemd attempts to send the full 19 bytes of "systemd-update-utmp",
and the systemd-update-utmp service fails to start. this was changed to
truncate instead of reject in audit 4.2.1, but until we can take the
mass rebuild on staging, we fetch the systemd patch which shortens
"systemd-update-utmp" to "update-utmp". this is in the nixos module as
`apply` instead of part of the systemd package as that would be a larger
rebuild and would delay other fixes making their way to master.
@GrimmTheShrimp

Copy link
Copy Markdown
Contributor

I just wrote a nixos test for utmp, and can confirm both this failure and the fix.

@GrimmTheShrimp

Copy link
Copy Markdown
Contributor

#547227 now has a utmp nixos test, which starts working with this PR (and hopefully also starts working with the audit update, i did not yet build that far to tell)

@ElvishJerricco
ElvishJerricco added this pull request to the merge queue Jul 29, 2026
Merged via the queue into NixOS:staging-next with commit 9270a48 Jul 30, 2026
24 checks passed
@whispersofthedawn
whispersofthedawn deleted the p/systemd/audit-patch branch July 30, 2026 00:32
@vcunat

vcunat commented Jul 31, 2026

Copy link
Copy Markdown
Member

Somehow this commit/merge broke nixosTests.predictable-interface-names.predictableSystemdStage1 and a couple others. You can see those on Hydra:
https://hydra.nixos.org/eval/1827667#tabs-still-fail

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 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-nixos-tests This PR causes rebuilds for all NixOS tests and should normally target the staging branches.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants