proposal: standardized PREFIX handling

Auke Kok sofar at lunar-linux.org
Wed Mar 24 10:47:11 GMT 2004


tech stuff discussed here, drink coffee first, then read:

I'd like to get all noses in the same direction, therefore I have a 
technical proposal to make that can be implemented relatively soon. It 
incorporates allowing more control over installation locations yet 
leaves the defaults as they are. read on,

The concept of changeable PREFIX locations has been around a while and 
has served quite a few devs around while testing multiple installations 
of gnome, xfce4, kde etc. This concept should be flexible enough to 
allow experienced users to use this 'feature' as well.

One major point of difference is that currently modules that get build 
by default_build cannot be overridden, since --prefix=/usr is hard-coded 
in the core.

my proposal is to make MODULE_PREFIX a MODULE-bound variable. it would 
roughly do the following:

for instance module X has a DETAILS file that states:
     MODULE_PREFIX=/opt/lunar/X

the default_build would then do:
./configure --build=$BUILD --prefix=${MODULE_PREFIX}
            --sysconfdir=/etc --localstatedir=/var
            --infodir=${MODULE_PREFIX}/share/info
            --mandir=${MODULE_PREFIX}/share/man $OPTS

to make sure everyone is happy, we add the following at the end of 
run_details:
    MODULE_PREFIX=${MODULE_PREFIX:=$DEFAULT_PREFIX}

of course, in /etc/lunar/config this will need to be defined as well:
    DEFAULT_REPFIX=/usr

there's a few nice things resulting from this... just follow me here:

  root at joule21 ~ # lunar set GNOME24_PREFIX /opt/lunar/gnome/2.4

then doing the following in the DETAILS file of module X:

  MODULE_PREFX=${GNOME24_PREFIX:-/opt/lunar/gnome}

this of course will always need to be there, otherwise PREFIX gets 
undefined and the module goes into /bin /lib etc... There are quite a 
few advantages to this method:

- modules can be grouped into _PREFIX groups easily
- we can add the following to default_build (heh, this is where it gets 
cool really):

PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$MODULE_PREFIX/lib/pkgconfig
[and think about those other variables that never get set...]

- the SA can override the PREFIX PER MODULE:
  echo "MODULE_PREFIX=/home/sofar/" >> /etc/lunar/local/depends/X

- the SA can override the PREFIX per GROUP of modules:
  lunar set GROUPX_PREFIX /home/sofar

- nhudson can specify different MODULE_PREFIX's per gnome-release as he 
wishes to move things back and forth out of and back to /opt/lunar.... 
schweet

- truly ./configure&&make&&make install modules don't need a BUILD 
anymore!!!

downsides:

* people need to upgrade their core tools before updating their moonbase 
that incorporates these changes.

THIS IS VITAL AS OTHERWISE EVERYTHING WOULD GO INTO /usr (well it 
wouldn't break stuff but it'll sure be interesting to see most non-/usr 
modules break ;^)).


...


okay I had my coffee already today! mmmmm *sip*

sofar

PS I should have the core changes on behalf of this scheme finished 
tonight, I think ;^)



More information about the Lunar-dev mailing list