Skip to Content.
Sympa Menu

sm-discuss - Re: [SM-Discuss] [SM-Commit] GIT changes to master grimoire by Thomas Orgis (c0695802d6900775e09054cef09412bdd1fd8647)

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: Jeremy Blosser <jblosser-smgl AT firinn.org>
  • To: sm-commit AT lists.ibiblio.org
  • Cc: sm-discuss AT lists.ibiblio.org
  • Subject: Re: [SM-Discuss] [SM-Commit] GIT changes to master grimoire by Thomas Orgis (c0695802d6900775e09054cef09412bdd1fd8647)
  • Date: Mon, 22 Jan 2007 20:32:38 -0600

Andrew said a lot more on this but to clarify a couple comments in the
thread:

On Jan 23, Thomas Orgis [thomas-forum AT orgis.org] wrote:
> Am Tue, 23 Jan 2007 04:09:00 +0500
> schrieb Pol Vinogradov <vin.public AT gmail.com>:
>
> My view:
> INSTALL_ROOT = location where stuff gets installed (mental
> picture: usually a chroot dir to be prepared)
> TRACK_ROOT = "This describes what prefix should be given to
> files installed in the install log"... I see this relating to the view
> from inside the chroot (if it is one); with TRACK_ROOT=/smth the file
> installed under /smth/file appears as /file in install log...

No, with TRACK_ROOT=/smth the file installed under /smth/file appears as:

/smth/file in the log (if INSTALL_ROOT was /smth)
/smth/smth/file in the log (if INSTALL_ROOT was /)

INSTALL_ROOT already makes the logs 'correct' with respect to the files
being installed to a chroot. If you *didn't* want that to happen and
wanted the flies to install to /smth and then always run for /smth (if eg
/smth == /opt), then you would set TRACK_ROOT=INSTALL_ROOT=/smth.

> > so, imagine: i changed INSTALL_ROOT
> > to /smthg, there's no passwd and shadow (nor groups nor gshadow) and
> > grpck checks unexistant files... imho, it's wrong

It should fail to find the files, assuming the INSTALL_ROOT doesn't already
have them. If the INSTALL_ROOT does have them it finds them and modifies
them the right way. This is the goal.

> At some point, some significant subset of devs should know how to handle
> these vars with some confidence, let alone ordinary "power users".

I've avoided looking at these til today because I never really needed them
and I knew they were confusing people. Having looked at them I think I see
where some of the confusion comes from (beyond the doc just being editted
too many times) and maybe I can help clarify it some.

One thing I know I did wrong coming into it was assuming it was like "other
systems" where if you set a theoretical $PREFIX it affects 3 things:

1) where the files get installed == $PREFIX/location
2) where the logs say the files were installed == $PREFIX/location
3) all the hardcoded paths inside any files == $PREFIX/location

If you want to installed something to run in a chroot, this kind of system
doesn't work for you without doing extra work to fix the values stored by
(2) and (3) (usually sed on the logs and binaries to strip out $PREFIX).

INSTALL_ROOT in contrast by default works for the chroot case. Just using
INSTALL_ROOT by itself, you end up with:

1) where the files get installed == $PREFIX/location
2) where the logs say the files were installed == /location
3) all the hardcoded paths inside the files == /location

If what you really wanted with INSTALL_ROOT was the kind of thing the other
kind of system does (e.g., you want /opt/apache instead of
/chroot/.../apache), you need to also set $TRACK_ROOT, so you get:

1) where the files get installed == $INSTALL_ROOT/location
2) where the logs say the files were installed == $TRACK_ROOT/location
3) all the hardcoded paths inside the files == $TRACK_ROOT/location

With this, like Andrew said, you would never use $TRACK_ROOT to prefix a
path in a spell when looking for a file. You'd only use $TRACK_ROOT inside
the spell if you have to pass it to the package being built to get it into
the file contents somewhere.

I think I have that right now, but if not someone can correct me please.

Attachment: pgpXe_6c7do3D.pgp
Description: PGP signature



  • Re: [SM-Discuss] [SM-Commit] GIT changes to master grimoire by Thomas Orgis (c0695802d6900775e09054cef09412bdd1fd8647), Jeremy Blosser, 01/22/2007

Archive powered by MHonArc 2.6.24.

Top of Page