unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Leo Famulari <leo@famulari.name>
Cc: 29773-done@debbugs.gnu.org
Subject: bug#29773: urandom-seed-service should run earlier in the boot process
Date: Fri, 22 Dec 2017 10:06:46 +0100	[thread overview]
Message-ID: <87po779lnd.fsf@gnu.org> (raw)
In-Reply-To: <20171221190914.GA11808@jasmine.lan> (Leo Famulari's message of "Thu, 21 Dec 2017 14:09:14 -0500")

Hello,

Leo Famulari <leo@famulari.name> skribis:

> On Thu, Dec 21, 2017 at 10:10:29AM +0100, Ludovic Courtès wrote:
>> 
>> The attached patch does the trick, AFAICS:
>> 
>
>> diff --git a/gnu/services/base.scm b/gnu/services/base.scm
>> index acc5c33f5..7fc8f6aa7 100644
>> --- a/gnu/services/base.scm
>> +++ b/gnu/services/base.scm
>> @@ -529,7 +529,10 @@ in KNOWN-MOUNT-POINTS when it is stopped."
>>    (list (shepherd-service
>>           (documentation "Preserve entropy across reboots for /dev/urandom.")
>>           (provision '(urandom-seed))
>> -         (requirement '(file-systems))
>> +
>> +         ;; Depend on udev so that /dev/hwrng is available.
>> +         (requirement '(file-systems udev))
>> +
>>           (start #~(lambda _
>>                      ;; On boot, write random seed into /dev/urandom.
>>                      (when (file-exists? #$%random-seed-file)
>
> Yes, it seems to work for me.

Great, I’ve pushed the whole series.

> I'm unsure if the stop action of urandom-seed-service is being executed
> on shutdown.
>
> I added some print statements and sleep delays to the stop action but
> the system halts faster than I expected and I don't see any writes to
> /var/lib/random-seed.

/var/lib/random-seed is definitely being updated on shutdown on my
system, as can be seen from its mtime.

Thanks,
Ludo’.

      reply	other threads:[~2017-12-22  9:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-19 19:13 bug#29773: urandom-seed-service should run earlier in the boot process Leo Famulari
2017-12-19 19:24 ` bug#29773: Service graph Leo Famulari
2017-12-20 10:19 ` bug#29773: urandom-seed-service should run earlier in the boot process Ludovic Courtès
2017-12-20 23:07   ` Leo Famulari
2017-12-21  9:10     ` Ludovic Courtès
2017-12-21 19:09       ` Leo Famulari
2017-12-22  9:06         ` Ludovic Courtès [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87po779lnd.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=29773-done@debbugs.gnu.org \
    --cc=leo@famulari.name \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).