diff --git a/GNUmakefile b/GNUmakefile index f46126a82f5..8d7179b5eb8 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -267,8 +267,8 @@ TEST_NO_FAIL_FAST :=--no-fail-fast TEST_SPEC_FEATURE := test_unimplemented else ifeq ($(SELINUX_ENABLED),1) TEST_NO_FAIL_FAST := -TEST_SPEC_FEATURE := selinux -BUILD_SPEC_FEATURE := selinux +TEST_SPEC_FEATURE := feat_selinux +BUILD_SPEC_FEATURE := feat_selinux endif define TEST_BUSYBOX diff --git a/util/build-gnu.sh b/util/build-gnu.sh index 22e1df10365..9a7de0ab327 100755 --- a/util/build-gnu.sh +++ b/util/build-gnu.sh @@ -2,8 +2,7 @@ # `build-gnu.bash` ~ builds GNU coreutils (from supplied sources) # -# spell-checker:ignore (paths) abmon deref discrim eacces getlimits getopt ginstall inacc infloop inotify reflink ; (misc) INT_OFLOW OFLOW -# spell-checker:ignore baddecode submodules xstrtol distros ; (vars/env) SRCDIR vdir rcexp xpart dired OSTYPE ; (utils) gnproc greadlink gsed multihardlink texinfo CARGOFLAGS +# spell-checker:ignore (paths) abmon deref discrim eacces getlimits getopt ginstall inacc infloop inotify reflink ; (misc) INT_OFLOW OFLOW baddecode submodules xstrtol distros ; (vars/env) SRCDIR vdir rcexp xpart dired OSTYPE ; (utils) gnproc greadlink gsed multihardlink texinfo set -e @@ -29,7 +28,6 @@ REPO_main_dir="$(dirname -- "${ME_dir}")" # Default profile is 'debug' UU_MAKE_PROFILE='debug' -CARGO_FEATURE_FLAGS="" for arg in "$@" do @@ -95,20 +93,9 @@ echo "UU_BUILD_DIR='${UU_BUILD_DIR}'" cd "${path_UUTILS}" && echo "[ pwd:'${PWD}' ]" -# Check for SELinux support if [ "$(uname)" == "Linux" ]; then - # Only attempt to enable SELinux features on Linux + # only set on linux export SELINUX_ENABLED=1 - CARGO_FEATURE_FLAGS="${CARGO_FEATURE_FLAGS} selinux" -fi - -# Trim leading whitespace from feature flags -CARGO_FEATURE_FLAGS="$(echo "${CARGO_FEATURE_FLAGS}" | sed -e 's/^[[:space:]]*//')" - -# If we have feature flags, format them correctly for cargo -if [ ! -z "${CARGO_FEATURE_FLAGS}" ]; then - CARGO_FEATURE_FLAGS="--features ${CARGO_FEATURE_FLAGS}" - echo "Building with cargo flags: ${CARGO_FEATURE_FLAGS}" fi # Set up quilt for patch management @@ -124,12 +111,7 @@ else fi cd - -# Pass the feature flags to make, which will pass them to cargo -"${MAKE}" PROFILE="${UU_MAKE_PROFILE}" CARGOFLAGS="${CARGO_FEATURE_FLAGS}" -touch g -echo "stat with selinux support" -./target/debug/stat -c%C g || true - +"${MAKE}" PROFILE="${UU_MAKE_PROFILE}" 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