Page MenuHomeFreeBSD

security/clamav: Update to 0.104.0
ClosedPublic

Authored by yasu on Oct 7 2021, 11:29 AM.

Details

Summary
  • Upstream changed build tool from GNU Autotools to CMake
  • Switch to use pkg-messge instead of pkg-deinstall to display message for those who remove ClamAV permanently from their system
  • Stop checking in rc scripts if /var/run/clamav exists
  • Pet portclippy
  • Reformat Makefile with portfmt

Release Notes: https://blog.clamav.net/2021/09/clamav-01040-released.html
PR: 258565
Approved by: meta (mentor), ygy (mentor)

Test Plan

Build succeeds with 13.0-RELEASE amd64

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 42003
Build 38891: arc lint + arc unit

Event Timeline

yasu requested review of this revision.Oct 7 2021, 11:29 AM

Add 'Differential Revision:' to commit message.

Hi, great work!

Were you able to have a look at the suggestions I made? https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258565#c3

Best regards,
Daniel

  • Remove needless INSTALL_TARGET
  • Switch to use FOO_CMAKE_BOOL
  • Replase MILTER_CFLAGS/LDFLAGS with USE=localbase
  • Set TEST_TARGET
  • Add pre-test-TESTS-off target to display message that TEST option needs to be enabled to execute make test.

Were you able to have a look at the suggestions I made? https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258565#c3

Thanks for pointing out. I overlooked it. I have reflected most of your comments but I have one question.

L68 (new patch) MILTER should probably be better defined rather than "if exists" (base vs port)

Would you please explain more specifically? I can't imagine how ".if exists" in Makefile can be replaced with patch to source files.

@diizzy One comment you feedback.

L80 should probably be python:3.6+,test (unless 2.X still works)
https://cgit.freebsd.org/ports/tree/Mk/Uses/python.mk#n38

Currently USES=python without version-spec means 3.6+.
https://cgit.freebsd.org/ports/tree/Mk/Uses/python.mk#n27
And 0.104.0 requires Python 3 to test. So version-spec isn't necessary in this case.

In D32354#731758, @yasu wrote:

Were you able to have a look at the suggestions I made? https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258565#c3

Thanks for pointing out. I overlooked it. I have reflected most of your comments but I have one question.

L68 (new patch) MILTER should probably be better defined rather than "if exists" (base vs port)

Would you please explain more specifically? I can't imagine how ".if exists" in Makefile can be replaced with patch to source files.

Instead of silently probing it might be worth considering using OPTIONS_SINGLE/OPTIONS_RADIO (whatever that fits best) to make it clear to the user what's being used and fail accordingly

Edit: OPTIONS_SINGLE/OPTIONS_RADIO

In D32354#731762, @yasu wrote:

@diizzy One comment you feedback.

L80 should probably be python:3.6+,test (unless 2.X still works)
https://cgit.freebsd.org/ports/tree/Mk/Uses/python.mk#n38

Currently USES=python without version-spec means 3.6+.
https://cgit.freebsd.org/ports/tree/Mk/Uses/python.mk#n27
And 0.104.0 requires Python 3 to test. So version-spec isn't necessary in this case.

Ahh, good catch! Sorry for the noise

security/clamav/Makefile
62

Consider using TEST instead for consistency within the ports tree
https://github.com/freebsd/freebsd-ports/blob/main/Mk/bsd.options.desc.mk#L481

134

I guess it boils down to preference but as far as I know we don't do this for any other port. If there's a test option it's implied that you need to have it enabled

This revision was not accepted when it landed; it landed in state Needs Review.Oct 29 2021, 10:53 PM
This revision was automatically updated to reflect the committed changes.