[master] Doc issue in file guidelines/modules/ROOT/pages/Scriptlets.adoc #1414

Open
opened 2024-11-19 13:00:11 +00:00 by ckehrmann · 1 comment

The section "Linker Configuration Files" recommends to use one-liners like
%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

The section "Linker Configuration Files" recommends to use one-liners like ```%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```
Owner

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).

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/

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). 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/
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
packaging/guidelines#1414
No description provided.