summary refs log tree commit diff
path: root/gnu/packages/virtualization.scm
diff options
context:
space:
mode:
authorkiasoc5 <kiasoc5@tutanota.com>2022-01-10 17:58:35 -0500
committerLudovic Courtès <ludo@gnu.org>2022-01-13 23:11:19 +0100
commit904a6567a89014bdad476f7aee0c5ad5e4898ea2 (patch)
tree787d119971101ef251b7ae2c1ce8923366210db5 /gnu/packages/virtualization.scm
parent641b599d0bd1902abeab19e286cdd6c368f8daa3 (diff)
downloadguix-904a6567a89014bdad476f7aee0c5ad5e4898ea2.tar.gz
gnu: bubblewrap: Update to 0.5.0.
* gnu/packages/patches/bubblewrap-fix-locale-in-tests.patch: Add it.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/virtualization.scm (bubblewrap): Update to 0.5.0.
[source]: Add patch.
[arguments]: Adjust test substitutions.
[inputs]: Remove labels.
[native-inputs]: Remove labels.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/packages/virtualization.scm')
-rw-r--r--gnu/packages/virtualization.scm24
1 files changed, 15 insertions, 9 deletions
diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index 82cc02b738..cec1bce5f3 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -1926,7 +1926,7 @@ virtual machines.")
 (define-public bubblewrap
   (package
     (name "bubblewrap")
-    (version "0.4.1")
+    (version "0.5.0")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://github.com/containers/bubblewrap/"
@@ -1934,7 +1934,8 @@ virtual machines.")
                                   version ".tar.xz"))
               (sha256
                (base32
-                "00ycgi6q2yngh06bnz50wkvar6r2jnjf3j158grhi9k13jdrpimr"))))
+                "0608l2sjwhnb1c0mslah1h6yjvqr17wk60by6i710qwxg4rszz8n"))
+               (patches (search-patches "bubblewrap-fix-locale-in-tests.patch"))))
     (build-system gnu-build-system)
     (arguments
      `(#:phases
@@ -1950,7 +1951,9 @@ virtual machines.")
                (substitute* "tests/test-run.sh"
                  (("/var/tmp") tmp-dir)
                  ;; Tests create a temporary python script, so fix its shebang.
-                 (("/usr/bin/env python") (which "python"))
+                 (("/usr/bin/env python3") (which "python3"))
+                 ;; Tests call /usr/bin/env, so fix its path.
+                 (("/usr/bin/env") (which "env"))
                  ;; Some tests try to access /usr, but that doesn't exist.
                  ;; Give them /gnu instead.
                  (("/usr") "/gnu")
@@ -1959,18 +1962,21 @@ virtual machines.")
                  (("--ro-bind /lib /lib") "--ro-bind /gnu /lib")
                  (("  */bin/bash") (which "bash"))
                  (("/bin/sh") (which "sh"))
-                 (("findmnt") (which "findmnt"))))
+                 (("findmnt") (which "findmnt")))
+               (substitute* "tests/libtest.sh"
+                 (("/var/tmp") tmp-dir)
+                 (("/usr") "/gnu")
+                 (("--ro-bind /bin /bin") "--ro-bind /gnu /bin")
+                 (("--ro-bind /sbin /sbin") "--ro-bind /gnu /sbin")
+                 (("--ro-bind /lib /lib") "--ro-bind /gnu /lib")))
              #t))
          ;; Remove the directory we gave to tests to have a clean package.
          (add-after 'check 'remove-tmp-dir
            (lambda* (#:key outputs #:allow-other-keys)
              (delete-file-recursively (string-append (assoc-ref outputs "out") "/tmp"))
              #t)))))
-    (inputs
-     (list libcap))
-    (native-inputs
-     `(("python" ,python-wrapper)
-       ("util-linux" ,util-linux)))
+    (inputs (list libcap))
+    (native-inputs (list python-wrapper util-linux))
     (home-page "https://github.com/containers/bubblewrap")
     (synopsis "Unprivileged sandboxing tool")
     (description "Bubblewrap is aimed at running applications in a sandbox,