diff options
author | Ludovic Courtès <ludo@gnu.org> | 2019-05-02 15:32:30 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2019-05-02 15:32:30 +0200 |
commit | 746ac457cc2748152a3a39d4296972fa20f19741 (patch) | |
tree | 978f3bdb71cfd062df8da9be7ae0218d214626e1 /guix | |
parent | c457f109bec75bfbf4619f3e18bcd82c33a15c07 (diff) | |
parent | 3a3e9f2bb586e79a7931163f0191df61591b8017 (diff) | |
download | patches-746ac457cc2748152a3a39d4296972fa20f19741.tar patches-746ac457cc2748152a3a39d4296972fa20f19741.tar.gz |
Merge branch 'version-1.0.0'
Diffstat (limited to 'guix')
-rw-r--r-- | guix/scripts/build.scm | 2 | ||||
-rw-r--r-- | guix/scripts/processes.scm | 40 | ||||
-rwxr-xr-x | guix/scripts/substitute.scm | 2 | ||||
-rw-r--r-- | guix/self.scm | 2 | ||||
-rw-r--r-- | guix/store.scm | 2 |
5 files changed, 32 insertions, 16 deletions
diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm index ba143ad16b..8d5411ed43 100644 --- a/guix/scripts/build.scm +++ b/guix/scripts/build.scm @@ -65,7 +65,7 @@ (define %default-log-urls ;; Default base URLs for build logs. - '("http://ci.guix.info/log")) + '("http://ci.guix.gnu.org/log")) ;; XXX: The following procedure cannot be in (guix store) because of the ;; dependency on (guix derivations). diff --git a/guix/scripts/processes.scm b/guix/scripts/processes.scm index 6a2f603599..a2ab017490 100644 --- a/guix/scripts/processes.scm +++ b/guix/scripts/processes.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2018 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2018, 2019 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -103,9 +103,16 @@ processes." (let ((directory (string-append "/proc/" (number->string (process-id process)) "/fd"))) - (map (lambda (fd) - (readlink (string-append directory "/" fd))) - (or (scandir directory string->number) '())))) + (filter-map (lambda (fd) + ;; There's a TOCTTOU race here, hence the 'catch'. + (catch 'system-error + (lambda () + (readlink (string-append directory "/" fd))) + (lambda args + (if (= ENOENT (system-error-errno args)) + #f + (apply throw args))))) + (or (scandir directory string->number) '())))) ;; Daemon session. (define-record-type <daemon-session> @@ -151,15 +158,22 @@ active sessions, and the master 'guix-daemon' process." (= pid (process-parent-id process)))) processes)) - (values (map (lambda (process) - (match (process-command process) - ((argv0 (= string->number client) _ ...) - (let ((files (process-open-files process))) - (daemon-session process - (lookup-process client) - (lookup-children (process-id process)) - (filter lock-file? files)))))) - children) + (define (child-process->session process) + (match (process-command process) + ((argv0 (= string->number client) _ ...) + (let ((files (process-open-files process)) + (client (lookup-process client))) + ;; After a client has died, there's a window during which its + ;; corresponding 'guix-daemon' process is still alive, in which + ;; case 'lookup-process' returns #f. In that case ignore the + ;; session. + (and client + (daemon-session process client + (lookup-children + (process-id process)) + (filter lock-file? files))))))) + + (values (filter-map child-process->session children) master))) (define (daemon-session->recutils session port) diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm index 797a76db3f..135398ba48 100755 --- a/guix/scripts/substitute.scm +++ b/guix/scripts/substitute.scm @@ -1061,7 +1061,7 @@ found." (#f ;; This can only happen when this script is not invoked by the ;; daemon. - '("http://ci.guix.info")))) + '("http://ci.guix.gnu.org")))) (define substitute-urls ;; List of substitute URLs. diff --git a/guix/self.scm b/guix/self.scm index 68b87051e9..7098e4ea29 100644 --- a/guix/self.scm +++ b/guix/self.scm @@ -588,6 +588,8 @@ load path." ("share/guix/berlin.guixsd.org.pub" ,(file-append* source "/etc/substitutes/berlin.guixsd.org.pub")) + ("share/guix/ci.guix.gnu.org.pub" ;alias + ,(file-append* source "/etc/substitutes/berlin.guixsd.org.pub")) ("share/guix/ci.guix.info.pub" ;alias ,(file-append* source "/etc/substitutes/berlin.guixsd.org.pub"))))) diff --git a/guix/store.scm b/guix/store.scm index 1b485ab5fa..5c6e4e0ca6 100644 --- a/guix/store.scm +++ b/guix/store.scm @@ -746,7 +746,7 @@ encoding conversion errors." (map (if (false-if-exception (resolve-interface '(gnutls))) (cut string-append "https://" <>) (cut string-append "http://" <>)) - '("ci.guix.info"))) + '("ci.guix.gnu.org"))) (define* (set-build-options server #:key keep-failed? keep-going? fallback? |