diff options
author | jmmv <jmmv> | 2010-01-21 21:58:05 +0000 |
---|---|---|
committer | jmmv <jmmv> | 2010-01-21 21:58:05 +0000 |
commit | 42faa64534252ea546340c1547fff32943aa071a (patch) | |
tree | 88db1dbe1cc7b74a03bb6f3c7c89f87fad470709 /pkgtools/pkg_install | |
parent | 1a284f824f2f9bcb553fcc191eccc323b2f19194 (diff) | |
download | pkgsrc-42faa64534252ea546340c1547fff32943aa071a.tar.gz |
Stick the correct value of PKG_DBDIR into the manpages instead of
pointing the user to /var/db/pkg, which may not be the right value if
it was customized. Bump version to 20100121.
Diffstat (limited to 'pkgtools/pkg_install')
14 files changed, 38 insertions, 1393 deletions
diff --git a/pkgtools/pkg_install/files/add/pkg_add.1 b/pkgtools/pkg_install/files/add/pkg_add.1.in index 6aa5647889c..e568ef74f47 100644 --- a/pkgtools/pkg_install/files/add/pkg_add.1 +++ b/pkgtools/pkg_install/files/add/pkg_add.1.in @@ -1,4 +1,4 @@ -.\" $NetBSD: pkg_add.1,v 1.39 2010/01/20 22:34:47 jmmv Exp $ +.\" $NetBSD: pkg_add.1.in,v 1.1 2010/01/21 21:58:06 jmmv Exp $ .\" .\" FreeBSD install - a package for the installation and maintenance .\" of non-core utilities. @@ -346,15 +346,15 @@ after the package has been installed. After installation is complete, a copy of the packing list, .Ar deinstall script, description, and display files are copied into -.Pa /var/db/pkg/\*[Lt]pkg-name\*[Gt] +.Pa @pkgdbdir@/\*[Lt]pkg-name\*[Gt] for subsequent possible use by .Xr pkg_delete 1 . Any package dependencies are recorded in the other packages' -.Pa /var/db/pkg/\*[Lt]other-pkg\*[Gt]/+REQUIRED_BY +.Pa @pkgdbdir@/\*[Lt]other-pkg\*[Gt]/+REQUIRED_BY file (if an alternate package database directory is specified, then it overrides the -.Pa /var/db/pkg +.Pa @pkgdbdir@ path shown above). .It If the package is a depoted package, then add it to the default view. @@ -412,7 +412,7 @@ variable overrides the .Xr pkg_install.conf 5 variable of the same name. If all of this fails to locate a value, then it typically defaults to -.Pa /var/db/pkg . +.Pa @pkgdbdir@ . .It Ev PKG_PATH The value of the .Ev PKG_PATH @@ -431,7 +431,7 @@ Location of the package reference counts database directory. The default location is the path to the package database directory with .Dq .refcount appended to the path, e.g. -.Pa /var/db/pkg.refcount . +.Pa @pkgdbdir@.refcount . .It Ev PKG_VIEW The default view can be specified in the .Ev PKG_VIEW diff --git a/pkgtools/pkg_install/files/add/pkg_add.cat1 b/pkgtools/pkg_install/files/add/pkg_add.cat1 deleted file mode 100644 index 113c208a838..00000000000 --- a/pkgtools/pkg_install/files/add/pkg_add.cat1 +++ /dev/null @@ -1,319 +0,0 @@ -PKG_ADD(1) NetBSD General Commands Manual PKG_ADD(1) - -NNAAMMEE - ppkkgg__aadddd -- a utility for installing and upgrading software package dis- - tributions - -SSYYNNOOPPSSIISS - ppkkgg__aadddd [--AAffIILLnnRRuuVVvv] [--KK _p_k_g___d_b_d_i_r] [--mm _m_a_c_h_i_n_e] [--PP _d_e_s_t_d_i_r] [--pp _p_r_e_f_i_x] - [--WW _v_i_e_w_b_a_s_e] [--ww _v_i_e_w] _f_i_l_e _._._. - [[ftp|http]://[_u_s_e_r][:_p_a_s_s_w_o_r_d]@]_h_o_s_t[:_p_o_r_t][/_p_a_t_h_/]_p_k_g_-_n_a_m_e _._._. - -DDEESSCCRRIIPPTTIIOONN - The ppkkgg__aadddd command is used to extract and upgrade packages that have - been previously created with the pkg_create(1) command. Packages are - prepared collections of pre-built binaries, documentation, configura- - tions, installation instructions and/or other files. ppkkgg__aadddd can recur- - sively install other packages that the current package depends on or - requires from both local disk and via FTP or HTTP. - -WWAARRNNIINNGG - _S_i_n_c_e _t_h_e ppkkgg__aadddd _c_o_m_m_a_n_d _m_a_y _e_x_e_c_u_t_e _s_c_r_i_p_t_s _o_r _p_r_o_g_r_a_m_s _c_o_n_t_a_i_n_e_d - _w_i_t_h_i_n _a _p_a_c_k_a_g_e _f_i_l_e_, _y_o_u_r _s_y_s_t_e_m _m_a_y _b_e _s_u_s_c_e_p_t_i_b_l_e _t_o _`_`_T_r_o_j_a_n - _h_o_r_s_e_s_'_' _o_r _o_t_h_e_r _s_u_b_t_l_e _a_t_t_a_c_k_s _f_r_o_m _m_i_s_c_r_e_a_n_t_s _w_h_o _c_r_e_a_t_e _d_a_n_g_e_r_o_u_s - _p_a_c_k_a_g_e _f_i_l_e_s_. - - _Y_o_u _a_r_e _a_d_v_i_s_e_d _t_o _v_e_r_i_f_y _t_h_e _c_o_m_p_e_t_e_n_c_e _a_n_d _i_d_e_n_t_i_t_y _o_f _t_h_o_s_e _w_h_o _p_r_o_- - _v_i_d_e _i_n_s_t_a_l_l_a_b_l_e _p_a_c_k_a_g_e _f_i_l_e_s_. _F_o_r _e_x_t_r_a _p_r_o_t_e_c_t_i_o_n_, _u_s_e _t_h_e _d_i_g_i_t_a_l - _s_i_g_n_a_t_u_r_e_s _p_r_o_v_i_d_e_d _w_h_e_r_e _p_o_s_s_i_b_l_e _(_s_e_e _t_h_e pkg_install.conf(_5)_)_, _o_r_, - _f_a_i_l_i_n_g _t_h_a_t_, _u_s_e tar(_1) _t_o _e_x_t_r_a_c_t _t_h_e _p_a_c_k_a_g_e _f_i_l_e_, _a_n_d _i_n_s_p_e_c_t _i_t_s - _c_o_n_t_e_n_t_s _a_n_d _s_c_r_i_p_t_s _t_o _e_n_s_u_r_e _i_t _p_o_s_e_s _n_o _d_a_n_g_e_r _t_o _y_o_u_r _s_y_s_t_e_m_'_s - _i_n_t_e_g_r_i_t_y_. _P_a_y _p_a_r_t_i_c_u_l_a_r _a_t_t_e_n_t_i_o_n _t_o _a_n_y _+_I_N_S_T_A_L_L _o_r _+_D_E_I_N_S_T_A_L_L _f_i_l_e_s_, - _a_n_d _i_n_s_p_e_c_t _t_h_e _+_C_O_N_T_E_N_T_S _f_i_l_e _f_o_r @@ccwwdd_, @@mmooddee _(_c_h_e_c_k _f_o_r _s_e_t_u_i_d_)_, - @@ddiirrrrmm_, @@eexxeecc_, _a_n_d @@uunneexxeecc _d_i_r_e_c_t_i_v_e_s_, _a_n_d_/_o_r _u_s_e _t_h_e pkg_info(_1) _c_o_m_m_a_n_d - _t_o _e_x_a_m_i_n_e _t_h_e _p_a_c_k_a_g_e _f_i_l_e_. - -OOPPTTIIOONNSS - The following command line arguments are supported: - - _p_k_g_-_n_a_m_e [_._._.] - The named packages are installed. ppkkgg__aadddd will first try to use - _p_k_g_-_n_a_m_e as full URL or path name without any wildcard process- - ing. If that fails, ppkkgg__aadddd will try to match packages using - wildcard processing. If that fails as well and _p_k_g_-_n_a_m_e does not - contain any /, the entries of the PKG_PATH variable are searched - using the wildcard processing rules. - - --AA Mark package as installed automatically, as dependency of another - package. You can use - ppkkgg__aaddmmiinn sseett aauuttoommaattiicc==YYEESS - to mark packages this way after installation, and - ppkkgg__aaddmmiinn uunnsseett aauuttoommaattiicc - to remove the mark. If you ppkkgg__aadddd a package without specifying - --AA after it had already been automatically installed, the mark is - removed. - - --ff Force installation to proceed even if prerequisite packages are - not installed or the install script fails. Although ppkkgg__aadddd will - still try to find and auto-install missing prerequisite packages, - a failure to find one will not be fatal. This flag also over- - rides the fatal error when the operating system or architecture - the package was built on differ from that of the host. - - --II If an installation script exists for a given package, do not exe- - cute it. - - --KK _p_k_g___d_b_d_i_r - Set _p_k_g___d_b_d_i_r as the package database directory. See the - _E_N_V_I_R_O_N_M_E_N_T section below for details on how the default value is - calculated. - - --LL Don't add the package to any views after installation. - - --mm Override the machine architecture returned by uname with _m_a_c_h_i_n_e. - - --nn Don't actually install a package, just report the steps that - would be taken if it was. - - --PP _d_e_s_t_d_i_r - Prefix all file and directory names with _d_e_s_t_d_i_r. For packages - without install scripts this has the same behavior as using - chroot. - - --pp _p_r_e_f_i_x - Set _p_r_e_f_i_x 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 @@ccwwdd directive - will be replaced, since ppkkgg__aadddd has no way of knowing which - directory settings are relative and which are absolute. Only one - directory transition is supported and the second one is expected - to go into _p_k_g_d_b. - - --RR Do not record the installation of a package. This implies --II. - This means that you cannot deinstall it later, so only use this - option if you know what you are doing! - - --uu If the package that's being installed is already installed, an - update is performed. It is currently not possible to update to - an identical version. If this is specified twice, then any - dependent packages that are too old will also be updated to ful- - fill the dependency. See below for a more detailed description - of the process. - - --VV Print version number and exit. - - --vv Turn on verbose output. - - --WW _v_i_e_w_b_a_s_e - Set _v_i_e_w_b_a_s_e as the base directory for the managed views. The - default _v_i_e_w_b_a_s_e directory is set by pkg_view(1). This value - also may be set from the LOCALBASE environment variable. - - --ww _v_i_e_w - Set the _v_i_e_w to which packages should be added after installa- - tion. The default _v_i_e_w is set by pkg_view(1). This value also - may be set from the PKG_VIEW environment variable. - - One or more _p_k_g_-_n_a_m_e 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., - ppkkgg__aadddd ftp://ftp.NetBSD.org/pub/pkgsrc/pack- - ages/NetBSD/i386/3.1_2007Q2/shells/bash-3.2.9.tgz or ppkkgg__aadddd - http://www.example.org/packages/screen-4.0.tbz). Note: For ftp trans- - fers, if you wish to use _p_a_s_s_i_v_e _m_o_d_e ftp in such transfers, set the - variable _F_T_P___P_A_S_S_I_V_E___M_O_D_E to some value in your environment. Otherwise, - the more standard ACTIVE mode may be used. If ppkkgg__aadddd 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 _p_a_s_s_i_v_e _m_o_d_e ftp. - -TTEECCHHNNIICCAALL DDEETTAAIILLSS - ppkkgg__aadddd extracts each package's meta data (including the ``packing - list'') to memory and then runs through the following sequence to fully - extract the contents of the package: - - 1. A check is made to determine if the package or another version - of it is already recorded as installed. If it is, installa- - tion is terminated if the --uu option is not given. - - If the --uu option is given, it's assumed the package should be - replaced by the new version instead. Before doing so, all - packages that depend on the pkg being upgraded are checked if - they also work with the new version. If that test is success- - ful, replacing is prepared by moving an existing _+_R_E_Q_U_I_R_E_D___B_Y - file aside (if it exists), and running pkg_delete(1) on the - installed package. Installation then proceeds as if the pack- - age was not installed, and restores the _+_R_E_Q_U_I_R_E_D___B_Y file - afterwards. - - 2. The package build information is extracted from the - _+_B_U_I_L_D___I_N_F_O file and compared against the result of uname(3). - If the operating system or architecture of the package differ - from that of the host, installation is aborted. This behavior - is overridable with the --ff flag. - - 3. The package build information from _+_B_U_I_L_D___I_N_F_O is then checked - for USE_ABI_DEPENDS=NO (or IGNORE_RECOMMENDED). If the pack- - age was built with ABI dependency recommendations ignored, a - warning will be issued. - - 4. A check is made to determine if the package conflicts (from - @@ppkkggccffll directives, see pkg_create(1)) with an already - recorded as installed package or if an installed package con- - flicts with the package. If it is, installation is termi- - nated. - - 5. The file list of the package is compared to the file lists of - the installed packages. If there is any overlap, the instal- - lation is terminated. - - 6. All package dependencies (from @@ppkkggddeepp directives, see - pkg_create(1)) are read from the packing list. If any of - these required packages are not currently installed, an - attempt is made to find and install it; if the missing package - cannot be found or installed, the installation is terminated. - If the --uu option was specified twice, any required packages - that are installed, but which have a version number that is - considered to be too old, are also updated. The dependent - packages are found according to the normal PKG_PATH rules. - - 7. If the package contains an _i_n_s_t_a_l_l script, it is executed with - the following arguments: - - _p_k_g_-_n_a_m_e The name of the package being installed. - - PPRREE--IINNSSTTAALLLL Keyword denoting that the script is to perform - any actions needed before the package is - installed. - - If the _i_n_s_t_a_l_l script exits with a non-zero status code, the - installation is terminated. - - 8. The files from the file list are extracted to the chosen pre- - fix. - - 9. If an _i_n_s_t_a_l_l script exists for the package, it is executed - with the following arguments: - - _p_k_g___n_a_m_e The name of the package being installed. - - PPOOSSTT--IINNSSTTAALLLL Keyword denoting that the script is to perform - any actions needed after the package has been - installed. - - 10. After installation is complete, a copy of the packing list, - _d_e_i_n_s_t_a_l_l script, description, and display files are copied - into _/_v_a_r_/_d_b_/_p_k_g_/_<_p_k_g_-_n_a_m_e_> for subsequent possible use by - pkg_delete(1). Any package dependencies are recorded in the - other packages' _/_v_a_r_/_d_b_/_p_k_g_/_<_o_t_h_e_r_-_p_k_g_>_/_+_R_E_Q_U_I_R_E_D___B_Y file (if - an alternate package database directory is specified, then it - overrides the _/_v_a_r_/_d_b_/_p_k_g path shown above). - - 11. If the package is a depoted package, then add it to the - default view. - - 12. Finally, if we were upgrading a package, any _+_R_E_Q_U_I_R_E_D___B_Y file - that was moved aside before upgrading was started is now moved - back into place. - - The _i_n_s_t_a_l_l script is called with the environment variable PKG_PREFIX set - to the installation prefix (see the --pp 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 --pp flag to ppkkgg__aadddd. The scripts are also called with - the PKG_METADATA_DIR environment variable set to the location of the _+_* - meta-data files, and with the PKG_REFCOUNT_DBDIR environment variable set - to the location of the package reference counts database directory. If - the --PP flag was given to ppkkgg__aadddd, PKG_DESTDIR will be set to _d_e_s_t_d_i_r. - -EENNVVIIRROONNMMEENNTT - LOCALBASE This is the location of the _v_i_e_w_b_a_s_e directory in which all - the views are managed. The default _v_i_e_w_b_a_s_e directory is - _/_u_s_r_/_p_k_g. - - PKG_DBDIR If the --KK flag isn't given, then the value of the PKG_DBDIR - variable overrides the pkg_install.conf(5) variable of the - same name. If all of this fails to locate a value, then it - typically defaults to _/_v_a_r_/_d_b_/_p_k_g. - - PKG_PATH The value of the PKG_PATH variable overrides the - pkg_install.conf(5) variable of the same name. It is used if - a given package can't be found, it's usually set to - _/_u_s_r_/_p_k_g_s_r_c_/_p_a_c_k_a_g_e_s_/_A_l_l. The environment variable should be - a series of entries separated by semicolons. Each entry con- - sists of a directory name or URL. The current directory may - be indicated implicitly by an empty directory name, or - explicitly by a single period. - - PKG_REFCOUNT_DBDIR - Location of the package reference counts database directory. - The default location is the path to the package database - directory with ``.refcount'' appended to the path, e.g. - _/_v_a_r_/_d_b_/_p_k_g_._r_e_f_c_o_u_n_t. - - PKG_VIEW The default view can be specified in the PKG_VIEW environment - variable. - -EEXXAAMMPPLLEESS - In all cases, ppkkgg__aadddd will try to install binary packages listed in - dependencies list. - - You can specify a compiled binary package explicitly on the command line. - - # pkg_add /usr/pkgsrc/packages/All/tcsh-6.14.00.tgz - - If you omit the version number, ppkkgg__aadddd will install the latest version - available. With --vv, ppkkgg__aadddd emits more messages to terminal. - - # pkg_add -v /usr/pkgsrc/packages/All/unzip - - You can grab a compiled binary package from remote location by specifying - a URL. The URL can be put into an environment variable, PKG_PATH. - - # pkg_add -v ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/i386/3.1_2007Q2/All/firefox-2.0.0.4.tgz - - # export PKG_PATH=ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/i386/3.1_2007Q2/All - # pkg_add -v firefox - - Over time, as problems are found in packages, they will be moved from the - _A_l_l subdirectory into the _v_u_l_n_e_r_a_b_l_e subdirectory. If you want to accept - vulnerable packages by default (and know what you are doing), you can add - the _v_u_l_n_e_r_a_b_l_e directory to your PKG_PATH like this: - - # export PKG_PATH="ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/i386/3.1_2007Q2/All/;ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/i386/3.1_2007Q2/vulnerable/" - - (The quotes are needed because semicolon (`;') is a shell meta-charac- - ter.) If you do this, consider using the audit capabilities in - pkg_admin(1) and running it after every ppkkgg__aadddd. - -CCOONNFFIIGGUURRAATTIIOONN VVAARRIIAABBLLEESS - The following variables change the behavior of ppkkgg__aadddd and are described - in pkg_install.conf(5): - CHECK_LICENSE - CHECK_VULNERABILITIES - CERTIFICATE_ANCHOR_PKGS - CERTIFICATE_CHAIN - VERIFIED_INSTALLATION - -SSEEEE AALLSSOO - pkg_admin(1), pkg_create(1), pkg_delete(1), pkg_info(1), tar(1), - mktemp(3), sysconf(3), pkg_install.conf(5), pkgsrc(7) - -AAUUTTHHOORRSS - Jordan Hubbard - Initial work and ongoing development. - John Kohl - NetBSD refinements. - Hubert Feyrer - NetBSD wildcard dependency processing, pkgdb, upgrading, etc. - Thomas Klausner - HTTP support. - Joerg Sonnenberger - Rewrote most of the code base to work without external commands. - -BBUUGGSS - Package upgrading needs a lot more work to be really universal. - - Sure to be others. - -NetBSD 5.0 January 20, 2010 NetBSD 5.0 diff --git a/pkgtools/pkg_install/files/admin/pkg_admin.1 b/pkgtools/pkg_install/files/admin/pkg_admin.1.in index 45d6466b5c1..7299addde2e 100644 --- a/pkgtools/pkg_install/files/admin/pkg_admin.1 +++ b/pkgtools/pkg_install/files/admin/pkg_admin.1.in @@ -1,4 +1,4 @@ -.\" $NetBSD: pkg_admin.1,v 1.29 2010/01/20 22:34:47 jmmv Exp $ +.\" $NetBSD: pkg_admin.1.in,v 1.1 2010/01/21 21:58:06 jmmv Exp $ .\" .\" Copyright (c) 1999-2010 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -256,7 +256,7 @@ otherwise returns false. .It Cm rebuild Rebuild the package database mapping from scratch, scanning subdirectories in -.Pa /var/db/pkg +.Pa @pkgdbdir@ for .Pa +CONTENTS files, parsing them and writing the resulting absolute pathnames @@ -316,7 +316,7 @@ variable overrides the .Xr pkg_install.conf 5 variable of the same name. If all of this fails to locate a value, then it typically defaults to -.Pa /var/db/pkg . +.Pa @pkgdbdir@ . .El .Sh CONFIGURATION VARIABLES The following variables change the behavior of @@ -333,9 +333,9 @@ and are described in .It Ev IGNORE_URL .El .Sh FILES -.Bl -tag -width /var/db/pkg/pkgdb.byfile.db -compact -.It Pa /var/db/pkg/pkgdb.byfile.db -.It Pa /var/db/pkg/\*[Lt]pkg\*[Gt]/+CONTENTS +.Bl -tag -width @pkgdbdir@/pkgdb.byfile.db -compact +.It Pa @pkgdbdir@/pkgdb.byfile.db +.It Pa @pkgdbdir@/\*[Lt]pkg\*[Gt]/+CONTENTS .El .Sh SEE ALSO .Xr pkg_add 1 , diff --git a/pkgtools/pkg_install/files/admin/pkg_admin.cat1 b/pkgtools/pkg_install/files/admin/pkg_admin.cat1 deleted file mode 100644 index 5b2c350e3de..00000000000 --- a/pkgtools/pkg_install/files/admin/pkg_admin.cat1 +++ /dev/null @@ -1,246 +0,0 @@ -PKG_ADMIN(1) NetBSD General Commands Manual PKG_ADMIN(1) - -NNAAMMEE - ppkkgg__aaddmmiinn -- perform various administrative tasks to the pkg system - -SSYYNNOOPPSSIISS - ppkkgg__aaddmmiinn [--bbqqSSVVvv] [--CC _c_o_n_f_i_g] [--dd _l_s_d_i_r] [--KK _p_k_g___d_b_d_i_r] [--ss _s_f_x___p_a_t_t_e_r_n] - _c_o_m_m_a_n_d [args ...] - -DDEESSCCRRIIPPTTIIOONN - This command performs various administrative tasks around the NetBSD - Packages System. - -OOPPTTIIOONNSS - The following command-line options are supported: - - --bb Print only the base names when matching package names for llssaallll - and llssbbeesstt. - - --CC _c_o_n_f_i_g - Read the configuration file from _c_o_n_f_i_g instead of the system - default. - - --dd _l_s_d_i_r - Set _l_s_d_i_r as the path to the directory in which to find matching - package names for llssaallll and llssbbeesstt. - - --KK _p_k_g___d_b_d_i_r - Set _p_k_g___d_b_d_i_r as the package database directory. See the - _E_N_V_I_R_O_N_M_E_N_T section below for details on how the default value is - calculated. - - --qq Perform checks in a quiet manner. In normal operation, ppkkgg__aaddmmiinn - prints a `.' to standard output to indicate progress. This - option suppresses this progress indicator. - - --SS Set the shell glob pattern for package suffixes when matching - package names for llssaallll and llssbbeesstt to be the null suffix. - - --ss _s_f_x___p_a_t_t_e_r_n - Set the shell glob pattern for package suffixes when matching - package names for llssaallll and llssbbeesstt. The default pattern is - ".t[bg]z". - - --VV Print version number and exit. - - --vv Be more verbose. - - The following commands are supported: - - aadddd _p_k_g _._._. - For each listed package, write the absolute pathnames of the - files listed in its _+_C_O_N_T_E_N_T_S file together with the package they - belong to into the package database. This should be used only by - pkg_view(1). - - aauuddiitt [--eess] [--tt _t_y_p_e] [_p_k_g] ... - Check the listed installed packages for vulnerabilities. If no - package is given, check all installed packages. If --ee is given, - also include end-of-life information. If --ss is given, check the - signature of the pkg-vulnerabilities file before using it. --tt - restricts the reported vulnerabilities to type _t_y_p_e. - - aauuddiitt--ppkkgg [--eess] [--tt _t_y_p_e] [_p_k_g] ... - Like aauuddiitt, but check only the given package names or patterns. - - aauuddiitt--bbaattcchh [--eess] [--tt _t_y_p_e] [_p_k_g_-_l_i_s_t] ... - Like aauuddiitt--ppkkgg, but read the package names or patterns one per - line from the given files. - - aauuddiitt--hhiissttoorryy [--ss] [--tt _t_y_p_e] [_p_k_g_b_a_s_e] ... - Print all vulnerabilities for the given base package names. - - cchheecckk [_p_k_g _._._.] - Use this command to check the files belonging to some or all of - the packages installed on the local machine against the checksum - which was recorded in the _+_C_O_N_T_E_N_T_S files at package installation - time. Symbolic links also have their integrity checked against - the recorded value at package installation time. If no addi- - tional 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 pkg_info(1)). - - The packages' _+_C_O_N_T_E_N_T_S files will be parsed and the 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. Symbolic links are also checked, ensuring that the - targets on disk are the same as the contents recorded at package - installation time. - - cchheecckk--lliicceennssee _c_o_n_d_i_t_i_o_n - Check if _c_o_n_d_i_t_i_o_n can be fulfilled with the currently set of - accepted licenses. Prints either yes or no to stdout if the con- - dition can be parsed, otherwise it exits with error. - - cchheecckk--ppkkgg--vvuullnneerraabbiilliittiieess [--ss] _f_i_l_e - Check format and hashes in the pkg-vulnerabilities file _f_i_l_e. If - --ss is given, also check the embedded signature. - - cchheecckk--ssiiggnnaattuurree _f_i_l_e _._._. - Reports if _f_i_l_e is a correctly signed package. - - cchheecckk--ssiinnggllee--lliicceennssee _l_i_c_e_n_s_e - Check if _l_i_c_e_n_s_e is a valid license name and if it is in the set - of acceptable licenses. Prints either yes or no to stdout if the - condition can be parsed, otherwise it exits with error. - - ccoonnffiigg--vvaarr _v_a_r_i_a_b_l_e - Print the current value of _v_a_r_i_a_b_l_e as used after parsing the - configuration file. - - ddeelleettee _p_k_g _._._. - For each listed package, remove all file entries in the package - database that belong to the package. This should be used only by - pkg_view(1). - - dduummpp Dump the contents of the package database, similar to ppkkgg__iinnffoo - --FF. Columns are printed for the key field used in the pkgdb - - the filename -, and the data field - the package the file belongs - to. - - ffeettcchh--ppkkgg--vvuullnneerraabbiilliittiieess [--ssuu] - Fetch a new pkg-vulnerabilities file, check the format and if --ss - is given the signature. If all checks are passed, write it to - pkgdb. If --uu is given, the fetch is conditional and the file - transfer is only done if the remote version is newer than the one - in pkgdb. - - ffiinnddbbeesstt _p_a_t_t_e_r_n _._._. - Search the entries of PKG_PATH for packages matching _p_a_t_t_e_r_n. - Print the URL of the best matching package to stdout for each - pattern. If a pattern is not matched, it is skipped and the com- - mand will return a failure. - - llssaallll _/_d_i_r_/_p_k_g_p_a_t_t_e_r_n - - llssbbeesstt _/_d_i_r_/_p_k_g_p_a_t_t_e_r_n - List all/best package matching pattern in the given directory - _/_d_i_r. If the --dd flag is given, then that directory path over- - rides _/_d_i_r. Can be used to work around limitations of /bin/sh - and other filename globbing mechanisms. This option implements - matching of pkg-wildcards against arbitrary files and directo- - ries, useful mainly in the build system itself. See pkg_info(1) - for a description of the pattern. - - Example: - - yui# cd /usr/pkgsrc/packages/i386ELF/All/ - yui# ls unzip* - unzip-5.40.tgz unzip-5.41.tgz - yui# pkg_admin lsall 'unzip*' - /usr/pkgsrc/packages/i386ELF/All/unzip-5.40.tgz - /usr/pkgsrc/packages/i386ELF/All/unzip-5.41.tgz - yui# pkg_admin lsall 'unzip>=5.40' - /usr/pkgsrc/packages/i386ELF/All/unzip-5.40.tgz - /usr/pkgsrc/packages/i386ELF/All/unzip-5.41.tgz - yui# pkg_admin lsall 'unzip>=5.41' - /usr/pkgsrc/packages/i386ELF/All/unzip-5.41.tgz - yui# pkg_admin lsbest 'unzip>=5.40' - /usr/pkgsrc/packages/i386ELF/All/unzip-5.41.tgz - yui# pkg_admin lsall /usr/pkgsrc/packages/i386ELF/All/'{mit,unproven}-pthread*' - /usr/pkgsrc/packages/i386ELF/All/mit-pthreads-1.60b6.tgz - /usr/pkgsrc/packages/i386ELF/All/unproven-pthreads-0.15.tgz - - ppmmaattcchh _p_a_t_t_e_r_n _p_k_g - Returns true if _p_k_g matches _p_a_t_t_e_r_n, otherwise returns false. - - rreebbuuiilldd - Rebuild the package database mapping from scratch, scanning sub- - directories in _/_v_a_r_/_d_b_/_p_k_g for _+_C_O_N_T_E_N_T_S files, parsing them and - writing the resulting absolute pathnames together with the pack- - age they belong to into the package database. - - This option is intended to be used for upgrading from non-pkgdb- - pkg_* tools to pkgdb-pkg_* tools, further manipulation of the - pkgdb will be done by pkg_add(1), pkg_delete(1), and - pkg_create(1). - - Needs to be run as root. - - rreebbuuiilldd--ttrreeee - Rebuild the +REQUIRED_BY files from scratch by reresolving all - dependencies. - - This option is intended to be used for fixing inconsistencies - between the records of depending and depended-on packages, such - as can arise by the use of ppkkgg__ddeelleettee --ff. - - sseett _v_a_r_i_a_b_l_e_=_v_a_l_u_e _p_k_g _._._. - Set variable with information about the installed package. Use - uunnsseett to remove a variable. - - Packages that are not installed directly by the user but pulled - in as dependencies are marked by setting ``automatic=YES''. - - ggppgg--ssiiggnn--ppaacckkaaggee ppkkgg ssppkkgg - Sign the binary package _p_k_g using GPG and write the result to - _s_p_k_g. - - xx550099--ssiiggnn--ppaacckkaaggee ppkkgg ssppkkgg kkeeyy cceerrtt - Sign the binary package _p_k_g using the key _k_e_y and the certificate - _c_e_r_t, using _s_p_k_g as output file. - - uunnsseett _v_a_r_i_a_b_l_e _p_k_g _._._. - Remove an installation variable. - -EENNVVIIRROONNMMEENNTT - PKG_DBDIR - If the --KK flag isn't given, then the value of the PKG_DBDIR vari- - able overrides the pkg_install.conf(5) variable of the same name. - If all of this fails to locate a value, then it typically - defaults to _/_v_a_r_/_d_b_/_p_k_g. - -CCOONNFFIIGGUURRAATTIIOONN VVAARRIIAABBLLEESS - The following variables change the behavior of ppkkgg__aaddmmiinn and are - described in pkg_install.conf(5): - - CERTIFICATE_ANCHOR_PKGS - - CERTIFICATE_ANCHOR_PKGVULN - - CERTIFICATE_CHAIN - - GPG - - PKGVULNDIR - - PKGVULNURL - - IGNORE_URL - -FFIILLEESS - /var/db/pkg/pkgdb.byfile.db - /var/db/pkg/<pkg>/+CONTENTS - -SSEEEE AALLSSOO - pkg_add(1), pkg_create(1), pkg_delete(1), pkg_info(1), pkg_view(1), - pkg_install.conf(5), pkgsrc(7) - -HHIISSTTOORRYY - The ppkkgg__aaddmmiinn command first appeared in NetBSD 1.4. - -AAUUTTHHOORRSS - The ppkkgg__aaddmmiinn command was written by Hubert Feyrer. - -NetBSD 5.0 January 20, 2010 NetBSD 5.0 diff --git a/pkgtools/pkg_install/files/configure.ac b/pkgtools/pkg_install/files/configure.ac index a70251de5ce..2e1d2dfe904 100644 --- a/pkgtools/pkg_install/files/configure.ac +++ b/pkgtools/pkg_install/files/configure.ac @@ -145,7 +145,13 @@ AH_BOTTOM( SYSCONFDIR="$sysconfdir" AC_SUBST(SYSCONFDIR) -AC_CONFIG_FILES([Makefile add/Makefile admin/Makefile bpm/bpm.sh \ - create/Makefile delete/Makefile info/Makefile \ - lib/Makefile lib/pkg_install.conf.5 lib/pkg_install.conf.cat5]) +AC_CONFIG_FILES([Makefile \ + add/Makefile add/pkg_add.1 add/pkg_add.cat1 \ + admin/Makefile admin/pkg_admin.1 admin/pkg_admin.cat1 \ + bpm/bpm.sh \ + create/Makefile create/pkg_create.1 create/pkg_create.cat1 \ + delete/Makefile delete/pkg_delete.1 delete/pkg_delete.cat1 \ + info/Makefile info/pkg_info.1 info/pkg_info.cat1 \ + lib/Makefile lib/pkg_install.conf.5 \ lib/pkg_install.conf.cat5 \ + view/pkg_view.1 view/pkg_view.cat1]) AC_OUTPUT diff --git a/pkgtools/pkg_install/files/create/pkg_create.1 b/pkgtools/pkg_install/files/create/pkg_create.1.in index 3b9f760b409..180c2c557a3 100644 --- a/pkgtools/pkg_install/files/create/pkg_create.1 +++ b/pkgtools/pkg_install/files/create/pkg_create.1.in @@ -1,4 +1,4 @@ -.\" $NetBSD: pkg_create.1,v 1.22 2010/01/20 22:34:47 jmmv Exp $ +.\" $NetBSD: pkg_create.1.in,v 1.1 2010/01/21 21:58:06 jmmv Exp $ .\" .\" FreeBSD install - a package for the installation and maintenance .\" of non-core utilities. @@ -488,7 +488,7 @@ variable overrides the .Xr pkg_install.conf 5 variable of the same name. If all of this fails to locate a value, then it typically defaults to -.Pa /var/db/pkg . +.Pa @pkgdbdir@ . .El .Sh SEE ALSO .Xr pkg_add 1 , diff --git a/pkgtools/pkg_install/files/create/pkg_create.cat1 b/pkgtools/pkg_install/files/create/pkg_create.cat1 deleted file mode 100644 index be1995dfc5e..00000000000 --- a/pkgtools/pkg_install/files/create/pkg_create.cat1 +++ /dev/null @@ -1,287 +0,0 @@ -PKG_CREATE(1) NetBSD General Commands Manual PKG_CREATE(1) - -NNAAMMEE - ppkkgg__ccrreeaattee -- a utility for creating software package distributions - -SSYYNNOOPPSSIISS - ppkkgg__ccrreeaattee [--EEllOOUUVVvv] [--BB _b_u_i_l_d_-_i_n_f_o_-_f_i_l_e] [--bb _b_u_i_l_d_-_v_e_r_s_i_o_n_-_f_i_l_e] - [--CC _c_p_k_g_s] [--DD _d_i_s_p_l_a_y_f_i_l_e] [--FF _c_o_m_p_r_e_s_s_i_o_n] [--gg _g_r_o_u_p] - [--II _r_e_a_l_p_r_e_f_i_x] [--ii _i_s_c_r_i_p_t] [--KK _p_k_g___d_b_d_i_r] [--kk _d_s_c_r_i_p_t] - [--nn _p_r_e_s_e_r_v_e_-_f_i_l_e] [--PP _d_p_k_g_s] [--TT _b_u_i_l_d_p_k_g_s] [--pp _p_r_e_f_i_x] - [--SS _s_i_z_e_-_a_l_l_-_f_i_l_e] [--ss _s_i_z_e_-_p_k_g_-_f_i_l_e] [--tt _t_e_m_p_l_a_t_e] [--uu _o_w_n_e_r] - --cc _c_o_m_m_e_n_t --dd _d_e_s_c_r_i_p_t_i_o_n --ff _p_a_c_k_l_i_s_t _p_k_g_-_n_a_m_e - -DDEESSCCRRIIPPTTIIOONN - The ppkkgg__ccrreeaattee 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 descrip- - tion of the input syntax is included in this document. - -OOPPTTIIOONNSS - The following command line options are supported: - - --BB _b_u_i_l_d_-_i_n_f_o_-_f_i_l_e - Install the file _b_u_i_l_d_-_i_n_f_o_-_f_i_l_e so that users of binary packages - can see what make(1) definitions were used to control the build - when creating the binary package. This allows various build def- - initions to be retained in a binary package and viewed wherever - it is installed, using pkg_info(1). - - --bb _b_u_i_l_d_-_v_e_r_s_i_o_n_-_f_i_l_e - Install the file _b_u_i_l_d_-_v_e_r_s_i_o_n_-_f_i_l_e so that users of binary pack- - ages 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 - pkg_info(1). - - --CC _c_p_k_g_s - Set the initial package conflict list to _c_p_k_g_s. This is assumed - to be a whitespace separated list of package names and is meant - as a convenient shorthand for specifying multiple @@ppkkggccffll direc- - tives in the packing list (see PACKING LIST DETAILS section - below). - - --cc _[_-_]_d_e_s_c - Fetch package (one line description) from file _d_e_s_c or, if pre- - ceded by --, the argument itself. This string should also give - some idea of which version of the product (if any) the package - represents. - - --DD _d_i_s_p_l_a_y_f_i_l_e - Display the file after installing the package. Useful for things - like legal notices on almost-free software, etc. - - --dd _[_-_]_d_e_s_c - Fetch long description for package from file _d_e_s_c or, if preceded - by --, the argument itself. - - --EE Add an empty views file to the package. - - --FF _c_o_m_p_r_e_s_s_i_o_n - Use _c_o_m_p_r_e_s_s_i_o_n as compression algorithm. This overrides the - heuristic to guess the compression type from the output name. - Currently supported values are bzip2, gzip and none. - - --ff _p_a_c_k_l_i_s_t - Fetch (packing list) for package from the file _p_a_c_k_l_i_s_t or ssttddiinn - if _p_a_c_k_l_i_s_t is a -- (dash). - - --gg _g_r_o_u_p - Make _g_r_o_u_p the default group ownership instead of extracting it - from the file system. - - --II _r_e_a_l_p_r_e_f_i_x - Provide the real prefix, as opposed to the staging prefix, for - use in staged installations of packages. - - --ii _i_s_c_r_i_p_t - Set _i_s_c_r_i_p_t 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. - - --KK _p_k_g___d_b_d_i_r - Set _p_k_g___d_b_d_i_r as the package database directory. See the - _E_N_V_I_R_O_N_M_E_N_T section below for details on how the default value is - calculated. - - --kk _d_s_c_r_i_p_t - Set _d_s_c_r_i_p_t 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. - - --ll Check that any symbolic links which are to be placed in the pack- - age are relative to the current prefix. This means using - unlink(2) and symlink(2) to remove and re-link any symbolic links - which are targeted at full path names. - - --nn _p_r_e_s_e_r_v_e_-_f_i_l_e - The file is used to denote that the package should not be - deleted. This is intended for use where the deletion of packages - may present a bootstrap problem. - - --OO Go into a (packing list only) mode. This is used to do (fake - pkg_add) operations when a package is installed. In such cases, - it is necessary to know what the final, adjusted packing list - will look like. - - --PP _d_p_k_g_s - Set the initial package dependency list to _d_p_k_g_s. This is - assumed to be a whitespace separated list of package names and is - meant as a convenient shorthand for specifying multiple @@ppkkggddeepp - directives in the packing list (see PACKING LIST DETAILS section - below). In addition, the exact versions of the packages referred - to in the _d_p_k_g_s list will be added to the packing list in the - form of @@bbllddddeepp directives. - - --TT _b_u_i_l_d_p_k_g_s - The exact versions of the packages referred to in the _b_u_i_l_d_p_k_g_s - list will be added to the packing list in the form of @@bbllddddeepp - directives. This directives are stored after those created by - the --PP option. _b_u_i_l_d_p_k_g_s is assumed to be a whitespace separated - list of package names. - - --pp _p_r_e_f_i_x - Set _p_r_e_f_i_x as the initial directory (base) to start from in - selecting files for the package. - - --SS _s_i_z_e_-_a_l_l_-_f_i_l_e - Store the given file for later querying with the pkg_info(1) --SS - 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. - - --ss _s_i_z_e_-_p_k_g_-_f_i_l_e - Store the given file for later querying with the pkg_info(1) --ss - flag. The file is expected to contain the size (in bytes) of all - files of this package added up and stored as a ASCII string, ter- - minated by a newline. - - --tt _t_e_m_p_l_a_t_e - Use _t_e_m_p_l_a_t_e as the input to mktemp(3). By default, this is the - string _/_t_m_p_/_i_n_s_t_m_p_._X_X_X_X_X_X, but it may be necessary to override it - in the situation where space in your _/_t_m_p directory is limited. - Be sure to leave some number of `X' characters for mktemp(3) to - fill in with a unique ID. - - --UU Do not update the package file database with any file informa- - tion. - - --uu _o_w_n_e_r - Make _o_w_n_e_r the default owner instead of extracting it from the - file system. - - --VV Print version number and exit. - - --vv Turn on verbose output. - -PPAACCKKIINNGG LLIISSTT DDEETTAAIILLSS - The (packing list) format (see --ff) 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 for a package that - could be installed potentially anywhere, there is another method of spec- - ifying 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: - @@ccwwdd _d_i_r_e_c_t_o_r_y - Set the internal directory pointer to point to _d_i_r_e_c_t_o_r_y. All - subsequent filenames will be assumed relative to this directory. - Note: @@ccdd is also an alias for this command. - @@ssrrcc _d_i_r_e_c_t_o_r_y - This command is supported for compatibility only. It was for- - merly used to override @@ccwwdd during package creation. - @@eexxeecc _c_o_m_m_a_n_d - Execute _c_o_m_m_a_n_d as part of the unpacking process. If _c_o_m_m_a_n_d - contains any of the following sequences somewhere in it, they - will be expanded inline. For the following examples, assume that - @@ccwwdd is set to _/_u_s_r_/_l_o_c_a_l and the last extracted file was - _b_i_n_/_e_m_a_c_s. - %%FF Expands to the last filename extracted (as specified), in - the example case _b_i_n_/_e_m_a_c_s - %%DD Expand to the current directory prefix, as set with @@ccwwdd, - in the example case _/_u_s_r_/_l_o_c_a_l. - %%BB Expand to the (basename) of the fully qualified filename, - that is the current directory prefix, plus the last file- - spec, minus the trailing filename. In the example case, - that would be _/_u_s_r_/_l_o_c_a_l_/_b_i_n. - %%ff Expand to the (filename) part of the fully qualified - name, or the converse of %%BB, being in the example case, - _e_m_a_c_s. - @@uunneexxeecc _c_o_m_m_a_n_d - Execute _c_o_m_m_a_n_d as part of the deinstallation process. Expansion - of special %% sequences is the same as for @@eexxeecc. This command is - not executed during the package add, as @@eexxeecc 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 con- - tents (and hence not automatically removable). The advantage of - using @@uunneexxeecc over a deinstallation script is that you can use - the (special sequence expansion) to get at files regardless of - where they've been potentially redirected (see --pp). - @@mmooddee _m_o_d_e - Set default permission for all subsequently extracted files to - _m_o_d_e. Format is the same as that used by the cchhmmoodd command - (well, considering that it's later handed off to it, that's no - surprise). Use without an arg to set back to default (extrac- - tion) permissions. - @@ooppttiioonn _o_p_t_i_o_n - Set internal package options, the only currently supported one - being _p_r_e_s_e_r_v_e, which tells pkg_add to move any existing files - out of the way, preserving the previous contents (which are also - resurrected on pkg_delete, so caveat emptor). - @@oowwnneerr _u_s_e_r - Set default ownership for all subsequently extracted files to - _u_s_e_r. Use without an arg to set back to default (extraction) - ownership. - @@ggrroouupp _g_r_o_u_p - Set default group ownership for all subsequently extracted files - to _g_r_o_u_p. Use without an arg to set back to default (extraction) - group ownership. - @@ccoommmmeenntt _s_t_r_i_n_g - Embed a comment in the packing list. Useful in trying to docu- - ment some particularly hairy sequence that may trip someone up - later. - @@iiggnnoorree - Used internally to tell extraction to ignore the next file (don't - copy it anywhere), as it's used for some special purpose. - @@nnaammee _n_a_m_e - 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 ppkkgg__ccrreeaattee will - derive this field from the _p_k_g_-_n_a_m_e and add it automatically if - none is given. - @@ppkkggddiirr _n_a_m_e - Declare directory _n_a_m_e as managed. If it does not exist at - installation time, it is created. If this directory is no longer - referenced by packages and the last file or directory in it is - deleted, the directory is removed as well. - @@ddiirrrrmm _n_a_m_e - This command is supported for compatibility only. If directory - _n_a_m_e exists, it will be deleted at deinstall time. - @@ddiissppllaayy _n_a_m_e - Declare _n_a_m_e as the file to be displayed at install time (see --DD - above). - @@ppkkggddeepp _p_k_g_n_a_m_e - Declare a dependency on the _p_k_g_n_a_m_e package. The _p_k_g_n_a_m_e package - must be installed before this package may be installed, and this - package must be deinstalled before the _p_k_g_n_a_m_e package is dein- - stalled. Multiple @@ppkkggddeepp directives may be used if the package - depends on multiple other packages. - @@bbllddddeepp _p_k_g_n_a_m_e - Declare that this package was built with the exact version of - _p_k_g_n_a_m_e (since the @@ppkkggddeepp directive may contain wildcards or - relational package version information). - @@ppkkggccffll _p_k_g_c_f_l_n_a_m_e - Declare a conflict with the _p_k_g_c_f_l_n_a_m_e package, as the two pack- - ages contain references to the same files, and so cannot co-exist - on the same system. - -EENNVVIIRROONNMMEENNTT - PKG_DBDIR If the --KK flag isn't given, then the value of the PKG_DBDIR - variable overrides the pkg_install.conf(5) variable of the - same name. If all of this fails to locate a value, then it - typically defaults to _/_v_a_r_/_d_b_/_p_k_g. - -SSEEEE AALLSSOO - pkg_add(1), pkg_admin(1), pkg_delete(1), pkg_info(1), sysconf(3), - pkgsrc(7) - -HHIISSTTOORRYY - The ppkkgg__ccrreeaattee command first appeared in FreeBSD. - -AAUUTTHHOORRSS - Jordan Hubbard - most of the work - John Kohl - refined it for NetBSD - Hubert Feyrer - NetBSD wildcard dependency processing, pkgdb, pkg size recording - etc. - -NetBSD 5.0 January 20, 2010 NetBSD 5.0 diff --git a/pkgtools/pkg_install/files/delete/pkg_delete.1 b/pkgtools/pkg_install/files/delete/pkg_delete.1.in index 67e1437f162..a5da620da20 100644 --- a/pkgtools/pkg_install/files/delete/pkg_delete.1 +++ b/pkgtools/pkg_install/files/delete/pkg_delete.1.in @@ -1,4 +1,4 @@ -.\" $NetBSD: pkg_delete.1,v 1.24 2010/01/20 22:34:47 jmmv Exp $ +.\" $NetBSD: pkg_delete.1.in,v 1.1 2010/01/21 21:58:06 jmmv Exp $ .\" .\" FreeBSD install - a package for the installation and maintenance .\" of non-core utilities. @@ -71,7 +71,7 @@ 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]/ ) . +.Pa ( @pkgdbdir@/\*[Lt]pkg-name\*[Gt]/ ) . Pay particular attention to any .Pa +INSTALL @@ -180,11 +180,11 @@ Turn on verbose output. .Nm does pretty much what it says. It examines installed package records in -.Pa /var/db/pkg/\*[Lt]pkg-name\*[Gt] , +.Pa @pkgdbdir@/\*[Lt]pkg-name\*[Gt] , deletes the package contents, and finally removes the package records (if an alternate package database directory is specified, then it overrides the -.Pa /var/db/pkg +.Pa @pkgdbdir@ path shown above). .Pp If a package is required by other installed packages, @@ -285,13 +285,13 @@ variable overrides the .Xr pkg_install.conf 5 variable of the same name. If all of this fails to locate a value, then it typically defaults to -.Pa /var/db/pkg . +.Pa @pkgdbdir@ . .It Ev PKG_REFCOUNT_DBDIR Location of the package reference counts database directory. The default location is the path to the package database directory with .Dq .refcount appended to the path, e.g. -.Pa /var/db/pkg.refcount . +.Pa @pkgdbdir@.refcount . .El .Sh SEE ALSO .Xr pkg_add 1 , diff --git a/pkgtools/pkg_install/files/delete/pkg_delete.cat1 b/pkgtools/pkg_install/files/delete/pkg_delete.cat1 deleted file mode 100644 index db9963ba060..00000000000 --- a/pkgtools/pkg_install/files/delete/pkg_delete.cat1 +++ /dev/null @@ -1,175 +0,0 @@ -PKG_DELETE(1) NetBSD General Commands Manual PKG_DELETE(1) - -NNAAMMEE - ppkkgg__ddeelleettee -- a utility for deleting previously installed software pack- - age distributions - -SSYYNNOOPPSSIISS - ppkkgg__ddeelleettee [--AADDFFffkkNNnnOORRrrVVvv] [--KK _p_k_g___d_b_d_i_r] [--PP _d_e_s_t_d_i_r] [--pp _p_r_e_f_i_x] - _p_k_g_-_n_a_m_e _._._. - -DDEESSCCRRIIPPTTIIOONN - The ppkkgg__ddeelleettee command is used to delete packages that have been previ- - ously installed with the pkg_add(1) command. The given packages are - sorted, so that the dependencies of a package are deleted after the pack- - age. Before any action is executed, ppkkgg__ddeelleettee checks for packages that - are marked as pprreesseerrvveedd or have depending packages left. If the --kk flag - is given, preserved packages are removed from the list of packages to - remove. Unless the --ff flag is given, ppkkgg__ddeelleettee stops on the first - error. - -WWAARRNNIINNGG - _S_i_n_c_e _t_h_e ppkkgg__ddeelleettee _c_o_m_m_a_n_d _m_a_y _e_x_e_c_u_t_e _s_c_r_i_p_t_s _o_r _p_r_o_g_r_a_m_s _p_r_o_v_i_d_e_d _b_y - _a _p_a_c_k_a_g_e _f_i_l_e_, _y_o_u_r _s_y_s_t_e_m _m_a_y _b_e _s_u_s_c_e_p_t_i_b_l_e _t_o _`_`_T_r_o_j_a_n _h_o_r_s_e_s_'_' _o_r - _o_t_h_e_r _s_u_b_t_l_e _a_t_t_a_c_k_s _f_r_o_m _m_i_s_c_r_e_a_n_t_s _w_h_o _c_r_e_a_t_e _d_a_n_g_e_r_o_u_s _p_a_c_k_a_g_e _f_i_l_e_s_. - - _Y_o_u _a_r_e _a_d_v_i_s_e_d _t_o _v_e_r_i_f_y _t_h_e _c_o_m_p_e_t_e_n_c_e _a_n_d _i_d_e_n_t_i_t_y _o_f _t_h_o_s_e _w_h_o _p_r_o_- - _v_i_d_e _i_n_s_t_a_l_l_a_b_l_e _p_a_c_k_a_g_e _f_i_l_e_s_. _F_o_r _e_x_t_r_a _p_r_o_t_e_c_t_i_o_n_, _e_x_a_m_i_n_e _a_l_l _t_h_e - _p_a_c_k_a_g_e _c_o_n_t_r_o_l _f_i_l_e_s _i_n _t_h_e _p_a_c_k_a_g_e _r_e_c_o_r_d _d_i_r_e_c_t_o_r_y - _(_/_v_a_r_/_d_b_/_p_k_g_/_<_p_k_g_-_n_a_m_e_>_/_)_. _P_a_y _p_a_r_t_i_c_u_l_a_r _a_t_t_e_n_t_i_o_n _t_o _a_n_y _+_I_N_S_T_A_L_L _o_r - _+_D_E_I_N_S_T_A_L_L _f_i_l_e_s_, _a_n_d _i_n_s_p_e_c_t _t_h_e _+_C_O_N_T_E_N_T_S _f_i_l_e _f_o_r @@ccwwdd_, @@mmooddee _(_c_h_e_c_k - _f_o_r _s_e_t_u_i_d_)_, @@ddiirrrrmm_, @@eexxeecc_, _a_n_d @@uunneexxeecc _d_i_r_e_c_t_i_v_e_s_, _a_n_d_/_o_r _u_s_e _t_h_e - pkg_info(_1) _c_o_m_m_a_n_d _t_o _e_x_a_m_i_n_e _t_h_e _i_n_s_t_a_l_l_e_d _p_a_c_k_a_g_e _c_o_n_t_r_o_l _f_i_l_e_s_. - -OOPPTTIIOONNSS - The following command line options are supported: - - _p_k_g_-_n_a_m_e _._._. - The named packages are deinstalled, wildcards can be used, see - pkg_info(1). If no version is given, the one currently installed - will be removed. If the --FF flag is given, one or more (absolute) - filenames may be specified and the Package Database will be con- - sulted for the package to which the given file belongs. These - packages are then deinstalled. - - --AA Recursively remove all automatically installed packages that were - needed by the given packages and are no longer required. See - also the --RR flag. - - --DD If a deinstallation script exists for a given package, do not - execute it. - - --FF Any pkg-name given will be interpreted as pathname which is sub- - sequently transformed in a (real) package name via the Package - Database. That way, packages can be deleted by giving a filename - instead of the package-name. - - --ff Force removal of the package, even if a dependency is recorded or - the deinstall script fails. - - --ffff Force removal of the package, even if the package is marked as a - pprreesseerrvveedd package. Note that this is a dangerous operation. See - also the --kk option. - - --KK _p_k_g___d_b_d_i_r - Set _p_k_g___d_b_d_i_r as the package database directory. See the - _E_N_V_I_R_O_N_M_E_N_T section below for details on how the default value is - calculated. - - --kk Silently skip all packages that are marked as pprreesseerrvveedd. - - --NN Remove the package's registration and its entries from the pack- - age database, but leave the files installed. Don't run any dein- - stall scripts or @unexec lines either. - - --nn Don't actually deinstall a package, just report the steps that - would be taken if it were. - - --OO Only delete the package's entries from the package database, do - not touch the package or its files itself. - - --pp _d_e_s_t_d_i_r - Prefix all file and directory names with _d_e_s_t_d_i_r. For packages - without install scripts this has the same behavior as using - chroot. - - --pp _p_r_e_f_i_x - Set _p_r_e_f_i_x as the directory in which to delete files from any - installed packages which do not explicitly set theirs. For most - packages, the prefix will be set automatically to the installed - location by pkg_add(1). - - --RR Recursively remove all packages that were needed by the given - packages and that have no other dependencies left. This option - overrides the --AA flag. - - --rr Recursively remove all packages that require one of the packages - given. - - --VV Print version number and exit. - - --vv Turn on verbose output. - -TTEECCHHNNIICCAALL DDEETTAAIILLSS - ppkkgg__ddeelleettee does pretty much what it says. It examines installed package - records in _/_v_a_r_/_d_b_/_p_k_g_/_<_p_k_g_-_n_a_m_e_>, deletes the package contents, and - finally removes the package records (if an alternate package database - directory is specified, then it overrides the _/_v_a_r_/_d_b_/_p_k_g path shown - above). - - If a package is required by other installed packages, ppkkgg__ddeelleettee will - list those dependent packages and refuse to delete the package (unless - the --ff option is given). - - If a package has been marked as a pprreesseerrvveedd package, it will not be able - to be deleted (unless more than one occurrence of the --ff 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 --FF Flag is given. The - filename needs to be absolute, see the output produced by the pkg_info - --aaFF command. - - If a ddeeiinnssttaallll script exists for the package, it is executed before and - after any files are removed. It is this script's responsibility to clean - up any additional messy details around the package's installation, since - all ppkkgg__ddeelleettee knows how to do is delete the files created in the origi- - nal distribution. The ddeeiinnssttaallll script is called as: - ddeeiinnssttaallll <_p_k_g_-_n_a_m_e> _V_I_E_W_-_D_E_I_N_S_T_A_L_L - before removing the package from a view, and as: - ddeeiinnssttaallll <_p_k_g_-_n_a_m_e> _D_E_I_N_S_T_A_L_L - before deleting all files and as: - ddeeiinnssttaallll <_p_k_g_-_n_a_m_e> _P_O_S_T_-_D_E_I_N_S_T_A_L_L - after deleting them. Passing the keywords _V_I_E_W_-_D_E_I_N_S_T_A_L_L, _D_E_I_N_S_T_A_L_L and - _P_O_S_T_-_D_E_I_N_S_T_A_L_L lets you potentially write only one program/script that - handles all aspects of installation and deletion. - - All scripts are called with the environment variable PKG_PREFIX set to - the installation prefix (see the --pp option above). This allows a package - author to write a script that reliably performs some action on the direc- - tory where the package is installed, even if the user might have changed - it by specifying the --pp option when running ppkkgg__ddeelleettee or pkg_add(1). - The scripts are also called with the PKG_METADATA_DIR environment vari- - able set to the location of the _+_* meta-data files, and with the - PKG_REFCOUNT_DBDIR environment variable set to the location of the pack- - age reference counts database directory. If the --PP flag was given to - ppkkgg__ddeelleettee, PKG_DESTDIR will be set to _d_e_s_t_d_i_r. - -EENNVVIIRROONNMMEENNTT - PKG_DBDIR If the --KK flag isn't given, then the value of the PKG_DBDIR - variable overrides the pkg_install.conf(5) variable of the - same name. If all of this fails to locate a value, then it - typically defaults to _/_v_a_r_/_d_b_/_p_k_g. - - PKG_REFCOUNT_DBDIR - Location of the package reference counts database directory. - The default location is the path to the package database - directory with ``.refcount'' appended to the path, e.g. - _/_v_a_r_/_d_b_/_p_k_g_._r_e_f_c_o_u_n_t. - -SSEEEE AALLSSOO - pkg_add(1), pkg_admin(1), pkg_create(1), pkg_info(1), pkgsrc(7) - -AAUUTTHHOORRSS - Jordan Hubbard - most of the work - John Kohl - refined it for NetBSD - Hubert Feyrer - NetBSD wildcard dependency processing, pkgdb, recursive "down" - delete, etc. - Joerg Sonnenberger - Rewrote most of the code to compute correct order of deinstalla- - tion and to improve error handling. - -NetBSD 5.0 January 20, 2010 NetBSD 5.0 diff --git a/pkgtools/pkg_install/files/info/pkg_info.1 b/pkgtools/pkg_install/files/info/pkg_info.1.in index 3d816721ddb..8b023100274 100644 --- a/pkgtools/pkg_install/files/info/pkg_info.1 +++ b/pkgtools/pkg_install/files/info/pkg_info.1.in @@ -1,4 +1,4 @@ -.\" $NetBSD: pkg_info.1,v 1.25 2010/01/20 22:34:47 jmmv Exp $ +.\" $NetBSD: pkg_info.1.in,v 1.1 2010/01/21 21:58:06 jmmv Exp $ .\" .\" FreeBSD install - a package for the installation and maintenance .\" of non-core utilities. @@ -205,7 +205,7 @@ Its primary use is to contain all information about the contents of a Package info is either extracted from package files named on the command line, or from already installed package information in -.Pa /var/db/pkg/\*[Lt]pkg-name\*[Gt] . +.Pa @pkgdbdir@/\*[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. @@ -303,7 +303,7 @@ variable overrides the .Xr pkg_install.conf 5 variable of the same name. If all of this fails to locate a value, then it typically defaults to -.Pa /var/db/pkg . +.Pa @pkgdbdir@ . .El .Sh SEE ALSO .Xr pkg_add 1 , diff --git a/pkgtools/pkg_install/files/info/pkg_info.cat1 b/pkgtools/pkg_install/files/info/pkg_info.cat1 deleted file mode 100644 index a211f0ecdad..00000000000 --- a/pkgtools/pkg_install/files/info/pkg_info.cat1 +++ /dev/null @@ -1,190 +0,0 @@ -PKG_INFO(1) NetBSD General Commands Manual PKG_INFO(1) - -NNAAMMEE - ppkkgg__iinnffoo -- a utility for displaying information on software packages - -SSYYNNOOPPSSIISS - ppkkgg__iinnffoo [--BBbbccDDddFFffhhIIiikkLLmmNNnnppqqrrRRSSssVVvvXX] [--ee _p_a_c_k_a_g_e] [--EE _p_a_c_k_a_g_e] - [--KK _p_k_g___d_b_d_i_r] [--ll _p_r_e_f_i_x] _p_k_g_-_n_a_m_e _._._. - ppkkgg__iinnffoo [--aa | --uu] [flags] - ppkkgg__iinnffoo [--QQ _v_a_r_i_a_b_l_e] _p_k_g_-_n_a_m_e _._._. - -DDEESSCCRRIIPPTTIIOONN - The ppkkgg__iinnffoo command is used to dump out information for packages, which - may be either packed up in files or already installed on the system with - the pkg_create(1) command. - - The _p_k_g_-_n_a_m_e may be the name of an installed package (with our without - version), a pattern matching several installed packages (see the _P_A_C_K_A_G_E - _W_I_L_D_C_A_R_D_S section for a description of possible patterns), the pathname - to a binary package, a filename belonging to an installed package (if --FF - is also given), or a URL to an ftp-available package. - - The following command-line options are supported: - - --aa Show information for all currently installed packages. See also - --uu. - - --BB Show some of the important definitions used when building the - binary package (the ``Build information'') for each package. - Additionally, any installation information variables (lowercase) - can be queried, too. In particular, _a_u_t_o_m_a_t_i_c tells if a package - was installed automatically as a dependency of another package. - - --bb Show the NetBSD RCS Id strings from the files used in the con- - struction 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. - - --cc Show the one-line comment field for each package. - - --DD Show the install-message file (if any) for each package. - - --dd Show the long-description field for each package. - - --EE _p_k_g_-_n_a_m_e - This option allows you to test for the existence of a given pack- - age. If a package identified by _p_k_g_-_n_a_m_e is currently installed, - return code is 0, otherwise 1. The name of the best matching - package found installed is printed to stdout unless turned off - using the --qq option. _p_k_g_-_n_a_m_e can contain wildcards (see the - _P_A_C_K_A_G_E _W_I_L_D_C_A_R_D_S section below). - - --ee _p_k_g_-_n_a_m_e - This option allows you to test for the existence of a given pack- - age. If a package identified by _p_k_g_-_n_a_m_e is currently installed, - return code is 0, otherwise 1. The names of any package(s) found - installed are printed to stdout unless turned off using the --qq - option. _p_k_g_-_n_a_m_e can contain wildcards (see the _P_A_C_K_A_G_E - _W_I_L_D_C_A_R_D_S section below). - - --FF 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 --ee flag to find out which package a file belongs to. - - --ff Show the packing list instructions for each package. - - --II Show the index entry for each package. - - --ii Show the install script (if any) for each package. - - --KK _p_k_g___d_b_d_i_r - Set _p_k_g___d_b_d_i_r as the package database directory. See the - _E_N_V_I_R_O_N_M_E_N_T section below for details on how the default value is - calculated. - - --kk Show the de-install script (if any) for each package. - - --LL Show the files within each package. This is different from just - viewing the packing list, since full pathnames for everything are - generated. Files that were created dynamically during installa- - tion of the package are not listed. - - --ll _s_t_r Prefix each information category header (see --qq) shown with _s_t_r. - This is primarily of use to front-end programs that want to - request a lot of different information fields at once for a pack- - age, 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. - - --mm Show the mtree file (if any) for each package. - - --NN Show which packages each package was built with (exact dependen- - cies), if any. - - --nn Show which packages each package needs (depends upon), if any. - - --pp Show the installation prefix for each package. - - --QQ Show the definition of _v_a_r_i_a_b_l_e from the build information for - each package. An empty string is returned if no such variable - definition is found for the package(s). - - --qq Be ``quiet'' in emitting report headers and such, just dump the - raw info (basically, assume a non-human reading). - - --RR For each package, show the packages that require it. - - --rr For each package, show the packages that require it. Continue - recursively to show all dependents. - - --SS Show the size of this package and all the packages it requires, - in bytes. - - --ss Show the size of this package in bytes. The size is calculated - by adding up the size of each file of the package. - - --uu Show information for all user-installed packages. Automatically - installed packages (as dependencies of other packages) are not - displayed. See also --aa. - - --VV Print version number and exit. - - --vv Turn on verbose output. - - --XX Print summary information for each package. The summary format - is described in pkg_summary(5). Its primary use is to contain - all information about the contents of a (remote) binary package - repository needed by package managing software. - -TTEECCHHNNIICCAALL DDEETTAAIILLSS - Package info is either extracted from package files named on the command - line, or from already installed package information in - _/_v_a_r_/_d_b_/_p_k_g_/_<_p_k_g_-_n_a_m_e_>. - - 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 transla- - tion to take place, the --FF flag must be given. The filename must be - absolute, compare the output of pkg_info --aaFF. - -PPAACCKKAAGGEE WWIILLDDCCAARRDDSS - In the places where a package name/version is expected, e.g. for the --ee - switch, several forms can be used. Either use a package name with or - without version, or specify a package wildcard that gets matched against - all installed packages. - - Package wildcards use fnmatch(3). In addition, csh(1) style {,} alter- - nates have been implemented. Package version numbers can also be matched - in a relational manner using the _>_=, _<_=, _>, and _< operators. For exam- - ple, _p_k_g___i_n_f_o _-_e _'_n_a_m_e_>_=_1_._3_' will match versions 1.3 and later of the - _n_a_m_e package. Additionally, ranges can be defined by giving a lower - bound with > or >= and an upper bound with < or <=. The lower bound has - to come first. For example, _p_k_g___i_n_f_o _-_e _'_n_a_m_e_>_=_1_._3_<_2_._0_' will match ver- - sions 1.3 (inclusive) to 2.0 (exclusive) of package _n_a_m_e. - - The collating sequence of the various package version numbers is unusual, - but strives to be consistent. The magic string ``alpha'' equates to - _a_l_p_h_a _v_e_r_s_i_o_n and sorts before a beta version. The magic string ``beta'' - equates to _b_e_t_a _v_e_r_s_i_o_n and sorts before a release candidate. The magic - string ``rc'' equates to _r_e_l_e_a_s_e _c_a_n_d_i_d_a_t_e and sorts before a release. - The magic string ``pre'', short for ``pre-release'', is a synonym for - ``rc''. For example, _n_a_m_e_-_1_._3_r_c_3 will sort before _n_a_m_e_-_1_._3 and after - _n_a_m_e_-_1_._2_._9. Similarly _n_a_m_e_-_1_._3_a_l_p_h_a_2 will sort before _n_a_m_e_-_1_._3_b_e_t_a_1 and - they both sort before _n_a_m_e_-_1_._3_r_c_1. In addition, alphabetic characters - sort in the same place as their numeric counterparts, so that _n_a_m_e_-_1_._2_e - has the same sorting value as _n_a_m_e_-_1_._2_._5 The magic string ``pl'' equates - to a _p_a_t_c_h _l_e_v_e_l and has the same value as a dot in the dewey-decimal - ordering schemes. - -EENNVVIIRROONNMMEENNTT - PKG_DBDIR If the --KK flag isn't given, then the value of the PKG_DBDIR - variable overrides the pkg_install.conf(5) variable of the - same name. If all of this fails to locate a value, then it - typically defaults to _/_v_a_r_/_d_b_/_p_k_g. - -SSEEEE AALLSSOO - pkg_add(1), pkg_admin(1), pkg_create(1), pkg_delete(1), mktemp(3), - pkgsrc(7), mtree(8) - -AAUUTTHHOORRSS - Jordan Hubbard - most of the work - John Kohl - refined it for NetBSD - Hubert Feyrer - NetBSD wildcard dependency processing, pkgdb, depends displaying, - pkg size display etc. - -NetBSD 5.0 January 20, 2010 NetBSD 5.0 diff --git a/pkgtools/pkg_install/files/lib/version.h b/pkgtools/pkg_install/files/lib/version.h index d834757c001..9776be591bc 100644 --- a/pkgtools/pkg_install/files/lib/version.h +++ b/pkgtools/pkg_install/files/lib/version.h @@ -1,4 +1,4 @@ -/* $NetBSD: version.h,v 1.144 2010/01/20 22:34:47 jmmv Exp $ */ +/* $NetBSD: version.h,v 1.145 2010/01/21 21:58:06 jmmv Exp $ */ /* * Copyright (c) 2001 Thomas Klausner. All rights reserved. @@ -27,6 +27,6 @@ #ifndef _INST_LIB_VERSION_H_ #define _INST_LIB_VERSION_H_ -#define PKGTOOLS_VERSION "20100120" +#define PKGTOOLS_VERSION "20100121" #endif /* _INST_LIB_VERSION_H_ */ diff --git a/pkgtools/pkg_install/files/view/pkg_view.1 b/pkgtools/pkg_install/files/view/pkg_view.1.in index 3c43e99343a..c8bf701f963 100644 --- a/pkgtools/pkg_install/files/view/pkg_view.1 +++ b/pkgtools/pkg_install/files/view/pkg_view.1.in @@ -1,4 +1,4 @@ -.\" $NetBSD: pkg_view.1,v 1.11 2007/07/26 11:30:56 joerg Exp $ +.\" $NetBSD: pkg_view.1.in,v 1.1 2010/01/21 21:58:07 jmmv Exp $ .\" .\" Copyright (c) 2003 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -31,7 +31,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd September 8, 2003 +.Dd January 20, 2010 .Dt PKG_VIEW 1 .Os .Sh NAME @@ -122,7 +122,7 @@ If this option isn't specified, then the package database directory is taken from the value of the environment variable .Ev PKG_DBDIR , otherwise it defaults to -.Pa /var/db/pkg . +.Pa @pkgdbdir@ . .It Fl n Don't actually execute the commands for manipulating the package instances. .It Fl V @@ -196,7 +196,7 @@ flag isn't given, then the value of the environment variable .Ev PKG_DBDIR is the package database directory for the default view, otherwise it defaults to -.Pa /var/db/pkg . +.Pa @pkgdbdir@ . .It Ev PLIST_IGNORE_FILES This can be used to specify files in .Ar package diff --git a/pkgtools/pkg_install/files/view/pkg_view.cat1 b/pkgtools/pkg_install/files/view/pkg_view.cat1 deleted file mode 100644 index 2b6a0771ca8..00000000000 --- a/pkgtools/pkg_install/files/view/pkg_view.cat1 +++ /dev/null @@ -1,144 +0,0 @@ -PKG_VIEW(1) NetBSD General Commands Manual PKG_VIEW(1) - -NNAAMMEE - ppkkgg__vviieeww -- add and delete instances of depoted packages in views - -SSYYNNOOPPSSIISS - ppkkgg__vviieeww [--nnVVvv] [--dd _s_t_o_w_d_i_r] [--ii _i_g_n_o_r_e] [--kk _p_k_g___d_b_d_i_r] [--WW _v_i_e_w_b_a_s_e] - [--ww _v_i_e_w] _c_o_m_m_a_n_d _p_a_c_k_a_g_e _._._. - -DDEESSCCRRIIPPTTIIOONN - The ppkkgg__vviieeww command is used to add and delete instances of depoted pack- - ages in _s_t_o_w_d_i_r in a _v_i_e_w in the _v_i_e_w_b_a_s_e directory. - -WWAARRNNIINNGG - _S_i_n_c_e _t_h_e ppkkgg__vviieeww _c_o_m_m_a_n_d _m_a_y _e_x_e_c_u_t_e _s_c_r_i_p_t_s _o_r _p_r_o_g_r_a_m_s _p_r_o_v_i_d_e_d _b_y _a - _p_a_c_k_a_g_e _f_i_l_e_, _y_o_u_r _s_y_s_t_e_m _m_a_y _b_e _s_u_s_c_e_p_t_i_b_l_e _t_o _`_`_T_r_o_j_a_n _h_o_r_s_e_s_'_' _o_r - _o_t_h_e_r _s_u_b_t_l_e _a_t_t_a_c_k_s _f_r_o_m _m_i_s_c_r_e_a_n_t_s _w_h_o _c_r_e_a_t_e _d_a_n_g_e_r_o_u_s _p_a_c_k_a_g_e _f_i_l_e_s_. - - _Y_o_u _a_r_e _a_d_v_i_s_e_d _t_o _v_e_r_i_f_y _t_h_e _c_o_m_p_e_t_e_n_c_e _a_n_d _i_d_e_n_t_i_t_y _o_f _t_h_o_s_e _w_h_o _p_r_o_- - _v_i_d_e _i_n_s_t_a_l_l_a_b_l_e _p_a_c_k_a_g_e _f_i_l_e_s_. _F_o_r _e_x_t_r_a _p_r_o_t_e_c_t_i_o_n_, _e_x_a_m_i_n_e _a_l_l _t_h_e - _p_a_c_k_a_g_e _c_o_n_t_r_o_l _f_i_l_e_s _i_n _t_h_e _p_a_c_k_a_g_e _d_a_t_a_b_a_s_e _d_i_r_e_c_t_o_r_y - _(_/_u_s_r_/_p_k_g_/_p_a_c_k_a_g_e_s_/_<_p_k_g_-_n_a_m_e_>_/_)_. _P_a_y _p_a_r_t_i_c_u_l_a_r _a_t_t_e_n_t_i_o_n _t_o _a_n_y - _+_I_N_S_T_A_L_L _o_r _+_D_E_I_N_S_T_A_L_L _f_i_l_e_s_, _a_n_d _i_n_s_p_e_c_t _t_h_e _+_C_O_N_T_E_N_T_S _f_i_l_e _f_o_r @@ccwwdd_, - @@mmooddee _(_c_h_e_c_k _f_o_r _s_e_t_u_i_d_)_, @@ddiirrrrmm_, @@eexxeecc_, _a_n_d @@uunneexxeecc _d_i_r_e_c_t_i_v_e_s_, _a_n_d_/_o_r - _u_s_e _t_h_e pkg_info(_1) _c_o_m_m_a_n_d _t_o _e_x_a_m_i_n_e _t_h_e _i_n_s_t_a_l_l_e_d _p_a_c_k_a_g_e _c_o_n_t_r_o_l - _f_i_l_e_s_. - -OOPPTTIIOONNSS - The following command-line options are supported: - - --dd _s_t_o_w_d_i_r - Set _s_t_o_w_d_i_r as the directory in which the depoted packages can be - found. If this option isn't specified, then the _s_t_o_w_d_i_r is taken - from the value of the environment variable DEPOTBASE if it's set, - otherwise the default _s_t_o_w_d_i_r is the path to the _p_a_c_k_a_g_e_s direc- - tory under _v_i_e_w_b_a_s_e. - - --ii _i_g_n_o_r_e - Add _i_g_n_o_r_e to the list of files in _p_a_c_k_a_g_e that should ignored - when adding or removing the package instance from _v_i_e_w. - - --kk _p_k_g___d_b_d_i_r - Set _p_k_g___d_b_d_i_r as the package database directory for the default - (empty) view. If this option isn't specified, then the package - database directory is taken from the value of the environment - variable PKG_DBDIR, otherwise it defaults to _/_v_a_r_/_d_b_/_p_k_g. - - --nn Don't actually execute the commands for manipulating the package - instances. - - --VV Print the version number and exit. - - --vv Turn on verbose output. Specifying --vv multiple times increases - the level of verbosity. - - --WW _v_i_e_w_b_a_s_e - Set _v_i_e_w_b_a_s_e as the directory in which all the views are managed. - The default _v_i_e_w_b_a_s_e directory is _/_u_s_r_/_p_k_g but may be overridden - by the LOCALBASE environment variable. - - --ww _v_i_e_w - Set _v_i_e_w as the directory in _v_i_e_w_b_a_s_e in which the package - instances should be added or deleted. The default _v_i_e_w is the - empty view but may be overridden by the PKG_VIEW environment - variable. - - The following commands are supported: - - aadddd Add the listed package instances into _v_i_e_w. - - cchheecckk Check whether the listed package instances are present in _v_i_e_w. - If they are not present, then return 0, otherwise return 1. - - ddeelleettee Delete the listed package instances from _v_i_e_w. - -EENNVVIIRROONNMMEENNTT - DEPOTBASE - This is the location of the _s_t_o_w_d_i_r directory inside which all - depoted packages are kept. The default _s_t_o_w_d_i_r is the _p_a_c_k_a_g_e_s - directory under _v_i_e_w_b_a_s_e. - - LOCALBASE - This is the location of the _v_i_e_w_b_a_s_e directory in which all the - views are managed. The default _v_i_e_w_b_a_s_e directory is _/_u_s_r_/_p_k_g. - - PKG_DBDIR - If the --kk flag isn't given, then the value of the environment - variable PKG_DBDIR is the package database directory for the - default view, otherwise it defaults to _/_v_a_r_/_d_b_/_p_k_g. - - PLIST_IGNORE_FILES - This can be used to specify files in _p_a_c_k_a_g_e that should ignored - when adding or removing the package instance from _v_i_e_w. - PLIST_IGNORE_FILES is a space-separated list of shell glob pat- - terns that match files relative to the _p_a_c_k_a_g_e depot directory, - and it defaults to "info/dir *[~#] *.OLD *.orig *,v". This is - overridden by any _PLIST_IGNORE_FILES setting in a package's - _b_u_i_l_d_-_i_n_f_o_-_f_i_l_e (see pkg_create(1)) if it exists. - - PKG_VIEW - The default view can be specified in the PKG_VIEW environment - variable. - -FFIILLEESS - <pkg-dbdir>/<package>/+INSTALL - If the package contains an _i_n_s_t_a_l_l script (see pkg_create(1)), - then after the package instance is added into a view, the script - is executed with the following arguments: - - _p_a_c_k_a_g_e The name of the package instance being added. - - VVIIEEWW--IINNSSTTAALLLL - Keyword denoting that the script is to perform any - actions needed after the package instance is added to a - view. - - If the _i_n_s_t_a_l_l script exits with a non-zero status code, the - installation is terminated. - - <pkg-dbdir>/<package>/+DEINSTALL - If the package contains an _d_e_i_n_s_t_a_l_l script (see pkg_create(1)), - then before the package instance is deleted from a view, the - script is executed with the following arguments: - - _p_a_c_k_a_g_e The name of the package instance being deleted. - - VVIIEEWW--DDEEIINNSSTTAALLLL - Keyword denoting that the script is to perform any - actions needed before the package instance is deleted - from a view. - - If the _d_e_i_n_s_t_a_l_l script exits with a non-zero status code, the - de-installation is terminated. - - The _i_n_s_t_a_l_l and _d_e_i_n_s_t_a_l_l scripts are called with the environment vari- - able PKG_PREFIX set to the path to the _v_i_e_w directory. - -SSEEEE AALLSSOO - linkfarm(1), pkg_delete(1) - -AAUUTTHHOORRSS - The ppkkgg__vviieeww utility was written by Alistair G. Crooks <agc@NetBSD.org>. - -NetBSD 4.0 September 8, 2003 NetBSD 4.0 |