container-selinux-2.205.0-2.el8

- use conditionals from https://github.com/containers/container-selinux/blob/main/container-selinux.spec.rpkg
- Related: #2176055

Signed-off-by: Jindrich Novy <jnovy@redhat.com>
This commit is contained in:
Jindrich Novy 2023-03-24 15:20:21 +01:00
parent 208434244a
commit 3c7845ec24
2 changed files with 18 additions and 15 deletions

View File

@ -1,12 +0,0 @@
diff -up container-selinux-2.163.0/container.te.orig container-selinux-2.163.0/container.te
--- container-selinux-2.163.0/container.te.orig 2021-06-16 16:14:04.107700701 +0200
+++ container-selinux-2.163.0/container.te 2021-06-16 16:14:29.756010679 +0200
@@ -454,7 +454,7 @@ modutils_domtrans_kmod(container_runtime
systemd_status_all_unit_files(container_runtime_domain)
systemd_start_systemd_services(container_runtime_domain)
systemd_dbus_chat_logind(container_runtime_domain)
-systemd_chat_resolved(container_runtime_domain)
+#systemd_chat_resolved(container_runtime_domain)
userdom_stream_connect(container_runtime_domain)
userdom_search_user_home_content(container_runtime_domain)

View File

@ -20,12 +20,11 @@
Epoch: 2
Name: container-selinux
Version: 2.205.0
Release: 1%{?dist}
Release: 2%{?dist}
License: GPLv2
URL: %{git0}
Summary: SELinux policies for container runtimes
Source0: %{git0}/archive/v%{version}.tar.gz
Patch1: container-selinux-1957904.patch
BuildArch: noarch
BuildRequires: git
BuildRequires: pkgconfig(systemd)
@ -55,8 +54,20 @@ SELinux policy modules for use with container runtimes.
%prep
%autosetup -Sgit
# Not present on old RHEL kernels
# Remove some lines for RHEL 8 build
%if ! 0%{?fedora} && 0%{?rhel} <= 8
sed -i 's/watch watch_reads//' container.if
sed -i '/sysfs_t:dir watch/d' container.te
sed -i '/systemd_chat_resolved/d' container.te
%endif
sed -i 's/man: install-policy/man:/' Makefile
sed -i 's/install: man/install:/' Makefile
# https://github.com/containers/container-selinux/issues/203
%if 0%{?fedora} <= 37 || 0%{?rhel} <= 9
sed -i '/user_namespace/d' container.te
%endif
%build
make
@ -115,6 +126,10 @@ fi
%{_datadir}/udica/templates/*
%changelog
* Fri Mar 24 2023 Jindrich Novy <jnovy@redhat.com> - 2:2.205.0-2
- use conditionals from https://github.com/containers/container-selinux/blob/main/container-selinux.spec.rpkg
- Related: #2176055
* Tue Mar 21 2023 Jindrich Novy <jnovy@redhat.com> - 2:2.205.0-1
- update to https://github.com/containers/container-selinux/releases/tag/v2.205.0
- remove user_namespace class, thanks to Lokesh Mandvekar