Filed with upstream, but can address on Gentoo till they get around to it. Please see upstream bug for details and patch.
There's going to be a whole lot of changes (possibly a new release?) soon, so I'd prefer to wait for that to avoid an extra bump.
Sure no rush, just not sure how fast upstream will respond and its pretty minor change. When ever you get around to doing a new release or what ever, if upstream hasn't acted, would be great if you could slip the minor change in there. I can work around it in the mean time. It is not a major issue.
Looks like upstream is moving on this, so I wouldn't worry about it directly. I will close this bug when upstream addresses the issue in a new release of logrotate. Just using this for tracking purposes.
Taken maintainership of package
Over 6 years later, I think the patch should be applied.... https://bugzilla.redhat.com/attachment.cgi?id=482158
Thanks for reminding this. The ticket got lost. Filing new issue at current upstream: https://github.com/logrotate/logrotate/issues/136
No problem I did not realize it went to github. I will see about filing a PR. Thanks for the issue there. I added myself to notifications to follow that as well.
Looks like this has been addressed and is now a configure option so 100% Gentoo specific. Need to see about setting --with-state-file-path. I guess it would go in some subdir of /var/lib. I will leave that up to you to decide. I do not think location matters all that much. I cannot recall why I even opened this issue. Must have effected me somehow :)
I agree with you. Taking a look at /var/lib directory, logrotate.status should reside in a proper directory (misc is ok for me) I've pushed this change to the last (unstable version) =app-admin/logrotate-3.12.3 https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=74a6a06fa5fecb0b403bfbce3f0318a19eb92b26 Works fine here, please test and reopen if necessary. Thanks a bunch!
/var/lib/misc doesn't exist. logrotate now will fail with: error: error creating state file /var/lib/misc/logrotate.status: No such file or directory error: error opening /var/lib/misc/logrotate.status: No such file or directory app-admin/logrotate-3.12.3-r1
(In reply to Arthur Țițeică from comment #10) > /var/lib/misc doesn't exist. > ... > app-admin/logrotate-3.12.3-r1 /var/lib/misc gets created by /etc/init.d/bootmisc script at boottime. Can you check if this is script is running? Thanks.
I'm on systemd. Maybe this needs an entry in '/usr/lib/tmpfiles.d/'.
Fixed in app-admin/logrotate-3.12.3-r2. Please test.
Looks fine to me. On a running system one needs to manually run systemd-tmpfiles --create /usr/lib/tmpfiles.d/logrotate.conf I'm not sure if this needs a post-install message or not. I haven't seen any other packages doing this but it's causing problems at times.
Message added. Thanks.
I'm getting "denied" events in the audit log because now logrotate is putting the status file in /var/log/misc/ but the policy still has it in /var/lib/. /var/lib/logrotate(/.*)? system_u:object_r:logrotate_var_lib_t /var/lib/logrotate\.status -- system_u:object_r:logrotate_var_lib_t app-admin/logrotate-3.13.0 sec-policy/selinux-logrotate-2.20180114-r1
I submitted bug 648844 against SElinux to get the policy updated.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f30f1d471181f5b487dda53ac4d112cf56627060 commit f30f1d471181f5b487dda53ac4d112cf56627060 Author: Georgy Yakovlev <gyakovlev@gentoo.org> AuthorDate: 2021-07-30 08:33:46 +0000 Commit: Georgy Yakovlev <gyakovlev@gentoo.org> CommitDate: 2021-07-30 08:34:54 +0000 app-admin/logrotate: call tmpfiles_process instead of printing message on openrc systems that directory already created by bootmisc Bug: https://bugs.gentoo.org/357275 Bug: https://bugs.gentoo.org/803458 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org> app-admin/logrotate/logrotate-3.18.1.ebuild | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)