| Summary: | selinux-policy.spec: add option to skip building the -doc package | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Mr-4 <mr.dash.four> | ||||
| Component: | selinux-policy | Assignee: | Miroslav Grepl <mgrepl> | ||||
| Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 15 | CC: | dominick.grift, dwalsh, mgrepl | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2012-02-06 17:14:24 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Attachments: |
|
||||||
|
Description
Mr-4
2011-06-25 20:30:50 UTC
Created attachment 509924 [details]
Patch allowing the doc sub-package to be excluded when building the selinux policy rpm
Looks reasonable. Lost this in the weeds. Fixed in selinux-policy-3.10.0-83.fc17 OK, seen that I submitted this over 6 months ago - when my rpm-building experience wasn't all that, I have a few optimisations to make (will re-submit a separate patch, if needed - just let me know if that is the case):
%if %{?BUILD_DOC:0}%{!?BUILD_DOC:1}
%define BUILD_DOC 1
%endif
[...]
+%if %{BUILD_DOC}
make UNK_PERMS=allow NAME=targeted TYPE=mcs DISTRO=%{distro} UBAC=n DIRECT_INITRC=n MONOLITHIC=%{monolithic} DESTDIR=%{buildroot} PKGNAME=%{name}-%{version} POLY=y MLS_CATS=1024 MCS_CATS=1024 install-headers install-docs
+%else
+make UNK_PERMS=allow NAME=targeted TYPE=mcs DISTRO=%{distro} UBAC=n DIRECT_INITRC=n MONOLITHIC=%{monolithic} DESTDIR=%{buildroot} PKGNAME=%{name}-%{version} POLY=y MLS_CATS=1024 MCS_CATS=1024 install-headers
+%endif
Could be transformed/optimised with the following:
%if %{?BUILD_DOC:0}%{!?BUILD_DOC:1}
%define BUILD_DOC 1
%define docs-target install-docs
%else
%define docs-target %{nil}
%endif
[...]
make UNK_PERMS=allow NAME=targeted TYPE=mcs DISTRO=%{distro} UBAC=n DIRECT_INITRC=n MONOLITHIC=%{monolithic} DESTDIR=%{buildroot} PKGNAME=%{name}-%{version} POLY=y MLS_CATS=1024 MCS_CATS=1024 install-headers %{docs-target}
I had done a different optimization but I kind of like yours. (In reply to comment #4) > %endif > > [...] > > make UNK_PERMS=allow NAME=targeted TYPE=mcs DISTRO=%{distro} UBAC=n > DIRECT_INITRC=n MONOLITHIC=%{monolithic} DESTDIR=%{buildroot} > PKGNAME=%{name}-%{version} POLY=y MLS_CATS=1024 MCS_CATS=1024 install-headers > %{docs-target} Is it working for you? It wants docs_target instead of docs-target. But there is another issue. Yeah, I didn't actually test it (apparently, Fedora's RPM got confused by the dash in "docs-target"), but the following *does* work (tried and tested - promise!):
%if %{?BUILD_DOC:0}%{!?BUILD_DOC:1}
%define BUILD_DOC 1
%define docstarget install-docs
%else
%define docstarget %{nil}
%endif
[...]
make UNK_PERMS=allow NAME=targeted TYPE=mcs DISTRO=%{distro} UBAC=n
DIRECT_INITRC=n MONOLITHIC=%{monolithic} DESTDIR=%{buildroot}
PKGNAME=%{name}-%{version} POLY=y MLS_CATS=1024 MCS_CATS=1024 install-headers
%{docstarget}
On a separate note - any chance you can get Bug 716632 pulled "out of the weeds" as well?
That one has been fixed for a while.
man semodule_expand
...
-a Do not check assertions. This will cause the policy to not
check any neverallow rules.
|