Re: __pycache__ in /usr/share

2020-03-03 Thread Miro Hrončok

On 03. 03. 20 17:07, Steve Grubb wrote:

According to the Linux FHS standard, /usr/share is supposed to only contain
data. Executables have other places to live. If we can assume that there is
only data in /usr/share, then we can remove about 330k of the items from our
trust database.


The files are architecture-independent. We've even been told in the past that 
noarch Python modules should live in /usr/share. I don't claim to be an expert 
on FHS, but apparently this is not that simple.


https://bugzilla.redhat.com/show_bug.cgi?id=543756

--
Miro Hrončok
--
Phone: +420777974800
IRC: mhroncok
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org


Re: __pycache__ in /usr/share

2020-03-03 Thread Steve Grubb
On Tuesday, March 3, 2020 12:45:08 PM EST Robbie Harwood wrote:
> Steve Grubb  writes:
> > Hello,
> > 
> > We are working on Application Whitelisting. For this to work, we need
> > to have a list of things that we trust. At the moment, that list is
> > well over 400k on a desktop install. But we really need to get that
> > smaller.
> 
> Not that I disagree, but... to what end?  What's the goal?

The goal is to reduce memory consumption and search time. Right now it takes 
about 165 MB of virtual memory to hold the database. Binary trees are very 
efficient in searching, but why search 400k when the items that need to be 
trusted is really more like 50k. I'm trying to think of time efficient ways of 
pruning the list.

I suppose I can call fnmatch 400k times to keep these python byte code 
caches, but I suspect they don't really belong there.

-Steve

___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org


Re: __pycache__ in /usr/share

2020-03-03 Thread Robbie Harwood
Steve Grubb  writes:

> Hello,
>
> We are working on Application Whitelisting. For this to work, we need
> to have a list of things that we trust. At the moment, that list is
> well over 400k on a desktop install. But we really need to get that
> smaller.

Not that I disagree, but... to what end?  What's the goal?

Thanks,
--Robbie


signature.asc
Description: PGP signature
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org


Re: __pycache__ in /usr/share

2020-03-03 Thread Steve Grubb
On Tuesday, March 3, 2020 11:35:07 AM EST Miroslav Suchý wrote:
> Dne 03. 03. 20 v 17:07 Steve Grubb napsal(a):
> > However, I'm finding that on a typical system, there are about 20
> > packages  that place python byte code in /usr/share.
> 
> Can you elaborate? Which packages? What files?

Sure. Files:
# find /usr/share/ -type d -name __pycache__ | cut -d'/' -f1-4 | sort | uniq
/usr/share/authconfig
/usr/share/cinnamon-screensaver
/usr/share/crypto-policies
/usr/share/doc
/usr/share/gcc-9
/usr/share/gdb
/usr/share/gedit
/usr/share/glib-2.0
/usr/share/gtk-doc
/usr/share/ibus
/usr/share/ibus-hangul
/usr/share/ibus-libpinyin
/usr/share/ibus-libzhuyin
/usr/share/ibus-typing-booster
/usr/share/lorax
/usr/share/rpmlint
/usr/share/setroubleshoot
/usr/share/system-config-printer
/usr/share/system-config-selinux
/usr/share/virt-manager

Packages:
$ find /usr/share/ -type d -name __pycache__ | cut -d'/' -f1-4 | sort | uniq | 
xargs rpm -qf
file /usr/share/authconfig is not owned by any package
cinnamon-screensaver-4.4.1-1.fc31.x86_64
crypto-policies-20191128-2.gitcd267a5.fc31.noarch
filesystem-3.12-2.fc31.x86_64
libstdc++-9.2.1-1.fc31.x86_64
libstdc++-9.2.1-1.fc31.x86_64
gdb-headless-8.3.50.20190824-30.fc31.x86_64
glib2-devel-2.62.5-1.fc31.x86_64
gedit-3.34.1-1.fc31.x86_64
glib2-2.62.5-1.fc31.x86_64
polkit-docs-0.116-4.fc31.1.noarch
harfbuzz-devel-2.6.1-2.fc31.x86_64
gtk-doc-1.29-4.fc31.x86_64
p11-kit-devel-0.23.20-1.fc31.x86_64
libxml2-devel-2.9.10-3.fc31.x86_64
ibus-1.5.21-9.fc31.x86_64
ibus-hangul-1.5.3-1.fc31.x86_64
ibus-libpinyin-1.11.1-2.fc31.x86_64
ibus-libzhuyin-1.9.1-2.fc31.x86_64
ibus-typing-booster-2.8.0-1.fc31.noarch
file /usr/share/lorax is not owned by any package
rpmlint-1.11-3.fc31.noarch
setroubleshoot-server-3.3.20-3.fc31.x86_64
system-config-printer-libs-1.5.12-3.fc31.noarch
policycoreutils-gui-2.9-5.fc31.noarch
virt-manager-common-2.2.1-2.fc31.noarch

I guess the authconfig one is a leftover from previous version of Fedora.

-Steve

> -- 
> Miroslav Suchy, RHCA
> Red Hat, Associate Manager ABRT/Copr, #brno, #fedora-buildsys
> ___
> devel mailing list -- devel@lists.fedoraproject.org
> To unsubscribe send an email to devel-le...@lists.fedoraproject.org
> Fedora Code of Conduct:
> https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List
> Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List
> Archives:
> https://lists.fedoraproject.org/archives/list/de...@lists.fedoraproject.or
> g



___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org


Re: __pycache__ in /usr/share

2020-03-03 Thread Miroslav Suchý
Dne 03. 03. 20 v 17:07 Steve Grubb napsal(a):
> However, I'm finding that on a typical system, there are about 20 packages 
> that place python byte code in /usr/share.

Can you elaborate? Which packages? What files?

-- 
Miroslav Suchy, RHCA
Red Hat, Associate Manager ABRT/Copr, #brno, #fedora-buildsys
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org