On Wed, 24 Nov 2010, Toshio Kuratomi wrote:
>> 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?
So with all of this, as a package maintainer, I will have to make sure the
dirs exist in the init scripts anyway. In which case one can wonder why
bothering with tmpfiles.d files (or %ghost). Just to cleanup a volatile directory in
case a package is uninstalled after start?
Paul