#50764 tmpfiles.d on read-only host should be in /etc
Closed: invalid 5 months ago by mhonek. Opened 8 months ago by firstyear.

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

8 months ago


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

8 months ago

@firstyear You are right. The first two lines could be generalized but the last one couldn't as it is instance-specific.

Anyway, I'll close this as the original issues reported was already found to be a non-issue within the upstream/Fedora spec file.

Metadata Update from @mhonek:
- Issue close_status updated to: invalid
- Issue status updated to: Closed (was: Open)

5 months ago

Login to comment on this ticket.