When upgrading from logrotate 3.8.7 to 3.9.1 a new patch
patches/logrotate-3.9.1/0001-deb-config-h.patch was introduced which
changed the paths to DEFAULT_MAIL_COMMAND and STATEFILE. The statefile
was created by logrotate in /var/lib before, now it expects
/var/lib/logrotate to be present. If the directory is missing, logrotate
fails with the following error:

    error: error creating state file /var/lib/logrotate/status: No such file or 
directory

So after upgrading to ptxdist 2015.07.0 (containing the above mentioned
upgrade) all calls to logrotate must have been failed. This can easily
be fixed by just creating the empty folder.

Note: users may have overridden the path to the state file by passing
another path together with the -s option of logrotate.

Fixes: 878707bd943a04fc8e3a55a151499359e81ce780
Signed-off-by: Alexander Dahl <a...@thorsis.com>
---
Meanwhile upstream moved to https://github.com/logrotate/logrotate and
published some new releases, maybe including changes to state file
handling. I'm afraid I have no time to investigate further, maybe
someone else wants to step in? O:-)

Greets
Alex
---
 rules/logrotate.make | 1 +
 1 file changed, 1 insertion(+)

diff --git a/rules/logrotate.make b/rules/logrotate.make
index e9dcaf9e5b..06f69d7206 100644
--- a/rules/logrotate.make
+++ b/rules/logrotate.make
@@ -52,6 +52,7 @@ $(STATEDIR)/logrotate.targetinstall:
 
        @$(call install_copy, logrotate, 0, 0, 0755, -, /usr/sbin/logrotate)
        @$(call install_alternative, logrotate, 0, 0, 0644, /etc/logrotate.conf)
+       @$(call install_copy, logrotate, 0, 0, 0755, /var/lib/logrotate)
 
 ifdef PTXCONF_LOGROTATE_SYSTEMD_UNIT
        @$(call install_alternative, logrotate, 0, 0, 0644, \
-- 
2.11.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

Reply via email to