PKG_MERGE(1)

NAME
pkg_merge - merge several packages into a fat package

SYNOPSIS
pkg_merge [-v] -o filename pkg1 pkg2 [...]

DESCRIPTION
The pkg_merge command is used to merge independent packages pkg1, pkg2, ..., into a fat package filename that contains all the information necessary to install all the packages.

The resulting fat package will often be smaller than the sum of the individual packages, as identical files will be shared. For instance, emacs packages for individual architectures share most of the contents besides the emacs binary. Starting with OpenBSD 3.8, pkg_add(1) handles fat packages transparently. pkg_add(1) automatically selects the actual package contents to install based on package name and architecture.

The options are as follows:

-o filename
    Store the result in filename.

-v  Process individual files verbosely, showing what files get shared in the fat package.

FILE FORMATS
An OpenBSD package is a tarball conforming to the ustar specification in Single UNIX. Normal packages always start with a +CONTENTS file (packing-list).

Fat packages start with a list of a/+CONTENTS, b/+CONTENTS, ... (packing-lists for the individual packages).

pkg_add(1) performs some minimal parsing on these packing-lists and selects the correct package based on the architecture and package name.

Once the correct package is found, pkg_add(1) will only extract files matching the corresponding directory prefix.

For instance, if b/+CONTENTS is selected, pkg_add(1) will extract files like b/foo, ab/foo2, and abc/foo3, but not a/foo4 (and it will strip the prefix in the process).

pkg_merge uses some heuristics to try and share as many files as possible.

SEE ALSO
pkg_add(1), pkg_create(1), package(5)

AUTHORS
Marc Espie