summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pkg_install
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2004-07-02 23:13:00 +0000
committerru <ru@FreeBSD.org>2004-07-02 23:13:00 +0000
commit6294018a208cf7742b1c021a9b75c26962505571 (patch)
tree502f17eb951b74c914af346cd4dbff252350c082 /usr.sbin/pkg_install
parent3f44360851448f8816c22f6b72e8dd5c9924c27f (diff)
downloadFreeBSD-src-6294018a208cf7742b1c021a9b75c26962505571.zip
FreeBSD-src-6294018a208cf7742b1c021a9b75c26962505571.tar.gz
Mechanically kill hard sentence breaks.
Diffstat (limited to 'usr.sbin/pkg_install')
-rw-r--r--usr.sbin/pkg_install/create/pkg_create.1120
-rw-r--r--usr.sbin/pkg_install/delete/pkg_delete.130
-rw-r--r--usr.sbin/pkg_install/info/pkg_info.136
-rw-r--r--usr.sbin/pkg_install/sign/pkg_sign.13
-rw-r--r--usr.sbin/pkg_install/version/pkg_version.120
5 files changed, 139 insertions, 70 deletions
diff --git a/usr.sbin/pkg_install/create/pkg_create.1 b/usr.sbin/pkg_install/create/pkg_create.1
index 91d7d71..43a9fbf 100644
--- a/usr.sbin/pkg_install/create/pkg_create.1
+++ b/usr.sbin/pkg_install/create/pkg_create.1
@@ -59,11 +59,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:
@@ -89,7 +92,8 @@ from file
.Ar desc
or, if preceded by
.Cm - ,
-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 Xo
@@ -105,7 +109,8 @@ Assume a default answer of `Yes' for any questions asked.
.It Fl N
Assume a default answer of `No' for any questions asked.
.It Fl O
-Go into a `packing list Only' mode. This is a custom hack for the
+Go into a `packing list Only' mode.
+This is a custom hack for the
.Fx
.Em "Ports Collection"
and is used to do `fake pkg_add' operations when a port is installed.
@@ -119,8 +124,10 @@ are dumped, rather than the links themselves.
.It Fl i Ar iscript
Set
.Ar iscript
-to be the pre-install procedure for the package. This can be any executable
-program (or shell script). It will be invoked automatically when the
+to be the pre-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 will be passed the package's name as the
first argument.
@@ -138,8 +145,10 @@ respectively, after the package's name.
.It Fl I Ar piscript
Set
.Ar piscript
-to be the post-install procedure for the package. This can be any
-executable program (or shell script). It will be invoked automatically
+to be the post-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 will be passed the package's name as
the first argument.
@@ -181,8 +190,10 @@ 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 when the
+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 will be passed the package's
name as the first argument.
@@ -200,8 +211,10 @@ respectively, along with the package's name.
.It Fl K Ar pdscript
Set
.Ar pdscript
-to be the post-deinstall procedure for the package. This can be any
-executable program (or shell script). It will be invoked automatically when
+to be the post-deinstall procedure for the package.
+This can be any
+executable program (or shell script).
+It will be invoked automatically when
the package is later de-installed.
It will be passed the package's name as
the first argument.
@@ -210,8 +223,10 @@ 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.
To differentiate between installation and deinstallation, the keywords
@@ -239,7 +254,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 `X' characters
+directory is limited.
+Be sure to leave some number of `X' characters
for
.Xr mktemp 3
to fill in with a unique ID.
@@ -250,7 +266,8 @@ as a
.Fl exclude-from
argument to
.Cm tar
-when creating final package. See
+when creating final package.
+See
.Cm tar
man page (or run
.Cm tar
@@ -259,7 +276,8 @@ with
flag) for further information on using this flag.
.It Fl D Ar displayfile
Display the file (by concatenating it to stdout)
-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
@@ -325,12 +343,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 embedding specialized command sequences
-in the packing list. Briefly described, these sequences are:
+installed with.
+This is done by embedding specialized command sequences
+in the packing list.
+Briefly described, these sequences are:
.Bl -tag -width indent -compact
.It Cm @cwd Ar directory
Set the internal directory pointer to point to
@@ -348,10 +369,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
@@ -371,7 +394,8 @@ Expand 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"
Expand to the
@@ -385,17 +409,20 @@ being 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
@@ -408,7 +435,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)
+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
@@ -433,7 +461,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
+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
@@ -442,27 +471,34 @@ 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
+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 from the name of
+Set the name of the package.
+This is mandatory and is usually
+put at the top.
+This name is potentially different from 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
directives are used, the directories are removed in the order specified.
The
@@ -475,7 +511,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
@@ -487,12 +524,14 @@ 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 @conflicts Ar pkgcflname
@@ -555,7 +594,8 @@ command first appeared in
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
.Cm 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 9c7cc86..92f22fa 100644
--- a/usr.sbin/pkg_install/delete/pkg_delete.1
+++ b/usr.sbin/pkg_install/delete/pkg_delete.1
@@ -49,7 +49,8 @@ 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
.Pa ( /var/db/pkg/<pkg-name>/ ) .
Pay particular attention to any +INSTALL, +POST-INSTALL, +DEINSTALL,
@@ -88,15 +89,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.
@@ -114,7 +118,8 @@ automatically expands shell glob patterns in the
Treat the
.Ar pkg-name
as a regular expression and delete all packages whose names match
-that regular expression. Multiple regular expressions could be
+that regular expression.
+Multiple regular expressions could be
provided, in that case
.Nm
deletes all packages that match at least one
@@ -126,14 +131,16 @@ but treats the
.Ar pkg-name
as an extended regular expression.
.It Fl r
-Recursive removal. In addition to specified packages, delete all
+Recursive removal.
+In addition to specified packages, delete all
packages that depend on those packages as well.
.El
.Sh TECHNICAL DETAILS
The
.Nm
utility
-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.
If the environment variable
@@ -164,7 +171,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
+to see whether or not deinstallation should continue.
+A non-zero exit
status means no, unless the
.Fl f
option is specified.
@@ -205,7 +213,8 @@ If a
.Cm post-deinstall
script exists for the package, it is executed
.Cm after
-all files are removed. It is this script's responsibility to clean up any
+all files are removed.
+It is this script's responsibility to clean up any
additional messy details around the package's installation, and leave the
system (hopefully) in the same state that it was prior to the installation
of the package.
@@ -250,7 +259,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 1fd2c11..b8f5259 100644
--- a/usr.sbin/pkg_install/info/pkg_info.1
+++ b/usr.sbin/pkg_install/info/pkg_info.1
@@ -51,14 +51,16 @@ command.
The following command line options are supported:
.Bl -tag -width indent
.It Ar pkg-name ...
-The named packages are described. A package name may either be the name of
+The named packages are described.
+A package name may either be the name of
an installed package, the pathname to a package distribution file or a
URL to an FTP available package.
Package version numbers can also be matched in a relational manner using the
.Pa \*[Ge], \*[Le], \*[Gt]
and
.Pa \*[Lt]
-operators. For example,
+operators.
+For example,
.Pa pkg_info 'portupgrade\*[Ge]20030723'
will match versions 20030723 and later of the
.Pa portupgrade
@@ -97,7 +99,8 @@ Show files that don't match the recorded checksum.
.It Fl i
Show the install script (if any) for each package.
.It Fl I
-Show an index line for each package. This option takes
+Show an index line for each package.
+This option takes
precedence over all other package formatting options.
.It Fl j
Show the requirements script (if any) for each package.
@@ -110,7 +113,8 @@ Show the list of installed packages which require each package.
.It Fl m
Show the mtree file (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 s
@@ -118,7 +122,8 @@ Show the total size occupied by files installed within each package.
.It Fl o
Show the
.Dq origin
-path recorded on package generation. This path
+path recorded on package generation.
+This path
intended to give an idea as to where the underlying port, from which
package was generated, is located in the
.Fx
@@ -133,7 +138,8 @@ automatically expands shell glob patterns in the
.It Fl W
For the specified
.Ar filename
-argument show which package it belongs to. If the file is not in the
+argument show which package it belongs to.
+If the file is not in the
current directory, and does not have an absolute path, then the
.Ev PATH
is searched using
@@ -146,7 +152,8 @@ argument list all packages having this origin.
Treat the
.Ar pkg-name
as a regular expression and display information only for packages
-whose names match that regular expression. Multiple regular
+whose names match that regular expression.
+Multiple regular
expressions could be provided, in that case
.Nm
displays information about all packages that match at least one
@@ -160,11 +167,13 @@ as an extended regular expression.
.It Fl e Ar pkg-name
If the package identified by
.Ar pkg-name
-is currently installed, return 0, otherwise return 1. This option
+is currently installed, return 0, otherwise return 1.
+This option
allows you to easily test for the presence of another (perhaps
prerequisite) package from a script.
.It Fl E
-Show only matching package names. This option takes
+Show only matching package names.
+This option takes
precedence over all other package formatting options.
If any packages match, return 0, otherwise return 1.
.It Fl l Ar str
@@ -175,7 +184,8 @@ shown with
This is primarily of use to front-end programs who 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
+organize it.
+This lets you add a special token to the start of
each field.
.It Fl t Ar template
Use
@@ -189,7 +199,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 `X' characters
+directory is limited.
+Be sure to leave some number of `X' characters
for
.Xr mktemp 3
to fill in with a unique ID.
@@ -224,7 +235,8 @@ Points to the directory where
creates its temporary files.
If this variable is not set,
.Ev TMPDIR
-is used. If both are unset, the builtin defaults are used.
+is used.
+If both are unset, the builtin defaults are used.
.It Ev PKG_DBDIR
Specifies an alternative location for the installed package database.
.El
diff --git a/usr.sbin/pkg_install/sign/pkg_sign.1 b/usr.sbin/pkg_install/sign/pkg_sign.1
index e8af93d..118d380 100644
--- a/usr.sbin/pkg_install/sign/pkg_sign.1
+++ b/usr.sbin/pkg_install/sign/pkg_sign.1
@@ -103,7 +103,8 @@ For
the signing key or verification certificate may be
specified with the
.Fl k
-option. If not specified, packages are signed or verified with the
+option.
+If not specified, packages are signed or verified with the
default keys and certificates documented below.
.Pp
If
diff --git a/usr.sbin/pkg_install/version/pkg_version.1 b/usr.sbin/pkg_install/version/pkg_version.1
index ac1ac91..6ef25ae 100644
--- a/usr.sbin/pkg_install/version/pkg_version.1
+++ b/usr.sbin/pkg_install/version/pkg_version.1
@@ -53,7 +53,8 @@ installed using the
command.
.Pp
Each package's version number is checked against one of two sources to
-see if that package may require updating. If the package contains
+see if that package may require updating.
+If the package contains
information about its origin in the
.Fx
ports tree, and a version number can be determined from the port's
@@ -155,7 +156,7 @@ The output consists of one of the single characters
This flag is mostly useful for scripts or for testing.
.It Fl T
Test whether
-.Ar pkgname
+.Ar pkgname
is matched by
.Ar pattern
and set the exit code accordingly.
@@ -164,16 +165,21 @@ can also be used in `filter mode':
When one of the arguments is `-', standard input is used, and lines
with matching package names/patterns are echoed to standard output.
.It Fl v
-Enable verbose output. Verbose output includes some English-text
+Enable verbose output.
+Verbose output includes some English-text
interpretations of the version number comparisons, as well as the
-version numbers compared for each package. Non-verbose output is
+version numbers compared for each package.
+Non-verbose output is
probably easier for programs or scripts to parse.
.It Ar index
-Specify the index to be used as a basis of comparison. This index can
-be specified as a filename (in the local file system) or a URL. Any
+Specify the index to be used as a basis of comparison.
+This index can
+be specified as a filename (in the local file system) or a URL.
+Any
URL understandable by
.Xr fetch 1
-can be used here. If no
+can be used here.
+If no
.Ar index
file is specified on the command line,
.Pa /usr/ports/INDEX-5
OpenPOWER on IntegriCloud