Pasted the answer from DAN in case someone has the same questions.
Correct.
When the compile script of your build pack runs, it's given a "build
directory" as the first argument. The build pack should put any files
that the application will need at runtime into this directory. As an
example, if you're running a Java web app it would install the JVM and a
container to run the app. The system will save this directory as the
"droplet". The droplet is then extracted to `/home/vcap/app` in the
runtime container.
This means that anything you
install will be installed under `/home/vcap/app`. Generally this works
just fine, but you might have to set some environment variables (PATH,
LD_LIBRARY_PATH, etc...) or pass extra configuration options to instruct
software where to find things like binaries, libraries and
configuration files since many apps assume certain default directories
like `/etc/` for configuration and `/usr/lib` for libraries.
I
can't speak for this application because I haven't tried it. What I
can tell you is that there's no way to use traditional package managers
to install the software that you need. These all require root access
and you will not have that when your build pack runs or at application
runtime.
When I want to use a package from a package manager like this, here's what I'll typically do.
1.) Fire up a Ubuntu Lucid VM since this matches the current environment
2.) Install the package that I want.
3.) Locate the binaries I need.
4.) Run ldd on the binaries to get the list of required shared libraries.
5.) Copy the binaries, shared libraries and any configuration I need into a "vendor" directory.
Ex:
vendor/{usr,etc,lib}
6.) When I've grabbed everything, I'll zip that up and put in on an HTTP server.
7.) In the build pack, I can then download and extract the files placing them into the build directory.
8.) Adjust the release script to issue any commands that need to be run to execute this new app.
Sometimes
if the package is small and doesn't have a lot of dependencies, I'll
skip 1-4 and just download the Ubuntu Lucid deb file and extract its
files with `ar`. It's usually easier if you don't have a lot of
dependencies or if you already know the dependencies.
The
alternative to the steps above is to grab the source for your package
and build it yourself. Sometimes this is necessary as you have to
recompile some apps to change the paths where they look for things like
configuration files or where they write logs. Not sure if it'll be
necessary here, just mentioning it as an alternative.