Description of problem: clamscan --get-json does not output JSON Version-Release number of selected component (if applicable): Version : 0.100.1 Release : 4.fc28 Architecture: x86_64 How reproducible: Always Steps to Reproduce: 1. install clamav 2. scan an arbitrary file with clamscan --get-json 3. Actual results: No JSON output $ clamscan --gen-json /bin/ls /bin/ls: OK ----------- SCAN SUMMARY ----------- Known viruses: 6569818 Engine version: 0.100.1 Scanned directories: 0 Scanned files: 1 Infected files: 0 Data scanned: 0.15 MB Data read: 0.15 MB (ratio 1.00:1) Time: 12.676 sec (0 m 12 s) Expected results: JSON output Additional info: I don't know whether or not this is because of some build flag, or an error in the build environment. I tried to compile it myself and then clamav's configure script fails on a test for libjson-c it seems, but I could be wrong here.
This message is a reminder that Fedora 28 is nearing its end of life. On 2019-May-28 Fedora will stop maintaining and issuing updates for Fedora 28. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '28'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 28 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle. Changing version to '31'.
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle. Changing version to 31.
clamav-0.101.5-1.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-1543eae191
clamav-0.101.5-1.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-dcbfe89e39
clamav-0.101.5-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-d6b0a398c2
clamav-0.101.5-1.el8 has been pushed to the Fedora EPEL 8 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-52445f11c2
clamav-0.101.5-1.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-ce438e7857
clamav-0.101.5-1.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.
clamav-0.101.5-1.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.
I still don't see any json data in clamscan output: [ondrejj@work ~]$ rpm -q clamav clamav-0.101.5-1.fc31.x86_64 [ondrejj@work ~]$ clamscan --gen-json /bin/ls /bin/ls: OK ----------- SCAN SUMMARY ----------- Known viruses: 6794126 Engine version: 0.101.5 Scanned directories: 0 Scanned files: 1 Infected files: 0 Data scanned: 0.15 MB Data read: 0.15 MB (ratio 1.00:1) Time: 10.705 sec (0 m 10 s) [ondrejj@work ~]$
Created attachment 1642024 [details] 0001-1631525-enable-libjson-Enables-libjson.patch I checked this report and I made the pacth in attachment , but nothing changed. libjson is enabled we are missing something ... Thank you
Well, --gen-json is definitely "enabled", otherwise specifying --gen-json would produce: !Can't generate json (gen-json). libjson-c dev library was missing or misconfigured when ClamAV was built. Apparently output is only generate in combination with --debug and for specific files: "some office, pdf, or pe file" see https://blog.clamav.net/2014/11/intro-to-collection-and-analysis-of.html For a pdf file I got: LibClamAV debug: { "Magic": "CLAMJSONv0", "RootFileType": "CL_TYPE_PDF", "FileType": "CL_TYPE_PDF", "FileSize": 64347, "FileMD5": "d7146c1a9cee064ead503f88a44f0b44", "PDFStats": { "PDFVersion": "1.3", "ObjectsWithoutDictionaries": [ 5, 11, 17, 7, 20, 26, 29, 31, 34, 35, 36, 35, 36, 36 ], "IncorrectPagesCount": true, "Producer": "Mac OS X 10.10.1 Quartz PDFContext", "ModificationDate": "D:20141210181337Z00'00'", "CreationDate": "D:20141210181337Z00'00'", "DeflateObjectCount": 6, "PageCount": 1 }, "ContainedObjects": [ { "FileType": "CL_TYPE_TEXT_ASCII", "FileSize": 170948, "FileMD5": "14f2991dfacb79bcdfaec7a76c5221b8" }, { "FileType": "CL_TYPE_TEXT_ASCII", "FileSize": 7079, "FileMD5": "bd3d689960efd7e41c1404afe8b78584" }, { "FileType": "CL_TYPE_BINARY_DATA", "FileSize": 1960, "FileMD5": "0d258bad36b64cebfb9e6826c3ed5037" }, { "FileType": "CL_TYPE_BINARY_DATA", "FileSize": 16392, "FileMD5": "5ceac6c32776184c508bb9ef48b3f7ca" }, { "FileType": "CL_TYPE_TEXT_ASCII", "FileSize": 342, "FileMD5": "021b9e6faf9b389d61e045e1f9194b14" }, { "FileType": "CL_TYPE_BINARY_DATA", "FileSize": 2228, "FileMD5": "cc787337be3ddd46f72bd4768fdb2291" }, { "FileType": "CL_TYPE_BINARY_DATA", "FileSize": 8116, "FileMD5": "1bdaa02cfa95c0dc8bfb75ce1d66bfa0" } ] }
Lets close with fixed, we added libjson-c-devel to the spec file