Bug 228468 - security/clamav 0.100.0 unit_test fail
Summary: security/clamav 0.100.0 unit_test fail
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Larry Rosenman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-24 17:59 UTC by gondim
Modified: 2018-12-05 05:14 UTC (History)
5 users (show)

See Also:
bugzilla: maintainer-feedback? (ler)


Attachments
check_clamav.log (4.76 KB, text/plain)
2018-05-24 17:59 UTC, gondim
no flags Details
check1_clamscan.sh.log (324.70 KB, text/plain)
2018-05-24 17:59 UTC, gondim
no flags Details
check2_clamd.sh.log (5.48 KB, text/plain)
2018-05-24 18:00 UTC, gondim
no flags Details
Test-suite from 11.2 clang6 (335.98 KB, text/plain)
2018-09-06 08:43 UTC, Martinos
no flags Details
clamav fix (14.26 KB, patch)
2018-11-29 16:19 UTC, Lorenzo Salvadore
ler: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description gondim 2018-05-24 17:59:27 UTC
Created attachment 193664 [details]
check_clamav.log

Hi all,

When I try to compile clamav 0.100.0_1, it fails the unit_tests and does not complete the installation.

gmake  check-TESTS
gmake[4]: Entering directory '/usr/ports/security/clamav/work/clamav-0.100.0/unit_tests'
gmake[5]: Entering directory '/usr/ports/security/clamav/work/clamav-0.100.0/unit_tests'
FAIL: check_clamav
PASS: check_freshclam.sh
PASS: check_sigtool.sh
SKIP: check_unit_vg.sh
FAIL: check1_clamscan.sh
FAIL: check2_clamd.sh
PASS: check3_clamd.sh
PASS: check4_clamd.sh
SKIP: check5_clamd_vg.sh
SKIP: check6_clamd_vg.sh
SKIP: check7_clamd_hg.sh
SKIP: check8_clamd_hg.sh
SKIP: check9_clamscan_vg.sh
gmake[6]: Entering directory '/usr/ports/security/clamav/work/clamav-0.100.0/unit_tests'
gmake[6]: Nothing to be done for 'all'.
gmake[6]: Leaving directory '/usr/ports/security/clamav/work/clamav-0.100.0/unit_tests'
============================================================================
Testsuite summary for ClamAV 0.100.0
============================================================================
# TOTAL: 13
# PASS:  4
# SKIP:  6
# XFAIL: 0
# FAIL:  3
# XPASS: 0
# ERROR: 0
============================================================================
See unit_tests/test-suite.log
Please report to https://bugzilla.clamav.net/
============================================================================
gmake[5]: *** [Makefile:1089: test-suite.log] Error 1
gmake[5]: Leaving directory '/usr/ports/security/clamav/work/clamav-0.100.0/unit_tests'
gmake[4]: *** [Makefile:1197: check-TESTS] Error 2
gmake[4]: Leaving directory '/usr/ports/security/clamav/work/clamav-0.100.0/unit_tests'
gmake[3]: *** [Makefile:1352: check-am] Error 2
gmake[3]: Leaving directory '/usr/ports/security/clamav/work/clamav-0.100.0/unit_tests'
gmake[2]: *** [Makefile:756: check-recursive] Error 1
gmake[2]: Leaving directory '/usr/ports/security/clamav/work/clamav-0.100.0'
*** Error code 2

Stop.
make[1]: stopped in /usr/ports/security/clamav
*** Error code 1

Stop.
make: stopped in /usr/ports/security/clamav

But this one installs version 0.99.4 and run unit_tests:

gmake[4]: Leaving directory '/usr/ports/security/clamav/work/clamav-0.99.4/unit_tests'
gmake  check-TESTS
gmake[4]: Entering directory '/usr/ports/security/clamav/work/clamav-0.99.4/unit_tests'
gmake[5]: Entering directory '/usr/ports/security/clamav/work/clamav-0.99.4/unit_tests'
PASS: check_clamav
PASS: check_freshclam.sh
PASS: check_sigtool.sh
SKIP: check_unit_vg.sh
PASS: check1_clamscan.sh
PASS: check2_clamd.sh
PASS: check3_clamd.sh
PASS: check4_clamd.sh
SKIP: check5_clamd_vg.sh
SKIP: check6_clamd_vg.sh
SKIP: check7_clamd_hg.sh
SKIP: check8_clamd_hg.sh
SKIP: check9_clamscan_vg.sh
======================
All 7 tests passed
(6 tests were not run)
======================
gmake[5]: Leaving directory '/usr/ports/security/clamav/work/clamav-0.99.4/unit_tests'
gmake[4]: Leaving directory '/usr/ports/security/clamav/work/clamav-0.99.4/unit_tests'
gmake[3]: Leaving directory '/usr/ports/security/clamav/work/clamav-0.99.4/unit_tests'
Making check in clamsubmit
gmake[3]: Entering directory '/usr/ports/security/clamav/work/clamav-0.99.4/clamsubmit'
gmake[3]: Nothing to be done for 'check'.
gmake[3]: Leaving directory '/usr/ports/security/clamav/work/clamav-0.99.4/clamsubmit'
gmake[3]: Entering directory '/usr/ports/security/clamav/work/clamav-0.99.4'
gmake[3]: Leaving directory '/usr/ports/security/clamav/work/clamav-0.99.4'
gmake[2]: Leaving directory '/usr/ports/security/clamav/work/clamav-0.99.4'
===>  Staging for clamav-0.99.4
===>   Generating temporary packing list
===> Creating groups.
.
.
.

I've tried everything I could to find out where the problem is, but I could not.
Comment 1 gondim 2018-05-24 17:59:57 UTC
Created attachment 193665 [details]
check1_clamscan.sh.log
Comment 2 gondim 2018-05-24 18:00:23 UTC
Created attachment 193666 [details]
check2_clamd.sh.log
Comment 3 gondim 2018-05-25 21:35:15 UTC
Hi,

I could not reproduce the problem at all. On some servers the problem does not occur and in others it occurs.
Comment 4 Walter Schwarzenfeld 2018-05-25 23:08:57 UTC
Had the same problem with clang. If I compile it with gcc6 unit-test works.
Comment 5 Larry Rosenman freebsd_committer freebsd_triage 2018-07-15 02:28:34 UTC
Is this still happening with 0.100.1?
Comment 6 Walter Schwarzenfeld 2018-07-15 14:59:09 UTC
(In reply to Larry Rosenman from comment #5)
Same result, fails with the same error message with clang, succeed with gcc6.
Comment 7 Martinos 2018-09-05 14:42:48 UTC
Testsuite summary for ClamAV 0.100.1
============================================================================
# TOTAL: 13
# PASS:  4
# SKIP:  6
# XFAIL: 0
# FAIL:  3
# XPASS: 0
# ERROR: 0

Tested on Freebsd 11.1 with clang 4 and 11.2 with clang 6
the same fail results on few servers
Any chance to fix this?
Comment 8 Larry Rosenman freebsd_committer freebsd_triage 2018-09-05 14:45:05 UTC
(In reply to Martinos from comment #7)
What options do you pick for the port?  Can you post a link to the test suite output?

Thanks! (I'll need to get the clamav folks involved).
Comment 9 Martinos 2018-09-06 08:43:52 UTC
Created attachment 196910 [details]
Test-suite from 11.2 clang6

I checked the content in these files from different systems, I mean 11.1 with clang4 and 11.2 with clang6, the content is practically the same, only the .tmp files are different
Comment 10 Martinos 2018-09-06 08:50:41 UTC
Option port below:

===> The following configuration options are available for clamav-0.100.1_1:                                                                                             
     ARC=on: Enable arch archives support                                                                                                                                
     ARJ=on: Enable arj archives support                                                                                                                                 
     DMG_XAR=on: Enable DMG and XAR archives support                                                                                                                     
     DOCS=on: Build and/or install documentation                                                                                                                         
     EXPERIMENTAL=off: Build experimental code                                                                                                                           
     ICONV=on: Encoding conversion support via iconv                                                                                                                     
     IPV6=on: IPv6 protocol support                                                                                                                                      
     JSON=on: JSON file/format/parser support                                                                                                                            
     LDAP=off: LDAP protocol support                                                                                                                                     
     LHA=on: Enable lha archives support                                                                                                                                 
     MILTER=off: Compile the milter interface                                                                                                                            
     PCRE=on: Use Perl Compatible Regular Expressions                                                                                                                    
     STDERR=off: Print logs to stderr instead of stdout                                                                                                                  
     TESTS=on: Run compile-time tests (req. python)                                                                                                                      
     UNRAR=on: RAR decompression support                                                                                                                                 
     UNZOO=on: Enable zoo archives support
Comment 11 Raphael 2018-09-12 08:41:16 UTC
Hi,

I have this issue too.
I think i know where the problem is : it occurs when libmspack (port or package) is installed on the system.
Comment 12 gondim 2018-09-12 15:22:34 UTC
Perfect!!! pkg delete libmspack   and now work fine.
Comment 13 Raphael 2018-09-12 15:29:43 UTC
In my case this not a solution, libmspack is a dependency for open-vm-tools-nox11 and I need those.
Comment 14 Lorenzo Salvadore freebsd_committer freebsd_triage 2018-11-29 16:19:30 UTC
Created attachment 199674 [details]
clamav fix

This patch should fix the issue. I have tested it on my own system (11.2-RELEASE-p5) and on poudriere (11.2-RELEASE-p5 i386/amd64). Portlint test passed successfully.

It adds a few more fixes and improvements.

- Solves the bug, by adding a MSPACK option (enabled by default) and a build dependency on pkg-config.

- Makes massive use of options helpers and similar tools to improve Makefile's readability. In the rewriting I have not maintained the dependency of option LDAP on option MILTER and the two options are now indipendent: if this is bad, it as to be fixed on my patch. I avoided to do it directly because I am unsure it is needed.

- Uses now libpcre2 consistently (before the port could link to libpcre2 by mistake).

- Removes useless arguments about zlib in CONFIGURE_ARGS.

- Reorders variables consistently with the standard order.

- Cleans header.

- Updates pkg-plist and sort if alphabetically.

- Bump PORTREVISION, needed because of some fixes.
Comment 15 Lorenzo Salvadore freebsd_committer freebsd_triage 2018-11-29 19:55:05 UTC
I made one more test: building the port with LDAP option set and MILTER unset and I verified that some binary file indeed links to libldap.so. Thus, I think I did well by making the two options independent.
Comment 16 Larry Rosenman freebsd_committer freebsd_triage 2018-11-29 19:58:11 UTC
Thanks, Lorenzo.  I'll look at this shortly.
Comment 17 commit-hook freebsd_committer freebsd_triage 2018-11-30 02:34:51 UTC
A commit references this bug:

Author: ler
Date: Fri Nov 30 02:34:21 UTC 2018
New revision: 486224
URL: https://svnweb.freebsd.org/changeset/ports/486224

Log:
  security/clamav: fix test failures.

  It adds a few more fixes and improvements.

  - Solves the bug, by adding a MSPACK option (enabled by default) and a build dependency on pkg-config.

  - Makes massive use of options helpers and similar tools to improve Makefile's readability. In the rewriting I have not maintained the dependency of option LDAP on option MILTER and the two options are now indipendent: if this is bad, it as to be fixed on my patch. I avoided to do it directly because I am unsure it is needed.

  - Uses now libpcre2 consistently (before the port could link to libpcre2 by mistake).

  - Removes useless arguments about zlib in CONFIGURE_ARGS.

  - Reorders variables consistently with the standard order.

  - Cleans header.

  - Updates pkg-plist and sort if alphabetically.

  - Bump PORTREVISION, needed because of some fixes.

  PR:		228468
  Submitted by:	phascolarctos@protonmail.ch
  Reported by:	gondim@bsdinfo.com.br

Changes:
  head/security/clamav/Makefile
  head/security/clamav/pkg-plist
Comment 18 Larry Rosenman freebsd_committer freebsd_triage 2018-11-30 02:35:19 UTC
Committed Thanks!