Skip to content

Commit

Permalink
build(deps): use published version of boring (#2454)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
hawkw authored Aug 25, 2023
1 parent 9fa90df commit 426120a
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 20 deletions.
58 changes: 43 additions & 15 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ checksum = "13d8068b6ccb8b34db9de397c7043f91db8b4c66414952c6db944f238c4d3db3"
dependencies = [
"async-trait",
"axum-core",
"bitflags",
"bitflags 1.3.2",
"bytes",
"futures-util",
"http",
Expand Down Expand Up @@ -142,11 +142,11 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"

[[package]]
name = "bindgen"
version = "0.60.1"
version = "0.66.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "062dddbc1ba4aca46de6338e2bf87771414c335f7b2f2036e8f3e9befebf88e6"
checksum = "f2b84e06fc203107bfbad243f4aba2af864eb7db3b1cf46ea0a023b0b433d2a7"
dependencies = [
"bitflags",
"bitflags 2.4.0",
"cexpr",
"clang-sys",
"lazy_static",
Expand All @@ -157,6 +157,7 @@ dependencies = [
"regex",
"rustc-hash",
"shlex",
"syn 2.0.12",
]

[[package]]
Expand All @@ -165,25 +166,35 @@ version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"

[[package]]
name = "bitflags"
version = "2.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635"

[[package]]
name = "boring"
version = "2.1.0"
source = "git+https://github.com/cloudflare/boring#3059ba6e102599f8ae0a962223ca1e216bb61902"
version = "3.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2f9aa560ebe73bcf696f83e70c0c3840e20506dfa4b0531eb3394f591489030f"
dependencies = [
"bitflags",
"bitflags 1.3.2",
"boring-sys",
"foreign-types",
"lazy_static",
"libc",
"once_cell",
]

[[package]]
name = "boring-sys"
version = "2.1.0"
source = "git+https://github.com/cloudflare/boring#3059ba6e102599f8ae0a962223ca1e216bb61902"
version = "3.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7c911b5e71589a68226571982d3f67ef03034c6efddd1b5d7bbd02d54aeda579"
dependencies = [
"bindgen",
"cmake",
"fs_extra",
"fslock",
]

[[package]]
Expand Down Expand Up @@ -400,6 +411,22 @@ dependencies = [
"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]]
name = "futures"
version = "0.3.28"
Expand Down Expand Up @@ -2322,7 +2349,7 @@ version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "534cfe58d6a18cc17120fbf4635d53d14691c1fe4d951064df9bd326178d7d5a"
dependencies = [
"bitflags",
"bitflags 1.3.2",
]

[[package]]
Expand All @@ -2331,7 +2358,7 @@ version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29"
dependencies = [
"bitflags",
"bitflags 1.3.2",
]

[[package]]
Expand Down Expand Up @@ -2406,7 +2433,7 @@ version = "0.37.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c348b5dc624ecee40108aa2922fed8bad89d7fcc2b9f8cb18f632898ac4a37f9"
dependencies = [
"bitflags",
"bitflags 1.3.2",
"errno",
"io-lifetimes",
"libc",
Expand Down Expand Up @@ -2674,8 +2701,9 @@ dependencies = [

[[package]]
name = "tokio-boring"
version = "2.1.5"
source = "git+https://github.com/cloudflare/boring#3059ba6e102599f8ae0a962223ca1e216bb61902"
version = "3.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "deccebd21ed5c1afda79080d3de6f2a7383a122b68b1909b785376b95ba869e2"
dependencies = [
"boring",
"boring-sys",
Expand Down
2 changes: 0 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,3 @@ lto = true

[patch.crates-io]
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" }
4 changes: 3 additions & 1 deletion deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ skip = [
# Since `syn` is used by proc-macros (executed at compile time), duplicate
# versions won't have an impact on the final binary size.
{ 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 = [
# Hasn't seen a new release since 2017. Pulls in an older version of nom.
Expand All @@ -69,7 +72,6 @@ skip-tree = [
unknown-registry = "deny"
unknown-git = "deny"
allow-registry = ["https://github.com/rust-lang/crates.io-index"]
allow-git = ["https://github.com/cloudflare/boring.git"]

[sources.allow-org]
github = [
Expand Down
4 changes: 2 additions & 2 deletions linkerd/meshtls/boring/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ edition = "2018"
publish = false

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

[features]
Expand Down

0 comments on commit 426120a

Please sign in to comment.