Is there a guide or man page about how pkg-static works to bootstrap pkg? Because just running ./pkg-static gives a "pkg:not enough arguments" error.
The complete output when running
pkg-static is:
Code:
[1-0] # pkg-static
pkg: not enough arguments
Usage: pkg [-v] [-d] [-l] [-N] [-j <jail name or id>|-c <chroot path>|-r <rootdir>] [-C <configuration file>] [-R <repo config dir>] [-o var=value] [-4|-6] <command> [<args>]
For more information on available commands and options see 'pkg help'.
[2->1<] #
This is, with respect to
pkg-static(8), not very informative.
When searching for a specific
man(1) page, you can use its options: the documented "search functionality" is
apropos(1). You can use
apropos pkg-static—
pkg(8) and
pkg-static(8) share their man page*. Unfortunately
pkg help pkg-static is not functional;
pkg help pkg, however, does display the shared man page.
With respect to
pkg-static(8):
Code:
DESCRIPTION
pkg provides an interface for manipulating packages: registering,
adding, removing and upgrading packages. pkg-static is a statically
linked variant of pkg typically only used for the initial installation
of pkg. There are some differences in functionality. See pkg.conf(5)
for details.
Therefore, in most cases, using
pkg < ... > or
pkg-static < ... > produces the same result.
Actual
bootstrapping of
pkg(8) is needed when
/ports-mgmt/pkg from the ports tree (that includes
pkg-static(8), see
pkg list pkg) is not yet installed. For this
bootstrapping,
/usr/sbin/pkg, part of the FreeBSD base install (
not located in the ports tree) is used,
pkg(7)**:
Code:
pkg [-46] bootstrap [-fy] [-r reponame]
Attempt to bootstrap and do not forward anything to pkg(8) af-
ter it is installed. With -4 and -6, pkg will force IPv4 or
IPv6 respectively to fetch pkg(8) and its signatures as needed.
If the -f flag is specified, then pkg(8) will be fetched and
installed regardless if it is already installed. If the -y
flag is specified, no confirmation will be asked when boot-
strapping pkg(8).
If a reponame has been specified, then the configuration for
that repository will be used.
Note that (using the
tcsh(1)-s built-in
where):
Rich (BB code):
# where pkg pkg-static
/usr/sbin/pkg <- this is pkg(7)
/usr/local/sbin/pkg <- this is part of /ports-mgmt/pkg
/usr/local/sbin/pkg-static <- this is also part of /ports-mgmt/pkg
Furthermore, when
/ports-mgmt/pkg is installed
/usr/local/sbin/pkg is usually executed by simply using
pkg < ... > due to the search order defined in
PATH. Executing
pkg(8) is therefore usually the net result of the cascaded calling sequence via
/usr/sbin/pkg, as documented in
pkg(7)
___
* That is, of course, when
/ports-mgmt/pkg is installed!
** When
/ports-mgmt/pkg is installed,
pkg-static bootstrap is in fact a NOP (no operation); see
pkg(8).
However, when
/ports-mgmt/pkg is
not installed, there is, of course, no
/usr/local/sbin/pkg-static.