Bug 1154756

Summary: clamav mangles freshclam.conf in %post
Product: [Fedora] Fedora EPEL Reporter: Orion Poplawski <orion>
Component: clamavAssignee: Robert Scheck <redhat-bugzilla>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: el6CC: janfrode, jorti, mstevens, redhat-bugzilla, rhbugs, steve
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: clamav-0.99.2-2.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-04-13 18:49:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Orion Poplawski 2014-10-20 16:49:54 UTC
Description of problem:

Fresh install of clamav-0.98.4-1.el6.x86_64:

# freshclam
ClamAV update process started at Mon Oct 20 16:33:58 2014
main.cvd is up to date (version: 55, sigs: 2424225, f-level: 60, builder: neo)
WARNING: Can't get information about db.# tz zone descriptions (deprecated version).clamav.net: Name or service not known
...

# grep -F DatabaseMirror /etc/freshclam.conf
#DatabaseMirror db.XY.clamav.net
DatabaseMirror db.# tz zone descriptions (deprecated version).clamav.net
DatabaseMirror db.local.clamav.net

%post has:

ZONES="/usr/share/zoneinfo/zone.tab"
CONFIG="/etc/sysconfig/clock"

if [ -r "$CONFIG" -a -r "$ZONES" ]; then
        source "$CONFIG"
        export CODE="$(grep -E "\b$ZONE\b" "$ZONES" | head -1 | cut -f1 | tr [A-Z] [a-z])"
fi

if [ -z "$CODE" ]; then
        export CODE="local"
fi

/usr/bin/perl -pi -e '
                s|^(DatabaseMirror) database\.clamav\.net$|$1 db.$ENV{"CODE"}.clamav.net\n$1 db.local.clamav.net|;
                s|^(DatabaseMirror) db\.\.clamav\.net$|$1 db.$ENV{"CODE"}.clamav.net\n$1 db.local.clamav.net|;
        ' /etc/freshclam.conf{,.rpmnew} &>/dev/null || :

which is not present in the Fedora package.

Comment 1 Fedora Update System 2017-03-28 20:33:07 UTC
clamav-0.99.2-2.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-ef25dca94c

Comment 2 Fedora Update System 2017-03-28 20:33:55 UTC
clamav-0.99.2-2.el5 has been submitted as an update to Fedora EPEL 5. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-53bf560223

Comment 3 Fedora Update System 2017-03-29 18:16:57 UTC
clamav-0.99.2-2.el5 has been pushed to the Fedora EPEL 5 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-2017-53bf560223

Comment 4 Fedora Update System 2017-03-30 01:47:07 UTC
clamav-0.99.2-2.el6 has been pushed to the Fedora EPEL 6 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-2017-ef25dca94c

Comment 5 Fedora Update System 2017-04-13 18:49:11 UTC
clamav-0.99.2-2.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.