[OE-core] [PATCH V2] logrotate: update to 3.14.0
Yi Zhao
yi.zhao at windriver.com
Mon Apr 2 23:54:46 UTC 2018
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.
Signed-off-by: Yi Zhao <yi.zhao at windriver.com>
---
meta/lib/oeqa/runtime/cases/logrotate.py | 4 ++--
.../logrotate/{logrotate_3.13.0.bb => logrotate_3.14.0.bb} | 10 +++++++---
2 files changed, 9 insertions(+), 5 deletions(-)
rename meta/recipes-extended/logrotate/{logrotate_3.13.0.bb => logrotate_3.14.0.bb} (88%)
diff --git a/meta/lib/oeqa/runtime/cases/logrotate.py b/meta/lib/oeqa/runtime/cases/logrotate.py
index 992fef2..db6e695 100644
--- a/meta/lib/oeqa/runtime/cases/logrotate.py
+++ b/meta/lib/oeqa/runtime/cases/logrotate.py
@@ -21,9 +21,9 @@ class LogrotateTest(OERuntimeTestCase):
self.assertEqual(status, 0, msg = msg)
cmd = ('sed -i "s#wtmp {#wtmp {\\n olddir $HOME/logrotate_dir#"'
- ' /etc/logrotate.conf')
+ ' /etc/logrotate.d/wtmp')
status, output = self.target.run(cmd)
- msg = ('Could not write to logrotate.conf file. Status and output: '
+ msg = ('Could not write to logrotate.d/wtmp file. Status and output: '
' %s and %s' % (status, output))
self.assertEqual(status, 0, msg = msg)
diff --git a/meta/recipes-extended/logrotate/logrotate_3.13.0.bb b/meta/recipes-extended/logrotate/logrotate_3.14.0.bb
similarity index 88%
rename from meta/recipes-extended/logrotate/logrotate_3.13.0.bb
rename to meta/recipes-extended/logrotate/logrotate_3.14.0.bb
index 990cf91..d48539f 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
file://disable-check-different-filesystems.patch \
"
-SRC_URI[md5sum] = "78ef24d6fddcc4df8e412dd75c551b4c"
-SRC_URI[sha256sum] = "3222ca032f99be8d7a4a8c6ad69f3dcc49b9511bfe384bd5a271ebcd9bd3e52c"
+SRC_URI[md5sum] = "1c0f6e6e490c4bcac0a1e77ad1310683"
+SRC_URI[sha256sum] = "4703bdc0e2df3b322f9dff0aafc99aa9172c9e4acae28b7c924cc7d4e5b29d55"
PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'acl selinux', d)}"
@@ -34,7 +34,9 @@ PACKAGECONFIG[acl] = ",,acl"
PACKAGECONFIG[selinux] = ",,libselinux"
CONFFILES_${PN} += "${localstatedir}/lib/logrotate.status \
- ${sysconfdir}/logrotate.conf"
+ ${sysconfdir}/logrotate.conf \
+ ${sysconfdir}/logrotate.d/btmp \
+ ${sysconfdir}/logrotate.d/wtmp"
# If RPM_OPT_FLAGS is unset, it adds -g itself rather than obeying our
# optimization variables, so use it rather than EXTRA_CFLAGS.
@@ -68,6 +70,8 @@ do_install(){
mkdir -p ${D}${sysconfdir}/logrotate.d
mkdir -p ${D}${localstatedir}/lib
install -p -m 644 ${S}/examples/logrotate-default ${D}${sysconfdir}/logrotate.conf
+ install -p -m 644 ${S}/examples/btmp ${D}${sysconfdir}/logrotate.d/btmp
+ install -p -m 644 ${S}/examples/wtmp ${D}${sysconfdir}/logrotate.d/wtmp
touch ${D}${localstatedir}/lib/logrotate.status
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
--
2.7.4
More information about the Openembedded-core
mailing list