diff options
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r-- | meta/recipes-extended/logrotate/logrotate/act-as-mv-when-rotate.patch (renamed from meta/recipes-extended/logrotate/logrotate-3.8.1/act-as-mv-when-rotate.patch) | 53 | ||||
-rw-r--r-- | meta/recipes-extended/logrotate/logrotate/disable-check-different-filesystems.patch (renamed from meta/recipes-extended/logrotate/logrotate-3.8.1/disable-check-different-filesystems.patch) | 2 | ||||
-rw-r--r-- | meta/recipes-extended/logrotate/logrotate/logrotate-CVE-2011-1548.patch (renamed from meta/recipes-extended/logrotate/logrotate-3.8.1/logrotate-CVE-2011-1548.patch) | 0 | ||||
-rw-r--r-- | meta/recipes-extended/logrotate/logrotate/update-the-manual.patch (renamed from meta/recipes-extended/logrotate/logrotate-3.8.1/update-the-manual.patch) | 18 | ||||
-rw-r--r-- | meta/recipes-extended/logrotate/logrotate_3.8.7.bb (renamed from meta/recipes-extended/logrotate/logrotate_3.8.1.bb) | 8 |
5 files changed, 48 insertions, 33 deletions
diff --git a/meta/recipes-extended/logrotate/logrotate-3.8.1/act-as-mv-when-rotate.patch b/meta/recipes-extended/logrotate/logrotate/act-as-mv-when-rotate.patch index c9fb1d2525..ce64040d5f 100644 --- a/meta/recipes-extended/logrotate/logrotate-3.8.1/act-as-mv-when-rotate.patch +++ b/meta/recipes-extended/logrotate/logrotate/act-as-mv-when-rotate.patch | |||
@@ -3,18 +3,18 @@ Act as the "mv" command when rotate log | |||
3 | Act as the "mv" command when rotate log, first rename, if failed, then | 3 | Act as the "mv" command when rotate log, first rename, if failed, then |
4 | read and write. | 4 | read and write. |
5 | 5 | ||
6 | Upstream-Status: Pending | 6 | Upstream-Status: Submitted |
7 | 7 | ||
8 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | 8 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> |
9 | --- | 9 | --- |
10 | logrotate.c | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++------ | 10 | logrotate.c | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++--------- |
11 | 1 files changed, 53 insertions(+), 6 deletions(-) | 11 | 1 file changed, 56 insertions(+), 9 deletions(-) |
12 | 12 | ||
13 | diff --git a/logrotate.c b/logrotate.c | 13 | diff --git a/logrotate.c b/logrotate.c |
14 | index 537e8d6..b04482f 100644 | 14 | index 174a26b..b18b629 100644 |
15 | --- a/logrotate.c | 15 | --- a/logrotate.c |
16 | +++ b/logrotate.c | 16 | +++ b/logrotate.c |
17 | @@ -808,6 +808,53 @@ int findNeedRotating(struct logInfo *log, int logNum) | 17 | @@ -906,6 +906,53 @@ int findNeedRotating(struct logInfo *log, int logNum, int force) |
18 | return 0; | 18 | return 0; |
19 | } | 19 | } |
20 | 20 | ||
@@ -23,7 +23,7 @@ index 537e8d6..b04482f 100644 | |||
23 | + * the strerror(errorno) to handle the error message, so we don't have | 23 | + * the strerror(errorno) to handle the error message, so we don't have |
24 | + * to print the error message here */ | 24 | + * to print the error message here */ |
25 | + | 25 | + |
26 | +int mvFile (char *oldName, char *newName, struct logInfo *log) | 26 | +int mvFile (char *oldName, char *newName, struct logInfo *log, acl_type acl) |
27 | +{ | 27 | +{ |
28 | + struct stat sbprev; | 28 | + struct stat sbprev; |
29 | + int fd_old, fd_new, n; | 29 | + int fd_old, fd_new, n; |
@@ -45,7 +45,7 @@ index 537e8d6..b04482f 100644 | |||
45 | + return 1; | 45 | + return 1; |
46 | + else { | 46 | + else { |
47 | + if ((fd_new = createOutputFile(newName, | 47 | + if ((fd_new = createOutputFile(newName, |
48 | + O_WRONLY | O_CREAT | O_TRUNC, &sbprev)) < 0 ) | 48 | + O_WRONLY | O_CREAT | O_TRUNC, &sbprev, acl, 0)) < 0 ) |
49 | + return 1; | 49 | + return 1; |
50 | + } | 50 | + } |
51 | + | 51 | + |
@@ -68,8 +68,8 @@ index 537e8d6..b04482f 100644 | |||
68 | int prerotateSingleLog(struct logInfo *log, int logNum, struct logState *state, | 68 | int prerotateSingleLog(struct logInfo *log, int logNum, struct logState *state, |
69 | struct logNames *rotNames) | 69 | struct logNames *rotNames) |
70 | { | 70 | { |
71 | @@ -1148,15 +1195,15 @@ int prerotateSingleLog(struct logInfo *log, int logNum, struct logState *state, | 71 | @@ -1268,15 +1315,15 @@ int prerotateSingleLog(struct logInfo *log, int logNum, struct logState *state, |
72 | rotNames->baseName, i, fileext, compext); | 72 | } |
73 | 73 | ||
74 | message(MESS_DEBUG, | 74 | message(MESS_DEBUG, |
75 | - "renaming %s to %s (rotatecount %d, logstart %d, i %d), \n", | 75 | - "renaming %s to %s (rotatecount %d, logstart %d, i %d), \n", |
@@ -77,7 +77,7 @@ index 537e8d6..b04482f 100644 | |||
77 | oldName, newName, rotateCount, logStart, i); | 77 | oldName, newName, rotateCount, logStart, i); |
78 | 78 | ||
79 | - if (!debug && rename(oldName, newName)) { | 79 | - if (!debug && rename(oldName, newName)) { |
80 | + if (!debug && mvFile(oldName, newName, log)) { | 80 | + if (!debug && mvFile(oldName, newName, log, prev_acl)) { |
81 | if (errno == ENOENT) { | 81 | if (errno == ENOENT) { |
82 | message(MESS_DEBUG, "old log %s does not exist\n", | 82 | message(MESS_DEBUG, "old log %s does not exist\n", |
83 | oldName); | 83 | oldName); |
@@ -87,7 +87,7 @@ index 537e8d6..b04482f 100644 | |||
87 | oldName, newName, strerror(errno)); | 87 | oldName, newName, strerror(errno)); |
88 | hasErrors = 1; | 88 | hasErrors = 1; |
89 | } | 89 | } |
90 | @@ -1286,11 +1333,11 @@ int rotateSingleLog(struct logInfo *log, int logNum, struct logState *state, | 90 | @@ -1408,11 +1455,11 @@ int rotateSingleLog(struct logInfo *log, int logNum, struct logState *state, |
91 | } | 91 | } |
92 | } | 92 | } |
93 | #endif /* WITH_ACL */ | 93 | #endif /* WITH_ACL */ |
@@ -97,11 +97,38 @@ index 537e8d6..b04482f 100644 | |||
97 | if (!debug && !hasErrors && | 97 | if (!debug && !hasErrors && |
98 | - rename(log->files[logNum], rotNames->finalName)) { | 98 | - rename(log->files[logNum], rotNames->finalName)) { |
99 | - message(MESS_ERROR, "failed to rename %s to %s: %s\n", | 99 | - message(MESS_ERROR, "failed to rename %s to %s: %s\n", |
100 | + mvFile(log->files[logNum], rotNames->finalName, log)) { | 100 | + mvFile(log->files[logNum], rotNames->finalName, log, prev_acl)) { |
101 | + message(MESS_ERROR, "failed to move %s to %s: %s\n", | 101 | + message(MESS_ERROR, "failed to move %s to %s: %s\n", |
102 | log->files[logNum], rotNames->finalName, | 102 | log->files[logNum], rotNames->finalName, |
103 | strerror(errno)); | 103 | strerror(errno)); |
104 | hasErrors = 1; | 104 | hasErrors = 1; |
105 | @@ -1775,7 +1822,7 @@ int rotateLogSet(struct logInfo *log, int force) | ||
106 | return hasErrors; | ||
107 | } | ||
108 | |||
109 | -static int writeState(char *stateFilename) | ||
110 | +static int writeState(struct logInfo *log, char *stateFilename) | ||
111 | { | ||
112 | struct logState *p; | ||
113 | FILE *f; | ||
114 | @@ -1939,7 +1986,7 @@ static int writeState(char *stateFilename) | ||
115 | fclose(f); | ||
116 | |||
117 | if (error == 0) { | ||
118 | - if (rename(tmpFilename, stateFilename)) { | ||
119 | + if (mvFile(tmpFilename, stateFilename, log, prev_acl)) { | ||
120 | unlink(tmpFilename); | ||
121 | error = 1; | ||
122 | message(MESS_ERROR, "error renaming temp state file %s\n", | ||
123 | @@ -2223,7 +2270,7 @@ int main(int argc, const char **argv) | ||
124 | rc |= rotateLogSet(log, force); | ||
125 | |||
126 | if (!debug) | ||
127 | - rc |= writeState(stateFile); | ||
128 | + rc |= writeState(log, stateFile); | ||
129 | |||
130 | return (rc != 0); | ||
131 | } | ||
105 | -- | 132 | -- |
106 | 1.7.4.1 | 133 | 1.7.10.4 |
107 | 134 | ||
diff --git a/meta/recipes-extended/logrotate/logrotate-3.8.1/disable-check-different-filesystems.patch b/meta/recipes-extended/logrotate/logrotate/disable-check-different-filesystems.patch index 5cb6038404..43068bdbd7 100644 --- a/meta/recipes-extended/logrotate/logrotate-3.8.1/disable-check-different-filesystems.patch +++ b/meta/recipes-extended/logrotate/logrotate/disable-check-different-filesystems.patch | |||
@@ -3,7 +3,7 @@ Disable the check for different filesystems | |||
3 | The logrotate supports rotate log across different filesystems now, so | 3 | The logrotate supports rotate log across different filesystems now, so |
4 | disable the check for different filesystems. | 4 | disable the check for different filesystems. |
5 | 5 | ||
6 | Upstream-Status: Pending | 6 | Upstream-Status: Submitted |
7 | 7 | ||
8 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | 8 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> |
9 | --- | 9 | --- |
diff --git a/meta/recipes-extended/logrotate/logrotate-3.8.1/logrotate-CVE-2011-1548.patch b/meta/recipes-extended/logrotate/logrotate/logrotate-CVE-2011-1548.patch index ed2750e9c3..ed2750e9c3 100644 --- a/meta/recipes-extended/logrotate/logrotate-3.8.1/logrotate-CVE-2011-1548.patch +++ b/meta/recipes-extended/logrotate/logrotate/logrotate-CVE-2011-1548.patch | |||
diff --git a/meta/recipes-extended/logrotate/logrotate-3.8.1/update-the-manual.patch b/meta/recipes-extended/logrotate/logrotate/update-the-manual.patch index 5cab64947b..517acdd27e 100644 --- a/meta/recipes-extended/logrotate/logrotate-3.8.1/update-the-manual.patch +++ b/meta/recipes-extended/logrotate/logrotate/update-the-manual.patch | |||
@@ -1,14 +1,13 @@ | |||
1 | Update the manual | 1 | Update the manual |
2 | 2 | ||
3 | * Update the mannual | 3 | Update the manual for rotating on different filesystems. |
4 | * Fix a bug in the mannual(\f should be \fR) | ||
5 | 4 | ||
6 | Upstream-Status: Pending | 5 | Upstream-Status: Submitted |
7 | 6 | ||
8 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | 7 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> |
9 | --- | 8 | --- |
10 | logrotate.8 | 9 ++++----- | 9 | logrotate.8 | 7 +++---- |
11 | 1 files changed, 4 insertions(+), 5 deletions(-) | 10 | 1 files changed, 3 insertions(+), 4 deletions(-) |
12 | 11 | ||
13 | diff --git a/logrotate.8 b/logrotate.8 | 12 | diff --git a/logrotate.8 b/logrotate.8 |
14 | index 8b34167..5f15432 100644 | 13 | index 8b34167..5f15432 100644 |
@@ -28,15 +27,6 @@ index 8b34167..5f15432 100644 | |||
28 | overridden by the \fBnoolddir\fR option. | 27 | overridden by the \fBnoolddir\fR option. |
29 | 28 | ||
30 | .TP | 29 | .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 | -- | 30 | -- |
41 | 1.7.4.1 | 31 | 1.7.4.1 |
42 | 32 | ||
diff --git a/meta/recipes-extended/logrotate/logrotate_3.8.1.bb b/meta/recipes-extended/logrotate/logrotate_3.8.7.bb index b12a32577b..055bfd565d 100644 --- a/meta/recipes-extended/logrotate/logrotate_3.8.1.bb +++ b/meta/recipes-extended/logrotate/logrotate_3.8.7.bb | |||
@@ -1,6 +1,6 @@ | |||
1 | SUMMARY = "Rotates, compresses, removes and mails system log files" | 1 | SUMMARY = "Rotates, compresses, removes and mails system log files" |
2 | SECTION = "console/utils" | 2 | SECTION = "console/utils" |
3 | HOMEPAGE = "https://fedorahosted.org/releases/l/o/logrotate" | 3 | HOMEPAGE = "https://fedorahosted.org/logrotate/" |
4 | LICENSE = "GPLv2" | 4 | LICENSE = "GPLv2" |
5 | 5 | ||
6 | DEPENDS="coreutils popt" | 6 | DEPENDS="coreutils popt" |
@@ -11,12 +11,10 @@ SRC_URI = "https://fedorahosted.org/releases/l/o/logrotate/logrotate-${PV}.tar.g | |||
11 | file://act-as-mv-when-rotate.patch \ | 11 | file://act-as-mv-when-rotate.patch \ |
12 | file://disable-check-different-filesystems.patch \ | 12 | file://disable-check-different-filesystems.patch \ |
13 | file://update-the-manual.patch \ | 13 | file://update-the-manual.patch \ |
14 | file://logrotate-CVE-2011-1548.patch \ | ||
15 | " | 14 | " |
16 | 15 | ||
17 | SRC_URI[md5sum] = "bd2e20d8dc644291b08f9215397d28a5" | 16 | SRC_URI[md5sum] = "99e08503ef24c3e2e3ff74cc5f3be213" |
18 | SRC_URI[sha256sum] = "c12471e70ae8bc923bd5c4f25e8fd6483b68c6301f3cd79f7cfe37bc5b370169" | 17 | SRC_URI[sha256sum] = "f6ba691f40e30e640efa2752c1f9499a3f9738257660994de70a45fe00d12b64" |
19 | |||
20 | 18 | ||
21 | EXTRA_OEMAKE = "CC='${CC}'" | 19 | EXTRA_OEMAKE = "CC='${CC}'" |
22 | 20 | ||