1
0

Work around issues with filesystem package by preparing chroot skeleton

There are issues with the filesystem package in Mageia that lead to
unpredictable setup for the filesystem hierarchy when setting up
chroots. In order to work around this problem, let's create some
of the basic paths ourselves while we wait for the issue to be fixed.

Reference: https://bugs.mageia.org/show_bug.cgi?id=26044
This commit is contained in:
Neal Gompa 2020-01-12 04:05:01 -05:00
parent 57d9815a48
commit 5b42a8d15b

View File

@ -234,6 +234,19 @@ function installbasesystem()
info "Build path exists" info "Build path exists"
fi fi
# Workaround mga#26044.
info "Preparing root filesystem tree"
mkdir -p "${BUILD_PATH}/usr/bin"
mkdir -p "${BUILD_PATH}/usr/sbin"
mkdir -p "${BUILD_PATH}/usr/lib"
ln -sr "${BUILD_PATH}/usr/bin" "${BUILD_PATH}/bin"
ln -sr "${BUILD_PATH}/usr/sbin" "${BUILD_PATH}/sbin"
ln -sr "${BUILD_PATH}/usr/lib" "${BUILD_PATH}/lib"
if [ "${ARM_VERSION}" = "aarch64" ]; then
mkdir -p "${BUILD_PATH}/usr/lib64"
ln -sr "${BUILD_PATH}/usr/lib64" "${BUILD_PATH}/lib64"
fi
title "installing basesystem" title "installing basesystem"
/usr/bin/dnf --installroot="${BUILD_PATH}" ${DNF_MIRROROPTS} --assumeyes install shadow-utils basesystem-minimal /usr/bin/dnf --installroot="${BUILD_PATH}" ${DNF_MIRROROPTS} --assumeyes install shadow-utils basesystem-minimal
if [ ${?} -ne 0 ]; then if [ ${?} -ne 0 ]; then