solstice-ci/crates/orchestrator/build.rs
Till Wegmueller 888aa26388
Add libvirt/KVM integration and Forgejo webhook support to Podman stack
- Extend `.env.sample` with libvirt configuration, Forgejo secrets, and image mapping defaults.
- Update `compose.yml` to enable libvirt integration, including required mounts, devices, and environment variables.
- Add Forgejo webhook configuration and commit status reporting with optional HMAC validation.
- Enhance the orchestrator container with libvirt dependencies and optional features for VM management.
- Document host preparation for libvirt/KVM and image directories in the README.
- Set default fallback values for Traefik ACME CA server.

Signed-off-by: Till Wegmueller <toasterson@gmail.com>
2025-11-09 17:58:36 +01:00

14 lines
872 B
Rust

fn main() {
// Only emit link directive for libvirt when building on Linux and the `libvirt` feature is enabled.
let target_os = std::env::var("CARGO_CFG_TARGET_OS").unwrap_or_default();
let libvirt_enabled = std::env::var("CARGO_FEATURE_LIBVIRT").is_ok();
if target_os == "linux" && libvirt_enabled {
// Ensure the final link includes -lvirt. The virt crate should do this via bindgen/pkg-config,
// but in some minimal containers the link directive may be missing. This is a safe no-op if
// already present and fixes undefined references like virConnectOpen, virDomainDefineXML, etc.
println!("cargo:rustc-link-lib=virt");
// On Debian/Ubuntu the library resides in /usr/lib/{arch}-linux-gnu which the linker knows.
// If custom locations are ever needed, also emit cargo:rustc-link-search here.
}
}