From: Alexander Dahl <ada@thorsis.com>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH] logrotate: Create directory for state file
Date: Tue, 6 Feb 2018 14:29:20 +0100 [thread overview]
Message-ID: <20180206132920.23639-1-ada@thorsis.com> (raw)
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 <ada@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 other threads:[~2018-02-06 13:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180206132920.23639-1-ada@thorsis.com \
--to=ada@thorsis.com \
--cc=ptxdist@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox