Bug 47859 - errors from cron script caused by changes in man
Summary: errors from cron script caused by changes in man
Keywords:
Status: CLOSED DUPLICATE of bug 44117
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: tmpwatch
Version: 7.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Preston Brown
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-07-08 02:12 UTC by Michal Jaegermann
Modified: 2007-04-18 16:34 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2001-07-09 15:35:19 UTC
Embargoed:


Attachments (Terms of Use)
Errors from cron when tmpwatch runs each day (116 bytes, text/plain)
2001-07-08 14:54 UTC, Tom Diehl
no flags Details
skips directories that didn't exist on the parameter list (637 bytes, patch)
2001-07-16 05:15 UTC, Arenas Belon, Carlo Marcelo
no flags Details | Diff

Description Michal Jaegermann 2001-07-08 02:12:41 UTC
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.

Comment 1 Michal Jaegermann 2001-07-08 02:41:41 UTC
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.

Comment 2 Tom Diehl 2001-07-08 14:54:15 UTC
Created attachment 22989 [details]
Errors from cron when tmpwatch runs each day

Comment 3 Tom Diehl 2001-07-08 14:55:55 UTC
Although this bug is against 7.x it also applies to 6.x machines.

Comment 4 Gerald Teschl 2001-07-09 08:57:04 UTC
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....

Comment 5 Gerald Teschl 2001-07-09 09:16:16 UTC
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!?

Comment 6 Michal Jaegermann 2001-07-09 15:35:16 UTC
> "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.


Comment 7 Arenas Belon, Carlo Marcelo 2001-07-16 03:33:20 UTC

*** This bug has been marked as a duplicate of 44117 ***

Comment 8 Arenas Belon, Carlo Marcelo 2001-07-16 05:12:48 UTC
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

Comment 9 Arenas Belon, Carlo Marcelo 2001-07-16 05:15:02 UTC
Created attachment 23667 [details]
skips directories that didn't exist on the parameter list


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