diff options
Diffstat (limited to 'poky/meta/recipes-extended/logrotate')
-rw-r--r-- | poky/meta/recipes-extended/logrotate/logrotate_3.14.0.bb (renamed from poky/meta/recipes-extended/logrotate/logrotate_3.13.0.bb) | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/poky/meta/recipes-extended/logrotate/logrotate_3.13.0.bb b/poky/meta/recipes-extended/logrotate/logrotate_3.14.0.bb index 990cf9178..ccc68ad3a 100644 --- a/poky/meta/recipes-extended/logrotate/logrotate_3.13.0.bb +++ b/poky/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. @@ -60,22 +62,34 @@ SYSTEMD_SERVICE_${PN} = "\ ${BPN}.timer \ " +LOGROTATE_OPTIONS ?= "" + LOGROTATE_SYSTEMD_TIMER_BASIS ?= "daily" LOGROTATE_SYSTEMD_TIMER_ACCURACY ?= "12h" +LOGROTATE_SYSTEMD_TIMER_PERSISTENT ?= "true" do_install(){ oe_runmake install DESTDIR=${D} PREFIX=${D} MANDIR=${mandir} 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 install -d ${D}${systemd_system_unitdir} install -m 0644 ${S}/examples/logrotate.service ${D}${systemd_system_unitdir}/logrotate.service install -m 0644 ${S}/examples/logrotate.timer ${D}${systemd_system_unitdir}/logrotate.timer - sed -i -e 's,OnCalendar=.*$,OnCalendar=${LOGROTATE_SYSTEMD_TIMER_BASIS},g' ${D}${systemd_system_unitdir}/logrotate.timer - sed -i -e 's,AccuracySec=.*$,AccuracySec=${LOGROTATE_SYSTEMD_TIMER_ACCURACY},g' ${D}${systemd_system_unitdir}/logrotate.timer + [ -z "${LOGROTATE_OPTIONS}" ] || + sed -ri \ + -e 's|(ExecStart=.*/logrotate.*)$|\1 ${LOGROTATE_OPTIONS}|g' \ + ${D}${systemd_system_unitdir}/logrotate.service + sed -ri \ + -e 's|(OnCalendar=).*$|\1${LOGROTATE_SYSTEMD_TIMER_BASIS}|g' \ + -e 's|(AccuracySec=).*$|\1${LOGROTATE_SYSTEMD_TIMER_ACCURACY}|g' \ + -e 's|(Persistent=).*$|\1${LOGROTATE_SYSTEMD_TIMER_PERSISTENT}|g' \ + ${D}${systemd_system_unitdir}/logrotate.timer fi if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then |