CDE: Automatically creating portable
software packages
Philip J. Guo [email protected]
Ph.D. student, Department of Computer Science Advisor: Prof. Dawson Engler
Project web page: http://www.stanford.edu/~pgbovine/cde.html
Problem: Software is hard to install Why is it so hard to get so.ware that works fine on your computer to install and run on someone else’s computer?
1. You might not remember all of the (o4en implicit) dependencies
2. Lots of dependencies, each with their own obscure dependencies
3. Libraries conflict with versions that exisBng programs require
4. Libraries might not be compaBble across different OS variants
5. User might not even have root permission to install so4ware
Our solution: Don’t install anything
2. Transfer package
A package is simply a directory of files (~10MB – 500MB), so it can be transferred via USB sBck, DVD, or over the Internet
3. Execute so.ware from within package on any modern Linux computer
Prepend those same commands with ‘cde-‐exec’, and CDE runs them naBvely without any installaBon
1. Create package on your Linux computer
Prepend any set of commands with ‘cde’, and CDE runs them and automaBcally packages up their dependencies
Details: Creating a CDE package
Linux kernel
cde monitored process ptrace
open(“/lib/libc.so.6”) chdir(“foo/”)
Basic idea: cde monitors all files that the target program accesses and copies them into a self-‐contained package
Details: Executing a CDE package
cde-‐exec monitored process ptrace
open(“/lib/libc.so.6”) chdir(“foo/”)
Basic idea: cde-‐exec monitors and redirects all file-‐related system calls to refer only to files within the package
Linux kernel
Summary of results
2006 2011 2009 2007 2008 2010
Our experiments show that 16 CDE packages from diverse sources can properly execute on six popular Linux distributions from the past 5 years with no installation or configuration
Package sizes range from 14MB to 476MB, depending on complexity
Run-time slowdowns acceptable, ranging from ~0% to 30% slower
Real-world use cases 1. Distributing self-contained portable software packages!
2. Allowing users to run live demos of prototypes!
(These anecdotes all come from real users throughout academia and industry)
CDE eliminates the need for users to obtain, compile, and install any dependencies before running your software!
Real-world use cases 3. Deploying computations to cluster or cloud computing!
4. Making scientific experiments reproducible!
No need to get root permission or install dependencies on cluster!
(These anecdotes all come from real users throughout academia and industry)
Colleagues can easily re-run and modify your experiments
on any Linux machine!
Real-world use cases
(These anecdotes all come from real users throughout academia and industry)
5. Running production software without perturbing existing OS!
6. Running production software in non-native environments!
Users might not want to take the risk of messing up a live production OS by installing
or upgrading libraries!Google Earth running with CDE on a 2006 Linux distro!
(impossible to run it natively on that distro)!