From 5a6a2adbe99d64a50c90106d11d0ee34bd5ddadf Mon Sep 17 00:00:00 2001 From: "J. Gerhards" Date: Thu, 22 Jan 2026 22:09:20 +0100 Subject: [PATCH] Fix not being able to build Arch package with lto When building a package with makepkg it usually runs with lto enabled, unfortunately linking libssh (dependency of build dependency git2) doesn't work and since we don't need libssh anyways we can just disable the feature. --- Cargo.lock | 44 ++++---------------------------------------- Cargo.toml | 5 +++-- 2 files changed, 7 insertions(+), 42 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0ee1875..da1be24 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -603,16 +603,14 @@ dependencies = [ [[package]] name = "git2" -version = "0.20.2" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2deb07a133b1520dc1a5690e9bd08950108873d7ed5de38dcc74d3b5ebffa110" +checksum = "3e2b37e2f62729cdada11f0e6b3b6fe383c69c29fc619e391223e12856af308c" dependencies = [ "bitflags", "libc", "libgit2-sys", "log", - "openssl-probe", - "openssl-sys", "url", ] @@ -806,15 +804,13 @@ checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa" [[package]] name = "libgit2-sys" -version = "0.18.1+1.9.0" +version = "0.18.3+1.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1dcb20f84ffcdd825c7a311ae347cce604a6f084a767dec4a4929829645290e" +checksum = "c9b3acc4b91781bb0b3386669d325163746af5f6e4f73e6d2d630e09a35f3487" dependencies = [ "cc", "libc", - "libssh2-sys", "libz-sys", - "openssl-sys", "pkg-config", ] @@ -839,20 +835,6 @@ dependencies = [ "redox_syscall", ] -[[package]] -name = "libssh2-sys" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "220e4f05ad4a218192533b300327f5150e809b54c4ec83b5a1d91833601811b9" -dependencies = [ - "cc", - "libc", - "libz-sys", - "openssl-sys", - "pkg-config", - "vcpkg", -] - [[package]] name = "libz-rs-sys" version = "0.5.1" @@ -981,24 +963,6 @@ version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" -[[package]] -name = "openssl-probe" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" - -[[package]] -name = "openssl-sys" -version = "0.9.108" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e145e1651e858e820e4860f7b9c5e169bc1d8ce1c86043be79fa7b7634821847" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - [[package]] name = "ordered-stream" version = "0.2.0" diff --git a/Cargo.toml b/Cargo.toml index 35e00f9..fe5a693 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,11 +29,12 @@ simplelog = "0.12.2" time = "0.3.37" dns-lookup = "2.0.4" +[build-dependencies] +git2 = { version = "0.20.3", default-features = false } + [profile.release] strip = true opt-level = "z" lto = true codegen-units = 1 -[build-dependencies] -git2 = "0.20.0"