Allow building when SELinux is not used

Add `USE_SELINUX` variable to `make all`
This commit is contained in:
Leandro Santiago 2025-02-11 15:59:47 +01:00
parent 8363ec046d
commit dcb884549a
2 changed files with 16 additions and 1 deletions

View file

@ -118,6 +118,12 @@ To start the compilation of the default recipes run the command below:
make all make all
``` ```
In case your operating system does not use SELinux, you must set the `USE_SELINUX` to `0` when calling `make all`, otherwise you might experience errors:
```sh
make all USE_SELINUX=0
```
You can find the build system organization and commands on the [Build System](https://doc.redox-os.org/book/build-system-reference.html) page. You can find the build system organization and commands on the [Build System](https://doc.redox-os.org/book/build-system-reference.html) page.
## Developer FAQ ## Developer FAQ

View file

@ -5,10 +5,19 @@
IMAGE_TAG?=redox-base IMAGE_TAG?=redox-base
## Working Directory in Podman ## Working Directory in Podman
CONTAINER_WORKDIR?=/mnt/redox CONTAINER_WORKDIR?=/mnt/redox
## Flag passed to the Podman volumes. :Z can be used only with SELinux
USE_SELINUX=1
ifeq ($(USE_SELINUX),1)
PODMAN_VOLUME_FLAG=:Z
else
PODMAN_VOLUME_FLAG=
endif
## Podman Home Directory ## Podman Home Directory
PODMAN_HOME?=$(ROOT)/build/podman PODMAN_HOME?=$(ROOT)/build/podman
## Podman command with its many arguments ## Podman command with its many arguments
PODMAN_VOLUMES?=--volume $(ROOT):$(CONTAINER_WORKDIR):Z --volume $(PODMAN_HOME):/home:Z PODMAN_VOLUMES?=--volume $(ROOT):$(CONTAINER_WORKDIR)$(PODMAN_VOLUME_FLAG) --volume $(PODMAN_HOME):/home$(PODMAN_VOLUME_FLAG)
PODMAN_ENV?=--env PATH=/home/poduser/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin --env PODMAN_BUILD=0 PODMAN_ENV?=--env PATH=/home/poduser/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin --env PODMAN_BUILD=0
PODMAN_CONFIG?=--env ARCH=$(ARCH) --env BOARD=$(BOARD) --env CONFIG_NAME=$(CONFIG_NAME) --env FILESYSTEM_CONFIG=$(FILESYSTEM_CONFIG) PODMAN_CONFIG?=--env ARCH=$(ARCH) --env BOARD=$(BOARD) --env CONFIG_NAME=$(CONFIG_NAME) --env FILESYSTEM_CONFIG=$(FILESYSTEM_CONFIG)
PODMAN_OPTIONS?=--rm --workdir $(CONTAINER_WORKDIR) --userns keep-id --user `id -u` --interactive --tty --env TERM=$(TERM) PODMAN_OPTIONS?=--rm --workdir $(CONTAINER_WORKDIR) --userns keep-id --user `id -u` --interactive --tty --env TERM=$(TERM)