gnu: proot: Update to 5.2.0-alpha-0.a70023a and fix version string.

* gnu/packages/linux.scm (proot): Update to 5.2.0-alpha-0.a70023a.
[tests?]: Reinstate tests for the aarch64-linux architecture.
[phases]{patch-sources}: Reinstate the test-ssssssss.c test, fixed upstream.
Set the VERSION Make variable, which is normally derived from invoking git.
Delete the new test-docker.sh test file.  Delete the known-to-be-failing
test-cdd39012.sh and test-d92b57ca.sh test files.
{check}: No longer set the PROOT_NO_SECCOMP environment variable as the
upstream issue appears to have been resolved.
[native-inputs]: Use the current coreutils package.
This commit is contained in:
Maxim Cournoyer 2021-10-01 13:41:22 -04:00
parent 8827ef8a50
commit 7dbd06a13b
No known key found for this signature in database
GPG key ID: 1260E46482E63562

View file

@ -6973,20 +6973,23 @@ (define-public nftables
(license license:gpl2))) (license license:gpl2)))
(define-public proot (define-public proot
(let ((revision "0")
(commit "a70023ab3db47d011265451b99a1abef7b9d7afc"))
(package (package
(name "proot") (name "proot")
;; The last stable release was made in 2015, and fails to build for ;; The last stable release was made in 2015, and fails to build for the
;; the aarch64 platform. ;; aarch64 platform. Use the latest commit, which includes fixes for
(version "5.2.0-alpha") ;; the supported ARM architectures and the test suite, among others.
(version (git-version "5.2.0-alpha" revision commit))
(source (source
(origin (origin
(method git-fetch) (method git-fetch)
(uri (git-reference (uri (git-reference
(url "https://github.com/proot-me/PRoot") (url "https://github.com/proot-me/PRoot")
(commit (string-append "v" version)))) (commit (string-append commit))))
(file-name (git-file-name name version)) (file-name (git-file-name name version))
(sha256 (sha256
(base32 "09vp806y4hqfq2fn2hpi873rh4j6a3c572ph4mkirx1n32wj8srl")))) (base32 "1kmry3rb967phxnxjfnx310gy1d4gpmjd6fp3hbm9v9jciysxy4z"))))
(build-system gnu-build-system) (build-system gnu-build-system)
;; The powerpc64le-linux and mips64el-linux architectures are not ;; The powerpc64le-linux and mips64el-linux architectures are not
;; supported (see: ;; supported (see:
@ -6994,10 +6997,10 @@ (define-public proot
(supported-systems '("x86_64-linux" "i686-linux" (supported-systems '("x86_64-linux" "i686-linux"
"armhf-linux" "aarch64-linux" "i586-gnu")) "armhf-linux" "aarch64-linux" "i586-gnu"))
(arguments (arguments
;; Disable the test suite on ARM platforms, as there are too many ;; Disable the test suite on armhf-linux, as there are too many
;; failures to keep track of (see for example: ;; failures to keep track of (see for example:
;; https://github.com/proot-me/proot/issues/263). ;; https://github.com/proot-me/proot/issues/286).
`(#:tests? ,(not (string-match "^(arm|aarch64)" `(#:tests? ,(not (string-prefix? "armhf"
(or (%current-target-system) (or (%current-target-system)
(%current-system)))) (%current-system))))
#:make-flags '("-C" "src") #:make-flags '("-C" "src")
@ -7010,7 +7013,9 @@ (define-public proot
"/bin/sh\""))) "/bin/sh\"")))
(substitute* "src/GNUmakefile" (substitute* "src/GNUmakefile"
(("/bin/echo") (which "echo"))) (("/bin/echo") (which "echo"))
(("^VERSION = .*")
(string-append "VERSION := " ,version "\n")))
(substitute* (find-files "test" "\\.sh$") (substitute* (find-files "test" "\\.sh$")
;; Some of the tests try to "bind-mount" /bin/true. ;; Some of the tests try to "bind-mount" /bin/true.
@ -7045,10 +7050,8 @@ (define-public proot
;; https://github.com/proot-me/proot/issues/184). ;; https://github.com/proot-me/proot/issues/184).
(delete-file "test/test-0228fbe7.sh") (delete-file "test/test-0228fbe7.sh")
(delete-file "test/test-2db65cd2.sh") (delete-file "test/test-2db65cd2.sh")
(delete-file "test/test-cdd39012.sh")
;; This one fails with "bind: Address already in use" (delete-file "test/test-d92b57ca.sh")
;; (see: https://github.com/proot-me/proot/issues/260).
(delete-file "test/test-ssssssss.c")
;; This one fails on a waitpid call that returns 1 (see: ;; This one fails on a waitpid call that returns 1 (see:
;; https://github.com/proot-me/proot/issues/261). ;; https://github.com/proot-me/proot/issues/261).
@ -7058,6 +7061,9 @@ (define-public proot
;; skip it. ;; skip it.
(delete-file "test/test-kkkkkkkk.c") (delete-file "test/test-kkkkkkkk.c")
;; This one requires Docker.
(delete-file "test/test-docker.sh")
;; The socket tests requires networking. ;; The socket tests requires networking.
(for-each delete-file (for-each delete-file
(find-files "test" "test-socket.*\\.sh$")))) (find-files "test" "test-socket.*\\.sh$"))))
@ -7070,10 +7076,6 @@ (define-public proot
(lambda* (#:key tests? #:allow-other-keys) (lambda* (#:key tests? #:allow-other-keys)
(when tests? (when tests?
(let ((n (parallel-job-count))) (let ((n (parallel-job-count)))
;; There are lots of segfaults with seccomp support
;; (x86_64, Linux-libre 4.11.0) (see:
;; https://github.com/proot-me/proot/issues/106).
(setenv "PROOT_NO_SECCOMP" "1")
;; Most of the tests expect "/bin" to be in $PATH so ;; Most of the tests expect "/bin" to be in $PATH so
;; they can run things that live in $ROOTFS/bin. ;; they can run things that live in $ROOTFS/bin.
(setenv "PATH" (setenv "PATH"
@ -7096,11 +7098,7 @@ (define-public proot
(native-inputs `(("which" ,which) (native-inputs `(("which" ,which)
;; For 'mcookie', used by some of the tests. ;; For 'mcookie', used by some of the tests.
("util-linux" ,util-linux) ("util-linux" ,util-linux)
;; XXX: Choose the old coreutils because its 'stat' ("coreutils" ,coreutils)
;; program does not use statx(2) when running 'stat -c
;; %a' or similar, which PRoot doesn't properly support
;; (see: https://github.com/proot-me/proot/issues/262).
("coreutils-old" ,coreutils-8.30)
("pkg-config" ,pkg-config) ("pkg-config" ,pkg-config)
;; For rst2man, used to generate the manual page. ;; For rst2man, used to generate the manual page.
("python-docutils" ,python-docutils))) ("python-docutils" ,python-docutils)))
@ -7118,7 +7116,7 @@ (define-public proot
generic process instrumentation engine thanks to its extension mechanism. generic process instrumentation engine thanks to its extension mechanism.
Technically PRoot relies on @code{ptrace}, an unprivileged system-call Technically PRoot relies on @code{ptrace}, an unprivileged system-call
available in the kernel Linux.") available in the kernel Linux.")
(license license:gpl2+))) (license license:gpl2+))))
(define-public proot-static (define-public proot-static
(package (package