Bug 2142729 - When running sa-update from the systemd timer unit, use systemd's time randomization
Summary: When running sa-update from the systemd timer unit, use systemd's time random...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: spamassassin
Version: 38
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kevin Fenzi
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-11-15 05:25 UTC by Kenneth Porter
Modified: 2024-05-21 14:21 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2024-05-21 14:21:27 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Kenneth Porter 2022-11-15 05:25:39 UTC
The sa-update.cron script was originally written for use with cron which has no randomization feature, so it includes its own 2-hour random sleep. It would be nice to be able to use the script directly from the command line without a sleep so that the process can be tested immediately, and so that package updates immediately pull the latest rule set instead of waiting for the daily update cycle.

When using a systemd timer unit, the randomization could be done directly in sa-update.timer, and an immediate update could be done using "systemctl start sa-update", bypassing the systemd timer randomization.

So two things would be needed:

1) Detect in the script if it's being run from cron and do the random sleep.
2) Add the 2-hour randomization to the timer unit file.

See also bug 1064537 for when the systemd units were added to this package.

Inspired by Letsencrypt's certbot-renew systemd units.

Comment 1 Ben Cotton 2023-02-07 14:59:06 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 38 development cycle.
Changing version to 38.

Comment 2 Aoife Moloney 2024-05-07 15:52:24 UTC
This message is a reminder that Fedora Linux 38 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 38 on 2024-05-21.
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
'version' of '38'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 38 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 Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 3 Aoife Moloney 2024-05-21 14:21:27 UTC
Fedora Linux 38 entered end-of-life (EOL) status on 2024-05-21.

Fedora Linux 38 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 Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

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


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