You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Building with --features sandbox-microvm on a machine without libkrun died at
the link step with forty lines of undefined _krun_* symbols, none of which
mention libkrun. And it stayed dead: build.rs declared rerun-if-changed on
dirge.entitlements, a file it never reads, which switches off cargo's default
"re-run when a package file changed" and pinned the verdict to the target
directory. Installing libkrun and rebuilding replayed the cached "not found",
minus the cargo:warning that only prints when the script actually runs. Getting
out took a cargo clean.
The runner now compiles either way. Without libkrun it's a stub that says what's
missing; build.rs sets krun_linked when it finds one, and the real main is gated
on that. sandbox check reports the stub as an error rather than "binary found",
and start() bails instead of spawning it and waiting out the SSH timeout. The
same reasoning covers the two test guards that used "runner binary exists" to
mean "libkrun works" — one of them hung for its full timeout.
The probe now watches the library paths themselves. Cargo counts a watched path
that doesn't exist as changed every build, so it re-probes until something turns
up and then settles on the real file.
Also: libkrunfw no longer gates linking, since nothing references a krunfw_*
symbol and libkrun reaches it on its own. LIBKRUN_LIB_DIR / LIBKRUNFW_LIB_DIR
override the search. The search itself moved into one module that build.rs and
sandbox check both compile, which is how the check's pkg-config leg was found
to be dead — it asked for "krun" when the package is "libkrun", the exact
mistake build.rs carried a comment warning about.
Closes dirge-zsi8, dirge-vadg, dirge-vij7, dirge-fp3l, dirge-1158, dirge-btpd
Co-authored-by: Yogthos <yogthos@gmail.com>