From 9409d87b3cf92b72a323c5efc8fc6f89706d8bef Mon Sep 17 00:00:00 2001 From: Yann Dirson Date: Fri, 2 Feb 2024 16:14:47 +0100 Subject: [PATCH] Use xenstore-rs 0.7, FreeBSD build now easier with pkgconfig --- CHANGELOG.md | 5 +++++ Cargo.lock | 8 ++++---- Cargo.toml | 2 +- README.md | 11 +---------- 4 files changed, 11 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6bc870a..7af3166 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,11 @@ Changelog](https://keepachangelog.com/en/1.0.0/) * the RPM now replaces xe-guest-utilities-latest too, not only xe-guest-utilities +### other noteworthy changes + +* build on FreeBSD does not require to set environment variables any + more, now relies on pkg-config (requires "pkgconf" to build) + ## 0.4.0 - 2024-01-29 ### new features diff --git a/Cargo.lock b/Cargo.lock index 2972fdb..4dde691 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1343,9 +1343,9 @@ dependencies = [ [[package]] name = "xenstore-rs" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a135aa89ea3a9c71af5448e1aae769ea8921e665d8acb6a5e9d098c5c6c1cc5" +checksum = "fb033ee238b7347ab2f1f3e550094efdb19b7175e6e4664978c72ff768c43f0a" dependencies = [ "libc", "libloading", @@ -1355,9 +1355,9 @@ dependencies = [ [[package]] name = "xenstore-sys" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47d65d6ab4f4ac05cd61e78dee7cdb2d448d147c593aedeccf383d361af032f7" +checksum = "a864a4c2dfde8487a06452d052f0b2116829c3e9b48f8ac71a3f1421e555b709" dependencies = [ "bindgen", "pkg-config", diff --git a/Cargo.toml b/Cargo.toml index f861aa8..6fc8de3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,7 +25,7 @@ clap = { version = "4.4.8", features = ["derive"] } [dependencies.xenstore-rs] optional = true -version = "0.6.0" +version = "0.7.0" #git = "https://github.com/Wenzel/xenstore.git" default-features = false diff --git a/README.md b/README.md index bd98eb6..52df75a 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,7 @@ You need a Rust 1.71 toolchain or later. Since the Cargo tool cannot be told about non-Rust dependencies, you have to install manually on your build machine: +- pkg-config (on FreeBSD, provided by `pkgconf`) - packages needed to build a crate linking against a native lib (`llvm-dev` and `clang` on Debian-based Linux distros) - development files for libxenstore (package `libxen-dev` on @@ -92,16 +93,6 @@ and for a Unix-like guest OS without netlink support: cargo build --no-default-features -F xenstore,net_pnet ``` - -If you have `libxenstore` installed in a non-standard place (this -includes `/usr/local` on FreeBSD), set the following environment -variables when running `cargo`: - -``` -BINDGEN_EXTRA_CLANG_ARGS=-I/usr/local/include -RUSTFLAGS=-L/usr/local/lib -``` - ### How to run The behavior can be adjusted by a few command-line options and -- 2.39.5