There appears to be an issue with the packaging of grommunio-index in the community EL9 repository.
RPM macros such as %service_add_pre have been used that seem to be SUSE-specific and not present on RHEL-based systems, so the package does not install as-is.
I raised this in a separate post: https://community.grommunio.com/d/1325-el9-packaging-issues
That thread has been locked and marked as solved, however the issue is still present. Hopefully that means a fix is on the way but I thought I'd share the workaround I'm using in the meantime.
- Download the grommunio-index RPM from the repository: https://download.grommunio.com/community/EL9/
- Install rpmrebuild from the EPEL repository
- Run
rpmrebuild -e -p grommunio-index-{version}.{arch}.rpm
and the spec file should open in your default text editor
- Remove the line beginning
%%service_add_pre
- Replace the line beginning
%%service_add_post
with /usr/lib/systemd/systemd-update-helper install-system-units grommunio-index.service grommunio-index.timer || :
- Replace the line beginning
%%service_del_preun
with /usr/lib/systemd/systemd-update-helper remove-system-units grommunio-index.service grommunio-index.timer || :
- Replace the line beginning
%%service_del_postun
with /usr/lib/systemd/systemd-update-helper mark-restart-system-units grommunio-index.service grommunio-index.timer || :
- Add
/usr/bin/systemctl daemon-reload || :
after the previous line
- Save and exit, Y to continue
- The modified RPM will be saved in rpmbuild/RPMS/{arch} (Check the rpmbuild output in case your file path is different)
- Install modified RPM with DNF as usual
I've thrown this together mostly by comparing with packages that are working, but I don't claim to be an expert in the use of spec files. I haven't noticed any problems using this approach, the modified RPM installs and removes fine, but someone more knowledgeable might want to chip in here if I've missed something.