diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2005-06-28 20:34:56 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2005-06-28 20:34:56 +0000 |
commit | 874579b38b541b757aef097d0df0a43861a16ff9 (patch) | |
tree | 4f90a23e1cba315f91e4ab6023490c5b439f2196 /usr.sbin | |
parent | 0570c3547bdedb8fb5921875d7e13a64595c72b0 (diff) |
Add pkg_merge and doc.
okay naddy@, jmc@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/pkg_add/Makefile | 6 | ||||
-rw-r--r-- | usr.sbin/pkg_add/pkg_merge.1 | 105 |
2 files changed, 109 insertions, 2 deletions
diff --git a/usr.sbin/pkg_add/Makefile b/usr.sbin/pkg_add/Makefile index 09784104883..67bbdca7707 100644 --- a/usr.sbin/pkg_add/Makefile +++ b/usr.sbin/pkg_add/Makefile @@ -1,8 +1,9 @@ -# $OpenBSD: Makefile,v 1.23 2005/03/07 21:46:59 espie Exp $ +# $OpenBSD: Makefile,v 1.24 2005/06/28 20:34:55 espie Exp $ .include <bsd.own.mk> -MAN=pkg_add.1 pkg_info.1 pkg_create.1 pkg_delete.1 pkg.1 pkg_mklocatedb.1 +MAN=pkg_add.1 pkg_info.1 pkg_create.1 pkg_delete.1 pkg_merge.1 \ + pkg.1 pkg_mklocatedb.1 POD2MAN=/usr/bin/pod2man PACKAGES= \ @@ -37,6 +38,7 @@ SCRIPTS= \ pkg_info \ pkg_create \ pkg_delete \ + pkg_merge \ pkg_mklocatedb \ pkg diff --git a/usr.sbin/pkg_add/pkg_merge.1 b/usr.sbin/pkg_add/pkg_merge.1 new file mode 100644 index 00000000000..88cda28fe7d --- /dev/null +++ b/usr.sbin/pkg_add/pkg_merge.1 @@ -0,0 +1,105 @@ +.\" $OpenBSD: pkg_merge.1,v 1.1 2005/06/28 20:34:55 espie Exp $ +.\" Copyright (c) 2005 Marc Espie <espie@openbsd.org> +.\" +.\" 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 pkg-name1 pkg-name2 Op Ar ... +.Sh DESCRIPTION +The +.Nm +command is used to merge +independent packages +.Ar pkg-name1 , +.Ar pkg-name2 , +.Op 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 into 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 |