From 7f8a896c5f3ecde60a19f244d5a407ec1033a08d Mon Sep 17 00:00:00 2001 From: Brendan Tildesley Date: Thu, 29 Apr 2021 20:33:08 +1000 Subject: utils: Fix wrap-script argument handling. * guix/build/utils.scm (wrap-script): Don't add (car cl) one too many times, cl its self contains it's car. Split the aguments string with string-tokenize to avoid leaving an empty string argument when there should be none. These two bugs seemed to be partially cancelling each other out so that scripts still worked when ran with no arguments. * tests/build-utils.scm: Adjust wrap-script to above changes. Add two tests to ensure the command line arguments appear identical to a script and its wrapped version. Signed-off-by: Maxim Cournoyer --- guix/build/utils.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'guix') diff --git a/guix/build/utils.scm b/guix/build/utils.scm index 3beb7da67a..dd5a91f52f 100644 --- a/guix/build/utils.scm +++ b/guix/build/utils.scm @@ -8,6 +8,7 @@ ;;; Copyright © 2020 Efraim Flashner ;;; Copyright © 2020, 2021 Maxim Cournoyer ;;; Copyright © 2021 Maxime Devos +;;; Copyright © 2021 Brendan Tildesley ;;; ;;; This file is part of GNU Guix. ;;; @@ -1462,10 +1463,9 @@ not supported." `(let ((cl (command-line))) (apply execl ,interpreter (car cl) - (cons (car cl) - (append - ',(string-split args #\space) - cl)))))) + (append + ',(string-tokenize args char-set:graphic) + cl))))) (template (string-append prog ".XXXXXX")) (out (mkstemp! template)) (st (stat prog)) -- cgit v1.2.3 From 1bd169b5dc818edd7630e919033ba1b8303d9be0 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 17 Dec 2021 15:59:06 -0500 Subject: guix: lint: Fix comment per TODO. * guix/lint.scm (check-wrapper-inputs): Address TODO in comment. --- guix/lint.scm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'guix') diff --git a/guix/lint.scm b/guix/lint.scm index 379bd0e80b..3ca7a0b608 100644 --- a/guix/lint.scm +++ b/guix/lint.scm @@ -571,9 +571,7 @@ or \"bash-minimal\" is not in its inputs. 'wrap-script' is not supported." input-names))) (define (check-procedure-body body) (match body - ;; Explicitely setting an interpreter is acceptable, - ;; #:sh support is added on 'core-updates'. - ;; TODO(core-updates): remove mention of core-updates. + ;; Explicitely setting an interpreter is acceptable. (('wrap-program _ '#:sh . _) '()) (('wrap-program _ . _) (list (report-wrap-program-error package 'wrap-program))) -- cgit v1.2.3 From 0f71f55a60c94efe5c109233db6c92dbfba2bf82 Mon Sep 17 00:00:00 2001 From: Sarah Morgensen Date: Sat, 24 Jul 2021 23:12:04 -0700 Subject: build-system/gnu: Make gzip files writable before resetting timestamps. guix/build/gnu-build-system.scm (reset-gzip-timestamps): Ensure gzip files are writable before resetting their timestamps. Signed-off-by: Maxim Cournoyer --- guix/build/gnu-build-system.scm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'guix') diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm index d0f7413268..d84411c090 100644 --- a/guix/build/gnu-build-system.scm +++ b/guix/build/gnu-build-system.scm @@ -598,6 +598,8 @@ and 'man/'. This phase moves directories to the right place if needed." (string-suffix? ".tgz" file)) (gzip-file? file))) #:stat lstat))) + ;; Ensure the files are writable. + (for-each make-file-writable files) (for-each reset-gzip-timestamp files))) (match outputs -- cgit v1.2.3