Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 509414

Summary: app-emulation/emul-linux-x86-baselibs: provides useless partial python install
Product: Gentoo Linux Reporter: Michał Górny <mgorny>
Component: [OLD] UnspecifiedAssignee: Multilib team <multilib+disabled>
Status: RESOLVED OBSOLETE    
Severity: normal CC: arfrever.fta, erikdenstore+gbugs, nikoli, python
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 416723    

Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-05-02 18:41:30 UTC
Arfrever pinged me on IRC recently pointing out that Python 2.7 & 3.3 installed by emul-linux doesn't contain the .py files of the standard library. In other words, it pretty much can't run anything more complex than 'Hello world' (and I'm not even sure if it can work at all).

He suggested that we should just remove Python from that set. I don't have a strong opinion on this. Alternatively, we could take a safe route and keep it around till we kill emul-linux completely.

What are your thoughts?
Comment 1 Mike Gilbert gentoo-dev 2014-05-02 19:05:33 UTC
I agree that we should not include python in emul-linux-x86. The python infrastructure in Gentoo is not designed to deal with python being installed for multiple abis.
Comment 2 Arfrever Frehtes Taifersar Arahesis 2014-05-02 19:20:43 UTC
Results with site.py unavailable:

$ cat test.c
#include <Python.h>
#include <stdio.h>

int main(int argc, char** argv)
{
#ifdef NO_SITE
        Py_NoSiteFlag = 1;
#endif
        Py_Initialize();
        printf("Initialized\n");
        return 0;
}
$ gcc -I/usr/include/python2.7 -o test-2.7 test.c -lpython2.7
$ gcc -I/usr/include/python3.3 -o test-3.3 test.c -lpython3.3
$ gcc -DNO_SITE -I/usr/include/python2.7 -o test-2.7-no-site test.c -lpython2.7
$ gcc -DNO_SITE -I/usr/include/python3.3 -o test-3.3-no-site test.c -lpython3.3
$ ./test-2.7 ; echo $?
ImportError: No module named site
1
$ ./test-2.7-no-site ; echo $?
Initialized
0
$ ./test-3.3 ; echo $?
ImportError: No module named 'site'
1
$ ./test-3.3-no-site ; echo $?
Initialized
0
$
Comment 3 Pacho Ramos gentoo-dev 2014-05-03 08:24:10 UTC
As this is not a regression, I would simply wait for next emul set as, that way, I will see in full script run what other package was wanting python included (if any) and drop if really save (or report the offending package wanting that files to be included)
Comment 4 eroen 2014-06-29 18:28:14 UTC
eroen@occam ~ $ diff -u0 <(tar tf /var/distfiles/emul-linux-x86-baselibs-20140406.tar.xz | grep '/var/db/pkg/' | cut -d '/' -f -6 | sort -u) <(tar tf /var/distfiles/emul-linux-x86-baselibs-20140508.tar.xz | grep '/var/db/pkg/' | cut -d '/' -f -6 | sort -u)
--- /dev/fd/63	2014-06-29 20:19:23.405205616 +0200
+++ /dev/fd/62	2014-06-29 20:19:23.406205626 +0200
@@ -15,2 +14,0 @@
-./var/db/pkg/dev-lang/python-2.7.5-r3
-./var/db/pkg/dev-lang/python-3.3.3
@@ -23 +21 @@
-./var/db/pkg/dev-libs/gmp-5.1.2
+./var/db/pkg/dev-libs/gmp-5.1.3-r1
@@ -40 +38 @@
-./var/db/pkg/dev-libs/openssl-1.0.1f
+./var/db/pkg/dev-libs/openssl-1.0.1g
@@ -49,2 +47,2 @@
-./var/db/pkg/media-libs/libpng-1.2.50-r1
-./var/db/pkg/media-libs/libpng-1.6.8
+./var/db/pkg/media-libs/libpng-1.2.51
+./var/db/pkg/media-libs/libpng-1.6.10
@@ -64 +62 @@
-./var/db/pkg/net-misc/curl-7.35.0
+./var/db/pkg/net-misc/curl-7.36.0
@@ -68 +66 @@
-./var/db/pkg/net-print/cups-1.7.1
+./var/db/pkg/net-print/cups-1.7.1-r1
@@ -104 +102 @@
-./var/db/pkg/sys-libs/talloc-2.0.8
+./var/db/pkg/sys-libs/talloc-2.1.0

dev-lang/python is not included in >=emul-linux-x86-baselibs-20140508, but it is listed in [1]. The changelog does not mention this change. Is this intentional?

FYI, I noticed this while getting a binary-only application (not in Gentoo) requiring 32-bit libpython to run, relying on a bundled libpython.

1: http://www.gentoo.org/proj/en/base/amd64/emul/emul-linux-x86-20140508.xml
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-06-29 19:14:28 UTC
Yes, we removed it intentionally. However, we may need to reintroduce it because of samba-4 which is so much broken it links to python.
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-06-02 08:33:50 UTC
The emul-linux-x86 packages have been removed.