From 36a6733581e77cf167107a9ac638ece1100fb1b3 Mon Sep 17 00:00:00 2001 From: Alexander Batischev Date: Sun, 18 Oct 2020 00:38:22 +0300 Subject: chore: make ./check run on Debian bullseye Debian bullseye (which is the current testing branch) installs `daemonize` to /usr/bin rather than /usr/sbin: https://salsa.debian.org/alvinch_chen-guest/daemonize/-/commit/4cfa62a019599c1e96c702052e912d1642a256ac --- subplot/daemon.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'subplot') diff --git a/subplot/daemon.py b/subplot/daemon.py index c6285bf..4d60fd0 100644 --- a/subplot/daemon.py +++ b/subplot/daemon.py @@ -14,6 +14,7 @@ def start_daemon(ctx, name, argv): runcmd_exit_code_is = globals()["runcmd_exit_code_is"] runcmd_get_exit_code = globals()["runcmd_get_exit_code"] runcmd_get_stderr = globals()["runcmd_get_stderr"] + runcmd_prepend_to_path = globals()["runcmd_prepend_to_path"] logging.debug(f"Starting daemon {name}") logging.debug(f" ctx={ctx.as_dict()}") @@ -28,10 +29,13 @@ def start_daemon(ctx, name, argv): "stderr": f"{name}.stderr", "stdout": f"{name}.stdout", } + # Debian up to 10 installs `daemonize` to /usr/sbin, which isn't part of + # the minimal environment that Subplot sets up. + runcmd_prepend_to_path(ctx, "/usr/sbin") runcmd_run( ctx, [ - "/usr/sbin/daemonize", + "daemonize", "-c", os.getcwd(), "-p", -- cgit v1.2.1