On Tue, Nov 23, 2010 at 09:48:30PM +0100, Lennart Poettering wrote: > I hereby want to let everybody know that in the next days I will turn > on > /var/run and /var/lock on tmpfs on Rawhide/F15. This is in accordance > with the following accepted F15 feature: >â > https://fedoraproject.org/wiki/Features/var-run-tmpfs 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. > 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. > On /etc/tmpfiles.d: > > This is a new feature of systemd, but which is apparently very much > liked by people outside of systemd, so this might actually find adoption > even on systems which will not adopt systemd any time soon, since it > actually is not specific at all to systemd. By dropping a simple > configuration file in /etc/tmpfiles.d you can ensure that volatile files > and directories are: a) created, deleted or emptied at boot b) their > permissions/ownership fixed c) its directory contents cleaned up in > regular intervals (a la tmpwatch) and d) it is properly relabeled at > boot. > > As an example, here's how such a file might look like for the screen package > (name it /etc/tmpfiles.d/screen.conf): > > <snip> > d /var/run/screens 1777 root root 10d > d /var/run/uscreens 0755 root root 10d12h > </snip> > > This encodes that two directories are created under the listed names, with > automatic clean up after 10 days resp. 10 days and 12h. Removing /var/run/screens after 10 days sounds wrong. Even removing the sockets inside /var/run/screens sounds wrong. Is this just a bad example am I not understanding the age means. > 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? 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? Regards Till
Attachment:
pgpbqp2N8XKKc.pgp
Description: PGP signature
-- devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/devel