diff --git a/util/build-gnu.sh b/util/build-gnu.sh index 3d2b509a2f7..5ccb4dca257 100755 --- a/util/build-gnu.sh +++ b/util/build-gnu.sh @@ -105,17 +105,17 @@ fi cd - # Pass the feature flags to make, which will pass them to cargo -"${MAKE}" PROFILE="${UU_MAKE_PROFILE}" CARGOFLAGS="${CARGO_FEATURE_FLAGS}" -# min test for SELinux -[ ${SELINUX_ENABLED} = 1 ] && touch g && "${UU_MAKE_PROFILE}"/stat -c%C g && rm g - -cp "${UU_BUILD_DIR}/install" "${UU_BUILD_DIR}/ginstall" # The GNU tests rename this script before running, to avoid confusion with the make target -# Create *sum binaries -for sum in b2sum b3sum md5sum sha1sum sha224sum sha256sum sha384sum sha512sum; do - sum_path="${UU_BUILD_DIR}/${sum}" - test -f "${sum_path}" || (cd ${UU_BUILD_DIR} && ln -s "hashsum" "${sum}") +# The GNU tests rename install to ginstall to avoid confusion with the make target +"${MAKE}" UTILS=install PROFILE="${UU_MAKE_PROFILE}" CARGOFLAGS="${CARGO_FEATURE_FLAGS}" +ln ${UU_BUILD_DIR}/install ${UU_BUILD_DIR}/ginstall +"${MAKE}" SKIP_UTILS=install MULTICALL=y PROFILE="${UU_MAKE_PROFILE}" CARGOFLAGS="${CARGO_FEATURE_FLAGS}" + +[ ${SELINUX_ENABLED} = 1 ] && sudo chcon -t unconfined_t "${UU_BUILD_DIR}/coreutils" +for binary in $(${UU_BUILD_DIR}/coreutils --list); do + (cd ${UU_BUILD_DIR} && ln -vf coreutils "$binary") done -test -f "${UU_BUILD_DIR}/[" || (cd ${UU_BUILD_DIR} && ln -s "test" "[") +# min test for SELinux +[ ${SELINUX_ENABLED} = 1 ] && "${UU_MAKE_PROFILE}"/touch g && "${UU_MAKE_PROFILE}"/stat -c%C g && "${UU_MAKE_PROFILE}"/rm g ##