From e46a043ecd9f9ef46d1d44393362bb7016454544 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Mon, 12 Dec 2016 00:25:27 +0100 Subject: build-system/python: Make sure 'check' returns failures. * guix/build/python-build-system.scm (check): Wrap 'call-setuppy' in 'if' so that it actually fails when the tests fail. Print informational message when skipped. --- guix/build/python-build-system.scm | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'guix') diff --git a/guix/build/python-build-system.scm b/guix/build/python-build-system.scm index 3f280b0ac0..dd07986b94 100644 --- a/guix/build/python-build-system.scm +++ b/guix/build/python-build-system.scm @@ -137,11 +137,15 @@ ;; (given with `package_dir`). This will by copied to the output, too, ;; so we need to remove. (let ((before (find-files "build" "\\.egg-info$" #:directories? #t))) - (call-setuppy test-target '() use-setuptools?) - (let* ((after (find-files "build" "\\.egg-info$" #:directories? #t)) - (inter (lset-difference eqv? after before))) - (for-each delete-file-recursively inter))) - #t)) + (if (call-setuppy test-target '() use-setuptools?) + (let* ((after (find-files "build" "\\.egg-info$" #:directories? #t)) + (inter (lset-difference eqv? after before))) + (for-each delete-file-recursively inter) + #t) + #f)) + (begin + (format #t "test suite not run~%") + #t))) (define (get-python-version python) (let* ((version (last (string-split python #\-))) -- cgit v1.2.3 From 9f05908fb1e3707cae593d94688748294717a546 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Thu, 23 Feb 2017 13:48:11 -0500 Subject: download: Provide a fall-back guile for older daemons. Fixes . * guix/download.scm (in-band-download): Use %bootstrap-guile as a fall-back when using older daemons that do not have a built-in downloader. Written-by: Ricardo Wurmus --- guix/download.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'guix') diff --git a/guix/download.scm b/guix/download.scm index 813f51f489..86f8598812 100644 --- a/guix/download.scm +++ b/guix/download.scm @@ -418,7 +418,10 @@ GnuTLS itself and its dependencies. See ." ;; hash of the expected result. #:verify-certificate? #f))))) - (mlet %store-monad ((guile (package->derivation guile system))) + (mlet %store-monad ((guile (package->derivation + (or guile + (@@ (gnu packages bootstrap) %bootstrap-guile)) + system))) (gexp->derivation file-name builder #:guile-for-build guile #:system system -- cgit v1.2.3 From 7109e0fff8e9a235251e4610b9663d1985ca7924 Mon Sep 17 00:00:00 2001 From: Danny Milosavljevic Date: Fri, 3 Mar 2017 12:06:11 +0100 Subject: build-system/cargo: Export %cargo-build-system-modules. * guix/build-system/cargo.scm (%cargo-build-system-modules): Export. --- guix/build-system/cargo.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'guix') diff --git a/guix/build-system/cargo.scm b/guix/build-system/cargo.scm index 3582f0e328..578c4446a4 100644 --- a/guix/build-system/cargo.scm +++ b/guix/build-system/cargo.scm @@ -29,7 +29,8 @@ #:use-module (guix build-system gnu) #:use-module (ice-9 match) #:use-module (srfi srfi-26) - #:export (cargo-build-system + #:export (%cargo-build-system-modules + cargo-build-system crate-url crate-url? crate-uri)) -- cgit v1.2.3 From 6c5b56f9fa01b7fe9034bac47b20e08a2fdb2629 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 7 Mar 2017 23:42:13 +0100 Subject: gnu: bash: Use the bootstrap Guile in 'url-fetch/reset-patch-level'. Fixes . Reported by Sirgazil, Ricardo Wurmus, Andy Wingo, and others. * guix/download.scm (in-band-download): Always use GUILE. This reverts 9f05908fb1e3707cae593d94688748294717a546. * gnu/packages/bash.scm (url-fetch/reset-patch-level): Remove #:guile. Pass %BOOTSTRAP-GUILE as #:guile to 'url-fetch'. Remove #:guile-for-build argument in 'gexp->derivation' call. --- gnu/packages/bash.scm | 9 ++++++--- guix/download.scm | 5 +---- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'guix') diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm index c3b94391e1..388f5271c1 100644 --- a/gnu/packages/bash.scm +++ b/gnu/packages/bash.scm @@ -21,6 +21,7 @@ (define-module (gnu packages bash) #:use-module (guix licenses) #:use-module (gnu packages) + #:use-module (gnu packages bootstrap) #:use-module (gnu packages ncurses) #:use-module (gnu packages readline) #:use-module (gnu packages bison) @@ -243,14 +244,17 @@ without modification.") (define* (url-fetch/reset-patch-level url hash-algo hash #:optional name - #:key (system (%current-system)) guile) + #:key (system (%current-system))) "Fetch the Bash patch from URL and reset its 'PATCHLEVEL' definition so it can apply to a patch-level 0 Bash." + ;; Note: Forcefully use %BOOTSTRAP-GUILE here to work around bootstrapping + ;; issues when using a daemon that lacks the "download" built-in. See + ;; . (mlet* %store-monad ((name -> (or name (basename url))) (patch (url-fetch url hash-algo hash (string-append name ".orig") #:system system - #:guile guile))) + #:guile %bootstrap-guile))) (gexp->derivation name (with-imported-modules '((guix build utils)) #~(begin @@ -259,7 +263,6 @@ can apply to a patch-level 0 Bash." (substitute* #$output (("PATCHLEVEL [0-6]+") "PATCHLEVEL 0")))) - #:guile-for-build guile #:system system))) (define bash/fixed ;CVE-2017-5932 (RCE with completion) diff --git a/guix/download.scm b/guix/download.scm index 86f8598812..813f51f489 100644 --- a/guix/download.scm +++ b/guix/download.scm @@ -418,10 +418,7 @@ GnuTLS itself and its dependencies. See ." ;; hash of the expected result. #:verify-certificate? #f))))) - (mlet %store-monad ((guile (package->derivation - (or guile - (@@ (gnu packages bootstrap) %bootstrap-guile)) - system))) + (mlet %store-monad ((guile (package->derivation guile system))) (gexp->derivation file-name builder #:guile-for-build guile #:system system -- cgit v1.2.3 From 6aa9d63c92bd0c33dd331d2a9d224cfef1b78331 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 8 Mar 2017 10:41:34 +0100 Subject: guix archive: Allow compilation with Guile 2.2. * guix/scripts/archive.scm (export-from-store): Avoid shadowing the top-level '_'. --- guix/scripts/archive.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guix') diff --git a/guix/scripts/archive.scm b/guix/scripts/archive.scm index 9e49c53635..cad279fb50 100644 --- a/guix/scripts/archive.scm +++ b/guix/scripts/archive.scm @@ -268,7 +268,7 @@ resulting archive to the standard output port." (let ((system (assoc-ref opts 'system))) (format #t "~a\n" (build-docker-image file #:system system)))) - (_ + (x ;; TODO: Remove this restriction. (leave (_ "only a single item can be exported to Docker~%"))))) (format -- cgit v1.2.3 From 3f6d5b8a691fee5574efd3e13f88201ea5c3b416 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 8 Mar 2017 21:30:55 +0100 Subject: download: Update the Savannah mirror list. * guix/download.scm (%mirrors) : Remove centervenus.com, which seems to be broken. Add download-mirror.sv.gnu.org as a last resort. --- guix/download.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'guix') diff --git a/guix/download.scm b/guix/download.scm index 813f51f489..dda18ff04d 100644 --- a/guix/download.scm +++ b/guix/download.scm @@ -103,8 +103,8 @@ "http://mirror.csclub.uwaterloo.ca/nongnu/" "http://nongnu.askapache.com/" "http://savannah.c3sl.ufpr.br/" - "http://www.centervenus.com/mirrors/nongnu/" - "http://download.savannah.gnu.org/releases-noredirect/") + "http://download.savannah.gnu.org/releases-noredirect/" + "http://download-mirror.savannah.gnu.org/releases/") (sourceforge ; https://sourceforge.net/p/forge/documentation/Mirrors/ "http://downloads.sourceforge.net/project/" "http://ufpr.dl.sourceforge.net/project/" -- cgit v1.2.3 From 30906825cb99122f6b068a1d9223937757d75ce5 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 8 Mar 2017 21:36:54 +0100 Subject: ui: Avoid '_' as a pattern variable in 'match'. * guix/ui.scm (fill-paragraph): Don't use '_' as a pattern variable since that is shadowed by the top-level '_' binding on Guile 2.2. (show-manifest-transaction): Likewise. --- guix/ui.scm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'guix') diff --git a/guix/ui.scm b/guix/ui.scm index 6247944068..5ae082fc0a 100644 --- a/guix/ui.scm +++ b/guix/ui.scm @@ -687,7 +687,7 @@ replacement if PORT is not Unicode-capable." "The following packages will be removed:~%~{~a~%~}~%" len) remove)))) - (_ #f)) + (x #f)) (match downgrade (((($ name old-version) . ($ _ new-version output item)) ..1) @@ -705,7 +705,7 @@ replacement if PORT is not Unicode-capable." "The following packages will be downgraded:~%~{~a~%~}~%" len) downgrade)))) - (_ #f)) + (x #f)) (match upgrade (((($ name old-version) . ($ _ new-version output item)) ..1) @@ -723,7 +723,7 @@ replacement if PORT is not Unicode-capable." "The following packages will be upgraded:~%~{~a~%~}~%" len) upgrade)))) - (_ #f)) + (x #f)) (match install ((($ name version output item _) ..1) (let ((len (length name)) @@ -739,7 +739,7 @@ replacement if PORT is not Unicode-capable." "The following packages will be installed:~%~{~a~%~}~%" len) install)))) - (_ #f)))) + (x #f)))) (define-syntax with-error-handling (syntax-rules () @@ -820,7 +820,7 @@ converted to a space; sequences of more than one line break are preserved." (match (string-fold maybe-break `(,column 0 ()) str) - ((_ _ chars) + ((column newlines chars) (list->string (reverse chars))))) @@ -1024,7 +1024,7 @@ DURATION-RELATION with the current time." (valid-generations (iota n 1))) ((lst ..1) (valid-generations lst)) - (_ #f))) + (x #f))) (define (filter-by-duration duration) (define (time-at-midnight time) -- cgit v1.2.3 From 1062063a65036f32a061c54866d33ffe079ec44e Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 8 Mar 2017 22:21:31 +0100 Subject: ui: Don't use '%default-port-encoding' to set the encoding of string ports. * guix/ui.scm (right-arrow): Call 'set-port-encoding!' to set PORT's encoding; remove use of 'with-fluids'. This is for compatibility with Guile 2.2 where the encoding of string ports is not influenced by %DEFAULT-PORT-ENCODING. * tests/ui.scm ("show-manifest-transaction"): Likewise. --- guix/ui.scm | 21 +++++++++++---------- tests/ui.scm | 11 +++++++---- 2 files changed, 18 insertions(+), 14 deletions(-) (limited to 'guix') diff --git a/guix/ui.scm b/guix/ui.scm index 5ae082fc0a..3a0a6501d1 100644 --- a/guix/ui.scm +++ b/guix/ui.scm @@ -635,16 +635,17 @@ report what is prerequisites are available for download." (define (right-arrow port) "Return either a string containing the 'RIGHT ARROW' character, or an ASCII replacement if PORT is not Unicode-capable." - (with-fluids ((%default-port-encoding (port-encoding port))) - (let ((arrow "→")) - (catch 'encoding-error - (lambda () - (call-with-output-string - (lambda (port) - (set-port-conversion-strategy! port 'error) - (display arrow port)))) - (lambda (key . args) - "->"))))) + (let ((encoding (port-encoding port)) + (arrow "→")) + (catch 'encoding-error + (lambda () + (call-with-output-string + (lambda (port) + (set-port-encoding! port encoding) + (set-port-conversion-strategy! port 'error) + (display arrow port)))) + (lambda (key . args) + "->")))) (define* (show-manifest-transaction store manifest transaction #:key dry-run?) diff --git a/tests/ui.scm b/tests/ui.scm index 058207e8b9..cfe417d497 100644 --- a/tests/ui.scm +++ b/tests/ui.scm @@ -248,9 +248,12 @@ Second line" 24)) (lambda () (show-manifest-transaction store m t))))) (string-match "guile\t1.8.8 -> 2.0.9" - (with-fluids ((%default-port-encoding "ISO-8859-1")) - (with-error-to-string - (lambda () - (show-manifest-transaction store m t))))))))) + (with-error-to-string + (lambda () + ;; In Guile 2.2, %DEFAULT-PORT-ENCODING doesn't + ;; influence the encoding of string ports. + (set-port-encoding! (current-error-port) + "ISO-8859-1") + (show-manifest-transaction store m t)))))))) (test-end "ui") -- cgit v1.2.3 From 7447aa36e16fb77f75df4d3369db9c942615632e Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 8 Mar 2017 23:39:03 +0100 Subject: utils: Make sure to use the right 'bytevector->string'. In Guile 2.2, (rnrs io ports) exports 'bytevector->string', which conflicts with that of (ice-9 iconv). * guix/utils.scm: Hide 'bytevector->string' from (rnrs io ports). --- guix/utils.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guix') diff --git a/guix/utils.scm b/guix/utils.scm index 72dc0687a4..2d59cccf3c 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -31,7 +31,7 @@ #:use-module (srfi srfi-60) #:use-module (rnrs bytevectors) #:use-module (ice-9 binary-ports) - #:autoload (rnrs io ports) (make-custom-binary-input-port) + #:use-module ((rnrs io ports) #:hide (bytevector->string)) #:use-module ((rnrs bytevectors) #:select (bytevector-u8-set!)) #:use-module (guix memoization) #:use-module ((guix build utils) #:select (dump-port)) -- cgit v1.2.3 From 3104475148af4f355f9ed5728582e79fea8b2c96 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 9 Mar 2017 09:48:33 +0100 Subject: utils: Use an idiom compatible with both 2.0 and 2.2. Fixes a regression introduced in 7447aa36e16fb77f75df4d3369db9c942615632e. Reported by Ricardo Wurmus. * guix/utils.scm: Revert 7447aa36e16fb77f75df4d3369db9c942615632e. Use #:prefix for (ice-9 iconv) to support both 2.0 and 2.2. --- guix/utils.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'guix') diff --git a/guix/utils.scm b/guix/utils.scm index 2d59cccf3c..b72e3f233f 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -31,7 +31,7 @@ #:use-module (srfi srfi-60) #:use-module (rnrs bytevectors) #:use-module (ice-9 binary-ports) - #:use-module ((rnrs io ports) #:hide (bytevector->string)) + #:autoload (rnrs io ports) (make-custom-binary-input-port) #:use-module ((rnrs bytevectors) #:select (bytevector-u8-set!)) #:use-module (guix memoization) #:use-module ((guix build utils) #:select (dump-port)) @@ -43,7 +43,7 @@ #:use-module (ice-9 regex) #:use-module (ice-9 match) #:use-module (ice-9 format) - #:use-module ((ice-9 iconv) #:select (bytevector->string)) + #:use-module ((ice-9 iconv) #:prefix iconv:) #:use-module (system foreign) #:re-export (memoize) ; for backwards compatibility #:export (bytevector->base16-string @@ -326,7 +326,7 @@ This procedure returns #t on success." (seek in 0 SEEK_SET) ; read from the beginning of the file. (let* ((pre-bv (get-bytevector-n in start)) ;; The expression in string form. - (str (bytevector->string + (str (iconv:bytevector->string (get-bytevector-n in (- end start)) (port-encoding in))) (post-bv (get-bytevector-all in)) -- cgit v1.2.3 From 64fc9f65f10b7ec584e6246914be322207162c0e Mon Sep 17 00:00:00 2001 From: Roel Janssen Date: Thu, 9 Mar 2017 12:37:21 +0100 Subject: gexp: Expose functions to allow creating derivation builders. * guix/gexp.scm: Add load-path-expression and gexp-modules to the public interface of the module. See . --- guix/gexp.scm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'guix') diff --git a/guix/gexp.scm b/guix/gexp.scm index 1f7fbef0a0..d11ed177fe 100644 --- a/guix/gexp.scm +++ b/guix/gexp.scm @@ -68,6 +68,9 @@ file-append-base file-append-suffix + load-path-expression + gexp-modules + gexp->derivation gexp->file gexp->script -- cgit v1.2.3