On image based system, /var/lib/setroubleshoot is not created during rpm
installation but needs to be created during boot using tmpfiles.d
Fixes:
setroubleshoot[96947]: cannot create file /var/lib/setroubleshoot/setroubleshoot_database.xml [No such file or directory]
setroubleshoot[96947]: cannot chmod /var/lib/setroubleshoot/setroubleshoot_database.xml to 600 [No such file or directory]
setroubleshoot[96947]: cannot chown /var/lib/setroubleshoot/setroubleshoot_database.xml to setroubleshoot:setroubleshoot [No such file or directory]
setroubleshoot[96947]: cannot create file /var/lib/setroubleshoot/email_alert_recipients [No such file or directory]
setroubleshoot[96947]: cannot chmod /var/lib/setroubleshoot/email_alert_recipients to 600 [No such file or directory]
setroubleshoot[96947]: cannot chown /var/lib/setroubleshoot/email_alert_recipients to setroubleshoot:setroubleshoot [No such file or directory]
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2346971
Resolves: RHEL-82117
A system which uses rpm ostree doesn't install rpms but images which are
pre-created in a build system. There's no guarantee that the build
system has the same uid/gid mapping for setroubleshoot as the local system.
systemd-tmpfiles's 'Z' type recursivelly sets the user and group
ownership on every reboot.
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2012943