From Fedora Project Wiki
(Created page with "<!-- The actual name of your proposed change page should look something like: Changes/Your_Change_Proposal_Name. This keeps all change proposals in the same namespace --> =...")
 
 
(16 intermediate revisions by 2 users not shown)
Line 7: Line 7:
<!-- A sentence or two summarizing what this change is and what it will do. This information is used for the overall changeset summary page for each release. Note that motivation for the change should be in the Benefit to Fedora section below, and this part should answer the question "What?" rather than "Why?". -->
<!-- A sentence or two summarizing what this change is and what it will do. This information is used for the overall changeset summary page for each release. Note that motivation for the change should be in the Benefit to Fedora section below, and this part should answer the question "What?" rather than "Why?". -->


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`.
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.
 
`*.la` files are "libtool archives" and provide additional metadata for library files and come from a time before the introduction of the ELF format. Today, they are only consumed by libtool itself. Refer to https://autotools.io/libtool/lafiles.html.


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.
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 ==
== Owner ==
Line 27: Line 27:


== Current status ==
== Current status ==
[[Category:ChangePageIncomplete]]
[[Category:ChangeAcceptedF36]]
<!-- When your change proposal page is completed and ready for review and announcement -->
<!-- When your change proposal page is completed and ready for review and announcement -->
<!-- remove Category:ChangePageIncomplete and change it to Category:ChangeReadyForWrangler -->
<!-- remove Category:ChangePageIncomplete and change it to Category:ChangeReadyForWrangler -->
Line 45: Line 45:
ON_QA -> change is fully code complete
ON_QA -> change is fully code complete
-->
-->
* FESCo issue: <will be assigned by the Wrangler>
* [https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/AMKKEGJZBMPE4IQHKGR65RXKF2NALSOP/ Devel list thread]
* Tracker bug: <will be assigned by the Wrangler>
* FESCo issue: [https://pagure.io/fesco/issue/2693 #2693]
* Release notes tracker: <will be assigned by the Wrangler>
* Tracker bug: [https://bugzilla.redhat.com/show_bug.cgi?id=2024312 #2024312]
* Release notes tracker: <will not be assigned by Wrangler - not user-facing>


== Detailed Description ==
== Detailed Description ==
Line 86: Line 87:
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.
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.


 
While looking at what packages will be affected by this change, I already found several packages that ship and install `.la` files by accident. These packages will be fixed to not ship them.


== Scope ==
== Scope ==
* Proposal owners: Update packaging guidelines to mention the automatic removal of `*.la` files and mention the mechanism for opting out of this behavior.
* Proposal owners:  
** Update packaging guidelines to mention the automatic removal of `*.la` files and mention the mechanism for opting out of this behavior.
<!-- 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?-->
 
* Other developers:
* 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.  
** 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.  


<!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
<!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
<!-- What work do other developers 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 other developers 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?-->


* Release engineering: [https://pagure.io/releng/issues #Releng issue number] <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
* Release engineering: [https://pagure.io/releng/issue/10353 #10353] <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
<!-- Does this feature require coordination with release engineering (e.g. changes to installer image generation or update package delivery)?  Is a mass rebuild required?  include a link to the releng issue.  
<!-- Does this feature require coordination with release engineering (e.g. changes to installer image generation or update package delivery)?  Is a mass rebuild required?  include a link to the releng issue.  
The issue is required to be filed prior to feature submission, to ensure that someone is on board to do any process development work and testing and that all changes make it into the pipeline; a bullet point in a change is not sufficient communication -->
The issue is required to be filed prior to feature submission, to ensure that someone is on board to do any process development work and testing and that all changes make it into the pipeline; a bullet point in a change is not sufficient communication -->
Line 110: Line 112:
<!-- What happens to systems that have had a previous versions of Fedora installed and are updated to the version containing this change? Will anything require manual configuration or data migration? Will any existing functionality be no longer supported? -->
<!-- What happens to systems that have had a previous versions of Fedora installed and are updated to the version containing this change? Will anything require manual configuration or data migration? Will any existing functionality be no longer supported? -->


<!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
The following packages ship `.la` files currently (queried via `$ repoquery --repo=rawhide -f '*.la' --source | pkgname | sort | uniq`):
 
<!--
* apr
* apr-util
* aqbanking
* arts
* avr-gcc
* binutils
* calf
* cross-gcc
* djview4
* filezilla
* flatpak
* gambas3
* gforth
* gnome-do
* gnome-subtitles
* google-authenticator
* GraphicsMagick
* gretl
* gstreamer1-doc
* gutenprint
* gwenhywfar
* chafa
* ImageMagick
* jpilot
* kdebase3
* kdegames3
* kdelibs3
* kdepim3
* kdewebdev
* kdissert
* kguitar
* koffice-kivio
* libmodsecurity
* libsecp256k1
* liferea
* mcabber
* mingw-sane-backends
* mingw-speexdsp
* mousepad
* neon
* octave
* opencryptoki
* OpenIPMI
* openldap
* owfs
* pinball
* pragha
* qt5-qtbase
* qt5-qtfeedback
* qt5-qtremoteobjects
* qt5-qttools
* subversion
* taxipilot
* unicornscan
* util-linux
* xfce4-calculator-plugin
* xfce4-timer-plugin
 
-->
 
`*.la` files explicitly listed in `%files` (this includes packages that modify the `*.la` file(s) but don't list them in `%files` explicitly):
* [https://src.fedoraproject.org/rpms/arts/pull-request/2 arts (MERGED)]
* [https://src.fedoraproject.org/rpms/gambas3/pull-request/2 gambas3 (MERGED)]
* [https://src.fedoraproject.org/rpms/chafa/pull-request/2 chafa]
* [https://src.fedoraproject.org/rpms/ImageMagick/pull-request/5 ImageMagick (MERGED)]
* [https://src.fedoraproject.org/rpms/kdebase3/pull-request/1 kdebase3 (MERGED)]
* [https://src.fedoraproject.org/rpms/kdegames3/pull-request/1 kdegames3 (MERGED)]
* [https://src.fedoraproject.org/rpms/kdelibs3/pull-request/1 kdelibs3 (MERGED)]
* [https://src.fedoraproject.org/rpms/kdewebdev/pull-request/1 kdewebdev (MERGED)]
* [https://src.fedoraproject.org/rpms/kdissert/pull-request/1 kdissert (MERGED)]
* [https://src.fedoraproject.org/rpms/libmodsecurity/pull-request/2 libmodsecurity]
* [https://src.fedoraproject.org/rpms/libsecp256k1/pull-request/1 libsecp256k1]
* [https://src.fedoraproject.org/rpms/mingw-sane-backends/pull-request/1 mingw-sane-backends]
* [https://src.fedoraproject.org/rpms/mingw-speexdsp/pull-request/1 mingw-speexdsp]
* [https://src.fedoraproject.org/rpms/neon/pull-request/2 neon (MERGED)]
* [https://src.fedoraproject.org/rpms/openldap/pull-request/9 openldap (MERGED)]
* [https://src.fedoraproject.org/rpms/pinball/pull-request/2 pinball (MERGED)]
* [https://src.fedoraproject.org/rpms/qt5-qtbase/pull-request/8 qt5-qtbase (MERGED)]
* [https://src.fedoraproject.org/rpms/qt5-qtfeedback/pull-request/1 qt5-qtfeedback (MERGED)]
* [https://src.fedoraproject.org/rpms/qt5-qtremoteobjects/pull-request/1 qt5-qtremoteobjects (MERGED)]
* [https://src.fedoraproject.org/rpms/qt5-qttools/pull-request/3 qt5-qttools (MERGED)]
* [https://src.fedoraproject.org/rpms/subversion/pull-request/5 subversion (MERGED)]
* [https://src.fedoraproject.org/rpms/unicornscan/pull-request/1 unicornscan (MERGED)]
* [https://src.fedoraproject.org/rpms/xfce4-calculator-plugin/pull-request/1 xfce4-calculator-plugin]
* [https://src.fedoraproject.org/rpms/GraphicsMagick/pull-request/1 GraphicsMagick (MERGED)]
 
 
 
No mention of `*.la` files in the spec file:
* gcc-avr
* calf
* cross-gcc
* djview4
* filezilla
* gforth
* gnome-do
* gnome-subtitles
* google-authenticator
* gstreamer1-doc
* jpilot
* kguitar
* liferea
* mcabber
* mousepad
* octave
* opencryptoki
* pragha
* taxipilot
* xfce4-timer-plugin
 
 


Tries to delete them but fails:
* aqbanking
* binutils (fixed)
* flatpak
* gretl
* gutenprint
* gwenhywfar
* kdepim3
* koffice-kivio
* OpenIPMI
* owfs
* util-linux


== How To Test ==
== How To Test ==
Line 130: Line 257:
<!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
<!-- REQUIRED FOR SYSTEM WIDE CHANGES -->


Whether a RPM package ships `.la` files can be checked either via the `repoquery` command from above or via querying a local `.rpm` file directly: `rpm -q --files ./my-package.rpm | grep '\.la$'`. The latter command can be used for local testing.
If a package currently ships any `*.la` files but only does so accidentally, nothing needs to be done and the package will automatically stop shipping those files after it is rebuilt with this change in effect.
If a package whishes to keep shipping `*.la` files, the package maintainer can opt out of the automatic removal by setting `%__brp_remove_la_files` to `%nil`:  `%global __brp_remove_la_files %nil`


== User Experience ==
If the package currently removes all `*.la` files manually via some form of `find $RPM_BUILD_ROOT -name "*.la" -delete` or similar, it is recommended (but not required) to remove that line.
<!-- If this change proposal is noticeable by users, how will their experiences change as a result?


This section partially overlaps with the Benefit to Fedora section above. This section should be primarily about the User Experience, written in a way that does not assume deep technical knowledge. More detailed technical description should be left for the Benefit to Fedora section.


Describe what Users will see or notice, for example:
  - Packages are compressed more efficiently, making downloads and upgrades faster by 10%.
  - Kerberos tickets can be renewed automatically. Users will now have to authenticate less and become more productive. Credential management improvements mean a user can start their work day with a single sign on and not have to pause for reauthentication during their entire day.
- Libreoffice is one of the most commonly installed applications on Fedora and it is now available by default to help users "hit the ground running".
- Green has been scientifically proven to be the most relaxing color. The move to a default background color of green with green text will result in Fedora users being the most relaxed users of any operating system.
-->


== Dependencies ==
== User Experience ==
<!-- What other packages (RPMs) depend on this package?  Are there changes outside the developers' control on which completion of this change depends?  In other words, completion of another change owned by someone else and might cause you to not be able to finish on time or that you would need to coordinate?  Other upstream projects like the kernel (if this is not a kernel change)? -->


<!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
Users should not notice any change.


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


== Contingency Plan ==
== Contingency Plan ==


<!-- If you cannot complete your feature by the final development freeze, what is the backup plan?  This might be as simple as "Revert the shipped configuration".  Or it might not (e.g. rebuilding a number of dependent packages).  If you feature is not completed in time we want to assure others that other parts of Fedora will not be in jeopardy.  -->
<!-- If you cannot complete your feature by the final development freeze, what is the backup plan?  This might be as simple as "Revert the shipped configuration".  Or it might not (e.g. rebuilding a number of dependent packages).  If you feature is not completed in time we want to assure others that other parts of Fedora will not be in jeopardy.  -->
* Contingency mechanism: (What to do?  Who will do it?) N/A (not a System Wide Change)  <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
* 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.
 
<!-- When is the last time the contingency mechanism can be put in place?  This will typically be the beta freeze. -->
<!-- When is the last time the contingency mechanism can be put in place?  This will typically be the beta freeze. -->
* Contingency deadline: N/A (not a System Wide Change) <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
* Contingency deadline: beta freeze <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
<!-- Does finishing this feature block the release, or can we ship with the feature in incomplete state? -->
<!-- Does finishing this feature block the release, or can we ship with the feature in incomplete state? -->
* Blocks release? N/A (not a System Wide Change), Yes/No <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
* Blocks release? Yes <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->




Line 162: Line 288:
<!-- Is there upstream documentation on this change, or notes you have written yourself?  Link to that material here so other interested developers can get involved. -->
<!-- Is there upstream documentation on this change, or notes you have written yourself?  Link to that material here so other interested developers can get involved. -->


<!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
Pull request implementing `%__brp_remove_la_files` in the upstream rpm repository: https://github.com/rpm-software-management/rpm/pull/1674
N/A (not a System Wide Change)
 


== Release Notes ==
== Release Notes ==
Line 171: Line 297:
Release Notes are not required for initial draft of the Change Proposal but has to be completed by the Change Freeze.  
Release Notes are not required for initial draft of the Change Proposal but has to be completed by the Change Freeze.  
-->
-->
The [https://rpm.org/wiki/Releases/4.17.0 RPM 4.17 release notes] simply state "Add policy for removing .la files from buildroot by default".

Latest revision as of 07:30, 16 February 2022


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.

*.la files are "libtool archives" and provide additional metadata for library files and come from a time before the introduction of the ELF format. Today, they are only consumed by libtool itself. Refer to https://autotools.io/libtool/lafiles.html.

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: 2022-02-16
  • Devel list thread
  • FESCo issue: #2693
  • Tracker bug: #2024312
  • Release notes tracker: <will not be assigned by Wrangler - not user-facing>

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.

While looking at what packages will be affected by this change, I already found several packages that ship and install .la files by accident. These packages will be fixed to not ship them.

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

The following packages ship .la files currently (queried via $ repoquery --repo=rawhide -f '*.la' --source | pkgname | sort | uniq):


*.la files explicitly listed in %files (this includes packages that modify the *.la file(s) but don't list them in %files explicitly):


No mention of *.la files in the spec file:

  • gcc-avr
  • calf
  • cross-gcc
  • djview4
  • filezilla
  • gforth
  • gnome-do
  • gnome-subtitles
  • google-authenticator
  • gstreamer1-doc
  • jpilot
  • kguitar
  • liferea
  • mcabber
  • mousepad
  • octave
  • opencryptoki
  • pragha
  • taxipilot
  • xfce4-timer-plugin


Tries to delete them but fails:

  • aqbanking
  • binutils (fixed)
  • flatpak
  • gretl
  • gutenprint
  • gwenhywfar
  • kdepim3
  • koffice-kivio
  • OpenIPMI
  • owfs
  • util-linux

How To Test

Whether a RPM package ships .la files can be checked either via the repoquery command from above or via querying a local .rpm file directly: rpm -q --files ./my-package.rpm | grep '\.la$'. The latter command can be used for local testing.

If a package currently ships any *.la files but only does so accidentally, nothing needs to be done and the package will automatically stop shipping those files after it is rebuilt with this change in effect.

If a package whishes to keep shipping *.la files, the package maintainer can opt out of the automatic removal by setting %__brp_remove_la_files to %nil: %global __brp_remove_la_files %nil

If the package currently removes all *.la files manually via some form of find $RPM_BUILD_ROOT -name "*.la" -delete or similar, it is recommended (but not required) to remove that line.


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