diff --git a/.docker/build.Dockerfile b/.docker/build.Dockerfile index d38a5e393..64e3032e5 100644 --- a/.docker/build.Dockerfile +++ b/.docker/build.Dockerfile @@ -18,6 +18,7 @@ RUN apt-get update && apt-get install --no-install-recommends --no-install-sugge libksba-dev \ libpaho-mqtt-dev \ libpcap-dev \ + zlib1g-dev \ libssh-gcrypt-dev \ libbsd-dev \ # for linking openvas-smb (libopenvas_wmiclient) diff --git a/.github/workflows/container.yml b/.github/workflows/container.yml index 29cdf825e..320fdf99c 100644 --- a/.github/workflows/container.yml +++ b/.github/workflows/container.yml @@ -28,7 +28,7 @@ jobs: ~/.cargo/git/db/ rust/target/ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - - run: sudo apt update && sudo apt-get install -y libpcap-dev + - run: sudo apt update && sudo apt-get install -y libpcap-dev libssl-dev - run: rustup update stable && rustup default stable - run: cargo install cross - run: CROSS_CONFIG=Cross.toml cross -v build --release --target aarch64-unknown-linux-gnu diff --git a/rust/cross.Dockerfile b/rust/cross.Dockerfile index 15a9a2449..5f6cd9204 100644 --- a/rust/cross.Dockerfile +++ b/rust/cross.Dockerfile @@ -1,4 +1,4 @@ ARG CROSS_BASE_IMAGE FROM $CROSS_BASE_IMAGE RUN apt-get update && apt-get install -y \ - libpcap-dev + libpcap-dev libssh-dev zlib1g-dev diff --git a/rust/cross_aarch64.Dockerfile b/rust/cross_aarch64.Dockerfile index 9be615766..3e85ef314 100644 --- a/rust/cross_aarch64.Dockerfile +++ b/rust/cross_aarch64.Dockerfile @@ -7,7 +7,8 @@ FROM ghcr.io/cross-rs/aarch64-unknown-linux-gnu:latest RUN apt-get update && apt-get install -y \ bison \ flex \ - curl + curl \ + zlib1g-dev RUN curl -o /tmp/pcap.tar.gz https://www.tcpdump.org/release/libpcap-1.10.3.tar.gz WORKDIR /tmp RUN tar xvf pcap.tar.gz @@ -18,3 +19,26 @@ ENV CFLAGS='-Os' RUN ./configure --host=aarch64-unknown-linux-gnu --with-pcap=linux RUN cat config.log RUN make install + +RUN curl --output /tmp/zlib.tar.gz https://www.zlib.net/zlib-1.2.13.tar.gz +WORKDIR /tmp +RUN tar xvf zlib.tar.gz +WORKDIR /tmp/zlib-1.2.13 +ENV CC=aarch64-linux-gnu-gcc +ENV CHOST=arm64 +RUN ./configure +RUN make install +RUN ldconfig + +RUN curl -o /tmp/openssl.tar.gz https://www.openssl.org/source/old/3.0/openssl-3.0.7.tar.gz +WORKDIR /tmp +RUN tar xvf openssl.tar.gz +RUN ls -las +WORKDIR /tmp/openssl-3.0.7 +ENV CC=aarch64-linux-gnu-gcc +ENV CFLAGS='-Os' +RUN ./Configure linux-aarch64 --prefix=/usr/local/ssl --openssldir=/usr/local/ssl shared zlib +ENV LD_LIBRARY_PATH=/usr/local/ssl/lib:${LD_LIBRARY_PATH} +RUN ldconfig +RUN make install +ENV PKG_CONFIG_PATH=/usr/local/ssl/lib/pkgconfig:${PKG_CONFIG_PATH}