Red Hat Bugzilla – Bug 681649
logrotate.status should not reside in /var/lib
Last modified: 2017-08-04 03:54:24 EDT
logrotate uses a logrotate.status file that is created in /var/lib. Per FHS 2.3 that should exist in a subdir, if not one specific to logrotate, then /var/lib/misc.
An application (or a group of inter-related applications) must use a subdirectory of /var/lib for its data. There is one required subdirectory, /var/lib/misc, which is intended for state files that don't need a subdirectory; the other subdirectories should only be present if the application in question is included in the distribution. 
 An important difference between this version of this standard and previous ones is that applications are now required to use a subdirectory of /var/lib.
This causes problems on diskless systems with a shared /var/lib. Subdirs that contain unique per system data are not shared, and instead mounted on top of the shared /var/lib. I could do the same thing even for a single file, logrotate.status in this case. However given FHS, it should be written in a subdir. Which I can then make that unique per system, like other subdirs in /var/lib that are not shared amongst all diskless systems.
Created attachment 482158 [details]
Thanks for the patch. That's only first part I think. I think we will have to change spec file to migrate old logrotate.conf to the new location too. I will try to do it soon and push it into rawhide for testing.
You are welcome, and I kinda figured it was a partial minor patch. Just figured I would provide something, more than just a bug report. Not so concerned with seeing it in any RH release, more in the next version/release of logrotate package. Wasn't sure how to report bugs directly against that project and seemed this was the best means. This is mostly pertaining to a downstream bug/issue, adding that to this bug.
Ah, I understand it now :). I though you filled it against Fedora as Fedora user.
Yes sorry I did not mean to mislead. I wanted to file a new ticket in trac, https://fedorahosted.org/logrotate/. But there was no easy way to do that so it seems. I followed a trail and someone in a irc channel that managed fedorahosted suggested I file a bug here, so I did. It doesn't help that I used my personal email address. I have been waiting to rejoin gentoo as a developer again. Which will be taking place here in less than an hour, hopefully. I was mostly wanting to see it address in the next release of logrotate :)
I have created ticket on trac for this issue and I will probably fix it in upcoming upstream release. Since this bug is not against Fedora itself, but against logrotate upstream project, I'm closing this bugzilla.