Skip to content

Commit 5be2964

Browse files
authored
Fix build failure without libselinux
1 parent 8fc9d28 commit 5be2964

File tree

2 files changed

+5
-12
lines changed

2 files changed

+5
-12
lines changed

.github/workflows/CICD.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -273,10 +273,7 @@ jobs:
273273
target: aarch64-unknown-linux-gnu
274274
- uses: taiki-e/install-action@nextest
275275
- uses: Swatinem/rust-cache@v2
276-
- name: Install/setup prerequisites
277-
shell: bash
278-
run: |
279-
sudo apt-get -y update ; sudo apt-get -y install libselinux1-dev
276+
# Test build on the system missing libselinux (don't install libselinux1-dev at here)
280277
- name: Run sccache-cache
281278
uses: mozilla-actions/sccache-action@v0.0.9
282279
- name: "`make build`"

GNUmakefile

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -195,15 +195,11 @@ HASHSUM_PROGS := \
195195

196196
$(info Detected OS = $(OS))
197197

198-
# Build the SELinux programs only on Linux
199-
ifeq ($(filter $(OS),Linux),)
200-
SELINUX_PROGS :=
201-
endif
202-
203198
ifneq ($(OS),Windows_NT)
204-
PROGS := $(PROGS) $(UNIX_PROGS)
205-
# Build the selinux command even if not on the system
206-
PROGS := $(PROGS) $(SELINUX_PROGS)
199+
PROGS += $(UNIX_PROGS)
200+
endif
201+
ifeq ($(SELINUX_ENABLED),1)
202+
PROGS += $(SELINUX_PROGS)
207203
endif
208204

209205
UTILS ?= $(filter-out $(SKIP_UTILS),$(PROGS))

0 commit comments

Comments
 (0)