coreos-base/coreos-init, sys-apps/baselayout: Move installing symlinks

Install some of the symlinks in the baselayout package, instead of
coreos-init. Systemd started installing its private libraries in
/usr/lib64/systemd instead of /usr/lib/systemd which led to the
situation where /usr/lib64/systemd stopped being a symlink to
/usr/lib/systemd and became a separate directory. This could break
compatibility with software that expected things to be in
/usr/lib64/systemd.

Some symlink installation stays in init, though. This is to avoid
having them installed for some oem images where they become dangling.
This commit is contained in:
Krzesimir Nowak 2023-02-07 11:54:41 +01:00
parent 86b23cc1be
commit 2644094e6c
4 changed files with 12 additions and 2 deletions

View File

@ -55,8 +55,7 @@ src_install() {
# Create compatibility symlinks in case /usr/lib64/ instead of /usr/lib/ was used
local compat
# os-release symlink is set up in scripts
for compat in modules systemd flatcar coreos kernel modprobe.d pam pam.d sysctl.d udev ; do
for compat in modules flatcar coreos ; do
dosym "../lib/${compat}" "/usr/lib64/${compat}"
done
}

View File

@ -242,4 +242,15 @@ pkg_postinst() {
mkdir -p "${ROOT}/etc/init.d"
ln -sf "${func}" "${ROOT}/etc/init.d/functions.sh"
fi
# install compat symlinks in production images, not in SDK
# os-release symlink is set up in scripts
if ! use cros_host; then
local compat libdir
for compat in systemd kernel modprobe.d pam pam.d sysctl.d udev ; do
for libdir in $(get_all_libdirs) ; do
if [[ "${libdir}" == 'lib' ]]; then continue; fi
ln -sfT "../lib/${compat}" "${ROOT}/usr/${libdir}/${compat}"
done
done
fi
}