On Wed, Jan 12, 2022 at 03:06:17PM -0700, Chris Murphy wrote:
> Unfortunately, real world RPMs that install into /opt also have
e.g. log files in /opt/somesoftware/log, not /var/log/somesoftware. So it can't be
underneath the read-only /usr mount. This is why rpm-ostree just straight up rejects RPMs
that install into /opt.
>
https://github.com/coreos/rpm-ostree/issues/233
The FHS says /opt is for static files. I think logs going in /opt is
asking for trouble if you really care about your logs. I'm not super
attached to enforcing /var/opt/<provider>/log versus dumping it in
/var/log. I think I prefer the latter because it's consistent with
/etc/opt/<provider>/ and is thus consistent. If you opt-in to /opt
then you don't get to opt-out of all the opt's. (not the best pun)
Let's please not recommend yet-another place to dump text logs.
Services should log to the journal. This allows users to view the
logs without hassle and provides log rotation and control over the
total size of the logs. This is especially important for non-distro
packages that install to /opt: they are particularly likely not to
implement log rotation correctly if they try on their own.
Zbyszek