1 |
"Andy Wang" <dopey74@×××××.com> posted |
2 |
17dc8bc70804232143k1572c362pf1b3adfaa8d72f66@××××××××××.com, excerpted |
3 |
below, on Wed, 23 Apr 2008 23:43:16 -0500: |
4 |
|
5 |
> This doesn't work for libraries that have additional modules that are |
6 |
> located in /usr/lib32/[moduledirectory] as I mentioned in my previous |
7 |
> comment when you have libraries built in a regular chroot environment |
8 |
> with a libdir of /usr/lib, it's going to look for |
9 |
> /usr/lib/[moduledirectory]/module.so which will be the 64-bit library |
10 |
> and thus incompatible |
11 |
|
12 |
That's a library search path issue, and would normally be solved by |
13 |
setting LDPATH appropriately. For that, drop a file as appropriate in |
14 |
/etc/env.d/ (see the existing files already there), and remember to |
15 |
rebuild the libloader cache (/etc/ld.so.cache, running env-update does |
16 |
this among other things) afterward. |
17 |
|
18 |
An exception would be plugins, as for firefox, etc. For 32-bit |
19 |
executables with plugins, you'll need to properly configure their search |
20 |
path to look in the 32-bit location. |
21 |
|
22 |
Of course, again, a chroot is a reasonably simple way to manage all |
23 |
this. Let the 32-bit system run in a chroot so it sees its own |
24 |
/lib and /usr/lib just as it would on a normal 32-bit system, and mount |
25 |
--bind stuff like /home (probably /tmp too, and maybe part or all of |
26 |
/var) as appropriate, so it appears in the chroot location as well. Then |
27 |
run all your 32-bit apps from the chrooted environment so they aren't |
28 |
looking at the 64-bit paths but instead their own (chrooted) 32-bit |
29 |
paths, and the setup I described should work, because as far as the 32- |
30 |
bit system is concerned, it's running on its own machine and doesn't even |
31 |
know about nor can it see* the 64-bit system. |
32 |
|
33 |
The 32-bit chroot method should be simpler and cleaner for the 64-bit |
34 |
system as well, which should then be perfectly fine running a no-multilib |
35 |
profile, with the exception of 32-bit execution turned on in the kernel, |
36 |
and a script that sets up the 32-bit stuff and enters the chroot. No |
37 |
more conflicts between 32-bit and 64-bit executables with the same name, |
38 |
no having to prioritize either 32-bit or 64-bit libraries first in the |
39 |
search order, etc. |
40 |
|
41 |
=== |
42 |
* "See" here is taken in the convenience sense, not the security sense. |
43 |
As with any chroot, it's possible for an app to escape the chroot if it |
44 |
tries to do so, particularly if it is running as root. That shouldn't be |
45 |
an issue, however, in the purely convenience context of running the |
46 |
chroot simply to keep the 32-bit stuff from getting confused by the 64- |
47 |
bit system. |
48 |
|
49 |
-- |
50 |
Duncan - List replies preferred. No HTML msgs. |
51 |
"Every nonfree program has a lord, a master -- |
52 |
and if you use the program, he is your master." Richard Stallman |
53 |
|
54 |
-- |
55 |
gentoo-amd64@l.g.o mailing list |