Received: from goalie.tycho.ncsc.mil (goalie [144.51.242.250]) by tarius.tycho.ncsc.mil (8.14.4/8.14.4) with ESMTP id v48JNBSV021221 for ; Mon, 8 May 2017 15:23:11 -0400 Received: by mail-qt0-f172.google.com with SMTP id m91so58487189qte.3 for ; Mon, 08 May 2017 12:23:09 -0700 (PDT) From: Karl MacMillan Message-Id: <9CD79E56-C6FE-44F8-B81B-1155356E0874@gmail.com> Content-Type: multipart/alternative; boundary="Apple-Mail=_E914717A-7E05-4BAC-9FBF-B456DDD9928A" Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: Announcing SPAN: SELinux Policy Analysis Notebook Date: Mon, 8 May 2017 15:23:06 -0400 In-Reply-To: <20170507093921.GA22381@julius> Cc: selinux@tycho.nsa.gov To: Dominick Grift References: <20170506140358.GA21008@julius> <20170506161956.GA20145@julius> <20170506171920.GB20145@julius> <20170507093921.GA22381@julius> List-Id: "Security-Enhanced Linux \(SELinux\) mailing list" List-Post: List-Help: --Apple-Mail=_E914717A-7E05-4BAC-9FBF-B456DDD9928A Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On May 7, 2017, at 5:39 AM, Dominick Grift = wrote: >=20 > On Sat, May 06, 2017 at 07:19:20PM +0200, Dominick Grift wrote: >> On Sat, May 06, 2017 at 06:19:56PM +0200, Dominick Grift wrote: >>> On Sat, May 06, 2017 at 04:03:58PM +0200, Dominick Grift wrote: [snip] >>>>=20 >>>> Nice! Unfornately i could not, which my limited capacity, get it to = work. Here is what i tried: >>>>=20 >>>> Fedora 26 (alpha): >>>> sudo dnf install setools setools-console libselinux-python3 pandoc = which >>>> git clone https://github.com/quarcksecurity/span && cd span && pip3 = install . --user >>>> cd examples && jupyter-notebook >>>>=20 >>>> As soon as i try to run any "cell" or do "restart kernel and run = all cells" it throws stack traces about "ModuleNotFoundError" (import = span as se" and "from sh import pandoc"=20 >>>>=20 >>>> All the stuff seems to be installed properly in = ~/.local/lib/python3.6/site-packages, and the stack traces do refer to = the proper paths suchs as for example: = "/home/joe/.local/lib/python3.6/site-packages/span/domain_summary_to_word.= py in ()" >>>=20 >>> I dont know exactly what the issue is but after installing the = following from the fedora repository i seem to have it working: >>>=20 >>> python3-pypandoc >>> python3-pandocfilters >>> python3-sh >>>=20 >>> So i suspect the "from sh import pandoc" was the issue because sh = was not in the python_requirements.txt, but even after adding it there = it still did not work >>=20 I updated python_requirements.txt to include sh - thanks for that. >> The idea is nice, unfortunately its inflexible and it has = hard-references to reference policy all-over. It has potential but it is = still rough. >=20 >=20 > Turns out that Fedora provides all the dependencies (some just have = different names) >=20 > I have created a Fedora SPAN.spec: >=20 > https://github.com/DefenSec/selinux-rpm-spec/blob/master/SPAN.spec = >=20 >=20 Thanks for making the Fedora SPEC.=20 I know it=E2=80=99s a topic of great debate, but there are some nice = things about just sticking with the Python tools for dependency = management for upstream. Mainly because it=E2=80=99s portable and helps = get the latest versions (which is nice for fast moving projects like = Jupyter notebook and Pandas). Karl >>=20 >>>=20 >>>>=20 >>>> --=20 >>>> Key fingerprint =3D 5F4D 3CDB D3F8 3652 FBD8 02D5 3B6C 5F1D 2C7B = 6B02 >>>> = https://sks-keyservers.net/pks/lookup?op=3Dget&search=3D0x3B6C5F1D2C7B6B02= >>>> Dominick Grift >>>=20 >>>=20 >>>=20 >>> --=20 >>> Key fingerprint =3D 5F4D 3CDB D3F8 3652 FBD8 02D5 3B6C 5F1D 2C7B = 6B02 >>> = https://sks-keyservers.net/pks/lookup?op=3Dget&search=3D0x3B6C5F1D2C7B6B02= >>> Dominick Grift >>=20 >>=20 >>=20 >> --=20 >> Key fingerprint =3D 5F4D 3CDB D3F8 3652 FBD8 02D5 3B6C 5F1D 2C7B = 6B02 >> = https://sks-keyservers.net/pks/lookup?op=3Dget&search=3D0x3B6C5F1D2C7B6B02= >> Dominick Grift >=20 >=20 >=20 > --=20 > Key fingerprint =3D 5F4D 3CDB D3F8 3652 FBD8 02D5 3B6C 5F1D 2C7B 6B02 > https://sks-keyservers.net/pks/lookup?op=3Dget&search=3D0x3B6C5F1D2C7B6B= 02 = > Dominick Grift --Apple-Mail=_E914717A-7E05-4BAC-9FBF-B456DDD9928A Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
On May 7, 2017, at 5:39 AM, Dominick Grift <dac.override@gmail.com> wrote:

On Sat, May 06, 2017 at = 07:19:20PM +0200, Dominick Grift wrote:
On Sat, May 06, 2017 at = 06:19:56PM +0200, Dominick Grift wrote:
On Sat, May 06, 2017 at 04:03:58PM +0200, = Dominick Grift = wrote:

[snip]


Nice! Unfornately i could not, which my = limited capacity, get it to work. Here is what i tried:

Fedora 26 (alpha):
sudo dnf install setools = setools-console libselinux-python3 pandoc which
git clone = https://github.com/quarcksecurity/span && cd span = && pip3 install . --user
cd examples && = jupyter-notebook

As soon as i try to run = any "cell" or do "restart kernel and run all cells" it throws stack = traces about "ModuleNotFoundError" (import span as se" and "from sh = import pandoc" 

All the stuff seems to be installed properly = in ~/.local/lib/python3.6/site-packages, and the stack traces do refer = to the proper paths suchs as for example: = "/home/joe/.local/lib/python3.6/site-packages/span/domain_summary_to_word.= py in <module> ()"

I = dont know exactly what the issue is but after installing the following = from the fedora repository i seem to have it working:

python3-pypandoc
python3-pandocfilters
python3-sh

So i suspect the = "from sh import pandoc" was the issue because sh was not in the = python_requirements.txt, but even after adding it there it still did not = work


I updated python_requirements.txt to include sh - = thanks for that.

The idea is nice, = unfortunately its inflexible and it has hard-references to reference = policy all-over. It has potential but it is still rough.


Turns out that Fedora provides = all the dependencies (some just have different names)
I have created a Fedora SPAN.spec:
https://github.com/DefenSec/selinux-rpm-spec/blob/master/SPAN.s= pec



Thanks for = making the Fedora SPEC. 

I know = it=E2=80=99s a topic of great debate, but there are some nice things = about just sticking with the Python tools for dependency management for = upstream. Mainly because it=E2=80=99s portable and helps get the latest = versions (which is nice for fast moving projects like Jupyter notebook = and Pandas).

Karl





-- 
Key = fingerprint =3D 5F4D 3CDB D3F8 3652 FBD8  02D5 3B6C 5F1D 2C7B = 6B02
https://sks-keyservers.net/pks/lookup?op=3Dget&search=3D0x3= B6C5F1D2C7B6B02
Dominick Grift



-- 
Key fingerprint =3D 5F4D 3CDB D3F8 3652 FBD8  02D5 3B6C = 5F1D 2C7B 6B02
https://sks-keyservers.net/pks/lookup?op=3Dget&search=3D0x3= B6C5F1D2C7B6B02
Dominick Grift



-- 
Key fingerprint =3D 5F4D 3CDB D3F8 3652 FBD8  02D5 3B6C = 5F1D 2C7B 6B02
https://sks-keyservers.net/pks/lookup?op=3Dget&search=3D0x3= B6C5F1D2C7B6B02
Dominick Grift



-- 
Key fingerprint =3D 5F4D 3CDB D3F8 3652 FBD8 =  02D5 3B6C 5F1D 2C7B 6B02
https://sks-keyservers.net/pks/lookup?op=3Dget&search=3D0x3= B6C5F1D2C7B6B02
Dominick = Grift

= --Apple-Mail=_E914717A-7E05-4BAC-9FBF-B456DDD9928A--