feat: allow glibc ld files in etc

Allow both /etc/ld.so.conf and /etc/ld.so.cache files in /etc since tools expect these to be standard.

See: https://github.com/siderolabs/extensions/pull/1031

Replaces changes for Dockerfile from #12909

Signed-off-by: Noel Georgi <git@frezbo.dev>
(cherry picked from commit 414f78a298fc1a196fe310b17b89d3aadc15e1b4)
This commit is contained in:
Noel Georgi 2026-04-04 20:53:05 +03:00 committed by Andrey Smirnov
parent 9be7bc0250
commit 33b89cff72
No known key found for this signature in database
GPG Key ID: 322C6F63F594CE7C
2 changed files with 2 additions and 4 deletions

View File

@ -787,8 +787,6 @@ RUN <<END
ln -s /usr/local/bin/nvidia-ctk /rootfs/usr/bin/nvidia-ctk
ln -s /usr/local/bin/nvidia-cdi-hook /rootfs/usr/bin/nvidia-cdi-hook
ln -s /usr/local/sbin/nvme /rootfs/usr/bin/nvme
ln -s ../usr/local/glibc/etc/ld.so.conf /rootfs/etc/ld.so.conf
ln -s ../usr/local/glibc/etc/ld.so.cache /rootfs/etc/ld.so.cache
END
FROM build AS rootfs-base-arm64
@ -880,8 +878,6 @@ RUN <<END
ln -s /usr/local/bin/nvidia-ctk /rootfs/usr/bin/nvidia-ctk
ln -s /usr/local/bin/nvidia-cdi-hook /rootfs/usr/bin/nvidia-cdi-hook
ln -s /usr/local/sbin/nvme /rootfs/usr/bin/nvme
ln -s ../usr/local/glibc/etc/ld.so.conf /rootfs/etc/ld.so.conf
ln -s ../usr/local/glibc/etc/ld.so.cache /rootfs/etc/ld.so.cache
END
FROM build-go AS build-sbom

View File

@ -19,6 +19,8 @@ var AllowedPaths = []string{
"/usr/lib/ld-linux-aarch64.so.1",
// /sbin/ldconfig is required by the nvidia container toolkit.
"/usr/bin/ldconfig",
"/etc/ld.so.conf",
"/etc/ld.so.cache",
"/usr/lib/udev/rules.d",
"/usr/local",
// glvnd, egl and vulkan are needed for OpenGL/Vulkan.