Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 456120

Summary: sys-process/vixie-cron with app-admin/logrotate - cron cannot handle cron.daily file with a dot in its filename
Product: Gentoo Linux Reporter: LABBE Corentin <clabbe.montjoie>
Component: Current packagesAssignee: No maintainer - Look at if you want to take care of it <maintainer-needed>
Severity: normal CC: cron-bugs+disabled, jer, nimiux, treecleaner
Priority: Normal Keywords: PMASKED
Version: unspecified   
Hardware: All   
OS: Linux   
See Also:
Package list:
Runtime testing required: ---
Deadline: 2019-10-11   

Description LABBE Corentin 2013-02-08 07:40:37 UTC
The ebuild create /etc/cron.daily/logrotate.cron but the dot is a forbidden character for a cron filename.
So crond ignore this filename and no logrotate is done.

Reproducible: Always

Steps to Reproduce:
1. emerge logrotate
Actual Results:  
The logrotate cron file is installed as /etc/cron.daily/logrotate.cron

Expected Results:  
The logrotate cron file is installed as /etc/cron.daily/logrotate
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2013-02-09 15:49:05 UTC
Which crond do you use?
Comment 2 LABBE Corentin 2013-02-12 14:27:15 UTC
But anyway, this is not relevant, some other crond could ignore this file.
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2013-02-12 14:48:15 UTC
It does matter which cron you use, because sys-process/dcron doesn't have this problem, for one thing.
Comment 4 Chema Alonso Josa (RETIRED) gentoo-dev 2013-02-12 16:48:17 UTC
I have two boxes with =sys-process/vixie-cron-4.1-r12 installed and it works fine, all files under /etc/cron.* are executed, even those with dots in their filenames (including logrotate.conf)

Tested with fcron and works ok too.

By looking at script /usr/sbin/run-crons (from the =sys-process/cronbase-0.3.3):

you can check that all scripts under /etc/cron.{hourly,daily,weekly,monthly} are executed no matter their names contain a dot or not:

for SCRIPT in $CRONDIR/* ; do

Can you take a look at your /etc/crontab to see if /usr/sbin/run-crons is executed properly?. That is, contains a line like:

*/10  *  * * *  root    test -x /usr/sbin/run-crons && /usr/sbin/run-crons

Thanks for reporting.
Comment 5 LABBE Corentin 2013-02-15 08:38:29 UTC
My initial problem is resolved, all files under /etc/crond.daily hasn't exec perms.
So my logrotate reworks now.
But I think adding .cron is still a bad idea.
Comment 6 Jeroen Roovers (RETIRED) gentoo-dev 2016-02-24 06:11:26 UTC
How was this bug resolved. Why would it suddenly be invalid?
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-10-11 15:07:48 UTC
Package removed.