Hallo,
I have implement the creation of the /var/run/news directory in the inn package via tmpfiles.d.
But It's seems, that the directory will not created directly after the package was installed. so I have add the line
systemd-tmpfiles --create %{_sysconfdir}/tmpfiles/inn.conf
on the %post stanza.
I have look on
to be sure to confim with the packaging guidelines. Unfortunately, I could not found any information to this related topic.
So I would like to ask for the opinion of other people on this list.
Best Regards:
Jochen Schmitt
Jochen Schmitt Jochen@herr-schmitt.de writes:
I have implement the creation of the /var/run/news directory in the inn package via tmpfiles.d.
But It's seems, that the directory will not created directly after the package was installed. so I have add the line systemd-tmpfiles --create %{_sysconfdir}/tmpfiles/inn.conf on the %post stanza.
That's not the way to do it. You should create the directory via the normal RPM methods for including a directory --- that is, make the directory in the install root and include it in the %files list.
What tmpfiles.d is for is to cause such directories to be recreated after a system reboot.
Yes, it's an ugly kluge. I don't know why tmpfiles.d needs its own configuration instead of just looking at the RPM metadata. But hey, making extra work for packagers is standard practice ...
regards, tom lane
On 05/10/2011 19:02, Tom Lane wrote:
Jochen SchmittJochen@herr-schmitt.de writes:
I have implement the creation of the /var/run/news directory in the inn package via tmpfiles.d.
But It's seems, that the directory will not created directly after the package was installed. so I have add the line systemd-tmpfiles --create %{_sysconfdir}/tmpfiles/inn.conf on the %post stanza.
That's not the way to do it. You should create the directory via the normal RPM methods for including a directory --- that is, make the directory in the install root and include it in the %files list.
Agreed: this means that the package properly owns the directory, unlike in the creation-in-%post case.
Paul.
On 10/05/2011 08:05 PM, Jochen Schmitt wrote:
I have look on
to be sure to confim with the packaging guidelines. Unfortunately, I could not found any information to this related topic.
Hmm, Fedora packaging guidelines at www.maclife.de?
packaging@lists.fedoraproject.org