Skip to content

run: allow suricatasc to be specified with an environment var - #3294

Open
jasonish wants to merge 1 commit into
OISF:masterfrom
jasonish:suricatasc-env/v1
Open

run: allow suricatasc to be specified with an environment var#3294
jasonish wants to merge 1 commit into
OISF:masterfrom
jasonish:suricatasc-env/v1

Conversation

@jasonish

Copy link
Copy Markdown
Member

Needed for a new Rust+ASAN CI build configuration.

Comment thread run.py
sc_path = [".", "rust", "target", "release", "suricatasc"]
if "DEBUG" in suricata_config.features:
sc_path[3] = "debug"
cargo_build_target = os.environ.get("CARGO_BUILD_TARGET")

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Setting CARGO_BUILD_TARGET is another way, but in this case, I don't want to alter the cargo build environment as it can affect the build of the included eve validation program.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Could you use a SURICATASC_BUILD_TARGET ? if this is just about the target.

I find rust's way hard to find where my binary was built :-/

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is how we pick up the target between release and debug builds. Its not related to this PR.

@inashivb inashivb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Seems to be picked up and working as intended. 🚀

@catenacyber catenacyber added the framework Has a suricata-verify framework change label Aug 25, 2026
@catenacyber

Copy link
Copy Markdown
Collaborator

Why do you need this ?
Do not you want to use the suricatasc you just built along the suricata you just built ?

@jasonish

jasonish commented Aug 25, 2026

Copy link
Copy Markdown
Member Author

Why do you need this ? Do not you want to use the suricatasc you just built along the suricata you just built ?

When Rust is built with ASAN, it requires using a --target string which differs from the default. So it is to run with the suricatasc/suricata we just built.

@catenacyber catenacyber left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I do not like this, as it is not elegant but it does the work

And the problem I do not like is how rust picks different subdirectories to build binaries

So, approving here since I do not have a better idea

@jasonish

Copy link
Copy Markdown
Member Author

I do not like this, as it is not elegant but it does the work

And the problem I do not like is how rust picks different subdirectories to build binaries

So, approving here since I do not have a better idea

I think it's the auto-picking you don't like, which is pre-existing. This new one is to handle a specific case where the caller specifically knows where the binaries exist that cannot automatically be determined. I think that will be clearer when I can do the Suricata side of the PR. Your point is valid, but I don't see how it relates to this PR.

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

Labels

framework Has a suricata-verify framework change

Development

Successfully merging this pull request may close these issues.

4 participants