Sun Jul 27 22:35:02 2008 UTC ()
Remove BUGS entry about hardlinks, it doesn't apply.


(joerg)
diff -r1.28.6.5 -r1.28.6.6 pkgsrc/pkgtools/pkg_install/files/add/pkg_add.1

cvs diff -r1.28.6.5 -r1.28.6.6 pkgsrc/pkgtools/pkg_install/files/add/pkg_add.1 (switch to unified diff)

--- pkgsrc/pkgtools/pkg_install/files/add/pkg_add.1 2008/05/30 13:37:36 1.28.6.5
+++ pkgsrc/pkgtools/pkg_install/files/add/pkg_add.1 2008/07/27 22:35:02 1.28.6.6
@@ -1,529 +1,516 @@ @@ -1,529 +1,516 @@
1.\" $NetBSD: pkg_add.1,v 1.28.6.5 2008/05/30 13:37:36 wiz Exp $ 1.\" $NetBSD: pkg_add.1,v 1.28.6.6 2008/07/27 22:35:02 joerg Exp $
2.\" 2.\"
3.\" FreeBSD install - a package for the installation and maintenance 3.\" FreeBSD install - a package for the installation and maintenance
4.\" of non-core utilities. 4.\" of non-core utilities.
5.\" 5.\"
6.\" Redistribution and use in source and binary forms, with or without 6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions 7.\" modification, are permitted provided that the following conditions
8.\" are met: 8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright 9.\" 1. Redistributions of source code must retain the above copyright
10.\" notice, this list of conditions and the following disclaimer. 10.\" notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\" notice, this list of conditions and the following disclaimer in the 12.\" notice, this list of conditions and the following disclaimer in the
13.\" documentation and/or other materials provided with the distribution. 13.\" documentation and/or other materials provided with the distribution.
14.\" 14.\"
15.\" Jordan K. Hubbard 15.\" Jordan K. Hubbard
16.\" 16.\"
17.\" 17.\"
18.\" @(#)pkg_add.1 18.\" @(#)pkg_add.1
19.\" 19.\"
20.Dd May 26, 2008 20.Dd May 26, 2008
21.Dt PKG_ADD 1 21.Dt PKG_ADD 1
22.Os 22.Os
23.Sh NAME 23.Sh NAME
24.Nm pkg_add 24.Nm pkg_add
25.Nd a utility for installing and upgrading software package distributions 25.Nd a utility for installing and upgrading software package distributions
26.Sh SYNOPSIS 26.Sh SYNOPSIS
27.Nm 27.Nm
28.Op Fl AfILnRuVv 28.Op Fl AfILnRuVv
29.Op Fl K Ar pkg_dbdir 29.Op Fl K Ar pkg_dbdir
30.Op Fl m Ar machine 30.Op Fl m Ar machine
31.Op Fl p Ar prefix 31.Op Fl p Ar prefix
32.Op Fl W Ar viewbase 32.Op Fl W Ar viewbase
33.Op Fl w Ar view 33.Op Fl w Ar view
34.Ar \fR[[ftp|http]://[\fIuser\fR[:\fIpassword]\fR@]\fIhost\fR[:\fIport\fR]][/\fIpath/\fR]pkg-name ... 34.Ar \fR[[ftp|http]://[\fIuser\fR[:\fIpassword]\fR@]\fIhost\fR[:\fIport\fR]][/\fIpath/\fR]pkg-name ...
35.Sh DESCRIPTION 35.Sh DESCRIPTION
36The 36The
37.Nm 37.Nm
38command is used to extract and upgrade packages that have been 38command is used to extract and upgrade packages that have been
39previously created with the 39previously created with the
40.Xr pkg_create 1 40.Xr pkg_create 1
41command. 41command.
42Packages are prepared collections of pre-built binaries, documentation, 42Packages are prepared collections of pre-built binaries, documentation,
43configurations, installation instructions and/or other files. 43configurations, installation instructions and/or other files.
44.Nm 44.Nm
45can recursively install other packages that the current package 45can recursively install other packages that the current package
46depends on or requires from both local disk and via FTP or HTTP. 46depends on or requires from both local disk and via FTP or HTTP.
47.Sh WARNING 47.Sh WARNING
48.Bf -emphasis 48.Bf -emphasis
49Since the 49Since the
50.Nm 50.Nm
51command may execute scripts or programs contained within a package file, 51command may execute scripts or programs contained within a package file,
52your system may be susceptible to 52your system may be susceptible to
53.Dq Trojan horses 53.Dq Trojan horses
54or other subtle 54or other subtle
55attacks from miscreants who create dangerous package files. 55attacks from miscreants who create dangerous package files.
56.Pp 56.Pp
57You are advised to verify the competence and identity of those who 57You are advised to verify the competence and identity of those who
58provide installable package files. 58provide installable package files.
59For extra protection, use the digital signatures provided where possible 59For extra protection, use the digital signatures provided where possible
60(see the 60(see the
61.Xr pkg_install.conf 5 ) , 61.Xr pkg_install.conf 5 ) ,
62or, failing that, use 62or, failing that, use
63.Xr tar 1 63.Xr tar 1
64to extract the package file, and inspect its contents and scripts 64to extract the package file, and inspect its contents and scripts
65to ensure it poses no danger to your system's integrity. 65to ensure it poses no danger to your system's integrity.
66Pay particular attention to any 66Pay particular attention to any
67.Pa +INSTALL 67.Pa +INSTALL
68or 68or
69.Pa +DEINSTALL 69.Pa +DEINSTALL
70files, and inspect the 70files, and inspect the
71.Pa +CONTENTS 71.Pa +CONTENTS
72file for 72file for
73.Cm @cwd , 73.Cm @cwd ,
74.Cm @mode 74.Cm @mode
75(check for setuid), 75(check for setuid),
76.Cm @dirrm , 76.Cm @dirrm ,
77.Cm @exec , 77.Cm @exec ,
78and 78and
79.Cm @unexec 79.Cm @unexec
80directives, and/or use the 80directives, and/or use the
81.Xr pkg_info 1 81.Xr pkg_info 1
82command to examine the package file. 82command to examine the package file.
83.Ef 83.Ef
84.Sh OPTIONS 84.Sh OPTIONS
85The following command line arguments are supported: 85The following command line arguments are supported:
86.Bl -tag -width indent 86.Bl -tag -width indent
87.It Ar pkg-name [ ... ] 87.It Ar pkg-name [ ... ]
88The named packages are installed. 88The named packages are installed.
89.Ar pkg-name 89.Ar pkg-name
90may be either a URL or a local pathname, 90may be either a URL or a local pathname,
91a package name of "-" will cause 91a package name of "-" will cause
92.Nm 92.Nm
93to read from stdin. 93to read from stdin.
94If the packages are not found in the current 94If the packages are not found in the current
95working directory, 95working directory,
96.Nm 96.Nm
97will search them in each directory named by the 97will search them in each directory named by the
98.Ev PKG_PATH 98.Ev PKG_PATH
99environment variable. 99environment variable.
100Any dependencies required by the installed package will be searched 100Any dependencies required by the installed package will be searched
101in the same location that the original package was installed from. 101in the same location that the original package was installed from.
102.It Fl A 102.It Fl A
103Mark package as installed automatically, as dependency of another 103Mark package as installed automatically, as dependency of another
104package. 104package.
105You can use 105You can use
106.Dl Ic pkg_admin set automatic=YES 106.Dl Ic pkg_admin set automatic=YES
107to mark packages this way after installation, and 107to mark packages this way after installation, and
108.Dl Ic pkg_admin unset automatic 108.Dl Ic pkg_admin unset automatic
109to remove the mark. 109to remove the mark.
110If you 110If you
111.Nm 111.Nm
112a package without specifying 112a package without specifying
113.Fl A 113.Fl A
114after it had already been automatically installed, the mark is 114after it had already been automatically installed, the mark is
115removed. 115removed.
116.It Fl f 116.It Fl f
117Force installation to proceed even if prerequisite packages are not 117Force installation to proceed even if prerequisite packages are not
118installed or the install script fails. 118installed or the install script fails.
119Although 119Although
120.Nm 120.Nm
121will still try to find and auto-install missing prerequisite packages, 121will still try to find and auto-install missing prerequisite packages,
122a failure to find one will not be fatal. 122a failure to find one will not be fatal.
123This flag also overrides the fatal error when the operating system or 123This flag also overrides the fatal error when the operating system or
124architecture the package was built on differ from that of the host. 124architecture the package was built on differ from that of the host.
125.It Fl I 125.It Fl I
126If an installation script exists for a given package, do not execute it. 126If an installation script exists for a given package, do not execute it.
127.It Fl K Ar pkg_dbdir 127.It Fl K Ar pkg_dbdir
128Set 128Set
129.Ar pkg_dbdir 129.Ar pkg_dbdir
130as the package database directory. 130as the package database directory.
131If this option isn't specified, then the package database directory is 131If this option isn't specified, then the package database directory is
132taken from the value of the environment variable 132taken from the value of the environment variable
133.Ev PKG_DBDIR 133.Ev PKG_DBDIR
134if it's set, otherwise it defaults to 134if it's set, otherwise it defaults to
135.Pa /var/db/pkg . 135.Pa /var/db/pkg .
136.It Fl L 136.It Fl L
137Don't add the package to any views after installation. 137Don't add the package to any views after installation.
138.It Fl m 138.It Fl m
139Override the machine architecture returned by uname with 139Override the machine architecture returned by uname with
140.Ar machine . 140.Ar machine .
141.It Fl n 141.It Fl n
142Don't actually install a package, just report the steps that 142Don't actually install a package, just report the steps that
143would be taken if it was. 143would be taken if it was.
144.It Fl p Ar prefix 144.It Fl p Ar prefix
145Set 145Set
146.Ar prefix 146.Ar prefix
147as the directory in which to extract files from a package. 147as the directory in which to extract files from a package.
148If a package has set its default directory, it will be overridden 148If a package has set its default directory, it will be overridden
149by this flag. 149by this flag.
150Note that only the first 150Note that only the first
151.Cm @cwd 151.Cm @cwd
152directive will be replaced, since 152directive will be replaced, since
153.Nm 153.Nm
154has no way of knowing which directory settings are relative and 154has no way of knowing which directory settings are relative and
155which are absolute. 155which are absolute.
156Only one directory transition is supported and the second one is expected to go 156Only one directory transition is supported and the second one is expected to go
157into 157into
158.Ar pkgdb . 158.Ar pkgdb .
159.It Fl R 159.It Fl R
160Do not record the installation of a package. 160Do not record the installation of a package.
161This implies 161This implies
162.Fl I . 162.Fl I .
163This means that you cannot deinstall it later, so only use this option if 163This means that you cannot deinstall it later, so only use this option if
164you know what you are doing! 164you know what you are doing!
165.It Fl u 165.It Fl u
166If the package that's being installed is already installed, either 166If the package that's being installed is already installed, either
167in the same or a different version, an update is performed. 167in the same or a different version, an update is performed.
168If this is specified twice, then any dependant packages that are 168If this is specified twice, then any dependant packages that are
169too old will also be updated to fulfill the dependency. 169too old will also be updated to fulfill the dependency.
170See below for a more detailed description of the process. 170See below for a more detailed description of the process.
171.It Fl V 171.It Fl V
172Print version number and exit. 172Print version number and exit.
173.It Fl v 173.It Fl v
174Turn on verbose output. 174Turn on verbose output.
175.It Fl W Ar viewbase 175.It Fl W Ar viewbase
176Set 176Set
177.Ar viewbase 177.Ar viewbase
178as the base directory for the managed views. 178as the base directory for the managed views.
179The default 179The default
180.Ar viewbase 180.Ar viewbase
181directory is set by 181directory is set by
182.Xr pkg_view 1 . 182.Xr pkg_view 1 .
183This value also may be set from the 183This value also may be set from the
184.Ev LOCALBASE 184.Ev LOCALBASE
185environment variable. 185environment variable.
186.It Fl w Ar view 186.It Fl w Ar view
187Set the 187Set the
188.Ar view 188.Ar view
189to which packages should be added after installation. 189to which packages should be added after installation.
190The default 190The default
191.Ar view 191.Ar view
192is set by 192is set by
193.Xr pkg_view 1 . 193.Xr pkg_view 1 .
194This value also may be set from the 194This value also may be set from the
195.Ev PKG_VIEW 195.Ev PKG_VIEW
196environment variable. 196environment variable.
197.El 197.El
198.Pp 198.Pp
199One or more 199One or more
200.Ar pkg-name 200.Ar pkg-name
201arguments may be specified, each being either a file containing the 201arguments may be specified, each being either a file containing the
202package (these usually ending with the 202package (these usually ending with the
203.Dq .tgz 203.Dq .tgz
204suffix) or a 204suffix) or a
205URL pointing at a file available on an ftp or web site. 205URL pointing at a file available on an ftp or web site.
206Thus you may extract files directly from their anonymous ftp or WWW 206Thus you may extract files directly from their anonymous ftp or WWW
207locations (e.g., 207locations (e.g.,
208.Nm 208.Nm
209ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/i386/3.1_2007Q2/shells/bash-3.2.9.tgz 209ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/i386/3.1_2007Q2/shells/bash-3.2.9.tgz
210or 210or
211.Nm 211.Nm
212http://www.example.org/packages/screen-4.0.tbz). 212http://www.example.org/packages/screen-4.0.tbz).
213Note: For ftp transfers, if you wish to use 213Note: For ftp transfers, if you wish to use
214.Bf -emphasis 214.Bf -emphasis
215passive mode 215passive mode
216.Ef 216.Ef
217ftp in such transfers, set the variable 217ftp in such transfers, set the variable
218.Bf -emphasis 218.Bf -emphasis
219FTP_PASSIVE_MODE 219FTP_PASSIVE_MODE
220.Ef 220.Ef
221to some value in your environment. 221to some value in your environment.
222Otherwise, the more standard ACTIVE mode may be used. 222Otherwise, the more standard ACTIVE mode may be used.
223If 223If
224.Nm 224.Nm
225consistently fails to fetch a package from a site known to work, 225consistently fails to fetch a package from a site known to work,
226it may be because you have a firewall that demands the usage of 226it may be because you have a firewall that demands the usage of
227.Bf -emphasis 227.Bf -emphasis
228passive mode 228passive mode
229.Ef 229.Ef
230ftp. 230ftp.
231.Sh TECHNICAL DETAILS 231.Sh TECHNICAL DETAILS
232.Nm 232.Nm
233extracts each package's meta data (including the 233extracts each package's meta data (including the
234.Dq packing list ) 234.Dq packing list )
235to memory and then runs through the following sequence to fully extract 235to memory and then runs through the following sequence to fully extract
236the contents of the package: 236the contents of the package:
237.Bl -enum -offset indent 237.Bl -enum -offset indent
238.It 238.It
239A check is made to determine if the package or another version of it 239A check is made to determine if the package or another version of it
240is already recorded as installed. 240is already recorded as installed.
241If it is, 241If it is,
242installation is terminated if the 242installation is terminated if the
243.Fl u 243.Fl u
244option is not given. 244option is not given.
245.Pp 245.Pp
246If the 246If the
247.Fl u 247.Fl u
248option is given, it's assumed the package should be replaced by the 248option is given, it's assumed the package should be replaced by the
249new version instead. 249new version instead.
250Before doing so, all packages that depend on the 250Before doing so, all packages that depend on the
251pkg being upgraded are checked if they also work with the new version. 251pkg being upgraded are checked if they also work with the new version.
252If that test is successful, replacing is prepared by moving an existing 252If that test is successful, replacing is prepared by moving an existing
253.Pa +REQUIRED_BY 253.Pa +REQUIRED_BY
254file aside (if it exists), and running 254file aside (if it exists), and running
255.Xr pkg_delete 1 255.Xr pkg_delete 1
256on the installed package. 256on the installed package.
257Installation then proceeds as if the package 257Installation then proceeds as if the package
258was not installed, and restores the 258was not installed, and restores the
259.Pa +REQUIRED_BY 259.Pa +REQUIRED_BY
260file afterwards. 260file afterwards.
261.It 261.It
262The package build information is extracted from the 262The package build information is extracted from the
263.Pa +BUILD_INFO 263.Pa +BUILD_INFO
264file and compared against the result of 264file and compared against the result of
265.Xr uname 3 . 265.Xr uname 3 .
266If the operating system or architecture of the package differ from 266If the operating system or architecture of the package differ from
267that of the host, installation is aborted. 267that of the host, installation is aborted.
268This behavior is overridable with the 268This behavior is overridable with the
269.Fl f 269.Fl f
270flag. 270flag.
271.It 271.It
272The package build information from 272The package build information from
273.Pa +BUILD_INFO 273.Pa +BUILD_INFO
274is then checked for 274is then checked for
275.Ev USE_ABI_DEPENDS=NO 275.Ev USE_ABI_DEPENDS=NO
276(or 276(or
277.Ev IGNORE_RECOMMENDED ) . 277.Ev IGNORE_RECOMMENDED ) .
278If the package was built with ABI dependency recommendations ignored, 278If the package was built with ABI dependency recommendations ignored,
279a warning will be issued. 279a warning will be issued.
280.It 280.It
281A check is made to determine if the package conflicts (from 281A check is made to determine if the package conflicts (from
282.Cm @pkgcfl 282.Cm @pkgcfl
283directives, see 283directives, see
284.Xr pkg_create 1 ) 284.Xr pkg_create 1 )
285with an already recorded as installed package or if an installed package 285with an already recorded as installed package or if an installed package
286conflicts with the package. 286conflicts with the package.
287If it is, installation is terminated. 287If it is, installation is terminated.
288.It 288.It
289The file list of the package is compared to the file lists of the 289The file list of the package is compared to the file lists of the
290installed packeges. 290installed packeges.
291If there is any overlap, the installation is terminated. 291If there is any overlap, the installation is terminated.
292.It 292.It
293All package dependencies (from 293All package dependencies (from
294.Cm @pkgdep 294.Cm @pkgdep
295directives, see 295directives, see
296.Xr pkg_create 1 ) 296.Xr pkg_create 1 )
297are read from the packing list. 297are read from the packing list.
298If any of these required packages are not currently installed, 298If any of these required packages are not currently installed,
299an attempt is made to find and install it; 299an attempt is made to find and install it;
300if the missing package cannot be found or installed, 300if the missing package cannot be found or installed,
301the installation is terminated. 301the installation is terminated.
302If the 302If the
303.Fl u 303.Fl u
304option was specified twice, any required packages that are installed, 304option was specified twice, any required packages that are installed,
305but which have a version number that is considered to be too old, 305but which have a version number that is considered to be too old,
306are also updated. 306are also updated.
307The dependant packages are found according to the normal 307The dependant packages are found according to the normal
308.Ev PKG_PATH 308.Ev PKG_PATH
309rules. 309rules.
310.It 310.It
311If the package contains an 311If the package contains an
312.Ar install 312.Ar install
313script, it is executed with the following arguments: 313script, it is executed with the following arguments:
314.Bl -tag -width indentindent 314.Bl -tag -width indentindent
315.It Ar pkg-name 315.It Ar pkg-name
316The name of the package being installed. 316The name of the package being installed.
317.It Cm PRE-INSTALL 317.It Cm PRE-INSTALL
318Keyword denoting that the script is to perform any actions needed before 318Keyword denoting that the script is to perform any actions needed before
319the package is installed. 319the package is installed.
320.El 320.El
321.Pp 321.Pp
322If the 322If the
323.Ar install 323.Ar install
324script exits with a non-zero status code, the installation is terminated. 324script exits with a non-zero status code, the installation is terminated.
325.It 325.It
326The files from the file list are extracted to the choosen prefix. 326The files from the file list are extracted to the choosen prefix.
327.It 327.It
328If an 328If an
329.Ar install 329.Ar install
330script exists for the package, it is executed with the following arguments: 330script exists for the package, it is executed with the following arguments:
331.Bl -tag -width indentindent 331.Bl -tag -width indentindent
332.It Ar pkg_name 332.It Ar pkg_name
333The name of the package being installed. 333The name of the package being installed.
334.It Cm POST-INSTALL 334.It Cm POST-INSTALL
335Keyword denoting that the script is to perform any actions needed 335Keyword denoting that the script is to perform any actions needed
336after the package has been installed. 336after the package has been installed.
337.El 337.El
338.It 338.It
339After installation is complete, a copy of the packing list, 339After installation is complete, a copy of the packing list,
340.Ar deinstall 340.Ar deinstall
341script, description, and display files are copied into 341script, description, and display files are copied into
342.Pa /var/db/pkg/\*[Lt]pkg-name\*[Gt] 342.Pa /var/db/pkg/\*[Lt]pkg-name\*[Gt]
343for subsequent possible use by 343for subsequent possible use by
344.Xr pkg_delete 1 . 344.Xr pkg_delete 1 .
345Any package dependencies are recorded in the other packages' 345Any package dependencies are recorded in the other packages'
346.Pa /var/db/pkg/\*[Lt]other-pkg\*[Gt]/+REQUIRED_BY 346.Pa /var/db/pkg/\*[Lt]other-pkg\*[Gt]/+REQUIRED_BY
347file 347file
348(if an alternate package database directory is specified, then it 348(if an alternate package database directory is specified, then it
349overrides the 349overrides the
350.Pa /var/db/pkg 350.Pa /var/db/pkg
351path shown above). 351path shown above).
352.It 352.It
353If the package is a depoted package, then add it to the default view. 353If the package is a depoted package, then add it to the default view.
354.It 354.It
355Finally, if we were upgrading a package, any 355Finally, if we were upgrading a package, any
356.Pa +REQUIRED_BY 356.Pa +REQUIRED_BY
357file that was moved aside before upgrading was started is now moved 357file that was moved aside before upgrading was started is now moved
358back into place. 358back into place.
359.El 359.El
360.Pp 360.Pp
361The 361The
362.Ar install 362.Ar install
363script is called with the environment variable 363script is called with the environment variable
364.Ev PKG_PREFIX 364.Ev PKG_PREFIX
365set to the installation prefix (see the 365set to the installation prefix (see the
366.Fl p 366.Fl p
367option above). 367option above).
368This allows a package author to write a script 368This allows a package author to write a script
369that reliably performs some action on the directory where the package 369that reliably performs some action on the directory where the package
370is installed, even if the user might change it with the 370is installed, even if the user might change it with the
371.Fl p 371.Fl p
372flag to 372flag to
373.Cm pkg_add . 373.Cm pkg_add .
374The scripts are also called with the 374The scripts are also called with the
375.Ev PKG_METADATA_DIR 375.Ev PKG_METADATA_DIR
376environment variable set to the location of the 376environment variable set to the location of the
377.Pa +* 377.Pa +*
378meta-data files, and with the 378meta-data files, and with the
379.Ev PKG_REFCOUNT_DBDIR 379.Ev PKG_REFCOUNT_DBDIR
380environment variable set to the location of the package reference counts 380environment variable set to the location of the package reference counts
381database directory. 381database directory.
382.Sh ENVIRONMENT 382.Sh ENVIRONMENT
383.Bl -tag -width PKG_TMPDIR 383.Bl -tag -width PKG_TMPDIR
384.It Ev LOCALBASE 384.It Ev LOCALBASE
385This is the location of the 385This is the location of the
386.Ar viewbase 386.Ar viewbase
387directory in which all the views are managed. 387directory in which all the views are managed.
388The default 388The default
389.Ar viewbase 389.Ar viewbase
390directory is 390directory is
391.Pa /usr/pkg . 391.Pa /usr/pkg .
392.It Ev PKG_DBDIR 392.It Ev PKG_DBDIR
393If the 393If the
394.Fl K 394.Fl K
395flag isn't given, then 395flag isn't given, then
396.Ev PKG_DBDIR 396.Ev PKG_DBDIR
397is the location of the package database directory. 397is the location of the package database directory.
398The default package database directory is 398The default package database directory is
399.Pa /var/db/pkg . 399.Pa /var/db/pkg .
400.It Ev PKG_PATH 400.It Ev PKG_PATH
401The value of the 401The value of the
402.Ev PKG_PATH 402.Ev PKG_PATH
403is used if a given package can't be found, it's usually set to 403is used if a given package can't be found, it's usually set to
404.Pa /usr/pkgsrc/packages/All . 404.Pa /usr/pkgsrc/packages/All .
405The environment variable 405The environment variable
406should be a series of entries separated by semicolons. 406should be a series of entries separated by semicolons.
407Each entry consists of a directory name or URL. 407Each entry consists of a directory name or URL.
408The current directory may be indicated implicitly by an empty directory 408The current directory may be indicated implicitly by an empty directory
409name, or explicitly by a single period. 409name, or explicitly by a single period.
410FTP URLs may not end with a slash. 410FTP URLs may not end with a slash.
411.It Ev PKG_REFCOUNT_DBDIR 411.It Ev PKG_REFCOUNT_DBDIR
412Location of the package reference counts database directory. 412Location of the package reference counts database directory.
413The default location is the path to the package database directory with 413The default location is the path to the package database directory with
414.Dq .refcount 414.Dq .refcount
415appended to the path, e.g. 415appended to the path, e.g.
416.Pa /var/db/pkg.refcount . 416.Pa /var/db/pkg.refcount .
417.It Ev PKG_VIEW 417.It Ev PKG_VIEW
418The default view can be specified in the 418The default view can be specified in the
419.Ev PKG_VIEW 419.Ev PKG_VIEW
420environment variable. 420environment variable.
421.El 421.El
422.Sh EXAMPLES 422.Sh EXAMPLES
423In all cases, 423In all cases,
424.Nm 424.Nm
425will try to install binary packages listed in dependencies list. 425will try to install binary packages listed in dependencies list.
426.Pp 426.Pp
427You can specify a compiled binary package explicitly on the command line. 427You can specify a compiled binary package explicitly on the command line.
428.Bd -literal 428.Bd -literal
429# pkg_add /usr/pkgsrc/packages/All/tcsh-6.14.00.tgz 429# pkg_add /usr/pkgsrc/packages/All/tcsh-6.14.00.tgz
430.Ed 430.Ed
431.Pp 431.Pp
432If you omit the version number, 432If you omit the version number,
433.Nm 433.Nm
434will install the latest version available. 434will install the latest version available.
435With 435With
436.Fl v , 436.Fl v ,
437.Nm 437.Nm
438emits more messages to terminal. 438emits more messages to terminal.
439.Bd -literal 439.Bd -literal
440# pkg_add -v /usr/pkgsrc/packages/All/unzip 440# pkg_add -v /usr/pkgsrc/packages/All/unzip
441.Ed 441.Ed
442.Pp 442.Pp
443You can grab a compiled binary package from remote location by specifying 443You can grab a compiled binary package from remote location by specifying
444a URL. 444a URL.
445The URL can be put into an environment variable, 445The URL can be put into an environment variable,
446.Ev PKG_PATH . 446.Ev PKG_PATH .
447.Bd -literal 447.Bd -literal
448# pkg_add -v ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/i386/3.1_2007Q2/All/firefox-2.0.0.4.tgz 448# pkg_add -v ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/i386/3.1_2007Q2/All/firefox-2.0.0.4.tgz
449 449
450# export PKG_PATH=ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/i386/3.1_2007Q2/All 450# export PKG_PATH=ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/i386/3.1_2007Q2/All
451# pkg_add -v firefox 451# pkg_add -v firefox
452.Ed 452.Ed
453.Pp 453.Pp
454Over time, as problems are found in packages, they will be moved 454Over time, as problems are found in packages, they will be moved
455from the 455from the
456.Pa All 456.Pa All
457subdirectory into the 457subdirectory into the
458.Pa vulnerable 458.Pa vulnerable
459subdirectory. 459subdirectory.
460If you want to accept vulnerable packages by default 460If you want to accept vulnerable packages by default
461(and know what you are doing), 461(and know what you are doing),
462you can add the 462you can add the
463.Pa vulnerable 463.Pa vulnerable
464directory to your 464directory to your
465.Ev PKG_PATH 465.Ev PKG_PATH
466like this: 466like this:
467.Bd -literal 467.Bd -literal
468# 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/" 468# 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/"
469.Ed 469.Ed
470.Pp 470.Pp
471(The quotes are needed because semicolon 471(The quotes are needed because semicolon
472.Pq Sq \&; 472.Pq Sq \&;
473is a shell meta-character.) 473is a shell meta-character.)
474If you do this, consider installing and using the 474If you do this, consider installing and using the
475.Pa security/audit-packages 475.Pa security/audit-packages
476package and running it after every 476package and running it after every
477.Nm . 477.Nm .
478.Sh CONFIGURATION VARIABLES 478.Sh CONFIGURATION VARIABLES
479The following variables change the behaviour of 479The following variables change the behaviour of
480.Nm 480.Nm
481and are described in 481and are described in
482.Xr pkg_install.conf 5 : 482.Xr pkg_install.conf 5 :
483.Bl -tag -width CERTIFICATE_ANCHOR_PKGS 483.Bl -tag -width CERTIFICATE_ANCHOR_PKGS
484.It Ev CERTIFICATE_ANCHOR_PKGS 484.It Ev CERTIFICATE_ANCHOR_PKGS
485.It Ev CERTIFICATE_CHAIN 485.It Ev CERTIFICATE_CHAIN
486.It Ev VERIFIED_INSTALLATION 486.It Ev VERIFIED_INSTALLATION
487.El 487.El
488.Sh SEE ALSO 488.Sh SEE ALSO
489.Xr pkg_admin 1 , 489.Xr pkg_admin 1 ,
490.Xr pkg_create 1 , 490.Xr pkg_create 1 ,
491.Xr pkg_delete 1 , 491.Xr pkg_delete 1 ,
492.Xr pkg_info 1 , 492.Xr pkg_info 1 ,
493.Xr tar 1 , 493.Xr tar 1 ,
494.Xr mktemp 3 , 494.Xr mktemp 3 ,
495.Xr sysconf 3 , 495.Xr sysconf 3 ,
496.Xr pkg_install.conf 5 , 496.Xr pkg_install.conf 5 ,
497.Xr pkgsrc 7 497.Xr pkgsrc 7
498.Sh AUTHORS 498.Sh AUTHORS
499.Bl -tag -width indent -compact 499.Bl -tag -width indent -compact
500.It "Jordan Hubbard" 500.It "Jordan Hubbard"
501Initial work and ongoing development. 501Initial work and ongoing development.
502.It "John Kohl" 502.It "John Kohl"
503.Nx 503.Nx
504refinements. 504refinements.
505.It "Hubert Feyrer" 505.It "Hubert Feyrer"
506.Nx 506.Nx
507wildcard dependency processing, pkgdb, upgrading, etc. 507wildcard dependency processing, pkgdb, upgrading, etc.
508.It Thomas Klausner 508.It Thomas Klausner
509HTTP support. 509HTTP support.
510.It Joerg Sonnenberger 510.It Joerg Sonnenberger
511Rewrote most of the code base to work without external commands. 511Rewrote most of the code base to work without external commands.
512.El 512.El
513.Sh BUGS 513.Sh BUGS
514Hard links between files in a distribution are only preserved if either 
515(1) the staging area is on the same file system as the target directory of 
516all the links to the file, or (2) all the links to the file are bracketed by 
517.Cm @cwd 
518directives in the contents file, 
519.Em and 
520and the link names are extracted with a single 
521.Cm tar 
522command (not split between 
523invocations due to exec argument-space limitations--this depends on the 
524value returned by 
525.Fn sysconf _SC_ARG_MAX ) . 
526.Pp 
527Package upgrading needs a lot more work to be really universal. 514Package upgrading needs a lot more work to be really universal.
528.Pp 515.Pp
529Sure to be others. 516Sure to be others.