The section "Linker Configuration Files" recommends to use one-liners like %post -p /usr/bin/ldconfig %postun -p /usr/bin/ldconfig
%post -p /usr/bin/ldconfig
%postun -p /usr/bin/ldconfig
But that contradicts this WIKI entry: https://fedoraproject.org/wiki/Changes/Removing_ldconfig_scriptlets
On RHEL9 the oneliners cause errors during installation of a rpm with such lines in the specfile. The error is /sbin/ldconfig: relative path `1' used to build cache
/sbin/ldconfig: relative path `1' used to build cache
Looks like there's a misunderstanding - this is not a contradiction.
Calling ldconfig manually in scriptlets (or using %ldconfig_scriptlets) is not necessary in the vast majority of cases since the introduction of the RPM triggers (i.e. the Change proposal you linked).
%ldconfig_scriptlets
But calling ldconfig manually is still required if and only if the package ships a linker configuration file to allow loading shared libraries from a non-standard location, because those are not yet covered by the RPM trigger (i.e. as documented in the Packaging guidelines here https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/#_linker_configuration_files ).
I don't know why these ↓ scriptlets wouldn't work on RHEL 9,
%post -p /usr/bin/ldconfig %postun -p /usr/bin/ldconfig
but the Fedora Packaging Guidelines don't claim to cover packaging for RHEL, and EPEL specific guidelines are in a separate document: https://docs.fedoraproject.org/en-US/epel/epel-packaging/
Log in to comment on this ticket.