[Fedora-packaging] Package ownership of local state files (/var/lib)?

Jonathan Underwood jonathan.underwood at gmail.com
Mon Jan 12 12:26:44 UTC 2009


Hi,

Firstly, apologies if this should be obvious or is documented
somewhere and I've missed it.

While in the process of updating the shorewall packages I noticed that
on package removal directories were being left behind in
/var/lib/shorewall because the directory contained some files created
at run time which were not owned by the package (even though the
directory itself is).

My first thought was the obvious fix of creating these files at
package build time (with touch) and using %ghost to own them. But then
I decided to see what other packages do, and chose samba at random,
figuring it's quite a mature package. With samba I see the same thing
- files in /var/lib/samba which are unowned and so wouldn't be removed
when removing the samba packages.

So, what is best practice? Should a package own all local state files
it creates in /var ? Or should it explicitly not own them so they are
left behind (a bit like log files in /var/log) ?


Cheers,
Jonathan.




More information about the Fedora-packaging mailing list