Bug 681649

Summary: logrotate.status should not reside in /var/lib
Product: [Fedora] Fedora Reporter: William L. Thomson Jr. <wlt>
Component: logrotateAssignee: Jan Kaluža <jkaluza>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 1CC: jkaluza, kdudka, nimiux, tsmetana
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-05-29 09:53:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
statefile patch none

Description William L. Thomson Jr. 2011-03-02 20:25:22 UTC
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.

http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLIBVARIABLESTATEINFORMATION

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. [38]

[38] 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.

Comment 1 William L. Thomson Jr. 2011-03-03 21:04:01 UTC
Created attachment 482158 [details]
statefile patch

Comment 2 Jan Kaluža 2011-03-07 10:18:27 UTC
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.

Comment 3 William L. Thomson Jr. 2011-03-08 23:54:47 UTC
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.

Comment 4 Jan Kaluža 2011-03-09 08:26:58 UTC
Ah, I understand it now :). I though you filled it against Fedora as Fedora user.

Comment 5 William L. Thomson Jr. 2011-03-09 18:13:01 UTC
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 :)

Comment 6 Jan Kaluža 2013-05-29 09:53:21 UTC
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.

https://fedorahosted.org/logrotate/ticket/29