diff options
author | Robert Yang <liezhi.yang@windriver.com> | 2015-02-19 21:37:21 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-02-21 22:05:35 +0000 |
commit | 0a69248db774f169318fc5954c805f0a7e8803dc (patch) | |
tree | 3da063f0f4aa71e30c3601199632ae527bf087d6 /meta/recipes-extended/logrotate | |
parent | 312479892c8f1d60d6c0f11ff3d432800fe9e7ec (diff) | |
download | poky-0a69248db774f169318fc5954c805f0a7e8803dc.tar.gz |
logrotate: 3.8.8 -> 3.8.9
(From OE-Core rev: 32848c7015f5d70c4245a9b1bb77c21faef8653d)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/logrotate')
-rw-r--r-- | meta/recipes-extended/logrotate/logrotate/act-as-mv-when-rotate.patch | 48 | ||||
-rw-r--r-- | meta/recipes-extended/logrotate/logrotate/disable-check-different-filesystems.patch | 30 | ||||
-rw-r--r-- | meta/recipes-extended/logrotate/logrotate/update-the-manual.patch | 26 | ||||
-rw-r--r-- | meta/recipes-extended/logrotate/logrotate_3.8.9.bb (renamed from meta/recipes-extended/logrotate/logrotate_3.8.8.bb) | 4 |
4 files changed, 60 insertions, 48 deletions
diff --git a/meta/recipes-extended/logrotate/logrotate/act-as-mv-when-rotate.patch b/meta/recipes-extended/logrotate/logrotate/act-as-mv-when-rotate.patch index ce64040d5f..15f171ed6f 100644 --- a/meta/recipes-extended/logrotate/logrotate/act-as-mv-when-rotate.patch +++ b/meta/recipes-extended/logrotate/logrotate/act-as-mv-when-rotate.patch | |||
@@ -1,9 +1,12 @@ | |||
1 | Act as the "mv" command when rotate log | 1 | From 68f29ab490cf987aa34b5f4caf1784b58a021308 Mon Sep 17 00:00:00 2001 |
2 | From: Robert Yang <liezhi.yang@windriver.com> | ||
3 | Date: Tue, 17 Feb 2015 21:08:07 -0800 | ||
4 | Subject: [PATCH] Act as the "mv" command when rotate log | ||
2 | 5 | ||
3 | Act as the "mv" command when rotate log, first rename, if failed, then | 6 | Act as the "mv" command when rotate log, first rename, if failed, then |
4 | read and write. | 7 | read and write. |
5 | 8 | ||
6 | Upstream-Status: Submitted | 9 | Upstream-Status: Pending |
7 | 10 | ||
8 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | 11 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> |
9 | --- | 12 | --- |
@@ -11,10 +14,10 @@ Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | |||
11 | 1 file changed, 56 insertions(+), 9 deletions(-) | 14 | 1 file changed, 56 insertions(+), 9 deletions(-) |
12 | 15 | ||
13 | diff --git a/logrotate.c b/logrotate.c | 16 | diff --git a/logrotate.c b/logrotate.c |
14 | index 174a26b..b18b629 100644 | 17 | index 05e74c9..616418f 100644 |
15 | --- a/logrotate.c | 18 | --- a/logrotate.c |
16 | +++ b/logrotate.c | 19 | +++ b/logrotate.c |
17 | @@ -906,6 +906,53 @@ int findNeedRotating(struct logInfo *log, int logNum, int force) | 20 | @@ -1000,6 +1000,53 @@ int findNeedRotating(struct logInfo *log, int logNum, int force) |
18 | return 0; | 21 | return 0; |
19 | } | 22 | } |
20 | 23 | ||
@@ -68,7 +71,7 @@ index 174a26b..b18b629 100644 | |||
68 | int prerotateSingleLog(struct logInfo *log, int logNum, struct logState *state, | 71 | int prerotateSingleLog(struct logInfo *log, int logNum, struct logState *state, |
69 | struct logNames *rotNames) | 72 | struct logNames *rotNames) |
70 | { | 73 | { |
71 | @@ -1268,15 +1315,15 @@ int prerotateSingleLog(struct logInfo *log, int logNum, struct logState *state, | 74 | @@ -1364,15 +1411,15 @@ int prerotateSingleLog(struct logInfo *log, int logNum, struct logState *state, |
72 | } | 75 | } |
73 | 76 | ||
74 | message(MESS_DEBUG, | 77 | message(MESS_DEBUG, |
@@ -87,22 +90,21 @@ index 174a26b..b18b629 100644 | |||
87 | oldName, newName, strerror(errno)); | 90 | oldName, newName, strerror(errno)); |
88 | hasErrors = 1; | 91 | hasErrors = 1; |
89 | } | 92 | } |
90 | @@ -1408,11 +1455,11 @@ int rotateSingleLog(struct logInfo *log, int logNum, struct logState *state, | 93 | @@ -1511,10 +1558,10 @@ int rotateSingleLog(struct logInfo *log, int logNum, struct logState *state, |
94 | return 1; | ||
91 | } | 95 | } |
92 | } | 96 | |
93 | #endif /* WITH_ACL */ | 97 | - message(MESS_DEBUG, "renaming %s to %s\n", log->files[logNum], |
94 | - message(MESS_DEBUG, "renaming %s to %s\n", log->files[logNum], | 98 | + message(MESS_DEBUG, "moving %s to %s\n", log->files[logNum], |
95 | + message(MESS_DEBUG, "moving %s to %s\n", log->files[logNum], | 99 | tmpFilename); |
96 | rotNames->finalName); | 100 | - if (!debug && !hasErrors && rename(log->files[logNum], tmpFilename)) { |
97 | if (!debug && !hasErrors && | 101 | - message(MESS_ERROR, "failed to rename %s to %s: %s\n", |
98 | - rename(log->files[logNum], rotNames->finalName)) { | 102 | + if (!debug && !hasErrors && mvFile(log->files[logNum], rotNames->finalName, log, prev_acl)) { |
99 | - message(MESS_ERROR, "failed to rename %s to %s: %s\n", | 103 | + message(MESS_ERROR, "failed to move %s to %s: %s\n", |
100 | + mvFile(log->files[logNum], rotNames->finalName, log, prev_acl)) { | 104 | log->files[logNum], tmpFilename, |
101 | + message(MESS_ERROR, "failed to move %s to %s: %s\n", | 105 | strerror(errno)); |
102 | log->files[logNum], rotNames->finalName, | 106 | if (errno == ENOENT) { |
103 | strerror(errno)); | 107 | @@ -1912,7 +1959,7 @@ int rotateLogSet(struct logInfo *log, int force) |
104 | hasErrors = 1; | ||
105 | @@ -1775,7 +1822,7 @@ int rotateLogSet(struct logInfo *log, int force) | ||
106 | return hasErrors; | 108 | return hasErrors; |
107 | } | 109 | } |
108 | 110 | ||
@@ -111,7 +113,7 @@ index 174a26b..b18b629 100644 | |||
111 | { | 113 | { |
112 | struct logState *p; | 114 | struct logState *p; |
113 | FILE *f; | 115 | FILE *f; |
114 | @@ -1939,7 +1986,7 @@ static int writeState(char *stateFilename) | 116 | @@ -2076,7 +2123,7 @@ static int writeState(char *stateFilename) |
115 | fclose(f); | 117 | fclose(f); |
116 | 118 | ||
117 | if (error == 0) { | 119 | if (error == 0) { |
@@ -120,7 +122,7 @@ index 174a26b..b18b629 100644 | |||
120 | unlink(tmpFilename); | 122 | unlink(tmpFilename); |
121 | error = 1; | 123 | error = 1; |
122 | message(MESS_ERROR, "error renaming temp state file %s\n", | 124 | message(MESS_ERROR, "error renaming temp state file %s\n", |
123 | @@ -2223,7 +2270,7 @@ int main(int argc, const char **argv) | 125 | @@ -2362,7 +2409,7 @@ int main(int argc, const char **argv) |
124 | rc |= rotateLogSet(log, force); | 126 | rc |= rotateLogSet(log, force); |
125 | 127 | ||
126 | if (!debug) | 128 | if (!debug) |
@@ -130,5 +132,5 @@ index 174a26b..b18b629 100644 | |||
130 | return (rc != 0); | 132 | return (rc != 0); |
131 | } | 133 | } |
132 | -- | 134 | -- |
133 | 1.7.10.4 | 135 | 1.7.9.5 |
134 | 136 | ||
diff --git a/meta/recipes-extended/logrotate/logrotate/disable-check-different-filesystems.patch b/meta/recipes-extended/logrotate/logrotate/disable-check-different-filesystems.patch index 43ebcffbae..0535a45e08 100644 --- a/meta/recipes-extended/logrotate/logrotate/disable-check-different-filesystems.patch +++ b/meta/recipes-extended/logrotate/logrotate/disable-check-different-filesystems.patch | |||
@@ -1,9 +1,12 @@ | |||
1 | Disable the check for different filesystems | 1 | From 263212af7b7fe1083f777255d91f029401391e4f Mon Sep 17 00:00:00 2001 |
2 | From: Robert Yang <liezhi.yang@windriver.com> | ||
3 | Date: Tue, 17 Feb 2015 21:18:39 -0800 | ||
4 | Subject: [PATCH] Disable the check for different filesystems | ||
2 | 5 | ||
3 | The logrotate supports rotate log across different filesystems now, so | 6 | The logrotate supports rotate log across different filesystems now, so |
4 | disable the check for different filesystems. | 7 | disable the check for different filesystems. |
5 | 8 | ||
6 | Upstream-Status: Submitted | 9 | Upstream-Status: Pending |
7 | 10 | ||
8 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | 11 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> |
9 | --- | 12 | --- |
@@ -11,24 +14,25 @@ Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | |||
11 | 1 file changed, 9 deletions(-) | 14 | 1 file changed, 9 deletions(-) |
12 | 15 | ||
13 | diff --git a/config.c b/config.c | 16 | diff --git a/config.c b/config.c |
14 | index e0eadb7..c23092f 100644 | 17 | index dbbf563..64e66f6 100644 |
15 | --- a/config.c | 18 | --- a/config.c |
16 | +++ b/config.c | 19 | +++ b/config.c |
17 | @@ -1515,15 +1515,6 @@ static int readConfigFile(const char *configFile, struct logInfo *defConfig) | 20 | @@ -1493,15 +1493,6 @@ static int readConfigFile(const char *configFile, struct logInfo *defConfig) |
18 | dirName, strerror(errno)); | 21 | goto error; |
19 | goto error; | 22 | } |
20 | } | 23 | } |
21 | - | 24 | - |
22 | - if (sb.st_dev != sb2.st_dev | 25 | - if (sb.st_dev != sb2.st_dev |
23 | - && !(newlog->flags & (LOG_FLAG_COPYTRUNCATE | LOG_FLAG_COPY))) { | 26 | - && !(newlog->flags & (LOG_FLAG_COPYTRUNCATE | LOG_FLAG_COPY | LOG_FLAG_TMPFILENAME))) { |
24 | - message(MESS_ERROR, | 27 | - message(MESS_ERROR, |
25 | - "%s:%d olddir %s and log file %s " | 28 | - "%s:%d olddir %s and log file %s " |
26 | - "are on different devices\n", configFile, | 29 | - "are on different devices\n", configFile, |
27 | - lineNum, newlog->oldDir, newlog->files[i]); | 30 | - lineNum, newlog->oldDir, newlog->files[i]); |
28 | - goto error; | 31 | - goto error; |
29 | - } | 32 | - } |
30 | } | 33 | } |
31 | } | 34 | } |
32 | 35 | ||
33 | -- | 36 | -- |
34 | 1.7.9.5 | 37 | 1.7.9.5 |
38 | |||
diff --git a/meta/recipes-extended/logrotate/logrotate/update-the-manual.patch b/meta/recipes-extended/logrotate/logrotate/update-the-manual.patch index 517acdd27e..50d037d5a1 100644 --- a/meta/recipes-extended/logrotate/logrotate/update-the-manual.patch +++ b/meta/recipes-extended/logrotate/logrotate/update-the-manual.patch | |||
@@ -1,26 +1,32 @@ | |||
1 | Update the manual | 1 | From e0b0fe30e9c49234994a20a86aacfaf80e690087 Mon Sep 17 00:00:00 2001 |
2 | From: Robert Yang <liezhi.yang@windriver.com> | ||
3 | Date: Tue, 17 Feb 2015 21:14:37 -0800 | ||
4 | Subject: [PATCH] Update the manual | ||
2 | 5 | ||
3 | Update the manual for rotating on different filesystems. | 6 | Update the manual for rotating on different filesystems. |
4 | 7 | ||
5 | Upstream-Status: Submitted | 8 | Upstream-Status: Pending |
6 | 9 | ||
7 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | 10 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> |
8 | --- | 11 | --- |
9 | logrotate.8 | 7 +++---- | 12 | logrotate.8 | 10 ++++------ |
10 | 1 files changed, 3 insertions(+), 4 deletions(-) | 13 | 1 file changed, 4 insertions(+), 6 deletions(-) |
11 | 14 | ||
12 | diff --git a/logrotate.8 b/logrotate.8 | 15 | diff --git a/logrotate.8 b/logrotate.8 |
13 | index 8b34167..5f15432 100644 | 16 | index e4e5f48..84407d0 100644 |
14 | --- a/logrotate.8 | 17 | --- a/logrotate.8 |
15 | +++ b/logrotate.8 | 18 | +++ b/logrotate.8 |
16 | @@ -374,10 +374,9 @@ Do not rotate the log if it is empty (this overrides the \fBifempty\fR option). | 19 | @@ -405,12 +405,10 @@ Do not rotate the log if it is empty (this overrides the \fBifempty\fR option). |
20 | |||
17 | .TP | 21 | .TP |
18 | \fBolddir \fIdirectory\fR | 22 | \fBolddir \fIdirectory\fR |
19 | Logs are moved into \fIdirectory\fR for rotation. The \fIdirectory\fR | 23 | -Logs are moved into \fIdirectory\fR for rotation. The \fIdirectory\fR must be |
20 | -must be on the same physical device as the log file being rotated, | 24 | -on the same physical device as the log file being rotated, unless \fBcopy\fR, |
21 | -and is assumed to be relative to the directory holding the log file | 25 | -\fBcopytruncate\fR or \fBrenamecopy\fR option is used. The \fIdirectory\fR |
26 | -is assumed to be relative to the directory holding the log file | ||
22 | -unless an absolute path name is specified. When this option is used all | 27 | -unless an absolute path name is specified. When this option is used all |
23 | -old versions of the log end up in \fIdirectory\fR. This option may be | 28 | -old versions of the log end up in \fIdirectory\fR. This option may be |
29 | +Logs are moved into \fIdirectory\fR for rotation. The \fIdirectory\fR | ||
24 | +is assumed to be relative to the directory holding the log file unless | 30 | +is assumed to be relative to the directory holding the log file unless |
25 | +an absolute path name is specified. When this option is used all old | 31 | +an absolute path name is specified. When this option is used all old |
26 | +versions of the log end up in \fIdirectory\fR. This option may be | 32 | +versions of the log end up in \fIdirectory\fR. This option may be |
@@ -28,5 +34,5 @@ index 8b34167..5f15432 100644 | |||
28 | 34 | ||
29 | .TP | 35 | .TP |
30 | -- | 36 | -- |
31 | 1.7.4.1 | 37 | 1.7.9.5 |
32 | 38 | ||
diff --git a/meta/recipes-extended/logrotate/logrotate_3.8.8.bb b/meta/recipes-extended/logrotate/logrotate_3.8.9.bb index 00432dede2..8611a3e8a5 100644 --- a/meta/recipes-extended/logrotate/logrotate_3.8.8.bb +++ b/meta/recipes-extended/logrotate/logrotate_3.8.9.bb | |||
@@ -16,8 +16,8 @@ SRC_URI = "https://fedorahosted.org/releases/l/o/logrotate/logrotate-${PV}.tar.g | |||
16 | file://disable-check-different-filesystems.patch \ | 16 | file://disable-check-different-filesystems.patch \ |
17 | " | 17 | " |
18 | 18 | ||
19 | SRC_URI[md5sum] = "49846e873dddea15964cd0355b9943ca" | 19 | SRC_URI[md5sum] = "2660f30742da79870d15d042b07829f6" |
20 | SRC_URI[sha256sum] = "46a1510ef4a1f4359edd5f361112cfd1523942e85ff28e6cbb0c81bad1829d0f" | 20 | SRC_URI[sha256sum] = "700ed7ce9072a1cca324779a74797dfaefdae37ac50a817134b947c4ded1dfa7" |
21 | 21 | ||
22 | PACKAGECONFIG ?= "\ | 22 | PACKAGECONFIG ?= "\ |
23 | ${@base_contains('DISTRO_FEATURES', 'acl', 'acl', '', d)} \ | 23 | ${@base_contains('DISTRO_FEATURES', 'acl', 'acl', '', d)} \ |