* __pycache__
@ 2019-01-25 22:55 Russell Coker
2019-01-26 2:49 ` __pycache__ Chris PeBenito
0 siblings, 1 reply; 2+ messages in thread
From: Russell Coker @ 2019-01-25 22:55 UTC (permalink / raw)
To: selinux-refpolicy
type=AVC msg=audit(1548301606.546:586): avc: denied { write } for pid=8055
comm="semanage" name="__pycache__" dev="vda" ino=147333
scontext=unconfined_u:unconfined_r:semanage_t:s0-s0:c0.c1023
tcontext=unconfined_u:object_r:lib_t:s0 tclass=dir permissive=0
What can we do about these __pycache__ write attempts? Is there something the
distribution should be doing in terms of automatically generating those cache
files when packages are installed?
--
My Main Blog http://etbe.coker.com.au/
My Documents Blog http://doc.coker.com.au/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: __pycache__
2019-01-25 22:55 __pycache__ Russell Coker
@ 2019-01-26 2:49 ` Chris PeBenito
0 siblings, 0 replies; 2+ messages in thread
From: Chris PeBenito @ 2019-01-26 2:49 UTC (permalink / raw)
To: Russell Coker, selinux-refpolicy
On 1/25/19 5:55 PM, Russell Coker wrote:
> type=AVC msg=audit(1548301606.546:586): avc: denied { write } for pid=8055
> comm="semanage" name="__pycache__" dev="vda" ino=147333
> scontext=unconfined_u:unconfined_r:semanage_t:s0-s0:c0.c1023
> tcontext=unconfined_u:object_r:lib_t:s0 tclass=dir permissive=0
>
> What can we do about these __pycache__ write attempts? Is there something the
> distribution should be doing in terms of automatically generating those cache
> files when packages are installed?
It is possible to precompile the bytecode (Gentoo does this).
python -m py_compile file1.py file2.py ...
or recursively do all .py files:
python -m compileall /path/to/files
If you wanted, you could disable writing the bytecode by adding -B to
the python command, though that's probably not what distros want to do.
https://docs.python.org/3/library/py_compile.html
https://docs.python.org/3/library/compileall.html
--
Chris PeBenito
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-01-26 2:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-25 22:55 __pycache__ Russell Coker
2019-01-26 2:49 ` __pycache__ Chris PeBenito
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).