From Fedora Project Wiki

Revision as of 16:23, 14 July 2021 by Codonell (talk | contribs)

Summary

Rebase libffi in Fedora 34 from libffi 3.1 to libffi 3.4 (released June 28 2021), and provide a libffi3.1 compatibility package to handle the library SONAME transition.

Owner

Current status

  • Targeted release: Fedora 35
  • Last updated: 2021-07-14
  • 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

Libffi 3.4 was released in June 28 2021 after a long period of upstream testing supported directly by Fedora (DJ Delorie). Intel Control-flow Enforcement Technology support has been added, which is a desirable feature for Fedora. Fedora is currently using libffi 3.1, released in 2014.

This change will require a SONAME bump due to ABI changes. A libffi3.1 package has been prepared, and tested in a side-tag along with libffi 3.4, and supports a smooth transition between existing binaries and binaries using the new library. No package needs to be rebuilt, old packages will require and install the compat libffi3.1 package.

The libffi3.1 package would enter the distribution first, followed by libffi updated to version 3.4. Again, no packages need to be rebuilt for the transition to happen.

Feedback

Benefit to Fedora

Stay up to date with upstream libffi, including bug fixes et al.

Stay compatible with other distros which have updated already.

Add support for Intel CET and Power10.

Scope

  • Proposal owners: Update to libffi 3.4
  • Other developers: Packages which link against libffi do not need be rebuilt. Depending on your API usage, some code changes might be required after the update, but existing builds will continue to work.
  • Policies and guidelines: The policies and guidelines do not need to be updated.
  • Trademark approval: N/A (not needed for this Change)
  • Alignment with Objectives: None

Upgrade/compatibility impact

Packages built on the previous version of libffi will have an auto-requires on the old SONAME and will cause dnf to install libffi3.1 (compat package with runtime). When packages are rebuilt against libffi 3.4 they will automatically switch to using the new SONAME.

libffi's latest static trampolines feature has been disabled because it has an impact on


How To Test

libffi includes its own testsuite. A side-tag rebuild has been carried out to rebuild dependent packages and verify their correct operation, this includes:

  • python3.9
  • dnf
  • gobject-introspection
  • glib2
  • p11-kit
  • rubygem-ffi
  • guile22
  • git-annex
  • php
  • llvm

Correct operation of these packages was verified by reviewing testsuite results.

User Experience

The new version of libffi, aside from the usual internal bugfixes and tweaks, introduces support for Intel CET and Power10.

Dependencies

The key dependencies for libffi are python and dnf. Correct operation of python and dnf during the transition requires the libffi3.1 compat package to allow a smooth rebuild path from one SONAME to the next. Verification of this was carried out in a side-tag in Fedora Rawhide.

Contingency Plan

  • Contingency mechanism: Revert to libffi 3.1 (dropping libffi3.1 and the libffi 3.4 update)
  • Contingency deadline: 2021-08-24
  • Blocks release? No
  • Blocks product? N/A

Documentation

libffi includes its own documentation. No additional documentation work is required.

Release Notes

libffi does not public formal release notes. A change list can be found in libffi's git history: https://github.com/libffi/libffi/commits/master