Pkgsync..

From the man pages:

Pkgsync is a package management utility that allows a sysadmin to maintain software installations across any number of CRUX Linux PCs where a network filesystem is in place. Pkgsync accesses a repository of binary packages maintained on a "master" host.

Introduction

Imagine the following: you have a small-to-medium-sized local area network. You'd like to have a common software base exist and be maintained on each node. prt-get's sysup command would maintain that base once it was established, but that's not a satisfactory level of control. You want to bring up a new node in a matter of minutes. You want to build a package once and make it available immediately on all of your machines. Enter pkgsync.

The basic idea is this: designate your network fileserver as your pkgsync "master host." Begin building the packages you wish to make available on all nodes on the master host. As you build and install them, issue pkgsync commit /path/to/package for each package to be shared.

On each client node, build and install only pkgsync. Mount the master host's package repository to /usr/packages, and run pkgsync sync. The client will install or upgrade all packages found in the repository. That's it.

The Details

Pkgsync was written with the office environment in mind. In fact, I wrote it specifically to make my job easier. Here are some of the more detailed ins-and-outs of how it works, and how you can set it up to make your job easier, too.

Obtaining The Goods

Pkgsync is available in the CLC CONTRIB collection. Run ports -u to be sure you're working with a fresh ports tree, and install pkgsync however you like (prt-get install pkgsync).

Defining A Repository

The file /etc/pkgsync.conf specifies where your main repository resides. The default path is /usr/packages. You can change this by adjusting repository. You can create a repository anywhere. The only criteria is that an old directory exists within it, and that it has rw permissions for the user who will be committing packages to it.

Committing Packages

Committing a package manually is very straight forward. The command pkgsync commit /path/to/package will copy the specified package to the repository after moving any existing versions of the package to $repository/old .

Pkgsync can be integrated with prt-get, so that any install or upgrade actions taken with prt-get are mirrored in your pkgsync repository. The pkgdeploy script included with pkgsync suits just this purpose. To enable this feature, edit /etc/prt-get.conf and add the line addcommand pkgdeploy wherever you like.

Syncing Up

To sync with a repository, run pkgsync sync after mounting the pkgsync repository. Since the /usr/packages directory is installed by pkgsync, it makes an ideal mount point on clients too. Clients need only read access to the repository.

The pkgsync diff command will print a summary of what would happen at the next pkgsync sync. This is a safe way to preview things, and make sure that everything's setup properly. Use it.

Once your client nodes are syncing smoothly, you may want to consider setting up a cron job so that they sync a few times a day or whatever. pkgsync sync only takes a few seconds to execute if no differences are found.

What's More

Pkgsync supports meta-data like pre/post install scripts and dependencies not native to CRUX's package file format by bundling it within the repository. This means that a pkgsync repository serves as a perfect base for building addon CDs, binary system updates, etc. Also, pkgsync can benefit single users by providing a restore mechanism in the event that you need to rebuild your system.

The Boring

Pkgsync is available under the GPL. Do with it what you will. I would appreciate feedback and improvements if you have any to offer.