Merge branch 'fix-qemu-user-setup' of ngompa/mageia4arm into master
This commit is contained in:
commit
539026f92b
@ -111,6 +111,13 @@ function createchroot()
|
|||||||
error "line ${LINENO} can't start qemu-user-static : exiting"
|
error "line ${LINENO} can't start qemu-user-static : exiting"
|
||||||
exit ${ERR_1}
|
exit ${ERR_1}
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
title "Restarting systemd-binfmt.service"
|
||||||
|
/bin/systemctl restart systemd-binfmt.service
|
||||||
|
if [ ${?} -ne 0 ]; then
|
||||||
|
error "line ${LINENO} can't start qemu-user-static : exiting"
|
||||||
|
exit ${ERR_1}
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
@ -227,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
|
||||||
@ -263,20 +283,6 @@ function preparechroot()
|
|||||||
{
|
{
|
||||||
title "Preparing chrooting in ${BUILD_PATH}"
|
title "Preparing chrooting in ${BUILD_PATH}"
|
||||||
|
|
||||||
#Copying qemu
|
|
||||||
|
|
||||||
/bin/cp /bin/qemu-arm-static "${BUILD_PATH}/usr/bin/"
|
|
||||||
if [ ${?} -ne 0 ]; then
|
|
||||||
error "line ${LINENO} can't copy /bin/qemu-user-static to ${BUILD_PATH}/usr/bin/ : exiting"
|
|
||||||
exit ${ERR_1}
|
|
||||||
fi
|
|
||||||
/bin/cp /usr/lib/binfmt.d/qemu-arm-static.conf "${BUILD_PATH}/usr/lib/binfmt.d"
|
|
||||||
if [ ${?} -ne 0 ]; then
|
|
||||||
error "line ${LINENO} can't copy /usr/lib/binfmt.d/qemu-arm-static.conf to ${BUILD_PATH}/usr/lib/binfmt.d : exiting"
|
|
||||||
exit ${ERR_1}
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
info "making /etc/hostname"
|
info "making /etc/hostname"
|
||||||
echo "${HOSTNAME}" > "${BUILD_PATH}/etc/hostname"
|
echo "${HOSTNAME}" > "${BUILD_PATH}/etc/hostname"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user