mirror of
https://github.com/uutils/coreutils.git
synced 2025-12-23 08:47:37 +00:00
build-gnu.sh: Let SELinux optional to use it locally without libselinux
This commit is contained in:
parent
997d956253
commit
db4439fc69
2 changed files with 3 additions and 7 deletions
2
.github/workflows/GnuTests.yml
vendored
2
.github/workflows/GnuTests.yml
vendored
|
|
@ -244,7 +244,7 @@ jobs:
|
|||
### Build
|
||||
- name: Build binaries
|
||||
run: |
|
||||
lima bash -c "cd ~/work/uutils/ && bash util/build-gnu.sh --release-build"
|
||||
lima bash -c "cd ~/work/uutils/ && SELINUX_ENABLED=1 bash util/build-gnu.sh --release-build"
|
||||
|
||||
### Run tests as user
|
||||
- name: Generate SELinux tests list
|
||||
|
|
|
|||
|
|
@ -105,12 +105,8 @@ 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
|
||||
export SELINUX_ENABLED=1
|
||||
CARGO_FEATURE_FLAGS="${CARGO_FEATURE_FLAGS} selinux"
|
||||
fi
|
||||
export SELINUX_ENABLED # Run this script with=1 for testing SELinux
|
||||
[ "${SELINUX_ENABLED}" = 1 ] && CARGO_FEATURE_FLAGS="${CARGO_FEATURE_FLAGS} selinux"
|
||||
|
||||
# Trim leading whitespace from feature flags
|
||||
CARGO_FEATURE_FLAGS="$(echo "${CARGO_FEATURE_FLAGS}" | sed -e 's/^[[:space:]]*//')"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue