Description
Rather than depending on a zlib system package as older .NET versions do, .NET 9 has changed to include a modified copy of zlib-ng
bundled inside the runtime itself, so the system dependency isn't needed (although it won't cause problems if installed).
This means that no .NET 9 Runtime packages, regardless of CPU architecture or Debian version, should depend on any zlib packages. .NET 8 and earlier should remain unchanged and continue to depend on zlib1g
.
This dependency is currently declared in DebianPackage.dependencyPackages
. This list entry could be conditional based on version
and maybe a nice call to Compact()
.
I also note that the official Docker images depend on ca-certificates
, so it might be good to throw that in there too (for all .NET Runtime versions) - I think this used to be in here and was maybe removed for some reason.
There are no other dependency changes between the official Docker images between versions 8 and 9, so this change should hopefully be everything needed in this repository for .NET 9 compatibility.
Sources and additional context
- https://github.com/dotnet/dotnet-docker/blob/a3bf352711e43866f305334cd476490c798a6e3f/src/runtime-deps/9.0/bookworm-slim/arm32v7/Dockerfile
- Remove zlib from .NET 9 Runtime Deps images dotnet/dotnet-docker#5715
- Remove
zlib-devel
dependency from azurelinux for .NET 9.0 dotnet/dotnet-buildtools-prereqs-docker#1125 - Plan to migrate to zlib-ng dotnet/runtime#101465
- Migrate to zlib-ng, part 2: consume it in runtime dotnet/runtime#102403
- Migrate to zlib-ng, part 3: Remove zlib and zlib-intel source code and license mentions dotnet/runtime#104399