From Fedora Project Wiki
(Fix Tulio's email address)
(Add technical details and remove the copr and side-tag references)
Line 52: Line 52:
== Scope ==
== Scope ==
* Proposal owners:
* Proposal owners:
** Zlib-ng will be rebuilt with zlib-compatible API, obsoleting Zlib in Copr
** Zlib-ng will be rebuilt with zlib-compatible API, obsoleting zlib-1.3
** Rebuild dependent packages in Copr
*** Zlib-ng compat mode will be distributed in a new package called zlib-ng-compat, with its respective zlib-ng-compat-devel.
** Request a "f40-zlib-ng" build system tag
*** Initially, zlib-ng-compat will provide zlib = 1.2.13 and zlib-ng-compat-devel will provide zlib = 1.2.13.
** Build Zlib-ng into that tag
*** These versions will be updated following the support added to zlib-ng upstream.
** Rebuild dependent packages within the tag
** When the build is done, re-tag all the packages to rawhide
* Other developers: Help with build failures may be requested.
* Other developers: Help with build failures may be requested.
* Release engineering: TODO
* Release engineering: TODO
Line 74: Line 72:


== Dependencies ==
== Dependencies ==
Zlib-ng is a dependency for over 100 packages. Most of them are expected not to fail or break.
Zlib is a dependency for over 100 packages. Most of them are expected not to fail or break.


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

Revision as of 13:01, 9 October 2023

Transitioning to Zlib-ng as compatible replacement for Zlib

This is a proposed Change for Fedora Linux.
This document represents a proposed Change. As part of the Changes process, proposals are publicly announced in order to receive community feedback. This proposal will only be implemented if approved by the Fedora Engineering Steering Committee.

Summary

Replacing Zlib with Zlib-ng.

Owner

Current status

  • Targeted release: Fedora Linux 40
  • Last updated: 2023-10-09
  • 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

Zlib has long served as a reliable compression library, but its performance on modern CPU architectures does not fully utilize their capabilities. The transition to Zlib-ng aims to enhance the compression efficiency and performance for Fedora while ensuring compatibility with existing packages and libraries.

Feedback

Benefit to Fedora

  • Supports hardware acceleration when available
    • Adler32 implementation using SSSE3, AVX2, AVX512, AVX512-VNNI, Neon, VMX & VSX
    • CRC32-B implementation using PCLMULQDQ, VPCLMULQDQ, ACLE, & IBM Z
    • Hash table implementation using CRC32-C intrinsics on x86 and ARM
    • Slide hash implementations using SSE2, AVX2, ARMv6, Neon, VMX & VSX
    • Compare256 implementations using SSE2, AVX2, Neon, POWER9 & RVV
    • Inflate chunk copying using SSE2, SSSE3, AVX, Neon & VSX
    • Support for hardware-accelerated deflate using IBM Z DFLTCC
  • Includes Intel and Cloudflare optimizations
  • Uses code sanitizers, fuzzing, and code coverage

Scope

  • Proposal owners:
    • Zlib-ng will be rebuilt with zlib-compatible API, obsoleting zlib-1.3
      • Zlib-ng compat mode will be distributed in a new package called zlib-ng-compat, with its respective zlib-ng-compat-devel.
      • Initially, zlib-ng-compat will provide zlib = 1.2.13 and zlib-ng-compat-devel will provide zlib = 1.2.13.
      • These versions will be updated following the support added to zlib-ng upstream.
  • Other developers: Help with build failures may be requested.
  • Release engineering: TODO
  • Policies and guidelines: N/A
  • Trademark approval: N/A
  • Alignment with Objectives: N/A

Upgrade/compatibility impact

Zlib-ng has a zlib-compat mode that aims to preserve both API and ABI compatibility with the original Zlib. However certain application tests may rely on hardcoded checksums for the compressed output. These tests could fail due to various changes, even if the compressed output remains valid and decompresses correctly.

How To Test

Update the system, verify that it does not break other packages.

User Experience

This change will increase compression efficiency and performance

Dependencies

Zlib is a dependency for over 100 packages. Most of them are expected not to fail or break.

Contingency Plan

  • Contingency mechanism: Revert the change to Zlib and rebuild dependent packages.
  • Contingency deadline: Beta freeze
  • Blocks release? TODO

Documentation

TODO

Release Notes