[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

04/10: services: urandom-seed: Deprecate the 'urandom-seed-service' proc

From: Ludovic Courtès
Subject: 04/10: services: urandom-seed: Deprecate the 'urandom-seed-service' procedure.
Date: Fri, 22 Dec 2017 04:04:11 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit 8faaf8d7cc466c8caa55905798c9ff9aaad9a1c9
Author: Ludovic Courtès <address@hidden>
Date:   Wed Dec 20 11:13:54 2017 +0100

    services: urandom-seed: Deprecate the 'urandom-seed-service' procedure.
    * gnu/services/base.scm (urandom-seed-service-type)[default-value]: New
    (urandom-seed-service): Mark as deprecated.
    (%base-services): Use URANDOM-SEED-SERVICE-TYPE directly.
    * gnu/services/base.scm (%base-services):
    * doc/guix.texi (Base Services): Document 'urandom-seed-service-type'
    instead of 'urandom-seed-service'.
 doc/guix.texi         | 4 ++--
 gnu/services/base.scm | 5 +++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index faad3ad..94d4d8f 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -10031,12 +10031,12 @@ well as in the @var{groups} field of the 
@var{operating-system} record.
 @end example
 @end deffn
address@hidden {Scheme Procedure} urandom-seed-service
address@hidden {Scheme Variable} urandom-seed-service-type
 Save some entropy in @var{%random-seed-file} to seed @file{/dev/urandom}
 when rebooting.  It also tries to seed @file{/dev/urandom} from
 @file{/dev/hwrng} while booting, if @file{/dev/hwrng} exists and is
address@hidden deffn
address@hidden defvr
 @defvr {Scheme Variable} %random-seed-file
 This is the name of the file where some random bytes are saved by
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 2652571..acc5c33 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -597,12 +597,13 @@ in KNOWN-MOUNT-POINTS when it is stopped."
                        ;; start until we have seeded the PRNG.
                        (service-extension user-processes-service-type
                                           (const '(urandom-seed)))))
+                (default-value #f)
                  "Seed the @file{/dev/urandom} pseudo-random number
 generator (RNG) with the value recorded when the system was last shut
-(define (urandom-seed-service)
+(define (urandom-seed-service)                    ;deprecated
   (service urandom-seed-service-type #f))
@@ -1984,7 +1985,7 @@ This service is not part of @var{%base-services}."
                                           (ip "")
                                           (provision '(loopback)))))
-        (urandom-seed-service)
+        (service urandom-seed-service-type)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]