Skip to content

Commit

Permalink
Setup: Install bubblewrap sandbox
Browse files Browse the repository at this point in the history
  • Loading branch information
TeyKey1 committed Feb 11, 2024
1 parent c869fa9 commit 509fa9f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
2 changes: 2 additions & 0 deletions setup/hive_rpi_setup.py
Expand Up @@ -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)
Expand Down
20 changes: 20 additions & 0 deletions setup/setup.py
Expand Up @@ -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
Expand Down

0 comments on commit 509fa9f

Please sign in to comment.