fedora-silverblue / issue-tracker

Fedora Silverblue issue tracker
https://fedoraproject.org/atomic-desktops/silverblue/
123 stars 3 forks source link

RPMs using alternatives do not install properly in rpm-ostree container #430

Closed bsherman closed 1 month ago

bsherman commented 1 year ago

Describe the bug rpm-ostree install of an RPM which uses the alternatives system (eg, netcat) fails when run in a Containerfile.

To Reproduce Given a simple Containerfile:

FROM quay.io/fedora-ostree-desktops/silverblue:37.20230311.0.09be88fd
RUN rpm-ostree install netcat && ls -l /usr/bin/nc

Run build: podman build -f Containerfile --tag test-netcat

rpm-ostree install will log an informative message: admindir /var/lib/alternatives invalid

And the example will fail with /usr/bin/nc not found.

Expected behavior

RPMs depending on alternatives should succeed when built via container rpm-ostree install.

OS version:

quay.io/fedora-ostree-desktops/silverblue:37.20230311.0.09be88fd

Additional context

As a workaround, one can mkdir -p /var/lib/alternatives in Containerfile before rpm-ostree install. However, then ostree container commit will fail due to existence of files in /var... a specific example:

Found file: "var/lib/alternatives/nc"

This error being similar to #413 , the further workaround is to rm the file.

travier commented 1 year ago

See:

Packages using alternative are not working well with rpm-ostree based systems right now.

bsherman commented 1 year ago

Thank you for the references.

travier commented 1 month ago

https://github.com/fedora-sysv/chkconfig/pull/135 has been merged. I have not checked the implications for existing and new systems yet.

travier commented 1 month ago

This is now tracked in https://gitlab.com/fedora/bootc/tracker/-/issues/7 for the bootc side of things and https://gitlab.com/fedora/ostree/sig/-/issues/51 for the Atomic Desktops part.