From d06d54e338064d84a59c5811587b930799aab208 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 12 Jan 2018 22:20:30 +0100 Subject: offload: Fix regression in file retrieval. This fixes a regression in 'retrieve-files*' introduced in 896fec476f728183b331cbb6e2afb891207b4205, whereby (guix scripts offload) would not read the initial sexp now sent by the remote host via 'store-export-channel'. This would effectively prevent file retrieval entirely when offloading. * guix/ssh.scm (retrieve-files*): New procedure, like former 'retrieve-files' but with an extra #:import parameter. (retrieve-files): Rewrite in terms of 'retrieve-files*'. (file-retrieval-port): Make private. * guix/scripts/offload.scm (transfer-and-offload): Pass #:import to 'retrieve-files*'. (retrieve-files*): Remove. --- guix/scripts/offload.scm | 27 ++++++++++----------------- guix/ssh.scm | 36 +++++++++++++++++++++++++----------- 2 files changed, 35 insertions(+), 28 deletions(-) (limited to 'guix') diff --git a/guix/scripts/offload.scm b/guix/scripts/offload.scm index 7e114fa2c9..25efe90e79 100644 --- a/guix/scripts/offload.scm +++ b/guix/scripts/offload.scm @@ -358,26 +358,19 @@ MACHINE." (parameterize ((current-build-output-port (build-log-port))) (build-derivations store (list drv)))) - (retrieve-files* outputs store) + (retrieve-files* outputs store + + ;; We cannot use the 'import-paths' RPC here because we + ;; already hold the locks for FILES. + #:import + (lambda (port) + (restore-file-set port + #:log-port (current-error-port) + #:lock? #f))) + (format (current-error-port) "done with offloaded '~a'~%" (derivation-file-name drv))) -(define (retrieve-files* files remote) - "Retrieve FILES from REMOTE and import them using 'restore-file-set'." - (let-values (((port count) - (file-retrieval-port files remote))) - (format #t (N_ "retrieving ~a store item from '~a'...~%" - "retrieving ~a store items from '~a'...~%" count) - count (remote-store-host remote)) - - ;; We cannot use the 'import-paths' RPC here because we already - ;; hold the locks for FILES. - (let ((result (restore-file-set port - #:log-port (current-error-port) - #:lock? #f))) - (close-port port) - result))) - ;;; ;;; Scheduling. diff --git a/guix/ssh.scm b/guix/ssh.scm index cb560c0e9c..21c452f28c 100644 --- a/guix/ssh.scm +++ b/guix/ssh.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2016, 2017 Ludovic Courtès +;;; Copyright © 2016, 2017, 2018 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -29,6 +29,7 @@ #:use-module (ssh dist) #:use-module (ssh dist node) #:use-module (srfi srfi-11) + #:use-module (srfi srfi-26) #:use-module (srfi srfi-34) #:use-module (srfi srfi-35) #:use-module (ice-9 match) @@ -38,9 +39,8 @@ connect-to-remote-daemon send-files retrieve-files - remote-store-host - - file-retrieval-port)) + retrieve-files* + remote-store-host)) ;;; Commentary: ;;; @@ -339,10 +339,11 @@ to the length of FILES.)" (&message (message (format #f fmt args ...)))))))) -(define* (retrieve-files local files remote - #:key recursive? (log-port (current-error-port))) - "Retrieve FILES from REMOTE and import them using the 'import-paths' RPC on -LOCAL. When RECURSIVE? is true, retrieve the closure of FILES." +(define* (retrieve-files* files remote + #:key recursive? (log-port (current-error-port)) + (import (const #f))) + "Pass IMPORT an input port from which to read the sequence of FILES coming +from REMOTE. When RECURSIVE? is true, retrieve the closure of FILES." (let-values (((port count) (file-retrieval-port files remote #:recursive? recursive?))) @@ -352,9 +353,12 @@ LOCAL. When RECURSIVE? is true, retrieve the closure of FILES." "retrieving ~a store items from '~a'...~%" count) count (remote-store-host remote)) - (let ((result (import-paths local port))) - (close-port port) - result)) + (dynamic-wind + (const #t) + (lambda () + (import port)) + (lambda () + (close-port port)))) ((? eof-object?) (raise-error (G_ "failed to start Guile on remote host '~A': exit code ~A") (remote-store-host remote) @@ -386,4 +390,14 @@ check.") (raise-error (G_ "failed to retrieve store items from '~a'") (remote-store-host remote)))))) +(define* (retrieve-files local files remote + #:key recursive? (log-port (current-error-port))) + "Retrieve FILES from REMOTE and import them using the 'import-paths' RPC on +LOCAL. When RECURSIVE? is true, retrieve the closure of FILES." + (retrieve-files* files remote + #:recursive? recursive? + #:log-port log-port + #:import (lambda (port) + (import-paths local port)))) + ;;; ssh.scm ends here -- cgit v1.2.3 From 0e3c8528af1b36687a8cfe56a09c452b6ff3508d Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 12 Jan 2018 22:32:52 +0100 Subject: ssh: 'retrieve-files' now only retrieves what's missing. * guix/ssh.scm (retrieve-files): Remove the subset of FILES that is valid in LOCAL. (store-export-channel): Add comment. --- guix/ssh.scm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'guix') diff --git a/guix/ssh.scm b/guix/ssh.scm index 21c452f28c..ac8569298b 100644 --- a/guix/ssh.scm +++ b/guix/ssh.scm @@ -28,6 +28,7 @@ #:use-module (ssh session) #:use-module (ssh dist) #:use-module (ssh dist node) + #:use-module (srfi srfi-1) #:use-module (srfi srfi-11) #:use-module (srfi srfi-26) #:use-module (srfi srfi-34) @@ -235,6 +236,10 @@ be read. When RECURSIVE? is true, the closure of FILES is exported." (write `(invalid-items ,invalid)) (exit 1)) + ;; TODO: When RECURSIVE? is true, we could send the list of store + ;; items in the closure so that the other end can filter out + ;; those it already has. + (write '(exporting)) ;we're ready (force-output) @@ -394,7 +399,8 @@ check.") #:key recursive? (log-port (current-error-port))) "Retrieve FILES from REMOTE and import them using the 'import-paths' RPC on LOCAL. When RECURSIVE? is true, retrieve the closure of FILES." - (retrieve-files* files remote + (retrieve-files* (remove (cut valid-path? local <>) files) + remote #:recursive? recursive? #:log-port log-port #:import (lambda (port) -- cgit v1.2.3 From 5a5e34e3588e863de0028523ada61041e78cf8c6 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 12 Jan 2018 22:51:41 +0100 Subject: offload: 'test' gracefully handles 'node-repl-error'. Fixes . Reported by Ricardo Wurmus . * guix/scripts/offload.scm (assert-node-has-guix): Catch 'node-repl-error' and call 'leave'. --- guix/scripts/offload.scm | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) (limited to 'guix') diff --git a/guix/scripts/offload.scm b/guix/scripts/offload.scm index 25efe90e79..aaad992289 100644 --- a/guix/scripts/offload.scm +++ b/guix/scripts/offload.scm @@ -551,18 +551,23 @@ slot (which must later be released with 'release-build-slot'), or #f and #f." (define (assert-node-has-guix node name) "Bail out if NODE lacks the (guix) module, or if its daemon is not running." - (match (node-eval node - '(begin - (use-modules (guix)) - (with-store store - (add-text-to-store store "test" - "Hello, build machine!")))) - ((? string? str) - (info (G_ "Guix is usable on '~a' (test returned ~s)~%") - name str)) - (x - (leave (G_ "failed to use Guix module on '~a' (test returned ~s)~%") - name x)))) + (catch 'node-repl-error + (lambda () + (match (node-eval node + '(begin + (use-modules (guix)) + (with-store store + (add-text-to-store store "test" + "Hello, build machine!")))) + ((? string? str) + (info (G_ "Guix is usable on '~a' (test returned ~s)~%") + name str)) + (x + (leave (G_ "failed to use Guix module on '~a' (test returned ~s)~%") + name x)))) + (lambda (key . args) + (leave (G_ "remove evaluation on '~a' failed:~{ ~s~}~%") + args)))) (define %random-state (delay -- cgit v1.2.3 From 4eb0f9ae05a9bf20fb91c49b39bebc687265c5e5 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 12 Jan 2018 23:16:53 +0100 Subject: offload: 'test' reports Guile and module errors more nicely. Fixes . Reported by Myles English . * guix/ssh.scm (retrieve-files*): Move error reporting to... (report-guile-error, report-module-error): ... here. New procedures. * guix/scripts/offload.scm (assert-node-repl): Use 'report-guile-error'. (assert-node-has-guix): Explicitly check for 'use-modules' first. Use 'report-module-error'. --- guix/scripts/offload.scm | 16 +++++++++++++--- guix/ssh.scm | 42 +++++++++++++++++++++++++++--------------- 2 files changed, 40 insertions(+), 18 deletions(-) (limited to 'guix') diff --git a/guix/scripts/offload.scm b/guix/scripts/offload.scm index aaad992289..d011520885 100644 --- a/guix/scripts/offload.scm +++ b/guix/scripts/offload.scm @@ -542,8 +542,7 @@ slot (which must later be released with 'release-build-slot'), or #f and #f." "Bail out if NODE is not running Guile." (match (node-guile-version node) (#f - (leave (G_ "Guile could not be started on '~a'~%") - name)) + (report-guile-error name)) ((? string? version) ;; Note: The version string already contains the word "Guile". (info (G_ "'~a' is running ~a~%") @@ -551,6 +550,17 @@ slot (which must later be released with 'release-build-slot'), or #f and #f." (define (assert-node-has-guix node name) "Bail out if NODE lacks the (guix) module, or if its daemon is not running." + (catch 'node-repl-error + (lambda () + (match (node-eval node + '(begin + (use-modules (guix)) + (and add-text-to-store 'alright))) + ('alright #t) + (_ (report-module-error name)))) + (lambda (key . args) + (report-module-error name))) + (catch 'node-repl-error (lambda () (match (node-eval node @@ -563,7 +573,7 @@ slot (which must later be released with 'release-build-slot'), or #f and #f." (info (G_ "Guix is usable on '~a' (test returned ~s)~%") name str)) (x - (leave (G_ "failed to use Guix module on '~a' (test returned ~s)~%") + (leave (G_ "failed to talk to guix-daemon on '~a' (test returned ~s)~%") name x)))) (lambda (key . args) (leave (G_ "remove evaluation on '~a' failed:~{ ~s~}~%") diff --git a/guix/ssh.scm b/guix/ssh.scm index ac8569298b..4dcc6d38bb 100644 --- a/guix/ssh.scm +++ b/guix/ssh.scm @@ -41,7 +41,10 @@ send-files retrieve-files retrieve-files* - remote-store-host)) + remote-store-host + + report-guile-error + report-module-error)) ;;; Commentary: ;;; @@ -365,21 +368,9 @@ from REMOTE. When RECURSIVE? is true, retrieve the closure of FILES." (lambda () (close-port port)))) ((? eof-object?) - (raise-error (G_ "failed to start Guile on remote host '~A': exit code ~A") - (remote-store-host remote) - (channel-get-exit-status port) - (=> (G_ "Make sure @command{guile} can be found in -@code{$PATH} on the remote host. Run @command{ssh ~A guile --version} to -check.") - (remote-store-host remote)))) + (report-guile-error (remote-store-host remote))) (('module-error . _) - ;; TRANSLATORS: Leave "Guile" untranslated. - (raise-error (G_ "Guile modules not found on remote host '~A'") - (remote-store-host remote) - (=> (G_ "Make sure @code{GUILE_LOAD_PATH} includes Guix' -own module directory. Run @command{ssh ~A env | grep GUILE_LOAD_PATH} to -check.") - (remote-store-host remote)))) + (report-module-error (remote-store-host remote))) (('connection-error file code . _) (raise-error (G_ "failed to connect to '~A' on remote host '~A': ~a") file (remote-store-host remote) (strerror code))) @@ -406,4 +397,25 @@ LOCAL. When RECURSIVE? is true, retrieve the closure of FILES." #:import (lambda (port) (import-paths local port)))) + +;;; +;;; Error reporting. +;;; + +(define (report-guile-error host) + (raise-error (G_ "failed to start Guile on remote host '~A'") host + (=> (G_ "Make sure @command{guile} can be found in +@code{$PATH} on the remote host. Run @command{ssh ~A guile --version} to +check.") + host))) + +(define (report-module-error host) + "Report an error about missing Guix modules on HOST." + ;; TRANSLATORS: Leave "Guile" untranslated. + (raise-error (G_ "Guile modules not found on remote host '~A'") host + (=> (G_ "Make sure @code{GUILE_LOAD_PATH} includes Guix' +own module directory. Run @command{ssh ~A env | grep GUILE_LOAD_PATH} to +check.") + host))) + ;;; ssh.scm ends here -- cgit v1.2.3 From 0dcf675c56a4649ccef657e78849e91f9f9b4c0a Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 12 Jan 2018 23:32:25 +0100 Subject: ssh: Switch back to 'get-bytevector-some'. This mostly reverts 17af5d51de7c40756a4a39d336f81681de2ba447. Suggested by Andy Wingo . * guix/ssh.scm (remote-daemon-channel)[redirect]: Remove 'read!' FFI hack. Use buffered ports. --- guix/ssh.scm | 40 +++++++++++++++++----------------------- 1 file changed, 17 insertions(+), 23 deletions(-) (limited to 'guix') diff --git a/guix/ssh.scm b/guix/ssh.scm index 4dcc6d38bb..5e442024bc 100644 --- a/guix/ssh.scm +++ b/guix/ssh.scm @@ -106,42 +106,36 @@ Throw an error on failure." ;; hack. `(begin (use-modules (ice-9 match) (rnrs io ports) - (rnrs bytevectors) (system foreign)) - - (define read! - ;; XXX: We would use 'get-bytevector-some' but it always returns a - ;; single byte in Guile <= 2.2.3---see . - ;; This procedure works around it. - (let ((proc (pointer->procedure int - (dynamic-func "read" (dynamic-link)) - (list int '* size_t)))) - (lambda (port bv) - (proc (fileno port) (bytevector->pointer bv) - (bytevector-length bv))))) + (rnrs bytevectors)) (let ((sock (socket AF_UNIX SOCK_STREAM 0)) (stdin (current-input-port)) - (stdout (current-output-port)) - (buffer (make-bytevector 65536))) - (setvbuf stdin _IONBF) + (stdout (current-output-port))) (setvbuf stdout _IONBF) + + ;; Use buffered ports so that 'get-bytevector-some' returns up to the + ;; whole buffer like read(2) would--see . + (setvbuf stdin _IOFBF 65536) + (setvbuf sock _IOFBF 65536) + (connect sock AF_UNIX ,socket-name) (let loop () (match (select (list stdin sock) '() '()) ((reads () ()) (when (memq stdin reads) - (match (read! stdin buffer) - ((? zero?) ;EOF + (match (get-bytevector-some stdin) + ((? eof-object?) (primitive-exit 0)) - (count - (put-bytevector sock buffer 0 count)))) + (bv + (put-bytevector sock bv) + (force-output sock)))) (when (memq sock reads) - (match (read! sock buffer) - ((? zero?) ;EOF + (match (get-bytevector-some sock) + ((? eof-object?) (primitive-exit 0)) - (count - (put-bytevector stdout buffer 0 count)))) + (bv + (put-bytevector stdout bv)))) (loop)) (_ (primitive-exit 1))))))) -- cgit v1.2.3 From 3cb3fa6747251c6beac226d0233063524bd5f4d6 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Sun, 17 Dec 2017 08:25:44 +0000 Subject: guix: build: ruby-build-system: Install to the vendor directory * guix/build/ruby-build-system.scm (install): Install gems to the vendor directory, rather than the GEM_HOME. The vendor directory does not include the version of ruby used to install the gem in the path, which makes it easier to add it to the GEM_PATH for all versions of ruby to use. (gem-home): Remove procedure. * gnu/packages/ruby.scm (ruby, ruby-2.1)[native-search-paths]: Switch to lib/ruby/vendor_ruby. (ruby-1.8)[native-search-paths]: Remove native-search-paths. (gem-directory): Remove procedure. (ruby-ansi, ruby-ae)[arguments]: Remove use of gem-directory. (ruby-metaclass, ruby-instantiator, ruby-introspection, ruby-mocha, ruby-nokogiri, ruby-minitest-tu-shim, ruby-redcloth)[arguments]: Remove use of gem-home. (ruby-git, ruby-httpclient)[arguments]: Remove use of GEM_HOME. * gnu/packages/databases.scm (es-dump-restore)[arguments]: Remove use of GEM_HOME. --- gnu/packages/databases.scm | 8 ++--- gnu/packages/ruby.scm | 78 +++++++++++++++------------------------- guix/build/ruby-build-system.scm | 51 +++++++++++++------------- 3 files changed, 56 insertions(+), 81 deletions(-) (limited to 'guix') diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index 86beb762bb..d7bcce44e7 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -298,10 +298,10 @@ SQL, Key/Value, XML/XQuery or Java Object storage for their data model.") (lambda* (#:key outputs #:allow-other-keys) (wrap-program (string-append (assoc-ref outputs "out") "/bin/es_dump_restore") - `("GEM_PATH" ":" prefix (,(string-append - (getenv "GEM_PATH") - ":" - (getenv "GEM_HOME"))))) + `("GEM_PATH" ":" prefix (,(getenv "GEM_PATH") + ,(string-append + (assoc-ref outputs "out") + "/lib/ruby/vendor_ruby")))) #t))))) (propagated-inputs `(("ruby-httpclient" ,ruby-httpclient) diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index 2741bd6b7d..ab3c077036 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -96,9 +96,7 @@ (native-search-paths (list (search-path-specification (variable "GEM_PATH") - (files (list (string-append "lib/ruby/gems/" - (version-major+minor version) - ".0")))))) + (files (list (string-append "lib/ruby/vendor_ruby")))))) (synopsis "Programming language interpreter") (description "Ruby is a dynamic object-oriented programming language with a focus on simplicity and productivity.") @@ -182,13 +180,7 @@ a focus on simplicity and productivity.") "lib/mkmf.rb" "process.c") (("/bin/sh") (which "sh"))) - #t))))) - (native-search-paths - (list (search-path-specification - (variable "GEM_PATH") - (files (list (string-append "lib/ruby/gems/" - (version-major+minor version) - ".0")))))))) + #t))))))) (define-public ruby-1.8 (package (inherit ruby) @@ -218,11 +210,6 @@ a focus on simplicity and productivity.") (("/bin/sh") (which "sh"))) #t))))))) -(define (gem-directory ruby-version) - "Return the relative gem install directory for RUBY-VERSION." - (string-append "/lib/ruby/gems/" (version-major+minor ruby-version) - ".0/gems")) - (define-public ruby-highline (package (name "ruby-highline") @@ -1322,13 +1309,11 @@ It allows writing tests, checking results and automated testing in Ruby.") (modify-phases %standard-phases (add-after 'unpack 'add-test-unit-to-search-path (lambda* (#:key inputs #:allow-other-keys) - (let* ((test-unit (assoc-ref inputs "ruby-test-unit")) - (test-unit-home (gem-home test-unit - ,(package-version ruby)))) + (let* ((test-unit (assoc-ref inputs "ruby-test-unit"))) (substitute* "Rakefile" (("t\\.libs << \"test\"" line) (string-append line "; t.libs << \"" - test-unit-home + test-unit "/lib/ruby/vendor_ruby" "/gems/test-unit-" ,(package-version ruby-test-unit) "/lib\"")))) @@ -1387,13 +1372,11 @@ as a base class when writing classes that depend upon (modify-phases %standard-phases (add-after 'unpack 'add-test-unit-to-search-path (lambda* (#:key inputs #:allow-other-keys) - (let* ((test-unit (assoc-ref inputs "ruby-test-unit")) - (test-unit-home (gem-home test-unit ,(package-version - ruby)))) + (let* ((test-unit (assoc-ref inputs "ruby-test-unit"))) (substitute* "Rakefile" (("t\\.libs << \"test\"" line) (string-append line "; t.libs << \"" - test-unit-home + test-unit "/lib/ruby/vendor_ruby" "/gems/test-unit-" ,(package-version ruby-test-unit) "/lib\"")))) @@ -1426,13 +1409,11 @@ knowing anything about the constructor.") (modify-phases %standard-phases (add-after 'unpack 'add-test-unit-to-search-path (lambda* (#:key inputs #:allow-other-keys) - (let* ((test-unit (assoc-ref inputs "ruby-test-unit")) - (test-unit-home (gem-home test-unit ,(package-version - ruby)))) + (let* ((test-unit (assoc-ref inputs "ruby-test-unit"))) (substitute* "Rakefile" (("t\\.libs << \"test\"" line) (string-append line "; t.libs << \"" - test-unit-home + test-unit "/lib/ruby/vendor_ruby" "/gems/test-unit-" ,(package-version ruby-test-unit) "/lib\"")))) @@ -1499,13 +1480,11 @@ conversion to (X)HTML.") (modify-phases %standard-phases (add-after 'unpack 'add-test-unit-to-search-path (lambda* (#:key inputs #:allow-other-keys) - (let* ((test-unit (assoc-ref inputs "ruby-test-unit")) - (test-unit-home (gem-home test-unit - ,(package-version ruby)))) + (let* ((test-unit (assoc-ref inputs "ruby-test-unit"))) (substitute* "Rakefile" (("t\\.libs << 'test'" line) (string-append line "; t.libs << \"" - test-unit-home + test-unit "/lib/ruby/vendor_ruby" "/gems/test-unit-" ,(package-version ruby-test-unit) "/lib\"")))) @@ -1870,9 +1849,10 @@ run as a daemon and to be controlled by simple start/stop/restart commands.") ;; store. (let ((git (string-append (assoc-ref inputs "git") "/bin/git")) - (config (string-append (getenv "GEM_HOME") - "/gems/git-" ,version - "/lib/git/config.rb"))) + (config (string-append + (assoc-ref outputs "out") + "/lib/ruby/vendor_ruby/gems/git-" + ,version "/lib/git/config.rb"))) (substitute* (list config) (("'git'") (string-append "'" git "'"))) @@ -2057,13 +2037,11 @@ to reproduce user environments.") ;; 'pkg-config' is not included in the GEM_PATH during ;; installation, so we add it directly to the load path. (lambda* (#:key inputs #:allow-other-keys) - (let* ((pkg-config (assoc-ref inputs "ruby-pkg-config")) - (pkg-config-home (gem-home pkg-config - ,(package-version ruby)))) + (let* ((pkg-config (assoc-ref inputs "ruby-pkg-config"))) (substitute* "ext/nokogiri/extconf.rb" (("gem 'pkg-config'.*") (string-append "$:.unshift '" - pkg-config-home + pkg-config "/lib/ruby/vendor_ruby" "/gems/pkg-config-" ,(package-version ruby-pkg-config) "/lib'\n")))) @@ -2470,13 +2448,11 @@ development of Ruby gems.") (modify-phases %standard-phases (add-after 'unpack 'fix-test-include-path (lambda* (#:key inputs #:allow-other-keys) - (let* ((minitest (assoc-ref inputs "ruby-minitest-4")) - (minitest-home (gem-home minitest - ,(package-version ruby)))) + (let* ((minitest (assoc-ref inputs "ruby-minitest-4"))) (substitute* "Rakefile" (("Hoe\\.add_include_dirs .*") (string-append "Hoe.add_include_dirs \"" - minitest-home + minitest "/lib/ruby/vendor_ruby" "/gems/minitest-" ,(package-version ruby-minitest-4) "/lib" "\"")))) @@ -2883,7 +2859,9 @@ alternative to Marshal for Object serialization. ") (lambda* (#:key outputs #:allow-other-keys) (wrap-program (string-append (assoc-ref outputs "out") "/bin/redcloth") - `("GEM_HOME" ":" prefix (,(getenv "GEM_HOME")))) + `("GEM_PATH" ":" prefix (,(string-append + (assoc-ref outputs "out") + "/lib/ruby/vendor_ruby")))) #t))))) (native-inputs `(("bundler" ,bundler) @@ -3737,7 +3715,7 @@ It has built-in support for the legacy @code{cookies.txt} and (lambda* (#:key outputs #:allow-other-keys) (wrap-program (string-append (assoc-ref outputs "out") "/bin/httpclient") - `("GEM_HOME" ":" prefix (,(getenv "GEM_HOME")))) + `("GEM_PATH" ":" prefix (,(getenv "GEM_PATH")))) #t))))) (native-inputs `(("ruby-rack" ,ruby-rack))) @@ -3780,9 +3758,9 @@ requests either using arguments or with an interactive prompt.") (add-before 'validate-runpath 'replace-broken-symlink (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) - (file (string-append out - ,(gem-directory (package-version ruby)) - "/ansi-" ,version "/lib/ansi.yml"))) + (file (string-append + out "/lib/ruby/vendor_ruby/gems/ansi-" + ,version "/lib/ansi.yml"))) ;; XXX: This symlink is broken since ruby 2.4. ;; https://lists.gnu.org/archive/html/guix-devel/2017-06/msg00034.html (delete-file file) @@ -3980,9 +3958,9 @@ requirement specifications systems like Cucumber.") (add-before 'validate-runpath 'replace-broken-symlink (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) - (file (string-append out - ,(gem-directory (package-version ruby)) - "/ae-" ,version "/lib/ae.yml"))) + (file (string-append + out "/lib/ruby/vendor_ruby/gems/ae-" + ,version "/lib/ae.yml"))) ;; XXX: This symlink is broken since ruby 2.4. ;; https://lists.gnu.org/archive/html/guix-devel/2017-06/msg00034.html (delete-file file) diff --git a/guix/build/ruby-build-system.scm b/guix/build/ruby-build-system.scm index c2d2766279..e3a8111514 100644 --- a/guix/build/ruby-build-system.scm +++ b/guix/build/ruby-build-system.scm @@ -27,8 +27,7 @@ #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) #:export (%standard-phases - ruby-build - gem-home)) + ruby-build)) ;; Commentary: ;; @@ -129,40 +128,48 @@ GEM-FLAGS are passed to the 'gem' invokation, if present." (assoc-ref inputs "ruby")) 1)) (out (assoc-ref outputs "out")) - (gem-home (string-append out "/lib/ruby/gems/" ruby-version ".0")) + (vendor-dir (string-append out "/lib/ruby/vendor_ruby")) (gem-file (first-matching-file "\\.gem$")) (gem-file-basename (basename gem-file)) (gem-name (substring gem-file-basename 0 - (- (string-length gem-file-basename) 4))) - (gem-directory (string-append gem-home "/gems/" gem-name))) - (setenv "GEM_HOME" gem-home) - (mkdir-p gem-home) - (and (apply system* "gem" "install" gem-file - "--local" "--ignore-dependencies" - ;; Executables should go into /bin, not /lib/ruby/gems. - "--bindir" (string-append out "/bin") - gem-flags) + (- (string-length gem-file-basename) 4)))) + (setenv "GEM_VENDOR" vendor-dir) + (and (let ((install-succeeded? + (zero? + (apply system* "gem" "install" gem-file + "--local" "--ignore-dependencies" "--vendor" + ;; Executables should go into /bin, not + ;; /lib/ruby/gems. + "--bindir" (string-append out "/bin") + gem-flags)))) + (or install-succeeded? + (begin + (simple-format #t "installation failed\n") + (let ((failed-output-dir (string-append (getcwd) "/out"))) + (mkdir failed-output-dir) + (copy-recursively out failed-output-dir)) + #f))) (begin ;; Remove the cached gem file as this is unnecessary and contains ;; timestamped files rendering builds not reproducible. - (let ((cached-gem (string-append gem-home "/cache/" gem-file))) + (let ((cached-gem (string-append vendor-dir "/cache/" gem-file))) (log-file-deletion cached-gem) (delete-file cached-gem)) ;; For gems with native extensions, several Makefile-related files ;; are created that contain timestamps or other elements making ;; them not reproducible. They are unnecessary so we remove them. - (if (file-exists? (string-append gem-directory "/ext")) + (if (file-exists? (string-append vendor-dir "/ext")) (begin (for-each (lambda (file) (log-file-deletion file) (delete-file file)) (append - (find-files (string-append gem-home "/doc") + (find-files (string-append vendor-dir "/doc") "page-Makefile.ri") - (find-files (string-append gem-home "/extensions") + (find-files (string-append vendor-dir "/extensions") "gem_make.out") - (find-files (string-append gem-directory "/ext") + (find-files (string-append vendor-dir "/ext") "Makefile"))))) #t)))) @@ -182,13 +189,3 @@ GEM-FLAGS are passed to the 'gem' invokation, if present." (define* (ruby-build #:key inputs (phases %standard-phases) #:allow-other-keys #:rest args) (apply gnu:gnu-build #:inputs inputs #:phases phases args)) - -(define (gem-home store-path ruby-version) - "Return a string to the gem home directory in the store given a STORE-PATH -and the RUBY-VERSION used to build that ruby package" - (string-append - store-path - "/lib/ruby/gems/" - (regexp-substitute #f - (string-match "^[0-9]+\\.[0-9]+" ruby-version) - 0 ".0"))) -- cgit v1.2.3 From d9df4bf055f2bef8c2c428db34c5fa056bdeba73 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Tue, 10 Oct 2017 07:39:12 +0100 Subject: ruby-build-system: Add wrap-ruby-program. A modified copy of wrap-program from (guix build utils). The wrap-program procedure doesn't work well for Ruby scripts, as it breaks using the -S flag with ruby to execute the script, as when -S is passed to ruby, it expects the script on the PATH to use ruby in the shebang, and not bash. Therefore, to wrap the program, but keep the shebang as ruby, wrap it with a ruby script instead. wrap-ruby-program uses .real/foo rather than .foo-real, as this might be neater. This procedure also includes a call to Gem.clear_paths to make it possible to set the GEM_PATH through this method, and for it to take effect. * gnu/build/ruby-build-system.scm (wrap-ruby-program): New procedure. --- guix/build/ruby-build-system.scm | 103 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) (limited to 'guix') diff --git a/guix/build/ruby-build-system.scm b/guix/build/ruby-build-system.scm index e3a8111514..a28c47db9d 100644 --- a/guix/build/ruby-build-system.scm +++ b/guix/build/ruby-build-system.scm @@ -173,6 +173,109 @@ GEM-FLAGS are passed to the 'gem' invokation, if present." "Makefile"))))) #t)))) +(define* (wrap-ruby-program prog #:key (gem-clear-paths #t) #:rest vars) + "Make a wrapper for PROG. VARS should look like this: + + '(VARIABLE DELIMITER POSITION LIST-OF-DIRECTORIES) + +where DELIMITER is optional. ':' will be used if DELIMITER is not given. + +For example, this command: + + (wrap-ruby-program \"foo\" + '(\"PATH\" \":\" = (\"/gnu/.../bar/bin\")) + '(\"CERT_PATH\" suffix (\"/gnu/.../baz/certs\" + \"/qux/certs\"))) + +will copy 'foo' to '.real/fool' and create the file 'foo' with the following +contents: + + #!location/of/bin/ruby + ENV['PATH'] = \"/gnu/.../bar/bin\" + ENV['CERT_PATH'] = (ENV.key?('CERT_PATH') ? (ENV['CERT_PATH'] + ':') : '') + '/gnu/.../baz/certs:/qux/certs' + load location/of/.real/foo + +This is useful for scripts that expect particular programs to be in $PATH, for +programs that expect particular gems to be in the GEM_PATH. + +This is preferable to wrap-program, which uses a bash script, as this prevents +ruby scripts from being executed with @command{ruby -S ...}. + +If PROG has previously been wrapped by 'wrap-ruby-program', the wrapper is +extended with definitions for VARS." + (define wrapped-file + (string-append (dirname prog) "/.real/" (basename prog))) + + (define already-wrapped? + (file-exists? wrapped-file)) + + (define (last-line port) + ;; Return the last line read from PORT and leave PORT's cursor right + ;; before it. + (let loop ((previous-line-offset 0) + (previous-line "") + (position (seek port 0 SEEK_CUR))) + (match (read-line port 'concat) + ((? eof-object?) + (seek port previous-line-offset SEEK_SET) + previous-line) + ((? string? line) + (loop position line (+ (string-length line) position)))))) + + (define (export-variable lst) + ;; Return a string that exports an environment variable. + (match lst + ((var sep '= rest) + (format #f "ENV['~a'] = '~a'" + var (string-join rest sep))) + ((var sep 'prefix rest) + (format #f "ENV['~a'] = '~a' + (ENV.key?('~a') ? ('~a' + ENV['~a']) : '')" + var (string-join rest sep) var sep var)) + ((var sep 'suffix rest) + (format #f "ENV['~a'] = (ENV.key?('~a') ? (ENV['~a'] + '~a') : '') + '~a'" + var var var sep (string-join rest sep))) + ((var '= rest) + (format #f "ENV['~a'] = '~a'" + var (string-join rest ":"))) + ((var 'prefix rest) + (format #f "ENV['~a'] = '~a' + (ENV.key?('~a') ? (':' + ENV['~a']) : '')" + var (string-join rest ":") var var)) + ((var 'suffix rest) + (format #f "ENV['~a'] = (ENV.key?('~a') ? (ENV['~a'] + ':') : '') + '~a'" + var var var (string-join rest ":"))))) + + (if already-wrapped? + + ;; PROG is already a wrapper: add the new "export VAR=VALUE" lines just + ;; before the last line. + (let* ((port (open-file prog "r+")) + (last (last-line port))) + (for-each (lambda (var) + (display (export-variable var) port) + (newline port)) + vars) + (display last port) + (close-port port)) + + ;; PROG is not wrapped yet: create a shell script that sets VARS. + (let ((prog-tmp (string-append wrapped-file "-tmp"))) + (mkdir-p (dirname prog-tmp)) + (link prog wrapped-file) + + (call-with-output-file prog-tmp + (lambda (port) + (format port + "#!~a~%~a~%~a~%load '~a'~%" + (which "ruby") + (string-join (map export-variable vars) "\n") + ;; This ensures that if the GEM_PATH has been changed, + ;; then that change will be noticed. + (if gem-clear-paths "Gem.clear_paths" "") + (canonicalize-path wrapped-file)))) + + (chmod prog-tmp #o755) + (rename-file prog-tmp prog)))) + (define (log-file-deletion file) (display (string-append "deleting '" file "' for reproducibility\n"))) -- cgit v1.2.3 From 2c2ec3d04a36914390c7617bb9971fd840b40646 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Tue, 10 Oct 2017 07:41:19 +0100 Subject: ruby-build-system: Add a new wrap phase. Wrap files in bin/ and sbin/ with the location of the gem itself and the location of any other gems in use (GEM_PATH). This ensures that the bin files will run with the right environment when executed. It does however mean that native-inputs will also get wrapped up in any binaries, which is not good, as it increases the size of the closure, and risks this code being used at runtime. * guix/build/ruby-build-system.scm (wrap): New procedure. (%standard-phases): Add the wrap phase. --- guix/build/ruby-build-system.scm | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) (limited to 'guix') diff --git a/guix/build/ruby-build-system.scm b/guix/build/ruby-build-system.scm index a28c47db9d..d78986da10 100644 --- a/guix/build/ruby-build-system.scm +++ b/guix/build/ruby-build-system.scm @@ -21,6 +21,7 @@ (define-module (guix build ruby-build-system) #:use-module ((guix build gnu-build-system) #:prefix gnu:) #:use-module (guix build utils) + #:use-module (ice-9 ftw) #:use-module (ice-9 match) #:use-module (ice-9 popen) #:use-module (ice-9 regex) @@ -276,6 +277,31 @@ extended with definitions for VARS." (chmod prog-tmp #o755) (rename-file prog-tmp prog)))) +(define* (wrap #:key inputs outputs #:allow-other-keys) + (define (list-of-files dir) + (map (cut string-append dir "/" <>) + (or (scandir dir (lambda (f) + (let ((s (stat (string-append dir "/" f)))) + (eq? 'regular (stat:type s))))) + '()))) + + (define bindirs + (append-map (match-lambda + ((_ . dir) + (list (string-append dir "/bin") + (string-append dir "/sbin")))) + outputs)) + + (let* ((out (assoc-ref outputs "out")) + (var `("GEM_PATH" prefix + (,(string-append out "/lib/ruby/vendor_ruby") + ,(getenv "GEM_PATH"))))) + (for-each (lambda (dir) + (let ((files (list-of-files dir))) + (for-each (cut wrap-ruby-program <> var) + files))) + bindirs))) + (define (log-file-deletion file) (display (string-append "deleting '" file "' for reproducibility\n"))) @@ -287,7 +313,8 @@ extended with definitions for VARS." (add-after 'extract-gemspec 'replace-git-ls-files replace-git-ls-files) (replace 'build build) (replace 'check check) - (replace 'install install))) + (replace 'install install) + (add-after 'install 'wrap wrap))) (define* (ruby-build #:key inputs (phases %standard-phases) #:allow-other-keys #:rest args) -- cgit v1.2.3 From b640370d8290ace2507c84e61fe99811effaf7da Mon Sep 17 00:00:00 2001 From: Danny Milosavljevic Date: Mon, 15 Jan 2018 16:56:03 +0100 Subject: ruby-build-system: Fix build error. * gnu/build/ruby-build-system.scm: Import (ice-9 rdelim). Follow-up to d9df4bf055f2bef8c2c428db34c5fa056bdeba73. --- guix/build/ruby-build-system.scm | 1 + 1 file changed, 1 insertion(+) (limited to 'guix') diff --git a/guix/build/ruby-build-system.scm b/guix/build/ruby-build-system.scm index d78986da10..09ae2390a5 100644 --- a/guix/build/ruby-build-system.scm +++ b/guix/build/ruby-build-system.scm @@ -24,6 +24,7 @@ #:use-module (ice-9 ftw) #:use-module (ice-9 match) #:use-module (ice-9 popen) + #:use-module (ice-9 rdelim) #:use-module (ice-9 regex) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) -- cgit v1.2.3 From 309121a113aa92f26085e37547715443d3bfee56 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 14 Jan 2018 23:09:28 +0100 Subject: offload: Look at machine loads for the past minute. Previously we were looking at the load of the past 5 minutes, which means that, after a build, we could end up waiting for 5 minutes for that metric to be low enough. * guix/scripts/offload.scm (machine-load): Compute RAW based on ONE, not FIVE. --- guix/scripts/offload.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guix') diff --git a/guix/scripts/offload.scm b/guix/scripts/offload.scm index d011520885..56d6de6308 100644 --- a/guix/scripts/offload.scm +++ b/guix/scripts/offload.scm @@ -400,7 +400,7 @@ allowed on MACHINE. Return +∞ if MACHINE is unreachable." +inf.0 ;MACHINE does not respond, so assume it is infinitely loaded (match (string-tokenize line) ((one five fifteen . x) - (let* ((raw (string->number five)) + (let* ((raw (string->number one)) (jobs (build-machine-parallel-builds machine)) (normalized (/ raw jobs))) (format (current-error-port) "load on machine '~a' is ~s\ -- cgit v1.2.3 From 92423868bc451600f8f3d93b638091d12b14b7aa Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 15 Jan 2018 15:43:53 +0100 Subject: ui: Disable '%fresh-auto-compile' only for Guile 2.2.3. Mitigates . Reported by Diego Nicola Barbato . * guix/ui.scm (load*): Unset '%fresh-auto-compile' only on Guile 2.2.3. --- guix/ui.scm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'guix') diff --git a/guix/ui.scm b/guix/ui.scm index 895179744b..fb2380b68a 100644 --- a/guix/ui.scm +++ b/guix/ui.scm @@ -195,7 +195,16 @@ messages." (catch #t (lambda () ;; XXX: Force a recompilation to avoid ABI issues. - ;; (set! %fresh-auto-compile #t) + ;; + ;; In 2.2.3, the bogus answer to was to + ;; ignore all available .go, not just those from ~/.cache, which in turn + ;; meant that we had to rebuild *everything*. Since this is too costly, + ;; we have to turn auto '%fresh-auto-compile' with that version, at the + ;; risk of getting ABI breakage in the user's config file. See + ;; . + (unless (string=? (version) "2.2.3") + (set! %fresh-auto-compile #t)) + (set! %load-should-auto-compile #t) (save-module-excursion -- cgit v1.2.3 From 162a13740041f907f0ce5c2aa05b52b162b4e81a Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Fri, 19 Jan 2018 16:25:13 +0100 Subject: gnu: Consistently Write ‘file system(s)’. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It is the GNU way. * doc/guix.texi (Build Systems, DNS Services): Write ‘file system(s)’. * gnu/build/vm.scm (create-ext-file-system, create-fat-file-system): Likewise. * gnu/packages/backup.scm (dirvish, rsnapshot)[description]: Likewise. * gnu/packages/check.scm (python-testpath)[description]: Likewise. * gnu/packages/disk.scm (pydf)[description]: Likewise. * gnu/packages/file-systems.scm (disorderfs)[synopsis, description]: Likewise. (glusterfs)[description]: Likewise. * gnu/packages/haskell.scm (ghc-directory, ghc-system-fileio-bootstrap) (ghc-system-fileio)[synopsis]: Likewise. (ghc-fsnotify)[description]: Likewise. * gnu/packages/linux.scm (proot)[description]: Likewise. (jmtpfs)[synopsis, description]: Likewise. * gnu/packages/mate.scm (caja, caja-extensions)[description]: Likewise. * gnu/packages/storage.scm (ceph)[description]: Likewise. * gnu/packages/sync.scm (lsyncd)[description]: Likewise. * gnu/packages/syncthing.scm (syncthing)[synopsis]: Likewise. (go-github-com-zillode-notify)[description]: Likewise. * gnu/services/nfs.scm (pipefs-service-type): Likewise. * guix/scripts/system.scm (perform-action): Likewise. --- doc/guix.texi | 6 +++--- gnu/build/file-systems.scm | 4 ++-- gnu/build/linux-boot.scm | 2 +- gnu/build/vm.scm | 8 ++++---- gnu/packages/backup.scm | 4 ++-- gnu/packages/check.scm | 2 +- gnu/packages/disk.scm | 2 +- gnu/packages/file-systems.scm | 8 ++++---- gnu/packages/haskell.scm | 8 ++++---- gnu/packages/linux.scm | 8 ++++---- gnu/packages/mate.scm | 4 ++-- gnu/packages/storage.scm | 2 +- gnu/packages/sync.scm | 4 ++-- gnu/packages/syncthing.scm | 4 ++-- gnu/services/nfs.scm | 2 +- gnu/system/vm.scm | 2 +- guix/build/go-build-system.scm | 10 +++++----- guix/scripts/system.scm | 4 ++-- 18 files changed, 42 insertions(+), 42 deletions(-) (limited to 'guix') diff --git a/doc/guix.texi b/doc/guix.texi index feadcef9d0..1ecdcd2182 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -3695,10 +3695,10 @@ Go build mechanisms}. The user is expected to provide a value for the key @code{#:import-path} and, in some cases, @code{#:unpack-path}. The @url{https://golang.org/doc/code.html#ImportPaths, import path} -corresponds to the filesystem path expected by the package's build +corresponds to the file system path expected by the package's build scripts and any referring packages, and provides a unique way to refer to a Go package. It is typically based on a combination of the -package source code's remote URI and filesystem hierarchy structure. In +package source code's remote URI and file system hierarchy structure. In some cases, you will need to unpack the package's source code to a different directory structure than the one indicated by the import path, and @code{#:unpack-path} should be used in such cases. @@ -15848,7 +15848,7 @@ The backend to store the keys in. Can be @code{'pem} or @code{'pkcs11}. @item @code{config} (default: @code{"/var/lib/knot/keys/keys"}) The configuration string of the backend. An example for the PKCS#11 is: @code{"pkcs11:token=knot;pin-value=1234 /gnu/store/.../lib/pkcs11/libsofthsm2.so"}. -For the pem backend, the string reprensents a path in the filesystem. +For the pem backend, the string reprensents a path in the file system. @end table @end deftp diff --git a/gnu/build/file-systems.scm b/gnu/build/file-systems.scm index 3e516a4d3c..145b3b14e7 100644 --- a/gnu/build/file-systems.scm +++ b/gnu/build/file-systems.scm @@ -261,11 +261,11 @@ volume descriptor from ~s" "Return the raw contents of DEVICE's iso9660 primary volume descriptor as a bytevector, or #f if DEVICE does not contain an iso9660 file system." ;; Start reading at sector 16. - ;; Since we are not sure that the device contains an ISO9660 filesystem, + ;; Since we are not sure that the device contains an ISO9660 file system, ;; we have to find that out first. (if (read-superblock device (* 2048 16) 2048 iso9660-superblock?) (read-iso9660-primary-volume-descriptor device (* 2048 16)) - #f)) ; Device does not contain an iso9660 filesystem. + #f)) ; Device does not contain an iso9660 file system. (define (iso9660-superblock-uuid sblock) "Return the modification time of an iso9660 primary volume descriptor diff --git a/gnu/build/linux-boot.scm b/gnu/build/linux-boot.scm index 997107a67a..0ab8391b0b 100644 --- a/gnu/build/linux-boot.scm +++ b/gnu/build/linux-boot.scm @@ -188,7 +188,7 @@ with the given MAJOR number, starting with MINOR." (lambda args (apply report-system-error name args)))) -;; Create a device node like the passed here on the filesystem. +;; Create a device node like the passed here on the file system. (define create-device-node (match-lambda (($ xname type major minor module) diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm index 404f324045..fe003ea458 100644 --- a/gnu/build/vm.scm +++ b/gnu/build/vm.scm @@ -262,7 +262,7 @@ actual /dev name based on DEVICE." (define* (create-ext-file-system partition type #:key label uuid) - "Create an ext-family filesystem of TYPE on PARTITION. If LABEL is true, + "Create an ext-family file system of TYPE on PARTITION. If LABEL is true, use that as the volume name. If UUID is true, use it as the partition UUID." (format #t "creating ~a partition...\n" type) (unless (zero? (apply system* (string-append "mkfs." type) @@ -277,8 +277,8 @@ use that as the volume name. If UUID is true, use it as the partition UUID." (define* (create-fat-file-system partition #:key label uuid) - "Create a FAT filesystem on PARTITION. The number of File Allocation Tables -will be determined based on filesystem size. If LABEL is true, use that as the + "Create a FAT file system on PARTITION. The number of File Allocation Tables +will be determined based on file system size. If LABEL is true, use that as the volume name." ;; FIXME: UUID is ignored! (format #t "creating FAT partition...\n") @@ -425,7 +425,7 @@ GRUB configuration and OS-DRV as the stuff in it." "run=/tmp/root/run" ;; /mnt is used as part of the installation ;; process, as the mount point for the target - ;; filesystem, so create it. + ;; file system, so create it. "mnt=/tmp/root/mnt" "--" "-volid" ,(string-upcase volume-id) diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm index 7302406c57..a494a04047 100644 --- a/gnu/packages/backup.scm +++ b/gnu/packages/backup.scm @@ -418,7 +418,7 @@ rdiff-backup is easy to use and settings have sensible defaults.") ("rsync" ,rsync))) (home-page "http://rsnapshot.org") (synopsis "Deduplicating snapshot backup utility based on rsync") - (description "rsnapshot is a filesystem snapshot utility based on rsync. + (description "rsnapshot is a file system snapshot utility based on rsync. rsnapshot makes it easy to make periodic snapshots of local machines, and remote machines over SSH. To reduce the disk space required for each backup, rsnapshot uses hard links to deduplicate identical files.") @@ -811,7 +811,7 @@ any special software, on top of SSH.") (synopsis "Fast, disk based, rotating network backup system") (description "With dirvish you can maintain a set of complete images of your -filesystems with unattended creation and expiration. A dirvish backup vault +file systems with unattended creation and expiration. A dirvish backup vault is like a time machine for your data. ") (license (license:fsf-free "file://COPYING" "Open Software License 2.0")))) diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index 50675cb854..1585948b33 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -1040,7 +1040,7 @@ testing frameworks.") (synopsis "Test utilities for code working with files and commands") (description "Testpath is a collection of utilities for Python code working with files -and commands. It contains functions to check things on the filesystem, and +and commands. It contains functions to check things on the file system, and tools for mocking system commands and recording calls to those.") (license license:expat))) diff --git a/gnu/packages/disk.scm b/gnu/packages/disk.scm index e4d70ff820..c01faf5069 100644 --- a/gnu/packages/disk.scm +++ b/gnu/packages/disk.scm @@ -371,7 +371,7 @@ permit managing file systems not included in libparted.") (synopsis "Colourised @command{df} clone") (description "All-singing, all-dancing, fully colourised @command{df} clone written in Python. It displays the amount of disk space available on the -mounted filesystems, using different colours for different types of file +mounted file systems, using different colours for different types of file systems. Output format is completely customizable.") (license license:public-domain))) diff --git a/gnu/packages/file-systems.scm b/gnu/packages/file-systems.scm index 4a8058b520..1d73f4aef4 100644 --- a/gnu/packages/file-systems.scm +++ b/gnu/packages/file-systems.scm @@ -132,10 +132,10 @@ single file can be mounted.") ;; FIXME: Tests require 'run-parts' which is not in Guix yet. #:tests? #f)) (home-page "https://github.com/ReproducibleBuilds/disorderfs") - (synopsis "FUSE filesystem that introduces non-determinism") + (synopsis "FUSE file system that introduces non-determinism") (description - "An overlay FUSE filesystem that introduces non-determinism -into filesystem metadata. For example, it can randomize the order + "An overlay FUSE file system that introduces non-determinism +into file system metadata. For example, it can randomize the order in which directory entries are read. This is useful for detecting non-determinism in the build process.") (license license:gpl3+))) @@ -201,7 +201,7 @@ non-determinism in the build process.") ("zlib" ,zlib))) (home-page "https://www.gluster.org") (synopsis "Distributed file system") - (description "GlusterFS is a distributed scalable network filesystem + (description "GlusterFS is a distributed scalable network file system suitable for data-intensive tasks such as cloud storage and media streaming. It allows rapid provisioning of additional storage based on your storage consumption needs. It incorporates automatic failover as a primary feature. diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm index e7ea2d8de1..21858e481c 100644 --- a/gnu/packages/haskell.scm +++ b/gnu/packages/haskell.scm @@ -5942,7 +5942,7 @@ supported. A module of colour names (\"Data.Colour.Names\") is provided.") "0zkqihmdfz7bzv3sxh1p9ijl4vra880kfy3qy9h96flq7d2if0f2")))) (build-system haskell-build-system) (home-page "http://hackage.haskell.org/package/directory") - (synopsis "Platform-agnostic library for filesystem operations") + (synopsis "Platform-agnostic library for file system operations") (description "This library provides a basic set of operations for manipulating files and directories in a portable way.") @@ -6203,7 +6203,7 @@ increasing type safety.") ("ghc-text" ,ghc-text) ("ghc-temporary" ,ghc-temporary))) (home-page "https://github.com/fpco/haskell-filesystem") - (synopsis "Consistent filesystem interaction across GHC versions") + (synopsis "Consistent file system interaction across GHC versions") (description "This is a small wrapper around the directory, unix, and Win32 packages, for use with system-filepath. It provides a consistent API to the various @@ -6424,7 +6424,7 @@ increasing type safety.") ("ghc-chell" ,ghc-chell) ("ghc-temporary" ,ghc-temporary))) (home-page "https://github.com/fpco/haskell-filesystem") - (synopsis "Consistent filesystem interaction across GHC versions") + (synopsis "Consistent file system interaction across GHC versions") (description "This is a small wrapper around the directory, unix, and Win32 packages, for use with system-filepath. It provides a consistent API to the various @@ -6744,7 +6744,7 @@ accessed or modified.") (synopsis "Cross platform library for file change notification.") (description "Cross platform library for file creation, modification, and deletion notification. This library builds upon existing libraries for platform -specific Windows, Mac, and Linux filesystem event notification.") +specific Windows, Mac, and Linux file system event notification.") (license license:bsd-3))) (define-public ghc-ieee754 diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 13e08f2654..c097079382 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -4304,7 +4304,7 @@ userspace queueing component and the logging subsystem.") "PRoot is a user-space implementation of @code{chroot}, @code{mount --bind}, and @code{binfmt_misc}. This means that users don't need any privileges or setup to do things like using an arbitrary directory as the new root -filesystem, making files accessible somewhere else in the file system +file system, making files accessible somewhere else in the file system hierarchy, or executing programs built for another CPU architecture transparently through QEMU user-mode. Also, developers can use PRoot as a generic process instrumentation engine thanks to its extension mechanism. @@ -4391,10 +4391,10 @@ NexGen, Rise, and SiS CPUs.") (native-inputs `(("pkg-config" ,pkg-config))) (home-page "https://github.com/JasonFerrara/jmtpfs") - (synopsis "Use a FUSE filesystem to access data over MTP") - (description "jmtpfs uses FUSE (filesystem in userspace) to provide access + (synopsis "Use a FUSE file system to access data over MTP") + (description "jmtpfs uses FUSE (file system in userspace) to provide access to data over the Media Transfer Protocol (MTP). Unprivileged users can mount -the MTP device as a filesystem.") +the MTP device as a file system.") (license license:gpl3))) (define-public procenv diff --git a/gnu/packages/mate.scm b/gnu/packages/mate.scm index 71f9589937..51111f44b8 100644 --- a/gnu/packages/mate.scm +++ b/gnu/packages/mate.scm @@ -842,7 +842,7 @@ infamous 'Wanda the Fish'.") "Caja is the official file manager for the MATE desktop. It allows for browsing directories, as well as previewing files and launching applications associated with them. Caja is also responsible for handling the -icons on the MATE desktop. It works on local and remote filesystems.") +icons on the MATE desktop. It works on local and remote file systems.") ;; There is a note about a TRADEMARKS_NOTICE file in COPYING which ;; does not exist. It is safe to assume that this is of no concern ;; for us. @@ -900,7 +900,7 @@ icons on the MATE desktop. It works on local and remote filesystems.") "Caja is the official file manager for the MATE desktop. It allows for browsing directories, as well as previewing files and launching applications associated with them. Caja is also responsible for handling the -icons on the MATE desktop. It works on local and remote filesystems.") +icons on the MATE desktop. It works on local and remote file systems.") (license license:gpl2+))) (define-public mate-control-center diff --git a/gnu/packages/storage.scm b/gnu/packages/storage.scm index 1dca920a30..bee349f6f6 100644 --- a/gnu/packages/storage.scm +++ b/gnu/packages/storage.scm @@ -340,7 +340,7 @@ (description "Ceph is a distributed storage system designed for reliability and performance. It provides network-based block devices (RBD), a POSIX -compliant filesystem (CephFS), and offers compatibility with various +compliant file system (CephFS), and offers compatibility with various storage protocols (S3, NFS, and others) through the RADOS gateway.") ;; The Ceph libraries are LGPL2.1 and most of the utilities fall under ;; GPL2. The installed erasure code plugins are BSD-3 licensed and do diff --git a/gnu/packages/sync.scm b/gnu/packages/sync.scm index 4ed62ff966..3656f5855e 100644 --- a/gnu/packages/sync.scm +++ b/gnu/packages/sync.scm @@ -204,6 +204,6 @@ interface (inotify or fsevents). It aggregates and combines events for a few seconds and then spawns one (or more) process(es) to synchronize the changes. By default this is rsync, which must be installed on all source and target machines. Lsyncd is thus a light-weight live mirror solution that is -comparatively easy to install not requiring new filesystems or block devices -and does not hamper local filesystem performance.") +comparatively easy to install not requiring new file systems or block devices +and does not hamper local file system performance.") (license license:gpl2+))) diff --git a/gnu/packages/syncthing.scm b/gnu/packages/syncthing.scm index 66c3fedfe2..3fb70d13da 100644 --- a/gnu/packages/syncthing.scm +++ b/gnu/packages/syncthing.scm @@ -160,7 +160,7 @@ ("go-github-com-zillode-notify" ,go-github-com-zillode-notify) ;; For tests ("go-github-com-d4l3k-messagediff" ,go-github-com-d4l3k-messagediff))) - (synopsis "Decentralized continuous filesystem synchronization") + (synopsis "Decentralized continuous file system synchronization") (description "Syncthing is a peer-to-peer file synchronization tool that supports a wide variety of computing platforms. It uses the Block Exchange Protocol.") @@ -1873,7 +1873,7 @@ Authentication and Privacy Infrastructure).") (propagated-inputs `(("go-golang-org-x-sys-unix" ,go-golang-org-x-sys-unix))) (synopsis "Filesystem event notification library") - (description "This package provides @code{notify}, a filesystem event + (description "This package provides @code{notify}, a file system event notification library in Go.") (home-page "https://github.com/zillode/notify") (license expat)))) diff --git a/gnu/services/nfs.scm b/gnu/services/nfs.scm index 8f58920e4a..6ed4c0eabf 100644 --- a/gnu/services/nfs.scm +++ b/gnu/services/nfs.scm @@ -88,7 +88,7 @@ (define pipefs-directory (pipefs-configuration-mount-point config)) (shepherd-service - (documentation "Mount the pipefs pseudo filesystem.") + (documentation "Mount the pipefs pseudo file system.") (provision '(rpc-pipefs)) (start #~(lambda () diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index 496f2ac4e1..345cecedd8 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -346,7 +346,7 @@ the image." (label "GNU-ESP") ;cosmetic only ;; Use "vfat" here since this property is used ;; when mounting. The actual FAT-ness is based - ;; on filesystem size (16 in this case). + ;; on file system size (16 in this case). (file-system "vfat") (flags '(esp)))))))) (initialize-hard-disk "/dev/vda" diff --git a/guix/build/go-build-system.scm b/guix/build/go-build-system.scm index eaad9d8751..3114067aa9 100644 --- a/guix/build/go-build-system.scm +++ b/guix/build/go-build-system.scm @@ -37,7 +37,7 @@ ;; process for Go libraries, so we use `go install`, which preserves the ;; results. [0] -;; Go software is developed and built within a particular filesystem hierarchy +;; Go software is developed and built within a particular file system hierarchy ;; structure called a 'workspace' [1]. This workspace is found by Go ;; via the GOPATH environment variable. Typically, all Go source code ;; and compiled objects are kept in a single workspace, but it is @@ -48,7 +48,7 @@ ;; an 'import path'. The import path is based on the URL of the ;; software's source. Since most source code is provided over the ;; internet, the import path is typically a combination of the remote -;; URL and the source repository's filesystem structure. For example, +;; URL and the source repository's file system structure. For example, ;; the Go port of the common `du` command is hosted on github.com, at ;; . Thus, the import path is ;; . [3] @@ -58,12 +58,12 @@ ;; the go-build-system. ;; ;; Modules of modular Go libraries are named uniquely with their -;; filesystem paths. For example, the supplemental but "standardized" +;; file system paths. For example, the supplemental but "standardized" ;; libraries developed by the Go upstream developers are available at ;; . The Go IPv4 ;; library's import path is . The source of ;; such modular libraries must be unpacked at the top-level of the -;; filesystem structure of the library. So the IPv4 library should be +;; file system structure of the library. So the IPv4 library should be ;; unpacked to . This is handled in the ;; go-build-system with the optional #:unpack-path key. ;; @@ -72,7 +72,7 @@ ;; that all modules of modular libraries cannot be built with a single ;; command. Each module must be built individually. This complicates ;; certain cases, and these issues are currently resolved by creating a -;; filesystem union of the required modules of such libraries. I think +;; file system union of the required modules of such libraries. I think ;; this could be improved in future revisions of the go-build-system. ;; ;; [0] `go build`: diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index ebcf3e4f3b..55a02fb96d 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -709,8 +709,8 @@ and TARGET arguments." "Perform ACTION for OS. INSTALL-BOOTLOADER? specifies whether to install bootloader; BOOTLOADER-TAGET is the target for the bootloader; TARGET is the target root directory; IMAGE-SIZE is the size of the image to be built, for -the 'vm-image' and 'disk-image' actions. The root filesystem is created as a -FILE-SYSTEM-TYPE filesystem. FULL-BOOT? is used for the 'vm' action; it +the 'vm-image' and 'disk-image' actions. The root file system is created as a +FILE-SYSTEM-TYPE file system. FULL-BOOT? is used for the 'vm' action; it determines whether to boot directly to the kernel or to the bootloader. When DERIVATIONS-ONLY? is true, print the derivation file name(s) without -- cgit v1.2.3 From 20fe7271051403ee431c2fd72ff76d9c44acdb6c Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 19 Jan 2018 15:08:25 +0100 Subject: packages: 'package-mapping' maps replacement. * guix/packages.scm (package-mapping): Apply PROC to 'replacement' as well. --- guix/packages.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'guix') diff --git a/guix/packages.scm b/guix/packages.scm index c6d3b811f2..7d884aa366 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès +;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès ;;; Copyright © 2014, 2015, 2017 Mark H Weaver ;;; Copyright © 2015 Eric Bavier ;;; Copyright © 2016 Alex Kost @@ -785,7 +785,8 @@ when CUT? returns true for a given package." (location (package-location p)) (inputs (map rewrite (package-inputs p))) (native-inputs (map rewrite (package-native-inputs p))) - (propagated-inputs (map rewrite (package-propagated-inputs p))))))) + (propagated-inputs (map rewrite (package-propagated-inputs p))) + (replacement (and=> (package-replacement p) proc)))))) replace) -- cgit v1.2.3