Changeset View
Changeset View
Standalone View
Standalone View
usr.sbin/pkg/pkg.7
Show All 18 Lines | |||||
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
.\" SUCH DAMAGE. | .\" SUCH DAMAGE. | ||||
.\" | .\" | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd December 31, 2020 | .Dd February 7, 2021 | ||||
.Dt PKG 7 | .Dt PKG 7 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm pkg | .Nm pkg | ||||
.Nd a utility for manipulating packages | .Nd a utility for manipulating packages | ||||
.Sh SYNOPSIS | .Sh SYNOPSIS | ||||
.Nm | .Nm | ||||
.Ao Ar command Ac | .Ao Ar command Ac | ||||
.Nm | .Nm | ||||
add | add | ||||
.Op Fl f | .Op Fl f | ||||
.Op Fl r Ar reponame | |||||
.Op Fl y | .Op Fl y | ||||
.Ao Pa pkg.txz Ac | .Ao Pa pkg.txz Ac | ||||
.Nm | .Nm | ||||
.Fl N | .Fl N | ||||
.Nm | .Nm | ||||
.Op Fl 4 | Fl 6 | .Op Fl 4 | Fl 6 | ||||
bootstrap | bootstrap | ||||
.Op Fl f | .Op Fl f | ||||
.Op Fl r Ar reponame | |||||
.Op Fl y | .Op Fl y | ||||
.Sh DESCRIPTION | .Sh DESCRIPTION | ||||
.Nm | .Nm | ||||
is the package management tool. | is the package management tool. | ||||
It is used to manage local packages installed from | It is used to manage local packages installed from | ||||
.Xr ports 7 | .Xr ports 7 | ||||
and install/upgrade packages from remote repositories. | and install/upgrade packages from remote repositories. | ||||
.Pp | .Pp | ||||
To avoid backwards incompatibility issues, the actual | To avoid backwards incompatibility issues, the actual | ||||
.Xr pkg 8 | .Xr pkg 8 | ||||
tool is not installed in the base system. | tool is not installed in the base system. | ||||
The first time invoked, | The first time invoked, | ||||
.Nm | .Nm | ||||
will bootstrap the real | will bootstrap the real | ||||
.Xr pkg 8 | .Xr pkg 8 | ||||
from a remote repository. | from a remote repository. | ||||
.Bl -tag -width "pkg bootstrap" | .Bl -tag -width "pkg bootstrap" | ||||
.It Nm Ao Ar command Ac | .It Nm Ao Ar command Ac | ||||
If | If | ||||
.Xr pkg 8 | .Xr pkg 8 | ||||
is not installed yet, it will be fetched, have its signature verified, | is not installed yet, it will be fetched, have its signature verified, | ||||
installed, and then have the original command forwarded to it. | installed, and then have the original command forwarded to it. | ||||
If already installed, the command requested will be forwarded to the real | If already installed, the command requested will be forwarded to the real | ||||
.Xr pkg 8 . | .Xr pkg 8 . | ||||
.It Nm Li add Oo Fl f Oc Oo Fl y Oc Ao Pa pkg.txz Ac | .It Nm Li add Oo Fl f Oc Oo Fl r Ar reponame Oc Oo Fl y Oc Ao Pa pkg.txz Ac | ||||
Install | Install | ||||
.Xr pkg 8 | .Xr pkg 8 | ||||
from a local package instead of fetching from remote. | from a local package instead of fetching from remote. | ||||
If signature checking is enabled, then the correct signature file | If signature checking is enabled, then the correct signature file | ||||
must exist and the signature valid before the package will be installed. | must exist and the signature valid before the package will be installed. | ||||
If the | If the | ||||
.Fl f | .Fl f | ||||
flag is specified, then | flag is specified, then | ||||
.Xr pkg 8 | .Xr pkg 8 | ||||
will be installed regardless if it is already installed. | will be installed regardless if it is already installed. | ||||
If the | If the | ||||
.Fl y | .Fl y | ||||
flag is specified, no confirmation will be asked when bootstrapping | flag is specified, no confirmation will be asked when bootstrapping | ||||
.Xr pkg 8 . | .Xr pkg 8 . | ||||
.Pp | |||||
If a | |||||
.Ar reponame | |||||
has been specified, then the signature configuration for that repository will be | |||||
used. | |||||
.It Nm Fl N | .It Nm Fl N | ||||
Do not bootstrap, just determine if | Do not bootstrap, just determine if | ||||
.Xr pkg 8 | .Xr pkg 8 | ||||
is actually installed or not. | is actually installed or not. | ||||
Returns 0 and the number of packages installed | Returns 0 and the number of packages installed | ||||
if it is, otherwise 1. | if it is, otherwise 1. | ||||
.It Nm Oo Fl 4 | Fl 6 Oc Li bootstrap Oo Fl f Oc Oo Fl y Oc | .It Nm Oo Fl 4 | Fl 6 Oc Li bootstrap Oo Fl f Oc \ | ||||
Oo Fl r Ar reponame Oc Oo Fl y Oc | |||||
Attempt to bootstrap and do not forward anything to | Attempt to bootstrap and do not forward anything to | ||||
.Xr pkg 8 | .Xr pkg 8 | ||||
after it is installed. | after it is installed. | ||||
With | With | ||||
.Fl 4 | .Fl 4 | ||||
and | and | ||||
.Fl 6 , | .Fl 6 , | ||||
.Nm | .Nm | ||||
will force IPv4 or IPv6 respectively to fetch | will force IPv4 or IPv6 respectively to fetch | ||||
.Xr pkg 8 | .Xr pkg 8 | ||||
and its signatures as needed. | and its signatures as needed. | ||||
If the | If the | ||||
.Fl f | .Fl f | ||||
flag is specified, then | flag is specified, then | ||||
.Xr pkg 8 | .Xr pkg 8 | ||||
will be fetched and installed regardless if it is already installed. | will be fetched and installed regardless if it is already installed. | ||||
If the | If the | ||||
.Fl y | .Fl y | ||||
flag is specified, no confirmation will be asked when bootstrapping | flag is specified, no confirmation will be asked when bootstrapping | ||||
.Xr pkg 8 . | .Xr pkg 8 . | ||||
.Pp | |||||
If a | |||||
.Ar reponame | |||||
has been specified, then the configuration for that repository will be used. | |||||
.El | .El | ||||
.Sh CONFIGURATION | .Sh CONFIGURATION | ||||
Configuration varies in whether it is in a repository configuration file | Configuration varies in whether it is in a repository configuration file | ||||
or the global configuration file. | or the global configuration file. | ||||
The default repository configuration for | |||||
.Fx | |||||
is stored in | |||||
.Pa /etc/pkg/FreeBSD.conf , | |||||
and additional repository configuration files will be searched for in | |||||
.Ev REPOS_DIR , | |||||
or | |||||
.Pa /usr/local/etc/pkg/repos | |||||
if it is unset. | |||||
.Pp | .Pp | ||||
Repository configuration can be stored in | For bootstrapping, | ||||
.Pa /etc/pkg/FreeBSD.conf | .Nm | ||||
in the following format: | will process all repositories that it finds and use the last enabled repository | ||||
by default. | |||||
.Pp | |||||
Repository configuration is stored in the following format: | |||||
.Bd -literal -offset indent | .Bd -literal -offset indent | ||||
FreeBSD: { | FreeBSD: { | ||||
url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest", | url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest", | ||||
mirror_type: "srv", | mirror_type: "srv", | ||||
signature_type: "none", | signature_type: "none", | ||||
fingerprints: "/usr/share/keys/pkg", | fingerprints: "/usr/share/keys/pkg", | ||||
enabled: yes | enabled: yes | ||||
} | } | ||||
.Ed | .Ed | ||||
.Pp | |||||
.Bl -tag -width signature_type -compact | .Bl -tag -width signature_type -compact | ||||
.It url | .It url | ||||
Refer to | Refer to | ||||
.Dv PACKAGESITE | .Dv PACKAGESITE | ||||
in | in | ||||
.Sx ENVIRONMENT | .Sx ENVIRONMENT | ||||
.It mirror_type | .It mirror_type | ||||
Refer to | Refer to | ||||
▲ Show 20 Lines • Show All 160 Lines • Show Last 20 Lines |