Originally reported on the gentoo-embedded mailing list: "I'm currently trying to test uclibc-ng 32-bit inside a VM in QEMU. The upgrade from python 3.4.3-r1 to 3.4.5 dies at the install stage. The attached file logs.tar.bz2 has the buildlog, environment, and output from "emerge --info". Any ideas what's going wrong?" It also happens hardened amd64 (Lilblue) with uclibc-ng 1.0.17 Reproducible: Always Steps to Reproduce: 1. emerge -u1 python:3.4 2. 3. Actual Results: emerge failed (install phase) Expected Results: Python updated I will attach each file inside the tarball mentionned in mailing list message, not the tarball itself.
Created attachment 462520 [details] build log from Walter Dnes
Created attachment 462522 [details] emerge --info of Walter Dnes' system
Created attachment 462524 [details] environment of Walter Dnes system
Yes, I know. I'm trying to skip 3.4.5 and go straight to 3.5.x. I've done so on the stages.
(In reply to Anthony Basile from comment #4) > Yes, I know. I'm trying to skip 3.4.5 and go straight to 3.5.x. I've done > so on the stages. Maybe I should add how to deal with this. To your make.conf add: PYTHON_TARGETS="python2_7 python3_5" and to your package.accept_keywords add =dev-lang/python-3.5.2 ~amd64 and to your package.mask add =dev-lang/python-3.4.5
I found the line in the ebuild where it fails. it's line 293, with python_export "python${PYVER}" "${vars[@]}" Preceding lines are: # for python-exec local vars=( EPYTHON PYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR ) # if not using a cross-compiler, use the fresh binary if ! tc-is-cross-compiler; then local -x PYTHON=./python local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}. else vars=( PYTHON "${vars[@]}" ) fi python_export "python${PYVER}" "${vars[@]}
(In reply to René Rhéaume from comment #6) > I found the line in the ebuild where it fails. it's line 293, with > python_export "python${PYVER}" "${vars[@]}" > > Preceding lines are: > # for python-exec > local vars=( EPYTHON PYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR ) should be local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR ) Bad copy and paste. Sorry.
(In reply to René Rhéaume from comment #6) > local -x > LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}. What does this line do to the LD_LIBRARY_PATH environment variable? There is an issue with relative paths set to LD_LIBRARY_PATH in bug #591586. I wonder if it's a similar bug.
(In reply to René Rhéaume from comment #8) > (In reply to René Rhéaume from comment #6) > > local -x > > LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}. > > What does this line do to the LD_LIBRARY_PATH environment variable? There is > an issue with relative paths set to LD_LIBRARY_PATH in bug #591586. I wonder > if it's a similar bug. To see what that line of bash does, try this: # unset A # A=${A+3} # echo $A # A=5 # A=${A+3} # echo $A 3
(In reply to Anthony Basile from comment #9) > (In reply to René Rhéaume from comment #8) > > (In reply to René Rhéaume from comment #6) > > > local -x > > > LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}. > > > > What does this line do to the LD_LIBRARY_PATH environment variable? There is > > an issue with relative paths set to LD_LIBRARY_PATH in bug #591586. I wonder > > if it's a similar bug. So this line does this: 1- Append : to LD_LIBRARY_PATH unless it already end with : 2- Append . (a relative path!) to LD_LIBRARY_PATH It looks like the same issue as for icu on uclibc-ng: uclibc-ng does not cope with relative paths in LD_LIBRARY_PATH.
In the ebuild, I replaced line 288 local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}. with local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}$PWD and I was able to emerge python 3.4.5. I no longer have a vulnerable python on my system.
(In reply to René Rhéaume from comment #11) > In the ebuild, I replaced line 288 > > local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}. > > with > > local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}$PWD > > and I was able to emerge python 3.4.5. I no longer have a vulnerable python > on my system. Okay I'm cc-ing the python team. If they fix this, I'll drop back to 3.4.5 for the stages.
Created attachment 470526 [details, diff] Update for Python 3.5.2 ebuild to fix Gentoo bug 608312 This bug also affects Python 3.5.2…
(In reply to Anthony Basile from comment #12) Copying python@g.o is generally insufficient for getting anyone's attention. An IRC ping would be much more effective.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e47a2221253a05b34be839a49cdd670632c6cfd5 commit e47a2221253a05b34be839a49cdd670632c6cfd5 Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2017-10-31 17:31:45 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2017-10-31 17:35:06 +0000 dev-lang/python: use absolute path in LD_LIBRARY_PATH Closes: https://bugs.gentoo.org/608312 Package-Manager: Portage-2.3.12_p5, Repoman-2.3.3_p75 dev-lang/python/python-2.7.14.ebuild | 2 +- dev-lang/python/python-3.4.5.ebuild | 2 +- dev-lang/python/python-3.4.6.ebuild | 2 +- dev-lang/python/python-3.6.3.ebuild | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3f33ab5f94d42021f57824e97f59cf9d6eedff01 commit 3f33ab5f94d42021f57824e97f59cf9d6eedff01 Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2017-10-31 17:36:55 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2017-10-31 17:37:25 +0000 dev-lang/python: use absolute path in LD_LIBRARY_PATH Closes: https://bugs.gentoo.org/608312 Package-Manager: Portage-2.3.12_p5, Repoman-2.3.3_p75 dev-lang/python/python-3.5.4.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)