Skip to content

nixos/terminfo: Fix less in systemd stage 1#511313

Merged
nikstur merged 1 commit into
NixOS:staging-nixosfrom
ElvishJerricco:push-ymvykrmzyvwv
Apr 22, 2026
Merged

nixos/terminfo: Fix less in systemd stage 1#511313
nikstur merged 1 commit into
NixOS:staging-nixosfrom
ElvishJerricco:push-ymvykrmzyvwv

Conversation

@ElvishJerricco

Copy link
Copy Markdown
Contributor

Since less 691, we get terminals database is inaccessible in initrd. This is a problem because ordinary systemd commands like systemctl and journalctl often try to use the pager.

Bisected to: gwsw/less@7bf5441

Fedora only adds these few terminfos to their initramfs, see dracut: https://github.com/dracutdevs/dracut/blob/5d2bda46f4e75e85445ee4d3bd3f68bf966287b9/modules.d/95terminfo/module-setup.sh#L12

Things done

  • Built on platform:
    • x86_64-linux
    • 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.

Since `less` 691, we get `terminals database is inaccessible` in
initrd. This is a problem because ordinary systemd commands like
systemctl and journalctl often try to use the pager.

Bisected to: gwsw/less@7bf5441

Fedora only adds these few terminfos to their initramfs, see dracut:
https://github.com/dracutdevs/dracut/blob/5d2bda46f4e75e85445ee4d3bd3f68bf966287b9/modules.d/95terminfo/module-setup.sh#L12
@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. 9.needs: reviewer This PR currently has no reviewers requested and needs attention. 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 Apr 19, 2026
@nikstur

nikstur commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

Just to get this right: this would only really be useful for tests where these commands might be invoked via the test driver, right? If yes, maybe we shouldn't enable this globally but just for tests.

@lilyinstarlight

Copy link
Copy Markdown
Member

Just to get this right: this would only really be useful for tests where these commands might be invoked via the test driver, right? If yes, maybe we shouldn't enable this globally but just for tests.

This is useful for any person trying to run e.g. journalctl in initramfs recovery mode to debug issues (like I was a few days ago where I encountered this bug and had to painfully work around it)

Adding the linux (and similar basic) terminfo should probably not be conditional (if I'm understanding correctly what you're suggesting)

@nixpkgs-ci nixpkgs-ci Bot added 12.approvals: 1 This PR was reviewed and approved by one person. and removed 9.needs: reviewer This PR currently has no reviewers requested and needs attention. labels Apr 22, 2026
@nikstur nikstur added this pull request to the merge queue Apr 22, 2026
Merged via the queue into NixOS:staging-nixos with commit 9522d45 Apr 22, 2026
37 of 39 checks passed
@ElvishJerricco ElvishJerricco deleted the push-ymvykrmzyvwv branch May 26, 2026 18:36
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-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. 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.

3 participants