diff options
| author | Yi Zhao <yi.zhao@windriver.com> | 2018-04-03 07:54:46 +0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-05-04 13:28:02 +0100 |
| commit | 602c7d65bb1d3f19b99b4f950442f298025f2104 (patch) | |
| tree | a449e273da7a4702aa3cb7a08c4faf246c1dffc8 | |
| parent | 7a4684c381772b9605111a96f4baf9e8974b1bd7 (diff) | |
| download | poky-602c7d65bb1d3f19b99b4f950442f298025f2104.tar.gz | |
logrotate: update to 3.14.0
Since the wtmp and btmp definitions had been moved from logrotate.conf
to logrotate.d in this release, we also need to install them to
/etc/logrotate.d/.
Also update oeqa runtime logrotate test case.
(From OE-Core rev: 5b4aedd6b18b6ba6ca1bcd460a0b51ced41656cd)
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/lib/oeqa/runtime/cases/logrotate.py | 4 | ||||
| -rw-r--r-- | meta/recipes-extended/logrotate/logrotate_3.14.0.bb (renamed from meta/recipes-extended/logrotate/logrotate_3.13.0.bb) | 10 |
2 files changed, 9 insertions, 5 deletions
diff --git a/meta/lib/oeqa/runtime/cases/logrotate.py b/meta/lib/oeqa/runtime/cases/logrotate.py index 992fef2989..db6e695eef 100644 --- a/meta/lib/oeqa/runtime/cases/logrotate.py +++ b/meta/lib/oeqa/runtime/cases/logrotate.py | |||
| @@ -21,9 +21,9 @@ class LogrotateTest(OERuntimeTestCase): | |||
| 21 | self.assertEqual(status, 0, msg = msg) | 21 | self.assertEqual(status, 0, msg = msg) |
| 22 | 22 | ||
| 23 | cmd = ('sed -i "s#wtmp {#wtmp {\\n olddir $HOME/logrotate_dir#"' | 23 | cmd = ('sed -i "s#wtmp {#wtmp {\\n olddir $HOME/logrotate_dir#"' |
| 24 | ' /etc/logrotate.conf') | 24 | ' /etc/logrotate.d/wtmp') |
| 25 | status, output = self.target.run(cmd) | 25 | status, output = self.target.run(cmd) |
| 26 | msg = ('Could not write to logrotate.conf file. Status and output: ' | 26 | msg = ('Could not write to logrotate.d/wtmp file. Status and output: ' |
| 27 | ' %s and %s' % (status, output)) | 27 | ' %s and %s' % (status, output)) |
| 28 | self.assertEqual(status, 0, msg = msg) | 28 | self.assertEqual(status, 0, msg = msg) |
| 29 | 29 | ||
diff --git a/meta/recipes-extended/logrotate/logrotate_3.13.0.bb b/meta/recipes-extended/logrotate/logrotate_3.14.0.bb index 990cf9178b..d48539f84f 100644 --- a/meta/recipes-extended/logrotate/logrotate_3.13.0.bb +++ b/meta/recipes-extended/logrotate/logrotate_3.14.0.bb | |||
| @@ -25,8 +25,8 @@ SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BP}.tar.xz | |||
| 25 | file://disable-check-different-filesystems.patch \ | 25 | file://disable-check-different-filesystems.patch \ |
| 26 | " | 26 | " |
| 27 | 27 | ||
| 28 | SRC_URI[md5sum] = "78ef24d6fddcc4df8e412dd75c551b4c" | 28 | SRC_URI[md5sum] = "1c0f6e6e490c4bcac0a1e77ad1310683" |
| 29 | SRC_URI[sha256sum] = "3222ca032f99be8d7a4a8c6ad69f3dcc49b9511bfe384bd5a271ebcd9bd3e52c" | 29 | SRC_URI[sha256sum] = "4703bdc0e2df3b322f9dff0aafc99aa9172c9e4acae28b7c924cc7d4e5b29d55" |
| 30 | 30 | ||
| 31 | PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'acl selinux', d)}" | 31 | PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'acl selinux', d)}" |
| 32 | 32 | ||
| @@ -34,7 +34,9 @@ PACKAGECONFIG[acl] = ",,acl" | |||
| 34 | PACKAGECONFIG[selinux] = ",,libselinux" | 34 | PACKAGECONFIG[selinux] = ",,libselinux" |
| 35 | 35 | ||
| 36 | CONFFILES_${PN} += "${localstatedir}/lib/logrotate.status \ | 36 | CONFFILES_${PN} += "${localstatedir}/lib/logrotate.status \ |
| 37 | ${sysconfdir}/logrotate.conf" | 37 | ${sysconfdir}/logrotate.conf \ |
| 38 | ${sysconfdir}/logrotate.d/btmp \ | ||
| 39 | ${sysconfdir}/logrotate.d/wtmp" | ||
| 38 | 40 | ||
| 39 | # If RPM_OPT_FLAGS is unset, it adds -g itself rather than obeying our | 41 | # If RPM_OPT_FLAGS is unset, it adds -g itself rather than obeying our |
| 40 | # optimization variables, so use it rather than EXTRA_CFLAGS. | 42 | # optimization variables, so use it rather than EXTRA_CFLAGS. |
| @@ -68,6 +70,8 @@ do_install(){ | |||
| 68 | mkdir -p ${D}${sysconfdir}/logrotate.d | 70 | mkdir -p ${D}${sysconfdir}/logrotate.d |
| 69 | mkdir -p ${D}${localstatedir}/lib | 71 | mkdir -p ${D}${localstatedir}/lib |
| 70 | install -p -m 644 ${S}/examples/logrotate-default ${D}${sysconfdir}/logrotate.conf | 72 | install -p -m 644 ${S}/examples/logrotate-default ${D}${sysconfdir}/logrotate.conf |
| 73 | install -p -m 644 ${S}/examples/btmp ${D}${sysconfdir}/logrotate.d/btmp | ||
| 74 | install -p -m 644 ${S}/examples/wtmp ${D}${sysconfdir}/logrotate.d/wtmp | ||
| 71 | touch ${D}${localstatedir}/lib/logrotate.status | 75 | touch ${D}${localstatedir}/lib/logrotate.status |
| 72 | 76 | ||
| 73 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | 77 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then |
