From 362098d8ca3e24ea1b86a56245fe8888303f6d3a Mon Sep 17 00:00:00 2001 From: Erik Hollensbe Date: Thu, 31 Mar 2022 15:13:31 -0700 Subject: [PATCH 1/2] Fix use of vendored feature in openssl dependency This was causing build problems in other architectures, notably Windows. To use the vendored openssl, you can now: ``` cargo build --features vendored-openssl ``` Signed-off-by: Erik Hollensbe --- Cargo.toml | 5 ++++- Dockerfile.alpine | 2 +- cargo-docker.sh | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index f9e7817..ef74a6f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,9 +34,12 @@ tracing = "0.1" tracing-log = "0.1" tracing-subscriber = "0.2" hex = ">=0" -openssl = { version = ">= 0", features = [ "vendored" ] } +openssl = ">= 0" async-trait = ">=0" +[features] +vendored-openssl = [ "openssl/vendored" ] + [dev-dependencies] lazy_static = ">=0" diff --git a/Dockerfile.alpine b/Dockerfile.alpine index 7459b54..1e94a3b 100644 --- a/Dockerfile.alpine +++ b/Dockerfile.alpine @@ -16,7 +16,7 @@ RUN apk add openssl-dev COPY . /zeronsd WORKDIR /zeronsd -RUN OPENSSL_NO_VENDOR=1 cargo install --path . +RUN cargo install --release --path . FROM alpine:latest diff --git a/cargo-docker.sh b/cargo-docker.sh index 6e0fa24..d6c27d4 100644 --- a/cargo-docker.sh +++ b/cargo-docker.sh @@ -2,9 +2,9 @@ if [ "${IS_LOCAL}" != 0 ] then - cargo install --path . + cargo install --release --path . else - cargo install --git https://github.com/zerotier/zeronsd \ + cargo install --release --git https://github.com/zerotier/zeronsd \ $(if [ "${IS_TAG}" != "0" ]; then echo "--tag"; else echo "--branch"; fi) \ "${VERSION}" fi From 588a871f2ed241e9868f8be84c1477632159b14d Mon Sep 17 00:00:00 2001 From: Erik Hollensbe Date: Thu, 31 Mar 2022 15:15:16 -0700 Subject: [PATCH 2/2] Update all dependencies Signed-off-by: Erik Hollensbe --- Cargo.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6f0e8ed..0f4dbd9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -104,9 +104,9 @@ dependencies = [ [[package]] name = "clap" -version = "3.1.6" +version = "3.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8c93436c21e4698bacadf42917db28b23017027a4deccb35dbe47a7e7840123" +checksum = "c67e7973e74896f4bba06ca2dcfd28d54f9cb8c035e940a32b88ed48f5f5ecf2" dependencies = [ "atty", "bitflags", @@ -121,9 +121,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "3.1.4" +version = "3.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da95d038ede1a964ce99f49cbe27a7fb538d1da595e4b4f70b8c8f338d17bf16" +checksum = "a3aab4734e083b809aaf5794e14e756d1c798d2c69c7f7de7a09a2f5214993c1" dependencies = [ "heck", "proc-macro-error", @@ -795,9 +795,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.24" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58893f751c9b0412871a09abd62ecd2a00298c6c83befa223ef98c52aef40cbe" +checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae" [[package]] name = "ppv-lite86"