build-rootfs: Run ldconfig via QEMU

Using the host's `ldconfig` doesn't work, as it only considers libraries
for the same machine type as itself.  THus, we have to execute the
target's copy, which means running it via QEMU userspace emulation.
This commit is contained in:
2024-12-13 18:47:51 -06:00
parent da64f49bd6
commit b3760e7345

View File

@@ -76,7 +76,7 @@ if [ -f /mnt/gentoo/etc/udev/hwdb.bin ]; then
mv /mnt/gentoo/etc/udev/hwdb.bin /mnt/gentoo/usr/lib/udev/ mv /mnt/gentoo/etc/udev/hwdb.bin /mnt/gentoo/usr/lib/udev/
fi fi
ldconfig -r /mnt/gentoo qemu-${target%%-*} /mnt/gentoo/usr/sbin/ldconfig -r /mnt/gentoo
rm -f /mnt/gentoo/lib/tmpfiles.d/provision.conf rm -f /mnt/gentoo/lib/tmpfiles.d/provision.conf
systemd-tmpfiles --root=/mnt/gentoo -E --exclude-prefix=/var --create systemd-tmpfiles --root=/mnt/gentoo -E --exclude-prefix=/var --create