Description of Problem: After recent changes to 'man' package /etc/cron.daily/tmpwatch trips on missing directories in /var/cache/man (or /var/catmat, whatever the case may be) and one ends up with an error from lstat. This goes across architectures and various distributions.
Come to think of it - it is most likely better to produce in that cron script a list of directories to process with a help of 'find -type d ...' than just comment out these 'man' lines.
Created attachment 22989 [details] Errors from cron when tmpwatch runs each day
Although this bug is against 7.x it also applies to 6.x machines.
Very annoying on large sites where this triggers a useless email form every box per day! Please fix the script for good by checking that a dir exists befor calling tmpwatch on it. Also applies to current rawhide....
Just looked at the script /etc/cron.dayly/tmpwatch and noticed that none of the directories /var/cache/man/{X11R6/cat?,cat?,local/cat?} and /var/catman/{X11R6/cat?,cat?,local/cat?} does exist. Souln't the entire script be removed. Respectively, shouldn't the cript be moved to the coresponding packages which own these directories!?
> "none of the directories ... does exist" This is exactly that change in recent 'man' package the original report is talking about. Removing the whole script would be a grave mistake for many reasons - it does some other things too - despite the latest Red Hat moves _you_ may want to re-create these directories (hopefuly after making yourself familiar with all side-effects) - it may happen that you are using more recent 'tmpwatch' package then 'man' package - somebody packaging 'man' may change their mind in a future again Because all of that a list of directories to traverse should be created "on the spot" like my first comment proposed. Something like that: hours=240 if [ -d /var/cache/man ] ; then cd /var/cache/man find . -type d -depth -exec /usr/sbin/tmpwatch -f $hours "{}" \; fi This should be good enough even for directories with "funny" characters in names. So, here, you have a temporary fix (not tested) until you will get an official one.
*** This bug has been marked as a duplicate of 44117 ***
tmpwatch-2.7.4-1 on rawhide has a fixed script something interesting tought would be to add some inteligence to the tmpwatch program so it just don't die if some of the parameters didn't exist the attached skipdir.diff should do the trick (applied to 2.7.4 sources) sadly i'd been unable to compile it, but i guess it is too basic for not working another interesting addon could be to add something like a /etc/tmpwatch.d/ directory were different packages that want to instruct tmpwatch to clean their temp files could drop a configuracion file, so a change on anyother package (like man this time) won't break a running tmpwatch configuration
Created attachment 23667 [details] skips directories that didn't exist on the parameter list