Bug 1679375 - Syntax error in /etc/logrotate.d/clamd.exim
Summary: Syntax error in /etc/logrotate.d/clamd.exim
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: clamav
Version: rawhide
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Sergio Basto
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 2269800 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-02-21 02:30 UTC by Edgar Hoch
Modified: 2024-04-08 16:05 UTC (History)
17 users (show)

Fixed In Version: clamav-1.0.5-3.fc40 clamav-1.0.5-3.fc39 clamav-1.0.5-3.el9 clamav-1.0.5-3.fc38
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2269800 (view as bug list)
Environment:
Last Closed: 2024-03-23 00:39:01 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Edgar Hoch 2019-02-21 02:30:38 UTC
Description of problem:

/etc/logrotate.d/clamd.exim contains a starting "'" but no ending "'" in line 7.


Version-Release number of selected component (if applicable):
exim-clamav-4.92-1.fc29.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Install package exim-clamav-4.92-1.fc29.x86_64
2. Wait until logrotate was run by cron
3. Check e-mail of root

Actual results:
Error message: see content of e-mail send to root by "Anacron job 'cron.daily' on $(hostname):

/etc/cron.daily/logrotate:

logrotate_script: -c: Zeile 1: Dateiende beim Suchen nach `'' erreicht.
logrotate_script: -c: Zeile 2: Syntax Fehler: Unerwartetes Dateiende.
error: error running non-shared postrotate script for /var/log/clamd.exim of '/var/log/clamd.exim '


Expected results:
No error.

Additional Information:

This error started which update of exim-clamav to exim-clamav-4.92-1.fc29.x86_64 by dnf-automatic-install.

Comment 1 Dennis Flaherty 2019-03-02 16:41:42 UTC
I changed mine to

/var/log/clamd.exim {
	monthly
	notifempty
	missingok

	postrotate
		pkill -u exim -HUP -f /usr/sbin/clamd >/dev/null 2>&1 || :
	endscript
}

The -f option's argument is the full path of the executable, /usr/sbin/clamd.  I'm guessing this was a botched cut & paste where the package maintainer grabbed the entire line of the script to start clamd and forgot to trim.

Regards,
Dennis

Comment 2 Tim Landscheidt 2019-03-02 17:38:57 UTC
(This also affects Fedora 28.)  exim's packaging generates the file from clamav-devel's /usr/share/clamav/template/clamd.logrotate so it should probably be fixed there as well/first.

Comment 3 Ben Cotton 2019-10-31 19:52:48 UTC
This message is a reminder that Fedora 29 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 29 on 2019-11-26.
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 '29'.

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 29 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.

Comment 4 Ben Cotton 2019-11-27 21:18:36 UTC
Fedora 29 changed to end-of-life (EOL) status on 2019-11-26. Fedora 29 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 5 Tim Landscheidt 2024-03-16 14:51:04 UTC
(In reply to Tim Landscheidt from comment #2)
> (This also affects Fedora 28.)  exim's packaging generates the file from
> clamav-devel's /usr/share/clamav/template/clamd.logrotate so it should
> probably be fixed there as well/first.

I filed bug #2269800 for that.

Comment 6 Sergio Basto 2024-03-16 16:22:04 UTC
*** Bug 2269800 has been marked as a duplicate of this bug. ***

Comment 7 Sergio Basto 2024-03-16 16:23:44 UTC
What is the correct [1] or [2] ? 


[1]
pkill -u <USER> -HUP -f '/usr/sbin/clamd -c /etc/clamd.d/<SERVICE>.conf' >/dev/null 2>&1 || :


[2]
pkill -u <USER> -HUP -f /usr/sbin/clamd -c /etc/clamd.d/<SERVICE>.conf >/dev/null 2>&1 || :

Comment 8 Sergio Basto 2024-03-16 16:31:09 UTC
https://linuxize.com/post/pkill-command-in-linux/

By default, pkill matches only against the process name. When -f option is used, the command matches against full argument lists. If the command contains spaces, quote the entire command:

pkill -9 -f "ping 8.8.8.8"

Comment 9 Fedora Update System 2024-03-16 17:36:23 UTC
FEDORA-2024-144fc00e97 (clamav-1.0.5-3.fc40) has been submitted as an update to Fedora 40.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-144fc00e97

Comment 10 Fedora Update System 2024-03-16 17:36:50 UTC
FEDORA-2024-6abd0d03e5 (clamav-1.0.5-3.fc39) has been submitted as an update to Fedora 39.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-6abd0d03e5

Comment 11 Fedora Update System 2024-03-16 17:37:06 UTC
FEDORA-2024-fa80526b9c (clamav-1.0.5-3.fc38) has been submitted as an update to Fedora 38.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-fa80526b9c

Comment 12 Fedora Update System 2024-03-16 17:37:20 UTC
FEDORA-EPEL-2024-012f8151a8 (clamav-1.0.5-3.el9) has been submitted as an update to Fedora EPEL 9.
https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2024-012f8151a8

Comment 13 Tim Landscheidt 2024-03-16 18:11:49 UTC
(In reply to Sergio Basto from comment #8)
> https://linuxize.com/post/pkill-command-in-linux/
> 
> By default, pkill matches only against the process name. When -f option is
> used, the command matches against full argument lists. If the command
> contains spaces, quote the entire command:
> 
> pkill -9 -f "ping 8.8.8.8"

I stand corrected, you are right:

| $ sleep 1h &
| [1] 310354
| $ pkill sleep 1h
| pkill: only one pattern can be provided
| Try `pkill --help' for more information.
| $ pkill 'sleep 1h'
| $ jobs
| [1]+  Running                 sleep 1h &
| $ pkill -f 'sleep 1h'
| [1]+  Terminated              sleep 1h
| $ jobs
| $

Thanks!

Comment 14 Fedora Update System 2024-03-17 01:07:52 UTC
FEDORA-2024-fa80526b9c 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-fa80526b9c`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-fa80526b9c

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

Comment 15 Fedora Update System 2024-03-17 01:18:43 UTC
FEDORA-EPEL-2024-012f8151a8 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-012f8151a8

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

Comment 16 Fedora Update System 2024-03-17 01:18:48 UTC
FEDORA-2024-144fc00e97 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-144fc00e97`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-144fc00e97

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

Comment 17 Fedora Update System 2024-03-17 01:26:18 UTC
FEDORA-2024-6abd0d03e5 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-6abd0d03e5`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-6abd0d03e5

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

Comment 18 Fedora Update System 2024-03-23 00:39:01 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.

Comment 19 Fedora Update System 2024-03-24 01:06:38 UTC
FEDORA-2024-6abd0d03e5 (clamav-1.0.5-3.fc39) has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 20 Fedora Update System 2024-03-25 00:41:59 UTC
FEDORA-EPEL-2024-012f8151a8 (clamav-1.0.5-3.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 21 Fedora Update System 2024-03-25 00:53:02 UTC
FEDORA-2024-fa80526b9c (clamav-1.0.5-3.fc38) has been pushed to the Fedora 38 stable repository.
If problem still persists, 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.