Description of problem: If you install logrotate you find that it doesn't run by default anymore Version-Release number of selected component (if applicable): logrotate-3.15.1-1.fc30.x86_64 How reproducible: 100% Steps to Reproduce: 1. dnf install logrotate 2. come back 24H later 3. note no logs rotated; /var/lib/logrotate is empty Actual results: nothing happens Expected results: log files rotated Additional info: Prior to fc30, when you installed logrotate it created an entry in /etc/cron.daily which caused it to run from then on. The fc30 package doesn't create this cron entry; it installs a systemd timer instead but doesn't activate it by default. /usr/lib/systemd/system/logrotate.service /usr/lib/systemd/system/logrotate.timer This requires you to do this after installing logrotate: systemctl enable logrotate.timer systemctl start logrotate.timer Whilst this is an easy workaround, its not backwards compatible with prior package behavior, where installation also causes activation, although arguably other packages tend to not auto enable daemons at systemd upon install. I've had to update all my kickstart scripts for this, and also run around to all fc30 systems I installed months ago and retrospectively enable logrotate. (only noticed lack of rotation today when a system started to run out of disk space) Systems that were distro-sync upgraded from fc29 to fc30 did however end up with logrotate running ok; presumably the upgrade script did the enabling as part of the upgrade.
(In reply to Ian Donaldson from comment #0) > Prior to fc30, when you installed logrotate it created an entry in > /etc/cron.daily which caused it to run from then on. Only if you had any cron daemon configured. > The fc30 package doesn't create this cron entry; it installs a systemd > timer instead but doesn't activate it by default. > > /usr/lib/systemd/system/logrotate.service > /usr/lib/systemd/system/logrotate.timer Yes, this is expected. > This requires you to do this after installing logrotate: > > systemctl enable logrotate.timer > systemctl start logrotate.timer There is no easy solution to this. If we enabled logrotate.timer in vendor preset, logrotate would be run unexpectedly on installations where it did not run originally (where cron was not configured). > Systems that were distro-sync upgraded from fc29 to fc30 did however > end up with logrotate running ok; presumably the upgrade script > did the enabling as part of the upgrade. Only if you had any cron daemon configured: https://src.fedoraproject.org/rpms/logrotate/blob/07f59cae/f/logrotate.spec#_93
Sure; forgive me I have never come across a *ix system without cron installed; its pretty fundamental; but I guess there are systems that are setup that way.
The related Fedora documentation does not seem to assume cron is always installed: https://docs.fedoraproject.org/en-US/fedora/f30/system-administrators-guide/monitoring-and-automation/Automating_System_Tasks/
It is unclear how this could be improved without introducing any unwanted side-effects. Closing...