Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error out while building clamav 1.0 alpine image #14

Closed
harsh-saini-E2842 opened this issue Jan 9, 2023 · 1 comment
Closed

Error out while building clamav 1.0 alpine image #14

harsh-saini-E2842 opened this issue Jan 9, 2023 · 1 comment

Comments

@harsh-saini-E2842
Copy link

harsh-saini-E2842 commented Jan 9, 2023

Some days back I was able to build ClamAV 1.0 image successfully but now getting errors while building

As per the error message it is not able to find "fts-dev"
ERROR: unable to select packages:
fts-dev (no such package):
required by: world[fts-dev]

Step 1/15 : FROM index.docker.io/library/rust:alpine AS builder
---> b97871448127
Step 2/15 : WORKDIR /src
---> Using cache
---> 120c4e655f46
Step 3/15 : COPY . /src/
---> 724e6bb321a3
Step 4/15 : RUN apk update && apk upgrade && apk add --no-cache bsd-compat-headers cmake file fts-dev g++ libtool linux-headers make libmilter-dev ncurses-dev python3 py3-pytest py3-pip perl libunwind-dev git patchelf && python3 -m pip install --upgrade pip && python3 -m pip install mussels && python3 -m mussels update && python3 -m mussels cookbook trust -y clamav && python3 -m mussels build clamav_deps -t host-static -r && mkdir -p "./build" && cd "./build" && cmake .. -D CMAKE_BUILD_TYPE="Release" -D CMAKE_INSTALL_PREFIX="/usr" -D CMAKE_INSTALL_LIBDIR="/usr/lib" -D APP_CONFIG_DIRECTORY="/etc/clamav" -D DATABASE_DIRECTORY="/var/lib/clamav" -D ENABLE_CLAMONACC=OFF -D ENABLE_EXAMPLES=OFF -D ENABLE_MILTER=ON -D ENABLE_MAN_PAGES=OFF -D ENABLE_STATIC_LIB=ON -D ENABLE_SHARED_LIB=OFF -D CMAKE_FIND_PACKAGE_PREFER_CONFIG=TRUE -D CMAKE_PREFIX_PATH="$HOME/.mussels/install/host-static" -D CMAKE_MODULE_PATH="$HOME/.mussels/install/host-static/lib/cmake" -D JSONC_INCLUDE_DIR="$HOME/.mussels/install/host-static/include/json-c" -D JSONC_LIBRARY="$HOME/.mussels/install/host-static/lib/libjson-c.a" -D ENABLE_JSON_SHARED=OFF -D BZIP2_INCLUDE_DIR="$HOME/.mussels/install/host-static/include" -D BZIP2_LIBRARY_RELEASE="$HOME/.mussels/install/host-static/lib/libbz2_static.a" -D CURL_INCLUDE_DIR="$HOME/.mussels/install/host-static/include" -D CURL_LIBRARY="$HOME/.mussels/install/host-static/lib/libcurl.a" -D OPENSSL_ROOT_DIR="$HOME/.mussels/install/host-static" -D OPENSSL_INCLUDE_DIR="$HOME/.mussels/install/host-static/include" -D OPENSSL_CRYPTO_LIBRARY="$HOME/.mussels/install/host-static/lib/libcrypto.a" -D OPENSSL_SSL_LIBRARY="$HOME/.mussels/install/host-static/lib/libssl.a" -D LIBXML2_INCLUDE_DIR="$HOME/.mussels/install/host-static/include/libxml2" -D LIBXML2_LIBRARY="$HOME/.mussels/install/host-static/lib/libxml2.a" -D PCRE2_INCLUDE_DIR="$HOME/.mussels/install/host-static/include" -D PCRE2_LIBRARY="$HOME/.mussels/install/host-static/lib/libpcre2-8.a" -D ZLIB_INCLUDE_DIR="$HOME/.mussels/install/host-static/include" -D ZLIB_LIBRARY="$HOME/.mussels/install/host-static/lib/libz.a" -D LIBCHECK_INCLUDE_DIR="$HOME/.mussels/install/host-static/include" -D LIBCHECK_LIBRARY="$HOME/.mussels/install/host-static/lib/libcheck.a" && make DESTDIR="/clamav" -j$(($(nproc) - 1)) install && rm -r "/clamav/usr/lib/pkgconfig/" && sed -e "s|^(Example)|# \1|" -e "s|.(PidFile) .|\1 /tmp/clamd.pid|" -e "s|.(LocalSocket) .|\1 /tmp/clamd.sock|" -e "s|.(TCPSocket) .|\1 3310|" -e "s|.(TCPAddr) .|#\1 0.0.0.0|" -e "s|.(User) .|\1 clamav|" -e "s|^#(LogFile) .|\1 /var/log/clamav/clamd.log|" -e "s|^#(LogTime).|\1 yes|" "/clamav/etc/clamav/clamd.conf.sample" > "/clamav/etc/clamav/clamd.conf" && sed -e "s|^(Example)|# \1|" -e "s|.(PidFile) .|\1 /tmp/freshclam.pid|" -e "s|.(DatabaseOwner) .|\1 clamav|" -e "s|^#(UpdateLogFile) .|\1 /var/log/clamav/freshclam.log|" -e "s|^#(NotifyClamd).|\1 /etc/clamav/clamd.conf|" -e "s|^#(ScriptedUpdates).|\1 yes|" "/clamav/etc/clamav/freshclam.conf.sample" > "/clamav/etc/clamav/freshclam.conf" && sed -e "s|^(Example)|# \1|" -e "s|.(PidFile) .|\1 /tmp/clamav-milter.pid|" -e "s|.(MilterSocket) .|\1 inet:7357|" -e "s|.(User) .|\1 clamav|" -e "s|^#(LogFile) .|\1 /var/log/clamav/milter.log|" -e "s|^#(LogTime).|\1 yes|" -e "s|.(\ClamdSocket) .|\1 unix:/tmp/clamd.sock|" "/clamav/etc/clamav/clamav-milter.conf.sample" > "/clamav/etc/clamav/clamav-milter.conf" || exit 1 && ctest -V
---> Running in e20c5cbe9533
fetch https://dl-cdn.alpinelinux.org/alpine/v3.17/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.17/community/x86_64/APKINDEX.tar.gz
v3.17.0-356-g3207313590 [https://dl-cdn.alpinelinux.org/alpine/v3.17/main]
v3.17.0-354-g70687dc3bc [https://dl-cdn.alpinelinux.org/alpine/v3.17/community]
OK: 17817 distinct packages available
(1/4) Upgrading ca-certificates-bundle (20220614-r2 -> 20220614-r4)
(2/4) Upgrading libcrypto3 (3.0.7-r0 -> 3.0.7-r2)
(3/4) Upgrading libssl3 (3.0.7-r0 -> 3.0.7-r2)
(4/4) Upgrading ca-certificates (20220614-r2 -> 20220614-r4)
Executing busybox-1.35.0-r29.trigger
Executing ca-certificates-20220614-r4.trigger
OK: 143 MiB in 26 packages
fetch https://dl-cdn.alpinelinux.org/alpine/v3.17/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.17/community/x86_64/APKINDEX.tar.gz
ERROR: unable to select packages:
fts-dev (no such package):
required by: world[fts-dev]
The command '/bin/sh -c apk update && apk upgrade && apk add --no-cache bsd-compat-headers cmake file fts-dev g++ libtool linux-headers make libmilter-dev ncurses-dev python3 py3-pytest py3-pip perl libunwind-dev git patchelf && python3 -m pip install --upgrade pip && python3 -m pip install mussels && python3 -m mussels update && python3 -m mussels cookbook trust -y clamav && python3 -m mussels build clamav_deps -t host-static -r && mkdir -p "./build" && cd "./build" && cmake .. -D CMAKE_BUILD_TYPE="Release" -D CMAKE_INSTALL_PREFIX="/usr" -D CMAKE_INSTALL_LIBDIR="/usr/lib" -D APP_CONFIG_DIRECTORY="/etc/clamav" -D DATABASE_DIRECTORY="/var/lib/clamav" -D ENABLE_CLAMONACC=OFF -D ENABLE_EXAMPLES=OFF -D ENABLE_MILTER=ON -D ENABLE_MAN_PAGES=OFF -D ENABLE_STATIC_LIB=ON -D ENABLE_SHARED_LIB=OFF -D CMAKE_FIND_PACKAGE_PREFER_CONFIG=TRUE -D CMAKE_PREFIX_PATH="$HOME/.mussels/install/host-static" -D CMAKE_MODULE_PATH="$HOME/.mussels/install/host-static/lib/cmake" -D JSONC_INCLUDE_DIR="$HOME/.mussels/install/host-static/include/json-c" -D JSONC_LIBRARY="$HOME/.mussels/install/host-static/lib/libjson-c.a" -D ENABLE_JSON_SHARED=OFF -D BZIP2_INCLUDE_DIR="$HOME/.mussels/install/host-static/include" -D BZIP2_LIBRARY_RELEASE="$HOME/.mussels/install/host-static/lib/libbz2_static.a" -D CURL_INCLUDE_DIR="$HOME/.mussels/install/host-static/include" -D CURL_LIBRARY="$HOME/.mussels/install/host-static/lib/libcurl.a" -D OPENSSL_ROOT_DIR="$HOME/.mussels/install/host-static" -D OPENSSL_INCLUDE_DIR="$HOME/.mussels/install/host-static/include" -D OPENSSL_CRYPTO_LIBRARY="$HOME/.mussels/install/host-static/lib/libcrypto.a" -D OPENSSL_SSL_LIBRARY="$HOME/.mussels/install/host-static/lib/libssl.a" -D LIBXML2_INCLUDE_DIR="$HOME/.mussels/install/host-static/include/libxml2" -D LIBXML2_LIBRARY="$HOME/.mussels/install/host-static/lib/libxml2.a" -D PCRE2_INCLUDE_DIR="$HOME/.mussels/install/host-static/include" -D PCRE2_LIBRARY="$HOME/.mussels/install/host-static/lib/libpcre2-8.a" -D ZLIB_INCLUDE_DIR="$HOME/.mussels/install/host-static/include" -D ZLIB_LIBRARY="$HOME/.mussels/install/host-static/lib/libz.a" -D LIBCHECK_INCLUDE_DIR="$HOME/.mussels/install/host-static/include" -D LIBCHECK_LIBRARY="$HOME/.mussels/install/host-static/lib/libcheck.a" && make DESTDIR="/clamav" -j$(($(nproc) - 1)) install && rm -r "/clamav/usr/lib/pkgconfig/" && sed -e "s|^(Example)|# \1|" -e "s|.
(PidFile) .|\1 /tmp/clamd.pid|" -e "s|.(LocalSocket) .|\1 /tmp/clamd.sock|" -e "s|.(TCPSocket) .|\1 3310|" -e "s|.(TCPAddr) .|#\1 0.0.0.0|" -e "s|.(User) .|\1 clamav|" -e "s|^#(LogFile) .|\1 /var/log/clamav/clamd.log|" -e "s|^#(LogTime).|\1 yes|" "/clamav/etc/clamav/clamd.conf.sample" > "/clamav/etc/clamav/clamd.conf" && sed -e "s|^(Example)|# \1|" -e "s|.(PidFile) .|\1 /tmp/freshclam.pid|" -e "s|.(DatabaseOwner) .|\1 clamav|" -e "s|^#(UpdateLogFile) .|\1 /var/log/clamav/freshclam.log|" -e "s|^#(NotifyClamd).|\1 /etc/clamav/clamd.conf|" -e "s|^#(ScriptedUpdates).|\1 yes|" "/clamav/etc/clamav/freshclam.conf.sample" > "/clamav/etc/clamav/freshclam.conf" && sed -e "s|^(Example)|# \1|" -e "s|.(PidFile) .|\1 /tmp/clamav-milter.pid|" -e "s|.(MilterSocket) .|\1 inet:7357|" -e "s|.(User) .|\1 clamav|" -e "s|^#(LogFile) .|\1 /var/log/clamav/milter.log|" -e "s|^#(LogTime).|\1 yes|" -e "s|.(\ClamdSocket) .|\1 unix:/tmp/clamd.sock|" "/clamav/etc/clamav/clamav-milter.conf.sample" > "/clamav/etc/clamav/clamav-milter.conf" || exit 1 && ctest -V' returned a non-zero code: 1

@val-ms
Copy link
Collaborator

val-ms commented Feb 7, 2023

ERROR: unable to select packages:
fts-dev (no such package):
required by: world[fts-dev]

I ran into this as well when working on an update to the dockerfile last week. It appears that Alpine renamed the package.
I believe it is fixed now, by this commit that changes it to musl-fts-dev: 363bca0#diff-1dd62f8ce4c90437dd1d40c1583f4865f0035c3f3efa783cfe568dc1bab457fbR24

@val-ms val-ms closed this as completed Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants