Repository navigation
Add docker seliux policy for rpm - #15832
Conversation
db4fd98 to
68c5e1f
Compare
|
👎 I would like to have clarity on the license. If this is based on https://github.com/fedora-cloud/docker-selinux which is dual-licensed under the LGPL (LICENSE file) and GPLv2 (see docker-selinux.spec), then there could be a barrier to including this policy. Neither license is compatible with the Apache license: https://www.apache.org/legal/resolved.html#category-x @jfrazelle could you verify if this is the source you used, or if there is some other package you've derived from? I would also appreciate if @rhatdan might have input. Perhaps there is a package (new or old) shipping with a policy we're able to bundle? Worst-case we might need to ship as a separate package? (Note we're not actually linking code here, so perhaps it's okay to simply have this work in the same repository and shipped in the same packages. IANAL and only wish to make sure we do the right thing!) |
|
I used a weird tarball from a fedora git url, hang on I believe it said GNU |
68c5e1f to
86fc059
Compare
86fc059 to
b03cacf
Compare
|
So the way I pacakged the rpm it is a seperate package that the On Tue, Aug 25, 2015 at 1:22 PM, Eric Windisch [email protected]
|
|
Checking more carefully at the commit, because it creates a new RPM it's probably fine. |
a625459 to
0b03fcd
Compare
|
As long as it is a separate RPM I believe it is fine. IANAL. You are On 08/25/2015 05:16 PM, Eric Windisch wrote:
|
|
I mentioned this to @jfrazelle on IRC, but Perhaps instead of including another SElinux policy, it's worth reviewing the upstream policy and just adding a |
|
We want to control our own policy to ensure things don't break. |
There was a problem hiding this comment.
This is too high for EL7-derived distros. The latest RPM in EL7 is selinux-policy-3.13.1-23.0.1.el7_1.13.noarch
There was a problem hiding this comment.
I will fix for oracle
On Wed, Aug 26, 2015 at 6:27 PM, Avi Miller [email protected]
wrote:
In hack/make/.build-rpm/docker-engine.spec
#15832 (comment):@@ -50,6 +50,27 @@ Requires: kernel-uek >= 3.8
Requires: device-mapper >= 1.02.90-2
%endif+# docker-selinux conditional
+%if 0%{?fedora} >= 22 || 0%{?centos} >= 7 || 0%{?rhel} >= 7 || 0%{?oracle} >= 7
+%global with_selinux 1
+%endif
+
+# start if with_selinux
+%if 0%{?with_selinux}
+# Version of SELinux we were using
+%if 0%{?fedora} >= 22
+%global selinux_policyver 3.13.1-119
+%else
+%global selinux_policyver 3.13.1-39This is too high for EL7-derived distros. The latest RPM in EL7 is
selinux-policy-3.13.1-23.0.1.el7_1.13.noarch—
Reply to this email directly or view it on GitHub
https://github.com/docker/docker/pull/15832/files#r38054339.
There was a problem hiding this comment.
or 7 sorry
On Wed, Aug 26, 2015 at 6:44 PM, Jessie Frazelle [email protected] wrote:
I will fix for oracle
On Wed, Aug 26, 2015 at 6:27 PM, Avi Miller [email protected]
wrote:In hack/make/.build-rpm/docker-engine.spec
#15832 (comment):@@ -50,6 +50,27 @@ Requires: kernel-uek >= 3.8
Requires: device-mapper >= 1.02.90-2
%endif+# docker-selinux conditional
+%if 0%{?fedora} >= 22 || 0%{?centos} >= 7 || 0%{?rhel} >= 7 || 0%{?oracle} >= 7
+%global with_selinux 1
+%endif
+
+# start if with_selinux
+%if 0%{?with_selinux}
+# Version of SELinux we were using
+%if 0%{?fedora} >= 22
+%global selinux_policyver 3.13.1-119
+%else
+%global selinux_policyver 3.13.1-39This is too high for EL7-derived distros. The latest RPM in EL7 is
selinux-policy-3.13.1-23.0.1.el7_1.13.noarch—
Reply to this email directly or view it on GitHub
https://github.com/docker/docker/pull/15832/files#r38054339.
There was a problem hiding this comment.
Yeah, it's the same RPM version for CentOS7 (and RHEL7).
0b03fcd to
3ba82eb
Compare
|
I'm getting the following error trying to build |
3ba82eb to
bafdc6e
Compare
|
fixed moved too fast |
|
We have been asked by the upstream developers of selinux-policy (Which I used to be primary) to start shipping our own policy. Getting fixes into RHEL/Centos selinux-policy base is too slow for a fast moving project like docker. It only gets updated every 6-9 months. The docker-selinux policy replaces and updates the docker.pp package. |
|
Thanks @rhatdan, makes perfect sense. |
bafdc6e to
0551f36
Compare
|
LGTM |
|
I'm testing this now, but the new spec file logic still looks weird to me. It's also 7am and I haven't had enough coffee, so I'm running a full RPM build to check before I comment further though. |
|
I built them all and tested |
|
But let me know what you find |
Signed-off-by: Jessica Frazelle <[email protected]>
0551f36 to
8fe675d
Compare
|
Just rebased and force pushed what i had locally, so mad at myself for that sorry, would have gone the whole weekend mad about it haha also thanks for testing, let me know if you find anything w these |
|
Heh, makes total sense to me (which is why I'm reviewing on Saturday morning here in Melbourne). My reading of the updated commit looks OK, so I've triggered a full build of all RPMs just to be 100% sure. Also, good excuse to test the performance of Oralce Linux in VMware Fusion 8 Pro. :) |
|
Tested on RHEL7, I can confirm it fixes the problem, thanks. |
|
Built and tested on Fedora 21, 22, CentOS 7 and Oracle Linux: confirmed as fixed. 👍 LGTM. |
|
\o/ ping @diogomonica @NathanMcCauley @ewindisch @icecrime merge it 0:) |
|
LGTM! |
…-rpm Add docker seliux policy for rpm
|
thanks @jfrazelle and @Djelibeybi. Great work! |
|
@jfrazelle and @thaJeztah: how do we mark this for cherry-picking into the 1.8 stream, out of interest? |
|
We won't do that I don't think, it's too large a change I say we wait to roll out for 1.9.0 On Sat, Aug 29, 2015 at 2:45 PM -0700, "Avi Miller" [email protected] wrote: @jfrazelle and @thaJeztah: how do we mark this for cherry-picking into the 1.8 stream, out of interest? — |
|
So we're not going to have SElinux support for the EL7 distros for the life of 1.8? |
|
Yes there is SELinux support you can download the policy distributed by red hat etc. On Sat, Aug 29, 2015 at 2:59 PM -0700, "Avi Miller" [email protected] wrote: So we're not going to have SElinux support for the EL7 distros for the life of 1.8? — |
|
If you read the issue that is mentioned here that this fixes there is a very easy way to install that ;) so I don't think we should cherry pick a large change On Sat, Aug 29, 2015 at 2:59 PM -0700, "Avi Miller" [email protected] wrote: So we're not going to have SElinux support for the EL7 distros for the life of 1.8? — |
|
Gotcha. Will let our documentation team to document the requirement to ensure that selinux-policy-targeted is installed if SElinux is going to be used. |
|
@thaJeztah added changelog to this seems significant. Remove if I overstepped of course. |
|
Thanks @moxiegirl, SGTM. Also, any maintainer is allowed to add those labels, so no worries! |
fix #15498
This creates our own docker-selinux package for use with our repo
ping @ewindisch @diogomonica @NathanMcCauley @vbatts @rhatdan