Skip to content

Build failure without libselinux (missing ifeq in GNUmakefile) #7996

@kpcyrd

Description

@kpcyrd

Hello!

We noticed a build failure with 0.1.0 for the uutils-coreutils Arch Linux package if selinux isn't present/available, even with SELINUX_ENABLED=0.

I tracked this down to a missing check in the Makefile, it builds fine with this patch:

diff --git a/GNUmakefile b/GNUmakefile
index f46126a82..58bf7fbdd 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -181,8 +181,6 @@ SELINUX_PROGS := \
 
 ifneq ($(OS),Windows_NT)
 	PROGS := $(PROGS) $(UNIX_PROGS)
-# Build the selinux command even if not on the system
-	PROGS := $(PROGS) $(SELINUX_PROGS)
 endif
 
 UTILS ?= $(PROGS)

The selinux command is currently enabled on "everything that isn't windows", this should instead check ifeq ($(SELINUX_ENABLED),1) in addition.

This is related to #7964, which observes the same problem, but only fixes this for MacOS.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions