#50764 tmpfiles.d on read-only host should be in /etc
Opened 2 months ago by firstyear. Modified 2 months ago

Issue Description

We use systemd tmpfiles.d, but we currently try to put instance files in there. We attempt to use /usr/lib/tmpfiles.d/dirsrv-localhost.conf but on a read only system like atomic host or suse transactional server this is not writeable. We should be using /etc/ instead.


@mreynolds This could just be an issue in the suse spec file now I think about it, because we set this in the spec to --with-tmpfiles-d="%{_tmpfilesdir}" in configure, which yields tmpfiles_d = /usr/lib/tmpfiles.d in the defaults.inf. On fedora/rhel what is this value for you?

Metadata Update from @firstyear:
- Custom field origin adjusted to None
- Custom field reviewstatus adjusted to None

2 months ago

https://build.opensuse.org/request/show/753852

Change in question, could be worth checking the fedora/rhel packages for this @mreynolds then we can close it.

The macros seem to expand the very same on Fedora as on SUSE. However, our upstream spec and also Fedora spec already use the %{_sysconfdir}/tmpfiles.d value.

A bit OT: Why we even bother creating the tmpfiles config for each instance? Usually there is this inside:

d /run/dirsrv 0770 dirsrv dirsrv
d /run/lock/dirsrv 0770 dirsrv dirsrv
d /run/lock/dirsrv/slapd-localhost 0770 dirsrv dirsrv

... where we can just replace the localhost with a glob * and ship this in /usr/lib/tmpfiles.d as a generic. The user/group name could be templated build-time if necessary.

Uhhhh, how does a glob work or help here? Linux can't create folders on first read like this, so this wouldn't work. We need to specify the folder name.

We also do need to ensure the full path is built because /run is a tmpfs IIRC.

Metadata Update from @mreynolds:
- Issue set to the milestone: 1.4.2

2 months ago

Login to comment on this ticket.

Metadata