mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 23:46:13 -05:00
Merge remote-tracking branch 'upstream/version-1.2.0'
This commit is contained in:
commit
a45f8223e1
3 changed files with 12 additions and 18 deletions
|
@ -338,7 +338,7 @@ (define code
|
|||
(("^#!.*/bash") (string-append "#! " bash "/bin/bash")))))
|
||||
#t)))
|
||||
|
||||
;; The 'guix' executable has 'OUT/libexec/guix/guile' has
|
||||
;; The 'guix' executable has 'OUT/libexec/guix/guile' as
|
||||
;; its shebang; that should remain unchanged, thus remove
|
||||
;; the 'patch-shebangs' phase, which would otherwise
|
||||
;; change it to 'GUILE/bin/guile'.
|
||||
|
|
|
@ -291,19 +291,8 @@ (define (root-file-system-service)
|
|||
(define (file-system->shepherd-service-name file-system)
|
||||
"Return the symbol that denotes the service mounting and unmounting
|
||||
FILE-SYSTEM."
|
||||
(define valid-characters
|
||||
;; Valid store characters; see 'checkStoreName' in the daemon.
|
||||
(string->char-set
|
||||
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+-._?="))
|
||||
|
||||
(define mount-point
|
||||
(string-map (lambda (chr)
|
||||
(if (char-set-contains? valid-characters chr)
|
||||
chr
|
||||
#\-))
|
||||
(file-system-mount-point file-system)))
|
||||
|
||||
(symbol-append 'file-system- (string->symbol mount-point)))
|
||||
(symbol-append 'file-system-
|
||||
(string->symbol (file-system-mount-point file-system))))
|
||||
|
||||
(define (mapped-device->shepherd-service-name md)
|
||||
"Return the symbol that denotes the shepherd service of MD, a <mapped-device>."
|
||||
|
|
|
@ -224,16 +224,21 @@ (define (assert-satisfied-requirements service)
|
|||
|
||||
(for-each assert-satisfied-requirements services))
|
||||
|
||||
(define %store-characters
|
||||
;; Valid store characters; see 'checkStoreName' in the daemon.
|
||||
(string->char-set
|
||||
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+-._?="))
|
||||
|
||||
(define (shepherd-service-file-name service)
|
||||
"Return the file name where the initialization code for SERVICE is to be
|
||||
stored."
|
||||
(let ((provisions (string-join (map symbol->string
|
||||
(shepherd-service-provision service)))))
|
||||
(string-append "shepherd-"
|
||||
(string-map (match-lambda
|
||||
(#\/ #\-)
|
||||
(#\ #\-)
|
||||
(chr chr))
|
||||
(string-map (lambda (chr)
|
||||
(if (char-set-contains? %store-characters chr)
|
||||
chr
|
||||
#\-))
|
||||
provisions)
|
||||
".scm")))
|
||||
|
||||
|
|
Loading…
Reference in a new issue