Merge branch 'fix/podman-without-selinux' into 'master'

Allow building when SELinux is not used

See merge request redox-os/redox!1549
This commit is contained in:
Jeremy Soller 2025-02-14 15:13:44 +00:00
commit b91d42a541
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
```
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.
## Developer FAQ

View file

@ -5,10 +5,19 @@
IMAGE_TAG?=redox-base
## Working Directory in Podman
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?=$(ROOT)/build/podman
## 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_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)