diff -ru2N logrotate-3.6.5/config.c logrotate-3.6.5-patched/config.c --- logrotate-3.6.5/config.c Wed Mar 13 10:59:45 2002 +++ logrotate-3.6.5-patched/config.c Mon Mar 31 03:15:53 2003 @@ -1,3 +1,8 @@ -#include +#ifndef __darwin + #include +#else + #include +#endif + #include #include diff -ru2N logrotate-3.6.5/config.h logrotate-3.6.5-patched/config.h --- logrotate-3.6.5/config.h Sat Aug 3 05:47:41 2002 +++ logrotate-3.6.5-patched/config.h Mon Mar 31 03:15:53 2003 @@ -10,4 +10,18 @@ #endif +#ifdef __darwin + #ifndef DEFAULT_MAIL_COMMAND + #define DEFAULT_MAIL_COMMAND "mail -s" + #endif + #ifndef COMPRESS_COMMAND + #define COMPRESS_COMMAND "gzip" + #endif + #ifndef UNCOMPRESS_COMMAND + #define UNCOMPRESS_COMMAND "gunzip" + #endif + #ifndef STATEFILE + #define STATEFILE "@PREFIX@/var/run/logrotate.status" + #endif +#endif /* diff -ru2N logrotate-3.6.5/examples/Fink logrotate-3.6.5-patched/examples/Fink --- logrotate-3.6.5/examples/Fink Wed Dec 31 19:00:00 1969 +++ logrotate-3.6.5-patched/examples/Fink Mon Mar 31 03:22:49 2003 @@ -0,0 +1,13 @@ +## +# @PREFIX@/var/logs for software installed by fink +## + +# rotate daily, keep 7 days worth, don't complain, don't recreate +# empty logs + +@PREFIX@/var/log/*.log { + daily + missingok + nocreate + rotate 7 +} diff -ru2N logrotate-3.6.5/examples/Library logrotate-3.6.5-patched/examples/Library --- logrotate-3.6.5/examples/Library Wed Dec 31 19:00:00 1969 +++ logrotate-3.6.5-patched/examples/Library Mon Mar 31 03:22:49 2003 @@ -0,0 +1,13 @@ +## +# /Library/Logs/CrashReporter Logs +# + +# rotate daily, keep 7 days worth, don't complain, definitely don't +# recreate empty logs + +/Library/Logs/CrashReporter/*.log { + daily + missingok + nocreate + rotate 7 +} diff -ru2N logrotate-3.6.5/examples/Users logrotate-3.6.5-patched/examples/Users --- logrotate-3.6.5/examples/Users Wed Dec 31 19:00:00 1969 +++ logrotate-3.6.5-patched/examples/Users Mon Mar 31 03:22:49 2003 @@ -0,0 +1,30 @@ +## +# User's DiskCopy Logs ("DiskCopy.txt") +# + +# rotate when log reaches 100k, keep 7 rotations worth +# don't compress the log files + +/Users/*/Library/Logs/DiskCopy.txt { + size=100k + rotate 7 + missingok + nocreate + nocompress +} + + +## +# User's CrashReporter logs +# + +# rotate daily, don't complain, definitely don't recreate empty logs, +# keep 7 rotations worth, compress the log files + +/Users/*/Library/Logs/CrashReporter/*.log { + daily + missingok + nocreate + rotate 7 + compress +} diff -ru2N logrotate-3.6.5/examples/httpd logrotate-3.6.5-patched/examples/httpd --- logrotate-3.6.5/examples/httpd Wed Dec 31 19:00:00 1969 +++ logrotate-3.6.5-patched/examples/httpd Mon Mar 31 03:22:49 2003 @@ -0,0 +1,18 @@ +## +# Apache WebServer Logs +# + +# rotate when log reaches 100k, keep 30 rotations worth +# sharedscripts: the postrotate script will only be run once, +# not once for each log which is rotated +# compress the log files with gzip -9 + +"/var/log/httpd/access_log" "/var/log/httpd/error_log" { + size=100k + rotate 30 + sharedscripts + postrotate + /usr/bin/killall -HUP httpd + endscript + compress +} diff -ru2N logrotate-3.6.5/examples/logrotate-default logrotate-3.6.5-patched/examples/logrotate-default --- logrotate-3.6.5/examples/logrotate-default Tue Dec 4 06:33:24 2001 +++ logrotate-3.6.5-patched/examples/logrotate-default Mon Mar 31 03:18:22 2003 @@ -10,15 +10,17 @@ # uncomment this if you want your log files compressed -#compress +compress -# RPM packages drop log rotation information into this directory -include /etc/logrotate.d +# packages drop log rotation information into this directory +include @PREFIX@/etc/logrotate.d +# Mac OS X handles wtmp with periodic scripts. # no packages own wtmp -- we'll rotate them here -/var/log/wtmp { - monthly - create 0664 root utmp - rotate 1 -} +#/var/log/wtmp { +# monthly +# create 0664 root utmp +# rotate 1 +#} # system-specific logs may be also be configured here. +# Mac OS X handles other system logs with periodic scripts. diff -ru2N logrotate-3.6.5/examples/logrotate.cron logrotate-3.6.5-patched/examples/logrotate.cron --- logrotate-3.6.5/examples/logrotate.cron Thu Feb 27 12:27:26 1997 +++ logrotate-3.6.5-patched/examples/logrotate.cron Mon Mar 31 03:16:41 2003 @@ -1,3 +1,3 @@ #!/bin/sh -/usr/sbin/logrotate /etc/logrotate.conf +@PREFIX@/sbin/logrotate @PREFIX@/etc/logrotate.conf diff -ru2N logrotate-3.6.5/logrotate.8 logrotate-3.6.5-patched/logrotate.8 --- logrotate-3.6.5/logrotate.8 Tue Apr 23 19:29:18 2002 +++ logrotate-3.6.5-patched/logrotate.8 Mon Mar 31 03:39:45 2003 @@ -55,5 +55,5 @@ Tells \fBlogrotate\fR to use an alternate state file. This is useful if logrotate is being run as a different user for various sets of -log files. The default state file is \fI/var/lib/logrotate/status\fR. +log files. The default state file is \fI@PREFIX@/var/run/logrotate.status\fR. .TP @@ -78,9 +78,9 @@ weekly postrotate - /sbin/killall -HUP syslogd + /usr/bin/killall -HUP syslogd endscript } -"/var/log/httpd/access.log" /var/log/httpd/error.log { +"/var/log/httpd/access_log" /var/log/httpd/error_log { rotate 5 mail www@my.org @@ -88,5 +88,5 @@ sharedscripts postrotate - /sbin/killall -HUP httpd + /usr/bin/killall -HUP httpd endscript } @@ -117,5 +117,5 @@ The next section defines the parameters for both -\fI/var/log/httpd/access.log\fR and \fI/var/log/httpd/error.log\fR. +\fI/var/log/httpd/access_log\fR and \fI/var/log/httpd/error_log\fR. They are rotated whenever is grows over 100k is size, and the old logs files are mailed (uncompressed) to www@my.org after going through 5 @@ -376,8 +376,8 @@ .PD 0 .TP 27 -\fI/var/lib/logrotate/status\fR +\fI@PREFIX@/var/run/logrotate.status\fR Default state file. .TP 27 -\fI/etc/logrotate.conf\fR +\fI@PREFIX@/etc/logrotate.conf\fR Configuration options. diff -ru2N logrotate-3.6.5/logrotate.c logrotate-3.6.5-patched/logrotate.c --- logrotate-3.6.5/logrotate.c Tue Apr 23 19:29:19 2002 +++ logrotate-3.6.5-patched/logrotate.c Mon Mar 31 03:15:53 2003 @@ -1,3 +1,8 @@ -#include +#ifndef __darwin + #include +#else + #include +#endif + #include #include