From Fedora Project Wiki

< Changes

Revision as of 12:02, 21 October 2021 by Tbaeder (talk | contribs)


Remove .la files from buildroot

Summary

Autools/libtool-based projects frequently install files ending in .la in their make install. These files are usually unwanted. Many projects therefore end up with a variation of find $RPM_BUILD_ROOT -name "*.la" -delete in their %install section.

This changes proposes to instead use the %__brp_remove_la_files macro in redhat-rpm-config's %__os_install_post to remove the *.la files automatically. This has been added to RPM 4.17.


Owner


Current status

  • Targeted release: Fedora Linux 36
  • Last updated: 2021-10-21
  • FESCo issue: <will be assigned by the Wrangler>
  • Tracker bug: <will be assigned by the Wrangler>
  • Release notes tracker: <will be assigned by the Wrangler>

Detailed Description

Feedback

Benefit to Fedora

This change removes a widely used line of shell script from many spec files. The advantage is cleaner and easier to maintain spec files as well as more sensible defaults for rpm package builds.


Scope

  • Proposal owners:
    • Update packaging guidelines to mention the automatic removal of *.la files and mention the mechanism for opting out of this behavior.
  • Other developers:
    • For the packages already removing their *.la files manually, there should be no change. For packages that want to install such packages, the package maintainers need to opt out of the automatic removal.


  • Policies and guidelines: N/A (not needed for this Change)
  • Alignment with Objectives:

Upgrade/compatibility impact

How To Test

User Experience

Users should not notice any change.

Dependencies

There are no dependencies. Only redhat-rpm-config needs to adapt to the change.

Contingency Plan

  • Contingency mechanism: The change can simply be reverted in the redhat-rpm-config package. Packages that have already removed the manual deletion of *.la files need to revert this change too. Packages that have opted out of the automatic *.la file removal don't need to do anything.
  • Contingency deadline: beta freeze
  • Blocks release? Yes


Documentation

Pull request implementing %__brp_remove_la_files in the upstream rpm repository: https://github.com/rpm-software-management/rpm/pull/1674


Release Notes

The RPM 4.17 release notes simply state "Add policy for removing .la files from buildroot by default".