summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2022-03-08 11:58:41 +0200
committerEfraim Flashner <efraim@flashner.co.il>2022-03-08 11:58:41 +0200
commit875053310277ccdcb82ff86edf013cd28e6778c8 (patch)
tree0f0592074df8982deb58ea84beaa3d8a8e224084
parent7311a36a544149e5a4478f89df29084a880edd78 (diff)
downloadguix-patches-875053310277ccdcb82ff86edf013cd28e6778c8.tar
guix-patches-875053310277ccdcb82ff86edf013cd28e6778c8.tar.gz
gnu: proot: Update to 5.3.0.
* gnu/packages/linux.scm (proot): Update to 5.3.0. [arguments]: Adjust custom 'patch-sources phase to adjust skipped tests.
-rw-r--r--gnu/packages/linux.scm244
1 files changed, 109 insertions, 135 deletions
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 96650d6abc..107e7fd7a0 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -7245,140 +7245,114 @@ userspace queueing component and the logging subsystem.")
(license license:gpl2)))
(define-public proot
- (let ((revision "0")
- (commit "a70023ab3db47d011265451b99a1abef7b9d7afc"))
- (package
- (name "proot")
- ;; The last stable release was made in 2015, and fails to build for the
- ;; aarch64 platform. Use the latest commit, which includes fixes for
- ;; the supported ARM architectures and the test suite, among others.
- (version (git-version "5.2.0-alpha" revision commit))
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/proot-me/PRoot")
- (commit (string-append commit))))
- (file-name (git-file-name name version))
- (sha256
- (base32 "1kmry3rb967phxnxjfnx310gy1d4gpmjd6fp3hbm9v9jciysxy4z"))))
- (build-system gnu-build-system)
- ;; The powerpc64le-linux and mips64el-linux architectures are not
- ;; supported (see:
- ;; https://github.com/proot-me/proot/blob/master/src/arch.h#L51).
- (supported-systems '("x86_64-linux" "i686-linux"
- "armhf-linux" "aarch64-linux" "i586-gnu"))
- (arguments
- ;; Disable the test suite on armhf-linux, as there are too many
- ;; failures to keep track of (see for example:
- ;; https://github.com/proot-me/proot/issues/286).
- `(#:tests? ,(not (string-prefix? "armhf"
- (or (%current-target-system)
- (%current-system))))
- #:make-flags '("-C" "src")
- #:phases (modify-phases %standard-phases
- (add-after 'unpack 'patch-sources
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* (find-files "src" "\\.[ch]$")
- (("\"/bin/sh\"")
- (string-append "\"" (assoc-ref inputs "bash")
- "/bin/sh\"")))
-
- (substitute* "src/GNUmakefile"
- (("/bin/echo") (which "echo"))
- (("^VERSION = .*")
- (string-append "VERSION := " ,version "\n")))
-
- (substitute* (find-files "test" "\\.sh$")
- ;; Some of the tests try to "bind-mount" /bin/true.
- (("-b /bin/true:")
- (string-append "-b " (which "true") ":"))
- ;; Likewise for /bin.
- (("-b /bin:") "-b /gnu:")
- ;; Others try to run /bin/sh.
- (("/bin/sh") (which "sh"))
- ;; Others assume /etc/fstab exists.
- (("/etc/fstab") "/etc/passwd"))
- (substitute* "test/GNUmakefile"
- (("-b /bin:") "-b /gnu:"))
- (substitute* "test/test-c6b77b77.mk"
- (("/bin/bash") (which "bash"))
- (("/usr/bin/test") (which "test")))
- (substitute* "test/test-16573e73.c"
- (("/bin/([a-z-]+)" _ program)
- (which program)))
- (substitute* "test/test-d2175fc3.sh"
- (("\\^/bin/true\\$") "$(which true)"))
- (substitute* "test/test-5467b986.sh"
- (("-w /usr") "-w /gnu")
- (("-w usr") "-w gnu")
- (("/usr/share") "/gnu/store")
- (("share") "store"))
- (substitute* "test/test-092c5e26.sh"
- (("-q echo ")
- "-q $(which echo) "))
-
- ;; The following tests are known to fail (see:
- ;; https://github.com/proot-me/proot/issues/184).
- (delete-file "test/test-0228fbe7.sh")
- (delete-file "test/test-2db65cd2.sh")
- (delete-file "test/test-cdd39012.sh")
- (delete-file "test/test-d92b57ca.sh")
-
- ;; This one fails on a waitpid call that returns 1 (see:
- ;; https://github.com/proot-me/proot/issues/261).
- (delete-file "test/test-ptrace01.c")
-
- ;; XXX: This test fails in an obscure corner case, just
- ;; skip it.
- (delete-file "test/test-kkkkkkkk.c")
-
- ;; This one requires Docker.
- (delete-file "test/test-docker.sh")
-
- ;; The socket tests requires networking.
- (for-each delete-file
- (find-files "test" "test-socket.*\\.sh$"))))
- (delete 'configure)
- (add-after 'build 'build-manpage
- (lambda _
- (with-directory-excursion "doc"
- (invoke "make" "proot/man.1" "SUFFIX=.py"))))
- (replace 'check
- (lambda* (#:key tests? #:allow-other-keys)
- (when tests?
- (let ((n (parallel-job-count)))
- ;; Most of the tests expect "/bin" to be in $PATH so
- ;; they can run things that live in $ROOTFS/bin.
- (setenv "PATH"
- (string-append (getenv "PATH") ":/bin"))
- (invoke "make" "check" "-C" "test"
- ;;"V=1"
- "-j" (number->string n))))))
- (replace 'install
- (lambda* (#:key outputs #:allow-other-keys)
- ;; The 'install' rule does nearly nothing.
- (let* ((out (assoc-ref outputs "out"))
- (man1 (string-append out "/share/man/man1")))
- ;; TODO: 'make install-care' (does not even
- ;; build currently.)
- (invoke "make" "-C" "src" "install"
- (string-append "PREFIX=" out))
- (mkdir-p man1)
- (copy-file "doc/proot/man.1"
- (string-append man1 "/proot.1"))))))))
- (native-inputs (list which
- ;; For 'mcookie', used by some of the tests.
- util-linux
- coreutils
- pkg-config
- ;; For rst2man, used to generate the manual page.
- python-docutils))
- (inputs (list libarchive talloc))
- (home-page "https://github.com/proot-me/PRoot")
- (synopsis "Unprivileged chroot, bind mount, and binfmt_misc")
- (description
- "PRoot is a user-space implementation of @code{chroot}, @code{mount --bind},
+ (package
+ (name "proot")
+ (version "5.3.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/proot-me/PRoot")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1r1ga3xbwq5kx4i8ihj1p6nmgaa14lfkwxzpsbdcmfh1jimpbmzk"))))
+ (build-system gnu-build-system)
+ ;; Many architectures are not supported (see:
+ ;; https://github.com/proot-me/proot/blob/master/src/arch.h#L51).
+ (supported-systems '("x86_64-linux" "i686-linux"
+ "armhf-linux" "aarch64-linux" "i586-gnu"))
+ (arguments
+ ;; Disable the test suite on armhf-linux, as there are too many
+ ;; failures to keep track of (see for example:
+ ;; https://github.com/proot-me/proot/issues/286).
+ `(#:tests? ,(not (string-prefix? "armhf"
+ (or (%current-target-system)
+ (%current-system))))
+ #:make-flags '("-C" "src")
+ #:phases (modify-phases %standard-phases
+ (add-after 'unpack 'patch-sources
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* (find-files "src" "\\.[ch]$")
+ (("\"/bin/sh\"")
+ (string-append "\"" (assoc-ref inputs "bash")
+ "/bin/sh\"")))
+
+ (substitute* "src/GNUmakefile"
+ (("/bin/echo") (which "echo"))
+ (("^VERSION = .*")
+ (string-append "VERSION := " ,version "\n")))
+
+ (substitute* (find-files "test" "\\.sh$")
+ ;; Some of the tests try to "bind-mount" /bin/true.
+ (("-b /bin/true:")
+ (string-append "-b " (which "true") ":"))
+ ;; Likewise for /bin.
+ (("-b /bin:") "-b /gnu:")
+ ;; Others try to run /bin/sh.
+ (("/bin/sh") (which "sh"))
+ ;; Others assume /etc/fstab exists.
+ (("/etc/fstab") "/etc/passwd"))
+ (substitute* "test/GNUmakefile"
+ (("-b /bin:") "-b /gnu:"))
+ (substitute* "test/test-c6b77b77.mk"
+ (("/bin/bash") (which "bash"))
+ (("/usr/bin/test") (which "test")))
+ (substitute* "test/test-16573e73.c"
+ (("/bin/([a-z-]+)" _ program)
+ (which program)))
+ (substitute* "test/test-5467b986.sh"
+ (("-w /usr") "-w /gnu")
+ (("-w usr") "-w gnu")
+ (("/usr/share") "/gnu/store")
+ (("share") "store"))
+ (substitute* "test/test-092c5e26.sh"
+ (("-q echo ")
+ "-q $(which echo) "))
+
+ ;; The socket tests requires networking.
+ (for-each delete-file
+ (find-files "test" "test-socket.*\\.sh$"))))
+ (delete 'configure)
+ (add-after 'build 'build-manpage
+ (lambda _
+ (with-directory-excursion "doc"
+ (invoke "make" "proot/man.1" "SUFFIX=.py"))))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (let ((n (parallel-job-count)))
+ ;; Most of the tests expect "/bin" to be in $PATH so
+ ;; they can run things that live in $ROOTFS/bin.
+ (setenv "PATH"
+ (string-append (getenv "PATH") ":/bin"))
+ (invoke "make" "check" "-C" "test"
+ ;;"V=1"
+ "-j" (number->string n))))))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; The 'install' rule does nearly nothing.
+ (let* ((out (assoc-ref outputs "out"))
+ (man1 (string-append out "/share/man/man1")))
+ ;; TODO: 'make install-care' (does not even
+ ;; build currently.)
+ (invoke "make" "-C" "src" "install"
+ (string-append "PREFIX=" out))
+ (mkdir-p man1)
+ (copy-file "doc/proot/man.1"
+ (string-append man1 "/proot.1"))))))))
+ (native-inputs (list which
+ ;; For 'mcookie', used by some of the tests.
+ util-linux
+ coreutils
+ pkg-config
+ ;; For rst2man, used to generate the manual page.
+ python-docutils))
+ (inputs (list libarchive talloc))
+ (home-page "https://github.com/proot-me/PRoot")
+ (synopsis "Unprivileged chroot, bind mount, and binfmt_misc")
+ (description
+ "PRoot is a user-space implementation of @code{chroot}, @code{mount --bind},
and @code{binfmt_misc}. This means that users don't need any privileges or
setup to do things like using an arbitrary directory as the new root
file system, making files accessible somewhere else in the file system
@@ -7387,7 +7361,7 @@ transparently through QEMU user-mode. Also, developers can use PRoot as a
generic process instrumentation engine thanks to its extension mechanism.
Technically PRoot relies on @code{ptrace}, an unprivileged system-call
available in the kernel Linux.")
- (license license:gpl2+))))
+ (license license:gpl2+)))
(define-public proot-static
(package