From 5be296423068e9838a450257edced2b1d54e37f0 Mon Sep 17 00:00:00 2001 From: oech3 <79379754+oech3@users.noreply.github.com> Date: Sat, 15 Nov 2025 22:10:05 +0900 Subject: [PATCH] Fix build failure without libselinux --- .github/workflows/CICD.yml | 5 +---- GNUmakefile | 12 ++++-------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index 5486650e4fc..5cd9526e8e8 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -273,10 +273,7 @@ jobs: target: aarch64-unknown-linux-gnu - uses: taiki-e/install-action@nextest - uses: Swatinem/rust-cache@v2 - - name: Install/setup prerequisites - shell: bash - run: | - sudo apt-get -y update ; sudo apt-get -y install libselinux1-dev + # Test build on the system missing libselinux (don't install libselinux1-dev at here) - name: Run sccache-cache uses: mozilla-actions/sccache-action@v0.0.9 - name: "`make build`" diff --git a/GNUmakefile b/GNUmakefile index f200641d49a..aff779f3ef9 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -195,15 +195,11 @@ HASHSUM_PROGS := \ $(info Detected OS = $(OS)) -# Build the SELinux programs only on Linux -ifeq ($(filter $(OS),Linux),) - SELINUX_PROGS := -endif - ifneq ($(OS),Windows_NT) - PROGS := $(PROGS) $(UNIX_PROGS) -# Build the selinux command even if not on the system - PROGS := $(PROGS) $(SELINUX_PROGS) + PROGS += $(UNIX_PROGS) +endif +ifeq ($(SELINUX_ENABLED),1) + PROGS += $(SELINUX_PROGS) endif UTILS ?= $(filter-out $(SKIP_UTILS),$(PROGS))