diff options
author | Romain Perier <romain.perier@collabora.com> | 2017-07-11 08:46:05 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-07-21 22:51:37 +0100 |
commit | 98d3a094d0d474303c3096d4c5d6223b7d5d7c3d (patch) | |
tree | 3b31fa83fdbd6b079cfd35547c5d79a0679e2a53 /meta/recipes-extended | |
parent | c2318ef416e13c3eaae14f395153ad97491a06bf (diff) | |
download | poky-98d3a094d0d474303c3096d4c5d6223b7d5d7c3d.tar.gz |
logrotate: Bump to 3.12.3
This commit updates the recipe to the last upstream tag. Then, as the
tarball no longer contains the pre-generated Makefile, inherit from
autotools
(From OE-Core rev: 72490b7a327867872987e63d340051c4980044b2)
Signed-off-by: Romain Perier <romain.perier@collabora.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r-- | meta/recipes-extended/logrotate/logrotate/0001-Support-system-dates-back-to-the-year-1970.patch | 27 | ||||
-rw-r--r-- | meta/recipes-extended/logrotate/logrotate/act-as-mv-when-rotate.patch | 32 | ||||
-rw-r--r-- | meta/recipes-extended/logrotate/logrotate/update-the-manual.patch | 16 | ||||
-rw-r--r-- | meta/recipes-extended/logrotate/logrotate_3.12.3.bb (renamed from meta/recipes-extended/logrotate/logrotate_3.9.1.bb) | 27 |
4 files changed, 37 insertions, 65 deletions
diff --git a/meta/recipes-extended/logrotate/logrotate/0001-Support-system-dates-back-to-the-year-1970.patch b/meta/recipes-extended/logrotate/logrotate/0001-Support-system-dates-back-to-the-year-1970.patch deleted file mode 100644 index b544ec6661..0000000000 --- a/meta/recipes-extended/logrotate/logrotate/0001-Support-system-dates-back-to-the-year-1970.patch +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | Support system dates back to the year 1970 | ||
2 | |||
3 | The system time on Linux can be set back as far as 1970 (the epoch time). | ||
4 | Currently logrotate stops working correctly if the time goes before 1996. | ||
5 | This value (1996) appears to have been hard coded since the code was written | ||
6 | back in 1996. Testing and code analysis shows this can simply be modified | ||
7 | to 1970. | ||
8 | |||
9 | The patch is provided by Matt Bennett <matt.bennett@alliedtelesis.co.nz> | ||
10 | |||
11 | Upstream-Status: Backport + | ||
12 | Signed-off-by: Zhenbo Gao <zhenbo.gao@windriver.com> | ||
13 | |||
14 | diff --git a/logrotate.c.orig b/logrotate.c | ||
15 | index cf8bf2c..a7dadfb 100644 | ||
16 | --- a/logrotate.c.orig | ||
17 | +++ b/logrotate.c | ||
18 | @@ -2381,7 +2381,7 @@ static int readState(char *stateFilename) | ||
19 | } | ||
20 | |||
21 | /* Hack to hide earlier bug */ | ||
22 | - if ((year != 1900) && (year < 1996 || year > 2100)) { | ||
23 | + if ((year != 1900) && (year < 1970 || year > 2100)) { | ||
24 | message(MESS_ERROR, | ||
25 | "bad year %d for file %s in state file %s\n", year, | ||
26 | argv[0], stateFilename); | ||
27 | |||
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 2e931a2876..04cb588db1 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,4 +1,4 @@ | |||
1 | From 68f29ab490cf987aa34b5f4caf1784b58a021308 Mon Sep 17 00:00:00 2001 | 1 | From 517cbff66c8bdbf455bc3b7c1a85a4f990d0f9a6 Mon Sep 17 00:00:00 2001 |
2 | From: Robert Yang <liezhi.yang@windriver.com> | 2 | From: Robert Yang <liezhi.yang@windriver.com> |
3 | Date: Tue, 17 Feb 2015 21:08:07 -0800 | 3 | Date: Tue, 17 Feb 2015 21:08:07 -0800 |
4 | Subject: [PATCH] Act as the "mv" command when rotate log | 4 | Subject: [PATCH] Act as the "mv" command when rotate log |
@@ -10,14 +10,14 @@ Upstream-Status: Pending | |||
10 | 10 | ||
11 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | 11 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> |
12 | --- | 12 | --- |
13 | logrotate.c | 71 +++++++++++++++++++++++++++++++++++++++++++++++++---------- | 13 | logrotate.c | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++----------- |
14 | 1 file changed, 59 insertions(+), 12 deletions(-) | 14 | 1 file changed, 60 insertions(+), 12 deletions(-) |
15 | 15 | ||
16 | diff --git a/logrotate.c b/logrotate.c | 16 | diff --git a/logrotate.c b/logrotate.c |
17 | index d3deb6a..cf8bf2c 100644 | 17 | index 4ad58d4..ba05884 100644 |
18 | --- a/logrotate.c | 18 | --- a/logrotate.c |
19 | +++ b/logrotate.c | 19 | +++ b/logrotate.c |
20 | @@ -1157,6 +1157,53 @@ int findNeedRotating(struct logInfo *log, int logNum, int force) | 20 | @@ -1315,6 +1315,54 @@ static int findNeedRotating(struct logInfo *log, int logNum, int force) |
21 | return 0; | 21 | return 0; |
22 | } | 22 | } |
23 | 23 | ||
@@ -68,10 +68,11 @@ index d3deb6a..cf8bf2c 100644 | |||
68 | + return 1; | 68 | + return 1; |
69 | +} | 69 | +} |
70 | + | 70 | + |
71 | int prerotateSingleLog(struct logInfo *log, int logNum, struct logState *state, | 71 | + |
72 | struct logNames *rotNames) | 72 | static int prerotateSingleLog(struct logInfo *log, int logNum, |
73 | struct logState *state, struct logNames *rotNames) | ||
73 | { | 74 | { |
74 | @@ -1523,15 +1570,15 @@ int prerotateSingleLog(struct logInfo *log, int logNum, struct logState *state, | 75 | @@ -1674,15 +1722,15 @@ static int prerotateSingleLog(struct logInfo *log, int logNum, |
75 | } | 76 | } |
76 | 77 | ||
77 | message(MESS_DEBUG, | 78 | message(MESS_DEBUG, |
@@ -90,7 +91,7 @@ index d3deb6a..cf8bf2c 100644 | |||
90 | oldName, newName, strerror(errno)); | 91 | oldName, newName, strerror(errno)); |
91 | hasErrors = 1; | 92 | hasErrors = 1; |
92 | } | 93 | } |
93 | @@ -1669,21 +1716,21 @@ int rotateSingleLog(struct logInfo *log, int logNum, struct logState *state, | 94 | @@ -1767,21 +1815,21 @@ static int rotateSingleLog(struct logInfo *log, int logNum, |
94 | return 1; | 95 | return 1; |
95 | } | 96 | } |
96 | 97 | ||
@@ -115,19 +116,19 @@ index d3deb6a..cf8bf2c 100644 | |||
115 | - message(MESS_ERROR, "failed to rename %s to %s: %s\n", | 116 | - message(MESS_ERROR, "failed to rename %s to %s: %s\n", |
116 | + mvFile(log->files[logNum], rotNames->finalName, log, prev_acl)) { | 117 | + mvFile(log->files[logNum], rotNames->finalName, log, prev_acl)) { |
117 | + message(MESS_ERROR, "failed to move %s to %s: %s\n", | 118 | + message(MESS_ERROR, "failed to move %s to %s: %s\n", |
118 | log->files[logNum], tmpFilename, | 119 | log->files[logNum], rotNames->finalName, |
119 | strerror(errno)); | 120 | strerror(errno)); |
120 | hasErrors = 1; | 121 | hasErrors = 1; |
121 | @@ -2063,7 +2110,7 @@ int rotateLogSet(struct logInfo *log, int force) | 122 | @@ -2170,7 +2218,7 @@ static int rotateLogSet(struct logInfo *log, int force) |
122 | return hasErrors; | 123 | return hasErrors; |
123 | } | 124 | } |
124 | 125 | ||
125 | -static int writeState(char *stateFilename) | 126 | -static int writeState(const char *stateFilename) |
126 | +static int writeState(struct logInfo *log, char *stateFilename) | 127 | +static int writeState(struct logInfo *log, char *stateFilename) |
127 | { | 128 | { |
128 | struct logState *p; | 129 | struct logState *p; |
129 | FILE *f; | 130 | FILE *f; |
130 | @@ -2227,7 +2274,7 @@ static int writeState(char *stateFilename) | 131 | @@ -2322,7 +2370,7 @@ static int writeState(const char *stateFilename) |
131 | fclose(f); | 132 | fclose(f); |
132 | 133 | ||
133 | if (error == 0) { | 134 | if (error == 0) { |
@@ -136,7 +137,7 @@ index d3deb6a..cf8bf2c 100644 | |||
136 | unlink(tmpFilename); | 137 | unlink(tmpFilename); |
137 | error = 1; | 138 | error = 1; |
138 | message(MESS_ERROR, "error renaming temp state file %s\n", | 139 | message(MESS_ERROR, "error renaming temp state file %s\n", |
139 | @@ -2525,7 +2572,7 @@ int main(int argc, const char **argv) | 140 | @@ -2648,7 +2696,7 @@ int main(int argc, const char **argv) |
140 | rc |= rotateLogSet(log, force); | 141 | rc |= rotateLogSet(log, force); |
141 | 142 | ||
142 | if (!debug) | 143 | if (!debug) |
@@ -145,3 +146,6 @@ index d3deb6a..cf8bf2c 100644 | |||
145 | 146 | ||
146 | return (rc != 0); | 147 | return (rc != 0); |
147 | } | 148 | } |
149 | -- | ||
150 | 1.8.3.1 | ||
151 | |||
diff --git a/meta/recipes-extended/logrotate/logrotate/update-the-manual.patch b/meta/recipes-extended/logrotate/logrotate/update-the-manual.patch index 50d037d5a1..725567e0c9 100644 --- a/meta/recipes-extended/logrotate/logrotate/update-the-manual.patch +++ b/meta/recipes-extended/logrotate/logrotate/update-the-manual.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From e0b0fe30e9c49234994a20a86aacfaf80e690087 Mon Sep 17 00:00:00 2001 | 1 | From bf22e8805df69344f6f20cea390e829a22fa741b Mon Sep 17 00:00:00 2001 |
2 | From: Robert Yang <liezhi.yang@windriver.com> | 2 | From: Robert Yang <liezhi.yang@windriver.com> |
3 | Date: Tue, 17 Feb 2015 21:14:37 -0800 | 3 | Date: Tue, 17 Feb 2015 21:14:37 -0800 |
4 | Subject: [PATCH] Update the manual | 4 | Subject: [PATCH] Update the manual |
@@ -9,14 +9,14 @@ Upstream-Status: Pending | |||
9 | 9 | ||
10 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | 10 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> |
11 | --- | 11 | --- |
12 | logrotate.8 | 10 ++++------ | 12 | logrotate.8.in | 10 ++++------ |
13 | 1 file changed, 4 insertions(+), 6 deletions(-) | 13 | 1 file changed, 4 insertions(+), 6 deletions(-) |
14 | 14 | ||
15 | diff --git a/logrotate.8 b/logrotate.8 | 15 | diff --git a/logrotate.8.in b/logrotate.8.in |
16 | index e4e5f48..84407d0 100644 | 16 | index 951e406..581bf48 100644 |
17 | --- a/logrotate.8 | 17 | --- a/logrotate.8.in |
18 | +++ b/logrotate.8 | 18 | +++ b/logrotate.8.in |
19 | @@ -405,12 +405,10 @@ Do not rotate the log if it is empty (this overrides the \fBifempty\fR option). | 19 | @@ -445,12 +445,10 @@ Do not rotate the log if it is empty (this overrides the \fBifempty\fR option). |
20 | 20 | ||
21 | .TP | 21 | .TP |
22 | \fBolddir \fIdirectory\fR | 22 | \fBolddir \fIdirectory\fR |
@@ -34,5 +34,5 @@ index e4e5f48..84407d0 100644 | |||
34 | 34 | ||
35 | .TP | 35 | .TP |
36 | -- | 36 | -- |
37 | 1.7.9.5 | 37 | 1.8.3.1 |
38 | 38 | ||
diff --git a/meta/recipes-extended/logrotate/logrotate_3.9.1.bb b/meta/recipes-extended/logrotate/logrotate_3.12.3.bb index 7c732122ba..2033be1e2d 100644 --- a/meta/recipes-extended/logrotate/logrotate_3.9.1.bb +++ b/meta/recipes-extended/logrotate/logrotate_3.12.3.bb | |||
@@ -3,32 +3,30 @@ SECTION = "console/utils" | |||
3 | HOMEPAGE = "https://github.com/logrotate/logrotate/issues" | 3 | HOMEPAGE = "https://github.com/logrotate/logrotate/issues" |
4 | LICENSE = "GPLv2" | 4 | LICENSE = "GPLv2" |
5 | 5 | ||
6 | # TODO: logrotate 3.8.8 adds autotools/automake support, update recipe to use it. | ||
7 | # TODO: Document coreutils dependency. Why not RDEPENDS? Why not busybox? | 6 | # TODO: Document coreutils dependency. Why not RDEPENDS? Why not busybox? |
8 | 7 | ||
9 | DEPENDS="coreutils popt" | 8 | DEPENDS="coreutils popt" |
10 | 9 | ||
11 | LIC_FILES_CHKSUM = "file://COPYING;md5=18810669f13b87348459e611d31ab760" | 10 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" |
12 | 11 | ||
13 | # When updating logrotate to latest upstream, SRC_URI should point to | 12 | # When updating logrotate to latest upstream, SRC_URI should point to |
14 | # a proper release tarball from https://github.com/logrotate/logrotate/releases | 13 | # a proper release tarball from https://github.com/logrotate/logrotate/releases |
15 | # and we have to take the snapshot for now because there is no such | 14 | # and we have to take the snapshot for now because there is no such |
16 | # tarball available for 3.9.1. | 15 | # tarball available for 3.9.1. |
17 | 16 | ||
18 | S = "${WORKDIR}/${BPN}-r3-9-1" | 17 | S = "${WORKDIR}/${BPN}-${PV}" |
19 | 18 | ||
20 | UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/releases" | 19 | UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/releases" |
21 | UPSTREAM_CHECK_REGEX = "logrotate-(?P<pver>\d+(\.\d+)+).tar" | 20 | UPSTREAM_CHECK_REGEX = "logrotate-(?P<pver>\d+(\.\d+)+).tar" |
22 | 21 | ||
23 | SRC_URI = "https://github.com/${BPN}/${BPN}/archive/r3-9-1.tar.gz \ | 22 | SRC_URI = "https://github.com/${BPN}/${BPN}/archive/${PV}.tar.gz \ |
24 | file://act-as-mv-when-rotate.patch \ | 23 | file://act-as-mv-when-rotate.patch \ |
25 | file://update-the-manual.patch \ | 24 | file://update-the-manual.patch \ |
26 | file://disable-check-different-filesystems.patch \ | 25 | file://disable-check-different-filesystems.patch \ |
27 | file://0001-Support-system-dates-back-to-the-year-1970.patch \ | ||
28 | " | 26 | " |
29 | 27 | ||
30 | SRC_URI[md5sum] = "8572b7c2cf9ade09a8a8e10098500fb3" | 28 | SRC_URI[md5sum] = "d1c41bdf63b9993c8e4e8b48a7bd5b8b" |
31 | SRC_URI[sha256sum] = "5bf8e478c428e7744fefa465118f8296e7e771c981fb6dffb7527856a0ea3617" | 29 | SRC_URI[sha256sum] = "683ccb7fff74082471aa6bd9e962ae7a3f4d55eea7df41fd97aa12ec6f55e657" |
32 | 30 | ||
33 | PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'acl selinux', d)}" | 31 | PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'acl selinux', d)}" |
34 | 32 | ||
@@ -55,17 +53,14 @@ EXTRA_OEMAKE = "\ | |||
55 | # INSTALL=install and BASEDIR=/usr. | 53 | # INSTALL=install and BASEDIR=/usr. |
56 | OS_NAME = "Linux" | 54 | OS_NAME = "Linux" |
57 | 55 | ||
58 | do_compile_prepend() { | 56 | inherit autotools |
59 | # Make sure the recompile is OK | ||
60 | rm -f ${B}/.depend | ||
61 | } | ||
62 | 57 | ||
63 | do_install(){ | 58 | do_install(){ |
64 | oe_runmake install DESTDIR=${D} PREFIX=${D} MANDIR=${mandir} | 59 | oe_runmake install DESTDIR=${D} PREFIX=${D} MANDIR=${mandir} |
65 | mkdir -p ${D}${sysconfdir}/logrotate.d | 60 | mkdir -p ${D}${sysconfdir}/logrotate.d |
66 | mkdir -p ${D}${sysconfdir}/cron.daily | 61 | mkdir -p ${D}${sysconfdir}/cron.daily |
67 | mkdir -p ${D}${localstatedir}/lib | 62 | mkdir -p ${D}${localstatedir}/lib |
68 | install -p -m 644 examples/logrotate-default ${D}${sysconfdir}/logrotate.conf | 63 | install -p -m 644 ${S}/examples/logrotate-default ${D}${sysconfdir}/logrotate.conf |
69 | install -p -m 755 examples/logrotate.cron ${D}${sysconfdir}/cron.daily/logrotate | 64 | install -p -m 755 ${S}/examples/logrotate.cron ${D}${sysconfdir}/cron.daily/logrotate |
70 | touch ${D}${localstatedir}/lib/logrotate.status | 65 | touch ${D}${localstatedir}/lib/logrotate.status |
71 | } | 66 | } |