microsoft / azurelinux

Linux OS for Azure 1P services and edge appliances
MIT License
4.09k stars 505 forks source link

xz package does not provide unversioned liblzma.so symlink #9217

Open jkoritzinsky opened 2 months ago

jkoritzinsky commented 2 months ago

Describe the bug The xz package provides versioned SOs, /usr/lib/liblzma.so.5 and /usr/lib/liblzma.5.4.4, but it does not provide /usr/lib/liblzma.so. This breaks any tooling that looks up liblzma.so without a version, such as through autotools.

This was found on a docker image based on azurelinuxpreview.azurecr.io/public/azurelinux/base/core:3.0 with no additional packages installed.

To Reproduce Steps to reproduce the behavior:

  1. Run docker run --rm -it azurelinuxpreview.azurecr.io/public/azurelinux/base/core:3.0 bash
  2. In the container, run ls /usr/lib/liblzma.so*

Expected behavior

There should be three files, liblzma.so, liblzma.so.5 and liblzma.so.5.4.4, where they each symlink (possibly transitively) to liblzma.so.5.4.4

zcobol commented 2 months ago

@jkoritzinsky if you inspect the xz.spec the link is created during package installation:

https://github.com/microsoft/azurelinux/blob/5b01d266b2e3b95352548c12c4e501943e45cb77/SPECS/xz/xz.spec#L51

and ls output:

zcobol@azurelinux [ ~ ]$ ls -l /usr/lib/liblzma.so
lrwxrwxrwx 1 root root 30 Apr 23  2022 /usr/lib/liblzma.so -> ../../usr/lib/liblzma.so.5.2.5

I suspect it's a Docker container assembly issue.

jkoritzinsky commented 1 month ago

Yes, I suspect that it is an issue with the Azure Linux 3.0 docker image construction (which I believe is also defined in this repo).