summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_install
diff options
context:
space:
mode:
authorAaron Campbell <aaron@cvs.openbsd.org>2000-03-19 17:57:20 +0000
committerAaron Campbell <aaron@cvs.openbsd.org>2000-03-19 17:57:20 +0000
commit480390dc59325200978ed49a1b26f00a94c91baa (patch)
tree062c09ac43a080a68cd77af35c77fcac0d938f46 /usr.sbin/pkg_install
parentfb660b4c0cea9ae33d3d4dac0984c52ed7b6eeb0 (diff)
Remove hard sentence breaks. Add $OpenBSD$ tags where appropriate. Some other
cleanup along the way.
Diffstat (limited to 'usr.sbin/pkg_install')
-rw-r--r--usr.sbin/pkg_install/add/pkg_add.155
-rw-r--r--usr.sbin/pkg_install/create/pkg_create.1108
-rw-r--r--usr.sbin/pkg_install/delete/pkg_delete.124
-rw-r--r--usr.sbin/pkg_install/info/pkg_info.121
-rw-r--r--usr.sbin/pkg_install/sign/pkg_sign.113
5 files changed, 138 insertions, 83 deletions
diff --git a/usr.sbin/pkg_install/add/pkg_add.1 b/usr.sbin/pkg_install/add/pkg_add.1
index 48c964d663e..9c846f30760 100644
--- a/usr.sbin/pkg_install/add/pkg_add.1
+++ b/usr.sbin/pkg_install/add/pkg_add.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: pkg_add.1,v 1.17 2000/03/02 18:33:30 aaron Exp $
+.\" $OpenBSD: pkg_add.1,v 1.18 2000/03/19 17:57:09 aaron Exp $
.\"
.\" FreeBSD install - a package for the installation and maintainance
.\" of non-core utilities.
@@ -53,8 +53,8 @@ package name itself plus the
.Dq .tar.gz
, or
.Dq .tar
-suffix) or an FTP location in the form of an URL. For example, the following
-is valid:
+suffix) or an FTP location in the form of an URL.
+For example, the following is valid:
.Pp
.Ic pkg_add -v ftp://ftp.openbsd.org/pub/OpenBSD/2.6/packages/i386/m4-1.4.tgz
.Pp
@@ -109,12 +109,13 @@ If an installation script exists for a given package, do not execute it.
Don't actually install a package, just report the steps that
would be taken if it was.
.It Fl R
-Do not record the installation of a package. This means
-that you cannot deinstall it later, so only use this option if
+Do not record the installation of a package.
+This means that you cannot deinstall it later, so only use this option if
you know what you are doing!
.It Fl f
Force installation to proceed even if prerequisite packages are not
-installed or the requirements script fails. Although
+installed or the requirements script fails.
+Although
.Nm
will still try to find and auto-install missing prerequisite packages,
a failure to find one will not be fatal.
@@ -123,12 +124,14 @@ Set
.Ar prefix
as the directory in which to extract files from a package.
If a package has set its default directory, it will be overridden
-by this flag. Note that only the first
+by this flag.
+Note that only the first
.Cm @cwd
directive will be replaced, since
.Nm
has no way of knowing which directory settings are relative and
-which are absolute. It is rare in any case to see more than one
+which are absolute.
+It is rare in any case to see more than one
directory transition made, but when such does happen and you wish
to have control over
.Em all
@@ -153,7 +156,8 @@ By default, this is the string
but it may be necessary to override it in the situation where
space in your
.Pa /var/tmp
-directory is limited. Be sure to leave some number of
+directory is limited.
+Be sure to leave some number of
.Dq X
characters for
.Xr mkdtemp 3
@@ -167,11 +171,13 @@ file installation; often this is
.It Fl M
Run in
.Cm MASTER
-mode. This is a very specialized mode for running
+mode.
+This is a very specialized mode for running
.Nm
and is meant to be run in conjunction with
.Cm SLAVE
-mode. When run in this mode,
+mode.
+When run in this mode,
.Nm
does no work beyond extracting the package into a temporary staging
area (see the
@@ -187,15 +193,18 @@ before acting on its contents.
.It Fl S
Run in
.Cm SLAVE
-mode. This is a very specialized mode for running
+mode.
+This is a very specialized mode for running
.Nm
and is meant to be run in conjunction with
.Cm MASTER
-mode. When run in this mode,
+mode.
+When run in this mode,
.Nm
expects the release contents to be already extracted and waiting
in the staging area, the location of which is read as a string
-from the standard input. The complete packing list is also read from stdin,
+from the standard input.
+The complete packing list is also read from stdin,
and the contents then acted on as normal.
.El
.Pp
@@ -203,7 +212,8 @@ By default, when adding packages via FTP, the
.Xr ftp 1
program operates in
.Dq passive
-mode. If you wish to use active mode instead, set the
+mode.
+If you wish to use active mode instead, set the
.Ev FTPMODE
environment variable to
.Qq active .
@@ -211,7 +221,8 @@ If
.Nm
consistently fails to fetch a package from a site known to work,
it may be because the site does not support
-passive mode ftp correctly. This is very rare since
+passive mode ftp correctly.
+This is very rare since
.Nm
will try active mode ftp if the server refuses a passive mode
connection.
@@ -236,8 +247,8 @@ A check is made to determine if the package conflicts (from
.Cm @pkgcfl
directives, see
.Xr pkg_create 1 )
-with an already recorded as installed package. If it is,
-installation is terminated.
+with an already recorded as installed package.
+If it is, installation is terminated.
.It
All package dependencies (from
.Cm @pkgdep
@@ -366,7 +377,8 @@ scripts are called with the environment variable
.Ev PKG_PREFIX
set to the installation prefix (see the
.Fl p
-option above). This allows a package author to write a script
+option above).
+This allows a package author to write a script
that reliably performs some action on the directory where the package
is installed, even if the user might change it with the
.Fl p
@@ -379,8 +391,9 @@ If a given package name cannot be found,
the directories named by
.Ev PKG_PATH
are searched.
-It should contain a series of entries separated by colons. Each entry
-consists of a directory name. The current directory may be indicated
+It should contain a series of entries separated by colons.
+Each entry consists of a directory name.
+The current directory may be indicated
implicitly by an empty directory name, or explicitly by a single
period
.Pq Ql \&. .
diff --git a/usr.sbin/pkg_install/create/pkg_create.1 b/usr.sbin/pkg_install/create/pkg_create.1
index 8854b5dc559..879f27e1fa7 100644
--- a/usr.sbin/pkg_install/create/pkg_create.1
+++ b/usr.sbin/pkg_install/create/pkg_create.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: pkg_create.1,v 1.11 2000/02/14 12:23:05 espie Exp $
+.\" $OpenBSD: pkg_create.1,v 1.12 2000/03/19 17:57:09 aaron Exp $
.\"
.\" FreeBSD install - a package for the installation and maintainance
.\" of non-core utilities.
@@ -52,11 +52,14 @@
The
.Nm
command is used to create packages that will subsequently be fed to
-one of the package extraction/info utilities. The input description
+one of the package extraction/info utilities.
+The input description
and command line arguments for the creation of a package are not
really meant to be human-generated, though it is easy enough to
-do so. It is more expected that you will use a front-end tool for
-the job rather than muddling through it yourself. Nonetheless, a short
+do so.
+It is more expected that you will use a front-end tool for
+the job rather than muddling through it yourself.
+Nonetheless, a short
description of the input syntax is included in this document.
.Sh OPTIONS
The following command line options are supported:
@@ -77,7 +80,8 @@ from file
.Ar desc
or, if preceded by
.Dq \&- ,
-the argument itself. This string should also
+the argument itself.
+This string should also
give some idea of which version of the product (if any) the package
represents.
.It Fl d [ Ar \&- ] Ns Ar desc
@@ -113,8 +117,9 @@ are dumped, rather than the links themselves.
.It Fl i Ar iscript
Set
.Ar iscript
-to be the install procedure for the package. This can be any
-executable program (or shell script). It will be invoked automatically
+to be the install procedure for the package.
+This can be any executable program (or shell script).
+It will be invoked automatically
when the package is later installed.
.It Fl P Ar dpkgs
Set the initial package dependency list to
@@ -144,16 +149,18 @@ the package.
.It Fl k Ar dscript
Set
.Ar dscript
-to be the de-install procedure for the package. This can be any
-executable program (or shell script). It will be invoked automatically
+to be the de-install procedure for the package.
+This can be any executable program (or shell script).
+It will be invoked automatically
when the package is later (if ever) de-installed.
.It Fl r Ar rscript
Set
.Ar rscript
to be the
.Dq requirements
-procedure for the package. This can be any
-executable program (or shell script). It will be invoked automatically
+procedure for the package.
+This can be any executable program (or shell script).
+It will be invoked automatically
at installation/deinstallation time to determine whether or not
installation/deinstallation should proceed.
.It Fl t Ar template
@@ -166,7 +173,8 @@ By default, this is the string
but it may be necessary to override it in the situation where
space in your
.Pa /tmp
-directory is limited. Be sure to leave some number of
+directory is limited.
+Be sure to leave some number of
.Dq X
characters for
.Xr mktemp 3
@@ -178,7 +186,8 @@ as a
.Fl exclude-from
argument to
.Xr tar
-when creating final package. See
+when creating final package.
+See
.Xr tar
man page (or run
.Xr tar
@@ -188,7 +197,8 @@ flag) for further information on using this flag.
.It Fl D Ar displayfile
Display the file (using
.Xr more 1 )
-after installing the package. Useful for things like
+after installing the package.
+Useful for things like
legal notices on almost-free software, etc.
.It Fl m Ar mtreefile
Run
@@ -217,12 +227,15 @@ format (see
.Fl f )
is fairly simple, being
nothing more than a single column of filenames to include in the
-package. However, since absolute pathnames are generally a bad idea
+package.
+However, since absolute pathnames are generally a bad idea
for a package that could be installed potentially anywhere, there is
another method of specifying where things are supposed to go
and, optionally, what ownership and mode information they should be
-installed with. This is done by imbedding specialized command sequences
-in the packing list. Briefly described, these sequences are:
+installed with.
+This is done by imbedding specialized command sequences
+in the packing list.
+Briefly described, these sequences are:
.Bl -tag -width indent
.It Cm @cwd Ar directory
Set the internal directory pointer to point to
@@ -242,10 +255,12 @@ for package creation but not extraction.
.It Cm @exec Ar command
Execute
.Ar command
-as part of the unpacking process. If
+as part of the unpacking process.
+If
.Ar command
contains any of the following sequences somewhere in it, they will
-be expanded inline. For the following examples, assume that
+be expanded inline.
+For the following examples, assume that
.Cm @cwd
is set to
.Pa /usr/local
@@ -265,7 +280,8 @@ Expands to the
.Dq basename
of the fully qualified filename, that
is the current directory prefix, plus the last filespec, minus
-the trailing filename. In the example case, that would be
+the trailing filename.
+In the example case, that would be
.Pa /usr/local/bin .
.It Cm "%f"
Expands to the
@@ -279,17 +295,20 @@ in the example case,
.It Cm @unexec Ar command
Execute
.Ar command
-as part of the deinstallation process. Expansion of special
+as part of the deinstallation process.
+Expansion of special
.Cm %
sequences is the same as for
.Cm @exec .
This command is not executed during the package add, as
.Cm @exec
-is, but rather when the package is deleted. This is useful
+is, but rather when the package is deleted.
+This is useful
for deleting links and other ancillary files that were created
as a result of adding the package, but not directly known to
the package's table of contents (and hence not automatically
-removable). The advantage of using
+removable).
+The advantage of using
.Cm @unexec
over a deinstallation script is that you can use the
.Dq special sequence expansion
@@ -302,8 +321,8 @@ Set default permission for all subsequently extracted files to
Format is the same as that used by the
.Cm chmod
command (well, considering that it's later handed off to it, that's
-no surprise). Use without an arg to set back to default (extraction)
-permissions.
+no surprise).
+Use without an arg to set back to default (extraction) permissions.
.It Cm @option Ar option
Set internal package options, the only two currently supported ones
being
@@ -332,8 +351,8 @@ Set default group ownership for all subsequently extracted files to
Use without an arg to set back to default (extraction)
group ownership.
.It Cm @comment Ar string
-Imbed a comment in the packing list. Useful in
-trying to document some particularly hairy sequence that
+Imbed a comment in the packing list.
+Useful in trying to document some particularly hairy sequence that
may trip someone up later.
.It Cm @ignore
Used internally to tell extraction to ignore the next file (don't
@@ -341,27 +360,31 @@ copy it anywhere), as it's used for some special purpose.
.It Cm @ignore_inst
Similar to
.Cm @ignore ,
-but the ignoring of the next file is delayed one evaluation cycle. This
-makes it possible to use this directive in the
+but the ignoring of the next file is delayed one evaluation cycle.
+This makes it possible to use this directive in the
.Ar packinglist
file, so you can pack a
specialized datafile in with a distribution for your install script (or
something) yet have the installer ignore it.
.It Cm @name Ar name
-Set the name of the package. This is mandatory and is usually
-put at the top. This name is potentially different than the name of
+Set the name of the package.
+This is mandatory and is usually put at the top.
+This name is potentially different than the name of
the file it came in, and is used when keeping track of the package
-for later deinstallation. Note that
+for later deinstallation.
+Note that
.Nm
will derive this field from the package name and add it automatically
if none is given.
.It Cm @dirrm Ar name
Declare directory
.Pa name
-to be deleted at deinstall time. By default, directories created by a
+to be deleted at deinstall time.
+By default, directories created by a
package installation are not deleted when the package is deinstalled;
-this provides an explicit directory cleanup method. This directive
-should appear at the end of the package list. If more than one
+this provides an explicit directory cleanup method.
+This directive should appear at the end of the package list.
+If more than one
.Cm @dirrm
directive is used, the directories are removed in the order specified.
The
@@ -374,7 +397,8 @@ as an
.Xr mtree 8
input file to be used at install time (see
.Fl m
-above). Only the first
+above).
+Only the first
.Cm @mtree
directive is honored.
.It Cm @display Ar name
@@ -386,18 +410,21 @@ above).
.It Cm @pkgdep Ar pkgname
Declare a dependency on the
.Ar pkgname
-package. The
+package.
+The
.Ar pkgname
package must be installed before this package may be
installed, and this package must be deinstalled before the
.Ar pkgname
-package is deinstalled. Multiple
+package is deinstalled.
+Multiple
.Cm @pkgdep
directives may be used if the package depends on multiple other packages.
.It Cm @pkgcfl Ar pkgcflname
Declare a conflict to the
.Ar pkgcflname
-package. The
+package.
+The
.Ar pkgcflname
package must
.Em not
@@ -426,7 +453,8 @@ refined it for NetBSD
Hard links between files in a distribution must be bracketed by
.Cm @cwd
directives in order to be preserved as hard links when the package is
-extracted. They additionally must not end up being split between
+extracted.
+They additionally must not end up being split between
.Xr tar
invocations due to exec argument-space limitations (this depends on the
value returned by
diff --git a/usr.sbin/pkg_install/delete/pkg_delete.1 b/usr.sbin/pkg_install/delete/pkg_delete.1
index a8b25315ffc..aab877ee3cf 100644
--- a/usr.sbin/pkg_install/delete/pkg_delete.1
+++ b/usr.sbin/pkg_install/delete/pkg_delete.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: pkg_delete.1,v 1.8 2000/03/06 21:46:55 aaron Exp $
+.\" $OpenBSD: pkg_delete.1,v 1.9 2000/03/19 17:57:10 aaron Exp $
.\"
.\" FreeBSD install - a package for the installation and maintainance
.\" of non-core utilities.
@@ -52,7 +52,8 @@ your system may be susceptible to ``trojan horses'' or other subtle
attacks from miscreants who create dangerous package files.
.Pp
You are advised to verify the competence and identity of those who
-provide installable package files. For extra protection, examine all
+provide installable package files.
+For extra protection, examine all
the package control files in the package record directory
.Pq Pa /var/db/pkg/<pkg-name>/ .
Pay particular
@@ -85,15 +86,18 @@ would be taken if it were.
Set
.Ar prefix
as the directory in which to delete files from any installed packages
-which do not explicitly set theirs. For most packages, the prefix will
+which do not explicitly set theirs.
+For most packages, the prefix will
be set automatically to the installed location by
.Xr pkg_add 1 .
.It Fl d
-Remove empty directories created by file cleanup. By default, only
+Remove empty directories created by file cleanup.
+By default, only
files/directories explicitly listed in a package's contents (either as
normal files/directories or with the
.Cm @dirrm
-directive) will be removed at deinstallation time. This option tells
+directive) will be removed at deinstallation time.
+This option tells
.Nm
to also remove any directories that were emptied as a result of removing
the package.
@@ -103,7 +107,8 @@ deinstall or require script fails.
.El
.Sh TECHNICAL DETAILS
.Nm
-does pretty much what it says. It examines installed package records in
+does pretty much what it says.
+It examines installed package records in
.Pa /var/db/pkg/<pkg-name> ,
deletes the package contents, and finally removes the package records.
.Pp
@@ -130,8 +135,8 @@ then this is executed first as
is the name of the package in question and
.Ar DEINSTALL
is a keyword denoting that this is a deinstallation)
-to see whether or not deinstallation should continue. A non-zero exit
-status means no, unless the
+to see whether or not deinstallation should continue.
+A non-zero exit status means no, unless the
.Fl f
option is specified.
.Pp
@@ -160,7 +165,8 @@ All scripts are called with the environment variable
.Ev PKG_PREFIX
set to the installation prefix (see the
.Fl p
-option above). This allows a package author to write a script
+option above).
+This allows a package author to write a script
that reliably performs some action on the directory where the package
is installed, even if the user might have changed it by specifying the
.Fl p
diff --git a/usr.sbin/pkg_install/info/pkg_info.1 b/usr.sbin/pkg_install/info/pkg_info.1
index 3d34be8a70d..9ad1c1883e1 100644
--- a/usr.sbin/pkg_install/info/pkg_info.1
+++ b/usr.sbin/pkg_install/info/pkg_info.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: pkg_info.1,v 1.6 1999/06/05 01:29:39 aaron Exp $
+.\" $OpenBSD: pkg_info.1,v 1.7 2000/03/19 17:57:11 aaron Exp $
.\"
.\" FreeBSD install - a package for the installation and maintainance
.\" of non-core utilities.
@@ -102,7 +102,8 @@ Show the install script (if any) for each package.
.It Fl k
Show the de-install script (if any) for each package.
.It Fl L
-Show the files within each package. This is different from just
+Show the files within each package.
+This is different from just
viewing the packing list, since full pathnames for everything
are generated.
.It Fl l Ar str
@@ -113,8 +114,8 @@ shown with
This is primarily of use to front-end programs that want to request a
lot of different information fields at once for a package, but don't
necessary want the output intermingled in such a way that they can't
-organize it. This lets you add a special token to the start of
-each field.
+organize it.
+This lets you add a special token to the start of each field.
.It Fl m
Show the mtree file (if any) for each package.
.It Fl p
@@ -141,9 +142,11 @@ can be overridden by specifying an alternative directory in the
environment variable.
.It Ev PKG_PATH
This can be used to specify a colon-separated list of paths to search for
-package files. The current directory is always searched first, even if
+package files.
+The current directory is always searched first, even if
.Ev PKG_PATH
-is set. If
+is set.
+If
.Ev PKG_PATH
is used, the suffix
.Dq .tgz
@@ -158,7 +161,8 @@ to create a
.Dq staging area
for any files extracted by
.Nm
-from package files. If neither
+from package files.
+If neither
.Ev PKG_TMPDIR
nor
.Ev TMPDIR
@@ -167,7 +171,8 @@ yields a suitable scratch directory,
.Pa /tmp ,
and
.Pa /usr/tmp
-are tried in turn. Note that
+are tried in turn.
+Note that
.Pa /usr/tmp
may be created, if it doesn't already exist.
.Pp
diff --git a/usr.sbin/pkg_install/sign/pkg_sign.1 b/usr.sbin/pkg_install/sign/pkg_sign.1
index 4b021c92956..99b3c98d3fe 100644
--- a/usr.sbin/pkg_install/sign/pkg_sign.1
+++ b/usr.sbin/pkg_install/sign/pkg_sign.1
@@ -1,4 +1,5 @@
-.\" $OpenBSD: pkg_sign.1,v 1.3 1999/10/05 22:30:49 espie Exp $
+.\" $OpenBSD: pkg_sign.1,v 1.4 2000/03/19 17:57:11 aaron Exp $
+.\"
.\" Copyright (c) 1999 Marc Espie.
.\"
.\" Redistribution and use in source and binary forms, with or without
@@ -51,7 +52,7 @@ embeds a cryptographic signature within a gzip file
can be
.Li pgp
(default) or
-.Li sha1 .
+.Li sha1 .
If
.Ar type
is
@@ -68,9 +69,11 @@ which will be recorded as the name of the package, and printed as the
SHA1 checksum.
.Pp
.Nm pkg_check
-checks that cryptographic signature. It currently disregards
+checks that cryptographic signature.
+It currently disregards
.Ar type
-and checks only the topmost signature. For sha1, it checksums the file
+and checks only the topmost signature.
+For sha1, it checksums the file
and verifies that the result matches the list of checksums recorded in
.Pa /var/db/pkg/SHA1 .
.Pp
@@ -106,7 +109,7 @@ eight bytes long).
and
.Nm pkg_check
return with an exit code > 0 if anything went wrong for any
-.Ar file .
+.Ar file .
For
.Nm pkg_check ,
this usually indicates that the package is not signed, or that the