Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 905376 - Provide a virtual or app-alternatives for sys-libs/zlib-ng
Summary: Provide a virtual or app-alternatives for sys-libs/zlib-ng
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement with 1 vote (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-30 14:14 UTC by Forza
Modified: 2024-04-17 10:17 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Forza 2023-04-30 14:14:20 UTC
sys-libs/zlib-ng has a "compat" USE flag so that it can be a drop-in replacement to the standard zlib library. However, most packages that depend on zlib, depends on sys-libs/zlib, which of course is blocked by the now installed zlib-ng library. 

It would be good if we could have an option to choose the zlib-ng library in a better way. For example with app-alternatives/zlib, eselect zlib or virtusl/zlib to overcome this problem. 

I am aware that replacing zlib with zlib-ng system-wide is not recommended, however upstream do say that bug reports are welcome if there are issues with this. To this end, having this option could help finding issues for that project.

https://github.com/zlib-ng/zlib-ng
Comment 1 Yuki N. 2023-04-30 14:42:50 UTC
Almost all packages that require zlib as BDEPEND are fail to built with zlib-ng USE=compat, so it's too early for your request.
Comment 2 Aidan Harris 2024-04-17 10:17:56 UTC
I think it might be time to take another look at this in light of Fedora transitioning to zlib-ng with Fedora 40:
https://bugzilla.redhat.com/show_bug.cgi?id=2252767

Most packages do not fail to compile anymore (at least as far as I can tell) and the few that do like Perl have patches available (I submitted a pull request for that here: https://github.com/gentoo/gentoo/pull/36291)

We can add USE="minizip" to zlib-ng (https://github.com/gentoo/gentoo/pull/36290) and then make a virtual/zlib with:

IUSE="minizip"

RDEPEND="|| (
    sys-libs/zlib[minizip?]
    sys-libs/zlib-ng[compat,minizip?]
)"

Packages can switch to the virtual slowly over time (keep zlib-ng[compat] masked). There's no need to change everything in one go.