diff options
author | Joan Bruguera | 2023-03-15 04:20:46 +0000 |
---|---|---|
committer | Joan Bruguera | 2023-03-15 04:20:46 +0000 |
commit | 0efe1530428a6d40b1e836c85b235bdafbd41ee2 (patch) | |
tree | 21a8af6cc0c5b133fb2786bf298e12ec77fed19f | |
parent | 9ea42d4999695d2483449b00bf1565552eb899e1 (diff) | |
download | aur-0efe1530428a6d40b1e836c85b235bdafbd41ee2.tar.gz |
Skip tests if user namespaces are not supported or restricted.
-rw-r--r-- | PKGBUILD | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -17,6 +17,12 @@ build() { check() { cd $pkgname-$pkgver + # See https://github.com/nix-community/nix-user-chroot/tree/1.2.2#check-if-your-kernel-supports-user-namespaces-for-unprivileged-users + # Plus, ensure chroot works inside the user namespace (This fails, for example, inside a regular Podman container) + if ! unshare --user --pid --map-root-user chroot / true; then + echo "WARNING: Skipping tests because user namespaces are not supported or restricted" >&2 + return + fi cargo test --release --locked } |