[HEADS-UP] Moving /var/run and /var/lock to tmpfs in Rawhide

Toshio Kuratomi a.badger at gmail.com
Wed Nov 24 11:02:31 UTC 2010


On Wed, Nov 24, 2010 at 12:01:45AM +0100, Lennart Poettering wrote:
> On Tue, 23.11.10 23:02, Till Maas (opensource at till.name) wrote:
> 
> > The release notes section contains this:
> > | /var/run and /var/lock are now mounted from tmpfs, and hence emptied on
> > | reboot. Applications must ensure to recreate their own files/dirs on
> > | startup, and cannot rely that doing this at package installtion will
> > | suffice
> > 
> > But this does not mention tmpfiles.d which you wrote can be used instead
> > of creating files or dirs on startup.
> 
> Added a comment about this now.
> 
> > >  c) YOU need to edit your .spec file and place a %ghost where
> > >  appropriate.
> > > 
> > >  c) YOU need to test if you package still works, and if necessary file
> > >  AVC bugs, add an /etc/tmpfiles.d drop-in file to your program, or patch
> > >  it so that it is able to recreate these directories beneath /var/run on
> > >  its own.
> > 
> > Imho there should be a packaging guideline to make it clear what needs
> > to be done in which cases. E.g. when to %ghost files and when not.
> 
> I guess extending the guidelines with a line or two about this is a good idea.
> 
I see you've already filed some bugs but in the future it would be best to
get the packaging guidelines worked out before you do that.  Most notably
because it seems like you're going to have to now file an update to all of
those bugs due to:
> 
> > > For more details consult the man page:
> > > 
> > > http://0pointer.de/public/systemd-man/tmpfiles.d.html
> > 
> > Here it says:
> > | If a file or directory is older than the current time minus the age
> > | field it is deleted.
> > 
> > And when are the files and dirs created? Only when the system is
> > booted?
> 
> Yes.
> 
> > But then after installing an package that requires files to be created
> > by tmpfiles.d the system needs to be rebooted before it can be used. Or
> > will rpm call something that parses the appropriate tmpfiles.d file when
> > the package is installed / updated?
> 
> Hmm, it has been suggested that we should make it possible to create
> these dirs in the .spec files by invoking the systemd-tmpfiles tool
> directly from the scriptlets. I guess we should add a nice interface for
> that. In the meantime it should be sufficient to simply place th right
> "mkdir -p -m ..." in the scriptlet. Of course it would be desirable if
> we have a single place where the dirs to create are encoded.
>
A question I'd have when looking over a proposed packaging guideline would
be: why %ghost the directories?  Why not include the directories as normal
but add the tmpfiles.d step in addition?

-Toshio
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
Url : http://lists.fedoraproject.org/pipermail/devel/attachments/20101124/0d32deb9/attachment-0001.bin 


More information about the devel mailing list