Skip to content

SIM_LOG_DIR points to "${SCRIPT_DIR:?}"/log rather then /etc/astra-sim which requires sudo priviledges.#255

Open
marcodamico wants to merge 2 commits into
aliyun:masterfrom
marcodamico:SIM_LOG_DIR_fix
Open

SIM_LOG_DIR points to "${SCRIPT_DIR:?}"/log rather then /etc/astra-sim which requires sudo priviledges.#255
marcodamico wants to merge 2 commits into
aliyun:masterfrom
marcodamico:SIM_LOG_DIR_fix

Conversation

@marcodamico

Copy link
Copy Markdown

This solves #254

@tianhao909 tianhao909 requested a review from Copilot March 31, 2026 13:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses issue #254 by changing SIM_LOG_DIR in Astra-Sim build scripts from a system-level path (/etc/astra-sim) to a repo-local path ("${SCRIPT_DIR:?}"/log), avoiding the need for sudo during directory creation.

Changes:

  • Update SIM_LOG_DIR in the top-level astra-sim-alibabacloud/build.sh to use a writable repo-local log/ directory.
  • Update SIM_LOG_DIR in astra-sim-alibabacloud/build/astra_ns3/build.sh to use a script-local log/ directory.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
astra-sim-alibabacloud/build/astra_ns3/build.sh Changes SIM_LOG_DIR away from /etc/astra-sim to avoid sudo-required paths in the ns3 build script.
astra-sim-alibabacloud/build.sh Changes SIM_LOG_DIR away from /etc/astra-sim so the build creates log/input/result directories in a user-writable location.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread astra-sim-alibabacloud/build/astra_ns3/build.sh Outdated
Comment thread astra-sim-alibabacloud/build.sh
…a-sim

- export SIM_LOG_DIR from top-level build.sh so child scripts inherit it
- ns3/build.sh inherits parent value or falls back to ../../log (same dir)
- remove undefined BUILD_DIR cd that aborted compile function early
- guard LOG_PATH and RESULT_PATH with #ifndef SIM_LOG_DIR; fall back to
  /etc/astra-sim when env var not set at cmake time
- phynet/CMakeLists.txt injects -DSIM_LOG_DIR when env var is present

Closes aliyun#254
@marcodamico

Copy link
Copy Markdown
Author

Use repo-local SIM_LOG_DIR, avoid sudo-required /etc/astra-sim

  • export SIM_LOG_DIR from top-level build.sh so child scripts inherit it
  • ns3/build.sh inherits parent value or falls back to ../../log (same dir)
  • remove undefined BUILD_DIR cd that aborted compile function early
  • guard LOG_PATH and RESULT_PATH with #ifndef SIM_LOG_DIR; fall back to
    /etc/astra-sim when env var not set at cmake time
  • phynet/CMakeLists.txt injects -DSIM_LOG_DIR when env var is present

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants