.\" $OpenBSD: pkg_merge.1,v 1.2 2005/09/08 14:03:35 jmc Exp $ .\" Copyright (c) 2005 Marc Espie .\" .\" Permission to use, copy, modify, and distribute this software for any .\" purpose with or without fee is hereby granted, provided that the above .\" copyright notice and this permission notice appear in all copies. .\" .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" .Dd June 28, 2005 .Dt PKG_MERGE 1 .Os .Sh NAME .Nm pkg_merge .Nd merge several packages into a fat package .Sh SYNOPSIS .Nm pkg_merge .Op Fl v .Fl o Ar filename .Ar pkg1 pkg2 Op Ar ... .Sh DESCRIPTION The .Nm command is used to merge independent packages .Ar pkg1 , .Ar pkg2 , .Ar ... , into a fat package .Ar filename that contains all the information necessary to install all the packages. .Pp 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 .Ox 3.8 , .Xr pkg_add 1 handles fat packages transparently. .Xr pkg_add 1 automatically selects the actual package contents to install based on package name and architecture. .Pp The options are as follows: .Bl -tag -width opt .It Fl o Ar filename Store the result in .Ar filename . .It Fl v Process individual files verbosely, showing what files get shared in the fat package. .El .Sh FILE FORMATS An .Ox package is a tarball conforming to the Ustar specification in Single Unix. Normal packages always start with a .Pa +CONTENTS file (packing-list). .Pp Fat packages start with a list of .Pa a/+CONTENTS , .Pa b/+CONTENTS , .Pa ... (packing-lists for the individual packages). .Pp .Xr pkg_add 1 performs some minimal parsing on these packing-lists and selects the correct package based on the architecture and package name. .Pp Once the correct package is found, .Xr pkg_add 1 will only extract files matching the corresponding directory prefix. .Pp For instance, if .Pa b/+CONTENTS is selected, .Xr pkg_add 1 will extract files like .Pa b/foo , .Pa ab/foo2 , and .Pa abc/foo3 , but not .Pa a/foo4 (and it will strip the prefix in the process). .Pp .Nm uses some heuristics to try and share as many files as possible. .Sh SEE ALSO .Xr pkg_add 1 , .Xr pkg_create 1 .Sh AUTHORS .An Marc Espie