diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index c52373412ca..1b9d555735c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -8,38 +8,49 @@ on: workflow_dispatch: jobs: - build_binaries: - strategy: - matrix: - include: - - os: ubuntu-latest - extension: so - target: x86_64-unknown-linux-gnu - - os: ubuntu-latest - extension: so - target: aarch64-unknown-linux-gnu - runs-on: ${{matrix.os}} + build_binaries_aarch64-unknown-linux-gnu: + runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 with: profile: minimal toolchain: nightly - target: ${{matrix.target}} + target: aarch64-unknown-linux-gnu - uses: Swatinem/rust-cache@v1 with: - key: ${{matrix.target}}-${{matrix.os}} - # We use zigbuild for easy cross compilation (no need for target's gcc when compiling C dependencies) - - name: setup zigbuild - run: python3 -m pip install ziglang && cargo install cargo-zigbuild + key: aarch64-unknown-linux-gnu-ubuntu-latest + - name: setup cross + run: cargo install cross --git https://github.com/cross-rs/cross - name: build mirrord-layer and cli - run: cargo +nightly zigbuild --release -p mirrord -p mirrord-layer --target=${{matrix.target}} + run: cross +nightly build --release -p mirrord -p mirrord-layer --target=aarch64-unknown-linux-gnu - uses: actions/upload-artifact@v3 with: - name: ${{matrix.target}} + name: aarch64-unknown-linux-gnu path: | - target/${{matrix.target}}/release/mirrord - target/${{matrix.target}}/release/libmirrord_layer.${{matrix.extension}} + target/aarch64-unknown-linux-gnu/release/mirrord + target/aarch64-unknown-linux-gnu/release/libmirrord_layer.so + if-no-files-found: error + build_binaries_x86_64-unknown-linux-gnu: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly + target: x86_64-unknown-linux-gnu + - uses: Swatinem/rust-cache@v1 + with: + key: x86_64-unknown-linux-gnu-ubuntu-latest + - name: build mirrord-layer and cli + run: cargo +nightly build --release -p mirrord -p mirrord-layer --target=x86_64-unknown-linux-gnu + - uses: actions/upload-artifact@v3 + with: + name: x86_64-unknown-linux-gnu + path: | + target/x86_64-unknown-linux-gnu/release/mirrord + target/x86_64-unknown-linux-gnu/release/libmirrord_layer.so if-no-files-found: error build_binaries_macos: runs-on: macos-12 @@ -155,7 +166,13 @@ jobs: ghcr.io/metalbear-co/mirrord:${{ steps.version.outputs.version }} release_vscode_ext: - needs: [build_binaries, build_binaries_macos, release_docker_image] + needs: + [ + build_binaries_aarch64-unknown-linux-gnu, + build_binaries_x86_64-unknown-linux-gnu, + build_binaries_macos, + release_docker_image, + ] runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -229,7 +246,13 @@ jobs: if-no-files-found: error release_intellij_plugin: - needs: [build_binaries, build_binaries_macos, release_docker_image] + needs: + [ + build_binaries_aarch64-unknown-linux-gnu, + build_binaries_x86_64-unknown-linux-gnu, + build_binaries_macos, + release_docker_image, + ] runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -270,7 +293,8 @@ jobs: release_gh: needs: [ - build_binaries, + build_binaries_aarch64-unknown-linux-gnu, + build_binaries_x86_64-unknown-linux-gnu, build_binaries_macos, release_docker_image, release_vscode_ext, diff --git a/Cargo.lock b/Cargo.lock index e9290ef01cf..cbe8e111c6e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -49,15 +49,6 @@ dependencies = [ "libc", ] -[[package]] -name = "ansi_term" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" -dependencies = [ - "winapi", -] - [[package]] name = "anyhow" version = "1.0.66" @@ -151,15 +142,13 @@ dependencies = [ [[package]] name = "bindgen" -version = "0.57.0" +version = "0.61.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd4865004a46a0aafb2a0a5eb19d3c9fc46ee5f063a6cfc605c69ac9ecf5263d" +checksum = "8a022e58a142a46fea340d68012b9201c094e93ec3d033a944a24f8fd4a4f09a" dependencies = [ "bitflags", "cexpr", "clang-sys", - "clap 2.34.0", - "env_logger", "lazy_static", "lazycell", "log", @@ -169,7 +158,8 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "which 3.1.1", + "syn", + "which", ] [[package]] @@ -301,9 +291,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.73" +version = "1.0.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" +checksum = "581f5dba903aac52ea3feb5ec4810848460ee833876f1f9b0fdeab1f19091574" [[package]] name = "cesu8" @@ -313,9 +303,9 @@ checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" [[package]] name = "cexpr" -version = "0.4.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4aedb84272dbe89af497cf81375129abda4fc0a9e7c5d317498c15cc30c0d27" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" dependencies = [ "nom", ] @@ -353,21 +343,6 @@ dependencies = [ "libloading", ] -[[package]] -name = "clap" -version = "2.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" -dependencies = [ - "ansi_term", - "atty", - "bitflags", - "strsim 0.8.0", - "textwrap 0.11.0", - "unicode-width", - "vec_map", -] - [[package]] name = "clap" version = "3.2.23" @@ -380,9 +355,9 @@ dependencies = [ "clap_lex", "indexmap", "once_cell", - "strsim 0.10.0", + "strsim", "termcolor", - "textwrap 0.16.0", + "textwrap", ] [[package]] @@ -559,7 +534,7 @@ dependencies = [ "ident_case", "proc-macro2", "quote", - "strsim 0.10.0", + "strsim", "syn", ] @@ -573,7 +548,7 @@ dependencies = [ "ident_case", "proc-macro2", "quote", - "strsim 0.10.0", + "strsim", "syn", ] @@ -692,19 +667,6 @@ dependencies = [ "syn", ] -[[package]] -name = "env_logger" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a19187fea3ac7e84da7dacf48de0c45d63c6a76f9490dae389aead16c243fce3" -dependencies = [ - "atty", - "humantime", - "log", - "regex", - "termcolor", -] - [[package]] name = "errno" version = "0.2.8" @@ -823,8 +785,8 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frida-build" -version = "0.2.1" -source = "git+https://github.com/metalbear-co/frida-rust.git?branch=metalbear#65ca85847b5fc37758adf5fd1a758165d6f28eca" +version = "0.2.0" +source = "git+https://github.com/metalbear-co/frida-rust.git?branch=metalbear2#9f9e31b88aeb06af83ffd6b0a0418883c2d9cd65" dependencies = [ "reqwest", "tar", @@ -833,8 +795,8 @@ dependencies = [ [[package]] name = "frida-gum" -version = "0.9.0" -source = "git+https://github.com/metalbear-co/frida-rust.git?branch=metalbear#65ca85847b5fc37758adf5fd1a758165d6f28eca" +version = "0.8.1" +source = "git+https://github.com/metalbear-co/frida-rust.git?branch=metalbear2#9f9e31b88aeb06af83ffd6b0a0418883c2d9cd65" dependencies = [ "capstone", "capstone-sys", @@ -848,8 +810,8 @@ dependencies = [ [[package]] name = "frida-gum-sys" -version = "0.5.0" -source = "git+https://github.com/metalbear-co/frida-rust.git?branch=metalbear#65ca85847b5fc37758adf5fd1a758165d6f28eca" +version = "0.4.1" +source = "git+https://github.com/metalbear-co/frida-rust.git?branch=metalbear2#9f9e31b88aeb06af83ffd6b0a0418883c2d9cd65" dependencies = [ "bindgen", "frida-build", @@ -1089,12 +1051,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" -[[package]] -name = "humantime" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" - [[package]] name = "hyper" version = "0.14.20" @@ -1584,6 +1540,12 @@ version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + [[package]] name = "mio" version = "0.8.5" @@ -1601,7 +1563,7 @@ name = "mirrord" version = "3.4.0" dependencies = [ "anyhow", - "clap 3.2.23", + "clap", "exec", "mirrord-auth", "mirrord-layer", @@ -1612,7 +1574,7 @@ dependencies = [ "semver 1.0.14", "tracing", "tracing-subscriber", - "which 4.3.0", + "which", ] [[package]] @@ -1622,7 +1584,7 @@ dependencies = [ "actix-codec", "bollard", "bytes", - "clap 3.2.23", + "clap", "containerd-client", "faccess", "futures", @@ -1896,12 +1858,12 @@ checksum = "43794a0ace135be66a25d3ae77d41b91615fb68ae937f904090203e81f755b65" [[package]] name = "nom" -version = "5.1.2" +version = "7.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb4262d26ed83a1c0a33a38fe2bb15797329c85770da05e6b828ddb782627af" +checksum = "a8903e5a29a317527874d0402f867152a3d21c908bb0b933e416c65e301d4c36" dependencies = [ "memchr", - "version_check", + "minimal-lexical", ] [[package]] @@ -2040,9 +2002,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e82dad04139b71a90c080c8463fe0dc7902db5192d939bd0950f074d014339e1" +checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" [[package]] name = "openssl-probe" @@ -2378,7 +2340,7 @@ dependencies = [ "prost-types", "regex", "tempfile", - "which 4.3.0", + "which", ] [[package]] @@ -2974,9 +2936,9 @@ dependencies = [ [[package]] name = "shlex" -version = "0.1.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fdf1b9db47230893d76faad238fd6097fd6d6a9245cd7a4d90dbd639536bbd2" +checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" [[package]] name = "signal-hook-registry" @@ -3040,12 +3002,6 @@ dependencies = [ "tokio-stream", ] -[[package]] -name = "strsim" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" - [[package]] name = "strsim" version = "0.10.0" @@ -3162,15 +3118,6 @@ dependencies = [ "wsl", ] -[[package]] -name = "textwrap" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" -dependencies = [ - "unicode-width", -] - [[package]] name = "textwrap" version = "0.16.0" @@ -3669,12 +3616,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" -[[package]] -name = "vec_map" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" - [[package]] name = "version_check" version = "0.9.4" @@ -3838,15 +3779,6 @@ dependencies = [ "webpki 0.22.0", ] -[[package]] -name = "which" -version = "3.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d011071ae14a2f6671d0b74080ae0cd8ebf3a6f8c9589a2cd45f23126fe29724" -dependencies = [ - "libc", -] - [[package]] name = "which" version = "4.3.0" diff --git a/mirrord-layer/Cargo.toml b/mirrord-layer/Cargo.toml index 0b7230cd35e..c5eed36e138 100644 --- a/mirrord-layer/Cargo.toml +++ b/mirrord-layer/Cargo.toml @@ -25,7 +25,7 @@ libc = "0.2" nix.workspace = true tracing.workspace = true tracing-subscriber.workspace = true -frida-gum = { git="https://github.com/metalbear-co/frida-rust.git", branch = "metalbear", version = "0.9", features = ["auto-download"] } +frida-gum = { git="https://github.com/metalbear-co/frida-rust.git", branch = "metalbear2", version = "0.8", features = ["auto-download"] } futures.workspace = true k8s-openapi.workspace = true kube.workspace = true