| Age | Commit message (Collapse) | Author |
|
maturin (pyo3 build backend) defaults to writing wheels under
$CARGO_HOME/../../../rust/target relative to the source, which resolves
to /opt/astrbot/rust/target/wheels — not writable by the astrbot user.
Setting CARGO_TARGET_DIR=/var/cache/astrbot/cargo_target redirects all
cargo/maturin build artifacts to a writable location.
|
|
Set CARGO_HOME and RUSTUP_HOME to /var/cache/astrbot/cargo and
/var/cache/astrbot/rustup so that uv pip install can build Rust
extensions without needing write access to /opt/astrbot/rust/target.
Changes:
- setup_runtime_env: export CARGO_HOME and RUSTUP_HOME
- .env file generation: include CARGO_HOME and RUSTUP_HOME
- ensure_instance_env_synced: pass CARGO_HOME/RUSTUP_HOME to uv pip install
- run_astrbot: pass CARGO_HOME/RUSTUP_HOME to uv pip install
- astrbot@.service: add ReadWritePaths for cargo and rustup dirs
- astrbot-git.install: create cargo/rustup/python dirs on install
|
|
|
|
|
|
|
|
ProtectSystem=strict
|
|
hardcoded UV_CACHE_DIR
|
|
issues
|
|
- systemd ExecStart now calls __run_astrbot directly, skipping the
'run' command wrapper that parses --host/--port arguments
- 'astrbotctl run <instance>' now calls run_astrbot directly with
user-passed args; config-based host/port come from .env (generated
by setup_runtime_env)
- removed pointless '_runuser_with_env ... :' no-op call in run_astrbot
- init and cli commands unchanged; they still call run_astrbot correctly
- shellcheck still clean, all tests pass
|
|
The script's setup_runtime_env() overwrites all XDG_* variables computed
by the systemd service, so they are redundant and can cause path mismatches
(e.g. XDG_DATA_HOME=.../data vs script computing .../home/.local/share).
Keep only what the script cannot derive: ASTRBOT_SYSTEMD, ASTRBOT_DESKTOP_CLIENT,
and UV cache/install dirs. All per-instance paths (ASTRBOT_HOME, XDG_*,
UV_PROJECT_ENVIRONMENT) are set by setup_runtime_env() which runs before
the Python process starts.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|