test: a couple of assorted cleanups

- sort binaries
- send stdout/stderr of the autorelabel service to console as well
This commit is contained in:
Frantisek Sumsal 2023-06-05 22:41:46 +02:00
parent fa5dee77c0
commit d5ab23aa54
3 changed files with 4 additions and 4 deletions

View file

@ -43,9 +43,8 @@ test_append_files() {
mkdir "$workspace/systemd-test-module"
cp -v systemd_test.* "$workspace/systemd-test-module/"
image_install checkmodule load_policy m4 make sefcontext_compile semodule semodule_package runcon
image_install -o sesearch
image_install runcon
image_install checkmodule semodule semodule_package m4 make load_policy sefcontext_compile
image_install -o /usr/libexec/selinux/hll/pp # Fedora/RHEL/...
image_install -o /usr/lib/selinux/hll/pp # Debian/Ubuntu/...

View file

@ -798,7 +798,7 @@ setup_selinux() {
fi
local conf_dir=/etc/selinux
local fixfiles_tools=(awk bash cat chcon expr find grep head secon setfiles rm sort uname uniq)
local fixfiles_tools=(awk bash cat chcon expr egrep find grep head secon setfiles rm sort uname uniq)
# Make sure the following statement can't expand to "/" to prevent
# a potential where-are-my-backups situation

View file

@ -10,10 +10,11 @@ ConditionSecurity=selinux
ConditionPathExists=|/.autorelabel
[Service]
ExecStart=sh -x -c 'echo 0 >/sys/fs/selinux/enforce && fixfiles -f -F relabel && rm /.autorelabel && systemctl --force reboot'
ExecStart=sh -xec 'echo 0 >/sys/fs/selinux/enforce; fixfiles -f -F relabel; rm /.autorelabel; systemctl --force reboot'
Type=oneshot
TimeoutSec=0
RemainAfterExit=yes
StandardOutput=journal+console
[Install]
WantedBy=basic.target