diff --git a/usr.sbin/pkg_install/add/pkg_add.1 b/usr.sbin/pkg_install/add/pkg_add.1 index a8299eeda461..cb494a789cff 100644 --- a/usr.sbin/pkg_install/add/pkg_add.1 +++ b/usr.sbin/pkg_install/add/pkg_add.1 @@ -1,6 +1,6 @@ -.\" $NetBSD: pkg_add.1,v 1.37 2002/09/24 03:18:00 uebayasi Exp $ +.\" $NetBSD: pkg_add.1,v 1.38 2002/09/26 01:41:51 wiz Exp $ .\" -.\" FreeBSD install - a package for the installation and maintainance +.\" FreeBSD install - a package for the installation and maintenance .\" of non-core utilities. .\" .\" Redistribution and use in source and binary forms, with or without @@ -53,19 +53,20 @@ depends on or requires from both local disk and via FTP. Since the .Nm command may execute scripts or programs contained within a package file, -your system may be susceptible to ``trojan horses'' or other subtle +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, use the -digital signatures provided where possible (see the +provide installable package files. +For extra protection, use the digital signatures provided where possible +(see the .Fl s option), or, failing that, use the .Fl M flag to extract the package file, and inspect its contents and scripts -to ensure it poses no danger to your system's integrity. Pay particular -attention to any +INSTALL, +DEINSTALL, +REQUIRE or +MTREE_DIRS files, -and inspect the +CONTENTS file for +to ensure it poses no danger to your system's integrity. +Pay particular attention to any +INSTALL, +DEINSTALL, +REQUIRE +or +MTREE_DIRS files, and inspect the +CONTENTS file for .Cm @cwd , .Cm @mode (check for setuid), @@ -97,7 +98,8 @@ Any dependencies required by the installed package will be searched in the same location that the original package was installed from. .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. @@ -106,11 +108,13 @@ If an installation script exists for a given package, do not execute it. .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 @@ -131,15 +135,16 @@ 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 -directory transition made, but when such does happen and you wish -to have control over *all* directory transitions, then you -may then wish to look into the use of +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 *all* directory +transitions, then you may then wish to look into the use of .Cm MASTER and .Cm SLAVE @@ -149,21 +154,24 @@ and .Fl S options). .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 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 stdin. The complete packing list is also read from stdin, +from stdin. +The complete packing list is also read from stdin, and the contents then acted on as normal. .It Fl s Ar verification-type Use a callout to an external program to verify the binary package @@ -173,12 +181,12 @@ as the binary package. At the present time, the following verification types are defined: none, gpg and pgp5. The signature will be verified at install time, and the results -will be displayed. If the signature type is anything other than -none, the user will be asked if +will be displayed. +If the signature type is anything other than none, the user will be asked if .Nm -should proceed to install the binary package. The user must then -take the decision whether to proceed or not, depending upon the -amount of trust that is placed in the signatory of the binary +should proceed to install the binary package. +The user must then take the decision whether to proceed or not, depending +upon the amount of trust that is placed in the signatory of the binary package. Please note that, at the current time, it is not possible to use the verification feature when using @@ -197,8 +205,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 `X' characters -for +directory is limited. +Be sure to leave some number of `X' characters for .Xr mktemp 3 to fill in with a unique ID. .Pp @@ -221,8 +229,9 @@ One or more .Ar pkg-name arguments may be specified, each being either a file containing the package (these usually ending with the ``.tgz'' suffix) or a -URL pointing at a file available on an ftp or web site. Thus you may -extract files directly from their anonymous ftp or WWW locations (e.g. +URL pointing at a file available on an ftp or web site. +Thus you may extract files directly from their anonymous ftp or WWW +locations (e.g. .Nm ftp://ftp.netbsd.org/pub/NetBSD/packages/1.5/i386/shells/bash-2.04.tgz). Note: If you wish to use @@ -234,8 +243,9 @@ the variable .Bf -emphasis FTP_PASSIVE_MODE .Ef -to some value in your environment. Otherwise, the more standard -ACTIVE mode may be used. If +to some value in your environment. +Otherwise, the more standard ACTIVE mode may be used. +If .Nm consistently fails to fetch a package from a site known to work, it may be because you have a firewall that demands the usage of @@ -265,7 +275,8 @@ This is prepared by moving an existing .Pa +REQUIRED_BY file aside (if it exists), and by running .Xr pkg_delete 1 -on the installed package. Installation then procedes as if the package +on the installed package. +Installation then proceeds as if the package was not installed, and restores the .Pa +REQUIRED_BY file afterwards. @@ -274,8 +285,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 @@ -405,7 +416,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 @@ -418,10 +430,11 @@ The value of the is used if a given package can't be found, it's usually set to .Pa /usr/pkgsrc/packages/All . The environment variable -should be a series of entries separated by semicolons. Each entry -consists of a directory name or URL. The current directory may be indicated -implicitly by an empty directory name, or explicitly by a single -period. FTP URLs may not end with a slash. +should be a series of entries separated by semicolons. +Each entry consists of a directory name or URL. +The current directory may be indicated implicitly by an empty directory +name, or explicitly by a single period. +FTP URLs may not end with a slash. .Ss PKG_DBDIR Where to register packages instead of .Pa /var/db/pkg . diff --git a/usr.sbin/pkg_install/admin/pkg_admin.1 b/usr.sbin/pkg_install/admin/pkg_admin.1 index ec9b243490d8..46cc816bcce6 100644 --- a/usr.sbin/pkg_install/admin/pkg_admin.1 +++ b/usr.sbin/pkg_install/admin/pkg_admin.1 @@ -1,4 +1,4 @@ -.\" $NetBSD: pkg_admin.1,v 1.19 2002/09/25 00:34:44 wiz Exp $ +.\" $NetBSD: pkg_admin.1,v 1.20 2002/09/26 01:41:51 wiz Exp $ .\" .\" Copyright (c) 1999-2002 Hubert Feyrer. All rights reserved. .\" @@ -41,7 +41,8 @@ .Sh DESCRIPTION This command performs various administrative tasks around the .Nx -Packages System. Available commands are: +Packages System. +Available commands are: .Pp .Bl -tag -width check .It Fl V @@ -49,15 +50,16 @@ Print version number and exit. .It Cm check Op Ar pkg ... Use this command to check the files belonging to some or all of the packages installed on the local machine against their MD5 checksum -noted in their +CONTENTS files. If no additional argument is given, -the files of all installed packages are checked, else only the named -packages will be checked (wildcards can be used here, see +noted in their +CONTENTS files. +If no additional argument is given, the files of all installed packages +are checked, else only the named packages will be checked (wildcards can +be used here, see .Xr pkg_info 1 ) . .Pp The packages' +CONTENTS files will be parsed and the MD5 -checksum will be checked for every file found. A warning message is -printed if the expected checksum differs from the checksum of the file -on disk. +checksum will be checked for every file found. +A warning message is printed if the expected checksum differs from the +checksum of the file on disk. .Pp .It Cm dump Dump the contents of the package database, similar to @@ -68,9 +70,11 @@ and the data field - the package the file belongs to. .It Cm lsbest /dir/pkgpattern List all/best package matching pattern in the given directory. Can be used to work around limitations of /bin/sh and other -filename globbing mechanisms. This option implements matching of +filename globbing mechanisms. +This option implements matching of pkg-wildcards against arbitrary files, useful mainly in the build -system itself. See +system itself. +See .Xr pkg_info 1 for a description of the pattern. .Pp diff --git a/usr.sbin/pkg_install/create/pkg_create.1 b/usr.sbin/pkg_install/create/pkg_create.1 index 4f8b38572e2f..d8745a080aa9 100644 --- a/usr.sbin/pkg_install/create/pkg_create.1 +++ b/usr.sbin/pkg_install/create/pkg_create.1 @@ -1,6 +1,6 @@ -.\" $NetBSD: pkg_create.1,v 1.33 2002/09/24 03:18:01 uebayasi Exp $ +.\" $NetBSD: pkg_create.1,v 1.34 2002/09/26 01:41:51 wiz Exp $ .\" -.\" FreeBSD install - a package for the installation and maintainance +.\" FreeBSD install - a package for the installation and maintenance .\" of non-core utilities. .\" .\" Redistribution and use in source and binary forms, with or without @@ -98,12 +98,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 -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 -description of the input syntax is included in this document. +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 description of the input syntax is included in this +document. .Sh OPTIONS The following command line options are supported: .Bl -tag -width indent @@ -114,18 +116,18 @@ so that users of binary packages can see what .Xr make 1 definitions were used to control the build when creating the -binary package. This allows various build definitions -to be retained in a binary package and viewed wherever it is installed, -using +binary package. +This allows various build definitions to be retained in a binary package +and viewed wherever it is installed, using .Xr pkg_info 1 . .It Fl b Ar build-version-file Install the file .Ar build-version-file so that users of binary packages can see what versions of the files used to control the build were used when creating the -binary package. This allows some fine-grained version control information -to be retained in a binary package and viewed wherever it is installed, -using +binary package. +This allows some fine-grained version control information to be retained +in a binary package and viewed wherever it is installed, using .Xr pkg_info 1 . .It Fl C Ar cpkgs Set the initial package conflict list to @@ -139,12 +141,12 @@ Fetch package ``one line description'' from file .Ar desc or, if preceded by .Cm - , -the argument itself. This string should also -give some idea of which version of the product (if any) the package -represents. +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 displayfile -Display the file after installing the package. Useful for things like -legal notices on almost-free software, etc. +Display the file after installing the package. +Useful for things like legal notices on almost-free software, etc. .It Fl d Ar [-]desc Fetch long description for package from file .Ar desc @@ -170,26 +172,28 @@ staged installations of packages. .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 -when the package is later installed. +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 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 L Ar SrcDir This sets the package's @src directive; see below for a description of what this does. .It Fl l Check that any symbolic links which are to be placed in the package are -relative to the current prefix. This means using +relative to the current prefix. +This means using .Xr unlink 2 and .Xr symlink 2 to remove and re-link -any symbolic links which are targetted at full path names. +any symbolic links which are targeted at full path names. .It Fl m Ar mtreefile Run .Xr mtree 8 @@ -237,22 +241,24 @@ parent directories. .It Fl r Ar rscript Set .Ar rscript -to be the ``requirements'' 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 be the ``requirements'' 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 S Ar size-all-file Store the given file for later querying with the .Xr pkg_info 1 .Ar -S -flag. The file is expected to contain the size (in bytes) of all files of +flag. +The file is expected to contain the size (in bytes) of all files of this package plus any required packages added up and stored as a ASCII string, terminated by a newline. .It Fl s Ar size-pkg-file Store the given file for later querying with the .Xr pkg_info 1 .Ar -s -flag. The file is expected to contain the the size (in bytes) of all files of +flag. +The file is expected to contain the the size (in bytes) of all files of this package added up and stored as a ASCII string, terminated by a newline. .It Fl t Ar template Use @@ -264,8 +270,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 -for +directory is limited. +Be sure to leave some number of `X' characters for .Xr mktemp 3 to fill in with a unique ID. .It Fl U @@ -281,7 +287,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 @@ -294,12 +301,15 @@ The ``packing list'' 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 imbeding 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 @@ -317,10 +327,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 @@ -338,7 +350,8 @@ in the example case .It Cm "%B" Expand to the ``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 ``filename'' part of the fully qualified name, or @@ -350,17 +363,18 @@ 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 -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 +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 .Cm @unexec over a deinstallation script is that you can use the ``special sequence expansion'' to get at files regardless of where they've @@ -372,8 +386,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 @@ -397,8 +411,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 @@ -406,27 +420,30 @@ 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 -the file it came in, and is used when keeping track of the package -for later deinstallation. Note that +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 .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 -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 +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 .Cm @dirrm directives are used, the directories are removed in the order specified. The @@ -439,7 +456,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 @@ -451,12 +469,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 @blddep Ar pkgname @@ -500,7 +520,8 @@ wildcard dependency processing, pkgdb, pkg size recording etc. 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 d8047b231c59..ff79f17a40f5 100644 --- a/usr.sbin/pkg_install/delete/pkg_delete.1 +++ b/usr.sbin/pkg_install/delete/pkg_delete.1 @@ -1,6 +1,6 @@ -.\" $NetBSD: pkg_delete.1,v 1.25 2002/09/24 03:18:01 uebayasi Exp $ +.\" $NetBSD: pkg_delete.1,v 1.26 2002/09/26 01:41:51 wiz Exp $ .\" -.\" FreeBSD install - a package for the installation and maintainance +.\" FreeBSD install - a package for the installation and maintenance .\" of non-core utilities. .\" .\" Redistribution and use in source and binary forms, with or without @@ -42,13 +42,14 @@ command. Since the .Nm command may execute scripts or programs provided by a package file, -your system may be susceptible to ``trojan horses'' or other subtle +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 -the package control files in the package record directory ( -.Pa /var/db/pkg/\*[Lt]pkg-name\*[Gt]/ ) . +provide installable package files. +For extra protection, examine all the package control files in the +package record directory +.Pa ( /var/db/pkg/\*[Lt]pkg-name\*[Gt]/ ) . Pay particular attention to any +INSTALL, +DEINSTALL, +REQUIRE or +MTREE_DIRS files, and inspect the +CONTENTS file for @@ -75,22 +76,25 @@ If the .Fl F flag is given, one or more (absolute) filenames may be specified and the Package Database will be consulted for the package to which the -given file belongs. These packages are then deinstalled. +given file belongs. +These packages are then deinstalled. .It Fl D If a deinstallation script exists for a given package, do not execute it. .It Fl d -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 +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. .It Fl F Any pkg-name given will be interpreted as pathname which is subsequently transformed in a (real) package name via the Package -Database. That way, packges can be deleted by giving a filename +Database. +That way, packages can be deleted by giving a filename instead of the package-name. .It Fl f Force removal of the package, even if a dependency is recorded or the @@ -105,21 +109,24 @@ touch the package or its files itself. 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 R Like the .Fl r -option, this does a recursive delete. The +option, this does a recursive delete. +The .Fl R option deletes the given package and any packages required by -it, unless some other package still needs them. This can be used -to delete a package and all the packages it needs. +it, unless some other package still needs them. +This can be used to delete a package and all the packages it needs. .It Fl r .Nm first builds a list of all packages that require (directly and indirectly) -the one being deleted. It then deletes these packages using +the one being deleted. +It then deletes these packages using .Nm with the given options before deleting the user specified package. .It Fl V @@ -129,7 +136,8 @@ Turn on verbose output. .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/\*[Lt]pkg-name\*[Gt] , deletes the package contents, and finally removes the package records. .Pp @@ -143,8 +151,8 @@ option is given). If a filename is given instead of a package name, the package of which the given file belongs to can be deleted if the .Fl F -Flag is given. The filename needs to be absolute, see the output -produced by the pkg_info +Flag is given. +The filename needs to be absolute, see the output produced by the pkg_info .Fl aF command. .Pp @@ -163,8 +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 -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 @@ -190,7 +198,8 @@ before deleting all files and as: .Ar \*[Lt]pkg-name\*[Gt] .Ar POST-DEINSTALL .Ed -after deleting them. Passing the keywords +after deleting them. +Passing the keywords .Ar DEINSTALL and .Ar POST-DEINSTALL @@ -201,7 +210,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 1d468c8a1751..98d1ab4d971d 100644 --- a/usr.sbin/pkg_install/info/pkg_info.1 +++ b/usr.sbin/pkg_install/info/pkg_info.1 @@ -1,6 +1,6 @@ -.\" $NetBSD: pkg_info.1,v 1.30 2002/09/24 03:18:01 uebayasi Exp $ +.\" $NetBSD: pkg_info.1,v 1.31 2002/09/26 01:41:51 wiz Exp $ .\" -.\" FreeBSD install - a package for the installation and maintainance +.\" FreeBSD install - a package for the installation and maintenance .\" of non-core utilities. .\" .\" Redistribution and use in source and binary forms, with or without @@ -68,9 +68,9 @@ the binary package (the "Build information") for each package. Show the .Nx RCS Id strings from the files used in the construction -of the binary package (the "Build version") for each package. These files are the -package Makefile, any patch files, any checksum files, and the packing -list file. +of the binary package (the "Build version") for each package. +These files are the package Makefile, any patch files, any checksum +files, and the packing list file. .It Fl c Show the one-line comment field for each package. .It Fl D @@ -92,7 +92,7 @@ option. If the given .Ar pkg-name contains a -shell metacharacter, it will be matched against all installed +shell meta character, it will be matched against all installed packages using .Xr fnmatch 3 . .Xr csh 1 @@ -109,10 +109,11 @@ will match versions 1.3 and later of the .Pa name package. The collating sequence of the various package version numbers is -unusual, but strives to be consistent. The magic string ``rc'' -equates to +unusual, but strives to be consistent. +The magic string ``rc'' equates to .Pa release candidate -and sorts before a release. For example, +and sorts before a release. +For example, .Pa name-1.3rc3 will sort before .Pa name-1.3 @@ -128,8 +129,9 @@ The magic string ``pl'' equates to a and has the same value as a dot in the dewey-decimal ordering schemes. .It Fl F Interpret any pkg-name given as filename, and translate it to a -package name using the Package Database. This can be used to query -information on a per-file basis, e.g. in conjunction with the +package name using the Package Database. +This can be used to query information on a per-file basis, e.g. in +conjunction with the .Fl e flag to find out which package a file belongs to. .It Fl f @@ -141,9 +143,9 @@ 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 -viewing the packing list, since full pathnames for everything -are generated. +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 Prefix each information category header (see .Fl q ) @@ -152,8 +154,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 n @@ -171,8 +173,8 @@ Show the requirements script (if any) for each package. Show the size of this package and all the packages it requires, in bytes. .It Fl s -Show the size of this package in bytes. The size is calculated by -adding up the size of each file of the package. +Show the size of this package in bytes. +The size is calculated by adding up the size of each file of the package. .It Fl V Print version number and exit. .It Fl v @@ -188,7 +190,8 @@ can be overridden by specifying an alternative directory in the environment variable. .It Ev PKG_PATH This can be used to specify a semicolon-separated list of paths and URLs to search for -package files. If +package files. +If .Ev PKG_PATH is used, the suffix .Pa .tgz @@ -201,7 +204,8 @@ literally. These are tried in turn (if set) as candidate directories in which to create a ``staging area'' for any files extracted by .Nm -from package files. If neither +from package files. +If neither .Ev PKG_TMPDIR nor .Ev TMPDIR @@ -210,7 +214,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 @@ -228,12 +233,12 @@ in .Pa /var/db/pkg/\*[Lt]pkg-name\*[Gt] . .Pp A filename can be given instead of a (installed) package name to query -information on the package this file belongs to. This filename is then -resolved to a package name using the Package Database. For this -translation to take place, the +information on the package this file belongs to. +This filename is then resolved to a package name using the Package Database. +For this translation to take place, the .Fl F -flag must be given. The filename must be absolute, compare the output -of pkg_info +flag must be given. +The filename must be absolute, compare the output of pkg_info .Fl aF . .Sh SEE ALSO .Xr pkg_add 1 ,