mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
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'.
This commit is contained in:
parent
ac7a8f1ff8
commit
d1e3f59c9b
3 changed files with 50 additions and 4 deletions
|
@ -514,6 +514,7 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/clx-remove-demo.patch \
|
%D%/packages/patches/clx-remove-demo.patch \
|
||||||
%D%/packages/patches/cmake-fix-tests.patch \
|
%D%/packages/patches/cmake-fix-tests.patch \
|
||||||
%D%/packages/patches/coda-use-system-libs.patch \
|
%D%/packages/patches/coda-use-system-libs.patch \
|
||||||
|
%D%/packages/patches/coreutils-cut-huge-range-test.patch \
|
||||||
%D%/packages/patches/coreutils-fix-cross-compilation.patch \
|
%D%/packages/patches/coreutils-fix-cross-compilation.patch \
|
||||||
%D%/packages/patches/cpio-CVE-2016-2037.patch \
|
%D%/packages/patches/cpio-CVE-2016-2037.patch \
|
||||||
%D%/packages/patches/cpufrequtils-fix-aclocal.patch \
|
%D%/packages/patches/cpufrequtils-fix-aclocal.patch \
|
||||||
|
|
|
@ -307,9 +307,17 @@ (define-public coreutils
|
||||||
;; copy of help2man. However, don't pass it when cross-compiling since
|
;; 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
|
;; that would lead it to try to run programs to get their '--help' output
|
||||||
;; for help2man.
|
;; for help2man.
|
||||||
(if (%current-target-system)
|
`(,@(if (%current-target-system)
|
||||||
'()
|
'()
|
||||||
`(("perl" ,perl))))
|
`(("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"))
|
(outputs '("out" "debug"))
|
||||||
(arguments
|
(arguments
|
||||||
`(#:parallel-build? #f ; help2man may be called too early
|
`(#:parallel-build? #f ; help2man may be called too early
|
||||||
|
@ -328,7 +336,22 @@ (define-public coreutils
|
||||||
(substitute* (find-files "tests" "\\.sh$")
|
(substitute* (find-files "tests" "\\.sh$")
|
||||||
(("#!/bin/sh")
|
(("#!/bin/sh")
|
||||||
(format #f "#!~a/bin/sh" bash)))))
|
(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)")
|
(synopsis "Core GNU utilities (file, text, shell)")
|
||||||
(description
|
(description
|
||||||
"GNU Coreutils includes all of the basic command-line tools that are
|
"GNU Coreutils includes all of the basic command-line tools that are
|
||||||
|
|
22
gnu/packages/patches/coreutils-cut-huge-range-test.patch
Normal file
22
gnu/packages/patches/coreutils-cut-huge-range-test.patch
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
This patch fixes 100% reproducible test failures on arm-linux-gnueabihf in our
|
||||||
|
the build environment chroot, as reported at <https://bugs.gnu.org/26253>.
|
||||||
|
It is a followup to this upstream patch:
|
||||||
|
|
||||||
|
commit 28803c8a3144d5d4363cdbd148bbe067af1a67c2
|
||||||
|
Author: Pádraig Brady <P@draigBrady.com>
|
||||||
|
Date: Fri Mar 3 00:25:54 2017 -0800
|
||||||
|
|
||||||
|
tests: avoid a spurious failure on older debian
|
||||||
|
|
||||||
|
... which appeared to be insufficient.
|
||||||
|
|
||||||
|
--- a/tests/misc/cut-huge-range.sh
|
||||||
|
+++ b/tests/misc/cut-huge-range.sh
|
||||||
|
@@ -22,6 +22,7 @@ getlimits_
|
||||||
|
|
||||||
|
vm=$(get_min_ulimit_v_ cut -b1 /dev/null) \
|
||||||
|
|| skip_ "this shell lacks ulimit support"
|
||||||
|
+vm=$(($vm + $(getconf PAGESIZE))) # avoid spurious failures
|
||||||
|
|
||||||
|
# sed script to subtract one from the input.
|
||||||
|
# Each input line should consist of a positive decimal number.
|
Loading…
Reference in a new issue