All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Lautrbach <plautrba@redhat.com>
To: Stephen Smalley <sds@tycho.nsa.gov>,
	Jason Zaman <jason@perfinion.com>,
	selinux@tycho.nsa.gov
Cc: "Christopher J. PeBenito" <cpebenito@tresys.com>
Subject: Re: setools4 support
Date: Fri, 23 Sep 2016 19:11:55 +0200	[thread overview]
Message-ID: <22ff72d8-7d98-d35a-e193-52beb64e80e8@redhat.com> (raw)
In-Reply-To: <dab0152e-1976-5eab-b834-6c1b572ff4bc@tycho.nsa.gov>

On 09/23/2016 07:07 PM, Stephen Smalley wrote:
> On 09/22/2016 11:17 AM, Jason Zaman wrote:
>> Hi all,
>>
>> I finally got everything updated to use setools4. The most complicated parts
>> were sepolicy.search() and sepolicy.info() which were largely undocumented. I
>> dumped and diff'd the output from the old and new code so am fairly confident
>> that they are the same (barring some issues that setools3 appears to have with
>> cil). I also changed several places to just use setools directly, having the
>> indirection through search() mostly just complicates and slows things down.
>>
>> The first patch is just cleanup. Next imports and initializes setools.
>> Patches 3-4 update a lot of the users of search() and info() to work with the next
>> changes.
>> Patches 5-6 update search() and info() themselves and the last drops the C
>> module completely
>>
>> I dont know the status of setools4 on fedora (someone else will have to update
>> the README if needed) or others but I've added it masked in gentoo a fair while
>> ago. Once this patchset is merged we can finally get rid of setools3, its been
>> half-broken for a while now.
> 
> AFAICT, setools4 is not packaged for Fedora yet.

I haven't updated it for some time but you can try

https://copr.fedorainfracloud.org/coprs/plautrba/setools4/

I would like setools4 to be packaged for Fedora 26. The conflict among
setools 3 and setools 4 needs to be resolved first. The idea is to have
legacy setools3-libs and setools4 with the tools.

Petr

> $ git clone https://github.com/TresysTechnology/setools
> $ cd setools
> $ git checkout 4.0
> $ sudo python setup.py install
> $ sesearch
> Traceback (most recent call last):
>   File "/usr/bin/sesearch", line 4, in <module>
>     __import__('pkg_resources').run_script('setools==4.0.1', 'sesearch')
>   File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py",
> line 724, in run_script
>     self.require(requires)[0].run_script(script_name, ns)
>   File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py",
> line 1657, in run_script
>     exec(script_code, namespace, namespace)
>   File
> "/usr/lib64/python2.7/site-packages/setools-4.0.1-py2.7-linux-x86_64.egg/EGG-INFO/scripts/sesearch",
> line 21, in <module>
> 
>   File "build/bdist.linux-x86_64/egg/setools/__init__.py", line 30, in
> <module>
>   File "build/bdist.linux-x86_64/egg/setools/policyrep/__init__.py",
> line 34, in <module>
> ImportError: cannot import name qpol
> 
> What I am doing wrong?
> 

  reply	other threads:[~2016-09-23 17:11 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-22 15:17 setools4 support Jason Zaman
2016-09-22 15:17 ` [PATCH 1/7] sepolicy: rearrange vars together at the top Jason Zaman
2016-09-22 15:17 ` [PATCH 2/7] sepolicy: initialize setools4 Jason Zaman
2016-09-22 15:17 ` [PATCH 3/7] sepolicy: update some users of search() to use setools directly Jason Zaman
2016-09-22 15:17 ` [PATCH 4/7] sepolicy: info() and search() will return generators Jason Zaman
2016-09-22 15:17 ` [PATCH 5/7] sepolicy: make info() use setools4 api Jason Zaman
2016-09-22 15:17 ` [PATCH 6/7] sepolicy: make search() " Jason Zaman
2016-09-22 15:17 ` [PATCH 7/7] sepolicy: update setup.py to remove C module Jason Zaman
2016-09-23  3:14   ` Jason Zaman
2016-09-23 17:07 ` setools4 support Stephen Smalley
2016-09-23 17:11   ` Petr Lautrbach [this message]
2016-09-23 17:44     ` Jason Zaman
2016-09-23 17:47   ` Jason Zaman
2016-09-23 18:15     ` Stephen Smalley
2016-09-23 19:23       ` Stephen Smalley
2016-09-23 20:39 ` Stephen Smalley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=22ff72d8-7d98-d35a-e193-52beb64e80e8@redhat.com \
    --to=plautrba@redhat.com \
    --cc=cpebenito@tresys.com \
    --cc=jason@perfinion.com \
    --cc=sds@tycho.nsa.gov \
    --cc=selinux@tycho.nsa.gov \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.