Closed jw3 closed 1 year ago
This would resolve #454
I think development environments will still use XDG.
Will use a command-line option (tentatively, -x
, if unused) to specify the use of the default xdg
locations, otherwise logs and config files will be located under /var/log/
and /etc/
respectively.
The rpm spec will get an entry like this for the config file
%config(noreplace) %attr(644,root,root) %{_sysconfdir}/%{name}/config.toml
and like this for the log file
%ghost %attr(440,root,root) %{_localstatedir}/log/%{name}.log
(ballpark anyways)
The config file part should be straightforward. It needs added to ensure it is trusted in an install out of the box.
Need to look closer at the log file aspect of this then, is there an existing rule for var log locations? Like TA brought up, trust is not ideal for a log file.
Maybe fapolicyd
's log file entry in its spec file is somewhere in the ballpark:
%ghost %attr(440,%{name},%{name}) %verify(not md5 size mtime) %{_localstatedir}/log/%{name}-access.log
Or maybe there's already a default rule as JW mentioned in our meeting.
Awaiting review/merge via @jw3
To ensure the config and log paths are accessible after rpm install they should be added to the rpm file list.
This likely eliminates xdg directories.