Bug 2145239

Summary: Add conditional (compat,sanitizers) build in zlib-ng
Product: [Fedora] Fedora Reporter: Jacek Szafarkiewicz <szafar>
Component: zlib-ngAssignee: Tulio Magno Quites Machado Filho <tuliom>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 38CC: otaylor, rjones, szafar, tuliom
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-12-20 22:05:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
zlib-ng.spec patch none

Description Jacek Szafarkiewicz 2022-11-23 15:06:53 UTC
Created attachment 1926724 [details]
zlib-ng.spec patch

Description of problem:
Allow users to rebuild package with/without some key functions
--with compat - replace system zlib
--without sanitizers - build without sanitizers

Comment 1 Ben Cotton 2023-02-07 14:59:45 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 38 development cycle.
Changing version to 38.

Comment 2 Owen Taylor 2023-08-26 17:40:46 UTC
Quite a few package Requires: zlib-devel%{?_isa}, so that (and zlib%{?_isa}) should be in the Provides:

A few package require 'libz-ng.so.2()(64bit)':
  blosc2, nbdkit-basic-filters, python3-imagecodecs

So perhaps it would make more sense to have libz-ng.so.2 build everything twice, and create 4 packages:

  A package that is compatible with zlib
  A devel package that is compatible with zlib
  A package that has the zlib-ng non-compat API
  A devel package for that

Comment 3 Richard W.M. Jones 2023-08-26 18:06:31 UTC
> nbdkit-basic-filters

For this one I only added it recently:
https://src.fedoraproject.org/rpms/nbdkit/c/6bc107126658f95ac78c6fcf9b48be63dbb8594c?branch=rawhide

I would revert that if the normal zlib was faster.

Comment 4 Tulio Magno Quites Machado Filho 2023-08-28 13:41:56 UTC
@szafar Jacek, This is finally moving forward.
I apologize for taking so long to review your patch.
I had to implement a couple of changes, but I'd like to recognize your authorship in the commit.
Could you confirm if I can use "Jacek Szafarkiewicz" <szafar> as the original author of the patch, please?

Comment 5 Tulio Magno Quites Machado Filho 2023-08-28 13:48:02 UTC
(In reply to Owen Taylor from comment #2)
> So perhaps it would make more sense to have libz-ng.so.2 build everything
> twice, and create 4 packages:
> 
>   A package that is compatible with zlib
>   A devel package that is compatible with zlib
>   A package that has the zlib-ng non-compat API
>   A devel package for that

Owen, I agree.
I implemented this in a RFC that is under review https://src.fedoraproject.org/rpms/zlib-ng/pull-request/3
Feedback is welcome!

Comment 6 Jacek Szafarkiewicz 2023-09-14 10:51:03 UTC
This is even better than what I proposed
I will be honored if I am marked as the author ;)

Comment 7 Tulio Magno Quites Machado Filho 2023-12-20 22:05:52 UTC
This has been implemented in https://bodhi.fedoraproject.org/updates/FEDORA-2023-ee87e22b40 and should reach Rawhide soon.