Now build linux release exe as static.
freebsd static-build configs disabled because apparently libxenstore.a
would need to be built with -fPIE.
Signed-off-by: Yann Dirson <yann.dirson@vates.fr>
- "--no-default-features -F xenstore"
- "--no-default-features -F net_netlink"
- "--no-default-features -F net_pnet"
+ #
+ - "--no-default-features -F xenstore,static"
+ - "-F static"
.featurematrix.no-netlink:
parallel:
- "--no-default-features -F xenstore"
- "--no-default-features -F net_pnet"
- "--no-default-features -F xenstore,net_pnet"
+ ## this matrix is only by FreeBSD today, and we cannot link
+ ## statically on FreeBSD because libxenstore is not built as PIE
+ #- "--no-default-features -F xenstore,static"
+ #- "--no-default-features -F xenstore,static,net_pnet"
## standard jobs building with shipped Cargo.lock
- .debian-build-template
- .not-scheduled
variables:
- FEATURES: ""
+ FEATURES: "-F static"
CARGO_FLAGS: "--release"
artifacts:
paths:
## 0.4.0 - unreleased
+### new features
+
+* can be linked statically with libxenstore to distribute a more
+ standalone binary (`-F static`). Used for official Linux binary.
+
### bugfixes
* stale network information in xenstore is now removed on startup
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
+[[package]]
+name = "pkg-config"
+version = "0.3.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "69d3587f8a9e599cc7ec2c00e331f71c4e69a5f9a4b8a6efd5b07466b9736f9a"
+
[[package]]
name = "pnet_base"
version = "0.34.0"
[[package]]
name = "xenstore-rs"
-version = "0.5.0"
+version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c26625ab5ad3e480cf74a06d0595229eadac95029270461b8143d59dc00ea7ff"
+checksum = "1a135aa89ea3a9c71af5448e1aae769ea8921e665d8acb6a5e9d098c5c6c1cc5"
dependencies = [
"libc",
"libloading",
[[package]]
name = "xenstore-sys"
-version = "0.1.4"
+version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c65a2d5fcc3634d9fdae6a388dbab071bf72ecf34ec530a705dca644dd60f543"
+checksum = "47d65d6ab4f4ac05cd61e78dee7cdb2d448d147c593aedeccf383d361af032f7"
dependencies = [
"bindgen",
+ "pkg-config",
]
netlink-packet-route = { version = "0.18.0", optional = true }
netlink-proto = { version = "0.11.2", optional = true }
rtnetlink = { version = "0.14.0", optional = true }
-xenstore-rs = { version = ">=0.4, <0.6", default-features = false, optional = true }
async-stream = "0.3.4"
os_info = { version = "3", default-features = false }
pnet_datalink = { version = "*", optional = true }
env_logger = ">=0.10.0"
clap = { version = "4.4.8", features = ["derive"] }
+[dependencies.xenstore-rs]
+optional = true
+version = "0.6.0"
+#git = "https://github.com/Wenzel/xenstore.git"
+default-features = false
+
[target.'cfg(unix)'.dependencies]
uname = "0.1.1"
syslog = "6.0"
[features]
default = ["xenstore", "net_netlink"]
xenstore = ["dep:xenstore-rs"]
+static = ["xenstore-rs/static"]
net_netlink = ["dep:netlink-proto", "dep:netlink-packet-core", "dep:netlink-packet-route",
"dep:rtnetlink"]
net_pnet = ["dep:pnet_datalink", "dep:pnet_base", "dep:ipnetwork"]
Depends:
${shlibs:Depends},
${misc:Depends},
- libxenstore4 | libxenstore3.0,
Conflicts: xe-guest-utilities
Replaces: xe-guest-utilities
Description: Guest Agent for Xen-based virtual machines
BuildRequires: systemd-devel
-Requires: xen-libs
Conflicts: xe-guest-utilities
%global _description %{expand: