Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 525724 - sys-apps/irqbalance needs RDEPEND selinux? dependency to sec-policy/selinux-irqbalance
Summary: sys-apps/irqbalance needs RDEPEND selinux? dependency to sec-policy/selinux-i...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: SELinux (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Sven Vermeulen (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 527868
  Show dependency tree
 
Reported: 2014-10-18 05:29 UTC by Eric Gisse
Modified: 2018-10-24 09:40 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
irqbalance ebuild with selinux use flag (irqbalance-1.0.7.ebuild,1.15 KB, text/plain)
2014-11-01 20:23 UTC, Eric Gisse
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Gisse 2014-10-18 05:29:01 UTC
The sys-apps/irqbalance package does not want to function out of the box in a full enforcing selinux environment.

The pieces are there - the package just needs a little TLC.

Basically, there is no selinux use flag. 

This means the sec-policy/selinux-irqbalance policy package does not get installed, so currently this is a manual process. 



Reproducible: Always

Steps to Reproduce:
1. Have "selinux" in the use flags.
2. Build irqbalance.
3. You don't get the policy.
Actual Results:  
A bunch of denials in the avc log due to no policy.

Expected Results:  
No denials.

I am doing a full selinux enforcing build on gentoo, managed by puppet. I'm running into a bunch of little issues and will be reporting as I find them and confirm they are bugs rather than "user error".
Comment 1 Sven Vermeulen (RETIRED) gentoo-dev 2014-11-01 19:35:28 UTC
Is it sufficient to have selinux-irqbalance as a dep for irqbalance? Or are there any additional requirements to get it working?
Comment 2 Eric Gisse 2014-11-01 20:02:55 UTC
The existing policy file works perfect for irqbalance. I have zero entries in my avc log relating to this, so adding the policy as a dep would solve this perfectly.

There's a few others that have this (easy to solve) issue. I'll file bugs when I get back around to going through my avc log / puppet manifest to get the corner cases sorted out.
Comment 3 Eric Gisse 2014-11-01 20:23:09 UTC
Created attachment 388176 [details]
irqbalance ebuild with selinux use flag

Here, how about this? It has the appropriate use flag + rdep, and when setup in my local overlay it works happily.
Comment 4 Sven Vermeulen (RETIRED) gentoo-dev 2014-11-02 14:26:34 UTC
The ebuild you suggested also enables the dependency in DEPEND (as you have DEPEND="${RDEPEND} in it), which shouldn't be the case.

@base-system herd, would it be possible to add in the following to the irqbalance package?

IUSE="selinux"
RDEPEND="selinux? ( sec-policy/selinux-irqbalance )"

I can do it for you (with revbump) if you don't have anything in the queue; otherwise this can wait a bit if you think you're going to bump anyway soonish.

Index: irqbalance-1.0.7.ebuild
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-apps/irqbalance/irqbalance-1.0.7.ebuild,v
retrieving revision 1.1
diff -u -B -r1.1 irqbalance-1.0.7.ebuild
--- irqbalance-1.0.7.ebuild     19 Mar 2014 16:58:31 -0000      1.1
+++ irqbalance-1.0.7.ebuild     2 Nov 2014 14:26:13 -0000
@@ -15,13 +15,16 @@
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~amd64 ~ppc ~x86"
-IUSE="caps +numa"
+IUSE="caps +numa selinux"
 
-RDEPEND="dev-libs/glib:2
+CDEPEND="dev-libs/glib:2
        caps? ( sys-libs/libcap-ng )
        numa? ( sys-process/numactl )"
-DEPEND="${RDEPEND}
+DEPEND="${CDEPEND}
        virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+       selinux? ( sec-policy/selinux-irqbalance )
+"
 
 pkg_setup() {
        CONFIG_CHECK="~PCI_MSI"
Comment 5 SpanKY gentoo-dev 2014-11-02 18:14:07 UTC
(In reply to Sven Vermeulen from comment #4)

feel free to fix
Comment 6 Sven Vermeulen (RETIRED) gentoo-dev 2014-11-08 16:33:39 UTC
Okay, irqbalance-1.0.7-r1 has the dependency in it (~arch for now)
Comment 7 Eric Gisse 2014-11-08 19:36:50 UTC
Just pulled irqbalance out of the local overlay, did a sync, removed irqbalance and its' policy, then tried to reinstall:

(I run on ~arch by default, for better or worse)

# emerge irqbalance -av

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild     U  ] sec-policy/selinux-base-2.20140311-r7 [2.20140311-r6] USE="open_perms peer_perms ubac unconfined -doc" 279 KiB
[ebuild     U  ] sec-policy/selinux-base-policy-2.20140311-r7 [2.20140311-r6] USE="unconfined" 0 KiB
[ebuild  N     ] sec-policy/selinux-irqbalance-2.20140311-r7  0 KiB
[ebuild  N     ] sys-apps/irqbalance-1.0.7-r1  USE="caps numa (selinux)" 0 KiB

The new ebuild worked fine from my point of view, less any issues relating to my policy development (selinux-base-policy does not like that!).