From 4fa9e2f65bde3e28df2eeb090db3d76543eb8deb Mon Sep 17 00:00:00 2001 From: kulukami Date: Mon, 25 Sep 2023 16:57:34 +0800 Subject: [PATCH] fix ci --- plugins/scanner/.cargo/config.toml | 6 ------ plugins/scanner/docker/build_linux_aarch64.sh | 8 ++++---- plugins/scanner/docker/build_linux_x86_64.sh | 8 ++++---- 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/plugins/scanner/.cargo/config.toml b/plugins/scanner/.cargo/config.toml index 4e31c3b4c..18e9e1854 100644 --- a/plugins/scanner/.cargo/config.toml +++ b/plugins/scanner/.cargo/config.toml @@ -5,9 +5,3 @@ linker = "/opt/x86_64-linux-musl/bin/x86_64-linux-musl-g++" [target."aarch64-unknown-linux-musl"] rustflags = ["-C", "linker-flavor=gcc", "-C", "link-self-contained=on"] linker = "/opt/aarch64-linux-musl/bin/aarch64-linux-musl-g++" - -[source.crates-io] -replace-with = 'rsproxy' - -[source.rsproxy] -registry = "https://rsproxy.cn/crates.io-index" diff --git a/plugins/scanner/docker/build_linux_aarch64.sh b/plugins/scanner/docker/build_linux_aarch64.sh index e2796e0e3..5be0e5199 100644 --- a/plugins/scanner/docker/build_linux_aarch64.sh +++ b/plugins/scanner/docker/build_linux_aarch64.sh @@ -7,18 +7,18 @@ mv /LibClamavDocker/clamav . mv /LibClamavDocker/clamav-mussels-cookbook . mv /LibClamavDocker/lib . mv /LibClamavDocker/include . -rustup target add x86_64-unknown-linux-musl +rustup target add aarch64-unknown-linux-musl -CC="x86_64-linux-musl-gcc" CXX="x86_64-linux-musl-c++" RUSTFLAGS='-C target-feature=+crt-static' cargo build --release --bin scanner_plugin --target x86_64-unknown-linux-musl +CC="aarch64-linux-musl-gcc" CXX="aarch64-linux-musl-c++" RUSTFLAGS='-C target-feature=+crt-static' cargo build --release --bin scanner_plugin --target aarch64-unknown-linux-musl mkdir -p output/tmp cp -r tools/* ./output/. cp settings.toml ./output/. -cp target/x86_64-unknown-linux-musl/release/scanner_plugin output/scanner +cp target/aarch64-unknown-linux-musl/release/scanner_plugin output/scanner strip output/scanner wget http://lf9-elkeid.bytetos.com/obj/elkeid-download/18249e0cbe7c6aca231f047cb31d753fa4604434fcb79f484ea477f6009303c3/archive_db_default_20221206.zip mv archive_db_default_20221206.zip ./output/tmp -cd output && tar zcvf scanner-x86_64.tar.gz scanner tmp elkeid_targets settings.toml && cd - \ No newline at end of file +cd output && tar zcvf scanner-aarch64.tar.gz scanner tmp elkeid_targets settings.toml && cd - \ No newline at end of file diff --git a/plugins/scanner/docker/build_linux_x86_64.sh b/plugins/scanner/docker/build_linux_x86_64.sh index 5be0e5199..e2796e0e3 100644 --- a/plugins/scanner/docker/build_linux_x86_64.sh +++ b/plugins/scanner/docker/build_linux_x86_64.sh @@ -7,18 +7,18 @@ mv /LibClamavDocker/clamav . mv /LibClamavDocker/clamav-mussels-cookbook . mv /LibClamavDocker/lib . mv /LibClamavDocker/include . -rustup target add aarch64-unknown-linux-musl +rustup target add x86_64-unknown-linux-musl -CC="aarch64-linux-musl-gcc" CXX="aarch64-linux-musl-c++" RUSTFLAGS='-C target-feature=+crt-static' cargo build --release --bin scanner_plugin --target aarch64-unknown-linux-musl +CC="x86_64-linux-musl-gcc" CXX="x86_64-linux-musl-c++" RUSTFLAGS='-C target-feature=+crt-static' cargo build --release --bin scanner_plugin --target x86_64-unknown-linux-musl mkdir -p output/tmp cp -r tools/* ./output/. cp settings.toml ./output/. -cp target/aarch64-unknown-linux-musl/release/scanner_plugin output/scanner +cp target/x86_64-unknown-linux-musl/release/scanner_plugin output/scanner strip output/scanner wget http://lf9-elkeid.bytetos.com/obj/elkeid-download/18249e0cbe7c6aca231f047cb31d753fa4604434fcb79f484ea477f6009303c3/archive_db_default_20221206.zip mv archive_db_default_20221206.zip ./output/tmp -cd output && tar zcvf scanner-aarch64.tar.gz scanner tmp elkeid_targets settings.toml && cd - \ No newline at end of file +cd output && tar zcvf scanner-x86_64.tar.gz scanner tmp elkeid_targets settings.toml && cd - \ No newline at end of file