-
-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/pr/343'
* origin/pr/343: (53 commits) Allow init_t and unconfined_service_t to transition to anything Allow 'xl devd' to get information about all block devices Make SELinux permissive if not yet relabeled Fix Debian build Drop SELinux on Debian Add missing build deps Enable SELinux in Debian build shut up shellcheck Try to get SELinux policy working for Debian minor cleanups Debian fix Fix bogus sed call Debug stuff Avoid unbootable system Try to fix autorelabel Enable SELinux when installing policy Do not install SELinux stuff with SELinux disabled Move SELinux stuff to its package Mark a bunch of packages as noarch Revert "Require relabeling for boot to succeed" ...
- Loading branch information
Showing
23 changed files
with
429 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,10 +8,26 @@ release := $(shell lsb_release -is) | |
|
||
# This makefile uses some bash-isms, make uses /bin/sh by default. | ||
SHELL = /bin/bash | ||
selinux_policies ::= qubes-qfile-unpacker.pp qubes-xendriverdomain.pp \ | ||
qubes-misc.pp | ||
|
||
all: | ||
$(MAKE) -C misc VERSION=$(VERSION) | ||
$(MAKE) -C qubes-rpc | ||
ifdef ENABLE_SELINUX | ||
ifeq ($(ENABLE_SELINUX),1) | ||
$(MAKE) -C selinux -f /usr/share/selinux/devel/Makefile -- $(selinux_policies) | ||
|
||
install-rh: install-selinux | ||
install-deb: install-selinux | ||
|
||
install-selinux: | ||
install -D -m 0644 -t $(DESTDIR)/usr/share/selinux/packages -- $(patsubst %,selinux/%,$(selinux_policies)) | ||
.PHONY: install-selinux | ||
else ifneq ($(ENABLE_SELINUX),0) | ||
$(error bad value for $$(ENABLE_SELINUX)) | ||
endif | ||
endif | ||
|
||
clean: | ||
make -C misc clean | ||
|
@@ -38,6 +54,9 @@ SYSTEM_DROPINS += systemd-random-seed.service | |
SYSTEM_DROPINS += tor.service [email protected] | ||
SYSTEM_DROPINS += systemd-timesyncd.service | ||
SYSTEM_DROPINS += systemd-logind.service | ||
ifeq ($(ENABLE_SELINUX),1) | ||
SYSTEM_DROPINS += selinux-autorelabel.target selinux-autorelabel.service | ||
endif | ||
|
||
SYSTEM_DROPINS_NETWORKING := NetworkManager.service NetworkManager-wait-online.service | ||
SYSTEM_DROPINS_NETWORKING += tinyproxy.service | ||
|
@@ -57,7 +76,7 @@ ifeq ($(release),Ubuntu) | |
|
||
# Debian Dropins | ||
else ifeq ($(release), Debian) | ||
# 'crond.service' is named 'cron.service in Debian | ||
# 'crond.service' is named 'cron.service' in Debian | ||
SYSTEM_DROPINS := $(strip $(patsubst crond.service, cron.service, $(SYSTEM_DROPINS))) | ||
|
||
# Wheezy System Dropins | ||
|
@@ -104,6 +123,9 @@ install-init: | |
# since those scripts are shared between sysvinit and systemd. | ||
install -m 0755 init/*.sh vm-systemd/*.sh $(DESTDIR)$(LIBDIR)/qubes/init/ | ||
install -m 0644 init/functions $(DESTDIR)$(LIBDIR)/qubes/init/ | ||
ifneq ($(ENABLE_SELINUX),1) | ||
rm -f $(DESTDIR)$(LIBDIR)/qubes/init/relabel-root.sh | ||
endif | ||
|
||
# Systemd service files | ||
SYSTEMD_ALL_SERVICES := $(wildcard vm-systemd/qubes-*.service) vm-systemd/dev-xvdc1-swap.service | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/sh -- | ||
set -eu | ||
# shellcheck disable=SC1091 | ||
. /etc/selinux/config | ||
echo 0 > /sys/fs/selinux/enforce | ||
setfiles -r /mnt -- "/etc/selinux/$SELINUXTYPE/contexts/files/file_contexts" /mnt | ||
touch /.qubes-relabeled | ||
rm -f /.autorelabel | ||
systemctl --force poweroff |
Oops, something went wrong.