Skip to content

Commit

Permalink
Fix: dependencies for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
jjnicola committed Apr 24, 2023
1 parent fa5f49c commit a408754
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 3 deletions.
1 change: 1 addition & 0 deletions .docker/build.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion rust/cross.Dockerfile
Original file line number Diff line number Diff line change
@@ -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
24 changes: 23 additions & 1 deletion rust/cross_aarch64.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -18,3 +19,24 @@ 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
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
RUN export LD_LIBRARY_PATH=/usr/local/ssl/lib:${LD_LIBRARY_PATH}
RUN ldconfig
RUN make install

0 comments on commit a408754

Please sign in to comment.