Simple app bundle implementation
C Shell
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test
.gitignore
AUTHORS
COPYING
Makefile.am
NEWS
README
autogen.sh
builder.c
bundler-create.in
bundler.spec.in
configure.ac
helper.c
trampoline.c

README

Bundler is a very simple application bundling system for Linux systems.
It gives no system integration, but on the other hand, needs very little
runtime support.

It mounts a squashfs image that is embedded in the bundle executable at
/opt/bundle, after first creating a private mount namespace that the
program and its children runs under. Then it executes
/opt/bundle/start, passing on the original command line arguments to
that program.

A tiny setuid helper that does the loopback mount and the namespace
creation is needed for runtime support.

No special environment is set up by bundler itself, so in general the
start executable will be a shell script that sets up LD_LIBRARY_PATH
and whatever other env-vars your app needs, pointing into the bundle
files in /opt/bundle.

Here is how you use it:

* Build your software into the /opt/bundle prefix, typically using
  something like configure --prefix=/opt/bundle; make; make install.
* Create /opt/bundle/start and make it executable, verify that running
  it works with no special environment.
* Create a squashfs image for /opt/bundle, like so:
  mksquashfs /opt/bundle my-image.squashfs
* Create an bundle executable:
  bundler-create my-image.squashfs my-app
* Package the my-app binary however you want with the external
  files it needs (like .desktop files and icons).

As an additional help you can use the bundler-builder tool which runs
a specified command with a given directory mounted at /opt/bundle
inside a private namespace. For instance you can do:

 mkdir /tmp/bundle-data
 bundler-builder /tmp/bundle-data ./configure --prefix=/opt/bundle
 bundler-builder /tmp/bundle-data make
 bundler-builder /tmp/bundle-data make install

Then you can create a squashfs image from /tmp/bundle-data.