Sandboxed Builds

Posted by jayrfink on May 13, 2006 1:49 PM EDT
Systhread; By Jason (Jay) R Fink
Mail this story
Print this story

Sometimes you have to get it done and if you do not have complete access to a system then you must find a way. How to do a sandbox even in the simplest terms can be overlooked but if there is time - it can be done.

Sandboxed Builds



Life sucks, then you get a helmet.
Denis Leary


 



If you do not have root and you have the space a sandbox build can save your life (or career). Now a look at a cases of sandboxing some software and the issues that can come up. There is but one piece of software needed to build and run; subversion. Easy enough? Unfortunately after running ./configure an alarm comes up requiring at least apache2 and the latest autoconf. The problem - no root access and a need to get it done. No problem.





Prepping the Build



Really there is onlu one thing that needs to be set up, the prefix directory and a build directory:



export prefix=$HOME/sandbox
export build=$HOME/build


Now, how to get it all done ...



autoconf



Building autoconf is not too hard on most systems since it self bootstraps:



cd autoconf-X
./configure --prefix=$prefix
make << make install


Now autoconf will install to $HOME/* and automatically create everything needed.



The Next Step



Now we need to somehow make apache aware of the new stuff lying in $HOME/sandbox/ and how can it be done?- easy:





export AUTOCONF=$prefix/bin/autoconf


Time to build apache2...



cd httpd-X
./configure --prefix=$prefix/apache2
make << make install


Now the shell can pass along the new AUTOCONF variable. It is a done deal; apache is in a user directory [1]



Now for the first one...



Now subversion can be compiled right? Well the new axps needs to be added....



cd subvesion-X
./configure --with-axps2=$prefix/apache2/bin/apxs --prefix=$prefix
make << make install


Well this all seems nice but what about include and libs?



Summary



Building in userland is not too hard, just remember it can become a dep nightermare - if you go past 8 it is time to kick a sysadmins ass. For lib linking use this and remember it *will* include system defaults first then add yours:



CPPFLAGS="-I/path/to/inc"
CFLAGS="-I/path/to/inc"
LDFLAGS="-L/path/to/lib"


Make sure to read your docs and source documents.



Footnotes



  • The portnumber needs to be changed to greater than 1024







© 1998-2006 Jason R. Fink systhread




Last modified: May 13 2006 03:11:51 by jay.fink@gmail.com

Full Story

  Nav
» Read more about: Story Type: News Story

« Return to the newswire homepage

Subject Topic Starter Replies Views Last Post
I suppose... crusadingknight 0 1,790 May 13, 2006 4:37 PM

You cannot post until you login.