bundle

A language that doesn't have everything is actually easier to program in than some that do.

Dennis M. Ritchie

Description

bundle is a tool for making changes to files on a system, mostly for installing files from a source template but also for creating symlinks, removing files, adding lines to files, creating directories, and many other things. It takes as input a bundle file, which is just a list of very simple instructions (much simpler than a shell script).

We used to use bundle at Stanford to install system and application configuration and some application packages on all of our infrastructure services and then maintain that software and configuration files and push incremental changes. We've since switched to using Puppet for most things, but I still use bundle for managing my personal systems. It has several significant advantages over writing installation shell scripts, including far simpler syntax developed specifically for this task, no need to worry about shell portability issues, and the ability to preview changes before applying them. bundle is smart enough to know what changes from a bundle file have already been applied and to only make those changes that are necessary (and to tell you what it would do before it does it). It can also save the original copies of files affected by a change and generate a reverse bundle that would undo everything that it did.

bundle is not, however, a full-fledged programming language, and in particular it doesn't support any conditionals other than simple variable substitution. We often used to wrap an invocation of bundle in a fairly simple shell script that sets various variables depending on the answers to interactive questions.

This tool has been in production use at Stanford for nearly a decade and is extremely reliable and stable. It has done much of the heavy lifting in installing and configuring infrastructure servers here. For an example of how I continue to use it, see my notes on system templating with bundle.

bundle was originally written by Roland Schemers. I largely rewrote it and currently maintain it, so any bugs are my fault.

Requirements

bundle requires at least Perl 5.004 and several Perl libraries that come with that version of Perl (and all later versions). It doesn't require any non-standard libraries.

The -c flag to show diffs of pending changes requires that the diff program that is first in your path support the -u option.

Download

The program:

bundle 2.31 2008-10-06 Download

Documentation:

A Debian package is available from my personal repository.

License

Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2006, 2008 Board of Trustees, Leland Stanford Jr. University.

This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself. This means that you may choose between the two licenses that Perl is released under: the GNU GPL and the Artistic License. Please see your Perl distribution for the details and copies of the licenses.

Last modified and spun 2014-08-10