Advanced

Sandboxed Builds

Posted by jayrfink on · 1 comment
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

» Get new stories by e-mail: nightly or as they are published

« Return to the newswire homepage

  Related stories
» More like this

Comments (1)

I suppose you could call any userland build a sandbox, but I was expecting a more detailed article about the subject (sandbox, as being defined at "http://en.wikipedia.org/wiki/Sandbox_(security)" ). For example, such as the GoboLinux sandboxed build routine...

(Note: I had to enclose the link in quotes, because the website keeps omitting the last ')' from the URL.)

Post a comment

A free account is needed to post. Write your comment here first: your text is kept in this browser while you sign up or log in, and is waiting for you when you come back.

Your message:
|||||
10
Markdown: **bold**, *italic*, [text](https://link), - lists, > quotes, $x^2$ for math. Formatting help

Sign up and post (it is free)  or  Log in and post