[HanoiLUG] Chrooting into an environment for a higher glibc, libstdc++, libgcc...

Jean Christophe André jean-christophe.andre at auf.org
Fri Sep 8 14:55:58 ICT 2006


Steve a écrit :
> I have a requiremnt to run a new version of a java app on RedHat 7.2.
> And one of the ldd dependancies of this app is for libstdc++.so.5 (and
> therefore libgcc and glibc...).
I'm not sure to understand correctly... A Java application is by
definition plateform independant, or it should. Or may be are you
talking about the Java Virtual Machine or some JRE, but not the
application itself?

> Now I could install just the 3 libraries locally and do some
> LD_LIBRARY_PATH trickery, or I could install a basic modern os such as
> ubuntu (or RH/fedora/centos spawn if I really have to), amd of course
> the java jre and this app, and then chroot into the new environment
> (would have to also bind the existing /tmp and /home into the chroot
> for X, hey?) Would this work?
Yes, it should. I already use some kind of configuration like this on my
notebook, but for the oposite: Ubuntu is the booting environment (the
client one) and Debian "stable" is the chroot environment (the server
one). I did rebind some directories to be able to share data between
them. All is working without trouble as far as I can see, for about 1
year already.

> What about the chroot environment running with a new x.org, say (and not
> xfree86)?
It depends on your goal. If you just want to display some X window, you
can let the Xorg client library in the chroot contact the XFree86
service outside without trouble. Just take care of propagating the
access key (see .Xauthority) to your chroot account. The ssh client does
it when using the -X option.

> Would I have any udev issues since the running kernel will still be an
> ancient 2.4 kernel? 
In this configuration you have only one kernel running, the 2.4 one. You
need your chroot to be correctly configured, which means have it full of
any needed device nodes. The chroot /dev and your main environment /dev
are totally independant. Both are only information on how to get access
to a device through the current running kernel.

> Mounting of /proc?
No problem with this at all. Mounting /proc is as easy as doing "mount
-t proc none /proc". Just do this in your chroot.

> I'd be grateful for any thoughts on this!
Please give a more detailed example on what you aim to do with this Java
application.

-- 
Jean Christophe "プログフ" ANDRÉ — http://asie-pacifique.auf.org/
Responsable technique régional — Associé technologie projet Reflets (CODA)
Agence universitaire de la Francophonie (AuF) — Bureau Asie-Pacifique (BAP)
Adresse postale : AUF, 21 Lê Thánh Tông, T.T. Hoàn Kiếm, Hà Nội, Việt Nam
Tél. : +84 4 9331108   Fax : +84 4 8247383   Mobile : +84 91 3248747
⎧ Note personnelle : merci d'éviter de m'envoyer des fichiers PowerPoint  ⎫
⎩ ou Word, voir http://www.gnu.org/philosophy/no-word-attachments.fr.html


More information about the HanoiLUG mailing list