build_library/set_lsb_release: create compatibility symlink

The os-release file was not only accessible through /usr/lib/ but
also through /usr/lib64 because "lib" was just a symlink.
Now that we split them up into two directories, add a compatibility
symlink in case /usr/lib64 was used to access os-release. A check
is added to also work without the split which is useful if the split
is not done for the SDK at the same time.
This commit is contained in:
Kai Lueke 2022-03-15 11:03:25 +01:00
parent ee46cf104b
commit e2759a3e67

View File

@ -62,6 +62,10 @@ CPE_NAME="cpe:2.3:o:${OS_ID}-linux:${OS_ID}_linux:${FLATCAR_VERSION}:*:*:*:*:*:*
EOF
sudo ln -sf "../usr/lib/os-release" "${ROOT_FS_DIR}/etc/os-release"
sudo ln -sf "../../lib/os-release" "${ROOT_FS_DIR}/usr/share/flatcar/os-release"
# Compat for split of lib64 into lib and lib64
if [ ! -e "${ROOT_FS_DIR}/usr/lib64/os-release" ]; then
sudo ln -sf "../lib/os-release" "${ROOT_FS_DIR}/usr/lib64/os-release"
fi
# Create the defaults for the coreos configuration files in the usr directory
sudo_clobber "${ROOT_FS_DIR}/usr/share/flatcar/release" <<EOF