Skip to content

Commit

Permalink
Only include SELinux when the SELinux flavor is used
Browse files Browse the repository at this point in the history
This avoids pulling in unnecessary dependencies, fixes the R4.1 build,
and allows using SELinux on CentOS Stream later.
  • Loading branch information
DemiMarie committed Feb 5, 2023
1 parent 0e3af1d commit 7a2420a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 1 addition & 2 deletions template_rpm/09_cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ fi

truncate --no-create --size=0 "${INSTALL_DIR}"/var/log/dnf.*

if [[ "$DIST_NAME" = 'fedora' ]] && [[ "$DIST_VER" -ge 37 ]] &&
chroot -- "$INSTALL_DIR" rpm -qv qubes-core-agent-selinux; then
if containsFlavor selinux; then
sed -i -- 's/^SELINUX=\(disabled\|enforcing\)/SELINUX=permissive/' "$INSTALL_DIR/etc/selinux/config"
unshare --mount -- chroot -- "$INSTALL_DIR" /bin/sh -euc 'mount --bind -- / /mnt
umask 0755
Expand Down
1 change: 0 additions & 1 deletion template_rpm/packages_fedora_minimal.list
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
xterm
tar
haveged
selinux-policy-targeted
sudo
--exclude=kdegames
--exclude=firstboot
Expand Down

0 comments on commit 7a2420a

Please sign in to comment.