Add compatibility checks for fancy parts of the demos

[?]
Apr 11, 2023, 4:58 PM
3GPSC2KX5CFCXSFTNLK5Z466UNEOHVZJ4KDHMMJDSWEA7MPRVDNQC

Dependencies

Change contents

  • edit in 07-vm-integration-test/demo.sh at line 29
    [3.5696]
    [3.5696]
    # https://github.com/NixOS/nixpkgs/issues/124371
    if [ "$(stat -c '%a' /dev/kvm)" != 666 ]; then
    n "If /dev/kvm is not world-read-writable VMs will be emulated which is prohibitively slow!"
    fi
  • edit in 04-cmake-and-cross/demo.sh at line 50
    [8.1419]
    [8.1419]
    if [ ! -e /proc/sys/fs/binfmt_misc/aarch64-linux ] || ! grep -q enabled /proc/sys/fs/binfmt_misc/aarch64-linux; then
    n "It seems aarch64-linux binfmt emulation is not available, the following part of the demo may not work"
    fi
  • edit in 04-cmake-and-cross/demo.sh at line 61
    [9.2414]
    [7.1980]
    ,
    , " boot.binfmt.emulatedSystems = [ \"aarch64-linux\" ];"
  • edit in 03-nix-container/podman-setup-script.nix at line 27
    [4.1723][4.12:65](),[4.65][2.287:437]()
    fi
    if ! grep -q "^''${USER}:" /etc/subuid; then
    >&2 echo "No subuid range defined for user, consider running 'sudo usermod --add-subuids 10000-75535 ''${USER}' to allow rootless podman to work"
  • edit in 03-nix-container/demo.sh at line 20
    [10.5627]
    [10.5627]
    if ! grep -q "^${USER}:" /etc/subuid; then
    n "No subuid range defined for user, consider running 'sudo usermod --add-subuids 10000-75535 ${USER}' to allow rootless podman to work"
    fi