From Mageia wiki
Jump to: navigation, search


Summary

Eliminate the usage of legacy RPM macros in Mageia 7.

Owner

  • Name: Neal Gompa
  • Email: ngompa13@gmail.com

Resources

This will require efforts by rpm-mageia-setup developers to merge the %configure macros, and require efforts by someone (packager, sysadmin) to mass change all specs to the new schemes for various macros.

Current status

  • Targeted release: Mageia 7
  • Last updated: 2017/09/16
  • Percentage of completion: 0%


Detailed Description

In Mageia, there are several macros that have been deprecated for variants provided by upstream RPM or for new macros that enable better cross-distribution compatibility.

For example, for running the configure script for autotoolized codebases, we have two macros: %configure and %configure2_5x. The former is intended for codebases using older versions of autotools, while the latter is intended for modern autotools codebases. However, maintaining two macros for this makes no sense, and it's better to just unify them and have a switch for changing the behavior based on the autotools variant.

With Mageia 7, we want to drop the legacy macros and move our specs to use newer ones across the board. This also includes unifying the %configure and %configure2_5x macros.

Why it would be good for Mageia to do it

By doing this, packaging for Mageia becomes closer in line to how packaging on other RPM-based Linux distributions works for common software packages, which makes sharing specs easier and makes it more attractive for third-party software developers to offer a Mageia RPM alongside Fedora and openSUSE ones.

Test case

To be determined...

Tasks

  • Unify the %configure and %configure2_5x macros in rpm-mageia-setup
    • This is mostly done. The macros have been unified into a %main_configure macro, which is wrapped by %configure and %configure2_5x. Once packages are adjusted, then we can drop the wrappers and rename %main_configure to %configure.
  • Adjust every package that has uses %configure to also include %define _legacy_autotools 1 at the top of the spec and every package that uses %configure2_5x to use %configure.
  • Convert all usage of %make to %make_build so we can drop %make from rpm-mageia-setup
  • Convert all usage of %makeinstall_std to %make_install so we can drop %makeinstall_std from rpm-mageia-setup
  • Convert all usage of %apply_patches to %autopatch -p1 so we can drop %apply_patches patches from rpm
  • Convert all usage of legacy Python macros and dependency names to the modern ones provided by python-rpm-macros so we can drop the legacy ones from rpm-mageia-setup

Software / Packages Dependencies

  • rpm-mageia-setup
  • rpm

What could disrupt development of this new feature

If we can't get everything changed, this feature will not be able to be completed.

Planning

This should happen before the mass rebuild, so that we don't have to cycle through the whole distribution multiple times.

Contingency

If this fails to be ready for Mageia 7, then we continue with what we have and try again for Mageia 8.

Release Notes

Not applicable.

Documentation

Associated Bugs

Packager comments