Bug 1498429 - selinux-policy-doc requires xdg-utils because of /usr/share/selinux/devel/policyhelp
Summary: selinux-policy-doc requires xdg-utils because of /usr/share/selinux/devel/pol...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-10-04 09:55 UTC by Petr Pisar
Modified: 2017-12-23 21:33 UTC (History)
6 users (show)

Fixed In Version: selinux-policy-3.13.1-283.10.fc27
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-10-17 00:13:23 UTC
Type: Bug


Attachments (Terms of Use)
Build-condition for removing the script (2.48 KB, patch)
2017-10-04 13:22 UTC, Petr Pisar
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1528774 0 unspecified CLOSED totpcgi FTBFS in rawhide 2021-02-22 00:41:40 UTC

Internal Links: 1528774

Description Petr Pisar 2017-10-04 09:55:58 UTC
selinux-policy-doc delivers /usr/share/selinux/devel/policyhelp script that opens SELinux documentation with an HTML viewer. For that purpose the package requires xdg-utils.

While polishing Platform module <https://github.com/fedora-modularity/hp/blob/master/README.md> for the modular Fedora and I found this is a problem. Platform module does not deliver xdg-utils and thus selinux-policy-doc cannot be installed. Currently xdg-utils has enormous build dependencies (Java etc.) that we do not want to maintain in the Platform module. I come up with a few solutions:

(1) Prune xdg-utils dependencies and add xdg-utils with its dependency tree into the Platform module. We could do it, but I don't like it.

(2) Remove the xdg-utils dependency from selinux-policy-doc. At least when building for the Platform module by adding a build condition (%bcond_without macro). User could use the policyhelp script after installing xdg-utils from a different Fedora module.

(3) Remove the policyhelp script from selinux-policy-doc package. That would be the easiest fix and I consider it quite tempting because I could not find a purpose for the script. No package in Fedora requires selinux-policy-doc package, thus obviously no program in Fedora executes the policyhelp script. Provided the script is not in standard PATH either users do not run it. That leads me to a question what purpose the script has?

How would you like to solve this issue (unwanted dependency on xdg-utils)? Would make sense to remove policyhelp script completely?

Comment 1 Petr Pisar 2017-10-04 13:22:47 UTC
Created attachment 1334244 [details]
Build-condition for removing the script

Here is an example how a build-condition can be used to omit the script from installation.

Comment 2 Petr Lautrbach 2017-10-04 14:14:52 UTC
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.


Given the statement above, I think it's time to dump it.

Comment 3 Petr Pisar 2017-10-04 14:36:18 UTC
Glad to hear it. No code is the best code.

Comment 5 Petr Lautrbach 2017-10-05 08:31:01 UTC
And I think it's safe to do it in f27 as well

https://src.fedoraproject.org/rpms/selinux-policy/c/aabc4dde0f5d43f48417944415c9ade90be6cf18?branch=f27

Comment 6 Fedora Update System 2017-10-10 11:54:32 UTC
selinux-policy-3.13.1-283.9.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-b88dbd6444

Comment 7 Fedora Update System 2017-10-11 06:29:31 UTC
selinux-policy-3.13.1-283.9.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-b88dbd6444

Comment 8 Fedora Update System 2017-10-12 00:55:27 UTC
selinux-policy-3.13.1-283.10.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-b88dbd6444

Comment 9 Fedora Update System 2017-10-17 00:13:23 UTC
selinux-policy-3.13.1-283.10.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.