diff --git a/container-selinux.spec b/container-selinux.spec index 62e489e..9f90b25 100644 --- a/container-selinux.spec +++ b/container-selinux.spec @@ -2,14 +2,8 @@ # container-selinux %global git0 https://github.com/projectatomic/container-selinux -%if 0%{?fedora} || 0%{?rhel} > 7 %global commit0 452b90de0cbc75f0a55defa1d45b7bc337d4f076 %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) -%else -# use upstream's RHEL-1.12 branch for CentOS 7 -%global el_commit0 56c32da8a72f9e7af5daeaebac5b887830d123b1 -%global shortcommit0 %(c=%{el_commit0}; echo ${c:0:7}) -%endif # container-selinux stuff (prefix with ds_ for version/release etc.) # Some bits borrowed from the openstack-selinux package @@ -26,14 +20,10 @@ %global relabel_files() %{_sbindir}/restorecon -R %{_bindir}/*podman* %{_bindir}/*runc* %{_bindir}/*crio %{_bindir}/docker* %{_localstatedir}/run/containerd.sock %{_localstatedir}/run/docker.sock %{_localstatedir}/run/docker.pid %{_sysconfdir}/docker %{_sysconfdir}/crio %{_localstatedir}/log/docker %{_localstatedir}/log/lxc %{_localstatedir}/lock/lxc %{_unitdir}/docker.service %{_unitdir}/docker-containerd.service %{_unitdir}/docker-latest.service %{_unitdir}/docker-latest-containerd.service %{_sysconfdir}/docker %{_libexecdir}/docker* &> /dev/null || : # Version of SELinux we were using -%if 0%{?fedora} >= 22 || 0%{?rhel} > 7 %global selinux_policyver 3.13.1-220 -%else -%global selinux_policyver 3.13.1-39 -%endif Name: container-selinux -%if 0%{?fedora} || 0%{?centos} || 0%{?rhel} > 7 +%if 0%{?fedora} Epoch: 2 %endif Version: 2.69 @@ -41,11 +31,7 @@ Release: 1.git%{shortcommit0}%{?dist} License: GPLv2 URL: %{git0} Summary: SELinux policies for container runtimes -%if 0%{?fedora} || 0%{?rhel} >7 Source0: %{git0}/archive/%{commit0}/%{name}-%{shortcommit0}.tar.gz -%else -Source0: %{git0}/archive/%{el_commit0}/%{name}-%{shortcommit0}.tar.gz -%endif BuildArch: noarch BuildRequires: git BuildRequires: pkgconfig(systemd) @@ -56,11 +42,7 @@ Requires: selinux-policy >= %{selinux_policyver} Requires(post): selinux-policy-base >= %{selinux_policyver} Requires(post): selinux-policy-targeted >= %{selinux_policyver} Requires(post): policycoreutils -%if 0%{?fedora} || 0%{?rhel} > 7 Requires(post): policycoreutils-python-utils -%else -Requires(post): policycoreutils-python -%endif Requires(post): libselinux-utils Requires(post): sed Obsoletes: %{name} <= 2:1.12.5-13 @@ -71,11 +53,7 @@ Provides: docker-selinux = %{epoch}:%{version}-%{release} SELinux policy modules for use with container runtimes. %prep -%if 0%{?fedora} || 0%{?rhel} > 7 %autosetup -Sgit -n %{name}-%{commit0} -%else -%autosetup -Sgit -n %{name}-%{el_commit0} -%endif %build make