From 7e5293099a52fa41e2ceffa20e2c2d5bdaa1b51f Mon Sep 17 00:00:00 2001 From: Angelo D <43831545+AngeloD2022@users.noreply.github.com> Date: Sun, 3 Dec 2023 17:55:45 -0500 Subject: [PATCH 1/4] modified Cargo.toml --- Cargo.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index cef799a..0e6f1f0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,6 +21,9 @@ yara = "0.20.0" yara-sys = { version = "0.20.0", features = ["yara-static"] } zip = "0.6.6" +[target.'cfg(target_os = "macos")'.dependencies] +yara-sys = { version = "0.20.0", features = ["yara-static", "vendored"] } + [profile.release] strip = true lto = true From e37e132800a34879aacebd3691f9d40ec1923775 Mon Sep 17 00:00:00 2001 From: Angelo D <43831545+AngeloD2022@users.noreply.github.com> Date: Sun, 3 Dec 2023 18:01:17 -0500 Subject: [PATCH 2/4] modified README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 8665a53..579b10a 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,10 @@ cargo build --release ./target/release/dragonfly-client-rs ``` +> [!IMPORTANT] +> When building on an `aarch64`-based distribution of macOS, be sure to build +> Dragonfly with the following environment variables: + ### Docker #### Requirements From e5b6c926d240cbb9ea90580419e27b5bae64a65c Mon Sep 17 00:00:00 2001 From: Angelo D <43831545+AngeloD2022@users.noreply.github.com> Date: Sun, 3 Dec 2023 18:06:16 -0500 Subject: [PATCH 3/4] Update README.md Additional build documentation for aarch64 macOS Signed-off-by: Angelo D <43831545+AngeloD2022@users.noreply.github.com> --- README.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 579b10a..8738351 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,15 @@ This section goes over how to set up a client instance locally and via Docker. export YARA_LIBRARY_PATH='/path/to/yara/libs' ``` +> [!IMPORTANT] +> When building on an arm-based distribution of macOS, be sure to build +> Dragonfly with the following environment variables: +> | Name | Example Value | +> |-------------------|-------------------------------------------| +> | YARA_INCLUDE_DIR | /opt/homebrew/Cellar/yara/4.3.2_1/include | +> | YARA_LIBRARY_PATH | /opt/homebrew/Cellar/yara/4.3.2_1/lib | +> | YARA_OPENSSL_DIR | /opt/homebrew/opt/openssl@3.2 | + #### 2. Build the binary with `cargo` ```sh @@ -34,10 +43,6 @@ cargo build --release ./target/release/dragonfly-client-rs ``` -> [!IMPORTANT] -> When building on an `aarch64`-based distribution of macOS, be sure to build -> Dragonfly with the following environment variables: - ### Docker #### Requirements From 2258f41ccc658ac2997339537187e6fc18fd2454 Mon Sep 17 00:00:00 2001 From: Angelo D <43831545+AngeloD2022@users.noreply.github.com> Date: Sun, 3 Dec 2023 18:09:47 -0500 Subject: [PATCH 4/4] redundant language Signed-off-by: Angelo D <43831545+AngeloD2022@users.noreply.github.com> --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8738351..0509da3 100644 --- a/README.md +++ b/README.md @@ -23,8 +23,8 @@ export YARA_LIBRARY_PATH='/path/to/yara/libs' ``` > [!IMPORTANT] -> When building on an arm-based distribution of macOS, be sure to build -> Dragonfly with the following environment variables: +> When building on an arm-based distribution of macOS, be sure to specify +> the following environment variables: > | Name | Example Value | > |-------------------|-------------------------------------------| > | YARA_INCLUDE_DIR | /opt/homebrew/Cellar/yara/4.3.2_1/include |