From 12dbf7c1d4fc17be02b813ae9d19030e6606c10a Mon Sep 17 00:00:00 2001 From: Marek Fedorovic Date: Fri, 29 Sep 2023 14:56:10 +1000 Subject: [PATCH] fix: Fix openssl dependencies --- .github/workflows/npm.yml | 31 +++++-------------- Cargo.lock | 27 +++++++++++++--- Cargo.toml | 1 - examples/agent_client/Cargo.toml | 4 +-- examples/cohort_banking_with_sdk/Cargo.toml | 4 +-- .../cohort_replicator_kafka_pg/Cargo.toml | 2 +- packages/banking_replicator/Cargo.toml | 2 +- packages/cohort_banking/Cargo.toml | 2 +- packages/cohort_sdk/Cargo.toml | 7 ++--- packages/cohort_sdk_js/Cargo.toml | 2 +- packages/examples_support/Cargo.toml | 2 +- packages/talos_agent/Cargo.toml | 3 +- packages/talos_certifier_adapters/Cargo.toml | 7 +++-- 13 files changed, 46 insertions(+), 48 deletions(-) diff --git a/.github/workflows/npm.yml b/.github/workflows/npm.yml index ef23cb8e..0a27da75 100644 --- a/.github/workflows/npm.yml +++ b/.github/workflows/npm.yml @@ -13,35 +13,18 @@ jobs: fail-fast: false matrix: settings: - # - host: macos-latest - # target: x86_64-apple-darwin - # jsPackageHome: packages/cohort_sdk_js - # finalPackageName: packages/cohort_sdk_js/cohort_sdk_js.darwin-x64.node - # customiseHostCommand: echo 'No customizations are needed' - # buildCommand: npm run build -- --target x86_64-apple-darwin + - host: macos-latest + target: x86_64-apple-darwin + jsPackageHome: packages/cohort_sdk_js + finalPackageName: packages/cohort_sdk_js/cohort_sdk_js.darwin-x64.node + customiseHostCommand: echo 'No customizations are needed' + buildCommand: npm run build -- --target x86_64-apple-darwin - host: macos-latest target: aarch64-apple-darwin jsPackageHome: packages/cohort_sdk_js finalPackageName: packages/cohort_sdk_js/cohort_sdk_js.darwin-arm64.node - customiseHostCommand: |- - set -a - find $(brew --prefix) -name "libcrypto.*" - echo "" - echo "find /usr/local -name *sasl.*" - find /usr/local -name "*sasl.*" - echo "After search for sasl" - brew install cyrus-sasl - echo "" - echo "ls -lah /usr/local/opt/" - ls -lah /usr/local/opt/ - echo "" - echo "ls -lah /usr/local/opt/cyrus-sasl" - ls -lah /usr/local/opt/cyrus-sasl - echo 'export PATH="/usr/local/opt/cyrus-sasl/sbin:$PATH"' >> /Users/runner/.bash_profile - export LDFLAGS="-L/usr/local/opt/cyrus-sasl/lib" - export CPPFLAGS="-I/usr/local/opt/cyrus-sasl/include" - env + customiseHostCommand: echo 'No customizations are needed' buildCommand: npm run build -- --target aarch64-apple-darwin # - host: windows-latest diff --git a/Cargo.lock b/Cargo.lock index aacc50c7..8746dbd1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -28,7 +28,6 @@ dependencies = [ "log", "rand", "rdkafka", - "rdkafka-sys", "serde", "serde_json", "strum 0.25.0", @@ -535,7 +534,6 @@ dependencies = [ "opentelemetry_sdk", "rand", "rdkafka", - "rdkafka-sys", "rust_decimal", "serde", "serde_json", @@ -584,12 +582,13 @@ dependencies = [ "futures", "log", "metrics", + "openssl-sys", "opentelemetry", "opentelemetry_api", "opentelemetry_sdk", "rand", "rdkafka", - "rdkafka-sys", + "sasl2-sys", "serde", "serde_json", "strum 0.25.0", @@ -1257,6 +1256,15 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "krb5-src" +version = "0.3.2+1.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44cd3b7e7735d48bc3793837041294f2eb747bd0f63bbc081e89972abb9e48fb" +dependencies = [ + "duct", +] + [[package]] name = "lazy_static" version = "1.4.0" @@ -1553,6 +1561,15 @@ version = "11.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" +[[package]] +name = "openssl-src" +version = "300.1.5+3.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "559068e4c12950d7dcaa1857a61725c0d38d4fc03ff8e070ab31a75d6e316491" +dependencies = [ + "cc", +] + [[package]] name = "openssl-sys" version = "0.9.93" @@ -1561,6 +1578,7 @@ checksum = "db4d56a4c0478783083cfafcc42493dd4a981d41669da64b4572a2a089b51b1d" dependencies = [ "cc", "libc", + "openssl-src", "pkg-config", "vcpkg", ] @@ -2161,6 +2179,7 @@ checksum = "9e645bd98535fc8fd251c43ba7c7c1f9be1e0369c99b6a5ea719052a773e655c" dependencies = [ "cc", "duct", + "krb5-src", "libc", "pkg-config", ] @@ -2484,7 +2503,6 @@ dependencies = [ "mockall", "multimap", "rdkafka", - "rdkafka-sys", "serde", "serde_json", "strum 0.25.0", @@ -2531,6 +2549,7 @@ dependencies = [ "metrics", "mockall", "rdkafka", + "rdkafka-sys", "refinery", "serde", "serde_json", diff --git a/Cargo.toml b/Cargo.toml index 4f4cb66e..ee27e341 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,4 +23,3 @@ serde_json = "1.0" # Async tokio = { version = "1", features = ["full", "test-util"] } async-trait = "0.1" - diff --git a/examples/agent_client/Cargo.toml b/examples/agent_client/Cargo.toml index f799999d..c8888b9e 100644 --- a/examples/agent_client/Cargo.toml +++ b/examples/agent_client/Cargo.toml @@ -15,11 +15,9 @@ env_logger = { workspace = true } log = { workspace = true } rand = { version = "0.8.5" } rdkafka = { version = "0.34.0", features = ["sasl"] } -# rdkafka-sys = { version = "4.3.0" } -rdkafka-sys = { version = "4.6.0" } serde = { workspace = true } serde_json = { workspace = true } strum = { version = "0.25", features = ["derive"] } tokio = { workspace = true, features = ["full"] } -uuid = { version = "1.2.2", features = ["v4"] } +uuid = { version = "1.4.1", features = ["v4"] } time = { version = "0.3.17" } diff --git a/examples/cohort_banking_with_sdk/Cargo.toml b/examples/cohort_banking_with_sdk/Cargo.toml index 795828d5..63b344d5 100644 --- a/examples/cohort_banking_with_sdk/Cargo.toml +++ b/examples/cohort_banking_with_sdk/Cargo.toml @@ -30,9 +30,7 @@ opentelemetry_sdk = { version = "0.20.0", features = ["metrics", "rt-tok opentelemetry = { version = "0.20.0", features = ["metrics"] } rand = { version = "0.8.5" } rdkafka = { version = "0.34.0" } -# rdkafka-sys = { version = "4.3.0" } -rdkafka-sys = { version = "4.6.0" } rust_decimal = { version = "1.30.0", features = ["db-tokio-postgres", "serde-with-float"] } time = { version = "0.3.17" } tokio-postgres = { version = "0.7", features = [ "with-uuid-1", "with-serde_json-1" ] } -uuid = { version = "1.2.2", features = ["v4"] } \ No newline at end of file +uuid = { version = "1.4.1", features = ["v4"] } \ No newline at end of file diff --git a/examples/cohort_replicator_kafka_pg/Cargo.toml b/examples/cohort_replicator_kafka_pg/Cargo.toml index f12fa004..32ac734b 100644 --- a/examples/cohort_replicator_kafka_pg/Cargo.toml +++ b/examples/cohort_replicator_kafka_pg/Cargo.toml @@ -25,4 +25,4 @@ rdkafka-sys = { version = "4.3.0" } rust_decimal = { version = "1.30.0", features = ["db-tokio-postgres", "serde-with-float"] } time = { version = "0.3.17" } tokio-postgres = { version = "0.7", features = [ "with-uuid-1", "with-serde_json-1" ] } -uuid = { version = "1.2.2", features = ["v4"] } \ No newline at end of file +uuid = { version = "1.4.1", features = ["v4"] } \ No newline at end of file diff --git a/packages/banking_replicator/Cargo.toml b/packages/banking_replicator/Cargo.toml index 5d4d681d..ecb1b794 100644 --- a/packages/banking_replicator/Cargo.toml +++ b/packages/banking_replicator/Cargo.toml @@ -23,7 +23,7 @@ opentelemetry_api = { version = "0.20.0" } opentelemetry_sdk = { version = "0.20.0", features = ["metrics", "rt-tokio"] } opentelemetry = { version = "0.20.0" } strum = { version = "0.25", features = ["derive"] } -uuid = { version = "1.2.2", features = ["v4"] } +uuid = { version = "1.4.1", features = ["v4"] } banking_common = { path = "../banking_common" } cohort_sdk = { path = "../cohort_sdk" } diff --git a/packages/cohort_banking/Cargo.toml b/packages/cohort_banking/Cargo.toml index bf2d2cbe..dbf13445 100644 --- a/packages/cohort_banking/Cargo.toml +++ b/packages/cohort_banking/Cargo.toml @@ -21,7 +21,7 @@ refinery = { version = "0.8.7", features = ["tokio-postgres"] } rust_decimal = { version = "1.30.0", features = ["db-tokio-postgres", "serde-with-float"] } strum = { version = "0.25", features = ["derive"] } tokio-postgres = { version = "0.7", features = [ "with-uuid-1", "with-serde_json-1" ] } -uuid = { version = "1.2.2", features = ["v4"] } +uuid = { version = "1.4.1", features = ["v4"] } cohort_sdk = { path = "../cohort_sdk" } banking_common = { path = "../banking_common" } diff --git a/packages/cohort_sdk/Cargo.toml b/packages/cohort_sdk/Cargo.toml index af6e26b2..f2e0cb08 100644 --- a/packages/cohort_sdk/Cargo.toml +++ b/packages/cohort_sdk/Cargo.toml @@ -14,9 +14,8 @@ opentelemetry_sdk = { version = "0.20.0", features = ["metrics", "rt-tokio"] } opentelemetry = { version = "0.20.0" } rand = { version = "0.8.5" } rdkafka = { version = "0.34.0", features = ["sasl"] } -rdkafka-sys = { version = "4.6.0" } -#openssl-sys = { version = "0.9", features = ["vendored"] } -# sasl2-sys = { version = "0.1.20", features = ["vendored"] } +openssl-sys = { version = "0.9", features = ["vendored"] } +sasl2-sys = { version = "0.1", features = ["vendored"] } #openssl = { version = "0.10.57" } #sasl2-sys = { version = "0.1.20", features = ["vendored", "openssl-vendored"] } serde = { workspace = true } @@ -27,6 +26,6 @@ talos_agent = { path = "../talos_agent" } talos_certifier = { path = "../talos_certifier" } talos_cohort_replicator = { path = "../../packages/talos_cohort_replicator" } talos_rdkafka_utils = { path = "../talos_rdkafka_utils" } -uuid = { version = "1.2.2", features = ["v4"] } +uuid = { version = "1.4.1", features = ["v4"] } tokio = { workspace = true, features = ["full"] } diff --git a/packages/cohort_sdk_js/Cargo.toml b/packages/cohort_sdk_js/Cargo.toml index 9365b6f1..e6f0f687 100644 --- a/packages/cohort_sdk_js/Cargo.toml +++ b/packages/cohort_sdk_js/Cargo.toml @@ -19,7 +19,7 @@ napi-derive = "2.9.3" thiserror = "1.0" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -uuid = { version = "1", features = ["serde"] } +uuid = { version = "1.4.1", features = ["v4", "serde"] } chrono = { version = "0.4.19", features = ["serde"] } # db migrations diff --git a/packages/examples_support/Cargo.toml b/packages/examples_support/Cargo.toml index f8a361a1..77ae3b0f 100644 --- a/packages/examples_support/Cargo.toml +++ b/packages/examples_support/Cargo.toml @@ -28,4 +28,4 @@ rust_decimal = { version = "1.30.0", features = [ thiserror = { version = "1.0.31" } time = { version = "0.3.17" } tokio = { workspace = true, features = ["full"] } -uuid = { version = "1.2.2", features = ["v4"] } +uuid = { version = "1.4.1", features = ["v4"] } diff --git a/packages/talos_agent/Cargo.toml b/packages/talos_agent/Cargo.toml index 7de79761..3cd4fbd6 100644 --- a/packages/talos_agent/Cargo.toml +++ b/packages/talos_agent/Cargo.toml @@ -10,14 +10,13 @@ env_logger = { workspace = true } log = { workspace = true } multimap = { version = "0.9.0" } rdkafka = { version = "0.34.0", features = ["sasl"] } -rdkafka-sys = { version = "4.6.0" } serde = { workspace = true } serde_json = { workspace = true } strum = { version = "0.25", features = ["derive"] } thiserror = { version = "1.0.31" } time = { version = "0.3.17" } tokio = { workspace = true, features = ["full"] } -uuid = { version = "1.2.2", features = ["v4"] } +uuid = { version = "1.4.1", features = ["v4"] } talos_rdkafka_utils = { path = "../talos_rdkafka_utils" } diff --git a/packages/talos_certifier_adapters/Cargo.toml b/packages/talos_certifier_adapters/Cargo.toml index bcdf4de4..0bc5af45 100644 --- a/packages/talos_certifier_adapters/Cargo.toml +++ b/packages/talos_certifier_adapters/Cargo.toml @@ -8,7 +8,6 @@ description = "Adapters used in Talos Certifier" [dependencies] - # Json Serialize / Deserialize serde = { workspace = true } serde_json = { workspace = true } @@ -22,9 +21,13 @@ async-trait = { workspace = true } futures-util = "0.3.21" # Kafka rdkafka = { version = "0.34.0", features = ["sasl"] } +rdkafka-sys = { version = "4.6.0", features = ["ssl-vendored", "libz-static", "gssapi-vendored"] } + +#openssl-sys = { version = "0.9", features = ["vendored"] } +#sasl2-sys = { version = "0.1", features = ["vendored"] } # uuid -uuid = { version = "1.2.2", features = [] } +uuid = { version = "1.4.1", features = ["v4"] } # postgres tokio-postgres = { version = "0.7", features = [ "with-uuid-1",