diff --git a/docs/install2.md b/docs/install2.md index 9d8d97a4..1eb94695 100644 --- a/docs/install2.md +++ b/docs/install2.md @@ -92,6 +92,7 @@ python3 -m pip install --user grpcio==1.27.2 grpcio-tools==1.27.2 # build core ./bootstrap.sh +# centos requires --prefix=/usr ./configure make sudo make install @@ -112,9 +113,11 @@ cd .. pipx install invoke # install core scripts leveraging poetry virtual environment +# centos requires --prefix=/usr inv install-scripts # optionally install systemd service file +# centos requires --prefix=/usr inv install-service ``` diff --git a/tasks.py b/tasks.py index 9168542c..5c335644 100644 --- a/tasks.py +++ b/tasks.py @@ -115,8 +115,7 @@ def install_grpcio(c: Context, hide: bool) -> None: def build(c: Context, os_info: OsInfo, hide: bool) -> None: print("building core...") c.run("./bootstrap.sh", hide=hide) - # prefix = "--prefix=/usr" if os_info.like == OsLike.REDHAT else "" - prefix = "" + prefix = "--prefix=/usr" if os_info.like == OsLike.REDHAT else "" c.run(f"./configure {prefix}", hide=hide) c.run("make -j$(nproc)", hide=hide) @@ -171,11 +170,11 @@ def install_ospf_mdr(c: Context, os_info: OsInfo, hide: bool) -> None: @task -def install_service(c, hide, prefix=DEFAULT_PREFIX): +def install_service(c, verbose=False, prefix=DEFAULT_PREFIX): """ install systemd core service """ - # install service + hide = not verbose bin_dir = Path(prefix).joinpath("bin") systemd_dir = Path("/lib/systemd/system/") service_file = systemd_dir.joinpath("core-daemon.service") @@ -203,11 +202,11 @@ def install_service(c, hide, prefix=DEFAULT_PREFIX): @task -def install_scripts(c, hide, prefix=DEFAULT_PREFIX): +def install_scripts(c, verbose=False, prefix=DEFAULT_PREFIX): """ install core script files, modified to leverage virtual environment """ - # install all scripts + hide = not verbose python = get_python(c) bin_dir = Path(prefix).joinpath("bin") for script in Path("daemon/scripts").iterdir():