build(deps): use published version of `boring` (#2454)

The `linkerd-meshtls-boring` crate currently uses a Git dependency on
`boring` and `tokio-boring`. This is because, when this crate was
initially introduced, the proxy required unreleased changes to these
crates. Now, however, upstream has published all the changes we depended
on (this happened ages ago), and we can depend on these libraries from
crates.io.

This branch removes the Git deps and updates to v3.0.0 of
`boring`/`tokio-boring`. I've also changed the `cargo-deny` settings to
no longer allow Git deps on these crates, as we no longer depend on them
from Git.
This commit is contained in:
Eliza Weisman 2023-08-25 10:27:48 -07:00 committed by GitHub
parent 9fa90df4ec
commit 426120a6e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 48 additions and 20 deletions

View File

@ -97,7 +97,7 @@ checksum = "13d8068b6ccb8b34db9de397c7043f91db8b4c66414952c6db944f238c4d3db3"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"axum-core", "axum-core",
"bitflags", "bitflags 1.3.2",
"bytes", "bytes",
"futures-util", "futures-util",
"http", "http",
@ -142,11 +142,11 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"
[[package]] [[package]]
name = "bindgen" name = "bindgen"
version = "0.60.1" version = "0.66.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "062dddbc1ba4aca46de6338e2bf87771414c335f7b2f2036e8f3e9befebf88e6" checksum = "f2b84e06fc203107bfbad243f4aba2af864eb7db3b1cf46ea0a023b0b433d2a7"
dependencies = [ dependencies = [
"bitflags", "bitflags 2.4.0",
"cexpr", "cexpr",
"clang-sys", "clang-sys",
"lazy_static", "lazy_static",
@ -157,6 +157,7 @@ dependencies = [
"regex", "regex",
"rustc-hash", "rustc-hash",
"shlex", "shlex",
"syn 2.0.12",
] ]
[[package]] [[package]]
@ -165,25 +166,35 @@ version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "bitflags"
version = "2.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635"
[[package]] [[package]]
name = "boring" name = "boring"
version = "2.1.0" version = "3.0.4"
source = "git+https://github.com/cloudflare/boring#3059ba6e102599f8ae0a962223ca1e216bb61902" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2f9aa560ebe73bcf696f83e70c0c3840e20506dfa4b0531eb3394f591489030f"
dependencies = [ dependencies = [
"bitflags", "bitflags 1.3.2",
"boring-sys", "boring-sys",
"foreign-types", "foreign-types",
"lazy_static",
"libc", "libc",
"once_cell",
] ]
[[package]] [[package]]
name = "boring-sys" name = "boring-sys"
version = "2.1.0" version = "3.0.4"
source = "git+https://github.com/cloudflare/boring#3059ba6e102599f8ae0a962223ca1e216bb61902" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7c911b5e71589a68226571982d3f67ef03034c6efddd1b5d7bbd02d54aeda579"
dependencies = [ dependencies = [
"bindgen", "bindgen",
"cmake", "cmake",
"fs_extra",
"fslock",
] ]
[[package]] [[package]]
@ -400,6 +411,22 @@ dependencies = [
"percent-encoding", "percent-encoding",
] ]
[[package]]
name = "fs_extra"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c"
[[package]]
name = "fslock"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "04412b8935272e3a9bae6f48c7bfff74c2911f60525404edfdd28e49884c3bfb"
dependencies = [
"libc",
"winapi",
]
[[package]] [[package]]
name = "futures" name = "futures"
version = "0.3.28" version = "0.3.28"
@ -2322,7 +2349,7 @@ version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "534cfe58d6a18cc17120fbf4635d53d14691c1fe4d951064df9bd326178d7d5a" checksum = "534cfe58d6a18cc17120fbf4635d53d14691c1fe4d951064df9bd326178d7d5a"
dependencies = [ dependencies = [
"bitflags", "bitflags 1.3.2",
] ]
[[package]] [[package]]
@ -2331,7 +2358,7 @@ version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29"
dependencies = [ dependencies = [
"bitflags", "bitflags 1.3.2",
] ]
[[package]] [[package]]
@ -2406,7 +2433,7 @@ version = "0.37.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c348b5dc624ecee40108aa2922fed8bad89d7fcc2b9f8cb18f632898ac4a37f9" checksum = "c348b5dc624ecee40108aa2922fed8bad89d7fcc2b9f8cb18f632898ac4a37f9"
dependencies = [ dependencies = [
"bitflags", "bitflags 1.3.2",
"errno", "errno",
"io-lifetimes", "io-lifetimes",
"libc", "libc",
@ -2674,8 +2701,9 @@ dependencies = [
[[package]] [[package]]
name = "tokio-boring" name = "tokio-boring"
version = "2.1.5" version = "3.0.4"
source = "git+https://github.com/cloudflare/boring#3059ba6e102599f8ae0a962223ca1e216bb61902" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "deccebd21ed5c1afda79080d3de6f2a7383a122b68b1909b785376b95ba869e2"
dependencies = [ dependencies = [
"boring", "boring",
"boring-sys", "boring-sys",

View File

@ -83,5 +83,3 @@ lto = true
[patch.crates-io] [patch.crates-io]
webpki = { git = "https://github.com/linkerd/webpki", branch = "cert-dns-names-0.22" } webpki = { git = "https://github.com/linkerd/webpki", branch = "cert-dns-names-0.22" }
boring = { git = "https://github.com/cloudflare/boring" }
tokio-boring = { git = "https://github.com/cloudflare/boring" }

View File

@ -59,6 +59,9 @@ skip = [
# Since `syn` is used by proc-macros (executed at compile time), duplicate # Since `syn` is used by proc-macros (executed at compile time), duplicate
# versions won't have an impact on the final binary size. # versions won't have an impact on the final binary size.
{ name = "syn" }, { name = "syn" },
# `tonic` v0.6 depends on `bitflags` v1.x, while `boring-sys` depends on
# `bitflags` v2.x. Allow both versions to coexist peacefully for now.
{ name = "bitflags", version = "1" },
] ]
skip-tree = [ skip-tree = [
# Hasn't seen a new release since 2017. Pulls in an older version of nom. # Hasn't seen a new release since 2017. Pulls in an older version of nom.
@ -69,7 +72,6 @@ skip-tree = [
unknown-registry = "deny" unknown-registry = "deny"
unknown-git = "deny" unknown-git = "deny"
allow-registry = ["https://github.com/rust-lang/crates.io-index"] allow-registry = ["https://github.com/rust-lang/crates.io-index"]
allow-git = ["https://github.com/cloudflare/boring.git"]
[sources.allow-org] [sources.allow-org]
github = [ github = [

View File

@ -7,7 +7,7 @@ edition = "2018"
publish = false publish = false
[dependencies] [dependencies]
boring = "2" boring = "3"
futures = { version = "0.3", default-features = false } futures = { version = "0.3", default-features = false }
hex = "0.4" # used for debug logging hex = "0.4" # used for debug logging
linkerd-error = { path = "../../error" } linkerd-error = { path = "../../error" }
@ -17,7 +17,7 @@ linkerd-io = { path = "../../io" }
linkerd-stack = { path = "../../stack" } linkerd-stack = { path = "../../stack" }
linkerd-tls = { path = "../../tls" } linkerd-tls = { path = "../../tls" }
tokio = { version = "1", features = ["macros", "sync"] } tokio = { version = "1", features = ["macros", "sync"] }
tokio-boring = "2" tokio-boring = "3"
tracing = "0.1" tracing = "0.1"
[features] [features]