Date: Wed, 15 Jul 2015 06:37:51 -0400 (EDT) From: Robert Kuska To: Stephen Smalley Message-ID: <1158991843.33317713.1436956671074.JavaMail.zimbra@redhat.com> In-Reply-To: <1482209083.32107040.1436812463571.JavaMail.zimbra@redhat.com> References: <1083792539.31969453.1436795740226.JavaMail.zimbra@redhat.com> <55A3CB1A.5050001@tycho.nsa.gov> <1482209083.32107040.1436812463571.JavaMail.zimbra@redhat.com> Subject: Re: [PATCH] sepolgen: add support for python3 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Cc: selinux@tycho.nsa.gov List-Id: "Security-Enhanced Linux \(SELinux\) mailing list" List-Post: List-Help: ----- Original Message ----- > From: "Robert Kuska" > To: "Stephen Smalley" > Cc: selinux@tycho.nsa.gov > Sent: Monday, July 13, 2015 8:34:23 PM > Subject: Re: [PATCH] sepolgen: add support for python3 > > > > ----- Original Message ----- > > From: "Stephen Smalley" > > To: "Robert Kuska" , selinux@tycho.nsa.gov > > Sent: Monday, July 13, 2015 4:28:42 PM > > Subject: Re: [PATCH] sepolgen: add support for python3 > > > > On 07/13/2015 09:55 AM, Robert Kuska wrote: > > > Hello everyone, > > > > > > this is my first mail to this mailing list so I would like to > > > introduce myself a bit. > > > > > > I am Robert Kuska, member of python-sig in Fedora and co-owner > > > of change Python3 as default. In Fedora many packages depends > > > on policycoreutils which ships python modules from selinux, the > > > problem is (at least for us as we want to have default installation > > > clean of Python2) that not all of them work with Python3. Therefore > > > I've decided to make a patch(es) for all modules (except for GUI) > > > to make them work with python3. > > > > > > As a first I've picked a sepolgen as it seemed it will be the hardest. > > > Please note that I have no previous experience with coding for selinux > > > project. > > > > > > You can find my patch as an attachment to this mail, as it is a rather > > > big one (I didn't split the patch because it fixes mostly same syntax > > > errors). > > > > > > I have tested the patch with python2.7 and python3.4. I had > > > no issue with python2.7 except for test_module.TestModuleCompiler.test > > > which was failing even before my patch. > > > > Do you have selinux-policy-devel installed? > > My bad, after installing the devel package all tests pass (on python2). > > Thank you. > > > > > > > > > Following failures (number vary, from 1 to 6) were seen with python3.4: > > > > > > https://paste.fedoraproject.org/243817/36795382/ > > > > > > The origin of these failures lies within change in hash function of sets > > > and dicts, hash now uses random seed in python3 and tests rely on > > > frozen order of items which is imho bad. I didn't fix those tests > > > as I wanted to know firstly if this is just a issue with tests and such > > > frozen order is not expected. > > > > I didn't write sepolgen, but it is certainly the case that the order in > > which permissions or types are listed in a policy rule makes no > > difference to its semantics. > > Jason Zaman said the same thing on irc, I just wanted to be sure, I can send > another patch with fixed tests. > I've managed to split patch into smaller (11) patches. As seems that the big one is not attracting any reviewers :-). Should I create a new thread for each patch or can I continue within this one? > > > > > > > > > > -- > Robert Kuska > {rkuska} > _______________________________________________ > Selinux mailing list > Selinux@tycho.nsa.gov > To unsubscribe, send email to Selinux-leave@tycho.nsa.gov. > To get help, send an email containing "help" to > Selinux-request@tycho.nsa.gov. > -- Robert Kuska {rkuska}