Cisco-Talos / clamav

ClamAV - Documentation is here: https://docs.clamav.net
https://www.clamav.net/
GNU General Public License v2.0
4.21k stars 686 forks source link

clamav-milter not available in DEB and RPM packages #1343

Open maxadamo opened 3 weeks ago

maxadamo commented 3 weeks ago

Describe the bug

clamav-milter executable is not part of the RPM and DEB packages.

How to reproduce the problem

The output of either rpm -qpl clamav-1.4.0.linux.x86_64.rpm | grep milter or dpkg-deb -c clamav-1.4.0.linux.x86_64.deb | grep -i milter includes the man pages for clamav-milter, but the executable is missing:

/usr/local/share/man/man5/clamav-milter.conf.5
/usr/local/share/man/man8/clamav-milter.8

however, if I compile clamav myself, the executable is available.

I am guessing that you are only forgetting to include the executable in the package, because my compilation does nothing special. This is how I compile clamav:

cmake .. && \
cmake --build . && \
ctest && \
cmake --build . --target install

I am not sure how you create the packages, however, clamav-milter is mentioned in this file: https://github.com/Cisco-Talos/clamav/blob/main/.github/workflows/clang-format.yml#L28

p.s.: this problem is present on all the latest versions: 1.4.x, 1.3.x, 1.0.x. I haven't tried the versions 0.x

micahsnyder commented 3 weeks ago

This is a known/documented shortcoming for the official DEB and RPM packages. https://docs.clamav.net/manual/Installing.html#linux-deb-rpm

It would be nice to add clamav-milter. The official DEB and RPM packages have all the dependencies statically linked so that they do not conflict with system packages, or depend on other packages. For clamav-milter, we'd need to build libmilter.a which comes from Sendmail. Very doable, we just need to put in a little work.

If anyone wants to help, we could use a recipe to build libmilter.a with as small of a build as possible in https://github.com/Cisco-Talos/clamav-mussels-cookbook/tree/master/recipes. You would only need to define the recipe for Linux under "host-static".

If that's done, then add libmilter as a dependency under Linux for https://github.com/Cisco-Talos/clamav-mussels-cookbook/blob/master/collections/clamav_deps-1.2.yaml