diff options
author | Ludovic Courtès <ludo@gnu.org> | 2017-03-25 23:28:54 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2017-03-25 23:31:10 +0100 |
commit | d1e3f59c9b8d1be79eded04fe23cceb56b4372f0 (patch) | |
tree | 3f34421bceaeddcf018da388634ab5ddf779ca9f /gnu/packages/base.scm | |
parent | ac7a8f1ff82a5d3eb0d215721f1995c192a70f02 (diff) | |
download | guix-d1e3f59c9b8d1be79eded04fe23cceb56b4372f0.tar guix-d1e3f59c9b8d1be79eded04fe23cceb56b4372f0.tar.gz |
gnu: coreutils: Patch 'cut' unit test on ARM.
Fixes <https://bugs.gnu.org/26253>.
* gnu/packages/patches/coreutils-cut-huge-range-test.patch: New file.
* gnu/packages/base.scm (coreutils)[native-inputs]: Add it as an input.
[arguments] <#:phases>: On ARM, add 'patch-cut-test' phase.
* gnu/local.mk (dist_patch_DATA): Add 'coreutils-cut-huge-range-test.patch'.
Diffstat (limited to 'gnu/packages/base.scm')
-rw-r--r-- | gnu/packages/base.scm | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index ba9c820efa..2a6f6a43ed 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -307,9 +307,17 @@ used to apply commands with arbitrarily long arguments.") ;; copy of help2man. However, don't pass it when cross-compiling since ;; that would lead it to try to run programs to get their '--help' output ;; for help2man. - (if (%current-target-system) - '() - `(("perl" ,perl)))) + `(,@(if (%current-target-system) + '() + `(("perl" ,perl))) + + ;; Apply this patch only on ARM to avoid a full rebuild. + ;; TODO: Move to 'patches' in the next update cycle. + ,@(if (string-prefix? "arm" (or (%current-target-system) + (%current-system))) + `(("cut-test.patch" + ,(search-patch "coreutils-cut-huge-range-test.patch"))) + '()))) (outputs '("out" "debug")) (arguments `(#:parallel-build? #f ; help2man may be called too early @@ -328,7 +336,22 @@ used to apply commands with arbitrarily long arguments.") (substitute* (find-files "tests" "\\.sh$") (("#!/bin/sh") (format #f "#!~a/bin/sh" bash))))) - %standard-phases))) + + ,@(if (string-prefix? "arm" (or (%current-target-system) + (%current-system))) + '((alist-cons-before + 'build 'patch-cut-test + (lambda* (#:key inputs native-inputs + #:allow-other-keys) + (let ((patch (or (assoc-ref inputs + "cut-test.patch") + (assoc-ref native-inputs + "cut-test.patch")))) + (zero? + (system* "patch" "-p1" "--force" + "--input" patch)))) + %standard-phases)) + '(%standard-phases))))) (synopsis "Core GNU utilities (file, text, shell)") (description "GNU Coreutils includes all of the basic command-line tools that are |