Bug 1786860 - Installs both cron job and systemd timer
Summary: Installs both cron job and systemd timer
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: clamav-unofficial-sigs
Version: epel7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Didier Fabert (tartare)
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-12-28 18:06 UTC by Chris Adams
Modified: 2020-03-09 22:42 UTC (History)
5 users (show)

Fixed In Version: clamav-unofficial-sigs-7.0.1-5.fc30 clamav-unofficial-sigs-7.0.1-5.fc31 clamav-unofficial-sigs-7.0.1-5.el7 clamav-unofficial-sigs-7.0.1-5.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-02 18:51:19 UTC
Type: Bug


Attachments (Terms of Use)

Description Chris Adams 2019-12-28 18:06:57 UTC
The RPM installs both a cron job (in /etc/cron.d) and a systemd timer. The cron job is set for 14 minutes after the hour and the systemd timer for 45 minutes after the hour, and then both call the same script.

One or the other should be removed. There should only be a single time-triggered job to update the data.

Comment 1 Nerijus Baliūnas 2020-02-02 21:26:57 UTC
Probably because of this I get such email every few hours:

From: "(Cron Daemon)" <root@...>
Subject: Cron <root@bluegene> [ -x /usr/sbin/clamav-unofficial-sigs.sh ] && /bin/bash /usr/sbin/clamav-unofficial-sigs.sh
To: root@...

==================================================
ERROR: Only one instance can run at the same time.
==================================================

I'd suggest removing cron script too.

Comment 2 Nerijus Baliūnas 2020-02-02 21:33:14 UTC
Or at least mark /etc/cron.d/clamav-unofficial-sigs as config file, so that changes to the file are not overwritten on a package update.

Comment 3 Jan ONDREJ 2020-02-03 07:09:33 UTC
I will try to look at this.

Currently looks like on my systems the systemd timer is not active (not enabled) by default, so should not conflict with cron script.

Advantages(+)/disadvantages(-) of cron script:
+ do not need systemd (can run on centos 6 too)
+ simple
- uses fixed time (14th minute), but can be moved to random time
- active by default

Advantages(+)/disadvantages(-) of service/timer script:
- needs systemd (can't run on centos 6)
- more complex, harder to debug
+ has random ability
- requires activation on package installation, not sure, if it's OK to always enable it by default

Let me know, if I miss something.
I am still in doubt, which one should be disabled/removed.

If I remove cron script, then timer MUST be activated from rpm script, otherwise after an standard rpm update most users will be blocked to receive updates.

If I remove timer script and update some random sleep, everything will work well, but I think this is a step back. Systemd/timer is what new systems are using.

Also automatic updates are disabled in clamav. I think they have a good reason, that user which installs clamav/clamav-unofficial-sigs by mistake will not harm signature servers. But this should be done at start, not with an update. Not sure, how to simply make an disabled-warn script like in clamav for clamav-unofficial-sigs.

Any ideas?

Comment 4 Nerijus Baliūnas 2020-02-03 07:59:43 UTC
Yes, cron script should be left on CentOS 6, but for everything using systemd service/timer script should be used, not enabled by default, as most of the other packages do.

Comment 5 Nerijus Baliūnas 2020-02-03 08:04:03 UTC
BTW, after updating to clamav-0.101.5-7.el7 from epel-testing I did not get clamav db updates until I did systemctl enable --now clamav-freshclam.
Probably such things should be written in rpm changelogs.

Comment 6 Jan ONDREJ 2020-02-03 08:19:48 UTC
(In reply to Nerijus Baliūnas from comment #4)
> Yes, cron script should be left on CentOS 6, but for everything using
> systemd service/timer script should be used, not enabled by default, as most
> of the other packages do.

So you silently disabled updating of clamav unofficial sigs for most users. :-(
Most users didn't read rpm changelogs.

Comment 7 Nerijus Baliūnas 2020-02-03 08:28:50 UTC
There is a possibility to print some info after package update in postinstall, maybe that could be used?
If not, then please don't remove timer script and mark cron script as config at least.

Comment 8 Nerijus Baliūnas 2020-02-06 09:26:48 UTC
Latest clamav does just that:

  Updating   : clamav-update-0.101.5-9.el7.x86_64                                                                                                                                                                                                       8/146 
Warning: clamav-update package changed
Now we provide clamav-freshclam.service systemd unit instead old scripts and the cron.d entry.
Unfortunately this may break existing unattended installations.
Please run 'systemctl enable clamav-freshclam --now' to enable freshclam updates again.

Comment 9 Jan ONDREJ 2020-02-08 14:51:16 UTC
Looks like same problem in clamav main package:

https://bugzilla.redhat.com/show_bug.cgi?id=1800226

They are reverting back to old system, at least for EL7.

I think I can't do more that change this for Fedora 32+. Possibly I can change cron script to %config for  current OS releases.

Leaving a message is not a solution. Users are using automated updating or web GUIs, which don't display this message.

Btw, I don't think anything is broken. Current version installs both, cron and service, but service is not activated by default, so by default everything works.

Comment 10 Nerijus Baliūnas 2020-02-08 18:43:06 UTC
Except that cron script is not marked as config, and is overwritten on every package update.

Comment 11 Fedora Update System 2020-02-14 09:34:42 UTC
FEDORA-2020-b79f547bf8 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2020-b79f547bf8

Comment 12 Fedora Update System 2020-02-14 10:34:48 UTC
FEDORA-EPEL-2020-98c850423a has been submitted as an update to Fedora EPEL 8. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-98c850423a

Comment 13 Fedora Update System 2020-02-14 10:43:40 UTC
FEDORA-EPEL-2020-563a2fe73a has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-563a2fe73a

Comment 14 Fedora Update System 2020-02-15 01:19:52 UTC
clamav-unofficial-sigs-7.0.1-3.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-2020-b79f547bf8

Comment 15 Fedora Update System 2020-02-15 01:47:24 UTC
clamav-unofficial-sigs-7.0.1-3.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-2020-46712bb6fc

Comment 16 Fedora Update System 2020-02-15 03:05:52 UTC
clamav-unofficial-sigs-7.0.1-3.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-2020-563a2fe73a

Comment 17 Fedora Update System 2020-02-15 03:06:09 UTC
clamav-unofficial-sigs-7.0.1-3.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-2020-98c850423a

Comment 18 Fedora Update System 2020-02-19 10:27:58 UTC
FEDORA-EPEL-2020-9f6b59b4e6 has been submitted as an update to Fedora EPEL 8. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-9f6b59b4e6

Comment 19 Fedora Update System 2020-02-19 11:04:45 UTC
FEDORA-2020-ddd9880428 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-ddd9880428

Comment 20 Fedora Update System 2020-02-20 05:11:51 UTC
clamav-unofficial-sigs-7.0.1-4.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-2020-9f6b59b4e6

Comment 21 Fedora Update System 2020-02-20 05:29:29 UTC
clamav-unofficial-sigs-7.0.1-4.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-2020-eadb6a0d1a

Comment 22 Fedora Update System 2020-02-20 05:45:09 UTC
clamav-unofficial-sigs-7.0.1-4.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-2020-ddd9880428

Comment 23 Fedora Update System 2020-02-20 06:42:19 UTC
clamav-unofficial-sigs-7.0.1-4.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-2020-8481dcc87e

Comment 24 Fedora Update System 2020-02-23 17:59:46 UTC
FEDORA-2020-f842c869a3 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-f842c869a3

Comment 25 Fedora Update System 2020-02-23 18:44:14 UTC
FEDORA-2020-3d887d1791 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2020-3d887d1791

Comment 26 Fedora Update System 2020-02-23 20:50:29 UTC
FEDORA-EPEL-2020-a7ebf4f262 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-a7ebf4f262

Comment 27 Fedora Update System 2020-02-24 01:48:37 UTC
clamav-unofficial-sigs-7.0.1-5.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-2020-a7ebf4f262

Comment 28 Fedora Update System 2020-02-24 02:07:41 UTC
clamav-unofficial-sigs-7.0.1-5.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-2020-3d887d1791

Comment 29 Fedora Update System 2020-02-24 02:08:44 UTC
clamav-unofficial-sigs-7.0.1-5.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-2020-f842c869a3

Comment 30 Fedora Update System 2020-02-24 02:13:19 UTC
clamav-unofficial-sigs-7.0.1-5.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-2020-af76aa33f1

Comment 31 Fedora Update System 2020-03-02 18:51:19 UTC
clamav-unofficial-sigs-7.0.1-5.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.

Comment 32 Fedora Update System 2020-03-02 19:05:07 UTC
clamav-unofficial-sigs-7.0.1-5.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.

Comment 33 Fedora Update System 2020-03-09 22:27:11 UTC
clamav-unofficial-sigs-7.0.1-5.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.

Comment 34 Fedora Update System 2020-03-09 22:42:48 UTC
clamav-unofficial-sigs-7.0.1-5.el8 has been pushed to the Fedora EPEL 8 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.