https://bugzilla.redhat.com/show_bug.cgi?id=2088450
--- Comment #4 from Petr Menšík pemensik@redhat.com --- I don't like the way it prepares for running. Can just single shell script be run to prepare everything? %post script seems unnecessary complicated. I think single time systemd unit should run when first starting the server. Check bind package for example of generating rndc.key. It would not have to switch user manually from those scripts, because systemd has good way to switch to non-privileged User/Group.
Scriptlets setup.sh and remove.sh do quite complicated things. Are those necessary?
Why is not netopeer2-server in sbin directory, when it is a system service? Is it useful also as non-privileged user service?
On non-fedora distribution like RHEL, this would try adding sysrepo to root user. But I don't think it creates sysrepo in the first place. usermod -a -G sysrepo root
Either remove that and rely on presence of sysusers_create_compat macro. It should work also on 0%{?rhel} >= 8. Maybe 9, I am not sure. Or make it working.