gnu: proot: Fix test failures.
authorLudovic Courtès <ludo@gnu.org>
Mon, 11 May 2020 10:52:43 +0000 (12:52 +0200)
committerLudovic Courtès <ludo@gnu.org>
Mon, 11 May 2020 11:03:23 +0000 (13:03 +0200)
The upgrade to Make 4.3 and Coreutils 8.30 introduced test failures that
this commit addresses.

* gnu/packages/base.scm (coreutils-8.30): New variable.
* gnu/packages/linux.scm (proot)[native-inputs]: Add COREUTILS-8.30 and
GNU-MAKE-4.2.

gnu/packages/base.scm
gnu/packages/linux.scm

index 5ea129a..279fe9e 100644 (file)
@@ -384,6 +384,34 @@ standard.")
     (outputs '("out"))
     (inputs '())))
 
+(define-public coreutils-8.30
+  ;; XXX: This version is kept just so we can run PRoot tests.
+  (hidden-package
+   (package
+     (inherit coreutils-minimal)
+     (version "8.30")
+     (source (origin
+               (method url-fetch)
+               (uri (string-append "mirror://gnu/coreutils/coreutils-"
+                                   version ".tar.xz"))
+               (sha256
+                (base32
+                 "0mxhw43d4wpqmvg0l4znk1vm10fy92biyh90lzdnqjcic2lb6cg8"))))
+     (arguments
+      (substitute-keyword-arguments (package-arguments coreutils-minimal)
+        ((#:phases phases '%standard-phases)
+         `(modify-phases ,phases
+            (add-before 'check 'disable-broken-test
+              (lambda _
+                ;; This test hits the 127 character shebang limit in the build
+                ;; environment due to the way "env -S" splits arguments into
+                ;; shebangs.  Note that "env-S-script.sh" works around this
+                ;; specific issue, but "env-S.pl" is not adjusted for build
+                ;; environments with long prefixes (/tmp/guix-build-...).
+                (substitute* "Makefile"
+                  (("^.*tests/misc/env-S.pl.*$") ""))
+                #t)))))))))
+
 (define-public gnu-make
   (package
    (name "make")
index c429b05..7cf7521 100644 (file)
@@ -6099,7 +6099,16 @@ userspace queueing component and the logging subsystem.")
     (native-inputs `(("which" ,which)
 
                      ;; For 'mcookie', used by some of the tests.
-                     ("util-linux" ,util-linux)))
+                     ("util-linux" ,util-linux)
+
+                     ;; XXX: Choose the old coreutils because its 'stat'
+                     ;; program does not use statx(2) when running 'stat -c
+                     ;; %a' or similar, which PRoot doesn't properly support.
+                     ("coreutils-old" ,coreutils-8.30)
+
+                     ;; XXX: 'test-c6b77b77.sh' runs 'make' and that leads
+                     ;; make 4.3 to segfault.
+                     ("make-old" ,gnu-make-4.2)))
     (inputs `(("talloc" ,talloc)))
     (home-page "https://github.com/proot-me/PRoot")
     (synopsis "Unprivileged chroot, bind mount, and binfmt_misc")