From fc9ac0f093dbd383cb3163d3a02f13d50fadb981 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Ricks?= Date: Wed, 15 Jan 2025 08:02:04 +0100 Subject: [PATCH 1/4] Sort to be installed dependencies For easier tracking sort all to be installed dependencies in all files. It difficult to check if a dependency is actually used when the lists aren't sorted. --- .docker/prod-oldstable.Dockerfile | 38 +++++++++++++++---------------- .docker/prod-testing.Dockerfile | 16 ++++++------- .docker/prod.Dockerfile | 16 ++++++------- .github/install-dependencies.sh | 23 +++++++++---------- 4 files changed, 46 insertions(+), 47 deletions(-) diff --git a/.docker/prod-oldstable.Dockerfile b/.docker/prod-oldstable.Dockerfile index c2d02261..8b978a2e 100644 --- a/.docker/prod-oldstable.Dockerfile +++ b/.docker/prod-oldstable.Dockerfile @@ -9,25 +9,25 @@ COPY . /source RUN apt-get update && \ apt-get install -y --no-install-recommends \ build-essential \ - curl \ cmake \ - pkg-config \ + curl \ gnupg \ + lcov \ + libcgreen1-dev \ libcjson-dev \ libglib2.0-dev \ - libgpgme-dev \ libgnutls28-dev \ - uuid-dev \ - libssh-gcrypt-dev \ + libgpgme-dev \ libhiredis-dev \ - libxml2-dev \ - libpcap-dev \ - libnet1-dev \ libldap2-dev \ - libradcli-dev \ + libnet1-dev \ libpaho-mqtt-dev \ - libcgreen1-dev \ - lcov \ + libpcap-dev \ + libradcli-dev \ + libssh-gcrypt-dev \ + libxml2-dev \ + pkg-config \ + uuid-dev \ && rm -rf /var/lib/apt/lists/* RUN cmake -DCMAKE_BUILD_TYPE=Release -DOPENVASD=0 -B/build /source RUN DESTDIR=/install cmake --build /build -- install @@ -40,18 +40,18 @@ RUN apt-get update && \ apt-get install -y --no-install-recommends \ libcjson1 \ libglib2.0-0 \ - libgpgme11 \ libgnutls30 \ - libuuid1 \ - libjson-glib-1.0-0 \ - libssh-gcrypt-4 \ + libgpgme11 \ libhiredis0.14 \ - libxml2 \ - libpcap0.8 \ - libnet1 \ + libjson-glib-1.0-0 \ libldap-common \ - libradcli4 \ + libnet1 \ libpaho-mqtt1.3 \ + libpcap0.8 \ + libradcli4 \ + libssh-gcrypt-4 \ + libuuid1 \ + libxml2 \ && rm -rf /var/lib/apt/lists/* COPY --from=build /install/ / diff --git a/.docker/prod-testing.Dockerfile b/.docker/prod-testing.Dockerfile index f74d9dbc..e8998fba 100644 --- a/.docker/prod-testing.Dockerfile +++ b/.docker/prod-testing.Dockerfile @@ -18,18 +18,18 @@ RUN apt-get update && \ apt-get install -y --no-install-recommends \ libcjson1 \ libglib2.0-0 \ - libgpgme11 \ libgnutls30 \ - libuuid1 \ - libssh-dev \ - libhiredis1.1.0 \ + libgpgme11 \ libhiredis-dev \ - libxml2 \ - libpcap0.8 \ - libnet1 \ + libhiredis1.1.0 \ libldap-common \ - libradcli4 \ + libnet1 \ libpaho-mqtt1.3 \ + libpcap0.8 \ + libradcli4 \ + libssh-dev \ + libuuid1 \ + libxml2 \ && rm -rf /var/lib/apt/lists/* COPY --from=build /install/ / diff --git a/.docker/prod.Dockerfile b/.docker/prod.Dockerfile index 4091e1f6..350a38cb 100644 --- a/.docker/prod.Dockerfile +++ b/.docker/prod.Dockerfile @@ -18,18 +18,18 @@ RUN apt-get update && \ apt-get install -y --no-install-recommends \ libcjson1 \ libglib2.0-0 \ - libgpgme11 \ libgnutls30 \ - libjson-glib-1.0-0 \ - libuuid1 \ - libssh-gcrypt-4 \ + libgpgme11 \ libhiredis0.14 \ - libxml2 \ - libpcap0.8 \ - libnet1 \ + libjson-glib-1.0-0 \ libldap-common \ - libradcli4 \ + libnet1 \ libpaho-mqtt1.3 \ + libpcap0.8 \ + libradcli4 \ + libssh-gcrypt-4 \ + libuuid1 \ + libxml2 \ && rm -rf /var/lib/apt/lists/* COPY --from=build /install/ / diff --git a/.github/install-dependencies.sh b/.github/install-dependencies.sh index d3bad760..63ef5ab6 100755 --- a/.github/install-dependencies.sh +++ b/.github/install-dependencies.sh @@ -4,27 +4,26 @@ set -ex apt-get update && \ apt-get install -y --no-install-recommends \ build-essential \ - curl \ cmake \ - pkg-config \ + curl \ gnupg \ + lcov \ libcjson-dev \ libcurl4-openssl-dev \ - libjson-glib-dev \ + libgcrypt-dev \ libglib2.0-dev \ - libgpgme-dev \ libgnutls28-dev \ - uuid-dev \ - libgcrypt-dev \ - libssh-dev \ + libgpgme-dev \ libhiredis-dev \ - libxml2-dev \ - libpcap-dev \ - libnet1-dev \ libldap2-dev \ - libradcli-dev \ + libnet1-dev \ libpaho-mqtt-dev \ - lcov \ + libpcap-dev \ + libradcli-dev \ + libssh-dev \ + libxml2-dev \ + pkg-config \ + uuid-dev \ && rm -rf /var/lib/apt/lists/* From 5205ce9db1537ff93fe348ce5943a9775af70e64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Ricks?= Date: Wed, 15 Jan 2025 08:15:13 +0100 Subject: [PATCH 2/4] Remove libjson-glib from oldstable and stable Dockerfiles This dependency is not used in gvm-libs. --- .docker/prod-oldstable.Dockerfile | 1 - .docker/prod.Dockerfile | 1 - 2 files changed, 2 deletions(-) diff --git a/.docker/prod-oldstable.Dockerfile b/.docker/prod-oldstable.Dockerfile index 8b978a2e..e93919f9 100644 --- a/.docker/prod-oldstable.Dockerfile +++ b/.docker/prod-oldstable.Dockerfile @@ -43,7 +43,6 @@ RUN apt-get update && \ libgnutls30 \ libgpgme11 \ libhiredis0.14 \ - libjson-glib-1.0-0 \ libldap-common \ libnet1 \ libpaho-mqtt1.3 \ diff --git a/.docker/prod.Dockerfile b/.docker/prod.Dockerfile index 350a38cb..e8880075 100644 --- a/.docker/prod.Dockerfile +++ b/.docker/prod.Dockerfile @@ -21,7 +21,6 @@ RUN apt-get update && \ libgnutls30 \ libgpgme11 \ libhiredis0.14 \ - libjson-glib-1.0-0 \ libldap-common \ libnet1 \ libpaho-mqtt1.3 \ From b4197e6e745b83954a7293e905e724ce48ad9938 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Ricks?= Date: Wed, 15 Jan 2025 08:25:15 +0100 Subject: [PATCH 3/4] Install libcurl in GnuTLS flavor for testing and stable Dockerfiles libcurl is used to communicate with openvasd via HTTP. Therefore it is required during runtime. The GnuTLS flavor is chosen because of the license issues with OpenSSL. --- .docker/prod-testing.Dockerfile | 1 + .docker/prod.Dockerfile | 1 + 2 files changed, 2 insertions(+) diff --git a/.docker/prod-testing.Dockerfile b/.docker/prod-testing.Dockerfile index e8998fba..ef160517 100644 --- a/.docker/prod-testing.Dockerfile +++ b/.docker/prod-testing.Dockerfile @@ -17,6 +17,7 @@ ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update && \ apt-get install -y --no-install-recommends \ libcjson1 \ + libcurl3t64-gnutls \ libglib2.0-0 \ libgnutls30 \ libgpgme11 \ diff --git a/.docker/prod.Dockerfile b/.docker/prod.Dockerfile index e8880075..cd1b8a37 100644 --- a/.docker/prod.Dockerfile +++ b/.docker/prod.Dockerfile @@ -17,6 +17,7 @@ ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update && \ apt-get install -y --no-install-recommends \ libcjson1 \ + libcurl3-gnutls \ libglib2.0-0 \ libgnutls30 \ libgpgme11 \ From 65b34b42b503bbc00255843f885c6a711ac57195 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Ricks?= Date: Wed, 15 Jan 2025 08:27:07 +0100 Subject: [PATCH 4/4] Fix: Use same libcurl variant as OpenVAS Scanner Use libcurl in the GnuTLS flavor to have the same variant as used by the OpenVAS Scanner install docs. https://forum.greenbone.net/t/openvas-scanner-and-gvm-libs-dependencies-conflict/20115 --- .github/install-dependencies.sh | 2 +- INSTALL.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/install-dependencies.sh b/.github/install-dependencies.sh index 63ef5ab6..4ffb02fb 100755 --- a/.github/install-dependencies.sh +++ b/.github/install-dependencies.sh @@ -1,5 +1,5 @@ #!/bin/sh -# This script installs openvas-smb-dependencies. +# This script installs gvm-libs dependencies set -ex apt-get update && \ apt-get install -y --no-install-recommends \ diff --git a/INSTALL.md b/INSTALL.md index 1b829a72..9ce61a38 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -47,7 +47,7 @@ Install prerequisites on Debian stable: apt-get install \ cmake \ libcjson-dev \ - libcurl4-openssl-dev \ + libcurl4-gnutls-dev \ libgcrypt-dev \ libglib2.0-dev \ libgnutls28-dev \