Skip to Content.
Sympa Menu

sm-discuss - Re: [SM-Discuss] Using chroot during INSTALL phase

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: Karsten Behrmann <BearPerson AT gmx.net>
  • To: sm-discuss AT lists.ibiblio.org
  • Subject: Re: [SM-Discuss] Using chroot during INSTALL phase
  • Date: Wed, 1 Jun 2005 21:13:45 +0200

On Wed, 01 Jun 2005 14:50:02 -0400
"Sergey A. Lipnevich" <sergey AT optimaltec.com> wrote:

> Hi All,
>
> Don't kill me just yet, I'm not trying to revive the old INSTALL_ROOT and
> TRACK_ROOT thread. Also, my apologies if this was suggested and ruled out
> already.
>
> I had an idea on how to make both of these variables unnecessary. What if we
> follow this logic during cast:
> 1) build the spell the regular way;
> 2) if INSTALL_ROOT is empty, do nothing;
> 3) if INSTALL_ROOT is not empty, go into "chroot $INSTALL_ROOT" mode, where
> /usr/src/<spell> is mounted in the same place path
> ($INSTALL_ROOT/usr/src/<spell> would be a full path);
> 4) do the install without using $INSTALL_ROOT, in chroot jail;
> 5) after POST_INSTALL, get out of chroot and continue as usual.
>
> The chroot area can be pre-created when a system builder chooses non-empty
> value
> for INSTALL_ROOT. The problem here is that spells that need to access
> dependencies /inside/ $INSTALL_ROOT on step #1 will not be able to do so.
> But I
> believe those would be very few spells, and none of the spells required for
> the
> ISO fall into this group. Maybe in those cases chroot could be set up before
> step 1, as an exception.
>
> There would be two benefits of doing it this way: (a) no mention of
> INSTALL_ROOT
> or TRACK_ROOT anywhere in spells; (b) simplified ISO creation (?).
>
> I'm sure it's not as simple as that, but would it work in principle?
> Thanks,
>
> Sergey.
A problem that comes to mind:
4): How would you get make and install into the chroot?
Almost every package needs them to install properly, same for bash I think.
You'd basically need to be tricky bootstrapping the thing,
probably ending up with something even more ugly.
Actually, using all the _ROOT's is easy:
./configure --prefix=$TRACK_ROOT/usr
we should use TRACK_ROOT because that's likely to be the path stuff
will be referred to as, then
make install prefix=$INSTALL_ROOT
(correct me if I'm wrong).
spells where the makefile absolutely does not behave could probably chroot
themselves anytime... Though it'd probably trash installwatch and a good
bunch of other things, so I wouldn't recommend it.

So Far,
Karsten

Attachment: pgpZVbtHCx9b6.pgp
Description: PGP signature




Archive powered by MHonArc 2.6.24.

Top of Page