summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2015-06-29 20:26:36 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-07-01 15:40:00 +0100
commit53ddebed1b2a1f677778344c52d69af1e6fde77b (patch)
tree5682029647f19d59e54e41b2775da1ca67be8327 /meta
parent563269fd1e326d099051720275682afd9a813857 (diff)
downloadpoky-53ddebed1b2a1f677778344c52d69af1e6fde77b.tar.gz
logrotate: 3.8.8 -> 3.9.1
Updated: - act-as-mv-when-rotate.patch - disable-check-different-filesystems.patch - update-the-manual.patch - base_contains -> bb.utils.contains [YOCTO #7346] (From OE-Core rev: e322019d9fb820187263b242e10e750a46dd1bfd) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-extended/logrotate/logrotate/act-as-mv-when-rotate.patch65
-rw-r--r--meta/recipes-extended/logrotate/logrotate/disable-check-different-filesystems.patch26
-rw-r--r--meta/recipes-extended/logrotate/logrotate/update-the-manual.patch26
-rw-r--r--meta/recipes-extended/logrotate/logrotate_3.9.1.bb (renamed from meta/recipes-extended/logrotate/logrotate_3.8.8.bb)14
4 files changed, 73 insertions, 58 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..2e931a2876 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,20 +1,23 @@
1Act as the "mv" command when rotate log 1From 68f29ab490cf987aa34b5f4caf1784b58a021308 Mon Sep 17 00:00:00 2001
2From: Robert Yang <liezhi.yang@windriver.com>
3Date: Tue, 17 Feb 2015 21:08:07 -0800
4Subject: [PATCH] Act as the "mv" command when rotate log
2 5
3Act as the "mv" command when rotate log, first rename, if failed, then 6Act as the "mv" command when rotate log, first rename, if failed, then
4read and write. 7read and write.
5 8
6Upstream-Status: Submitted 9Upstream-Status: Pending
7 10
8Signed-off-by: Robert Yang <liezhi.yang@windriver.com> 11Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
9--- 12---
10 logrotate.c | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++--------- 13 logrotate.c | 71 +++++++++++++++++++++++++++++++++++++++++++++++++----------
11 1 file changed, 56 insertions(+), 9 deletions(-) 14 1 file changed, 59 insertions(+), 12 deletions(-)
12 15
13diff --git a/logrotate.c b/logrotate.c 16diff --git a/logrotate.c b/logrotate.c
14index 174a26b..b18b629 100644 17index d3deb6a..cf8bf2c 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@@ -1157,6 +1157,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@@ -1523,15 +1570,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,35 @@ 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@@ -1669,21 +1716,21 @@ int rotateSingleLog(struct logInfo *log, int logNum, struct logState *state,
94 return 1;
95 }
96
97- message(MESS_DEBUG, "renaming %s to %s\n", log->files[logNum],
98+ message(MESS_DEBUG, "moving %s to %s\n", log->files[logNum],
99 tmpFilename);
100- if (!debug && !hasErrors && rename(log->files[logNum], tmpFilename)) {
101- message(MESS_ERROR, "failed to rename %s to %s: %s\n",
102+ if (!debug && !hasErrors && mvFile(log->files[logNum], rotNames->finalName, log, prev_acl)) {
103+ message(MESS_ERROR, "failed to move %s to %s: %s\n",
104 log->files[logNum], tmpFilename,
105 strerror(errno));
106 hasErrors = 1;
91 } 107 }
92 } 108 }
93 #endif /* WITH_ACL */ 109 else {
94- message(MESS_DEBUG, "renaming %s to %s\n", log->files[logNum], 110- message(MESS_DEBUG, "renaming %s to %s\n", log->files[logNum],
95+ message(MESS_DEBUG, "moving %s to %s\n", log->files[logNum], 111+ message(MESS_DEBUG, "moving %s to %s\n", log->files[logNum],
96 rotNames->finalName); 112 rotNames->finalName);
97 if (!debug && !hasErrors && 113 if (!debug && !hasErrors &&
98- rename(log->files[logNum], rotNames->finalName)) { 114- rename(log->files[logNum], rotNames->finalName)) {
99- message(MESS_ERROR, "failed to rename %s to %s: %s\n", 115- message(MESS_ERROR, "failed to rename %s to %s: %s\n",
100+ mvFile(log->files[logNum], rotNames->finalName, log, prev_acl)) { 116+ mvFile(log->files[logNum], rotNames->finalName, log, prev_acl)) {
101+ message(MESS_ERROR, "failed to move %s to %s: %s\n", 117+ message(MESS_ERROR, "failed to move %s to %s: %s\n",
102 log->files[logNum], rotNames->finalName, 118 log->files[logNum], tmpFilename,
103 strerror(errno)); 119 strerror(errno));
104 hasErrors = 1; 120 hasErrors = 1;
105@@ -1775,7 +1822,7 @@ int rotateLogSet(struct logInfo *log, int force) 121@@ -2063,7 +2110,7 @@ int rotateLogSet(struct logInfo *log, int force)
106 return hasErrors; 122 return hasErrors;
107 } 123 }
108 124
@@ -111,7 +127,7 @@ index 174a26b..b18b629 100644
111 { 127 {
112 struct logState *p; 128 struct logState *p;
113 FILE *f; 129 FILE *f;
114@@ -1939,7 +1986,7 @@ static int writeState(char *stateFilename) 130@@ -2227,7 +2274,7 @@ static int writeState(char *stateFilename)
115 fclose(f); 131 fclose(f);
116 132
117 if (error == 0) { 133 if (error == 0) {
@@ -120,7 +136,7 @@ index 174a26b..b18b629 100644
120 unlink(tmpFilename); 136 unlink(tmpFilename);
121 error = 1; 137 error = 1;
122 message(MESS_ERROR, "error renaming temp state file %s\n", 138 message(MESS_ERROR, "error renaming temp state file %s\n",
123@@ -2223,7 +2270,7 @@ int main(int argc, const char **argv) 139@@ -2525,7 +2572,7 @@ int main(int argc, const char **argv)
124 rc |= rotateLogSet(log, force); 140 rc |= rotateLogSet(log, force);
125 141
126 if (!debug) 142 if (!debug)
@@ -129,6 +145,3 @@ index 174a26b..b18b629 100644
129 145
130 return (rc != 0); 146 return (rc != 0);
131 } 147 }
132--
1331.7.10.4
134
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..793d702598 100644
--- a/meta/recipes-extended/logrotate/logrotate/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
3The logrotate supports rotate log across different filesystems now, so 3The logrotate supports rotate log across different filesystems now, so
4disable the check for different filesystems. 4disable the check for different filesystems.
5 5
6Upstream-Status: Submitted 6Upstream-Status: Pending
7 7
8Signed-off-by: Robert Yang <liezhi.yang@windriver.com> 8Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
9--- 9---
@@ -11,24 +11,22 @@ Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
11 1 file changed, 9 deletions(-) 11 1 file changed, 9 deletions(-)
12 12
13diff --git a/config.c b/config.c 13diff --git a/config.c b/config.c
14index e0eadb7..c23092f 100644 14index dbbf563..64e66f6 100644
15--- a/config.c 15--- a/config.c
16+++ b/config.c 16+++ b/config.c
17@@ -1515,15 +1515,6 @@ static int readConfigFile(const char *configFile, struct logInfo *defConfig) 17@@ -1493,15 +1493,6 @@ static int readConfigFile(const char *configFile, struct logInfo *defConfig)
18 dirName, strerror(errno)); 18 goto error;
19 goto error; 19 }
20 } 20 }
21- 21-
22- if (sb.st_dev != sb2.st_dev 22- if (sb.st_dev != sb2.st_dev
23- && !(newlog->flags & (LOG_FLAG_COPYTRUNCATE | LOG_FLAG_COPY))) { 23- && !(newlog->flags & (LOG_FLAG_COPYTRUNCATE | LOG_FLAG_COPY | LOG_FLAG_TMPFILENAME))) {
24- message(MESS_ERROR, 24- message(MESS_ERROR,
25- "%s:%d olddir %s and log file %s " 25- "%s:%d olddir %s and log file %s "
26- "are on different devices\n", configFile, 26- "are on different devices\n", configFile,
27- lineNum, newlog->oldDir, newlog->files[i]); 27- lineNum, newlog->oldDir, newlog->files[i]);
28- goto error; 28- goto error;
29- } 29- }
30 } 30 }
31 } 31 }
32 32
33--
341.7.9.5
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 @@
1Update the manual 1From e0b0fe30e9c49234994a20a86aacfaf80e690087 Mon Sep 17 00:00:00 2001
2From: Robert Yang <liezhi.yang@windriver.com>
3Date: Tue, 17 Feb 2015 21:14:37 -0800
4Subject: [PATCH] Update the manual
2 5
3Update the manual for rotating on different filesystems. 6Update the manual for rotating on different filesystems.
4 7
5Upstream-Status: Submitted 8Upstream-Status: Pending
6 9
7Signed-off-by: Robert Yang <liezhi.yang@windriver.com> 10Signed-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
12diff --git a/logrotate.8 b/logrotate.8 15diff --git a/logrotate.8 b/logrotate.8
13index 8b34167..5f15432 100644 16index 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--
311.7.4.1 371.7.9.5
32 38
diff --git a/meta/recipes-extended/logrotate/logrotate_3.8.8.bb b/meta/recipes-extended/logrotate/logrotate_3.9.1.bb
index e3cfa90ced..7d0a15961b 100644
--- a/meta/recipes-extended/logrotate/logrotate_3.8.8.bb
+++ b/meta/recipes-extended/logrotate/logrotate_3.9.1.bb
@@ -16,12 +16,12 @@ 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
19SRC_URI[md5sum] = "49846e873dddea15964cd0355b9943ca" 19SRC_URI[md5sum] = "4492b145b6d542e4a2f41e77fa199ab0"
20SRC_URI[sha256sum] = "46a1510ef4a1f4359edd5f361112cfd1523942e85ff28e6cbb0c81bad1829d0f" 20SRC_URI[sha256sum] = "022769e3288c80981559a8421703c88e8438b447235e36dd3c8e97cd94c52545"
21 21
22PACKAGECONFIG ?= "\ 22PACKAGECONFIG ?= "\
23 ${@base_contains('DISTRO_FEATURES', 'acl', 'acl', '', d)} \ 23 ${@bb.utils.contains('DISTRO_FEATURES', 'acl', 'acl', '', d)} \
24 ${@base_contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)} \ 24 ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)} \
25" 25"
26 26
27PACKAGECONFIG[acl] = ",,acl" 27PACKAGECONFIG[acl] = ",,acl"
@@ -35,13 +35,11 @@ CONFFILES_${PN} += "${localstatedir}/lib/logrotate.status \
35EXTRA_OEMAKE = "\ 35EXTRA_OEMAKE = "\
36 LFS= \ 36 LFS= \
37 OS_NAME='${OS_NAME}' \ 37 OS_NAME='${OS_NAME}' \
38 \
39 'CC=${CC}' \ 38 'CC=${CC}' \
40 'RPM_OPT_FLAGS=${CFLAGS}' \ 39 'RPM_OPT_FLAGS=${CFLAGS}' \
41 'EXTRA_LDFLAGS=${LDFLAGS}' \ 40 'EXTRA_LDFLAGS=${LDFLAGS}' \
42 \ 41 ${@bb.utils.contains('PACKAGECONFIG', 'acl', 'WITH_ACL=yes', '', d)} \
43 ${@base_contains('PACKAGECONFIG', 'acl', 'WITH_ACL=yes', '', d)} \ 42 ${@bb.utils.contains('PACKAGECONFIG', 'selinux', 'WITH_SELINUX=yes', '', d)} \
44 ${@base_contains('PACKAGECONFIG', 'selinux', 'WITH_SELINUX=yes', '', d)} \
45" 43"
46 44
47# OS_NAME in the makefile defaults to `uname -s`. The behavior for 45# OS_NAME in the makefile defaults to `uname -s`. The behavior for