Skip to content

fix(rngd): add configuration file on ArchLinux - #2543

Draft
ChrisTX wants to merge 1 commit into
dracut-ng:mainfrom
ChrisTX:fix-arch-rngd
Draft

fix(rngd): add configuration file on ArchLinux#2543
ChrisTX wants to merge 1 commit into
dracut-ng:mainfrom
ChrisTX:fix-arch-rngd

Conversation

@ChrisTX

@ChrisTX ChrisTX commented Jul 30, 2026

Copy link
Copy Markdown

ArchLinux uses /etc/conf.d rather than /etc/sysconfig in its rngd.service to read environment variables from. So far this file was not included automatically, and only sysconfig was considered, leading to rngd.service failing on boot on ArchLinux if rng-tools is just installed. This commit adds the same handling for /etc/conf.d

Fixes: #2542

Checklist

  • I have tested it locally
  • I have reviewed and updated any documentation if relevant
  • I am providing new code and test(s) for it

ArchLinux uses /etc/conf.d rather than /etc/sysconfig in its
rngd.service to read environment variables from. So far this file was
not included automatically, and only sysconfig was considered, leading
to rngd.service failing on boot on ArchLinux if rng-tools is just
installed. This commit adds the same handling for /etc/conf.d

Fixes: dracut-ng#2542
@ChrisTX
ChrisTX requested a review from a team as a code owner July 30, 2026 18:16
@github-actions github-actions Bot added modules Issue tracker for all modules rngd Issues related to the rngd module labels Jul 30, 2026
@devkontrol

Copy link
Copy Markdown
Collaborator

Earlier discussion on this - #2243

@ChrisTX

ChrisTX commented Jul 30, 2026

Copy link
Copy Markdown
Author

Earlier discussion on this - #2243

I can see that standardising the path upstream would be preferred in the medium term, but the status quo is a rather unfortunate automatic failure of a service if rng tools is just installed.

Wouldn't it make sense to merge this fix, as it doesn't have any downsides?

@bdrung

bdrung commented Jul 31, 2026

Copy link
Copy Markdown
Member

An alternative would be to enhance dracut to read the service file and look for EnvironmentFile.

@Conan-Kudo

Copy link
Copy Markdown
Collaborator

I'm not really a fan of this, I'd rather have a more general solution to read and include EnvironmentFiles for any systemd units.

@ChrisTX

ChrisTX commented Jul 31, 2026

Copy link
Copy Markdown
Author

I can see how such a general solution would be overall preferable, but that's much different in terms of scope than a simple bugfix. As mentioned, this creates real issues right now for people who are using Dracut on Arch.

A general solution would require quite some design discussion, as .service files can be overridden. What if it read the EnvironmentFile=... line from the .service file, but a user had overridden it to use a different location? You couldn't read that from the .service alone.

As of such, and considering that the /etc/sysconfig solution exists right next to it as the same stop-gap until such a feature is designed, wouldn't it be an option to merge this as a bugfix until then?

@Conan-Kudo

Copy link
Copy Markdown
Collaborator

My worry is that then this opens the doors for every distro's variants of this to be in every module, and I don't really want to be in the business of figuring that out when someone does something stupid like have two distros' files because they cross-graded and so the wrong data is read.

This is already bad enough as it is. 😦

@mtorromeo

Copy link
Copy Markdown

I don't know if this is acceptable but this could be used to read all potential environment files from the unit, and this would work even if the end user customized the units or with systemd drop-in files:

systemctl cat rngd | awk -F= '{ if ($1 == "EnvironmentFile") { sub(/^-/, "", $2); print $2 } }'

@devkontrol

Copy link
Copy Markdown
Collaborator

I don't know if this is acceptable but this could be used to read all potential environment files from the unit, and this would work even if the end user customized the units or with systemd drop-in files:

systemctl cat rngd | awk -F= '{ if ($1 == "EnvironmentFile") { sub(/^-/, "", $2); print $2 } }'

@bdrung has started similar work in another PR I think - see #1031

We would have to understand the performance impact of such an extra computation before merging

@devkontrol
devkontrol marked this pull request as draft August 10, 2026 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

modules Issue tracker for all modules needs discussion Issues requiring discussion rngd Issues related to the rngd module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rngd.service fails on ArchLinux due to config file not being installed

5 participants