Bug 1540113 - Database format inconsistency cvd vs cld
Summary: Database format inconsistency cvd vs cld
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: clamav
Version: epel7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Robert Scheck
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-30 10:07 UTC by Dimitris
Modified: 2018-07-03 12:53 UTC (History)
11 users (show)

Fixed In Version: clamav-0.100.0-2.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-07-03 12:53:29 UTC


Attachments (Terms of Use)

Description Dimitris 2018-01-30 10:07:27 UTC
Description of problem:

I'm approaching this problem via two different directions.

Clamav uses two formats for its database, the CVD and the CLD. One is a compressed version of the other, but clamav doesn't like it when both of them exist at the same time. When I run "rpm -V clamav-data" to verify the integrity of my system, clamav-data complains that the following files are missing:

missing   c /var/lib/clamav/bytecode.cvd
missing   c /var/lib/clamav/daily.cvd
missing   c /var/lib/clamav/main.cvd

Now, after the recent update to 0.99.3-1.el7, the new packages installed outdated versions of the CVD database (bytecode.cvd & main.cvd). This caused all scans (via the shell or via cron) to now produce the following error:

LibClamAV Warning: Detected duplicate databases /var/lib/clamav/bytecode.cvd and /var/lib/clamav/bytecode.cld, please manually remove one of them

I would like to propose two fixes:

- On package update, check if current/updated CLD files already exist, then don't install the old CVD files
- On package verification, not to complain when the CVD files have been replaced by CLD files.

Thank you.


Version-Release number of selected component (if applicable):

clamav-data-0.99.3-1.el7.noarch


How reproducible:

always


Steps to Reproduce:
1. yum update
2. rpm -V clamav-data
3. clamscam /some/directory/


Actual results:

LibClamAV Warning: Detected duplicate databases /var/lib/clamav/bytecode.cvd and /var/lib/clamav/bytecode.cld, please manually remove one of them


Expected results:

No warnings or errors

Comment 1 Sergio Monteiro Basto 2018-01-30 12:21:36 UTC
if you update your database you may install clamav-data-empty 

with dnf (I don't know if you have it installed in epel 7 )

dnf install clamav-data-empty --allowerasing

Comment 2 Dimitris 2018-01-30 15:34:10 UTC
My humble opinion, is that clamav-data & clamav-data-empty are handled in a rather awkward way.

I don't understand why clamav-data is even a dependency requirement, that package clearly contains outdated definitions, which will be replaced instantly by the latest .cld data via freshclam.

An on top of the outdated database, there is an empty database package, to accommodate for the dependency to the outdated database?

Why not scrap clamav-data-empty and make clamav-data optional? then, let freshclam do its job. Those who want an offline database may still install the outdated clamav-data package.

Comment 3 Sergio Monteiro Basto 2018-01-30 15:47:46 UTC
It is an option that I will consider , I started maintain this package just a few months ago .

Comment 4 Dimitris 2018-01-30 15:53:49 UTC
Thank you for taking a look.

Maybe I am missing a key part of the puzzle, so my suggestions could be wrong and ignorant. But I'd appreciate it if others looked at this bizarre situation.

Comment 5 Raman Gupta 2018-03-20 23:08:42 UTC
Even the workaround of using clamav-data-empty doesn't work properly on Fedora 27, as the RPM still contains the outdated files:

# rpm -q --list clamav-data-empty-0.99.4-1.fc27.noarch
/var/lib/clamav/bytecode.cvd
/var/lib/clamav/daily.cvd
/var/lib/clamav/main.cvd

This is more than awkward -- it's pretty much broken.

Comment 6 Sergio Monteiro Basto 2018-03-20 23:51:35 UTC
(In reply to Raman Gupta from comment #5)
> Even the workaround of using clamav-data-empty doesn't work properly on
> Fedora 27, as the RPM still contains the outdated files:
> 
> # rpm -q --list clamav-data-empty-0.99.4-1.fc27.noarch
> /var/lib/clamav/bytecode.cvd
> /var/lib/clamav/daily.cvd
> /var/lib/clamav/main.cvd
> 
> This is more than awkward -- it's pretty much broken.

Thanks for the report , I had check this and it is a typo in spec, I will fix it soon .
I just testing now before commit

Comment 7 Fedora Update System 2018-03-23 18:35:56 UTC
clamav-0.99.4-3.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-833b5d8001

Comment 8 Fedora Update System 2018-03-23 21:43:55 UTC
clamav-0.99.4-3.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-833b5d8001

Comment 9 Fedora Update System 2018-03-24 20:06:02 UTC
clamav-0.99.4-3.fc28 has been pushed to the Fedora 28 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-2018-833b5d8001

Comment 10 Fedora Update System 2018-03-30 13:17:21 UTC
clamav-0.99.4-3.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2018-05-29 02:31:06 UTC
clamav-0.100.0-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-4b08b15845

Comment 12 Fedora Update System 2018-05-29 13:03:53 UTC
clamav-0.100.0-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-2018-4b08b15845

Comment 13 Fedora Update System 2018-06-03 14:04:09 UTC
clamav-0.100.0-2.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-7d6dc8227a

Comment 14 Fedora Update System 2018-06-03 19:41:35 UTC
clamav-0.100.0-2.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-2018-7d6dc8227a

Comment 15 Fedora Update System 2018-07-03 12:53:29 UTC
clamav-0.100.0-2.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.