|
@@ -804,6 +804,7 @@ def render_mod_host_service(config):
|
|
|
binary = ROOT / config["binary_source"]
|
|
binary = ROOT / config["binary_source"]
|
|
|
service_template = ROOT / config["service_source"]
|
|
service_template = ROOT / config["service_source"]
|
|
|
configure_script = ROOT / config["configure_script"]
|
|
configure_script = ROOT / config["configure_script"]
|
|
|
|
|
+ readiness_script = ROOT / config["readiness_script"]
|
|
|
state_file = ROOT / "config" / "desired-state.yaml"
|
|
state_file = ROOT / "config" / "desired-state.yaml"
|
|
|
if not binary.is_file() or not os.access(binary, os.X_OK):
|
|
if not binary.is_file() or not os.access(binary, os.X_OK):
|
|
|
raise RuntimeError(f"ARM64 mod-host artifact is missing or not executable: {binary}")
|
|
raise RuntimeError(f"ARM64 mod-host artifact is missing or not executable: {binary}")
|
|
@@ -811,11 +812,15 @@ def render_mod_host_service(config):
|
|
|
raise RuntimeError(f"mod-host service template is missing: {service_template}")
|
|
raise RuntimeError(f"mod-host service template is missing: {service_template}")
|
|
|
if not configure_script.is_file():
|
|
if not configure_script.is_file():
|
|
|
raise RuntimeError(f"mod-host startup configurator is missing: {configure_script}")
|
|
raise RuntimeError(f"mod-host startup configurator is missing: {configure_script}")
|
|
|
|
|
+ if not readiness_script.is_file():
|
|
|
|
|
+ raise RuntimeError(f"mod-host PipeWire readiness checker is missing: {readiness_script}")
|
|
|
replacements = {
|
|
replacements = {
|
|
|
"@PW_JACK@": systemd_quote(config["pw_jack_path"]),
|
|
"@PW_JACK@": systemd_quote(config["pw_jack_path"]),
|
|
|
"@MOD_HOST_BINARY@": systemd_quote(binary.resolve()),
|
|
"@MOD_HOST_BINARY@": systemd_quote(binary.resolve()),
|
|
|
"@SOCKET_PORT@": str(config["socket_port"]),
|
|
"@SOCKET_PORT@": str(config["socket_port"]),
|
|
|
"@PYTHON@": systemd_quote(config["python_path"]),
|
|
"@PYTHON@": systemd_quote(config["python_path"]),
|
|
|
|
|
+ "@READINESS_SCRIPT@": systemd_quote(readiness_script.resolve()),
|
|
|
|
|
+ "@PORT_WAIT_TIMEOUT_SECONDS@": str(config["port_wait_timeout_seconds"]),
|
|
|
"@CONFIGURE_SCRIPT@": systemd_quote(configure_script.resolve()),
|
|
"@CONFIGURE_SCRIPT@": systemd_quote(configure_script.resolve()),
|
|
|
"@DESIRED_STATE@": systemd_quote(state_file.resolve()),
|
|
"@DESIRED_STATE@": systemd_quote(state_file.resolve()),
|
|
|
"@REPOSITORY_ROOT@": systemd_quote(ROOT.resolve()),
|
|
"@REPOSITORY_ROOT@": systemd_quote(ROOT.resolve()),
|
|
@@ -1119,13 +1124,14 @@ def deploy_reconcile(action, config, registry):
|
|
|
def mod_host_runtime_digest(config):
|
|
def mod_host_runtime_digest(config):
|
|
|
state_path = ROOT / "config" / "desired-state.yaml"
|
|
state_path = ROOT / "config" / "desired-state.yaml"
|
|
|
script_path = ROOT / config["configure_script"]
|
|
script_path = ROOT / config["configure_script"]
|
|
|
|
|
+ readiness_script = ROOT / config["readiness_script"]
|
|
|
validator_path = ROOT / "scripts" / "validate_desired_state.py"
|
|
validator_path = ROOT / "scripts" / "validate_desired_state.py"
|
|
|
binary_path = ROOT / config["binary_source"]
|
|
binary_path = ROOT / config["binary_source"]
|
|
|
with state_path.open(encoding="utf-8") as stream:
|
|
with state_path.open(encoding="utf-8") as stream:
|
|
|
state = yaml.safe_load(stream)
|
|
state = yaml.safe_load(stream)
|
|
|
guitar_chain = state["routing"]["mod_host_chains"]["guitar"]
|
|
guitar_chain = state["routing"]["mod_host_chains"]["guitar"]
|
|
|
mod_host_config = state["deployment"]["mod_host"]
|
|
mod_host_config = state["deployment"]["mod_host"]
|
|
|
- files = [script_path, validator_path, binary_path]
|
|
|
|
|
|
|
+ files = [script_path, readiness_script, validator_path, binary_path]
|
|
|
for processor in guitar_chain["processors"]:
|
|
for processor in guitar_chain["processors"]:
|
|
|
asset_path = PurePosixPath(processor["asset_path"])
|
|
asset_path = PurePosixPath(processor["asset_path"])
|
|
|
if asset_path.is_absolute() or ".." in asset_path.parts:
|
|
if asset_path.is_absolute() or ".." in asset_path.parts:
|