From Fedora Project Wiki
No edit summary
No edit summary
Line 79: Line 79:


== Scope ==
== Scope ==
* Proposal owners: Make sure that DSO symlinks are being packaged<sup>[https://src.fedoraproject.org/rpms/redhat-rpm-config/c/12ace9bdb9bb61dbe1dbf4f250eee7c5913fb5c9 commit]</sup>, add transaction filetriggers to glibc<sup>[https://src.fedoraproject.org/rpms/glibc/c/1f24fb0da2ff5b11df79b885656a35df1a0ac8cc commit]</sup>.
* Proposal owners: Make sure that DSO symlinks are being packaged<sup>[https://src.fedoraproject.org/rpms/redhat-rpm-config/c/12ace9bdb9bb61dbe1dbf4f250eee7c5913fb5c9 commit]</sup>, add transaction filetriggers to glibc<sup>[https://src.fedoraproject.org/rpms/glibc/c/1f24fb0da2ff5b11df79b885656a35df1a0ac8cc commit] + [https://src.fedoraproject.org/rpms/glibc/c/6ff958f2aae58ce8d91999ba3b03e664b3c85e27 commit]</sup>.
<!-- What work do the feature owners have to accomplish to complete the feature in time for release?  Is it a large change affecting many parts of the distribution or is it a very isolated change? What are those changes?-->
<!-- What work do the feature owners have to accomplish to complete the feature in time for release?  Is it a large change affecting many parts of the distribution or is it a very isolated change? What are those changes?-->



Revision as of 19:58, 29 January 2018


Removing ldconfig scriptlets

Summary

For many years, package maintainers were required to write scriptlets which call ldconfig in %post/%postun if they package shared libraries.

Owner

Current status

  • Targeted release: Fedora 28
  • Last updated: 2018-01-29
  • Tracker bug: <will be assigned by the Wrangler>

Detailed Description

Since time immemorial, Red Hat/Fedora packagers have been required to add a stanza to spec files for packages containing libraries to update the ldconfig cache.

%post -p /sbin/ldconfig    
%postun -p /sbin/ldconfig

To say this is annoying is to put it mildly. However, there was no standard mechanism to make this boilerplate go away. Now with RPM 4.13+, we should change this to file triggers and make all of that go away.

With this change, these scriptlets can be removed and ldconfig would be run just once per transaction.

If your package places shared libraries in special locations referenced by ld.so.conf, you still need to run ldconfig manually.

For those who concerned about whether this is self-contained or system-wide change: there is no overhead if packagers don't remove ldconfig scriptlets in time, so completion doesn't depend whether packagers remove them or not. We are just making it possible.

Benefit to Fedora

  • Packagers don't need to write ldconfig scriptlets anymore (often they forget to).
  • Significantly faster installation of packages.

Scope

  • Proposal owners: Make sure that DSO symlinks are being packagedcommit, add transaction filetriggers to glibccommit + commit.
  • Other developers: Package maintainers are advised to remove ldconfig scriptlets in order to achieve benefits specified above.
  • Release engineering: #7284 (a check of an impact with Release Engineering is needed)
  • Policies and guidelines: Packaging guidelines need to be updated to reflect reality.
  • Trademark approval: N/A (not needed for this Change)

Upgrade/compatibility impact

RHEL6/RHEL7 (which is baked by EPEL in Fedora) at the point of writing this Change Proposal do not have mechanism of filetriggers, so packagers who want to support EPEL6/EPEL7 from same spec file would need to add special conditionals in their spec files.

%if (0%{?rhel} && 0%{?rhel} <= 7) || (0%{?fedora} && 0%{?fedora} <= 27)
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%endif

N/A (not a System Wide Change)

How To Test

  1. Make sure you have latest glibc and redhat-rpm-config
  2. Find package which packages shared library
  3. Remove ldconfig scriptlets
  4. Build package
  5. Install package
  6. Test that dependent applications work

N/A (not a System Wide Change)

User Experience

Installation of packages is significantly faster.

Dependencies

N/A (not a System Wide Change)

Contingency Plan

  • Contingency mechanism: (What to do? Who will do it?) N/A (not a System Wide Change)
  • Contingency deadline: N/A (not a System Wide Change)
  • Blocks release? N/A (not a System Wide Change), Yes/No
  • Blocks product? product

Documentation

N/A (not a System Wide Change)

Release Notes