CopyBirds
Copy binaries runtime data surrounding
Toolchain for automatic Program archiving including the context by
analysing the runtime behaviour. The program can later run on a Linux
Live-CD.
Sourceforge project summary website
Download beta
Description
Ever wrote a program you wanted to give your Not-a-Linux-User friend?
Or got some 3rd party program compiled after spending hours for
searching and installing headers, libs and other things and want to
prevent this for the future?
Or being in the middle of a development and want to save the current runnable state for a later demonstration?
Or you depend on a program were you wonder if it still runs after the next distro upgrade?
Or just wondered which files (or DEB packages) are really necessary to run a program?
Then you may try out this toolchain.
As first step it helps to gather the names of all files (binaries, libs, configs, user files) needed by a program.
In the second step, all files are copied together in an single
encrypted, compressed, self-extracting file. This file can then be
burned on a CD or put on an USB drive. As the program is encrypted, the
risk that your proprietary files get in the wrong hand by loosing the CD
or USB drive is minimized.
At third, the content of the archive can be copied into a running
system like a Live-CD or Virtual Machine. If the target system has
already files with the same name, a binary comparison is made and a
warning is given if a mismatch is detected for helping to resolve
possible problems. No existing files will be replaced by default. The
archived program is now ready to run. Note that it is recommend that
the target system uses the same distribution and version as the system
which is used for capturing.
Programs known to work:
Firefox, Java programs running with OpenJDK, tuxkart
Programs currently known not to work:
WINE
Programs which can never be captured:
The user needs the right to attach a debugger to the program to
capture it. This is not the case for programs which have the setuid bit
set and the user who runs the program is not the owner. For example,
the program ping has the owner root and the setuid bit set and can
therefore only be traced by root.
Features...
...already implemented
- Listing of all files used by the captured program
- Listing of all internet connections the captured program made
- Storing of meta informations like user name, graphic card, graphic driver. To help solving possible problems
- Manually adding files including wildcards
- Manually preventing files to be archived by adding them to a blacklist (wildcards are supported)
- Automatic blacklisting files which were provided by installed DEB
Packages and adding the name of the package and version as dependency
- All gathered informations are stored in one or multiple XML-files
- Copying all used files together into one self-extracting archive
- Supports encryption of the archive with the help of GPG
- Copying back all files into the target system. This may be a Live-CD or a VM.
- Runs on Linux, GPL Licensed
- No superuser rights needed for capturing
...planned for implementation
- Running on any Unix (not just Linux)
- Automatic ISO (Live-CD) remastering
- Handling of additional syscalls
...which may be implemented
- Automatic activation of 3D acceleration in VMs with the help of VMGL
- Direct support for running the capturing process multiple times (for programs which wont use all files on every run)
- Directly generate DEB packages from a captured application
- Graphical user interface
... which would be nice, but no implementation is planned
- Support for detection of files which were delivered from RPM packages
- Support of encrypted images within a Live-CD
- Implement an uninstaller from the target system
- Regular expressions for the wildcards
- Network support (automatic capturing of programs used on other computers)
External Tools and Libs
Files and program which are used by the toolchain.
- strace The most important one
- libxml for XML File handling
- C-Algorithms for internal data handling
- GPG for encrypting archives
- Pathconvert for generating absolute from relative paths and relative from absolute ones
Compiling
On an Ubuntu 8.10 Live-CD it was necessary to install the packages
libc6-dev, libxml2-dev, freeglut3-dev
and its dependencies to be able to compile the toolchain.
Example Capturing
This shows the console output of a capturing run with the program supertuxkart
$ cb_automatic.sh supertuxkart
cb_automatic.sh: This is the interactive meta script for archiving an application
cb_automatic.sh: Note: Set you EDITOR environment variable to get the text editor you prefer.
cb_automatic.sh: Where do you want to store a directory for the captured archive?
cb_automatic.sh: h) Within your home directory
cb_automatic.sh: t) Within /temp (please note that other user may read here)
cb_automatic.sh: otherwise the current directory is used (recommend)
cb_automatic.sh: Please choose and press enter:
cb_automatic.sh: You will find all files within 'tracetemp.Z20971'
[output of supertuxkart truncated]
cb_strace_to_xml[21172]: Welcome to 'cb_strace_to_xml'
cb_strace_to_xml[21172]: strace_preparation: Preprocessing strace data...
cb_strace_to_xml[21172]: main: Processing files...
cb_strace_to_xml[21172]: main: 1084 lines proceeded
cb_strace_to_xml[21172]: main: Writing xml...
cb_strace_to_xml[21172]: main: Done
cb_meta_check[21173]: Welcome to 'cb_meta_check'
cb_meta_check[21173]: fetch_meta: Getting system information...
cb_meta_check[21173]: xml_have_file: Creating a new output file
cb_meta_check[21173]: main: Done
cb_automatic.sh: Do you want put all files which are provided by Debian
cb_automatic.sh: packages into a blacklist and add the name of the
cb_automatic.sh: packages, they are found in, as dependencies? y/N:
cb_automatic.sh: No dependency analyzing wished
cb_automatic.sh: Do you want to edit some blacklist or wildcards manually? y/N:
cb_automatic.sh: No manual edit wished
cb_automatic.sh: It is recommend to enter a short description about the application
cb_automatic.sh: you are just archiving. This will be displayed on extraction already
cb_automatic.sh: before you entered the decryption password.
cb_automatic.sh: It is the best to limit your text to printable ASCII characters.
cb_automatic.sh: Umlauts may work only if you use utf-8 encoding.
cb_automatic.sh: Press enter to launch the editor. After writing your description, safe the file and close the editor.
cb_automatic.sh: Please enter the file name of your archive.
cb_automatic.sh: The '.sh' extension will be added automatically.
cb_automatic.sh: If you just press enter, the name 'application_supertuxkart.sh' will be used
cb_files[21240]: Welcome to 'cb_files'
cb_files[21240]: main: Parsing xml input file(s)...
cb_files[21240]: copycontent: Copying files...
cb_files[21240]: update_device_xml: Writing used devices into xml file...
cb_files[21240]: xml_have_file: Creating a new output file
cb_meta_merge[21736]: Welcome to 'cb_meta_merge'
cb_meta_merge[21736]: main: Parsing and merging xml input file(s)...
cb_meta_merge[21736]: write_meta_xml: Writing results into file 'metainfomerged.xml'...
cb_meta_merge[21736]: xml_have_file: Creating a new output file
cb_make_selfextracting.sh: Creating tar archive...
cb_make_selfextracting.sh: Encrypting with GPG...
cb_make_selfextracting.sh: Creating self extracting archive
cb_make_selfextracting.sh: Done. 'application_supertuxkart.sh' is ready to use.
Contact
You used the toolchain?
Write me your opinion m DOT talk AT marwedels DOT de
Last changed: 23.12.2008