summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-extended/logrotate/logrotate-3.8.1/act-as-mv-when-rotate.patch (renamed from meta/recipes-extended/logrotate/logrotate-3.7.9/allow-across-different-filesystems.patch)73
-rw-r--r--meta/recipes-extended/logrotate/logrotate-3.8.1/disable-check-different-filesystems.patch34
-rw-r--r--meta/recipes-extended/logrotate/logrotate-3.8.1/update-the-manual.patch42
3 files changed, 89 insertions, 60 deletions
diff --git a/meta/recipes-extended/logrotate/logrotate-3.7.9/allow-across-different-filesystems.patch b/meta/recipes-extended/logrotate/logrotate-3.8.1/act-as-mv-when-rotate.patch
index 41df23f997..c9fb1d2525 100644
--- a/meta/recipes-extended/logrotate/logrotate-3.7.9/allow-across-different-filesystems.patch
+++ b/meta/recipes-extended/logrotate/logrotate-3.8.1/act-as-mv-when-rotate.patch
@@ -1,67 +1,20 @@
1Allow rotate log across different filesystems 1Act as the "mv" command when rotate log
2 2
3* Remove the check for different filesystems 3Act as the "mv" command when rotate log, first rename, if failed, then
4* Act as the "mv" command when rotate log 4read and write.
5* Update the mannual
6* Fix a bug in the mannual(\f should be \fR)
7 5
8Upstream-Status: Pending 6Upstream-Status: Pending
9 7
10Signed-off-by: Robert Yang <liezhi.yang@windriver.com> 8Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
11--- 9---
12 config.c | 8 --------
13 logrotate.8 | 9 ++++-----
14 logrotate.c | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++------ 10 logrotate.c | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++------
15 3 files changed, 57 insertions(+), 19 deletions(-) 11 1 files changed, 53 insertions(+), 6 deletions(-)
16 12
17diff --git a/config.c b/config.c
18--- a/config.c
19+++ b/config.c
20@@ -1482,14 +1482,6 @@ duperror:
21 dirName, strerror(errno));
22 goto error;
23 }
24-
25- if (sb.st_dev != sb2.st_dev) {
26- message(MESS_ERROR,
27- "%s:%d olddir %s and log file %s "
28- "are on different devices\n", configFile,
29- lineNum, newlog->oldDir, newlog->files[i]);
30- goto error;
31- }
32 }
33 }
34
35diff --git a/logrotate.8 b/logrotate.8
36--- a/logrotate.8
37+++ b/logrotate.8
38@@ -354,10 +354,9 @@ Do not rotate the log if it is empty (this overrides the \fBifempty\fR option).
39 .TP
40 \fBolddir \fIdirectory\fR
41 Logs are moved into \fIdirectory\fR for rotation. The \fIdirectory\fR
42-must be on the same physical device as the log file being rotated,
43-and is assumed to be relative to the directory holding the log file
44-unless an absolute path name is specified. When this option is used all
45-old versions of the log end up in \fIdirectory\fR. This option may be
46+is assumed to be relative to the directory holding the log file unless
47+an absolute path name is specified. When this option is used all old
48+versions of the log end up in \fIdirectory\fR. This option may be
49 overridden by the \fBnoolddir\fR option.
50
51 .TP
52@@ -415,7 +414,7 @@ Log files are rotated when they grow bigger than \fIsize\fR bytes. If
53 \fIsize\fR is followed by \fIk\fR, the size is assumed to be in kilobytes.
54 If the \fIM\fR is used, the size is in megabytes, and if \fIG\fR is used, the
55 size is in gigabytes. So \fBsize 100\fR, \fIsize 100k\fR, \fIsize 100M\fR and
56-\fIsize 100G\f are all valid.
57+\fIsize 100G\fR are all valid.
58
59 .TP
60 \fBsharedscripts\fR
61diff --git a/logrotate.c b/logrotate.c 13diff --git a/logrotate.c b/logrotate.c
14index 537e8d6..b04482f 100644
62--- a/logrotate.c 15--- a/logrotate.c
63+++ b/logrotate.c 16+++ b/logrotate.c
64@@ -625,6 +625,53 @@ int findNeedRotating(struct logInfo *log, int logNum) 17@@ -808,6 +808,53 @@ int findNeedRotating(struct logInfo *log, int logNum)
65 return 0; 18 return 0;
66 } 19 }
67 20
@@ -115,7 +68,7 @@ diff --git a/logrotate.c b/logrotate.c
115 int prerotateSingleLog(struct logInfo *log, int logNum, struct logState *state, 68 int prerotateSingleLog(struct logInfo *log, int logNum, struct logState *state,
116 struct logNames *rotNames) 69 struct logNames *rotNames)
117 { 70 {
118@@ -958,15 +1005,15 @@ int prerotateSingleLog(struct logInfo *log, int logNum, struct logState *state, 71@@ -1148,15 +1195,15 @@ int prerotateSingleLog(struct logInfo *log, int logNum, struct logState *state,
119 rotNames->baseName, i, fileext, compext); 72 rotNames->baseName, i, fileext, compext);
120 73
121 message(MESS_DEBUG, 74 message(MESS_DEBUG,
@@ -134,18 +87,18 @@ diff --git a/logrotate.c b/logrotate.c
134 oldName, newName, strerror(errno)); 87 oldName, newName, strerror(errno));
135 hasErrors = 1; 88 hasErrors = 1;
136 } 89 }
137@@ -1082,11 +1129,11 @@ int rotateSingleLog(struct logInfo *log, int logNum, struct logState *state, 90@@ -1286,11 +1333,11 @@ int rotateSingleLog(struct logInfo *log, int logNum, struct logState *state,
138 log->files[logNum]); 91 }
139 } 92 }
140 #endif 93 #endif /* WITH_ACL */
141- message(MESS_DEBUG, "renaming %s to %s\n", log->files[logNum], 94- message(MESS_DEBUG, "renaming %s to %s\n", log->files[logNum],
142+ message(MESS_DEBUG, "moving %s to %s\n", log->files[logNum], 95+ message(MESS_DEBUG, "moving %s to %s\n", log->files[logNum],
143 rotNames->finalName); 96 rotNames->finalName);
144 if (!debug && !hasErrors && 97 if (!debug && !hasErrors &&
145- rename(log->files[logNum], rotNames->finalName)) { 98- rename(log->files[logNum], rotNames->finalName)) {
146- message(MESS_ERROR, "failed to rename %s to %s: %s\n", 99- message(MESS_ERROR, "failed to rename %s to %s: %s\n",
147+ mvFile(log->files[logNum], rotNames->finalName, log)) { 100+ mvFile(log->files[logNum], rotNames->finalName, log)) {
148+ message(MESS_ERROR, "failed to move %s to %s: %s\n", 101+ message(MESS_ERROR, "failed to move %s to %s: %s\n",
149 log->files[logNum], rotNames->finalName, 102 log->files[logNum], rotNames->finalName,
150 strerror(errno)); 103 strerror(errno));
151 hasErrors = 1; 104 hasErrors = 1;
diff --git a/meta/recipes-extended/logrotate/logrotate-3.8.1/disable-check-different-filesystems.patch b/meta/recipes-extended/logrotate/logrotate-3.8.1/disable-check-different-filesystems.patch
new file mode 100644
index 0000000000..5cb6038404
--- /dev/null
+++ b/meta/recipes-extended/logrotate/logrotate-3.8.1/disable-check-different-filesystems.patch
@@ -0,0 +1,34 @@
1Disable the check for different filesystems
2
3The logrotate supports rotate log across different filesystems now, so
4disable the check for different filesystems.
5
6Upstream-Status: Pending
7
8Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
9---
10 config.c | 8 --------
11 1 files changed, 0 insertions(+), 8 deletions(-)
12
13diff --git a/config.c b/config.c
14index a85d1df..24575b3 100644
15--- a/config.c
16+++ b/config.c
17@@ -1453,14 +1453,6 @@ static int readConfigFile(const char *configFile, struct logInfo *defConfig)
18 dirName, strerror(errno));
19 goto error;
20 }
21-
22- if (sb.st_dev != sb2.st_dev) {
23- message(MESS_ERROR,
24- "%s:%d olddir %s and log file %s "
25- "are on different devices\n", configFile,
26- lineNum, newlog->oldDir, newlog->files[i]);
27- goto error;
28- }
29 }
30 }
31
32--
331.7.4.1
34
diff --git a/meta/recipes-extended/logrotate/logrotate-3.8.1/update-the-manual.patch b/meta/recipes-extended/logrotate/logrotate-3.8.1/update-the-manual.patch
new file mode 100644
index 0000000000..5cab64947b
--- /dev/null
+++ b/meta/recipes-extended/logrotate/logrotate-3.8.1/update-the-manual.patch
@@ -0,0 +1,42 @@
1Update the manual
2
3* Update the mannual
4* Fix a bug in the mannual(\f should be \fR)
5
6Upstream-Status: Pending
7
8Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
9---
10 logrotate.8 | 9 ++++-----
11 1 files changed, 4 insertions(+), 5 deletions(-)
12
13diff --git a/logrotate.8 b/logrotate.8
14index 8b34167..5f15432 100644
15--- a/logrotate.8
16+++ b/logrotate.8
17@@ -374,10 +374,9 @@ Do not rotate the log if it is empty (this overrides the \fBifempty\fR option).
18 .TP
19 \fBolddir \fIdirectory\fR
20 Logs are moved into \fIdirectory\fR for rotation. The \fIdirectory\fR
21-must be on the same physical device as the log file being rotated,
22-and is assumed to be relative to the directory holding the log file
23-unless an absolute path name is specified. When this option is used all
24-old versions of the log end up in \fIdirectory\fR. This option may be
25+is assumed to be relative to the directory holding the log file unless
26+an absolute path name is specified. When this option is used all old
27+versions of the log end up in \fIdirectory\fR. This option may be
28 overridden by the \fBnoolddir\fR option.
29
30 .TP
31@@ -435,7 +434,7 @@ Log files are rotated only if they grow bigger then \fIsize\fR bytes. If
32 \fIsize\fR is followed by \fIk\fR, the size is assumed to be in kilobytes.
33 If the \fIM\fR is used, the size is in megabytes, and if \fIG\fR is used, the
34 size is in gigabytes. So \fBsize 100\fR, \fIsize 100k\fR, \fIsize 100M\fR and
35-\fIsize 100G\f are all valid.
36+\fIsize 100G\fR are all valid.
37
38 .TP
39 \fBsharedscripts\fR
40--
411.7.4.1
42