Gentoo Archives: gentoo-portage-dev

From: Ned Ludd <solar@g.o>
To: gentoo-portage-dev@l.g.o
Cc: Markus Duft <mduft@g.o>
Subject: Re: [gentoo-portage-dev] ia64 rpaths and python building...
Date: Thu, 17 Dec 2009 11:18:11
Message-Id: 1261048639.5675.5.camel@localhost
In Reply to: Re: [gentoo-portage-dev] ia64 rpaths and python building... by Mike Frysinger
1 On Thu, 2009-12-17 at 05:21 -0500, Mike Frysinger wrote:
2 > On Thursday 17 December 2009 04:38:36 Markus Duft wrote:
3 > > I recently did some ia64-hpux hacking in prefix, and i stumbled over
4 > > alittle problem:
5 > >
6 > > the native linker collects -L options on the command line, and python
7 > > uses -L. while building. this results in . beeing in rpath.
8 > >
9 > > now when $PWD == $S, there is libpython-*.so, and executing the already
10 > > installed python finds (through rpath ".") this local libpython. this
11 > > (although binary exactly the same) refuses to load installed extensions
12 > > (Fatal Python Error: ....).
13 > >
14 > > The problem was caused by the filter-bash-environment.py call in
15 > > ebuild.sh, _only_ during the "test" phase seemingly.
16 > >
17 > > the attached patch fixes the problem for me - what do you think? I guess
18 > > there are better ways to tackle the problem, but i needed to get this to
19 > > work ;)
20 >
21 > this ignores the real problem. there should never be an installed binary
22 > whose rpath includes $PWD. this is a terrible security issues waiting to bite
23 > you in the ass, or cause random failures depending on what the user's cwd is
24 > at any point in time.
25 >
26 > the second change (adding the || exit) is a good idea in theory, but the
27 > proposed change is incorrect. use the assert helper so that the exit values
28 > of all commands in the pipeline are checked.
29 > -mike
30
31 Yep to everything Mike said..