As noted in this devel-list thread, the Fedora Packaging Guidelines require the use of the %ldconfig_scriptlets macro in spec files. However, these were introduced as a compatibility mechanism and have not served any purpose for many years now.
%ldconfig_scriptlets
I propose that we remove mention of these scriptlets from the guidelines (except perhaps to say that they were once in use and may be safely removed from any packages that still contain them).
Did you actually read the guidelines? This was already updated a while ago.
Packages which place linker configuration files in /etc/ld.so.conf.d MUST call ldconfig in %post and %postun (on all Fedora releases) even if they install no actual libraries. They MUST NOT use the %ldconfig, %ldconfig_post, %ldconfig_postun or %ldconfig_scriptlets macros to do this, since these macros do not have any effect on Fedora.
(emphasis mine)
Why do we need to do that? We could also have a file trigger for linker configuration files too.
@decathorpe Those guidelines were there to maintain compatibility with EPEL 7, which still needed the explicit calls. EPEL 7 is dead, so it's time for those macros to join it in eternal slumber.
No. for files that do install in non-standard paths (i.e. require linker config files) you still MUST call ldconfig manually.
So, let's fix that.
Until that is fixed (I'm not even sure how that would be fixed?), packages still need to call /sbin/ldconfig manually - and that is exactly what is currently documented in the Packaging Guidelines.
So until that situation changes, the documentation is correct.
To avoid confusion, /sbin/ldconfig is only required when using non-standard paths, correct?
/sbin/ldconfig
I find the current documentation very confusing, so while it may or may not be "correct" the main problem is that it's not clear.
I don't understand why this is confusing?
See also these commits from (checks calendar) five years ago:
Notably:
It is not necessary to call ldconfig when installing shared libraries.
is still there on the main page of the Packaging Guidelines:
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_shared_libraries
It's a matter of fact that I found it confusing when trying to work out if %ldconfig_scriptlets can be removed from files or not - I'm still not sure. Why do we even mention %ldconfig_scriptlets when it can never expand to anything?
(Picking discussion back up on this)
The only mention of %ldconfig_scriptlets I see throughout the guidelines is an admonition not to use it. As for why we do that, the answer is simply "EPEL".
Of course on Fedora it expands to nothing; does that hold true for the oldest supported EPEL branch? I don't think that was he case when EPEL7 was still around but maybe it's changed now and sure, we could perhaps remove the last mention of those macros from the guidelines and maybe even start warning about their use.
I do think it's super-sad that we have to do anything at all with ldconfig. What would it actually take to fix that, besides waiting seven years for any change to roll out of every EPEL release?
Log in to comment on this ticket.