diff options
Diffstat (limited to 'app-admin/logrotate/files')
4 files changed, 66 insertions, 1 deletions
diff --git a/app-admin/logrotate/files/logrotate-3.7.7-datehack.patch b/app-admin/logrotate/files/logrotate-3.7.7-datehack.patch new file mode 100644 index 000000000000..c023cba0b7a5 --- /dev/null +++ b/app-admin/logrotate/files/logrotate-3.7.7-datehack.patch @@ -0,0 +1,12 @@ +diff --exclude-from=/home/dang/.scripts/diffrc -up -ruN logrotate-3.7.7.orig/logrotate.c logrotate-3.7.7/logrotate.c +--- logrotate-3.7.7.orig/logrotate.c 2008-05-14 06:31:35.000000000 -0400 ++++ logrotate-3.7.7/logrotate.c 2008-12-23 11:09:09.000000000 -0500 +@@ -1443,7 +1443,7 @@ static int readState(char *stateFilename + } + + /* Hack to hide earlier bug */ +- if ((year != 1900) && (year < 1996 || year > 2100)) { ++ if ((year != 1900) && (year < 1970 || year > 2100)) { + message(MESS_ERROR, + "bad year %d for file %s in state file %s\n", year, + argv[0], stateFilename); diff --git a/app-admin/logrotate/files/logrotate-3.7.7-ignore-hidden.patch b/app-admin/logrotate/files/logrotate-3.7.7-ignore-hidden.patch new file mode 100644 index 000000000000..28581f142587 --- /dev/null +++ b/app-admin/logrotate/files/logrotate-3.7.7-ignore-hidden.patch @@ -0,0 +1,15 @@ +diff --exclude-from=/home/dang/.scripts/diffrc -up -ruN logrotate-3.7.7.orig/config.c logrotate-3.7.7/config.c +--- logrotate-3.7.7.orig/config.c 2008-05-09 03:28:59.000000000 -0400 ++++ logrotate-3.7.7/config.c 2008-12-23 11:11:18.000000000 -0500 +@@ -164,6 +164,11 @@ static int checkFile(const char *fname) + if (fname[0] == '.' && (!fname[1] || (fname[1] == '.' && !fname[2]))) + return 0; + ++ /* Don't include 'hidden' files either; this breaks Gentoo ++ portage config file management http://bugs.gentoo.org/87683 */ ++ if (fname[0] == '.') ++ return 0; ++ + /* Check if fname is ending in a taboo-extension; if so, return false */ + for (i = 0; i < tabooCount; i++) { + snprintf(pattern, sizeof(pattern), "*%s", tabooExts[i]); diff --git a/app-admin/logrotate/files/logrotate-3.7.7-weekly.patch b/app-admin/logrotate/files/logrotate-3.7.7-weekly.patch new file mode 100644 index 000000000000..cd817558aa56 --- /dev/null +++ b/app-admin/logrotate/files/logrotate-3.7.7-weekly.patch @@ -0,0 +1,28 @@ +diff --exclude-from=/home/dang/.scripts/diffrc -up -ruN logrotate-3.7.7.orig/logrotate.c logrotate-3.7.7/logrotate.c +--- logrotate-3.7.7.orig/logrotate.c 2008-05-14 06:31:35.000000000 -0400 ++++ logrotate-3.7.7/logrotate.c 2008-12-23 11:14:55.000000000 -0500 +@@ -512,16 +512,17 @@ int findNeedRotating(struct logInfo *log + switch (log->criterium) { + case ROT_WEEKLY: + /* rotate if: +- 1) the current weekday is before the weekday of the +- last rotation ++ 1) the day of the week is the same as the day of the week of ++ the previous rotation but not the same day of the year ++ this will rotate it on the same day every week, but not ++ twice a day. + 2) more then a week has passed since the last + rotation */ +- state->doRotate = ((now.tm_wday < state->lastRotated.tm_wday) +- || +- ((mktime(&now) - +- mktime(&state->lastRotated)) > ++ state->doRotate = ((now.tm_wday == state->lastRotated.tm_wday && ++ now.tm_yday != state->lastRotated.tm_yday) || ++ ((mktime(&now) - mktime(&state->lastRotated)) > + (7 * 24 * 3600))); +- break; ++ break; + case ROT_MONTHLY: + /* rotate if the logs haven't been rotated this month or + this year */ diff --git a/app-admin/logrotate/files/logrotate.conf b/app-admin/logrotate/files/logrotate.conf index f8fb039fbb46..25dd13495e13 100644 --- a/app-admin/logrotate/files/logrotate.conf +++ b/app-admin/logrotate/files/logrotate.conf @@ -1,4 +1,4 @@ -# $Header: /var/cvsroot/gentoo-x86/app-admin/logrotate/files/logrotate.conf,v 1.2 2004/07/18 01:58:24 dragonheart Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/logrotate/files/logrotate.conf,v 1.3 2008/12/24 20:49:10 dang Exp $ # # Logrotate default configuration file for Gentoo Linux # @@ -14,6 +14,9 @@ rotate 4 # create new (empty) log files after rotating old ones create +# use date as a suffix of the rotated file +dateext + # uncomment this if you want your log files compressed compress @@ -31,4 +34,11 @@ noolddir rotate 1 } +/var/log/btmp { + missingok + monthly + create 0600 root utmp + rotate 1 +} + # system-specific logs may be also be configured here. |