Fix build.rs not re-running when eBPF artifacts are missing

Watch the output artifact paths with rerun-if-changed so Cargo treats
a missing file as a change trigger. This covers git clean, fresh clone,
and manual deletion without requiring a manual touch of build.rs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0138PxtKH73hqxv7h1oaoSdS
This commit is contained in:
Claude 2026-06-17 04:40:18 +00:00
parent fdf086b960
commit 77e04807a6
No known key found for this signature in database

View File

@ -37,6 +37,12 @@ fn main() {
println!("cargo:rustc-env=DB_PATH={}", db_dir.display());
println!("cargo:rustc-env=RULE_EVE_PATH={}", suricata_eve_socket.display());
// Watch output artifacts: if they are missing Cargo treats the path as non-existent
// and unconditionally re-runs this script, which is exactly what we want after a
// git clean, fresh clone, or manual deletion.
println!("cargo:rerun-if-changed={}", ingress_edpf_dir.display());
println!("cargo:rerun-if-changed={}", egress_edpf_dir.display());
for item in &[
"src",
"public",