From 00cdacfa6ac836f136211f97e78411d07dfb49a7 Mon Sep 17 00:00:00 2001 From: Petr Lautrbach Date: Oct 05 2017 07:03:21 +0000 Subject: Drop policyhelp utility https://fedoraproject.org/wiki/SELinux_Policy_Modules_Packaging_Draft#Build_Dependencies The /usr/share/selinux/devel/policyhelp requirement was necessary to extract the version number of the selinux-policy package being built against, which is used to enforce a minimum version requirement on selinux-policy when the built package is installed. The policyhelp file itself can be found in either the selinux-policy, selinux-policy-devel, or selinux-policy-doc package (depending on OS release), which is why we cannot simply use a package name unless we are prepared to sacrifice spec file portability. From Fedora 20 onwards, this method is no longer necessary, so if your packaging is not targeting any releases prior to Fedora 20 or EPEL-5/6, the /usr/share/selinux/devel/policyhelp requirement is not needed. Resolves: rhbz#1498429 --- diff --git a/selinux-policy.spec b/selinux-policy.spec index f62959c..9dc6293 100644 --- a/selinux-policy.spec +++ b/selinux-policy.spec @@ -154,7 +154,6 @@ Summary: SELinux policy documentation Group: System Environment/Base Requires(pre): selinux-policy = %{version}-%{release} Requires: selinux-policy = %{version}-%{release} -Requires: /usr/bin/xdg-open %description doc SELinux policy documentation package @@ -164,7 +163,6 @@ SELinux policy documentation package %{_mandir}/man*/* %{_mandir}/ru/*/* %doc %{_usr}/share/doc/%{name} -%attr(755,root,root) %{_usr}/share/selinux/devel/policyhelp %define makeCmds() \ make UNK_PERMS=%4 NAME=%1 TYPE=%2 DISTRO=%{distro} UBAC=n DIRECT_INITRC=%3 MONOLITHIC=%{monolithic} MLS_CATS=1024 MCS_CATS=1024 bare \ @@ -433,8 +431,6 @@ mv %{buildroot}%{_usr}/share/selinux/targeted/include %{buildroot}%{_usr}/share/ install -m 644 selinux_config/Makefile.devel %{buildroot}%{_usr}/share/selinux/devel/Makefile install -m 644 doc/example.* %{buildroot}%{_usr}/share/selinux/devel/ install -m 644 doc/policy.* %{buildroot}%{_usr}/share/selinux/devel/ -echo "xdg-open file:///usr/share/doc/selinux-policy/html/index.html"> %{buildroot}%{_usr}/share/selinux/devel/policyhelp -chmod +x %{buildroot}%{_usr}/share/selinux/devel/policyhelp /usr/bin/sepolicy manpage -a -p %{buildroot}/usr/share/man/man8/ -w -r %{buildroot} mkdir %{buildroot}%{_usr}/share/selinux/devel/html mv %{buildroot}%{_usr}/share/man/man8/*.html %{buildroot}%{_usr}/share/selinux/devel/html