1 |
dang 08/12/24 20:49:10 |
2 |
|
3 |
Modified: logrotate.conf |
4 |
Added: logrotate-3.7.7-datehack.patch |
5 |
logrotate-3.7.7-weekly.patch |
6 |
logrotate-3.7.7-ignore-hidden.patch |
7 |
Log: |
8 |
Bump to 3.7.7; now considering fedora as upstream |
9 |
(Portage version: 2.2_rc17/cvs/Linux 2.6.27-gentoo-r6 x86_64) |
10 |
|
11 |
Revision Changes Path |
12 |
1.3 app-admin/logrotate/files/logrotate.conf |
13 |
|
14 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-admin/logrotate/files/logrotate.conf?rev=1.3&view=markup |
15 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-admin/logrotate/files/logrotate.conf?rev=1.3&content-type=text/plain |
16 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-admin/logrotate/files/logrotate.conf?r1=1.2&r2=1.3 |
17 |
|
18 |
Index: logrotate.conf |
19 |
=================================================================== |
20 |
RCS file: /var/cvsroot/gentoo-x86/app-admin/logrotate/files/logrotate.conf,v |
21 |
retrieving revision 1.2 |
22 |
retrieving revision 1.3 |
23 |
diff -u -r1.2 -r1.3 |
24 |
--- logrotate.conf 18 Jul 2004 01:58:24 -0000 1.2 |
25 |
+++ logrotate.conf 24 Dec 2008 20:49:10 -0000 1.3 |
26 |
@@ -1,4 +1,4 @@ |
27 |
-# $Header: /var/cvsroot/gentoo-x86/app-admin/logrotate/files/logrotate.conf,v 1.2 2004/07/18 01:58:24 dragonheart Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/app-admin/logrotate/files/logrotate.conf,v 1.3 2008/12/24 20:49:10 dang Exp $ |
29 |
# |
30 |
# Logrotate default configuration file for Gentoo Linux |
31 |
# |
32 |
@@ -14,6 +14,9 @@ |
33 |
# create new (empty) log files after rotating old ones |
34 |
create |
35 |
|
36 |
+# use date as a suffix of the rotated file |
37 |
+dateext |
38 |
+ |
39 |
# uncomment this if you want your log files compressed |
40 |
compress |
41 |
|
42 |
@@ -31,4 +34,11 @@ |
43 |
rotate 1 |
44 |
} |
45 |
|
46 |
+/var/log/btmp { |
47 |
+ missingok |
48 |
+ monthly |
49 |
+ create 0600 root utmp |
50 |
+ rotate 1 |
51 |
+} |
52 |
+ |
53 |
# system-specific logs may be also be configured here. |
54 |
|
55 |
|
56 |
|
57 |
1.1 app-admin/logrotate/files/logrotate-3.7.7-datehack.patch |
58 |
|
59 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-admin/logrotate/files/logrotate-3.7.7-datehack.patch?rev=1.1&view=markup |
60 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-admin/logrotate/files/logrotate-3.7.7-datehack.patch?rev=1.1&content-type=text/plain |
61 |
|
62 |
Index: logrotate-3.7.7-datehack.patch |
63 |
=================================================================== |
64 |
diff --exclude-from=/home/dang/.scripts/diffrc -up -ruN logrotate-3.7.7.orig/logrotate.c logrotate-3.7.7/logrotate.c |
65 |
--- logrotate-3.7.7.orig/logrotate.c 2008-05-14 06:31:35.000000000 -0400 |
66 |
+++ logrotate-3.7.7/logrotate.c 2008-12-23 11:09:09.000000000 -0500 |
67 |
@@ -1443,7 +1443,7 @@ static int readState(char *stateFilename |
68 |
} |
69 |
|
70 |
/* Hack to hide earlier bug */ |
71 |
- if ((year != 1900) && (year < 1996 || year > 2100)) { |
72 |
+ if ((year != 1900) && (year < 1970 || year > 2100)) { |
73 |
message(MESS_ERROR, |
74 |
"bad year %d for file %s in state file %s\n", year, |
75 |
argv[0], stateFilename); |
76 |
|
77 |
|
78 |
|
79 |
1.1 app-admin/logrotate/files/logrotate-3.7.7-weekly.patch |
80 |
|
81 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-admin/logrotate/files/logrotate-3.7.7-weekly.patch?rev=1.1&view=markup |
82 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-admin/logrotate/files/logrotate-3.7.7-weekly.patch?rev=1.1&content-type=text/plain |
83 |
|
84 |
Index: logrotate-3.7.7-weekly.patch |
85 |
=================================================================== |
86 |
diff --exclude-from=/home/dang/.scripts/diffrc -up -ruN logrotate-3.7.7.orig/logrotate.c logrotate-3.7.7/logrotate.c |
87 |
--- logrotate-3.7.7.orig/logrotate.c 2008-05-14 06:31:35.000000000 -0400 |
88 |
+++ logrotate-3.7.7/logrotate.c 2008-12-23 11:14:55.000000000 -0500 |
89 |
@@ -512,16 +512,17 @@ int findNeedRotating(struct logInfo *log |
90 |
switch (log->criterium) { |
91 |
case ROT_WEEKLY: |
92 |
/* rotate if: |
93 |
- 1) the current weekday is before the weekday of the |
94 |
- last rotation |
95 |
+ 1) the day of the week is the same as the day of the week of |
96 |
+ the previous rotation but not the same day of the year |
97 |
+ this will rotate it on the same day every week, but not |
98 |
+ twice a day. |
99 |
2) more then a week has passed since the last |
100 |
rotation */ |
101 |
- state->doRotate = ((now.tm_wday < state->lastRotated.tm_wday) |
102 |
- || |
103 |
- ((mktime(&now) - |
104 |
- mktime(&state->lastRotated)) > |
105 |
+ state->doRotate = ((now.tm_wday == state->lastRotated.tm_wday && |
106 |
+ now.tm_yday != state->lastRotated.tm_yday) || |
107 |
+ ((mktime(&now) - mktime(&state->lastRotated)) > |
108 |
(7 * 24 * 3600))); |
109 |
- break; |
110 |
+ break; |
111 |
case ROT_MONTHLY: |
112 |
/* rotate if the logs haven't been rotated this month or |
113 |
this year */ |
114 |
|
115 |
|
116 |
|
117 |
1.1 app-admin/logrotate/files/logrotate-3.7.7-ignore-hidden.patch |
118 |
|
119 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-admin/logrotate/files/logrotate-3.7.7-ignore-hidden.patch?rev=1.1&view=markup |
120 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-admin/logrotate/files/logrotate-3.7.7-ignore-hidden.patch?rev=1.1&content-type=text/plain |
121 |
|
122 |
Index: logrotate-3.7.7-ignore-hidden.patch |
123 |
=================================================================== |
124 |
diff --exclude-from=/home/dang/.scripts/diffrc -up -ruN logrotate-3.7.7.orig/config.c logrotate-3.7.7/config.c |
125 |
--- logrotate-3.7.7.orig/config.c 2008-05-09 03:28:59.000000000 -0400 |
126 |
+++ logrotate-3.7.7/config.c 2008-12-23 11:11:18.000000000 -0500 |
127 |
@@ -164,6 +164,11 @@ static int checkFile(const char *fname) |
128 |
if (fname[0] == '.' && (!fname[1] || (fname[1] == '.' && !fname[2]))) |
129 |
return 0; |
130 |
|
131 |
+ /* Don't include 'hidden' files either; this breaks Gentoo |
132 |
+ portage config file management http://bugs.gentoo.org/87683 */ |
133 |
+ if (fname[0] == '.') |
134 |
+ return 0; |
135 |
+ |
136 |
/* Check if fname is ending in a taboo-extension; if so, return false */ |
137 |
for (i = 0; i < tabooCount; i++) { |
138 |
snprintf(pattern, sizeof(pattern), "*%s", tabooExts[i]); |