Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cargo-deny 0.14.0 #137923

Merged
merged 2 commits into from
Jul 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 10 additions & 35 deletions Formula/cargo-deny.rb
Original file line number Diff line number Diff line change
@@ -1,43 +1,27 @@
class CargoDeny < Formula
desc "Cargo plugin for linting your dependencies"
homepage "https://github.com/EmbarkStudios/cargo-deny"
url "https://github.com/EmbarkStudios/cargo-deny/archive/refs/tags/0.13.9.tar.gz"
sha256 "b26d8f984e00ddf96766e25781d6b296ff7a571f2c3730a607bfde24062b8adb"
url "https://github.com/EmbarkStudios/cargo-deny/archive/refs/tags/0.14.0.tar.gz"
sha256 "b100e36c5eb4405067ee2350aea7b5089e9e72f787603fdc3929f6586a69b0f4"
license any_of: ["Apache-2.0", "MIT"]
revision 1
head "https://github.com/EmbarkStudios/cargo-deny.git", branch: "main"

bottle do
sha256 cellar: :any, arm64_ventura: "d7313f29a24ba4ba12c11adfb2191775f1d708e3a57f4e02a332b2e8736e6657"
sha256 cellar: :any, arm64_monterey: "296f2d5b36063deac24f82f69a4290be11471b503dd255955abad8053c8fd1a3"
sha256 cellar: :any, arm64_big_sur: "8361965027fc916f1cb1dc8bd66d8f021ad66e1829de43055bd35de877d1761c"
sha256 cellar: :any, ventura: "8e74e5432a2668d5ef992e9d24e1c69567f7ef7abd3566c25df4d3974ebe3058"
sha256 cellar: :any, monterey: "47e3d92a3309a4f86c0a4199c7beb995a8566851cf958e40c1330db3f3f87b05"
sha256 cellar: :any, big_sur: "17801468c4bdf1ed5d6c3ebe2e110db029cc48eae699dff3725e9e251aa6d5b0"
sha256 cellar: :any_skip_relocation, x86_64_linux: "7b7e106df432c503fa28fd4c3f4233275cfd667a9fe1e1288c039500ec7bab1e"
sha256 cellar: :any_skip_relocation, arm64_ventura: "382d09a62741a6e9a28136758009936a27533cc111ca2704a2e211f1fdd3cdc5"
sha256 cellar: :any_skip_relocation, arm64_monterey: "d618f66cc33822684f57930c7607aca0700999ef1fc3612925419ea8f9b550be"
sha256 cellar: :any_skip_relocation, arm64_big_sur: "a120bdbd19ad98e7ec92a4eee30979a184bddbcca7f8312f95498a3f44a53233"
sha256 cellar: :any_skip_relocation, ventura: "80cc4b4498b33cc6936972a4d99c0d4f3e56aa72309b9bfae28d46ae636f8996"
sha256 cellar: :any_skip_relocation, monterey: "8aaef73a624ab81baa858e2a2007e1afd003b18394fe7791da74835bb1779b9d"
sha256 cellar: :any_skip_relocation, big_sur: "26b8e0ca5d49a1d978427a880e509a0068d1834ea8f2b9b0cffceee216708522"
sha256 cellar: :any_skip_relocation, x86_64_linux: "2f575a73d00384d6c5ced0f6f8a3721d6366c6c9416a812ad00c1d173da86e85"
end

depends_on "pkg-config" => :build
depends_on "rust" => :build
depends_on "rustup-init" => :test
depends_on "libgit2@1.5"
depends_on "libssh2"
depends_on "openssl@3"

def install
ENV["LIBGIT2_SYS_USE_PKG_CONFIG"] = "1"
ENV["LIBSSH2_SYS_USE_PKG_CONFIG"] = "1"
ENV["OPENSSL_DIR"] = Formula["openssl@3"].opt_prefix
ENV["OPENSSL_NO_VENDOR"] = "1"
system "cargo", "install", "--no-default-features", *std_cargo_args
end

def check_binary_linkage(binary, library)
binary.dynamically_linked_libraries.any? do |dll|
next false unless dll.start_with?(HOMEBREW_PREFIX.to_s)

File.realpath(dll) == File.realpath(library)
end
system "cargo", "install", *std_cargo_args
end

test do
Expand Down Expand Up @@ -68,14 +52,5 @@ def check_binary_linkage(binary, library)
output = shell_output("cargo deny check 2>&1", 1)
assert_match "advisories ok, bans ok, licenses FAILED, sources ok", output
end

[
Formula["libgit2@1.5"].opt_lib/shared_library("libgit2"),
Formula["libssh2"].opt_lib/shared_library("libssh2"),
Formula["openssl@3"].opt_lib/shared_library("libssl"),
].each do |library|
assert check_binary_linkage(bin/"cargo-deny", library),
"No linkage with #{library.basename}! Cargo is likely using a vendored version."
end
end
end
Loading