mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-26 20:49:29 -05:00
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>
This commit is contained in:
parent
641b599d0b
commit
904a6567a8
3 changed files with 50 additions and 9 deletions
|
@ -911,6 +911,7 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/binutils-mingw-w64-deterministic.patch \
|
%D%/packages/patches/binutils-mingw-w64-deterministic.patch \
|
||||||
%D%/packages/patches/bpftrace-disable-bfd-disasm.patch \
|
%D%/packages/patches/bpftrace-disable-bfd-disasm.patch \
|
||||||
%D%/packages/patches/byobu-writable-status.patch \
|
%D%/packages/patches/byobu-writable-status.patch \
|
||||||
|
%D%/packages/patches/bubblewrap-fix-locale-in-tests.patch \
|
||||||
%D%/packages/patches/cabal-install-base16-bytestring1.0.patch \
|
%D%/packages/patches/cabal-install-base16-bytestring1.0.patch \
|
||||||
%D%/packages/patches/cabal-install-ghc8.10.patch \
|
%D%/packages/patches/cabal-install-ghc8.10.patch \
|
||||||
%D%/packages/patches/cairo-CVE-2018-19876.patch \
|
%D%/packages/patches/cairo-CVE-2018-19876.patch \
|
||||||
|
|
34
gnu/packages/patches/bubblewrap-fix-locale-in-tests.patch
Normal file
34
gnu/packages/patches/bubblewrap-fix-locale-in-tests.patch
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
From 9282223de4b511aeda3b7d2caf3810a56a865710 Mon Sep 17 00:00:00 2001
|
||||||
|
From: kiasoc5 <kiasoc5@tutanota.com>
|
||||||
|
Date: Mon, 10 Jan 2022 14:16:32 -0500
|
||||||
|
Subject: [PATCH] Use C locale unconditionally for tests.
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
The ‘en_US.utf8’ locale is available. However, the ‘locale -a’ command won’t list it.
|
||||||
|
---
|
||||||
|
tests/libtest-core.sh | 7 +------
|
||||||
|
1 file changed, 1 insertion(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/tests/libtest-core.sh b/tests/libtest-core.sh
|
||||||
|
index 9632e90..82951dd 100644
|
||||||
|
--- a/tests/libtest-core.sh
|
||||||
|
+++ b/tests/libtest-core.sh
|
||||||
|
@@ -41,12 +41,7 @@ assert_not_reached () {
|
||||||
|
#
|
||||||
|
# If we can't find the locale command assume we have support for C.UTF-8
|
||||||
|
# (e.g. musl based systems)
|
||||||
|
-if type -p locale >/dev/null; then
|
||||||
|
- export LC_ALL=$(locale -a | grep -iEe '^(C|en_US)\.(UTF-8|utf8)$' | head -n1 || true)
|
||||||
|
- if [ -z "${LC_ALL}" ]; then fatal "Can't find suitable UTF-8 locale"; fi
|
||||||
|
-else
|
||||||
|
- export LC_ALL=C.UTF-8
|
||||||
|
-fi
|
||||||
|
+export LC_ALL=en_US.utf8
|
||||||
|
# A GNU extension, used whenever LC_ALL is not C
|
||||||
|
unset LANGUAGE
|
||||||
|
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
|
@ -1926,7 +1926,7 @@ (define-public python-vagrant
|
||||||
(define-public bubblewrap
|
(define-public bubblewrap
|
||||||
(package
|
(package
|
||||||
(name "bubblewrap")
|
(name "bubblewrap")
|
||||||
(version "0.4.1")
|
(version "0.5.0")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (string-append "https://github.com/containers/bubblewrap/"
|
(uri (string-append "https://github.com/containers/bubblewrap/"
|
||||||
|
@ -1934,7 +1934,8 @@ (define-public bubblewrap
|
||||||
version ".tar.xz"))
|
version ".tar.xz"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"00ycgi6q2yngh06bnz50wkvar6r2jnjf3j158grhi9k13jdrpimr"))))
|
"0608l2sjwhnb1c0mslah1h6yjvqr17wk60by6i710qwxg4rszz8n"))
|
||||||
|
(patches (search-patches "bubblewrap-fix-locale-in-tests.patch"))))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:phases
|
`(#:phases
|
||||||
|
@ -1950,7 +1951,9 @@ (define-public bubblewrap
|
||||||
(substitute* "tests/test-run.sh"
|
(substitute* "tests/test-run.sh"
|
||||||
(("/var/tmp") tmp-dir)
|
(("/var/tmp") tmp-dir)
|
||||||
;; Tests create a temporary python script, so fix its shebang.
|
;; 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.
|
;; Some tests try to access /usr, but that doesn't exist.
|
||||||
;; Give them /gnu instead.
|
;; Give them /gnu instead.
|
||||||
(("/usr") "/gnu")
|
(("/usr") "/gnu")
|
||||||
|
@ -1959,18 +1962,21 @@ (define-public bubblewrap
|
||||||
(("--ro-bind /lib /lib") "--ro-bind /gnu /lib")
|
(("--ro-bind /lib /lib") "--ro-bind /gnu /lib")
|
||||||
((" */bin/bash") (which "bash"))
|
((" */bin/bash") (which "bash"))
|
||||||
(("/bin/sh") (which "sh"))
|
(("/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))
|
#t))
|
||||||
;; Remove the directory we gave to tests to have a clean package.
|
;; Remove the directory we gave to tests to have a clean package.
|
||||||
(add-after 'check 'remove-tmp-dir
|
(add-after 'check 'remove-tmp-dir
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(delete-file-recursively (string-append (assoc-ref outputs "out") "/tmp"))
|
(delete-file-recursively (string-append (assoc-ref outputs "out") "/tmp"))
|
||||||
#t)))))
|
#t)))))
|
||||||
(inputs
|
(inputs (list libcap))
|
||||||
(list libcap))
|
(native-inputs (list python-wrapper util-linux))
|
||||||
(native-inputs
|
|
||||||
`(("python" ,python-wrapper)
|
|
||||||
("util-linux" ,util-linux)))
|
|
||||||
(home-page "https://github.com/containers/bubblewrap")
|
(home-page "https://github.com/containers/bubblewrap")
|
||||||
(synopsis "Unprivileged sandboxing tool")
|
(synopsis "Unprivileged sandboxing tool")
|
||||||
(description "Bubblewrap is aimed at running applications in a sandbox,
|
(description "Bubblewrap is aimed at running applications in a sandbox,
|
||||||
|
|
Loading…
Reference in a new issue