Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1649713 - Review Request: glusterfs-selinux - Gluster file-system specific selinux policy module
Summary: Review Request: glusterfs-selinux - Gluster file-system specific selinux poli...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Nobody's working on this, feel free to take it
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: FE-NEEDSPONSOR FE-DEADREVIEW
TreeView+ depends on / blocked
 
Reported: 2018-11-14 10:46 UTC by Milind Changire
Modified: 2020-07-11 00:49 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-07-11 00:49:06 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Comment 1 Milind Changire 2018-11-14 10:58:13 UTC
FE-NEEDSPONSOR since this is my first Fedora package.

Comment 2 Michael S. 2018-11-14 14:13:33 UTC
So, I can sponsor Milind.

So reading the spec files quickly, there is a few things to clean:

1) There is no more need for BuildRoot, that's done automatically:

BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)

2) The same goes for defattr()

3) Requires:	selinux-policy >= %{selinux_policyver} seems curious, where does POLICY_VERSION come from ?

4) that's minor, but I think SELinux should have the right case in the summary

5) the %files install things in  %{_datadir}/selinux/devel/, but there is no requires on the packages that own that directory (selinux-policy-devel), that seems incorrect (and I found that container-selinux has the same problem).

6) for consistency, I would reuse the macro %modulename in 
%attr(0644,root,root) %{_datadir}/selinux/devel/include/contrib/glusterd.if

7) I am sure we need to have the file in /var/lib/selinux/ tagged with %ghost, especially since that seems to be a internal directory of selinux, so that may change in the future.

Comment 3 Milind Changire 2018-11-15 03:56:23 UTC
(In reply to Michael Scherer from comment #2)
> So, I can sponsor Milind.
> 
> So reading the spec files quickly, there is a few things to clean:
> 
> 1) There is no more need for BuildRoot, that's done automatically:
> 
> BuildRoot:      %(mktemp -ud
> %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)

Removed BuildRoot

> 
> 2) The same goes for defattr()

Removed defattr()

> 
> 3) Requires:	selinux-policy >= %{selinux_policyver} seems curious, where
> does POLICY_VERSION come from ?

Being a novice with SELinux, I'm unaware of where POLICY_VERSION comes from as well.

> 
> 4) that's minor, but I think SELinux should have the right case in the
> summary

Corrected case for SELinux in Summary

> 
> 5) the %files install things in  %{_datadir}/selinux/devel/, but there is no
> requires on the packages that own that directory (selinux-policy-devel),
> that seems incorrect (and I found that container-selinux has the same
> problem).

Does that mean selinux-policy-devel be present on production systems as well ?
I'm just going by the -devel tag now that you mentioned it.

> 
> 6) for consistency, I would reuse the macro %modulename in 
> %attr(0644,root,root) %{_datadir}/selinux/devel/include/contrib/glusterd.if

Replaced glusterd with %{modulename}

> 
> 7) I am sure we need to have the file in /var/lib/selinux/ tagged with
> %ghost, especially since that seems to be a internal directory of selinux,
> so that may change in the future.

I presume item #7 is just a comment and is not an action item on me.

Thanks Michael for the review.

Comment 4 M. Scherer 2018-11-21 08:22:42 UTC
So the problem is I do not know how the selinux subpackages things are supposed to be, and if there is a policy.

And I would need a link to the updated location to look at the spec file and make a more complete test with Fedora review :)

Comment 5 M. Scherer 2018-11-21 08:36:54 UTC
And for the -devel requires, i would suggest a sub package -devel in that package. That's the .if file, that's just needed to build a custom module (afaik), and I do not know how often this happen in practice, and if that's going to cause later some issues.

I think maybe we need to see with the fedora-selinux folks: https://github.com/orgs/fedora-selinux/people

Comment 6 Milind Changire 2018-11-27 09:33:59 UTC
(In reply to M. Scherer from comment #4)
> So the problem is I do not know how the selinux subpackages things are
> supposed to be, and if there is a policy.
> 
> And I would need a link to the updated location to look at the spec file and
> make a more complete test with Fedora review :)

Here's the updated spec file:
https://copr-be.cloud.fedoraproject.org/results/mchangir/glusterfs-selinux/fedora-28-x86_64/00830552-glusterfs-selinux/glusterfs-selinux.spec

Comment 7 Neal Gompa 2018-11-27 18:56:27 UTC
I'm going to ask the (probably dumb) question here... Why isn't this just part of the main glusterfs source tree and just a subpackage in glusterfs package?

Comment 8 Milind Changire 2018-11-28 03:19:38 UTC
(In reply to Neal Gompa from comment #7)
> I'm going to ask the (probably dumb) question here... Why isn't this just
> part of the main glusterfs source tree and just a subpackage in glusterfs
> package?

It may happen that SELinux issues are reported independently of glusterfs. A separate RPM provides facility to fix AVC denials and other SELinux issues without the need for rebuilding and redistributing the entire glusterfs RPM set.

Comment 9 Lukas Vrabec 2019-02-04 10:43:43 UTC
Milind, 

SPEC file looks fine, however I'm not able to find some scratch builds to test it, could you please send me some link?

Thanks,
Lukas.

Comment 10 Milind Changire 2019-02-04 13:30:28 UTC
Lukas,
FYI: https://copr.fedorainfracloud.org/coprs/mchangir/glusterfs-selinux/builds/

I hope you can access this page.

Comment 11 Vit Mojzis 2019-02-05 16:24:02 UTC
Hi, we made some refinements to the recommendations for shipping custom policy (based on feedback and bugs we encountered). Especially the spec file was significantly improved.
Please have a look and update your package accordingly: 
https://fedoraproject.org/wiki/PackagingDrafts/SELinux_Independent_Policy

Comment 12 Package Review 2020-07-11 00:49:06 UTC
This is an automatic action taken by review-stats script.

The ticket submitter failed to clear the NEEDINFO flag in a month.
As per https://fedoraproject.org/wiki/Policy_for_stalled_package_reviews
we consider this ticket as DEADREVIEW and proceed to close it.


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