diff --git a/setup/hive_rpi_setup.py b/setup/hive_rpi_setup.py index 5dcc843..d333045 100644 --- a/setup/hive_rpi_setup.py +++ b/setup/hive_rpi_setup.py @@ -102,6 +102,8 @@ def setup_hive(hive_user: str, hive_group: str, runner_user: str, create: bool): setup_routines.setup_os() + setup_routines.setup_bubblewrap() + setup_routines.setup_debug_probe_permissions() setup_routines.setup_storage(groupname=hive_group) diff --git a/setup/setup.py b/setup/setup.py index bd51bf0..ba3ec86 100644 --- a/setup/setup.py +++ b/setup/setup.py @@ -256,6 +256,26 @@ def setup_os(): exit(1) +def setup_bubblewrap(): + """Installs bubblewrap sandbox used by Hive""" + + print("Installing bubblewrap sandbox...") + + try: + res = subprocess.run( + ["apt", "install", "bubblewrap", "--yes"], check=True, capture_output=True) + print("Successfully installed bubblewrap sandbox") + except subprocess.CalledProcessError: + reason = res.stderr.decode("utf-8", "ignore") + print( + f"Failed to install bubblewrap sandbox: {reason}") + exit(1) + except Exception as e: + print( + f"Failed to install bubblewrap sandbox: {e}") + exit(1) + + def setup_monitor(create: bool, username: str, groupname: str): """Downloads the Testserver data and installs it on the home directory of the Hive user""" # TODO: probably download tar archive to have filesystem already in place, need a different function for update runs then