Bug 2253914

Summary: clamav-data post script fails when no files found
Product: [Fedora] Fedora Reporter: Leon Fauster <leonfauster>
Component: clamavAssignee: Sergio Basto <sergio>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 40CC: anon.amish, bennie.joubert, gbcox, gk, j, karl, lee.jnk, ondrejj, orion, oss-ha, redhat-bugzilla, rh-bugzilla, sergio, steve
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: clamav-1.0.5-2.fc39 clamav-1.0.5-2.fc38 clamav-1.0.5-2.el9 clamav-1.0.5-3.fc40 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-03-14 01:07:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Leon Fauster 2023-12-10 22:29:02 UTC
https://src.fedoraproject.org/rpms/clamav/blob/rawhide/f/clamav.spec#_406

fails when no files found (new install and then updates installed).

Exec Scriptlet: clamav-data-1.0.4-1.fc38.noarch                                                                                                                                                                             
1: line 5: [: too many arguments




Reproducible: Always

Steps to Reproduce:
1.

# LANG=C ls -la  /var/lib/clamav/*.cld
ls: cannot access '/var/lib/clamav/*.cld': No such file or directory


2.

# rpm -q clamav-data --scripts |tail -6 > test.sh


3.

# LANG=C bash test.sh 
test.sh: line 5: [: too many arguments

Comment 1 Aoife Moloney 2024-02-15 23:07:25 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 40 development cycle.
Changing version to 40.

Comment 2 Sergio Basto 2024-02-27 14:16:52 UTC
*** Bug 2265468 has been marked as a duplicate of this bug. ***

Comment 3 Sergio Basto 2024-03-05 14:14:59 UTC
ah I can replicated it now 

ls /var/lib/clamav/
bytecode.cvd  daily.cvd  freshclam.dat  main.cvd

rpm -q clamav-data --scripts |tail -6 | bash 

bash: line 5: [: too many arguments


thanks

Comment 4 Fedora Update System 2024-03-05 15:43:23 UTC
FEDORA-2024-6c0e8ac18b (clamav-1.0.5-2.fc40) has been submitted as an update to Fedora 40.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-6c0e8ac18b

Comment 5 Fedora Update System 2024-03-05 15:43:42 UTC
FEDORA-2024-1e55b71bb9 (clamav-1.0.5-2.fc39) has been submitted as an update to Fedora 39.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-1e55b71bb9

Comment 6 Fedora Update System 2024-03-05 15:44:15 UTC
FEDORA-2024-1ad82004f7 (clamav-1.0.5-2.fc38) has been submitted as an update to Fedora 38.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-1ad82004f7

Comment 7 Fedora Update System 2024-03-05 15:44:31 UTC
FEDORA-EPEL-2024-7434272aa1 (clamav-1.0.5-2.el9) has been submitted as an update to Fedora EPEL 9.
https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2024-7434272aa1

Comment 8 Fedora Update System 2024-03-06 01:41:33 UTC
FEDORA-2024-1e55b71bb9 has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-1e55b71bb9`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-1e55b71bb9

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 9 Fedora Update System 2024-03-06 02:11:25 UTC
FEDORA-2024-6c0e8ac18b has been pushed to the Fedora 40 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-6c0e8ac18b`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-6c0e8ac18b

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 10 Fedora Update System 2024-03-06 02:35:01 UTC
FEDORA-2024-1ad82004f7 has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-1ad82004f7`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-1ad82004f7

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 11 Fedora Update System 2024-03-06 02:42:00 UTC
FEDORA-EPEL-2024-7434272aa1 has been pushed to the Fedora EPEL 9 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2024-7434272aa1

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 12 Fedora Update System 2024-03-14 01:07:47 UTC
FEDORA-2024-1e55b71bb9 (clamav-1.0.5-2.fc39) has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 13 Fedora Update System 2024-03-14 01:39:19 UTC
FEDORA-2024-1ad82004f7 (clamav-1.0.5-2.fc38) has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 14 Fedora Update System 2024-03-14 02:30:05 UTC
FEDORA-EPEL-2024-7434272aa1 (clamav-1.0.5-2.el9) has been pushed to the Fedora EPEL 9 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 15 Sergio Basto 2024-03-16 17:54:17 UTC
*** Bug 2264190 has been marked as a duplicate of this bug. ***

Comment 16 Fedora Update System 2024-03-23 00:39:04 UTC
FEDORA-2024-144fc00e97 (clamav-1.0.5-3.fc40) has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.