Package: rng-tools-debian
Version: 2.5
Severity: grave

Dear Maintainers,

Thanks for adding a native systemd service!

I noticed that in an autopkgtest-build-qemu VM the service fails:

root@host:~# systemctl status --no-pager -l rng-tools-debian
× rng-tools-debian.service - Hardware RNG entropy gatherer daemon
(Debian variant)
     Loaded: loaded (/usr/lib/systemd/system/rng-tools-debian.service;
enabled; preset: enabled)
     Active: failed (Result: exit-code) since Tue 2025-01-14 12:58:55
UTC; 31s ago
 Invocation: 50bf1d4b6ec64387a27ea1a42c0be118
       Docs: man:rngd(8)
    Process: 441 ExecStart=/usr/share/rng-tools-debian/systemd-helper
start (code=exited, status=1/FAILURE)
   Mem peak: 1.7M
        CPU: 8ms

Jan 14 12:58:55 host systemd[1]: Starting rng-tools-debian.service -
Hardware RNG entropy gatherer daemon (Debian variant)...
Jan 14 12:58:55 host rng-tools-debian[450]: not starting: /dev/hwrng
is used by the kernel automatically
Jan 14 12:58:55 host systemd[1]: rng-tools-debian.service: Control
process exited, code=exited, status=1/FAILURE
Jan 14 12:58:55 host systemd[1]: rng-tools-debian.service: Failed with
result 'exit-code'.
Jan 14 12:58:55 host systemd[1]: Failed to start
rng-tools-debian.service - Hardware RNG entropy gatherer daemon
(Debian variant).

It looks like this is doing some checks, and intends to skip. But just
exiting means the service is recorded as failed, and this will likely
trip other tests, hence the severity to stop migrating to testing for
now.

There are several ways to do such checks natively _and_ resulting in a
service that is skipped, rather than failed.
You could run the script that does the check in an ExecCondition=
statement - if that fails, the service is marked as skipped.

https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html#ExecCondition=

Or, you could have a special exit status that means the service is
marked as successful:

https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html#SuccessExitStatus=

There might be other options as well, these are just the first that
came to mind.

Reply via email to