realbasic-nug
[Top] [All Lists]

Re: Running REALbasic apps in a chroot environment

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Running REALbasic apps in a chroot environment
From: Keith Hutchison <thinker at balance-infosystems dot com>
Date: Sun, 1 Aug 2004 06:48:13 +1000
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <A44B0E86-E32B-11D8-83D5-003065966922 at balance-infosystems dot com> <1091305005 dot 410bfe2d7274d at www>
Hi Tim,

On 01/08/2004, at 6:16 AM, tjmac at tolisgroup dot com wrote:

Hi Keith,

Which platform - OS X or Linux?


Linux.

Under Linux, you could achieve a chroot jail for your app in much the same
manner as the LD_LIBRARY_PATH stuff that we were discussing.

Create the full jail hierarchy that you require for you app:

    /opt/MyApp
    /opt/MyApp/lib
    /opt/MyApp/etc
    /opt/MyApp/bin
    /opt/MyApp/any_other_directories_you_need

Then, in your startup script:

    #!/bin/bash
    chroot /opt/MyApp MyApp

This has the effect of setting /opt/MyApp as the virtual root level for this
instance and executing your application.

You do need to make sure that all libraries and other bits that your app requires are copied into the /opt/MyApp hierarchy, because if you don't put it
there, it won't be there :).

Of course, 'man chroot' will offer up much more detail than what I've typed.


Reading, reading reading .:-)

This is what I am currently getting

mail:/realbasic/bin # ./helloworld.bash
chroot: cannot execute /realbasic/bin/helloworld.mrwb: No such file or directory
mail:/realbasic/bin # ls
.  ..  helloworld.bash  helloworld.mwrb

The bash file is
#!/bin/bash
chroot /realbasic/ /realbasic/bin/helloworld.mrwb

I have tried
chroot /realbasic/ helloworld.mrwb
and
chroot /realbasic/ /bin/helloworld.mrwb

with the same results

Reading, reading reading .:-)

Keith

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>