Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Move all manpages in the docs directory, while here fix missing references
Baptiste Daroussin committed 12 years ago
commit 96ffd4a283c84a01d34f7ddfdb94dfac7b61f771
parent 95fb77f
75 files changed +7241 -7089
modified Makefile.am
@@ -10,4 +10,4 @@ EXTRA_DIST= docs
dist-hook:
	rm -rf `find $(distdir)/external -type d -name .deps`

-
SUBDIRS = external libpkg src tests scripts
+
SUBDIRS = external libpkg src tests scripts docs
modified configure.ac
@@ -169,6 +169,7 @@ AC_CONFIG_FILES(Makefile \
		src/Makefile \
		external/Makefile \
		scripts/Makefile \
+
		docs/Makefile \
		tests/Makefile \
		libpkg/Makefile
		libpkg/pkg.h \
added docs/fix-xrefs
@@ -0,0 +1,63 @@
+
#!/usr/bin/perl
+

+
use strict;
+
use warnings;
+
use autodie;
+
use feature qw(switch);
+

+
require 5.10.1;
+

+
$0 =~ s@.*/@@;
+

+
MAIN:
+
{
+
    my @xrefs;
+
    my $see_also;
+

+
    @xrefs =
+
      map { ".Xr $_->[0] $_->[1]" }
+
      sort {
+
             ( $a->[1] <=> $b->[1] )
+
          || ( ( $b->[0] eq 'pkg' ) <=> ( $a->[0] eq 'pkg' ) )
+
          || ( $a->[0] cmp $b->[0] )
+
      }
+
      map {
+
        [m/^(\S+)\.(\d)$/]
+
      } @ARGV;
+

+
    eval {
+
        for my $man (@ARGV) {
+
            my ($match) = ( $man =~ m/^(\S+)\./ );
+

+
            open READ,  "<$man";
+
            open WRITE, ">$man.new";
+

+
            $see_also = undef;
+

+
            while (<READ>) {
+
                if (/^\.Sh SEE ALSO/) {
+
                    $see_also = 1;
+
                    print WRITE $_;
+
                    print WRITE join( " ,\n", grep { !m/$match / } @xrefs ),
+
                      "\n";
+
                    next;
+
                }
+
                if ( $see_also && /^\.Xr/ ) {
+
                    next;
+
                }
+
                print WRITE $_;
+
            }
+
            close READ;
+
            close WRITE;
+

+
            rename "$man.new", $man;
+
        }
+
    };
+
    given ($@) {
+
        when (undef)  { exit 0; }
+
        when ('')     { exit 0; }
+
        when ('open') { die "$0: open() failed -- $@\n"; }
+
        default       { die "$0: Error -- $@\n"; }
+
    }
+
    exit 0;
+
}
added docs/pkg-add.8
@@ -0,0 +1,71 @@
+
.\"
+
.\" FreeBSD pkg - a next generation package for the installation and maintenance
+
.\" of non-core utilities.
+
.\"
+
.\" Redistribution and use in source and binary forms, with or without
+
.\" modification, are permitted provided that the following conditions
+
.\" are met:
+
.\" 1. Redistributions of source code must retain the above copyright
+
.\"    notice, this list of conditions and the following disclaimer.
+
.\" 2. Redistributions in binary form must reproduce the above copyright
+
.\"    notice, this list of conditions and the following disclaimer in the
+
.\"    documentation and/or other materials provided with the distribution.
+
.\"
+
.\"
+
.\"     @(#)pkg.8
+
.\" $FreeBSD$
+
.\"
+
.Dd March 20, 2014
+
.Dt PKG-ADD 8
+
.Os
+
.Sh NAME
+
.Nm "pkg add"
+
.Nd alias on
+
.Xr pkg-install 8
+
.Sh SYNOPSIS
+
See
+
.Xr pkg-install 8
+
.Sh DESCRIPTION
+
.Nm
+
is an alias on:
+
.Bd -literal -offset indent
+
pkg install -ylq
+
.Ed
+
.Sh FILES
+
See
+
.Xr pkg.conf 5 .
+
.Sh SEE ALSO
+
.Xr pkg_printf 3 ,
+
.Xr pkg_repos 3 ,
+
.Xr pkg-repository 5 ,
+
.Xr pkg.conf 5 ,
+
.Xr pkg 8 ,
+
.Xr pkg-annotate 8 ,
+
.Xr pkg-audit 8 ,
+
.Xr pkg-autoremove 8 ,
+
.Xr pkg-backup 8 ,
+
.Xr pkg-check 8 ,
+
.Xr pkg-clean 8 ,
+
.Xr pkg-config 8 ,
+
.Xr pkg-convert 8 ,
+
.Xr pkg-create 8 ,
+
.Xr pkg-delete 8 ,
+
.Xr pkg-fetch 8 ,
+
.Xr pkg-info 8 ,
+
.Xr pkg-install 8 ,
+
.Xr pkg-lock 8 ,
+
.Xr pkg-query 8 ,
+
.Xr pkg-register 8 ,
+
.Xr pkg-repo 8 ,
+
.Xr pkg-rquery 8 ,
+
.Xr pkg-search 8 ,
+
.Xr pkg-set 8 ,
+
.Xr pkg-shell 8 ,
+
.Xr pkg-shlib 8 ,
+
.Xr pkg-ssh 8 ,
+
.Xr pkg-stats 8 ,
+
.Xr pkg-update 8 ,
+
.Xr pkg-updating 8 ,
+
.Xr pkg-upgrade 8 ,
+
.Xr pkg-version 8 ,
+
.Xr pkg-which 8
added docs/pkg-annotate.8
@@ -0,0 +1,160 @@
+
.\"
+
.\" FreeBSD pkg - a next generation package for the installation and maintenance
+
.\" of non-core utilities.
+
.\"
+
.\" Redistribution and use in source and binary forms, with or without
+
.\" modification, are permitted provided that the following conditions
+
.\" are met:
+
.\" 1. Redistributions of source code must retain the above copyright
+
.\"    notice, this list of conditions and the following disclaimer.
+
.\" 2. Redistributions in binary form must reproduce the above copyright
+
.\"    notice, this list of conditions and the following disclaimer in the
+
.\"    documentation and/or other materials provided with the distribution.
+
.\"
+
.\"
+
.\"     @(#)pkg.8
+
.\" $FreeBSD$
+
.\"
+
.Dd April 6, 2013
+
.Dt PKG-ANNOTATE 8
+
.Os
+
.Sh NAME
+
.Nm "pkg annotate"
+
.Nd add, modify or delete arbitrary annotations from packages
+
.Sh SYNOPSIS
+
.Nm
+
.Op Fl giqxy
+
.Fl A|M
+
.Ar pkg-name
+
.Ar tag
+
.Op Ar value
+
.Nm
+
.Op Fl giqxy
+
.Fl D
+
.Ar pkg-name
+
.Ar tag
+
.Nm
+
.Op Fl qy
+
.Fl a
+
.Fl A|M
+
.Ar tag
+
.Op Ar value
+
.Nm
+
.Op Fl qy
+
.Fl a
+
.Fl D
+
.Ar tag
+
.Sh DESCRIPTION
+
.Nm
+
is used to add, modify or delete package annotations.
+
These are freeform tag-value pairs which may contain any arbitrary text.
+
.Ar Tags
+
must be unique per package, but there is no restriction on what
+
text
+
.Ar values
+
may be attached to them.
+
.Pp
+
The
+
.Ar tag
+
is always specified on the command line, but when adding or modifying
+
an annotation, the
+
.Ar value
+
may be supplied either on the command line or as a text stream on stdin.
+
.Sh OPTIONS
+
The following options are supported by
+
.Nm :
+
.Bl -tag -width F1
+
.It Fl a
+
Annotate all installed packages.
+
.It Fl A
+
The operation is to add a new annotation.
+
Attempting to add an annotation with a
+
.Ar tag
+
that already applies to that package is an error, but this will not
+
cause
+
.Nm
+
to exit before attempting to apply the annotation to all remaining
+
matched packages.
+
.It Fl D
+
The operation is to delete an annotation.
+
Only the
+
.Ar tag
+
needs to be specified.
+
Attempting to delete an annotation which does not exist on a package
+
is an error, but this will not prevent
+
.Nm
+
carrying on to delete the annotation from all matched packages.
+
.It Fl g
+
Treat
+
.Ar pkg-name
+
as a shell glob pattern.
+
.It Fl i
+
Make the default or the regular expression
+
.Fl ( x )
+
.Ar pkg-name
+
matching case insensitive.
+
.It Fl M
+
The operation is to modify a previously existing annotation.
+
Functionally, this behaves similarly to
+
.Fl A
+
except that it will succeed irrespective of whether the tag already
+
applies to all the matched packages.
+
.It Fl q
+
Operate quietly: do not output anything other than confirmatory questions.
+
.It Fl x
+
Treat
+
.Ar pkg-name
+
as a regular expression according to the "modern" or "extended" syntax
+
of
+
.Xr re_format 7 .
+
.It Fl y
+
Assume "yes" as the answer to all questions.
+
.El
+
.Sh ENVIRONMENT
+
The following environment variables affect the execution of
+
.Nm .
+
See
+
.Xr pkg.conf 5
+
for further description.
+
.Bl -tag -width ".Ev NO_DESCRIPTIONS"
+
.It Ev PKG_DBDIR
+
.It Ev ASSUME_ALWAYS_YES
+
.El
+
.Sh FILES
+
See
+
.Xr pkg.conf 5 .
+
.Sh SEE ALSO
+
.Xr pkg_printf 3 ,
+
.Xr pkg_repos 3 ,
+
.Xr pkg-repository 5 ,
+
.Xr pkg.conf 5 ,
+
.Xr pkg 8 ,
+
.Xr pkg-add 8 ,
+
.Xr pkg-audit 8 ,
+
.Xr pkg-autoremove 8 ,
+
.Xr pkg-backup 8 ,
+
.Xr pkg-check 8 ,
+
.Xr pkg-clean 8 ,
+
.Xr pkg-config 8 ,
+
.Xr pkg-convert 8 ,
+
.Xr pkg-create 8 ,
+
.Xr pkg-delete 8 ,
+
.Xr pkg-fetch 8 ,
+
.Xr pkg-info 8 ,
+
.Xr pkg-install 8 ,
+
.Xr pkg-lock 8 ,
+
.Xr pkg-query 8 ,
+
.Xr pkg-register 8 ,
+
.Xr pkg-repo 8 ,
+
.Xr pkg-rquery 8 ,
+
.Xr pkg-search 8 ,
+
.Xr pkg-set 8 ,
+
.Xr pkg-shell 8 ,
+
.Xr pkg-shlib 8 ,
+
.Xr pkg-ssh 8 ,
+
.Xr pkg-stats 8 ,
+
.Xr pkg-update 8 ,
+
.Xr pkg-updating 8 ,
+
.Xr pkg-upgrade 8 ,
+
.Xr pkg-version 8 ,
+
.Xr pkg-which 8
added docs/pkg-audit.8
@@ -0,0 +1,111 @@
+
.\"
+
.\" FreeBSD pkg - a next generation package for the installation and maintenance
+
.\" of non-core utilities.
+
.\"
+
.\" Redistribution and use in source and binary forms, with or without
+
.\" modification, are permitted provided that the following conditions
+
.\" are met:
+
.\" 1. Redistributions of source code must retain the above copyright
+
.\"    notice, this list of conditions and the following disclaimer.
+
.\" 2. Redistributions in binary form must reproduce the above copyright
+
.\"    notice, this list of conditions and the following disclaimer in the
+
.\"    documentation and/or other materials provided with the distribution.
+
.\"
+
.\"
+
.\"     @(#)pkg.8
+
.\" $FreeBSD$
+
.\"
+
.Dd December  24, 2013
+
.Dt PKG-AUDIT 8
+
.Os
+
.Sh NAME
+
.Nm "pkg audit"
+
.Nd Audits installed packages against known vulnerabilities.
+
.Sh SYNOPSIS
+
.Nm
+
.Op Fl Fq
+
.Ar pkg-name
+
.Sh DESCRIPTION
+
.Nm
+
checks installed packages for known vulnerabilities and generates reports
+
including references to security advisories.
+
Its intended audience is system
+
administrators and individual users.
+
.Pp
+
.Nm
+
uses a database maintained by port committers and the FreeBSD security team
+
to check if security advisories for any installed packages exist.
+
Note that a current ports tree (or any local copy of the ports tree) is not
+
required for operation.
+
.Pp
+
The URL that is used to fetch the database can be overridden via the VULNXML_SITE
+
config variable.
+
See
+
.Xr pkg.conf 5
+
for more information.
+
.Pp
+
If you have a vulnerable package installed, you are advised to update or
+
deinstall it immediately.
+
.Pp
+
Supplying a
+
.Ar pkg-name
+
will audit only that package.
+
.Sh OPTIONS
+
The following options are supported by
+
.Nm :
+
.Bl -tag -width F1
+
.It Fl F
+
Fetch the database before checking.
+
.It Fl q
+
Be ``quiet''.
+
Prints only the requested information without
+
displaying many hints.
+
.El
+
.Sh ENVIRONMENT
+
The following environment variables affect the execution of
+
.Nm .
+
See
+
.Xr pkg.conf 5
+
for further description.
+
.Bl -tag -width ".Ev NO_DESCRIPTIONS"
+
.It Ev PKG_DBDIR
+
.It Ev VULNXML_SITE
+
.El
+
.Sh FILES
+
See
+
.Xr pkg.conf 5 .
+
.Sh SEE ALSO
+
.Xr pkg_printf 3 ,
+
.Xr pkg_repos 3 ,
+
.Xr pkg-repository 5 ,
+
.Xr pkg.conf 5 ,
+
.Xr pkg 8 ,
+
.Xr pkg-add 8 ,
+
.Xr pkg-annotate 8 ,
+
.Xr pkg-autoremove 8 ,
+
.Xr pkg-backup 8 ,
+
.Xr pkg-check 8 ,
+
.Xr pkg-clean 8 ,
+
.Xr pkg-config 8 ,
+
.Xr pkg-convert 8 ,
+
.Xr pkg-create 8 ,
+
.Xr pkg-delete 8 ,
+
.Xr pkg-fetch 8 ,
+
.Xr pkg-info 8 ,
+
.Xr pkg-install 8 ,
+
.Xr pkg-lock 8 ,
+
.Xr pkg-query 8 ,
+
.Xr pkg-register 8 ,
+
.Xr pkg-repo 8 ,
+
.Xr pkg-rquery 8 ,
+
.Xr pkg-search 8 ,
+
.Xr pkg-set 8 ,
+
.Xr pkg-shell 8 ,
+
.Xr pkg-shlib 8 ,
+
.Xr pkg-ssh 8 ,
+
.Xr pkg-stats 8 ,
+
.Xr pkg-update 8 ,
+
.Xr pkg-updating 8 ,
+
.Xr pkg-upgrade 8 ,
+
.Xr pkg-version 8 ,
+
.Xr pkg-which 8
added docs/pkg-autoremove.8
@@ -0,0 +1,92 @@
+
.\"
+
.\" FreeBSD pkg - a next generation package for the installation and maintenance
+
.\" of non-core utilities.
+
.\"
+
.\" Redistribution and use in source and binary forms, with or without
+
.\" modification, are permitted provided that the following conditions
+
.\" are met:
+
.\" 1. Redistributions of source code must retain the above copyright
+
.\"    notice, this list of conditions and the following disclaimer.
+
.\" 2. Redistributions in binary form must reproduce the above copyright
+
.\"    notice, this list of conditions and the following disclaimer in the
+
.\"    documentation and/or other materials provided with the distribution.
+
.\"
+
.\"
+
.\"     @(#)pkg.8
+
.\" $FreeBSD$
+
.\"
+
.Dd February 25, 2013
+
.Dt PKG-AUTOREMOVE 8
+
.Os
+
.Sh NAME
+
.Nm "pkg autoremove"
+
.Nd removes orphan packages
+
.Sh SYNOPSIS
+
.Nm
+
.Op Fl ynq
+
.Sh DESCRIPTION
+
.Nm
+
is used for removing orphan packages, which were installed
+
during dependency resolution and are no longer needed.
+
.Sh OPTIONS
+
The following options are supported by
+
.Nm :
+
.Bl -tag -width F1
+
.It Fl y
+
Assume yes when asked for confirmation before package autoremoval.
+
.It Fl n
+
Dry-run mode.
+
The list of changes to packages is always printed, but
+
no changes are actually made.
+
.It Fl q
+
Force quiet output
+
.El
+
.Sh ENVIRONMENT
+
The following environment variables affect the execution of
+
.Nm .
+
See
+
.Xr pkg.conf 5
+
for further description.
+
.Bl -tag -width ".Ev NO_DESCRIPTIONS"
+
.It Ev ASSUME_ALWAYS_YES
+
.It Ev HANDLE_RC_SCRIPTS
+
.It Ev PKG_DBDIR
+
.El
+
.Sh FILES
+
See
+
.Xr pkg.conf 5 .
+
.Sh SEE ALSO
+
.Xr pkg_printf 3 ,
+
.Xr pkg_repos 3 ,
+
.Xr pkg-repository 5 ,
+
.Xr pkg.conf 5 ,
+
.Xr pkg 8 ,
+
.Xr pkg-add 8 ,
+
.Xr pkg-annotate 8 ,
+
.Xr pkg-audit 8 ,
+
.Xr pkg-backup 8 ,
+
.Xr pkg-check 8 ,
+
.Xr pkg-clean 8 ,
+
.Xr pkg-config 8 ,
+
.Xr pkg-convert 8 ,
+
.Xr pkg-create 8 ,
+
.Xr pkg-delete 8 ,
+
.Xr pkg-fetch 8 ,
+
.Xr pkg-info 8 ,
+
.Xr pkg-install 8 ,
+
.Xr pkg-lock 8 ,
+
.Xr pkg-query 8 ,
+
.Xr pkg-register 8 ,
+
.Xr pkg-repo 8 ,
+
.Xr pkg-rquery 8 ,
+
.Xr pkg-search 8 ,
+
.Xr pkg-set 8 ,
+
.Xr pkg-shell 8 ,
+
.Xr pkg-shlib 8 ,
+
.Xr pkg-ssh 8 ,
+
.Xr pkg-stats 8 ,
+
.Xr pkg-update 8 ,
+
.Xr pkg-updating 8 ,
+
.Xr pkg-upgrade 8 ,
+
.Xr pkg-version 8 ,
+
.Xr pkg-which 8
added docs/pkg-backup.8
@@ -0,0 +1,98 @@
+
.\"
+
.\" FreeBSD pkg - a next generation package for the installation and maintenance
+
.\" of non-core utilities.
+
.\"
+
.\" Redistribution and use in source and binary forms, with or without
+
.\" modification, are permitted provided that the following conditions
+
.\" are met:
+
.\" 1. Redistributions of source code must retain the above copyright
+
.\"    notice, this list of conditions and the following disclaimer.
+
.\" 2. Redistributions in binary form must reproduce the above copyright
+
.\"    notice, this list of conditions and the following disclaimer in the
+
.\"    documentation and/or other materials provided with the distribution.
+
.\"
+
.\"
+
.\"     @(#)pkg.8
+
.\" $FreeBSD$
+
.\"
+
.Dd February 25, 2013
+
.Dt PKG-BACKUP 8
+
.Os
+
.Sh NAME
+
.Nm "pkg backup"
+
.Nd backup and restore the local package database
+
.Sh SYNOPSIS
+
.Nm
+
.Fl d
+
.Ar dest_file
+
.Nm
+
.Fl r
+
.Ar src_file
+
.Sh DESCRIPTION
+
.Nm
+
is used for backing up and restoring of the local package database.
+
.Sh OPTIONS
+
The following options are supported by
+
.Nm :
+
.Bl -tag -width F1
+
.It Fl d Ar dest_file
+
Dumps the local package database to a file specified on the command-line.
+
If
+
.Ar -
+
is specified as the argument
+
.Nm
+
will use stdout for its output.
+
.It Fl r Ar src_file
+
Uses
+
.Ar file
+
in order to restore the local package database.
+
Useful in case of a database
+
crash of lost to restore your database from previously made backup.
+
.El
+
.Sh ENVIRONMENT
+
The following environment variables affect the execution of
+
.Nm .
+
See
+
.Xr pkg.conf 5
+
for further description.
+
.Bl -tag -width ".Ev NO_DESCRIPTIONS"
+
.It Ev PKG_DBDIR
+
.El
+
.Sh FILES
+
See
+
.Xr pkg.conf 5 .
+
.Sh SEE ALSO
+
.Xr pkg_printf 3 ,
+
.Xr pkg_repos 3 ,
+
.Xr pkg-repository 5 ,
+
.Xr pkg.conf 5 ,
+
.Xr pkg 8 ,
+
.Xr pkg-add 8 ,
+
.Xr pkg-annotate 8 ,
+
.Xr pkg-audit 8 ,
+
.Xr pkg-autoremove 8 ,
+
.Xr pkg-check 8 ,
+
.Xr pkg-clean 8 ,
+
.Xr pkg-config 8 ,
+
.Xr pkg-convert 8 ,
+
.Xr pkg-create 8 ,
+
.Xr pkg-delete 8 ,
+
.Xr pkg-fetch 8 ,
+
.Xr pkg-info 8 ,
+
.Xr pkg-install 8 ,
+
.Xr pkg-lock 8 ,
+
.Xr pkg-query 8 ,
+
.Xr pkg-register 8 ,
+
.Xr pkg-repo 8 ,
+
.Xr pkg-rquery 8 ,
+
.Xr pkg-search 8 ,
+
.Xr pkg-set 8 ,
+
.Xr pkg-shell 8 ,
+
.Xr pkg-shlib 8 ,
+
.Xr pkg-ssh 8 ,
+
.Xr pkg-stats 8 ,
+
.Xr pkg-update 8 ,
+
.Xr pkg-updating 8 ,
+
.Xr pkg-upgrade 8 ,
+
.Xr pkg-version 8 ,
+
.Xr pkg-which 8
added docs/pkg-check.8
@@ -0,0 +1,120 @@
+
.\"
+
.\" FreeBSD pkg - a next generation package for the installation and maintenance
+
.\" of non-core utilities.
+
.\"
+
.\" Redistribution and use in source and binary forms, with or without
+
.\" modification, are permitted provided that the following conditions
+
.\" are met:
+
.\" 1. Redistributions of source code must retain the above copyright
+
.\"    notice, this list of conditions and the following disclaimer.
+
.\" 2. Redistributions in binary form must reproduce the above copyright
+
.\"    notice, this list of conditions and the following disclaimer in the
+
.\"    documentation and/or other materials provided with the distribution.
+
.\"
+
.\"
+
.\"     @(#)pkg.8
+
.\" $FreeBSD$
+
.\"
+
.Dd July 11, 2013
+
.Dt PKG-CHECK 8
+
.Os
+
.Sh NAME
+
.Nm "pkg check"
+
.Nd sanity checks installed packages
+
.Sh SYNOPSIS
+
.Nm
+
.Op Fl Bdsr
+
.Op Fl vyn
+
.Op Fl a | gix Ar pattern
+
.Sh DESCRIPTION
+
.Nm
+
.Fl B
+
is used to reanalyse shared libraries of installed packages.
+
.Pp
+
.Nm
+
.Fl d
+
is used to check for and install missing dependencies.
+
.Pp
+
.Nm
+
.Fl r
+
is used to recompute sizes and checksums of installed packages.
+
.Pp
+
.Nm
+
.Fl s
+
is used to find invalid checksums for installed packages.
+
.Sh OPTIONS
+
The following options are supported by
+
.Nm :
+
.Bl -tag -width F1
+
.It Fl y
+
Assume yes when asked for confirmation before installing missing dependencies.
+
.It Fl v
+
Be verbose.
+
.It Fl n
+
Merely check for missing dependencies and do not install them.
+
.It Fl a
+
Process all packages.
+
.It Fl i
+
Make the standard or regular expression
+
.Fl ( x )
+
matching against
+
.Ar pattern
+
case insensitive.
+
.It Fl g
+
Treat
+
.Ar pattern
+
as a shell glob pattern.
+
.It Fl x
+
Treat
+
.Ar pattern
+
as a regular expression.
+
This uses the "modern" or "extended" syntax described in
+
.Xr re_format 7
+
.El
+
.Sh ENVIRONMENT
+
The following environment variables affect the execution of
+
.Nm .
+
See
+
.Xr pkg.conf 5
+
for further description.
+
.Bl -tag -width ".Ev NO_DESCRIPTIONS"
+
.It Ev PKG_DBDIR
+
.El
+
.Sh FILES
+
See
+
.Xr pkg.conf 5 .
+
.Sh SEE ALSO
+
.Xr pkg_printf 3 ,
+
.Xr pkg_repos 3 ,
+
.Xr pkg-repository 5 ,
+
.Xr pkg.conf 5 ,
+
.Xr pkg 8 ,
+
.Xr pkg-add 8 ,
+
.Xr pkg-annotate 8 ,
+
.Xr pkg-audit 8 ,
+
.Xr pkg-autoremove 8 ,
+
.Xr pkg-backup 8 ,
+
.Xr pkg-clean 8 ,
+
.Xr pkg-config 8 ,
+
.Xr pkg-convert 8 ,
+
.Xr pkg-create 8 ,
+
.Xr pkg-delete 8 ,
+
.Xr pkg-fetch 8 ,
+
.Xr pkg-info 8 ,
+
.Xr pkg-install 8 ,
+
.Xr pkg-lock 8 ,
+
.Xr pkg-query 8 ,
+
.Xr pkg-register 8 ,
+
.Xr pkg-repo 8 ,
+
.Xr pkg-rquery 8 ,
+
.Xr pkg-search 8 ,
+
.Xr pkg-set 8 ,
+
.Xr pkg-shell 8 ,
+
.Xr pkg-shlib 8 ,
+
.Xr pkg-ssh 8 ,
+
.Xr pkg-stats 8 ,
+
.Xr pkg-update 8 ,
+
.Xr pkg-updating 8 ,
+
.Xr pkg-upgrade 8 ,
+
.Xr pkg-version 8 ,
+
.Xr pkg-which 8
added docs/pkg-clean.8
@@ -0,0 +1,105 @@
+
.\"
+
.\" FreeBSD pkg - a next generation package for the installation and maintenance
+
.\" of non-core utilities.
+
.\"
+
.\" Redistribution and use in source and binary forms, with or without
+
.\" modification, are permitted provided that the following conditions
+
.\" are met:
+
.\" 1. Redistributions of source code must retain the above copyright
+
.\"    notice, this list of conditions and the following disclaimer.
+
.\" 2. Redistributions in binary form must reproduce the above copyright
+
.\"    notice, this list of conditions and the following disclaimer in the
+
.\"    documentation and/or other materials provided with the distribution.
+
.\"
+
.\"
+
.\"     @(#)pkg.8
+
.\" $FreeBSD$
+
.\"
+
.Dd July 10, 2013
+
.Dt PKG-CLEAN 8
+
.Os
+
.Sh NAME
+
.Nm "pkg clean"
+
.Nd Cleans the local cache of fetched remote packages.
+
.Sh SYNOPSIS
+
.Nm
+
.Op Fl anqy
+
.Sh DESCRIPTION
+
.Nm
+
is used to cleanup the local cache of packages downloaded from remote
+
repositories.
+
It removes packages that have been superseded by newer versions, and
+
any packages that are no longer provided.
+
.Sh OPTIONS
+
The following options are supported by
+
.Nm :
+
.Bl -tag -width F1
+
.It Fl a
+
Delete all cached packages.
+
.It Fl n
+
Dry-run: do not delete any package files from the cache, but show what
+
would be done instead.
+
Forces the preview of the packages that would be deleted to be shown,
+
even when used with
+
.Fl y .
+
Note: the package cache file permissions only permit root access.
+
Results will be disappointing for any other user.
+
.It Fl q
+
Be quiet.
+
Suppress most output.
+
All output is suppressed if
+
.Fl y
+
is also used.
+
.It Fl y
+
Assume a yes answer instead of asking for confirmation before deleting
+
any out-of-date or redundant packages from the cache.
+
.El
+
.Sh ENVIRONMENT
+
The following environment variables affect the execution of
+
.Nm .
+
See
+
.Xr pkg.conf 5
+
for further description.
+
.Bl -tag -width ".Ev NO_DESCRIPTIONS"
+
.It Ev ASSUME_ALWAYS_YES
+
.It Ev PKG_DBDIR
+
.It Ev PKG_CONFIG_CACHEDIR
+
.El
+
.Sh FILES
+
See
+
.Xr pkg.conf 5 .
+
.Sh SEE ALSO
+
.Xr pkg_printf 3 ,
+
.Xr pkg_repos 3 ,
+
.Xr pkg-repository 5 ,
+
.Xr pkg.conf 5 ,
+
.Xr pkg 8 ,
+
.Xr pkg-add 8 ,
+
.Xr pkg-annotate 8 ,
+
.Xr pkg-audit 8 ,
+
.Xr pkg-autoremove 8 ,
+
.Xr pkg-backup 8 ,
+
.Xr pkg-check 8 ,
+
.Xr pkg-config 8 ,
+
.Xr pkg-convert 8 ,
+
.Xr pkg-create 8 ,
+
.Xr pkg-delete 8 ,
+
.Xr pkg-fetch 8 ,
+
.Xr pkg-info 8 ,
+
.Xr pkg-install 8 ,
+
.Xr pkg-lock 8 ,
+
.Xr pkg-query 8 ,
+
.Xr pkg-register 8 ,
+
.Xr pkg-repo 8 ,
+
.Xr pkg-rquery 8 ,
+
.Xr pkg-search 8 ,
+
.Xr pkg-set 8 ,
+
.Xr pkg-shell 8 ,
+
.Xr pkg-shlib 8 ,
+
.Xr pkg-ssh 8 ,
+
.Xr pkg-stats 8 ,
+
.Xr pkg-update 8 ,
+
.Xr pkg-updating 8 ,
+
.Xr pkg-upgrade 8 ,
+
.Xr pkg-version 8 ,
+
.Xr pkg-which 8
added docs/pkg-config.8
@@ -0,0 +1,75 @@
+
.\"
+
.\" FreeBSD pkg - a next generation package for the installation and maintenance
+
.\" of non-core utilities.
+
.\"
+
.\" Redistribution and use in source and binary forms, with or without
+
.\" modification, are permitted provided that the following conditions
+
.\" are met:
+
.\" 1. Redistributions of source code must retain the above copyright
+
.\"    notice, this list of conditions and the following disclaimer.
+
.\" 2. Redistributions in binary form must reproduce the above copyright
+
.\"    notice, this list of conditions and the following disclaimer in the
+
.\"    documentation and/or other materials provided with the distribution.
+
.\"
+
.\"
+
.\"     @(#)pkg.8
+
.\" $FreeBSD$
+
.\"
+
.Dd November 29, 2013
+
.Dt PKG-CONFIG 8
+
.Os
+
.Sh NAME
+
.Nm "pkg config"
+
.Nd retrieve the value of a given configuration option
+
.Sh SYNOPSIS
+
.Nm
+
.Ar configname
+
.Sh DESCRIPTION
+
.Nm
+
retrieve the value of a given configuration option.
+
For lists,
+
one line per entry will be printed, key/values will be printed
+
as one line per key/value pair.
+
.Sh FILES
+
See
+
.Xr pkg.conf 5 .
+
.Sh EXAMPLES
+
Getting the ABI:
+
.Dl % pkg config abi
+
Getting the directories where the repositories configuration are read:
+
.Dl % pkg config repos_dir
+
.Sh SEE ALSO
+
.Xr pkg_printf 3 ,
+
.Xr pkg_repos 3 ,
+
.Xr pkg-repository 5 ,
+
.Xr pkg.conf 5 ,
+
.Xr pkg 8 ,
+
.Xr pkg-add 8 ,
+
.Xr pkg-annotate 8 ,
+
.Xr pkg-audit 8 ,
+
.Xr pkg-autoremove 8 ,
+
.Xr pkg-backup 8 ,
+
.Xr pkg-check 8 ,
+
.Xr pkg-clean 8 ,
+
.Xr pkg-convert 8 ,
+
.Xr pkg-create 8 ,
+
.Xr pkg-delete 8 ,
+
.Xr pkg-fetch 8 ,
+
.Xr pkg-info 8 ,
+
.Xr pkg-install 8 ,
+
.Xr pkg-lock 8 ,
+
.Xr pkg-query 8 ,
+
.Xr pkg-register 8 ,
+
.Xr pkg-repo 8 ,
+
.Xr pkg-rquery 8 ,
+
.Xr pkg-search 8 ,
+
.Xr pkg-set 8 ,
+
.Xr pkg-shell 8 ,
+
.Xr pkg-shlib 8 ,
+
.Xr pkg-ssh 8 ,
+
.Xr pkg-stats 8 ,
+
.Xr pkg-update 8 ,
+
.Xr pkg-updating 8 ,
+
.Xr pkg-upgrade 8 ,
+
.Xr pkg-version 8 ,
+
.Xr pkg-which 8
added docs/pkg-convert.8
@@ -0,0 +1,86 @@
+
.\"
+
.\" FreeBSD pkg - a next generation package for the installation and maintenance
+
.\" of non-core utilities.
+
.\"
+
.\" Redistribution and use in source and binary forms, with or without
+
.\" modification, are permitted provided that the following conditions
+
.\" are met:
+
.\" 1. Redistributions of source code must retain the above copyright
+
.\"    notice, this list of conditions and the following disclaimer.
+
.\" 2. Redistributions in binary form must reproduce the above copyright
+
.\"    notice, this list of conditions and the following disclaimer in the
+
.\"    documentation and/or other materials provided with the distribution.
+
.\"
+
.\"
+
.\"     @(#)pkg.8
+
.\" $FreeBSD$
+
.\"
+
.Dd February 25, 2013
+
.Dt PKG-CONVERT 8
+
.Os
+
.Sh NAME
+
.Nm "pkg convert"
+
.Nd convert from/to pkgng database format
+
.Sh SYNOPSIS
+
.Nm
+
.Op Fl d Ar pkg_dbdir
+
.Op Fl nr
+
.Sh DESCRIPTION
+
.Nm
+
is used to convert from/to pkgng local database to legacy pkg_install tools
+
format.
+
.Sh OPTIONS
+
The following options are supported by
+
.Nm :
+
.Bl -tag -width F1
+
.It Fl d
+
The location of the
+
.Xr pkg_add 1
+
dbdir.
+
Defaults to
+
.Fa /var/db/pkg .
+
.It Fl n
+
Dry-run mode.
+
Do not actually convert anything.
+
Just show what would be done.
+
.It Fl r
+
Revert conversion
+
.El
+
.Sh FILES
+
See
+
.Xr pkg.conf 5 .
+
.Sh SEE ALSO
+
.Xr pkg_printf 3 ,
+
.Xr pkg_repos 3 ,
+
.Xr pkg-repository 5 ,
+
.Xr pkg.conf 5 ,
+
.Xr pkg 8 ,
+
.Xr pkg-add 8 ,
+
.Xr pkg-annotate 8 ,
+
.Xr pkg-audit 8 ,
+
.Xr pkg-autoremove 8 ,
+
.Xr pkg-backup 8 ,
+
.Xr pkg-check 8 ,
+
.Xr pkg-clean 8 ,
+
.Xr pkg-config 8 ,
+
.Xr pkg-create 8 ,
+
.Xr pkg-delete 8 ,
+
.Xr pkg-fetch 8 ,
+
.Xr pkg-info 8 ,
+
.Xr pkg-install 8 ,
+
.Xr pkg-lock 8 ,
+
.Xr pkg-query 8 ,
+
.Xr pkg-register 8 ,
+
.Xr pkg-repo 8 ,
+
.Xr pkg-rquery 8 ,
+
.Xr pkg-search 8 ,
+
.Xr pkg-set 8 ,
+
.Xr pkg-shell 8 ,
+
.Xr pkg-shlib 8 ,
+
.Xr pkg-ssh 8 ,
+
.Xr pkg-stats 8 ,
+
.Xr pkg-update 8 ,
+
.Xr pkg-updating 8 ,
+
.Xr pkg-upgrade 8 ,
+
.Xr pkg-version 8 ,
+
.Xr pkg-which 8
added docs/pkg-create.8
@@ -0,0 +1,427 @@
+
.\"
+
.\" FreeBSD pkg - a next generation package for the installation and maintenance
+
.\" of non-core utilities.
+
.\"
+
.\" Redistribution and use in source and binary forms, with or without
+
.\" modification, are permitted provided that the following conditions
+
.\" are met:
+
.\" 1. Redistributions of source code must retain the above copyright
+
.\"    notice, this list of conditions and the following disclaimer.
+
.\" 2. Redistributions in binary form must reproduce the above copyright
+
.\"    notice, this list of conditions and the following disclaimer in the
+
.\"    documentation and/or other materials provided with the distribution.
+
.\"
+
.\"
+
.\"     @(#)pkg.8
+
.\" $FreeBSD$
+
.\"
+
.Dd November 29, 2013
+
.Dt PKG-CREATE 8
+
.Os
+
.\" ---------------------------------------------------------------------------
+
.Sh NAME
+
.Nm "pkg create"
+
.Nd a utility for creating software package distributions
+
.\" ---------------------------------------------------------------------------
+
.Sh SYNOPSIS
+
.Nm
+
.Op Fl n
+
.Op Fl f Ar format
+
.Op Fl o Ar outdir
+
.Op Fl p Ar plist
+
.Op Fl r Ar rootdir
+
.Fl m Ar manifestdir
+
.Nm
+
.Op Fl gnx
+
.Op Fl f Ar format
+
.Op Fl o Ar outdir
+
.Op Fl r Ar rootdir
+
.Ar pkg-name ...
+
.Nm
+
.Op Fl n
+
.Op Fl f Ar format
+
.Op Fl o Ar outdir
+
.Op Fl r Ar rootdir
+
.Fl a
+
.\" ---------------------------------------------------------------------------
+
.Sh DESCRIPTION
+
.Nm
+
is used to create packages from binaries or other files installed on
+
your computer.
+
Package tarballs can created from the files of a previously installed
+
package using metadata from the local package database.
+
Any number of packages may be created in one invocation of this style.
+
.Pp
+
Alternatively, a single package can be created from an arbitrary
+
selection of files on your system, but this requires a
+
.Ar manifestdir
+
and optionally
+
.Ar plist
+
to be supplied.
+
The package name will be derived from the
+
.Pa +MANIFEST
+
file which must be contained within the
+
.Ar manifestdir .
+
.Pp
+
Packages thus created can be distributed and subsequently installed on
+
other machines using the
+
.Cm pkg add
+
command.
+
.\" ---------------------------------------------------------------------------
+
.Sh OPTIONS
+
The following options are supported by
+
.Nm :
+
.Bl -tag -width ".Fl m Ar manifestdir"
+
.It Fl a
+
Create package tarballs from all packages installed on your system.
+
This option is incompatible with the
+
.Fl g , x
+
or
+
.Fl m Ar manifestdir
+
options.
+
.It Fl g
+
Interpret
+
.Ar pkg-name
+
as a shell glob pattern and create package only for installed binaries whose
+
name match this pattern.
+
This option is incompatible with the
+
.Fl a , x
+
or
+
.Fl m Ar manifestdir
+
options.
+
.It Fl x
+
Like
+
.Fl g ,
+
but interpret
+
.Ar pkg-name
+
as a regular expression using the "modern" or "extended" syntax described in
+
.Xr re_format 7 .
+
This option is incompatible with the
+
.Fl a, g
+
or
+
.Fl m Ar manifestdir
+
options.
+
.It Fl f Ar format
+
Set
+
.Ar format
+
as the package output format.
+
It can be one of
+
.Ar txz , tbz , tgz
+
or
+
.Ar tar
+
which are currently the only supported format.
+
If an invalid or no format is specified
+
.Ar txz
+
is assumed.
+
.It Fl m Ar manifestdir
+
Specify the directory containing the package manifest,
+
.Pa +MANIFEST
+
and optionally three other files; one containing a message to be
+
displayed on package installation,
+
.Pa +DISPLAY .
+
Another containing the description for the packages,
+
.Pa +DESC .
+
The last containing an mtree specification,
+
.Pa +MTREE_DIRS ,
+
for the directory tree the package will use.
+
See
+
.Xr mtree 5
+
for the format of the mtree file.
+
If specified, only a single package will be created.
+
.Pa +DISPLAY
+
,
+
.Pa +MTREE_DIRS
+
, and
+
.Pa +DESC
+
are not required; the
+
.Pa +MANIFEST
+
file can contain all the required information needed to build a
+
package.
+
This option is incompatible with the
+
.Fl a, g
+
or
+
.Fl x
+
options.
+
.It Fl n
+
Do not overwrite already existing packages
+
.It Fl o Ar outdir
+
Set
+
.Ar outdir
+
as the output directory.
+
If this option is not given, all created packages will
+
be saved in the current directory.
+
.It Fl p Ar plist
+
Specify some package metadata using the legacy plist format from
+
.Xr pkg_add 1 ,
+
commonly found in
+
.Pa pkg-plist
+
files in the ports tree.
+
Metadata from the
+
G.Ar plist
+
file, if specified, will take precedence over any equivalents from
+
the
+
.Ar manifestdir .
+
Only has any effect when used with
+
.Ar manifestdir .
+
See
+
.Sx "PLIST FORMAT"
+
for details
+
.It Fl r Ar rootdir
+
.Ar rootdir
+
specifies the top-level directory to be treated as the root of the
+
filesystem hierarchy containing the package files.
+
File paths in generated packages will be relative to
+
.Ar rootdir .
+
This allows a package to be generated from content offset from its
+
intended final location, which allows a package building without
+
disturbing similar content already on the system.
+
If unspecified, the default is effectively
+
.Pa / ,
+
the actual root directory.
+
.El
+
.\" ---------------------------------------------------------------------------
+
.Sh MANIFEST FILE DETAILS
+
.Bl -tag -width ".Cm www"
+
.It Cm name Ar pkg-name
+
This entry sets the package's name to
+
.Ar pkg-name . \" TODO: Find out why there is a space after the ``.''
+
Among other things, this name is used - with the version and the origin of the
+
concerned package - to identify a dependency.
+
.It Cm version Ar pkg-version
+
This entry sets the package's version to
+
.Ar pkg-version .
+
.It Cm origin Ar pkg-origin
+
This entry sets the package's origin to
+
.Ar pkg-origin .
+
This is a string of the form
+
.Pa category/port-dir
+
which designate the port this package was built from.
+
.It Cm comment Ar comment-string
+
.Ar comment-string
+
is a one-line description of this package.
+
It is the equivalent of the
+
.Dv COMMENT
+
variable for a port, not a way to put comments in a
+
.Pa +MANIFEST
+
file.
+
.It Cm arch Ar cpu-type
+
The architecture of the machine the package was built on.
+
.Ar cpu-type
+
takes values like x86, amd64...
+
.It Cm www Ar url
+
The software's official website.
+
.It Cm maintainer Ar mail-address
+
The maintainer's mail address.
+
.It Cm prefix Ar path-prefix
+
The path where the files contained in this package are installed
+
.Pq usually Pa /usr/local .
+
.It Cm flatsize Ar size
+
The size that the files contained in this package will occupy on your system
+
once uncompressed.
+
This value does not take into account files stored in the
+
package database.
+
.It Cm dep Ar dep-name dep-origin dep-version
+
Declare a dependency on the package which name, origin and version match
+
.Ar dep-name , dep-origin
+
and
+
.Ar dep-version
+
respectively.
+
.It Cm conflict Ar pkg-glob
+
Flag this package as incompatible with the one designated by
+
.Ar pkg-glob .
+
Conflicting packages cannot be installed on the same system as they may contain
+
references to the sames files.
+
.It Cm option Ar option-name option-value
+
Set the option
+
.Ar option-name
+
to the value
+
.Ar option-value .
+
.It Cm file Ar sha256-hash path
+
.Cm file
+
entries list files included in the package.
+
If the file is a regular one, such
+
an entry contains its sha256 digest along with its path.
+
If a packaged file is
+
a link, you must use this entry's other form, as described below.
+
.It Cm file Ar - path
+
Same as above but for file links.
+
The sha256 hash is replaced with a
+
.Ar -
+
(dash).
+
.It Cm dir Ar path
+
Mimics the
+
.Cm file
+
entry but for directories.
+
.El
+
.Sh PLIST FORMAT
+
The following describes the plist format:
+
.Pp
+
The plist is a sequential list of lines which can have keywords prepended.
+
A keyword starts with an
+
.Sq @ .
+
Lines not starting with a keyword are considered as paths to a file.
+
If started with a
+
.Sq /
+
then it is considered an absolute path.
+
Otherwise the file is considered as relative to
+
.Ev PREFIX .
+
.Pp
+
Keyword lines are formed as follows:
+
.Ar @keyword
+
.Ar line
+
.Pp
+
Available keywords are the following:
+
.Pp
+
.Bl -tag -width indent -compact
+
.It Cm @cwd Op Ar directory
+
Set the internal directory pointer to point to
+
.Ar directory .
+
All subsequent filenames will be assumed relative to this directory.
+
.It Cm @exec Ar command Pq deprecated
+
Execute
+
.Ar command
+
as part of the unpacking process.
+
If
+
.Ar command
+
contains any of the following sequences somewhere in it, they will
+
be expanded inline.
+
For the following examples, assume that
+
.Cm @cwd
+
is set to
+
.Pa /usr/local
+
and the last extracted file was
+
.Pa bin/emacs .
+
.Bl -tag -width indent -compact
+
.It Cm "%F"
+
Expands to the last filename extracted (as specified), in the example case
+
.Pa bin/emacs
+
.It Cm "\&%D"
+
Expand to the current directory prefix, as set with
+
.Cm @cwd ,
+
in the example case
+
.Pa /usr/local .
+
.It Cm "\&%B"
+
Expand to the
+
.Dq basename
+
of the fully qualified filename, that is the current directory prefix,
+
plus the last filespec, minus the trailing filename.
+
In the example case, that would be
+
.Pa /usr/local/bin .
+
.It Cm "%f"
+
Expand to the filename part of the fully qualified name, or
+
the converse of
+
.Cm \&%B ,
+
being in the example case,
+
.Pa emacs .
+
.El
+
.It Cm @unexec Ar command Pq deprecated
+
Execute
+
.Ar command
+
as part of the deinstallation process.
+
Expansion of special
+
.Cm %
+
sequences is the same as for
+
.Cm @exec .
+
This command is not executed during the package add, as
+
.Cm @exec
+
is, but rather when the package is deleted.
+
This is useful for deleting links and other ancillary files that were
+
created as a result of adding the package, but not directly known to
+
the package's table of contents (and hence not automatically
+
removable).
+
.It Cm @mode Ar mode
+
Set default permission for all subsequently extracted files to
+
.Ar mode .
+
Format is the same as that used by the
+
.Cm chmod
+
command.
+
Use without an arg to set back to default (mode of the file while being packed)
+
permissions.
+
.It Cm @owner Ar user
+
Set default ownership for all subsequently files to
+
.Ar user .
+
Use without an arg to set back to default (root)
+
ownership.
+
.It Cm @group Ar group
+
Set default group ownership for all subsequently files to
+
.Ar group .
+
Use without an arg to set back to default (wheel)
+
group ownership.
+
.It Cm @comment Ar string
+
The line will be ignored when packing
+
.It Cm @dirrm Ar name
+
Declare directory
+
.Pa name
+
to be deleted at deinstall time.
+
By default, directories created by a package installation are not
+
deleted when the package is deinstalled.
+
This provides an explicit directory cleanup method.
+
These directives should appear at the end of the package list.
+
If the directory is not empty a warning will be printed, and the
+
directory will not be removed.
+
.It Cm @dirrmtry Ar name
+
Declare directory
+
.Pa name
+
to be removed, as for
+
.Cm @dirrm ,
+
but does not issue a warning if the directory cannot be removed.
+
.El
+
.\" ---------------------------------------------------------------------------
+
.Sh ENVIRONMENT
+
The following environment variables affect the execution of
+
.Nm .
+
See
+
.Xr pkg.conf 5
+
for further description.
+
.Bl -tag -width ".Ev NO_DESCRIPTIONS"
+
.It Ev PKG_DBDIR
+
.It Ev PLIST_KEYWORDS_DIR
+
.It Ev PORTSDIR
+
.El
+
.\" ---------------------------------------------------------------------------
+
.Sh FILES
+
See
+
.Xr pkg.conf 5 .
+
.\" ---------------------------------------------------------------------------
+
.Sh EXAMPLES
+
Create package files for installed packages:
+
.Dl % pkg create -a -o /usr/ports/packages/All
+
.Pp
+
Create package file for pkg:
+
.Dl % pkg create -o /usr/ports/packages/All pkg
+
.\" ---------------------------------------------------------------------------
+
.Sh SEE ALSO
+
.Xr pkg_printf 3 ,
+
.Xr pkg_repos 3 ,
+
.Xr pkg-repository 5 ,
+
.Xr pkg.conf 5 ,
+
.Xr pkg 8 ,
+
.Xr pkg-add 8 ,
+
.Xr pkg-annotate 8 ,
+
.Xr pkg-audit 8 ,
+
.Xr pkg-autoremove 8 ,
+
.Xr pkg-backup 8 ,
+
.Xr pkg-check 8 ,
+
.Xr pkg-clean 8 ,
+
.Xr pkg-config 8 ,
+
.Xr pkg-convert 8 ,
+
.Xr pkg-delete 8 ,
+
.Xr pkg-fetch 8 ,
+
.Xr pkg-info 8 ,
+
.Xr pkg-install 8 ,
+
.Xr pkg-lock 8 ,
+
.Xr pkg-query 8 ,
+
.Xr pkg-register 8 ,
+
.Xr pkg-repo 8 ,
+
.Xr pkg-rquery 8 ,
+
.Xr pkg-search 8 ,
+
.Xr pkg-set 8 ,
+
.Xr pkg-shell 8 ,
+
.Xr pkg-shlib 8 ,
+
.Xr pkg-ssh 8 ,
+
.Xr pkg-stats 8 ,
+
.Xr pkg-update 8 ,
+
.Xr pkg-updating 8 ,
+
.Xr pkg-upgrade 8 ,
+
.Xr pkg-version 8 ,
+
.Xr pkg-which 8
added docs/pkg-delete.8
@@ -0,0 +1,137 @@
+
.\"
+
.\" FreeBSD pkg - a next generation package for the installation and maintenance
+
.\" of non-core utilities.
+
.\"
+
.\" Redistribution and use in source and binary forms, with or without
+
.\" modification, are permitted provided that the following conditions
+
.\" are met:
+
.\" 1. Redistributions of source code must retain the above copyright
+
.\"    notice, this list of conditions and the following disclaimer.
+
.\" 2. Redistributions in binary form must reproduce the above copyright
+
.\"    notice, this list of conditions and the following disclaimer in the
+
.\"    documentation and/or other materials provided with the distribution.
+
.\"
+
.\"
+
.\"     @(#)pkg.8
+
.\" $FreeBSD$
+
.\"
+
.Dd February 25, 2013
+
.Dt PKG-DELETE 8
+
.Os
+
.Sh NAME
+
.Nm "pkg delete"
+
.Nd deletes packages from the database and the system
+
.Sh SYNOPSIS
+
.Nm
+
.Op Fl DfginqRxy
+
.Ar pkg-name ...
+
.Nm
+
.Op Fl Dnqy
+
.Fl a
+
.Sh DESCRIPTION
+
.Nm
+
is used for deleting installed packages from the system.
+
.Nm
+
creates a work-list of all the installed packages matching the package
+
names on the command line.
+
The list is presented to the user.
+
If the user confirms that they do want to remove those packages, or
+
if the
+
.Cm ASSUME_ALWAYS_YES
+
configuration option is set,
+
.Nm
+
proceeds to remove the listed packages.
+
.Pp
+
If the set of packages to be deleted would leave installed packages
+
with unfulfilled dependencies,
+
.Nm
+
will emit an error message and quit without deleting anything unless
+
forced to proceed by the
+
.Fl f
+
option.
+
.Sh OPTIONS
+
The following options are supported by
+
.Nm :
+
.Bl -tag -width F1
+
.It Fl a
+
Deletes all installed packages from the system and empties the database.
+
.It Fl D
+
If a deinstallation script exists for a given package, do not execute it.
+
.It Fl f
+
Forces packages to be removed despite leaving unresolved dependencies.
+
.It Fl g
+
Treat the package names as shell glob patterns.
+
.It Fl i
+
Make the standard or regular expression
+
.Fl ( x )
+
matching against
+
.Ar pkg-name
+
case insensitive.
+
.It Fl n
+
Dry run mode.
+
The list of packages to delete is always printed, but no packages are
+
actually deleted.
+
.It Fl q
+
Force quiet output, except where
+
.Fl n
+
is also used, when
+
.Nm
+
will show the list of packages to be deleted.
+
.It Fl R
+
Delete all packages that require the listed packages as well.
+
.It Fl x
+
Treat the package names as regular expressions according to the
+
"modern" or "extended" syntax of
+
.Xr re_format 7 .
+
.It Fl y
+
Assume yes when asked for confirmation before package deletion.
+
.El
+
.Sh ENVIRONMENT
+
The following environment variables affect the execution of
+
.Nm .
+
See
+
.Xr pkg.conf 5
+
for further description.
+
.Bl -tag -width ".Ev NO_DESCRIPTIONS"
+
.It Ev ASSUME_ALWAYS_YES
+
.It Ev HANDLE_RC_SCRIPTS
+
.It Ev PKG_DBDIR
+
.El
+
.Sh FILES
+
See
+
.Xr pkg.conf 5 .
+
.Sh SEE ALSO
+
.Xr pkg_printf 3 ,
+
.Xr pkg_repos 3 ,
+
.Xr pkg-repository 5 ,
+
.Xr pkg.conf 5 ,
+
.Xr pkg 8 ,
+
.Xr pkg-add 8 ,
+
.Xr pkg-annotate 8 ,
+
.Xr pkg-audit 8 ,
+
.Xr pkg-autoremove 8 ,
+
.Xr pkg-backup 8 ,
+
.Xr pkg-check 8 ,
+
.Xr pkg-clean 8 ,
+
.Xr pkg-config 8 ,
+
.Xr pkg-convert 8 ,
+
.Xr pkg-create 8 ,
+
.Xr pkg-fetch 8 ,
+
.Xr pkg-info 8 ,
+
.Xr pkg-install 8 ,
+
.Xr pkg-lock 8 ,
+
.Xr pkg-query 8 ,
+
.Xr pkg-register 8 ,
+
.Xr pkg-repo 8 ,
+
.Xr pkg-rquery 8 ,
+
.Xr pkg-search 8 ,
+
.Xr pkg-set 8 ,
+
.Xr pkg-shell 8 ,
+
.Xr pkg-shlib 8 ,
+
.Xr pkg-ssh 8 ,
+
.Xr pkg-stats 8 ,
+
.Xr pkg-update 8 ,
+
.Xr pkg-updating 8 ,
+
.Xr pkg-upgrade 8 ,
+
.Xr pkg-version 8 ,
+
.Xr pkg-which 8
added docs/pkg-fetch.8
@@ -0,0 +1,139 @@
+
.\"
+
.\" FreeBSD pkg - a next generation package for the installation and maintenance
+
.\" of non-core utilities.
+
.\"
+
.\" Redistribution and use in source and binary forms, with or without
+
.\" modification, are permitted provided that the following conditions
+
.\" are met:
+
.\" 1. Redistributions of source code must retain the above copyright
+
.\"    notice, this list of conditions and the following disclaimer.
+
.\" 2. Redistributions in binary form must reproduce the above copyright
+
.\"    notice, this list of conditions and the following disclaimer in the
+
.\"    documentation and/or other materials provided with the distribution.
+
.\"
+
.\"
+
.\"     @(#)pkg.8
+
.\" $FreeBSD$
+
.\"
+
.Dd June 30, 2013
+
.Dt PKG-FETCH 8
+
.Os
+
.Sh NAME
+
.Nm "pkg fetch"
+
.Nd Fetches remote packages.
+
.Sh SYNOPSIS
+
.Nm
+
.Op Fl r Ar reponame
+
.Op Fl dgiqUxy
+
.Ar pkg-name
+
.Op ...
+
.Nm
+
.Op Fl r Ar reponame
+
.Op Fl dqUy
+
.Fl a
+
.Nm
+
.Op Fl r Ar reponame
+
.Op Fl dqUy
+
.Fl u
+
.Sh DESCRIPTION
+
.Nm
+
is used to download binary packages from a remote repository.
+
.Pp
+
One or more packages, or patterns can be specified.
+
.Pp
+
Repository catalogues will be updated automatically using
+
.Xr pkg-update 8 .
+
This can be disabled with the
+
.Fl U
+
flag.
+
.Sh OPTIONS
+
The following options are supported by
+
.Nm :
+
.Bl -tag -width F1
+
.It Fl a
+
Fetch all packages.
+
.It Fl d
+
Fetch the package and its dependencies as well.
+
.It Fl g
+
Treat
+
.Ar pkg-name
+
as a shell glob pattern.
+
.It Fl i
+
Make the standard or regular expression
+
.Fl ( x )
+
matching against
+
.Ar pkg-name
+
case insensitive.
+
.It Fl q
+
Quiet mode.
+
Show less output.
+
.It Fl r Ar reponame
+
Fetches packages from the given
+
.Ar reponame
+
if multiple repo support is enabled.
+
See
+
.Xr pkg.conf 5 .
+
.It Fl u
+
Fetch all available updates for the currently installed packages.
+
.It Fl U
+
Skip updating the repository catalogues with
+
.Xr pkg-update 8 .
+
Use the local cache only.
+
.It Fl x
+
Treat
+
.Ar pkg-name
+
as a regular expression according to the "modern" or "extended" syntax
+
of
+
.Xr re_format 7 .
+
.It Fl y
+
Assume yes when asked for confirmation before fetching packages.
+
.El
+
.Sh ENVIRONMENT
+
The following environment variables affect the execution of
+
.Nm :
+
.Bl -tag -width ".Ev NO_DESCRIPTIONS"
+
.It Ev PKG_DBDIR
+
.El
+
.Pp
+
See
+
.Xr pkg.conf 5
+
for additional environment variables that control behaviour.
+
.Sh FILES
+
See
+
.Xr pkg.conf 5 .
+
.Sh SEE ALSO
+
.Xr fetch 3 ,
+
.Xr pkg_printf 3 ,
+
.Xr pkg_repos 3 ,
+
.Xr pkg-repository 5 ,
+
.Xr pkg.conf 5 ,
+
.Xr pkg 8 ,
+
.Xr pkg-add 8 ,
+
.Xr pkg-annotate 8 ,
+
.Xr pkg-audit 8 ,
+
.Xr pkg-autoremove 8 ,
+
.Xr pkg-backup 8 ,
+
.Xr pkg-check 8 ,
+
.Xr pkg-clean 8 ,
+
.Xr pkg-config 8 ,
+
.Xr pkg-convert 8 ,
+
.Xr pkg-create 8 ,
+
.Xr pkg-delete 8 ,
+
.Xr pkg-info 8 ,
+
.Xr pkg-install 8 ,
+
.Xr pkg-lock 8 ,
+
.Xr pkg-query 8 ,
+
.Xr pkg-register 8 ,
+
.Xr pkg-repo 8 ,
+
.Xr pkg-rquery 8 ,
+
.Xr pkg-search 8 ,
+
.Xr pkg-set 8 ,
+
.Xr pkg-shell 8 ,
+
.Xr pkg-shlib 8 ,
+
.Xr pkg-ssh 8 ,
+
.Xr pkg-stats 8 ,
+
.Xr pkg-update 8 ,
+
.Xr pkg-updating 8 ,
+
.Xr pkg-upgrade 8 ,
+
.Xr pkg-version 8 ,
+
.Xr pkg-which 8
added docs/pkg-info.8
@@ -0,0 +1,177 @@
+
.\"
+
.\" FreeBSD pkg - a next generation package for the installation and maintenance
+
.\" of non-core utilities.
+
.\"
+
.\" Redistribution and use in source and binary forms, with or without
+
.\" modification, are permitted provided that the following conditions
+
.\" are met:
+
.\" 1. Redistributions of source code must retain the above copyright
+
.\"    notice, this list of conditions and the following disclaimer.
+
.\" 2. Redistributions in binary form must reproduce the above copyright
+
.\"    notice, this list of conditions and the following disclaimer in the
+
.\"    documentation and/or other materials provided with the distribution.
+
.\"
+
.\"
+
.\"     @(#)pkg.8
+
.\" $FreeBSD$
+
.\"
+
.Dd February 1, 2014
+
.Dt PKG-INFO 8
+
.Os
+
.Sh NAME
+
.Nm "pkg info"
+
.Nd displays information for packages
+
.Sh SYNOPSIS
+
.Nm
+
.Ar pkg-name
+
.Nm
+
.Fl a
+
.Nm
+
.Op Fl AbBDdefgiIklOqRrsx
+
.Ar pkg-name
+
.Nm
+
.Op Fl AbBDdfIlqRrs
+
.Fl F Ar pkg-file
+
.Sh DESCRIPTION
+
.Nm
+
is used for displaying information for packages.
+
.Sh OPTIONS
+
The following options are supported by
+
.Nm :
+
.Bl -tag -width F1
+
.It Fl a
+
Display all installed packages.
+
.It Fl A
+
Display any annotations added to the package.
+
.It Fl f
+
Display full information about the packages matching
+
.Ar pkg-name .
+
This is the default.
+
.It Fl R
+
Display the full manifest (raw) about the packages matching
+
.Ar pkg-name .
+
.It Fl e
+
If
+
.Ar pkg-name
+
is installed and registered in the database, return 0, otherwise return 1.
+
Useful for checking whether the package is installed.
+
.It Fl D
+
Show the pkg-message for matching packages.
+
.It Fl g
+
Treat
+
.Ar pkg-name
+
as a shell glob pattern.
+
.It Fl i
+
Make the default or the regular expression
+
.Fl ( x )
+
.Ar pkg-name
+
matching case insensitive.
+
.It Fl x
+
Treat
+
.Ar pkg-name
+
as a regular expression according to the "modern" or "extended" syntax
+
of
+
.Xr re_format 7 .
+
.It Fl d
+
Display the list of packages on which
+
.Ar pkg-name
+
depends.
+
.It Fl r
+
Display the list of packages which require
+
.Ar pkg-name .
+
.It Fl k
+
Show the locking status for
+
.Ar pkg-name .
+
When used in combination with
+
.Fl d
+
or
+
.Fl r ,
+
indicate which packages, dependencies or requirements are locked
+
by '(*)'.
+
Locking status is only meaningful for installed packages; all locking
+
statuses will show as unlocked when information about a
+
.Ar pkg-file
+
is queried.
+
.It Fl l
+
Display all files installed by
+
.Ar pkg-name .
+
.It Fl b
+
Display all shared libraries provided by
+
.Ar pkg-name .
+
.It Fl B
+
Display all shared libraries used by
+
.Ar pkg-name .
+
.It Fl s
+
Display the total size of files installed by
+
.Ar pkg-name
+
.It Fl q
+
Be
+
.Dq quiet .
+
Prints only the requested information without displaying many hints.
+
.It Fl O
+
Search is done by the
+
.Ar pkg-name
+
origin.
+
Added only for Ports compatibility.
+
.Pp
+
.It Fl E
+
Hides the full package output and only shows the package name.
+
This option is deprecated and exists only for Ports compatibility.
+
.It Fl o
+
Display
+
.Ar pkg-name
+
origin.
+
.It Fl p
+
Display the installation prefix for each package matching
+
.Ar pkg-name .
+
.It Fl F Ar pkg-file
+
Displays information from the package archive
+
.Ar pkg-file .
+
.El
+
.Sh ENVIRONMENT
+
The following environment variables affect the execution of
+
.Nm .
+
See
+
.Xr pkg.conf 5
+
for further description.
+
.Bl -tag -width ".Ev NO_DESCRIPTIONS"
+
.It Ev PKG_DBDIR
+
.El
+
.Sh FILES
+
See
+
.Xr pkg.conf 5 .
+
.Sh SEE ALSO
+
.Xr pkg_printf 3 ,
+
.Xr pkg_repos 3 ,
+
.Xr pkg-repository 5 ,
+
.Xr pkg.conf 5 ,
+
.Xr pkg 8 ,
+
.Xr pkg-add 8 ,
+
.Xr pkg-annotate 8 ,
+
.Xr pkg-audit 8 ,
+
.Xr pkg-autoremove 8 ,
+
.Xr pkg-backup 8 ,
+
.Xr pkg-check 8 ,
+
.Xr pkg-clean 8 ,
+
.Xr pkg-config 8 ,
+
.Xr pkg-convert 8 ,
+
.Xr pkg-create 8 ,
+
.Xr pkg-delete 8 ,
+
.Xr pkg-fetch 8 ,
+
.Xr pkg-install 8 ,
+
.Xr pkg-lock 8 ,
+
.Xr pkg-query 8 ,
+
.Xr pkg-register 8 ,
+
.Xr pkg-repo 8 ,
+
.Xr pkg-rquery 8 ,
+
.Xr pkg-search 8 ,
+
.Xr pkg-set 8 ,
+
.Xr pkg-shell 8 ,
+
.Xr pkg-shlib 8 ,
+
.Xr pkg-ssh 8 ,
+
.Xr pkg-stats 8 ,
+
.Xr pkg-update 8 ,
+
.Xr pkg-updating 8 ,
+
.Xr pkg-upgrade 8 ,
+
.Xr pkg-version 8 ,
+
.Xr pkg-which 8
added docs/pkg-install.8
@@ -0,0 +1,209 @@
+
.\"
+
.\" FreeBSD pkg - a next generation package for the installation and
+
.\" maintenance of non-core utilities.
+
.\"
+
.\" Redistribution and use in source and binary forms, with or without
+
.\" modification, are permitted provided that the following conditions
+
.\" are met:
+
.\" 1. Redistributions of source code must retain the above copyright
+
.\"    notice, this list of conditions and the following disclaimer.
+
.\" 2. Redistributions in binary form must reproduce the above copyright
+
.\"    notice, this list of conditions and the following disclaimer in the
+
.\"    documentation and/or other materials provided with the distribution.
+
.\"
+
.\"
+
.\"     @(#)pkg.8
+
.\" $FreeBSD$
+
.\"
+
.Dd March 11, 2014
+
.Dt PKG-INSTALL 8
+
.Os
+
.Sh NAME
+
.Nm "pkg install"
+
.Nd installs packages from remote package repositories or local archives
+
.Sh SYNOPSIS
+
.Nm
+
.Op Fl AfgIinFqRUxy
+
.Op Fl r Ar reponame
+
.Ar pkg-origin ...
+
.Sh DESCRIPTION
+
.Nm
+
is used for installation of packages from a package repository or local archives.
+
Multiple package names can be specified on the command line, either
+
explicitly or by matching against package names in the repository
+
catalogues using shell globbing or regular expressions.
+
.Pp
+
.Nm
+
first updates any out-of-date repository catalogues, unless
+
.Cm REPO_AUTOUPDATE
+
has been set to
+
.Sy NO
+
in
+
.Pa pkg.conf .
+
.Pp
+
It then creates a work-list of all the package installations to do.
+
Any already installed and up-to-date packages will be dropped from the
+
list unless the
+
.Fl f
+
(force) option is supplied, in which case those packages will be
+
reinstalled.
+
.Pp
+
The dependencies of packages in the list are examined and any missing
+
packages are added to the list for installation.
+
Such implicitly added packages are flagged as candidates for
+
autoremoval.
+
See
+
.Xr pkg-autoremove 8
+
for details.
+
.Pp
+
Autoremoval flags are sticky, and will persist over reinstallation or
+
upgrade of the packages concerned, even if subsequently the packages
+
are named explicitly on a command line.
+
See
+
.Xr pkg-query 8
+
for finding the autoremoval status of a package, and
+
.Xr pkg-set 8
+
for modifying it.
+
.Pp
+
Any already installed but out of date packages, either named on the
+
command line or from the sum of all their dependencies are added to
+
the work list as upgrade jobs.
+
The work list is sorted into dependency order and
+
.Nm
+
will present it to the user for approval before proceeding, unless
+
overridden by the
+
.Fl y
+
option or the
+
.Cm ASSUME_ALWAYS_YES
+
setting in
+
.Pa pkg.conf .
+
.Pp
+
Packages are fetched from the repositories into the local package
+
cache if they are not already present, or if the checksum of the
+
cached package file differs from the one in the repository.
+
Packages may be downloaded from any of the repositories mentioned
+
in
+
.Xr pkg.conf 5
+
or in the files in
+
.Pa /usr/local/etc/pkg/repo .
+
See
+
.Xr pkg-repository 5
+
for details.
+
.Pp
+
Package repository catalogues will be automatically updated whenever
+
.Xr pkg-update 8
+
is run, unless disabled by the
+
.Fl U
+
flag.
+
Updating repository catalogues is highly recommended before doing any
+
package installation with
+
.Nm .
+
.Sh OPTIONS
+
The following options are supported by
+
.Nm :
+
.Bl -tag -width F1
+
.It Fl A
+
Mark the installed packages as orphan.
+
Will be automatically removed if no other packages depend on them.
+
For more information please refer to
+
.Xr pkg-autoremove 8
+
.It Fl f
+
Force the reinstallation of the package if already installed.
+
.It Fl g
+
Treat the package names as shell glob patterns.
+
.It Fl I
+
If any installation scripts (pre-install or post-install) exist for a given
+
package, do not execute them.
+
When a package is updated, deinstallation
+
scripts (pre-deinstall or post-deinstall) are not run either.
+
.It Fl i
+
Make the standard or the regular expression
+
.Fl ( x )
+
matching against
+
.Ar pkg-name
+
case insensitive.
+
.It Fl n
+
Dry-run mode.
+
The list of changes to packages is always printed, but
+
no changes are actually made.
+
.It Fl F
+
Do not perform actual installation of packages, merely fetch packages
+
that should be upgraded and detect possible conflicts.
+
.It Fl q
+
Force quiet output, except when
+
.Fl n
+
is used, where
+
.Nm
+
will always show packages to be installed, upgraded or deleted.
+
.It Fl R
+
When used with
+
.Fl f ,
+
reinstalls any packages that require the given package.
+
.It Fl r Ar reponame
+
In multi-repo mode, override the
+
.Fa pkg.conf
+
ordering and only attempt to download packages from the named
+
repository.
+
.It Fl U
+
Skip updating the repository catalogues with
+
.Xr pkg-update 8 .
+
Use the locally cached copies only.
+
.It Fl x
+
Treat the package names as regular expressions according to the
+
"modern" or "extended" syntax of
+
.Xr re_format 7 .
+
.It Fl y
+
Assume yes when asked for confirmation before package installation.
+
.El
+
.Sh ENVIRONMENT
+
The following environment variables affect the execution of
+
.Nm .
+
See
+
.Xr pkg.conf 5
+
for further description.
+
.Bl -tag -width ".Ev NO_DESCRIPTIONS"
+
.It Ev ASSUME_ALWAYS_YES
+
.It Ev HANDLE_RC_SCRIPTS
+
.It Ev PACKAGESITE
+
.It Ev PKG_CACHEDIR
+
.It Ev PKG_DBDIR
+
.It Ev REPO_AUTOUPDATE
+
.El
+
.Sh FILES
+
See
+
.Xr pkg.conf 5 .
+
.Sh SEE ALSO
+
.Xr pkg_printf 3 ,
+
.Xr pkg_repos 3 ,
+
.Xr pkg-repository 5 ,
+
.Xr pkg.conf 5 ,
+
.Xr pkg 8 ,
+
.Xr pkg-add 8 ,
+
.Xr pkg-annotate 8 ,
+
.Xr pkg-audit 8 ,
+
.Xr pkg-autoremove 8 ,
+
.Xr pkg-backup 8 ,
+
.Xr pkg-check 8 ,
+
.Xr pkg-clean 8 ,
+
.Xr pkg-config 8 ,
+
.Xr pkg-convert 8 ,
+
.Xr pkg-create 8 ,
+
.Xr pkg-delete 8 ,
+
.Xr pkg-fetch 8 ,
+
.Xr pkg-info 8 ,
+
.Xr pkg-lock 8 ,
+
.Xr pkg-query 8 ,
+
.Xr pkg-register 8 ,
+
.Xr pkg-repo 8 ,
+
.Xr pkg-rquery 8 ,
+
.Xr pkg-search 8 ,
+
.Xr pkg-set 8 ,
+
.Xr pkg-shell 8 ,
+
.Xr pkg-shlib 8 ,
+
.Xr pkg-ssh 8 ,
+
.Xr pkg-stats 8 ,
+
.Xr pkg-update 8 ,
+
.Xr pkg-updating 8 ,
+
.Xr pkg-upgrade 8 ,
+
.Xr pkg-version 8 ,
+
.Xr pkg-which 8
added docs/pkg-lock.8
@@ -0,0 +1,142 @@
+
.\"
+
.\" FreeBSD pkg - a next generation package for the installation and maintenance
+
.\" of non-core utilities.
+
.\"
+
.\" Redistribution and use in source and binary forms, with or without
+
.\" modification, are permitted provided that the following conditions
+
.\" are met:
+
.\" 1. Redistributions of source code must retain the above copyright
+
.\"    notice, this list of conditions and the following disclaimer.
+
.\" 2. Redistributions in binary form must reproduce the above copyright
+
.\"    notice, this list of conditions and the following disclaimer in the
+
.\"    documentation and/or other materials provided with the distribution.
+
.\"
+
.\"
+
.\"     @(#)pkg.8
+
.\" $FreeBSD$
+
.\"
+
.Dd February 25, 2013
+
.Dt PKG-LOCK 8
+
.Os
+
.Sh NAME
+
.Nm "pkg lock" ,
+
.Nm "pkg unlock"
+
.Nd lock or unlock packages
+
.Sh SYNOPSIS
+
.Nm
+
.Op Fl qy
+
.Fl a
+
.Nm
+
.Op Fl giqxy
+
.Ar pkg-name
+
.Nm "pkg unlock"
+
.Op Fl qy
+
.Fl a
+
.Nm "pkg unlock"
+
.Op Fl giqxy
+
.Ar pkg-name
+
.Sh DESCRIPTION
+
.Nm
+
is used to lock packages against reinstallation,
+
modification or deletion.
+
.Nm "pkg unlock"
+
unlocks the named packages.
+
Either variant only has an effect on currently installed packages.
+
Consequently it is impossible to block installation of a new package
+
by using this mechanism, unless such an installation implies updating
+
a locked package.
+
.Pp
+
The impact of locking a package is wider than simply preventing
+
modifications to the package itself.
+
.Cm Any
+
operation implying modification of the locked package will be
+
blocked.
+
This includes:
+
.Pp
+
.Bl -bullet -compact
+
.It
+
Attempts to reinstall, up- or downgrade or delete the locked package
+
itself.
+
.It
+
Installation, up- or downgrade of a package where the resultant
+
package would have a dependency on a different version of the locked
+
package.
+
.It
+
Deletion, up- or downgrade of any package the locked package depends
+
upon, either directly or as a consequence of installing or upgrading
+
some third package.
+
.El
+
.Sh OPTIONS
+
The following options are supported by
+
.Nm :
+
.Bl -tag -width F1
+
.It Fl a
+
Lock or unlock all installed packages.
+
.It Fl g
+
Treat
+
.Ar pkg-name
+
as a shell glob pattern.
+
.It Fl i
+
Make the default or the regular expression
+
.Fl ( x )
+
.Ar pkg-name
+
matching case insensitive.
+
.It Fl q
+
Operate quietly: do not output anything other than confirmatory questions.
+
.It Fl x
+
Treat
+
.Ar pkg-name
+
as a regular expression according to the "modern" or "extended" syntax
+
of
+
.Xr re_format 7 .
+
.It Fl y
+
Assume "yes" as the answer to all questions.
+
.El
+
.Sh ENVIRONMENT
+
The following environment variables affect the execution of
+
.Nm .
+
See
+
.Xr pkg.conf 5
+
for further description.
+
.Bl -tag -width ".Ev NO_DESCRIPTIONS"
+
.It Ev PKG_DBDIR
+
.It Ev ASSUME_ALWAYS_YES
+
.El
+
.Sh FILES
+
See
+
.Xr pkg.conf 5 .
+
.Sh SEE ALSO
+
.Xr pkg_printf 3 ,
+
.Xr pkg_repos 3 ,
+
.Xr pkg-repository 5 ,
+
.Xr pkg.conf 5 ,
+
.Xr pkg 8 ,
+
.Xr pkg-add 8 ,
+
.Xr pkg-annotate 8 ,
+
.Xr pkg-audit 8 ,
+
.Xr pkg-autoremove 8 ,
+
.Xr pkg-backup 8 ,
+
.Xr pkg-check 8 ,
+
.Xr pkg-clean 8 ,
+
.Xr pkg-config 8 ,
+
.Xr pkg-convert 8 ,
+
.Xr pkg-create 8 ,
+
.Xr pkg-delete 8 ,
+
.Xr pkg-fetch 8 ,
+
.Xr pkg-info 8 ,
+
.Xr pkg-install 8 ,
+
.Xr pkg-query 8 ,
+
.Xr pkg-register 8 ,
+
.Xr pkg-repo 8 ,
+
.Xr pkg-rquery 8 ,
+
.Xr pkg-search 8 ,
+
.Xr pkg-set 8 ,
+
.Xr pkg-shell 8 ,
+
.Xr pkg-shlib 8 ,
+
.Xr pkg-ssh 8 ,
+
.Xr pkg-stats 8 ,
+
.Xr pkg-update 8 ,
+
.Xr pkg-updating 8 ,
+
.Xr pkg-upgrade 8 ,
+
.Xr pkg-version 8 ,
+
.Xr pkg-which 8
added docs/pkg-query.8
@@ -0,0 +1,363 @@
+
.\"
+
.\" FreeBSD pkg - a next generation package for the installation and maintenance
+
.\" of non-core utilities.
+
.\"
+
.\" Redistribution and use in source and binary forms, with or without
+
.\" modification, are permitted provided that the following conditions
+
.\" are met:
+
.\" 1. Redistributions of source code must retain the above copyright
+
.\"    notice, this list of conditions and the following disclaimer.
+
.\" 2. Redistributions in binary form must reproduce the above copyright
+
.\"    notice, this list of conditions and the following disclaimer in the
+
.\"    documentation and/or other materials provided with the distribution.
+
.\"
+
.\"
+
.\"     @(#)pkg.8
+
.\" $FreeBSD$
+
.\"
+
.Dd January 14, 2014
+
.Dt PKG-QUERY 8
+
.Os
+
.Sh NAME
+
.Nm "pkg query"
+
.Nd query information for installed packages
+
.Sh SYNOPSIS
+
.Nm
+
.Ao query-format Ac Ao pkg-name Ac
+
.Nm
+
.Op Fl a
+
.Ao query-format Ac
+
.Nm
+
.Fl F Ao pkg-name Ac Ao query-format Ac
+
.Nm
+
.Fl e Ao evaluation-condition Ac Ao query-format Ac
+
.Nm
+
.Op Fl gix
+
.Ao query-format Ac Ao pattern Ac Ao ... Ac
+
.Sh DESCRIPTION
+
.Nm
+
is used for displaying information about packages.
+
.Sh OPTIONS
+
The following options are supported by
+
.Nm :
+
.Bl -tag -width F1
+
.It Fl a
+
Match all packages from the database
+
.It Fl e
+
Match packages using the given
+
.Ar evaluation-condition.
+
See EVALUATION FORMAT for details.
+
.It Fl F Ar pkg-name
+
Display information only for the package file
+
.Ar pkg-name
+
.It Fl i
+
Make the standard or regular expression
+
.Fl ( x )
+
matching against
+
.Ar pkg-name
+
case insensitive.
+
.It Fl g
+
Treat
+
.Ao pattern Ac
+
as a glob pattern.
+
.It Fl x
+
Treat
+
.Ao pattern Ac
+
as a regular expression according to the "modern" or "extended" syntax
+
of
+
.Xr re_format 7 .
+
.El
+
.Sh QUERY FORMAT
+
There are two type of keyword for the query format: the multiline and the normal
+
one. Only one type of multiline pattern is accepted for a given query.
+
.Ss Normal patterns:
+
.Bl -tag -width F1
+
.It Cm \&%n
+
Name of the matched package
+
.It Cm \&%v
+
Version of the matched package
+
.It Cm \&%o
+
Origin of the matched package
+
.It Cm \&%p
+
Prefix of the matched package
+
.It Cm \&%m
+
Maintainer of the matched package
+
.It Cm \&%c
+
Comment of the matched package
+
.It Cm \&%e
+
Description of the matched package
+
.It Cm \&%w
+
Home page of the matched package
+
.It Cm \&%l
+
license logic of the matched package - nothing for single, & for AND, and | for OR
+
.It Cm \&%s Ns Op bh
+
The flat size of the matched package, where
+
.Cm b
+
is in bytes, and
+
.Cm h
+
is in human readable format.
+
.It Cm \&%a
+
Returns 1 if the matched package is an orphan package and can be pkg-autoremove(1)'d, 0 otherwise
+
.It Cm \&%q
+
Architecture of the matched package
+
.It Cm \&%k
+
Returns 1 if the matched package is locked against modification or deletion, 0 otherwise
+
.It Cm \&%M
+
message contained in the matched package
+
.It Cm \&%t
+
Timestamp that the package was installed
+
.It Cm \&%? Ns Op drCFODLUGBbA
+
Returns 0 if the list is empty and 1 if the list has information to display
+
.Bl -tag -width indent
+
.It Cm d
+
for dependencies
+
.It Cm r
+
for reverse dependencies
+
.It Cm C
+
for categories
+
.It Cm F
+
for files
+
.It Cm O
+
for options
+
.It Cm D
+
for directories
+
.It Cm L
+
for licenses
+
.It Cm U
+
for users
+
.It Cm G
+
for groups
+
.It Cm B
+
for required shared libraries
+
.It Cm b
+
for provided shared libraries
+
.It Cm A
+
for annotations
+
.El
+
.It Cm \&%# Ns Op drCFODLUGBbA
+
Returns the number of elements in the list
+
.Bl -tag -width indent
+
.It Cm d
+
for dependencies
+
.It Cm r
+
for reverse dependencies
+
.It Cm C
+
for categories
+
.It Cm F
+
for files
+
.It Cm O
+
for options
+
.It Cm D
+
for directories
+
.It Cm L
+
for licenses
+
.It Cm U
+
for users
+
.It Cm G
+
for groups
+
.It Cm b
+
for shared
+
.It Cm B
+
for required shared libraries
+
.It Cm b
+
for provided shared libraries
+
.It Cm A
+
for annotations
+
.El
+
.El
+
.Ss Multiline patterns:
+
.Bl -tag -width F1
+
.It Cm \&%d Ns Op nov
+
Expands to the list of dependencies for the matched package, where
+
.Cm n
+
stands for the package name,
+
.Cm o
+
for the package origin, and
+
.Cm v
+
for the package version.
+
.It Cm \&%r Ns Op nov
+
Expands to the list of reverse dependencies for the matched package, where
+
.Cm n
+
stands for the package name,
+
.Cm o
+
for the package origin, and
+
.Cm v
+
for the package version.
+
.It Cm \&%C
+
Expands to the list of categories the matched package belongs to.
+
.It Cm \&%F Ns Op ps
+
Expands to the list of files of the matched package, where
+
.Cm p
+
stands for path, and
+
.Cm s
+
for sum.
+
.It Cm \&%D
+
Expands to the list of directories of the matched package.
+
.It Cm \&%O Ns Op kvdD
+
Expands to the list of options of the matched package, where
+
.Cm k
+
stands for option key,
+
.Cm v
+
for option value,
+
.Cm d
+
for option default value and
+
.Cm D
+
for option description.
+
Option default values and descriptions are optional metadata and may
+
beblank for certain packages.
+
.It Cm \&%L
+
Expands to the list of license(s) for the matched package.
+
.It Cm \&%U
+
Expands to the list of users needed by the matched package.
+
.It Cm \&%G
+
Expands to the list of groups needed by the matched package.
+
.It Cm \&%B
+
Expands to the list of shared libraries used by programs from the matched package.
+
.It Cm \&%b
+
Expands to the list of shared libraries provided by the matched package.
+
.It Cm \&%A Ns Op tv
+
Expands to the list of annotations for the matched package,
+
where
+
.Cm t
+
stands for the annotation tag, and
+
.Cm v
+
stands for the annotation value.
+
.El
+
.Sh EVALUATION FORMAT
+
Packages can be selected by using expressions comparing
+
.Ar Variables
+
(see below) to string or integer values. The mode of comparison is specified
+
by the
+
.Ar Operator
+
(also listed below).
+
Expressions can be combined using && (for and) and || (for or).
+
Parentheses can be used for grouping in the usual manner.
+
.Pp
+
String values are either any text not containing whitespace (possibly
+
followed by but not including whitespace) or any text enclosed in single or
+
double quotes.
+
.Ss Variables
+
.Bl -tag -width F1
+
.It Cm \&%n
+
Name of the package (type string)
+
.It Cm \&%o
+
Origin of the package (type string)
+
.It Cm \&%p
+
Prefix of the package (type string)
+
.It Cm \&%m
+
Maintainer of the package (type string)
+
.It Cm \&%c
+
Comment of the package (type string)
+
.It Cm \&%e
+
Description of the package (type string)
+
.It Cm \&%w
+
WWW address of the package (type string)
+
.It Cm \&%s
+
Flatsize of the package (type integer)
+
.It Cm \&%a
+
Automatic status of the package (type integer)
+
.It Cm \&%q
+
Architecture of the package (type string)
+
.It Cm \&%k
+
Locking status of the package (type integer)
+
.It Cm \&%M
+
Message of the package (type string)
+
.It Cm \&%t
+
Timestamp that the package was installed (type integer)
+
.It Cm \&%i
+
Additionnal information about the package (type string)
+
.It Cm \&%# Ns Op drCFODLUGBbA
+
Number of elements in the list of information (type integer).
+
See
+
.Cm %?
+
above for what information is used.
+
.El
+
.Ss Operators
+
.Bl -tag -width F1
+
.It Cm ~
+
String glob pattern matching
+
.It Cm > Ns Op =
+
Integer comparison
+
.It Cm < Ns Op =
+
Integer comparison
+
.It Cm = Ns Op =
+
Integer or string equality comparison
+
.It Cm !=
+
Integer or string inequality comparison
+
.El
+
.Sh ENVIRONMENT
+
The following environment variables affect the execution of
+
.Nm .
+
See
+
.Xr pkg.conf 5
+
for further description.
+
.Bl -tag -width ".Ev NO_DESCRIPTIONS"
+
.It Ev PKG_DBDIR
+
.El
+
.Sh FILES
+
See
+
.Xr pkg.conf 5 .
+
.Sh EXIT STATUS
+
.Ex -std
+
.Sh EXAMPLES
+
List all installed packages by name-version:
+
.Dl $ pkg query %n-%v
+
.Pp
+
List all dependencies for a package by origin:
+
.Dl $ pkg query %do subversion
+
.Pp
+
List all dependencies by package name-version:
+
.Dl $ pkg query %dn-%dv subversion
+
.Pp
+
List all reverse dependencies for a package:
+
.Dl $ pkg query %ro perl
+
.Pp
+
List all files and their known checksums for a package:
+
.Dl $ pkg query '%Fp %Fs' perl
+
.Pp
+
List all files for all packages:
+
.Dl $ pkg query '%o: %Fp'
+
.Pp
+
List all packages with no reverse dependencies:
+
.Dl $ pkg query -e '%#r = 0' %o
+
.Pp
+
List non-automatic packages:
+
.Dl $ pkg query -e '%a = 0' %o
+
.Pp
+
List automatic packages:
+
.Dl $ pkg query -e '%a = 1' %o
+
.Sh SEE ALSO
+
.Xr pkg_printf 3 ,
+
.Xr pkg_repos 3 ,
+
.Xr pkg-repository 5 ,
+
.Xr pkg.conf 5 ,
+
.Xr pkg 8 ,
+
.Xr pkg-add 8 ,
+
.Xr pkg-annotate 8 ,
+
.Xr pkg-audit 8 ,
+
.Xr pkg-autoremove 8 ,
+
.Xr pkg-backup 8 ,
+
.Xr pkg-check 8 ,
+
.Xr pkg-clean 8 ,
+
.Xr pkg-config 8 ,
+
.Xr pkg-convert 8 ,
+
.Xr pkg-create 8 ,
+
.Xr pkg-delete 8 ,
+
.Xr pkg-fetch 8 ,
+
.Xr pkg-info 8 ,
+
.Xr pkg-install 8 ,
+
.Xr pkg-lock 8 ,
+
.Xr pkg-register 8 ,
+
.Xr pkg-repo 8 ,
+
.Xr pkg-rquery 8 ,
+
.Xr pkg-search 8 ,
+
.Xr pkg-set 8 ,
+
.Xr pkg-shell 8 ,
+
.Xr pkg-shlib 8 ,
+
.Xr pkg-ssh 8 ,
+
.Xr pkg-stats 8 ,
+
.Xr pkg-update 8 ,
+
.Xr pkg-updating 8 ,
+
.Xr pkg-upgrade 8 ,
+
.Xr pkg-version 8 ,
+
.Xr pkg-which 8
added docs/pkg-register.8
@@ -0,0 +1,192 @@
+
.\"
+
.\" FreeBSD pkg - a next generation package for the installation and maintenance
+
.\" of non-core utilities.
+
.\"
+
.\" Redistribution and use in source and binary forms, with or without
+
.\" modification, are permitted provided that the following conditions
+
.\" are met:
+
.\" 1. Redistributions of source code must retain the above copyright
+
.\"    notice, this list of conditions and the following disclaimer.
+
.\" 2. Redistributions in binary form must reproduce the above copyright
+
.\"    notice, this list of conditions and the following disclaimer in the
+
.\"    documentation and/or other materials provided with the distribution.
+
.\"
+
.\"
+
.\"     @(#)pkg.8
+
.\" $FreeBSD$
+
.\"
+
.Dd April 14, 2013
+
.Dt PKG-REGISTER 8
+
.Os
+
.Sh NAME
+
.Nm "pkg register"
+
.Nd registers a package into the local package database
+
.Sh SYNOPSIS
+
.Nm
+
.Op Fl dlOt
+
.Op Fl f Ar plist-file
+
.Fl m Ar metadatadir
+
.Fl i Ar input-path
+
.Nm
+
.Op Fl dlOt
+
.Fl M Ar metadatafile
+
.Sh DESCRIPTION
+
.Nm
+
is used for registering a package into the local package database.
+
.Pp
+
.Nm
+
assembles a full set of package meta-data from various possible inputs,
+
and writes the meta-data into the package registry database.
+
This is one of the final steps when installing software from ports:
+
the package files are installed into the filesystem, and then
+
.Nm
+
is called to record what was installed into the package database.
+
.Pp
+
.Nm
+
can derive package meta-data from a number of different sources:
+
.Bl -bullet
+
.It
+
The package manifest
+
.It
+
The metadata directory
+
.It
+
Direct analysis of files installed by the package
+
.El
+
.Pp
+
The package manifest is a
+
.Cm YAML
+
format listing of package meta-data.
+
It can contain all of the necessary meta-data needed by the package,
+
but the more usual approach is to provide selected items via the
+
manifest, and fill in the rest, either from legacy files such as
+
.Fa pkg-plist ,
+
.Fa +DESC,
+
.Fa +DISPLAY,
+
.Fa +MESSAGE
+
or
+
.Fa +MTREE_DIRS
+
which are optional and mostly located in the
+
.Ar metadatadir
+
given as the argument to the
+
.Fl m
+
option.
+
.Pp
+
Other information about shared library requirements and the packages
+
necessary to provide them may be obtained by direct analysis of the
+
files installed by the package.
+
This is the mechanism currently used when installing software directly
+
from the ports tree, as it provides reasonable backwards compatibility
+
with the old style
+
.Xr pkg_add 1
+
command.
+
.Pp
+
Reading in a complete and comprehensive manifest from one file is a
+
simpler alternative, but requires all the meta-data to have been
+
assembled beforehand.
+
.Pp
+
Direct analysis of the installed files can be suppressed by use of
+
the
+
.Fl t
+
option.
+
This is intended for testing the functionality of
+
.Xr pkg 8
+
itself, and should not be routinely used.
+
.Sh OPTIONS
+
The following options are supported by
+
.Nm :
+
.Bl -tag -width F1
+
.It Fl d
+
Mark the package to be automatically removed if no other packages
+
depend on it.
+
For more information please refer to
+
.Xr pkg-autoremove 8
+
.It Fl f Ar plist-file
+
Specifies a
+
.Fa pkg-plist
+
style packing list file
+
.It Fl i Ar input-path
+
Specifies the package input path or staging directory.
+
.It Fl l
+
Tells
+
.Nm
+
to generate an old-style package registry entry in a sub-directory of
+
.Sy $PKG_DBDIR
+
rather than updating the
+
.Fa local.sqlite
+
database.
+
.It Fl M Ar manifest
+
Specifies the package manifest file.
+
Use of this option means that the only file which will be used as a
+
source of package meta-data is the named
+
.Ar manifest
+
file.
+
The
+
.Fl M
+
option is mutually exclusive with
+
.Fl m .
+
.It Fl m Ar metadatadir
+
Specifies the meta data directory to use when registering the package.
+
This directory will hold the package manifest, and optionally may contain
+
a number of other old-style metadata input files.
+
The
+
.Fl m
+
option is mutually exclusive with
+
.Fl M .
+
.It Fl t
+
Enable testing mode.
+
This allows
+
.Nm
+
to update the package database without performing any of the usual
+
analyses of files installed by the package.
+
This option should only be used with caution, and preferably only
+
for the intended purpose of performing regression tests on
+
.Xr pkg 8
+
itself.
+
.El
+
.Sh ENVIRONMENT
+
The following environment variables affect the execution of
+
.Nm .
+
See
+
.Xr pkg.conf 5
+
for further description.
+
.Bl -tag -width ".Ev NO_DESCRIPTIONS"
+
.It Ev PKG_DBDIR
+
.El
+
.Sh FILES
+
See
+
.Xr pkg.conf 5 .
+
.Sh SEE ALSO
+
.Xr pkg_printf 3 ,
+
.Xr pkg_repos 3 ,
+
.Xr pkg-repository 5 ,
+
.Xr pkg.conf 5 ,
+
.Xr pkg 8 ,
+
.Xr pkg-add 8 ,
+
.Xr pkg-annotate 8 ,
+
.Xr pkg-audit 8 ,
+
.Xr pkg-autoremove 8 ,
+
.Xr pkg-backup 8 ,
+
.Xr pkg-check 8 ,
+
.Xr pkg-clean 8 ,
+
.Xr pkg-config 8 ,
+
.Xr pkg-convert 8 ,
+
.Xr pkg-create 8 ,
+
.Xr pkg-delete 8 ,
+
.Xr pkg-fetch 8 ,
+
.Xr pkg-info 8 ,
+
.Xr pkg-install 8 ,
+
.Xr pkg-lock 8 ,
+
.Xr pkg-query 8 ,
+
.Xr pkg-repo 8 ,
+
.Xr pkg-rquery 8 ,
+
.Xr pkg-search 8 ,
+
.Xr pkg-set 8 ,
+
.Xr pkg-shell 8 ,
+
.Xr pkg-shlib 8 ,
+
.Xr pkg-ssh 8 ,
+
.Xr pkg-stats 8 ,
+
.Xr pkg-update 8 ,
+
.Xr pkg-updating 8 ,
+
.Xr pkg-upgrade 8 ,
+
.Xr pkg-version 8 ,
+
.Xr pkg-which 8
added docs/pkg-repo.8
@@ -0,0 +1,225 @@
+
.\"
+
.\" FreeBSD pkg - a next generation package for the installation and maintenance
+
.\" of non-core utilities.
+
.\"
+
.\" Redistribution and use in source and binary forms, with or without
+
.\" modification, are permitted provided that the following conditions
+
.\" are met:
+
.\" 1. Redistributions of source code must retain the above copyright
+
.\"    notice, this list of conditions and the following disclaimer.
+
.\" 2. Redistributions in binary form must reproduce the above copyright
+
.\"    notice, this list of conditions and the following disclaimer in the
+
.\"    documentation and/or other materials provided with the distribution.
+
.\"
+
.\"
+
.\"     @(#)pkg.8
+
.\" $FreeBSD$
+
.\"
+
.Dd November 12, 2013
+
.Dt PKG-REPO 8
+
.Os
+
.Sh NAME
+
.Nm "pkg repo"
+
.Nd creates a package repository catalogue
+
.Sh SYNOPSIS
+
.Nm
+
.Op Fl lq
+
.Op Fl o Ar output-dir
+
.Ao Ar repo-path Ac Op Ao Ar rsa-key Ac | signing_command: Ao Ar the command Ac
+
.Sh DESCRIPTION
+
.Nm
+
is used for creating a catalogue of the available
+
packages in a repository.
+
.Nm
+
catalogues are necessary for sharing your package repository with
+
other people.
+
.Pp
+
When
+
.Nm
+
is invoked it creates a package repository catalogue (repo.sqlite),
+
with an optional cryptographic signature, as a compressed tarball
+
(repo.txz).
+
Repository users download and cache this on their local machines,
+
for fast lookup of available packages by programs such as
+
.Xr pkg-install 8 .
+
.Pp
+
To create a package repository catalogue you must specify the
+
top-level directory where all the packages are stored as
+
.Ar repo-path .
+
.Nm
+
will search the filesystem beneath
+
.Ar repo-path
+
to find all the packages it contains.
+
Symbolic links are ignored, and only the most recent package for each
+
origin is included in the catalogue.
+
.Pp
+
The repository will be created in the package directory unless the
+
.Fl o Ar output-dir
+
is specified, in which case it will be created there.
+
.Pp
+
Optionally you may sign the repository catalogue by specifying the
+
path to an RSA private key as the
+
.Ar rsa-key
+
argument or an external command.
+
.Pp
+
If
+
.Ar rsa-key
+
is used, the SHA256 of the repository is signed using the provided key.
+
The signature is added into the repository catalogue.
+
The client side should use
+
.Sy SIGNATURE_TYPE
+
set to
+
.Dv PUBKEY
+
and
+
.Sy PUBKEY
+
set to a local path of the public key in its
+
.Pa pkg.conf .
+
.Pp
+
An external command can be useful to create a signing server to keep the
+
private key separate from the repository.
+
The external command is passed the SHA256 of the repository
+
catalogue on its stdin.
+
It should output the following format:
+
.Bd -literal -offset indent
+
SIGNATURE
+
signature data here
+
CERT
+
public key data here
+
END
+
.Ed
+
.Pp
+
When using an external command, the client's
+
.Pa pkg.conf
+
must have
+
.Sy SIGNATURE_TYPE
+
set to
+
.Dv FINGERPRINTS
+
and
+
.Sy FINGERPRINTS
+
set to a directory having a
+
.Pa trusted/myrepo
+
containing a fingerprint style representation of the public key:
+
.Bd -literal -offset indent
+
function: sha256
+
fingerprint: sha256_representation_of_the_public_key
+
.Ed
+
.Pp
+
See the
+
.Sx EXAMPLES
+
section and
+
.Xr pkg.conf 5
+
for more information.
+
.Pp
+
Signing the catalogue is strongly recommended.
+
.Sh OPTIONS
+
The following options are supported by
+
.Nm :
+
.Bl -tag -width F1
+
.It Fl q
+
Force quiet output
+
.It Fl l
+
Generate list of all files in repo as filesite.txz archive.
+
.It Fl o Ar output-dir
+
Create the repository in the specified directory instead of the package directory.
+
.El
+
.Sh ENVIRONMENT
+
The following environment variables affect the execution of
+
.Nm .
+
See
+
.Xr pkg.conf 5
+
for further description.
+
.Bl -tag -width ".Ev NO_DESCRIPTIONS"
+
.It Ev PUBKEY
+
.El
+
.Sh FILES
+
See
+
.Xr pkg.conf 5 .
+
.Sh SEE ALSO
+
.Xr pkg_printf 3 ,
+
.Xr pkg_repos 3 ,
+
.Xr pkg-repository 5 ,
+
.Xr pkg.conf 5 ,
+
.Xr pkg 8 ,
+
.Xr pkg-add 8 ,
+
.Xr pkg-annotate 8 ,
+
.Xr pkg-audit 8 ,
+
.Xr pkg-autoremove 8 ,
+
.Xr pkg-backup 8 ,
+
.Xr pkg-check 8 ,
+
.Xr pkg-clean 8 ,
+
.Xr pkg-config 8 ,
+
.Xr pkg-convert 8 ,
+
.Xr pkg-create 8 ,
+
.Xr pkg-delete 8 ,
+
.Xr pkg-fetch 8 ,
+
.Xr pkg-info 8 ,
+
.Xr pkg-install 8 ,
+
.Xr pkg-lock 8 ,
+
.Xr pkg-query 8 ,
+
.Xr pkg-register 8 ,
+
.Xr pkg-rquery 8 ,
+
.Xr pkg-search 8 ,
+
.Xr pkg-set 8 ,
+
.Xr pkg-shell 8 ,
+
.Xr pkg-shlib 8 ,
+
.Xr pkg-ssh 8 ,
+
.Xr pkg-stats 8 ,
+
.Xr pkg-update 8 ,
+
.Xr pkg-updating 8 ,
+
.Xr pkg-upgrade 8 ,
+
.Xr pkg-version 8 ,
+
.Xr pkg-which 8
+
.Sh EXAMPLES
+
Create an RSA key pair:
+
.Bd -literal -offset indent
+
% openssl genrsa -out repo.key 2048
+
% chmod 0400 repo.key
+
% openssl rsa -in repo.key -out repo.pub -pubout
+
.Ed
+
.Pp
+
Create a repository and sign it with a local RSA key.
+
The public key would be shared on all client servers with
+
.Sy SIGNATURE_TYPE
+
set to
+
.Dv PUBKEY
+
and its path set via
+
.Sy PUBKEY
+
setting in the
+
.Xr pkg.conf 5 :
+
.Pp
+
.Dl pkg repo /usr/ports/packages repo.key
+
.Pp
+
Create a repository and sign it with an external command.
+
The client should set, via
+
.Xr pkg.conf 5 ,
+
.Sy SIGNATURE_TYPE
+
to
+
.Dv FINGERPRINTS
+
and
+
.Sy FINGERPRINTS
+
to a path containing a file with the SHA256 of the public key:
+
.Bd -literal -offset indent
+
# On signing server:
+
% cat > sign.sh << EOF
+
#!/bin/sh
+
read -t 2 sum
+
[ -z "$sum" ] && exit 1
+
echo SIGNATURE
+
echo -n $sum | /usr/bin/openssl dgst -sign repo.key -sha256 -binary
+
echo
+
echo CERT
+
cat repo.pub
+
echo END
+
EOF
+

+
# On package server:
+
% pkg repo /usr/ports/packages signing_command: ssh signing-server sign.sh
+
# Generate fingerprint for sharing with clients
+
% sh -c '( echo "function: sha256"; echo "fingerprint: $(sha256 -q repo.pub)"; ) > fingerprint'
+
# The 'fingerprint' file should be distributed to all clients.
+

+
# On clients with FINGERPRINTS: /usr/local/etc/pkg/fingerprints/myrepo:
+
$ mkdir -p /usr/local/etc/pkg/fingerprints/myrepo/trusted
+
# Add 'fingerprint' into /usr/local/etc/pkg/fingerprints/myrepo/trusted
+

+
.Ed
added docs/pkg-repository.5
@@ -0,0 +1,307 @@
+
.\"
+
.\" FreeBSD pkg - a next generation package for the installation and
+
.\" maintenance of non-core utilities.
+
.\"
+
.\" Redistribution and use in source and binary forms, with or without
+
.\" modification, are permitted provided that the following conditions
+
.\" are met:
+
.\" 1. Redistributions of source code must retain the above copyright
+
.\"    notice, this list of conditions and the following disclaimer.
+
.\" 2. Redistributions in binary form must reproduce the above copyright
+
.\"    notice, this list of conditions and the following disclaimer in the
+
.\"    documentation and/or other materials provided with the distribution.
+
.\"
+
.\"
+
.\"     @(#)pkg-repository.5
+
.\" $FreeBSD$
+
.\"
+
.Dd September 30, 2013
+
.Dt PKG-REPOSITORY 5
+
.Os
+
.Sh NAME
+
.Nm "package repository"
+
.Nd format and operation of package repositories used by
+
.Xr pkg 8 .
+
.Sh DESCRIPTION
+
.Nm "Package repositories"
+
used by the
+
.Xr pkg 8
+
program consist of one or more collections of
+
.Dq package tarballs
+
together with package catalogues and optionally various other
+
collected package metadata.
+
.Pp
+
Each collection consists of packages suitable for installation on a
+
specific system
+
.Sy ABI :
+
a combination of operating system, CPU architecture, OS version, word
+
size, and for certain processors endianness or similar attributes.
+
.Pp
+
The package collections are typically made available to users for
+
download via a web or FTP server although various other means of access
+
may be employed.
+
Encoding the
+
.Sy ABI
+
value into the repository URL allows
+
.Nm pkg
+
to automatically select the correct package collection by expanding the
+
special token
+
.Cm ${ABI}
+
in
+
.Pa pkg.conf .
+
.Pp
+
Repositories may be mirrored over several sites:
+
.Nm pkg
+
has built-in support for discovering available mirrors dynamically
+
given a common URL by several mechanisms.
+
.Sh FILESYSTEM ORGANIZATION
+
Only very minimal constraints on repository layout are prescribed by
+
.Nm pkg .
+
The following constraints are all that must be met:
+
.Bl -bullet
+
.It
+
A repository may contain several package collections with parallel
+
.Cm REPOSITORY_ROOTs
+
in order to support diverse system
+
.Cm ABIs .
+
.It
+
All of the content for one
+
.Sy ABI
+
should be accessible in a filesystem or URL hierarchy beneath the
+
.Cm REPOSITORY_ROOT .
+
.It
+
All packages available beneath one
+
.Cm REPOSITORY_ROOT
+
should be binary compatible with a specific system
+
.Cm ABI .
+
.It
+
The repository catalogue is located at the apex of the
+
repository, at a specific location relative to the
+
.Cm REPOSITORY_ROOT .
+
.El
+
.Pp
+
Package catalogues contain the paths relative to the
+
.Cm REPOSITORY_ROOT
+
for each package, allowing the full URL for downloading the
+
package to be constructed.
+
.Pp
+
Where a package may be applicable to more than one
+
.Sy ABI
+
(e.g., it contains only text files) symbolic or hard links, URL mappings
+
or other techniques may be utilised to avoid duplication of storage.
+
.Pp
+
Although no specific filesystem organization is required, the usual
+
convention (inherited from
+
.Xr pkg-install 8 )
+
is to create a filesystem hierarchy thus:
+
.Bl -tag -width "REPOSITORY"
+
.It Pa $REPOSITORY_ROOT/All
+
One directory that contains every package available from the
+
repository for that
+
.Sy ABI .
+
Packages are stored as package tarballs identified by name and
+
version.
+
This directory may contain several different versions of each package
+
accumulated over time, but the repository catalogue will only record
+
the latest version for each distinct package origin.
+
.It Pa $REPOSITORY_ROOT/Latest/
+
May contains symbolic links to the latest versions of packages in the
+
.Pa All
+
directory.
+
Symbolic links contain a
+
.Sq latest link
+
style name only, without version.
+
As the whole
+
.Sq latest link
+
concept is rendered obsolete by
+
.Nm pkg ,
+
this will usually contain only the
+
.Pa pkg.txz
+
link, used for bootstrapping
+
.Nm pkg
+
itself on a new system.
+
.It Pa $REPOSITORY_ROOT/digests.txz
+
Package checksum data and optionally package signatures.
+
.It Pa $REPOSITORY_ROOT/packagesite.txz
+
Contains one
+
.Cm YAML
+
document, which is the concatenation of the
+
.Pa +MANIFEST
+
files from each of the packages in the repository.
+
This is used by
+
.Nm pkg-1.1
+
or later.
+
.It Pa $REPOSITORY_ROOT/repo.txz
+
(Deprecated).
+
Contains the package manifest data as above, but pre-loaded into
+
an Sqlite database.
+
This is supplied for backwards compatibility with
+
.Nm pkg-1.0 .
+
.It Pa $REPOSITORY_ROOT/filesite.txz
+
(Optional).
+
Contains a YAML document listing all of the files contained in all
+
of the packages within the repository.
+
.Pp
+
The repository may optionally contain sub-directories corresponding to
+
the package origins within the
+
.Os
+
ports tree.
+
.El
+
.Pp
+
Each of the packages listed in the repository catalogue must have a
+
unique
+
.Cm origin .
+
There are no other constraints: package sets are not required to be
+
either complete (i.e., with all dependencies satisfied) or
+
self-consistent within a single repository.
+
.Sh REPOSITORY ACCESS METHODS
+
.Nm pkg
+
uses standard network protocols for repository access.
+
Any URL scheme understood by the
+
.Xr fetch 3
+
library may be used
+
.Cm ( HTTP ,
+
.Cm HTTPS ,
+
.Cm FTP
+
or
+
.Cm FILE )
+
as well as remote access over
+
.Cm SSH .
+
See
+
.Xr fetch 3
+
for a description of additional environment variables, including
+
.Ev FETCH_BIND_ADDRESS ,
+
.Ev FTP_LOGIN ,
+
.Ev FTP_PASSIVE_MODE ,
+
.Ev FTP_PASSWORD ,
+
.Ev FTP_PROXY ,
+
.Ev ftp_proxy ,
+
.Ev HTTP_AUTH ,
+
.Ev HTTP_PROXY ,
+
.Ev http_proxy ,
+
.Ev HTTP_PROXY_AUTH ,
+
.Ev HTTP_REFERER ,
+
.Ev HTTP_USER_AGENT ,
+
.Ev NETRC ,
+
.Ev NO_PROXY No and
+
.Ev no_proxy .
+
.Sh REPOSITORY MIRRORING
+
Multiple copies of a repository can be provided for resilience or
+
to scale up site capacity.
+
Two schemes are provided to auto-discover sets of mirrors given a
+
single repository URL.
+
.Bl -tag -width "HTTP"
+
.It Cm HTTP
+
The repository URL should download a text document containing a sequence
+
of lines beginning with
+
.Sq URL:
+
followed by any amount of while space and one URL for a repository
+
mirror.
+
Any lines not matching this pattern are ignored.
+
Mirrors are tried in the order listed until a download succeeds.
+
.It Cm SRV
+
For an SRV mirrored repository where the URL is specified as
+
.Pa http://pkgrepo.example.org/
+
.Cm SRV
+
records should be set up in the DNS:
+
.Bd -literal -offset indent
+
$ORIGIN example.com
+
_http._tcp.pkgrepo IN SRV 10 1 80 mirror0
+
                   IN SRV 20 1 80 mirror1
+
.Ed
+
.Pp
+
where the
+
.Cm SRV
+
priority and weight parameters are used to control search order and
+
traffic weighting between sites, and the port number and hostname are
+
used to construct the individual mirror URLs.
+
.El
+
.Pp
+
Mirrored repositories are assumed to have identical content, and only
+
one copy of the repository catalogue will be downloaded to apply to
+
all mirror sites.
+
.Sh WORKING WITH MULTIPLE REPOSITORIES
+
Where several different repositories are configured
+
.Nm pkg
+
will search amongst them all in the order specified,
+
unless directed to use a single repository by the
+
.Fl r
+
flag to
+
.Xr pkg-fetch 8 ,
+
.Xr pkg-install 8 ,
+
.Xr pkg-upgrade 8 ,
+
.Xr pkg-search 8
+
or
+
.Xr pkg-rquery 8 .
+
The search order is as displayed in the output of
+
.Bd -literal -offset indent
+
pkg -v -v
+
.Ed
+
.Pp
+
Where several different versions of the same package are available,
+
.Nm pkg
+
will select the one with the highest version to install or to upgrade
+
an installed package to, even if a lower numbered version can be found
+
in a repository earlier in the list.
+
This applies even if an explicit version is stated on the command line.
+
Thus if packages
+
.Pa example-1.0.0
+
and
+
.Pa example-1.0.1
+
are available in configured repositories, then
+
.Bd -literal -offset indent
+
pkg install example-1.0.0
+
.Ed
+
.Pp
+
will actually result in
+
.Pa example-1.0.1
+
being installed.
+
To override this behaviour, on first installation of the package,
+
select the repository with the appropriate version:
+
.Bd -literal -offset indent
+
pkg install -r repo-a example-1.0.0
+
.Ed
+
.Pp
+
and then to make updates to that package
+
.Dq sticky
+
to the same repository, add an annotation to the package:
+
.Bd -literal -offset indent
+
pkg annotate -A example repository repo-a
+
.Ed
+
.Pp
+
.Sh SEE ALSO
+
.Xr fetch 3 ,
+
.Xr pkg_printf 3 ,
+
.Xr pkg_repos 3 ,
+
.Xr pkg.conf 5 ,
+
.Xr pkg 8 ,
+
.Xr pkg-add 8 ,
+
.Xr pkg-annotate 8 ,
+
.Xr pkg-audit 8 ,
+
.Xr pkg-autoremove 8 ,
+
.Xr pkg-backup 8 ,
+
.Xr pkg-check 8 ,
+
.Xr pkg-clean 8 ,
+
.Xr pkg-config 8 ,
+
.Xr pkg-convert 8 ,
+
.Xr pkg-create 8 ,
+
.Xr pkg-delete 8 ,
+
.Xr pkg-fetch 8 ,
+
.Xr pkg-info 8 ,
+
.Xr pkg-install 8 ,
+
.Xr pkg-lock 8 ,
+
.Xr pkg-query 8 ,
+
.Xr pkg-register 8 ,
+
.Xr pkg-repo 8 ,
+
.Xr pkg-rquery 8 ,
+
.Xr pkg-search 8 ,
+
.Xr pkg-set 8 ,
+
.Xr pkg-shell 8 ,
+
.Xr pkg-shlib 8 ,
+
.Xr pkg-ssh 8 ,
+
.Xr pkg-stats 8 ,
+
.Xr pkg-update 8 ,
+
.Xr pkg-updating 8 ,
+
.Xr pkg-upgrade 8 ,
+
.Xr pkg-version 8 ,
+
.Xr pkg-which 8
added docs/pkg-rquery.8
@@ -0,0 +1,298 @@
+
.\"
+
.\" FreeBSD pkg - a next generation package for the installation and maintenance
+
.\" of non-core utilities.
+
.\"
+
.\" Redistribution and use in source and binary forms, with or without
+
.\" modification, are permitted provided that the following conditions
+
.\" are met:
+
.\" 1. Redistributions of source code must retain the above copyright
+
.\"    notice, this list of conditions and the following disclaimer.
+
.\" 2. Redistributions in binary form must reproduce the above copyright
+
.\"    notice, this list of conditions and the following disclaimer in the
+
.\"    documentation and/or other materials provided with the distribution.
+
.\"
+
.\"
+
.\"     @(#)pkg.8
+
.\" $FreeBSD$
+
.\"
+
.Dd February 1, 2014
+
.Dt PKG-RQUERY 8
+
.Os
+
.Sh NAME
+
.Nm "pkg rquery"
+
.Nd query information from remote repositories
+
.Sh SYNOPSIS
+
.Nm
+
.Ao query-format Ac Ao pkg-name Ac
+
.Nm
+
.Op Fl aU
+
.Op Fl r Ar reponame
+
.Ao query-format Ac
+
.Nm
+
.Op Fl U
+
.Fl e Ao evaluation-condition Ac
+
.Op Fl r Ar reponame
+
.Ao query-format Ac
+
.Nm
+
.Op Fl giUx
+
.Op Fl r Ar reponame
+
.Ao query-format Ac Ao pattern Ac Ao ... Ac
+
.Sh DESCRIPTION
+
.Nm
+
is used for displaying information about remote packages.
+
.Pp
+
Package repository catalogues will be automatically updated whenever
+
.Xr pkg-update 8
+
is run, unless disabled by the
+
.Fl U
+
flag.
+
.Sh OPTIONS
+
The following options are supported by
+
.Nm :
+
.Bl -tag -width F1
+
.It Fl a
+
Match all packages from the database
+
.It Fl e
+
Match packages using the given
+
.Ar evaluation-condition.
+
See EVALUATION FORMAT for details.
+
.It Fl r Ar reponame
+
Fetches packages from the given
+
.Ar reponame
+
if multiple repo support is enabled.
+
See
+
.Xr pkg.conf 5 .
+
.It Fl g
+
Treat
+
.Ao pattern Ac
+
as a glob pattern.
+
.It Fl i
+
Make the standard or regular expression
+
.Fl ( x )
+
matching against
+
.Ar pkg-name
+
case insensitive.
+
.It Fl U
+
Skip updating the repository catalogues with
+
.Xr pkg-update 8 .
+
Use the locally cached copies only.
+
.It Fl x
+
Treat
+
.Ao pattern Ac
+
as a regular expression according to the "modern" or "extended" syntax
+
of
+
.Xr re_format 7 .
+
.El
+
.Sh QUERY FORMAT
+
There are two type of keyword for the query format: the multiline and the normal
+
one. Only one type of multiline pattern is accepted for a given query.
+
.Ss Normal patterns:
+
.Bl -tag -width F1
+
.It Cm \&%R
+
Name of the repository package is in
+
.It Cm \&%n
+
Name of the matched package
+
.It Cm \&%v
+
Version of the matched package
+
.It Cm \&%o
+
Origin of the matched package
+
.It Cm \&%p
+
Prefix of the matched package
+
.It Cm \&%m
+
Maintainer of the matched package
+
.It Cm \&%c
+
Comment of the matched package
+
.It Cm \&%e
+
Description of the matched package
+
.It Cm \&%w
+
Home page of the matched package
+
.It Cm \&%q
+
Architecture of the matched package
+
.It Cm \&%l
+
license logic of the matched package - nothing for single, & for AND, and | for OR
+
.It Cm \&%s Ns Op bh
+
The flat size of the matched package, where
+
.Cm b
+
is in bytes, and
+
.Cm h
+
is in human readable format.
+
.It Cm \&%M
+
message contained in the matched package
+
.It Cm \&%? Ns Op drCOLBbA
+
Returns 0 if the list is empty and 1 if the list has information to display
+
.Bl -tag -width indent
+
.It Cm d
+
for dependencies
+
.It Cm r
+
for reverse dependencies
+
.It Cm C
+
for categories
+
.It Cm O
+
for options
+
.It Cm L
+
for licenses
+
.It Cm B
+
for required shared libraries
+
.It Cm b
+
for provided shared libraries
+
.It Cm A
+
for annotations
+
.It Cm \&%# Ns Op drCOLBbA
+
Returns the number of elements in the list
+
.Bl -tag -width indent
+
.It Cm d
+
for dependencies
+
.It Cm r
+
for reverse dependencies
+
.It Cm C
+
for categories
+
.It Cm O
+
for options
+
.It Cm L
+
for licenses
+
.It Cm B
+
for required shared libraries
+
.It Cm b
+
for provided shared libraries
+
.It Cm A
+
for annotations
+
.El
+
.El
+
.El
+
.Ss Multiline patterns:
+
.Bl -tag -width F1
+
.It Cm \&%d Ns Op nov
+
Expands to the list of dependencies for the matched package, where
+
.Cm n
+
stands for the package name,
+
.Cm o
+
for the package origin, and
+
.Cm v
+
for the package version.
+
.It Cm \&%r Ns Op nov
+
Expands to the list of reverse dependencies for the matched package, where
+
.Cm n
+
stands for the package name,
+
.Cm o
+
for the package origin, and
+
.Cm v
+
for the package version.
+
.It Cm \&%C
+
Expands to the list of categories the matched package belongs to.
+
.It Cm \&%O Ns Op kvdD
+
Expands to the list of options of the matched package, where
+
.Cm k
+
stands for option key
+
.Cm v
+
for option value,
+
.Cm d
+
for option default value, and
+
.Cm D
+
for option description.
+
Option default values and descriptions are optional metadata and may
+
be blank for certain packages or repositories.
+
.It Cm \&%L
+
Expands to the list of license(s) for the matched package.
+
.It Cm \&%B
+
Expands to the list of shared libraries used by programs from the matched package.
+
.It Cm \&%b
+
Expands to the list of shared libraries provided by the matched package.
+
.It Cm \&%A Ns Op tv
+
Expands to the list of annotations associated with the matched
+
package, where
+
.Cm t
+
stands for the annotation tag, and
+
.Cm v
+
stands for the annotation value.
+
.El
+
.Sh EVALUATION FORMAT
+
.Ss Variables
+
.Bl -tag -width F1
+
.It Cm \&%n
+
Name of the package (type string)
+
.It Cm \&%o
+
Origin of the package (type string)
+
.It Cm \&%p
+
Prefix of the package (type string)
+
.It Cm \&%m
+
Maintainer of the package (type string)
+
.It Cm \&%c
+
Comment of the package (type string)
+
.It Cm \&%e
+
Description of the package (type string)
+
.It Cm \&%w
+
WWW address of the package (type string)
+
.It Cm \&%s
+
Flatsize of the package (type integer)
+
.It Cm \&%a
+
Automatic status of the package (type integer)
+
.It Cm \&%q
+
Architecture of the package (type string)
+
.It Cm \&%M
+
Message of the package (type string)
+
.It Cm \&%# Ns Op drCOLBbA
+
Number of elements in the list of information (type integer).
+
See
+
.Cm %?
+
above for what information is used.
+
.El
+
.Ss Operators
+
.Bl -tag -width F1
+
.It Cm ~
+
String glob pattern matching
+
.It Cm > Ns Op =
+
Integer comparison
+
.It Cm > Ns Op =
+
Integer comparison
+
.It Cm = Ns Op =
+
Integer or string comparison
+
.El
+
.Sh ENVIRONMENT
+
The following environment variables affect the execution of
+
.Nm .
+
See
+
.Xr pkg.conf 5
+
for further description.
+
.Bl -tag -width ".Ev NO_DESCRIPTIONS"
+
.It Ev PKG_DBDIR
+
.El
+
.Sh FILES
+
See
+
.Xr pkg.conf 5 .
+
.Sh EXIT STATUS
+
.Ex -std
+
.Sh SEE ALSO
+
.Xr pkg_printf 3 ,
+
.Xr pkg_repos 3 ,
+
.Xr pkg-repository 5 ,
+
.Xr pkg.conf 5 ,
+
.Xr pkg 8 ,
+
.Xr pkg-add 8 ,
+
.Xr pkg-annotate 8 ,
+
.Xr pkg-audit 8 ,
+
.Xr pkg-autoremove 8 ,
+
.Xr pkg-backup 8 ,
+
.Xr pkg-check 8 ,
+
.Xr pkg-clean 8 ,
+
.Xr pkg-config 8 ,
+
.Xr pkg-convert 8 ,
+
.Xr pkg-create 8 ,
+
.Xr pkg-delete 8 ,
+
.Xr pkg-fetch 8 ,
+
.Xr pkg-info 8 ,
+
.Xr pkg-install 8 ,
+
.Xr pkg-lock 8 ,
+
.Xr pkg-query 8 ,
+
.Xr pkg-register 8 ,
+
.Xr pkg-repo 8 ,
+
.Xr pkg-search 8 ,
+
.Xr pkg-set 8 ,
+
.Xr pkg-shell 8 ,
+
.Xr pkg-shlib 8 ,
+
.Xr pkg-ssh 8 ,
+
.Xr pkg-stats 8 ,
+
.Xr pkg-update 8 ,
+
.Xr pkg-updating 8 ,
+
.Xr pkg-upgrade 8 ,
+
.Xr pkg-version 8 ,
+
.Xr pkg-which 8
added docs/pkg-search.8
@@ -0,0 +1,452 @@
+
.\"
+
.\" Freebsd pkg - a next generation package for the installation and
+
.\" maintenance of non-core utilities.
+
.\"
+
.\" Redistribution and use in source and binary forms, with or without
+
.\" modification, are permitted provided that the following conditions
+
.\" are met:
+
.\" 1. Redistributions of source code must retain the above copyright
+
.\"    notice, this list of conditions and the following disclaimer.
+
.\" 2. Redistributions in binary form must reproduce the above copyright
+
.\"    notice, this list of conditions and the following disclaimer in the
+
.\"    documentation and/or other materials provided with the distribution.
+
.\"
+
.\"
+
.\"     @(#)pkg.8
+
.\" $FreeBSD$
+
.\"
+
.Dd November 29, 2013
+
.Dt PKG-SEARCH 8
+
.Os
+
.Sh NAME
+
.Nm "pkg search"
+
.Nd search package repository catalogues
+
.Sh SYNOPSIS
+
.Nm
+
.Op Fl egix
+
.Op Fl r Ar repo
+
.Op Fl S Ar search
+
.Op Fl L Ar label
+
.Op Fl Q Ar query-modifier
+
.Ar pattern
+
.Nm
+
.Op Fl cDdefgiopqRx
+
.Op Fl r Ar repo
+
.Ar pattern
+
.Sh DESCRIPTION
+
.Nm
+
is used for searching package repository catalogues.
+
Packages available for installation can be matched by name, by name
+
and version, by origin or by text in the package comments or package
+
descriptions.
+
The output defaults to displaying the field matched by the search
+
term, but any of the searchable fields may be displayed.
+
The output may be modified to additionally show many other package
+
data available from the repository catalogues.
+
.Pp
+
It is recommended to update the local copies of the repository
+
catalogues before running
+
.Nm .
+
See
+
.Xr pkg-update 8 .
+
Package repositories are defined in the
+
.Fa pkg.conf
+
file or by creating repository definitions in
+
.Pa /usr/local/etc/pkg/repos ;
+
see
+
.Xr pkg.conf 5
+
for details.
+
.Sh OPTIONS
+
The following options are supported by
+
.Nm :
+
.Bl -tag -width F1
+
.It Fl c
+
Search for packages with comment text matching
+
.Ar pattern .
+
Equivalent to
+
.Fl "S comment" .
+
.It Fl D
+
Search for packages with description text matching
+
.Ar pattern .
+
Equivalent to
+
.Fl "S description" .
+
.It Fl d
+
Display the list of packages depended on by each matched package.
+
Equivalent to
+
.Fl "Q depends-on" .
+
.It Fl e
+
.Ar pattern
+
should be an exact match against the search field.
+
.It Fl f
+
Show ``full'' information about the package.
+
Equivalent to
+
.Fl "Q full" .
+
.It Fl g
+
Treat
+
.Ar pattern
+
as a shell globbing expression.
+
The glob pattern must match the entire field being seached.
+
.It Fl i
+
Make the exact
+
.Fl ( e )
+
or regular expression
+
.Fl ( x )
+
matching against
+
.Ar pattern
+
case insensitive.
+
.It Fl L Ar label
+
Select which identifying label is printed for each matched package,
+
unless
+
.Fl q
+
is used.
+
Several different fields from the repository catalogue database may be
+
used to search on, or to generate the label, as indicated by the
+
.Ar label
+
argument.
+
See the
+
.Qq Sx Search and Label Options
+
section for details.
+
If unspecified,
+
.Ar label
+
is set to the same as the value searched via the
+
.Fl S Ar search
+
option.
+
.It Fl o
+
List packages by origin for each package matching
+
.Ar pattern .
+
Equivalent to
+
.Fl "L origin" .
+
.It Fl p
+
Display the package installation prefix for each matched package.
+
Equivalent to
+
.Fl "Q prefix" .
+
.It Fl q
+
Be ``quiet''.
+
Produce less output.
+
In particular do not show an identifying label field for each package.
+
.It Fl Q Ar query-modifier
+
Modify the query output by adding an additional field to the result.
+
Multiple fields can be added by using additional
+
.Fl Q Ar query-modifier
+
flags.
+
See the
+
.Qq Sx Output Modifier Options
+
section for details.
+
.It Fl r Ar repo
+
Select only the repository catalogue named as
+
.Sy repo
+
to search.
+
By default all configured repository catalogues are searched.
+
.It Fl R
+
Display the full manifest (raw) about the packages matching.
+
.It Fl S Ar search
+
Specify the field to search the repository catalogue on.
+
If unspecified, searches on
+
.Ar pkg-name
+
unless the search term contains a
+
.Sy /
+
character, when it searches on port
+
.Ar origin .
+
Output will be sorted in order of the
+
.Ar search
+
field.
+
See the
+
.Qq Sx Search and Label Options
+
sections for more details.
+
.It Fl s
+
Display the installed size of matched packages.
+
Equivalent to
+
.Fl "Q size" .
+
.It Fl x
+
Treat
+
.Ar pattern
+
as a regular expression according to the "modern" or "extended"
+
syntax of
+
.Xr re_format 7 .
+
This is the default.
+
Matches any substring of the search field unless explicit beginning
+
or ending anchor terms are used.
+
.El
+
.Ss Search and Label Options
+
The following database fields (or composites of several fields) can
+
be used both for searching for a match to the given
+
.Ar pattern
+
and as identifying labels for the block of output for each package.
+
.Bl -tag -width 2n
+
.It Sy comment
+
The one line comment field describing the port, derived from the
+
.Cm COMMENT
+
variable in the port's
+
.Fa Makefile .
+
When chosen as a label option, the output format will additionally
+
include the packge name, equivalent to
+
.Fl "L pkg-name"
+
.Fl "Q comment" .
+
When chosen as a search option, only the
+
.Sy comment
+
field is used for sorting the output.
+
.It Sy description
+
The multi-line package description from the
+
.Fa pkg-descr
+
file in the port.
+
This does include the
+
.Cm WWW
+
URL reference, if any, from that file.
+
When chosen as a label option, the output format will additionally
+
include the package name, equivalent to
+
.Fl "L pkg-name"
+
.Fl "Q description" .
+
When chosen as a search option, only the
+
.Sy description
+
field is used for sorting the output.
+
.It Sy name
+
The name of the package, derived from the
+
.Cm PORTNAME
+
variable in the port's
+
.Fa Makefile .
+
.It Sy origin
+
The port origin, in the format
+
.Fa category/port ,
+
that the package was compiled from.
+
.It Sy pkg-name
+
The package name in the format
+
.Sy name Ns - Ns Cm version .
+
The same as the
+
.Cm PKGNAME
+
variable in the port's
+
.Fa Makefile .
+
.El
+
.Pp
+
Any unambiguous prefix of the label name may be used on the command line.
+
Thus
+
.Fl "Sd" ,
+
.Fl "S descr"
+
and
+
.Fl "S description"
+
are all equivalent.
+
.Ss Output Modifier Options
+
Additional data from the repository catalogue to print for each matched
+
package.
+
Multiple output modifiers can be combined.
+
Where more than one output field is required, either because multiple
+
.Fl Q Ar query-modifier
+
options were given, or one or more
+
.Fl Q Ar query-modifier
+
option was combined with the
+
.Fl "L comment"
+
or
+
.Fl "L description"
+
options, then each output field will be tagged with the field name.
+
.Bl -tag -width 2n
+
.It Sy annotations
+
Arbitrary text in tag-value format that can be added to any package.
+
.It Sy arch
+
The architecture string indicating what OS version and CPU architecture
+
the package is suitable for.
+
For example,
+
.Ar freebsd:9:x86:64
+
indicates a package suitable for FreeBSD 9.x running on an amd64 processor,
+
while
+
.Ar freebsd:*
+
indicates an architecture independent package suitable for any version of
+
FreeBSD.
+
.It Sy categories
+
All categories, real and virtual, the underlying package belongs to,
+
derived from the
+
.Cm CATEGORIES
+
variable in the port's
+
.Fa Makefile .
+
.It Sy comment
+
The one line comment field describing the port, derived from the
+
.Cm COMMENT
+
variable in the port's
+
.Fa Makefile .
+
.It Sy depends-on
+
The list of packages the named package depends on.
+
Dependency packages are listed in the format
+
.Sy name Ns - Ns Cm version
+
one per line.
+
If the port has no dependencies, nothing will be output for
+
this field, including suppressing the tag name when multiple
+
output fields are requested.
+
.It Sy description
+
The multi-line package description from the
+
.Fa pkg-descr
+
file in the port.
+
This does include the
+
.Cm WWW
+
URL reference, if any, from that file.
+
.It Sy full
+
Show a standard set of fields, equivalent to a combination of the
+
.Sy name ,
+
.Sy version ,
+
.Sy origin ,
+
.Sy prefix ,
+
.Sy repository ,
+
.Sy categories ,
+
.Sy license ,
+
.Sy maintainer ,
+
.Sy www ,
+
.Sy comment ,
+
.Sy options ,
+
.Sy shared-libs-required ,
+
.Sy shared-libs-provided ,
+
.Sy annotations ,
+
.Sy size ,
+
.Sy pkg-size
+
and
+
.Sy descr
+
fields, in that order.
+
.It Sy licenses
+
Displays a list of all the licenses the package is relesed under on a
+
single line.
+
Where more than one license applies, indicate if the terms of all
+
licenses should apply
+
.Sy (&)
+
or if one or more licenses may be selected out of those available
+
.Sy (|) .
+
.It Sy maintainer
+
Display the maintainer's e-mail address.
+
.It Sy name
+
Display the port name, which is derived from the
+
.Cm PORTNAME
+
variable in the port's
+
.Fa Makefile .
+
.It Sy options
+
Displays a list of the port options and their state (
+
.Sy on
+
or
+
.Sy off )
+
when the package was built.
+
If the package does not have any options to set, nothing will be
+
output for this field, including suppressing the tag name when
+
multiple output fields are requested.
+
.It Sy pkg-size
+
Display the size of the compressed package tarball, i.e., how much would
+
need to be downloaded from the repository.
+
.It Sy prefix
+
Display the installation prefix for the package, usually
+
.Fa /usr/local .
+
.It Sy repository
+
Displays the repository name and the corresponding base Url for the
+
repository.
+
For a default repository defined in
+
.Pa pkg.conf
+
or one derived from the value of the
+
.Ev PACKAGESITE
+
environment variable the name will be
+
.Dq packagesite .
+
.It Sy required-by
+
Displays all of the packages in the repository that require the named
+
package as a dependency.
+
Dependency packages are listed in the format
+
.Sy name Ns - Ns Cm version
+
one per line.
+
If no other packages require the named package, nothing will be
+
output for this field, including suppressing the tag name when
+
multiple output fields are requested.
+
.It Sy shared-libs-required
+
If the package contains dynamically linked FreeBSD ELF binaries,
+
display a list of all of the shared libraries other than those from
+
the base system required for those binaries to run.
+
Shared libraries for foreign (e.g., Linux) binaries run
+
under emulation will not be displayed.
+
If the package does not require any shared libraries, nothing will be
+
output for this field including suppressing the tag name when multiple
+
fields are requested.
+
.It Sy shared-libs-provided
+
If the package contains any shared libraries, display a list of
+
the library names, including the ABI version number, if any.
+
A shared library, of either the same or differing ABI versions, may
+
legitimately be provided by more than installed package,
+
but this frequently indicates a problem.
+
.It Sy size
+
Display the total amount of filesystem space the package files will
+
take up once unpacked and installed.
+
.It Sy url
+
Display the URL that would be used to download the package from the
+
repository.
+
.It Sy version
+
Display the package version, which is derived from the
+
.Cm PKGVERSION
+
variable in the port's
+
.Fa Makefile .
+
.It Sy www
+
Display the general URL, if any, for the project developing the
+
software used in the package.
+
This is extracted from the
+
.Fa pkg-descr
+
file in the port.
+
.El
+
.Pp
+
Any unambiguous prefix of the query modifier name may be used on the
+
command line.
+
Thus
+
.Fl "Qm" ,
+
.Fl "Q maint"
+
and
+
.Fl "Q maintainer"
+
are all equivalent,
+
but you need to use at least
+
.Fl "Q si"
+
and
+
.Fl "Q sh"
+
to distinguish
+
.Cm size
+
from
+
.Cm shared-libs-required
+
or
+
.Cm shared-libs-provided ,
+
and you'll need at least
+
.Fl "Q shared-libs-p"
+
 to select the
+
.Cm shared-libs-provided
+
unambiguously.
+
.Sh ENVIRONMENT
+
The following environment variables affect the execution of
+
.Nm .
+
See
+
.Xr pkg.conf 5
+
for further description.
+
.Bl -tag -width ".Ev NO_DESCRIPTIONS"
+
.It Ev PACKAGESITE
+
.It Ev PKG_DBDIR
+
.El
+
.Sh FILES
+
See
+
.Xr pkg.conf 5 .
+
.Sh SEE ALSO
+
.Xr pkg_printf 3 ,
+
.Xr pkg_repos 3 ,
+
.Xr pkg-repository 5 ,
+
.Xr pkg.conf 5 ,
+
.Xr pkg 8 ,
+
.Xr pkg-add 8 ,
+
.Xr pkg-annotate 8 ,
+
.Xr pkg-audit 8 ,
+
.Xr pkg-autoremove 8 ,
+
.Xr pkg-backup 8 ,
+
.Xr pkg-check 8 ,
+
.Xr pkg-clean 8 ,
+
.Xr pkg-config 8 ,
+
.Xr pkg-convert 8 ,
+
.Xr pkg-create 8 ,
+
.Xr pkg-delete 8 ,
+
.Xr pkg-fetch 8 ,
+
.Xr pkg-info 8 ,
+
.Xr pkg-install 8 ,
+
.Xr pkg-lock 8 ,
+
.Xr pkg-query 8 ,
+
.Xr pkg-register 8 ,
+
.Xr pkg-repo 8 ,
+
.Xr pkg-rquery 8 ,
+
.Xr pkg-set 8 ,
+
.Xr pkg-shell 8 ,
+
.Xr pkg-shlib 8 ,
+
.Xr pkg-ssh 8 ,
+
.Xr pkg-stats 8 ,
+
.Xr pkg-update 8 ,
+
.Xr pkg-updating 8 ,
+
.Xr pkg-upgrade 8 ,
+
.Xr pkg-version 8 ,
+
.Xr pkg-which 8
added docs/pkg-set.8
@@ -0,0 +1,152 @@
+
.\"
+
.\" FreeBSD pkg - a next generation package for the installation and maintenance
+
.\" of non-core utilities.
+
.\"
+
.\" Redistribution and use in source and binary forms, with or without
+
.\" modification, are permitted provided that the following conditions
+
.\" are met:
+
.\" 1. Redistributions of source code must retain the above copyright
+
.\"    notice, this list of conditions and the following disclaimer.
+
.\" 2. Redistributions in binary form must reproduce the above copyright
+
.\"    notice, this list of conditions and the following disclaimer in the
+
.\"    documentation and/or other materials provided with the distribution.
+
.\"
+
.\"
+
.\"     @(#)pkg.8
+
.\" $FreeBSD$
+
.\"
+
.Dd May 18, 2013
+
.Dt PKG-SET 8
+
.Os
+
.Sh NAME
+
.Nm "pkg set"
+
.Nd modify information in the installed database
+
.Sh SYNOPSIS
+
.Nm
+
.Op Fl a
+
.Op Fl A Op Ar 01
+
.Op Fl o Ar oldorigin:neworigin
+
.Op Fl y
+
.Op Fl gix
+
.Ar pkg-name
+
.Sh DESCRIPTION
+
.Nm
+
is used to modify information concerning installed packages.
+
.Nm
+
should always be used with caution.
+
.Sh OPTIONS
+
The following options are supported by
+
.Nm :
+
.Bl -tag -width F1
+
.It Fl A Ar 01
+
Set automatic flag for the package: 0 is not automatic, 1 is automatic.
+
This affects the operation of
+
.Xr pkg-autoremove 8 .
+
.It Fl a
+
Match all installed packages.
+
.It Fl g
+
Match
+
.Ar pkg-name
+
as a globbing expression.
+
.It Fl i
+
Make the standard or regular expression
+
.Fl ( x )
+
matching against
+
.Ar pkg-name
+
case insensitive.
+
.It Fl o Ar oldorigin:neworigin
+
Change the port origin of a given dependency from
+
.Ar oldorigin
+
to
+
.Ar neworigin .
+
This corresponds to the port directory that the package originated from.
+
Typically, this is only needed for upgrading a library or package that
+
has MOVED or when the default version of a major port dependency
+
changes.
+
Usually this will be explained in /usr/ports/UPDATING.
+
Also see
+
.Xr pkg-updating 8
+
and
+
.Sx EXAMPLES .
+
.It Fl x
+
Match
+
.Ar pkg-name
+
as a regular expression according to the "modern" or "extended" syntax of
+
.Xr re_format 7 .
+
.It Fl y
+
Assume yes rather than asking for confirmation before package autoremoval.
+
.El
+
.Pp
+
If neither the
+
.Fl g
+
nor
+
.Fl x
+
options are used, the default is to match pkg-name exactly.
+
.Sh FILES
+
See
+
.Xr pkg.conf 5 .
+
.Sh EXAMPLES
+
Upgrade perl from 5.12 to 5.14.
+
This involes moving the origin from
+
.Sy lang/perl5.12
+
to
+
.Sy lang/perl5.14 :
+
.Dl % pkg set -o lang/perl5.12:lang/perl5.14
+
.Dl % pkg install -Rf lang/perl5.14
+
.Pp
+
Upgrade ruby from 1.8 to 1.9.
+
This involes moving the origin from
+
.Sy lang/ruby18
+
to
+
.Sy lang/ruby19 :
+
.Dl % pkg set -o lang/ruby18:lang/ruby19
+
.Dl % pkg install -Rf lang/ruby19
+
.Pp
+
Move the origin libglut to freeglut, and then reinstall everything depending on glut to use the new shared library:
+
.Dl % pkg set -o graphics/libglut:graphics/freeglut
+
.Dl % pkg install -Rf graphics/freeglut
+
.Pp
+
Change a package from automatic to non-automatic, which will prevent
+
.Ic autoremove
+
from removing it:
+
.Dl % pkg set -A 0 perl-5.14
+
.Pp
+
Change a package from non-automatic to automatic, which will make
+
.Ic autoremove
+
allow it be removed once nothing depends on it:
+
.Dl % pkg set -A 1 perl-5.14
+
.Sh SEE ALSO
+
.Xr pkg_printf 3 ,
+
.Xr pkg_repos 3 ,
+
.Xr pkg-repository 5 ,
+
.Xr pkg.conf 5 ,
+
.Xr pkg 8 ,
+
.Xr pkg-add 8 ,
+
.Xr pkg-annotate 8 ,
+
.Xr pkg-audit 8 ,
+
.Xr pkg-autoremove 8 ,
+
.Xr pkg-backup 8 ,
+
.Xr pkg-check 8 ,
+
.Xr pkg-clean 8 ,
+
.Xr pkg-config 8 ,
+
.Xr pkg-convert 8 ,
+
.Xr pkg-create 8 ,
+
.Xr pkg-delete 8 ,
+
.Xr pkg-fetch 8 ,
+
.Xr pkg-info 8 ,
+
.Xr pkg-install 8 ,
+
.Xr pkg-lock 8 ,
+
.Xr pkg-query 8 ,
+
.Xr pkg-register 8 ,
+
.Xr pkg-repo 8 ,
+
.Xr pkg-rquery 8 ,
+
.Xr pkg-search 8 ,
+
.Xr pkg-shell 8 ,
+
.Xr pkg-shlib 8 ,
+
.Xr pkg-ssh 8 ,
+
.Xr pkg-stats 8 ,
+
.Xr pkg-update 8 ,
+
.Xr pkg-updating 8 ,
+
.Xr pkg-upgrade 8 ,
+
.Xr pkg-version 8 ,
+
.Xr pkg-which 8
added docs/pkg-shell.8
@@ -0,0 +1,87 @@
+
.\"
+
.\" FreeBSD pkg - a next generation package for the installation and maintenance
+
.\" of non-core utilities.
+
.\"
+
.\" Redistribution and use in source and binary forms, with or without
+
.\" modification, are permitted provided that the following conditions
+
.\" are met:
+
.\" 1. Redistributions of source code must retain the above copyright
+
.\"    notice, this list of conditions and the following disclaimer.
+
.\" 2. Redistributions in binary form must reproduce the above copyright
+
.\"    notice, this list of conditions and the following disclaimer in the
+
.\"    documentation and/or other materials provided with the distribution.
+
.\"
+
.\"
+
.\"     @(#)pkg.8
+
.\" $FreeBSD$
+
.\"
+
.Dd March 11, 2013
+
.Dt PKG-SHELL 8
+
.Os
+
.Sh NAME
+
.Nm "pkg shell"
+
.Nd interact with the pkg database
+
.Sh SYNOPSIS
+
.Nm
+
.Sh DESCRIPTION
+
.Nm
+
is used to interact with the local or remote database through a sqlite3 console.
+
Extreme care should be taken when using this command.
+
.Pp
+
Do not rely on this command.
+
The underlying schema is subject to change on any release.
+
Use
+
.Xr pkg-query 8 ,
+
.Xr pkg-rquery 8 ,
+
.Xr pkg-search 8
+
and
+
.Xr pkg-set 8
+
instead for querying and modiying the database.
+
These commands are expected to have a stable API, unlike the database schema.
+
.Sh ENVIRONMENT
+
The following environment variables affect the execution of
+
.Nm .
+
See
+
.Xr pkg.conf 5
+
for further description.
+
.Bl -tag -width ".Ev NO_DESCRIPTIONS"
+
.It Ev PKG_DBDIR
+
.El
+
.Sh FILES
+
See
+
.Xr pkg.conf 5 .
+
.Sh SEE ALSO
+
.Xr pkg_printf 3 ,
+
.Xr pkg_repos 3 ,
+
.Xr pkg-repository 5 ,
+
.Xr pkg.conf 5 ,
+
.Xr pkg 8 ,
+
.Xr pkg-add 8 ,
+
.Xr pkg-annotate 8 ,
+
.Xr pkg-audit 8 ,
+
.Xr pkg-autoremove 8 ,
+
.Xr pkg-backup 8 ,
+
.Xr pkg-check 8 ,
+
.Xr pkg-clean 8 ,
+
.Xr pkg-config 8 ,
+
.Xr pkg-convert 8 ,
+
.Xr pkg-create 8 ,
+
.Xr pkg-delete 8 ,
+
.Xr pkg-fetch 8 ,
+
.Xr pkg-info 8 ,
+
.Xr pkg-install 8 ,
+
.Xr pkg-lock 8 ,
+
.Xr pkg-query 8 ,
+
.Xr pkg-register 8 ,
+
.Xr pkg-repo 8 ,
+
.Xr pkg-rquery 8 ,
+
.Xr pkg-search 8 ,
+
.Xr pkg-set 8 ,
+
.Xr pkg-shlib 8 ,
+
.Xr pkg-ssh 8 ,
+
.Xr pkg-stats 8 ,
+
.Xr pkg-update 8 ,
+
.Xr pkg-updating 8 ,
+
.Xr pkg-upgrade 8 ,
+
.Xr pkg-version 8 ,
+
.Xr pkg-which 8
added docs/pkg-shlib.8
@@ -0,0 +1,98 @@
+
.\"
+
.\" FreeBSD pkg - a next generation package for the installation and maintenance
+
.\" of non-core utilities.
+
.\"
+
.\" Redistribution and use in source and binary forms, with or without
+
.\" modification, are permitted provided that the following conditions
+
.\" are met:
+
.\" 1. Redistributions of source code must retain the above copyright
+
.\"    notice, this list of conditions and the following disclaimer.
+
.\" 2. Redistributions in binary form must reproduce the above copyright
+
.\"    notice, this list of conditions and the following disclaimer in the
+
.\"    documentation and/or other materials provided with the distribution.
+
.\"
+
.\"
+
.\"     @(#)pkg.8
+
.\" $FreeBSD$
+
.\"
+
.Dd March 3, 2013
+
.Dt PKG-SHLIB 8
+
.Os
+
.Sh NAME
+
.Nm "pkg shlib"
+
.Nd displays which installed packages provide a specfic shared library,
+
and those which require it by containg binaries that link to it
+
.Pp
+
.Ar library
+
is the filename of the library, without any leading path, but
+
including the ABI version number.
+
Only exact matches are handled.
+
.Sh SYNOPSIS
+
.Nm
+
.Op Fl PR
+
.Ar library
+
.Sh DESCRIPTION
+
.Nm
+
is used for displaying the packages that provide
+
.Ar library
+
or that require
+
.Ar library
+
by containing binaries that link to it.
+
.Sh OPTIONS
+
The following mutually exclusive options are supported by
+
.Nm :
+
.Bl -tag -width F1
+
.It Fl P
+
Show only the installed packages which provide the named
+
.Ar library .
+
.It Fl R
+
Show only the installed packages which require
+
.Ar library.
+
.El
+
.Sh ENVIRONMENT
+
The following environment variables affect the execution of
+
.Nm .
+
See
+
.Xr pkg.conf 5
+
for further description.
+
.Bl -tag -width ".Ev NO_DESCRIPTIONS"
+
.It PKG_DBDIR
+
.El
+
.Sh FILES
+
See
+
.Xr pkg.conf 5 .
+
.Sh SEE ALSO
+
.Xr pkg_printf 3 ,
+
.Xr pkg_repos 3 ,
+
.Xr pkg-repository 5 ,
+
.Xr pkg.conf 5 ,
+
.Xr pkg 8 ,
+
.Xr pkg-add 8 ,
+
.Xr pkg-annotate 8 ,
+
.Xr pkg-audit 8 ,
+
.Xr pkg-autoremove 8 ,
+
.Xr pkg-backup 8 ,
+
.Xr pkg-check 8 ,
+
.Xr pkg-clean 8 ,
+
.Xr pkg-config 8 ,
+
.Xr pkg-convert 8 ,
+
.Xr pkg-create 8 ,
+
.Xr pkg-delete 8 ,
+
.Xr pkg-fetch 8 ,
+
.Xr pkg-info 8 ,
+
.Xr pkg-install 8 ,
+
.Xr pkg-lock 8 ,
+
.Xr pkg-query 8 ,
+
.Xr pkg-register 8 ,
+
.Xr pkg-repo 8 ,
+
.Xr pkg-rquery 8 ,
+
.Xr pkg-search 8 ,
+
.Xr pkg-set 8 ,
+
.Xr pkg-shell 8 ,
+
.Xr pkg-ssh 8 ,
+
.Xr pkg-stats 8 ,
+
.Xr pkg-update 8 ,
+
.Xr pkg-updating 8 ,
+
.Xr pkg-upgrade 8 ,
+
.Xr pkg-version 8 ,
+
.Xr pkg-which 8
added docs/pkg-ssh.8
@@ -0,0 +1,85 @@
+
.\"
+
.\" FreeBSD pkg - a next generation package for the installation and maintenance
+
.\" of non-core utilities.
+
.\"
+
.\" Redistribution and use in source and binary forms, with or without
+
.\" modification, are permitted provided that the following conditions
+
.\" are met:
+
.\" 1. Redistributions of source code must retain the above copyright
+
.\"    notice, this list of conditions and the following disclaimer.
+
.\" 2. Redistributions in binary form must reproduce the above copyright
+
.\"    notice, this list of conditions and the following disclaimer in the
+
.\"    documentation and/or other materials provided with the distribution.
+
.\"
+
.\"
+
.\"     @(#)pkg.8
+
.\" $FreeBSD$
+
.\"
+
.Dd March 12, 2014
+
.Dt PKG-SSH 8
+
.Os
+
.Sh NAME
+
.Nm "pkg ssh"
+
.Nd package server
+
.Sh SYNOPSIS
+
.Nm
+
.Sh DESCRIPTION
+
.Nm
+
provides a minimal package server and it's most commonly used with the SSH
+
transport protocol.
+
.Pp
+
This command is not meant to be used by the user.
+
.Xr pkg 8
+
will do start the server automatically through
+
.Xr ssh 1
+
when the ssh:// scheme is specified in the repository configuration.
+
.Sh OPTIONS
+
.Nm
+
supports no options.
+
.Sh ENVIRONMENT
+
The following environment variables affect the execution of
+
.Nm .
+
See
+
.Xr pkg.conf 5
+
for further description.
+
.Bl -tag -width ".Ev NO_DESCRIPTIONS"
+
.It Ev SSH_RESTRICT_DIR
+
.El
+
.Sh FILES
+
See
+
.Xr pkg.conf 5 .
+
.Sh SEE ALSO
+
.Xr pkg_printf 3 ,
+
.Xr pkg_repos 3 ,
+
.Xr pkg-repository 5 ,
+
.Xr pkg.conf 5 ,
+
.Xr pkg 8 ,
+
.Xr pkg-add 8 ,
+
.Xr pkg-annotate 8 ,
+
.Xr pkg-audit 8 ,
+
.Xr pkg-autoremove 8 ,
+
.Xr pkg-backup 8 ,
+
.Xr pkg-check 8 ,
+
.Xr pkg-clean 8 ,
+
.Xr pkg-config 8 ,
+
.Xr pkg-convert 8 ,
+
.Xr pkg-create 8 ,
+
.Xr pkg-delete 8 ,
+
.Xr pkg-fetch 8 ,
+
.Xr pkg-info 8 ,
+
.Xr pkg-install 8 ,
+
.Xr pkg-lock 8 ,
+
.Xr pkg-query 8 ,
+
.Xr pkg-register 8 ,
+
.Xr pkg-repo 8 ,
+
.Xr pkg-rquery 8 ,
+
.Xr pkg-search 8 ,
+
.Xr pkg-set 8 ,
+
.Xr pkg-shell 8 ,
+
.Xr pkg-shlib 8 ,
+
.Xr pkg-stats 8 ,
+
.Xr pkg-update 8 ,
+
.Xr pkg-updating 8 ,
+
.Xr pkg-upgrade 8 ,
+
.Xr pkg-version 8 ,
+
.Xr pkg-which 8
added docs/pkg-stats.8
@@ -0,0 +1,87 @@
+
.\"
+
.\" FreeBSD pkg - a next generation package for the installation and maintenance
+
.\" of non-core utilities.
+
.\"
+
.\" Redistribution and use in source and binary forms, with or without
+
.\" modification, are permitted provided that the following conditions
+
.\" are met:
+
.\" 1. Redistributions of source code must retain the above copyright
+
.\"    notice, this list of conditions and the following disclaimer.
+
.\" 2. Redistributions in binary form must reproduce the above copyright
+
.\"    notice, this list of conditions and the following disclaimer in the
+
.\"    documentation and/or other materials provided with the distribution.
+
.\"
+
.\"
+
.\"     @(#)pkg.8
+
.\" $FreeBSD$
+
.\"
+
.Dd February 25, 2013
+
.Dt PKG-STATS 8
+
.Os
+
.Sh NAME
+
.Nm "pkg stats"
+
.Nd package database statistics
+
.Sh SYNOPSIS
+
.Nm
+
.Op Fl qlrb
+
.Sh DESCRIPTION
+
.Nm
+
is used to display different statistics about the package databases.
+
.Sh OPTIONS
+
The following options are supported by
+
.Nm :
+
.Bl -tag -width F1
+
.It Fl q
+
Quiet mode.
+
Show less output.
+
.It Fl l
+
Display stats only for the local package database.
+
.It Fl r
+
Display stats only for the remote package database(s).
+
.It Fl b
+
Display disk space usage in bytes only.
+
.El
+
.Sh ENVIRONMENT
+
The following environment variables affect the execution of
+
.Nm .
+
See
+
.Xr pkg.conf 5
+
for further description.
+
.Sh FILES
+
See
+
.Xr pkg.conf 5 .
+
.Sh SEE ALSO
+
.Xr pkg_printf 3 ,
+
.Xr pkg_repos 3 ,
+
.Xr pkg-repository 5 ,
+
.Xr pkg.conf 5 ,
+
.Xr pkg 8 ,
+
.Xr pkg-add 8 ,
+
.Xr pkg-annotate 8 ,
+
.Xr pkg-audit 8 ,
+
.Xr pkg-autoremove 8 ,
+
.Xr pkg-backup 8 ,
+
.Xr pkg-check 8 ,
+
.Xr pkg-clean 8 ,
+
.Xr pkg-config 8 ,
+
.Xr pkg-convert 8 ,
+
.Xr pkg-create 8 ,
+
.Xr pkg-delete 8 ,
+
.Xr pkg-fetch 8 ,
+
.Xr pkg-info 8 ,
+
.Xr pkg-install 8 ,
+
.Xr pkg-lock 8 ,
+
.Xr pkg-query 8 ,
+
.Xr pkg-register 8 ,
+
.Xr pkg-repo 8 ,
+
.Xr pkg-rquery 8 ,
+
.Xr pkg-search 8 ,
+
.Xr pkg-set 8 ,
+
.Xr pkg-shell 8 ,
+
.Xr pkg-shlib 8 ,
+
.Xr pkg-ssh 8 ,
+
.Xr pkg-update 8 ,
+
.Xr pkg-updating 8 ,
+
.Xr pkg-upgrade 8 ,
+
.Xr pkg-version 8 ,
+
.Xr pkg-which 8
added docs/pkg-update.8
@@ -0,0 +1,127 @@
+
.\"
+
.\" FreeBSD pkg - a next generation package for the installation and
+
.\" maintenance of non-core utilities.
+
.\"
+
.\" Redistribution and use in source and binary forms, with or without
+
.\" modification, are permitted provided that the following conditions
+
.\" are met:
+
.\" 1. Redistributions of source code must retain the above copyright
+
.\"    notice, this list of conditions and the following disclaimer.
+
.\" 2. Redistributions in binary form must reproduce the above copyright
+
.\"    notice, this list of conditions and the following disclaimer in the
+
.\"    documentation and/or other materials provided with the distribution.
+
.\"
+
.\"
+
.\"     @(#)pkg.8
+
.\" $FreeBSD$
+
.\"
+
.Dd August 12, 2013
+
.Dt PKG-UPDATE 8
+
.Os
+
.Sh NAME
+
.Nm "pkg update"
+
.Nd updates the local copies of repository catalogues from the configured
+
package repositories
+
.Sh SYNOPSIS
+
.Nm
+
.Op Fl fq
+
.Sh DESCRIPTION
+
.Nm
+
is used for updating the local copy of a repository catalogue from
+
each of the package repository databases.
+
Updates to catalogues are normally downloaded only when the master
+
copy on the remote package repository is newer than the local copy.
+
.Pp
+
The repository catalogues to be updated are defined in the
+
.Xr pkg.conf 5
+
file or by the entries in
+
.Pa /usr/local/etc/pkg/repos .
+
See
+
.Xr pkg.conf 5
+
for details.
+
.Pp
+
It is best practice to ensure your package repository catalogues are
+
up to date before doing any package installation (via
+
.Xr pkg-install 8 )
+
or upgrades (via
+
.Xr pkg-upgrade 8 ) .
+
However, explicitly running
+
.Nm
+
is not normally necessary.
+
By default invoking either of
+
.Nm pkg install
+
or
+
.Nm pkg upgrade
+
will cause repository
+
catalogues to be updated automatically, unless disabled by setting
+
.Ev REPO_AUTOUPDATE
+
to false in
+
.Xr pkg.conf 5 .
+
.Pp
+
.Ss Signed repositories
+
If the repository catalogue is signed and
+
.Ev PUBKEY
+
is defined, the signature will be verified after download.
+
See
+
.Xr pkg.conf 5
+
for more information.
+
.Sh OPTIONS
+
The following options are supported by
+
.Nm :
+
.Bl -tag -width F1
+
.It Fl q
+
Force quiet output
+
.It Fl f
+
Force a full download of the repository catalogue without regard to the
+
respective ages of the local and remote copies of the catalogue
+
.El
+
.Sh ENVIRONMENT
+
The following environment variables affect the execution of
+
.Nm .
+
See
+
.Xr pkg.conf 5
+
for further description.
+
.Bl -tag -width ".Ev NO_DESCRIPTIONS"
+
.It Ev PACKAGESITE
+
.It Ev PKG_DBDIR
+
.It Ev PUBKEY
+
.It Ev REPO_AUTOUPDATE
+
.El
+
.Sh FILES
+
See
+
.Xr pkg.conf 5 .
+
.Sh SEE ALSO
+
.Xr pkg_printf 3 ,
+
.Xr pkg_repos 3 ,
+
.Xr pkg-repository 5 ,
+
.Xr pkg.conf 5 ,
+
.Xr pkg 8 ,
+
.Xr pkg-add 8 ,
+
.Xr pkg-annotate 8 ,
+
.Xr pkg-audit 8 ,
+
.Xr pkg-autoremove 8 ,
+
.Xr pkg-backup 8 ,
+
.Xr pkg-check 8 ,
+
.Xr pkg-clean 8 ,
+
.Xr pkg-config 8 ,
+
.Xr pkg-convert 8 ,
+
.Xr pkg-create 8 ,
+
.Xr pkg-delete 8 ,
+
.Xr pkg-fetch 8 ,
+
.Xr pkg-info 8 ,
+
.Xr pkg-install 8 ,
+
.Xr pkg-lock 8 ,
+
.Xr pkg-query 8 ,
+
.Xr pkg-register 8 ,
+
.Xr pkg-repo 8 ,
+
.Xr pkg-rquery 8 ,
+
.Xr pkg-search 8 ,
+
.Xr pkg-set 8 ,
+
.Xr pkg-shell 8 ,
+
.Xr pkg-shlib 8 ,
+
.Xr pkg-ssh 8 ,
+
.Xr pkg-stats 8 ,
+
.Xr pkg-updating 8 ,
+
.Xr pkg-upgrade 8 ,
+
.Xr pkg-version 8 ,
+
.Xr pkg-which 8
added docs/pkg-updating.8
@@ -0,0 +1,111 @@
+
.\"
+
.\" FreeBSD pkg - a next generation package for the installation and maintenance
+
.\" of non-core utilities.
+
.\"
+
.\" Redistribution and use in source and binary forms, with or without
+
.\" modification, are permitted provided that the following conditions
+
.\" are met:
+
.\" 8. Redistributions of source code must retain the above copyright
+
.\"    notice, this list of conditions and the following disclaimer.
+
.\" 2. Redistributions in binary form must reproduce the above copyright
+
.\"    notice, this list of conditions and the following disclaimer in the
+
.\"    documentation and/or other materials provided with the distribution.
+
.\"
+
.\"
+
.\"     @(#)pkg.8
+
.\" $FreeBSD$
+
.\"
+
.Dd February 25, 2013
+
.Dt PKG-UPDATING 8
+
.Os
+
.Sh NAME
+
.Nm "pkg updating"
+
.Nd displays UPDATING entries of software packages
+
.Sh SYNOPSIS
+
.Nm
+
.Op Fl d Ar date
+
.Op Fl f Ar file
+
.Op Ar pkg-name ...
+
.Nm
+
.Sh DESCRIPTION
+
The
+
.Nm
+
command scans the installed ports and show all UPDATING entries that affect one
+
of the installed ports.
+
Alternativly a list of pkg-names could be passed.
+
.Sh OPTIONS
+
The following options are supported by
+
.Nm :
+
.Bl -tag -width F1
+
.It Ar pkg-name ...
+
UPDATING entries for the named packages are displayed.
+
.It Fl d Ar date
+
Only entries newer than
+
.Ar date
+
are shown.
+
Use a YYYYMMDD date format.
+
.It Fl f Ar file
+
Defines a alternative location of the UPDATING
+
.Ar file .
+
.El
+
.Sh ENVIRONMENT
+
The following environment variables affect the execution of
+
.Nm :
+
.Bl -tag -width F1
+
.It Ev PORTSDIR
+
Location of the ports tree.
+
.El
+
.Sh FILES
+
See
+
.Xr pkg.conf 5 .
+
.Sh EXAMPLES
+
Shows all entries of all installed ports:
+
.Dl % pkg updating
+
.Pp
+
Shows all entries of all installed ports since 2012-01-01:
+
.Dl % pkg updating -d 20120101
+
.Pp
+
Shows all entries for all apache and mysql ports:
+
.Dl % pkg updating apache mysql
+
.Pp
+
Shows all apache entries since 2012-01-01:
+
.Dl % pkg updating -d 20120101 apache
+
.Pp
+
Defines that the UPDATING file is in /tmp and shows all entries of all
+
installed ports:
+
.Dl % pkg updating -f /tmp/UPDATING
+
.Sh SEE ALSO
+
.Xr pkg_printf 3 ,
+
.Xr pkg_repos 3 ,
+
.Xr pkg-repository 5 ,
+
.Xr pkg.conf 5 ,
+
.Xr pkg 8 ,
+
.Xr pkg-add 8 ,
+
.Xr pkg-annotate 8 ,
+
.Xr pkg-audit 8 ,
+
.Xr pkg-autoremove 8 ,
+
.Xr pkg-backup 8 ,
+
.Xr pkg-check 8 ,
+
.Xr pkg-clean 8 ,
+
.Xr pkg-config 8 ,
+
.Xr pkg-convert 8 ,
+
.Xr pkg-create 8 ,
+
.Xr pkg-delete 8 ,
+
.Xr pkg-fetch 8 ,
+
.Xr pkg-info 8 ,
+
.Xr pkg-install 8 ,
+
.Xr pkg-lock 8 ,
+
.Xr pkg-query 8 ,
+
.Xr pkg-register 8 ,
+
.Xr pkg-repo 8 ,
+
.Xr pkg-rquery 8 ,
+
.Xr pkg-search 8 ,
+
.Xr pkg-set 8 ,
+
.Xr pkg-shell 8 ,
+
.Xr pkg-shlib 8 ,
+
.Xr pkg-ssh 8 ,
+
.Xr pkg-stats 8 ,
+
.Xr pkg-update 8 ,
+
.Xr pkg-upgrade 8 ,
+
.Xr pkg-version 8 ,
+
.Xr pkg-which 8
added docs/pkg-upgrade.8
@@ -0,0 +1,184 @@
+
.\"
+
.\" FreeBSD pkg - a next generation package for the installation and
+
.\" maintenance of non-core utilities.
+
.\"
+
.\" Redistribution and use in source and binary forms, with or without
+
.\" modification, are permitted provided that the following conditions
+
.\" are met:
+
.\" 1. Redistributions of source code must retain the above copyright
+
.\"    notice, this list of conditions and the following disclaimer.
+
.\" 2. Redistributions in binary form must reproduce the above copyright
+
.\"    notice, this list of conditions and the following disclaimer in the
+
.\"    documentation and/or other materials provided with the distribution.
+
.\"
+
.\"
+
.\"     @(#)pkg.8
+
.\" $FreeBSD$
+
.\"
+
.Dd June 30, 2013
+
.Dt PKG-UPGRADE 8
+
.Os
+
.Sh NAME
+
.Nm "pkg upgrade"
+
.Nd performs upgrades of package software distributions
+
.Sh SYNOPSIS
+
.Nm
+
.Op Fl fInFqUy
+
.Op Fl r Ar reponame
+
.Sh DESCRIPTION
+
.Nm
+
is used for upgrading packaged software distributions.
+
.Pp
+
.Nm
+
compares the versions of all of the packages installed on the system
+
to what is available in the configured package repositories.
+
Any out-of-date packages are added to a work list for processing.
+
If the
+
.Fl f
+
(force) flag is given, all installed packages are added to the work
+
list.
+
.Pp
+
The package metadata downloaded from the repositories is then examined
+
for each of the packages in the work list, and any missing
+
dependencies are added to the work list as install jobs.
+
Such implicitly added packages are flagged as candidates for
+
autoremoval.
+
See
+
.Xr pkg-autoremove 8
+
for details.
+
.Pp
+
Autoremoval flags are sticky, and will persist over reinstallation or
+
upgrade of the packages concerned, even if subsequently the packages
+
are named explicitly on a command line.
+
See
+
.Xr pkg-query 8
+
for finding the autoremoval status of a package, and
+
.Xr pkg-set 8
+
for modifying it.
+
.Pp
+
Where a package on the work list supplies a shared library, and that
+
library has been updated, all packages requiring that shared library
+
will also be added to the work list as reinstallation jobs.
+
.Pp
+
The work list is sorted into dependency order and
+
.Nm
+
will present it to the user for approval before proceeding, unless
+
overridden by the
+
.Fl y
+
option or the
+
.Cm ASSUME_ALWAYS_YES
+
setting in
+
.Pa pkg.conf .
+
.Pp
+
Packages are fetched from the repositories into the local package
+
cache if they are not already present, or if the checksum of the
+
cached package file differs from the one in the repository.
+
Packages may be downloaded from any of the repositories mentioned
+
in
+
.Xr pkg.conf 5
+
or in the files in
+
.Pa /usr/local/etc/pkg/repo .
+
See
+
.Xr pkg-repository 5
+
for details.
+
.Pp
+
Repository catalogues will automatically be updated whenever
+
.Xr pkg-update 8
+
is run, unless disabled by the
+
.Fl U
+
flag or setting
+
.Cm REPO_AUTOUPDATE
+
to
+
.Sy NO
+
in
+
.Xr pkg.conf 5 .
+
.Pp
+
Finally, the work list is executed in dependency order.
+
Package reinstall or update jobs are processed by removing the currently
+
installed package and immediately installing the replacement.
+
New dependencies are processed as installation jobs as part of the
+
work list.
+
.Sh OPTIONS
+
The following options are supported by
+
.Nm :
+
.Bl -tag -width F1
+
.It Fl f
+
Force reinstalling/upgrading the whole set of packages
+
.It Fl I
+
If any installation scripts (pre-install or post-install) or deinstallation
+
scripts (pre-deinstall or post-deinstall) exist for a given package, do not
+
execute them.
+
.It Fl n
+
Dry-run mode: show what packages have updates available, but do not perform
+
any upgrades.
+
Repository catalogues will be updated as usual unless the
+
.Fl U
+
option is also given.
+
.It Fl F
+
Do not perform installation of packages, merely fetch packages that should be
+
upgraded and detect possible conflicts.
+
.It Fl q
+
Force quiet output, except when
+
.Fl n
+
is used, where a summary of the work list is always displayed.
+
.It Fl U
+
Skip updating the repository catalogues with
+
.Xr pkg-update 8 .
+
Use the local cache only.
+
.Nm
+
will always print out the list of packages with available updates.
+
.It Fl y
+
Assume yes when asked for confirmation before package installation.
+
.El
+
.Sh ENVIRONMENT
+
The following environment variables affect the execution of
+
.Nm .
+
See
+
.Xr pkg.conf 5
+
for further description.
+
.Bl -tag -width ".Ev NO_DESCRIPTIONS"
+
.It Ev ASSUME_ALWAYS_YES
+
.It Ev HANDLE_RC_SCRIPTS
+
.It Ev PACKAGESITE
+
.It Ev PKG_CACHEDIR
+
.It Ev PKG_DBDIR
+
.It Ev REPO_AUTOUPDATE
+
.El
+
.Sh FILES
+
See
+
.Xr pkg.conf 5 .
+
.Sh SEE ALSO
+
.Xr pkg_printf 3 ,
+
.Xr pkg_repos 3 ,
+
.Xr pkg-repository 5 ,
+
.Xr pkg.conf 5 ,
+
.Xr pkg 8 ,
+
.Xr pkg-add 8 ,
+
.Xr pkg-annotate 8 ,
+
.Xr pkg-audit 8 ,
+
.Xr pkg-autoremove 8 ,
+
.Xr pkg-backup 8 ,
+
.Xr pkg-check 8 ,
+
.Xr pkg-clean 8 ,
+
.Xr pkg-config 8 ,
+
.Xr pkg-convert 8 ,
+
.Xr pkg-create 8 ,
+
.Xr pkg-delete 8 ,
+
.Xr pkg-fetch 8 ,
+
.Xr pkg-info 8 ,
+
.Xr pkg-install 8 ,
+
.Xr pkg-lock 8 ,
+
.Xr pkg-query 8 ,
+
.Xr pkg-register 8 ,
+
.Xr pkg-repo 8 ,
+
.Xr pkg-rquery 8 ,
+
.Xr pkg-search 8 ,
+
.Xr pkg-set 8 ,
+
.Xr pkg-shell 8 ,
+
.Xr pkg-shlib 8 ,
+
.Xr pkg-ssh 8 ,
+
.Xr pkg-stats 8 ,
+
.Xr pkg-update 8 ,
+
.Xr pkg-updating 8 ,
+
.Xr pkg-version 8 ,
+
.Xr pkg-which 8
added docs/pkg-version.8
@@ -0,0 +1,224 @@
+
.\"
+
.\" FreeBSD pkg - a next generation package for the installation and maintenance
+
.\" of non-core utilities.
+
.\"
+
.\" Redistribution and use in source and binary forms, with or without
+
.\" modification, are permitted provided that the following conditions
+
.\" are met:
+
.\" 1. Redistributions of source code must retain the above copyright
+
.\"    notice, this list of conditions and the following disclaimer.
+
.\" 2. Redistributions in binary form must reproduce the above copyright
+
.\"    notice, this list of conditions and the following disclaimer in the
+
.\"    documentation and/or other materials provided with the distribution.
+
.\"
+
.\"
+
.\"     @(#)pkg.8
+
.\" $FreeBSD$
+
.\"
+
.Dd February 25, 2013
+
.Dt PKG-VERSION 8
+
.Os
+
.Sh NAME
+
.Nm "pkg version"
+
.Nd summarize installed versions of packages
+
.Sh SYNOPSIS
+
.Nm
+
.Op Fl IPR
+
.Op Fl hoqvU
+
.Op Fl l Ar limchar
+
.Op Fl L Ar limchar
+
.Op Fl egix Ar pattern
+
.Op Fl r Ar reponame
+
.Op Fl O Ar origin
+
.Op Ar index
+
.Nm
+
.Fl t Ar version1 Ar version2
+
.Nm
+
.Fl T Ar pkgname Ar pattern
+
.Sh DESCRIPTION
+
.Nm
+
is used for generating a report of packages installed by
+
.Xr pkg 8 .
+
.Pp
+
By default, if a ports tree exists it is used to compare versions.
+
If it does not exist, the remote repository catalogue is used.
+
These defaults can be overridden by specifying one of
+
.Fl P ,
+
.Fl R
+
or
+
.Fl I .
+
.Pp
+
When comparing package versions the package name and a comparison character are printed:
+
.Bl -tag -width indent
+
.It Li =
+
The installed version of the package is current.
+
.It Li \&<
+
The installed version of the package is older than the current version.
+
.It Li \&>
+
The installed version of the package is newer than the current version.
+
This situation can arise with an out-of-date index file, or when
+
testing new ports.
+
.It Li \&?
+
The installed package does not appear in the index.
+
This could be due to an out of date index or a package taken from a PR
+
that has not yet been committed.
+
.It Li \&!
+
The installed package exists in the index but for some reason,
+
.Nm
+
was unable to compare the version number of the installed package
+
with the corresponding entry in the index.
+
.El
+
.Sh OPTIONS
+
The following options are supported by
+
.Nm :
+
.Bl -tag -width F1
+
.It Fl h
+
Displays usage information
+
.It Fl I
+
Use INDEX file for determining if a package is out of date.
+
.It Fl P
+
Use ports for determining if a package is out of date.
+
This is the default if a ports tree exists.
+
The tree used can be overridden by PORTSDIR, see
+
.Xr pkg 5
+
for more information.
+
.It Fl R
+
Use repository catalogue for determining if a package is out of date.
+
This is the default if no ports tree exists.
+
.It Fl U
+
Suppress the automatic update of the local copy of the repository catalogue
+
from remote.
+
This only has any effect in combination with the
+
.Fl R
+
option.
+
.It Fl r Ar reponame
+
Use the given
+
.Ar reponame
+
for comparison when using
+
.Fl R
+
.It Fl o
+
Display package origin, instead of package name.
+
.It Fl q
+
Be quiet.
+
Less output will be produced.
+
.It Fl v
+
Be verbose.
+
.It Fl l Ar limchar
+
Display only the packages which status flag matches the one specified by
+
.Ar limchar
+
.It Fl L Ar limchar
+
Does the opposite of
+
.Fl l
+
flag.
+
Displays the packages which status flag does not match the one
+
specified by
+
.Ar limchar
+
.It Fl i
+
Make the exact
+
.Fl ( e )
+
or regular expression
+
.Fl ( x )
+
matching against
+
.Ar pattern
+
case insensitive.
+
.It Fl x Ar pattern
+
Only display the packages that match the regular expression.
+
Uses the "modern" or "extended" syntax of
+
.Xr re_format 7 .
+
.It Fl g Ar pattern
+
Only display the packages that match the glob expression.
+
.It Fl e Ar string
+
Only display the packages that exactly match the string.
+
.It Fl O Ar origin
+
Display only the packages which origin matches
+
.Ar origin
+
.It Fl t Ar version1 Ar version2
+
Test a pair of version number strings and exit.
+
The output consists of one of the single characters
+
.Li =
+
(equal),
+
.Li \&<
+
(right-hand number greater), or
+
.Li \&>
+
(left-hand number greater) on standard output.
+
This flag is mostly useful for scripts or for testing.
+
.It Fl T Ar pkgname Ar pattern
+
Compare
+
.Ar pkgname
+
against shell glob
+
.Ar pattern
+
and set exit code accordingly.
+
.Fl T
+
can also be used in `filter mode':
+
When one of the arguments is `-', standard input is used, and lines
+
with matching package names/patterns are echoed to standard output.
+
.El
+
.Sh ENVIRONMENT
+
The following environment variables affect the execution of
+
.Nm .
+
See
+
.Xr pkg.conf 5
+
for further description.
+
.Bl -tag -width ".Ev NO_DESCRIPTIONS"
+
.It Ev PKG_DBDIR
+
.It Ev PORTSDIR
+
.El
+
.Sh FILES
+
See
+
.Xr pkg.conf 5 .
+
.Sh EXAMPLES
+
The following is a typical invocation of the
+
.Nm
+
command, which checks the installed packages against the local ports
+
index file:
+
.Pp
+
.Dl % pkg version -v
+
.Pp
+
The command below generates a report against the versions in the repository catalogue:
+
.Pp
+
.Dl % pkg update
+
.Dl % pkg version -vR
+
.Pp
+
The following lists packages needing upgrade, compared to the repository catalogue:
+
.Pp
+
.Dl % pkg update
+
.Dl % pkg version -vRL=
+
.Pp
+
The following command compares two package version strings:
+
.Pp
+
.Dl % pkg version -t 1.5 1.5.1
+
.Sh SEE ALSO
+
.Xr pkg_printf 3 ,
+
.Xr pkg_repos 3 ,
+
.Xr pkg-repository 5 ,
+
.Xr pkg.conf 5 ,
+
.Xr pkg 8 ,
+
.Xr pkg-add 8 ,
+
.Xr pkg-annotate 8 ,
+
.Xr pkg-audit 8 ,
+
.Xr pkg-autoremove 8 ,
+
.Xr pkg-backup 8 ,
+
.Xr pkg-check 8 ,
+
.Xr pkg-clean 8 ,
+
.Xr pkg-config 8 ,
+
.Xr pkg-convert 8 ,
+
.Xr pkg-create 8 ,
+
.Xr pkg-delete 8 ,
+
.Xr pkg-fetch 8 ,
+
.Xr pkg-info 8 ,
+
.Xr pkg-install 8 ,
+
.Xr pkg-lock 8 ,
+
.Xr pkg-query 8 ,
+
.Xr pkg-register 8 ,
+
.Xr pkg-repo 8 ,
+
.Xr pkg-rquery 8 ,
+
.Xr pkg-search 8 ,
+
.Xr pkg-set 8 ,
+
.Xr pkg-shell 8 ,
+
.Xr pkg-shlib 8 ,
+
.Xr pkg-ssh 8 ,
+
.Xr pkg-stats 8 ,
+
.Xr pkg-update 8 ,
+
.Xr pkg-updating 8 ,
+
.Xr pkg-upgrade 8 ,
+
.Xr pkg-which 8
added docs/pkg-which.8
@@ -0,0 +1,91 @@
+
.\"
+
.\" FreeBSD pkg - a next generation package for the installation and maintenance
+
.\" of non-core utilities.
+
.\"
+
.\" Redistribution and use in source and binary forms, with or without
+
.\" modification, are permitted provided that the following conditions
+
.\" are met:
+
.\" 1. Redistributions of source code must retain the above copyright
+
.\"    notice, this list of conditions and the following disclaimer.
+
.\" 2. Redistributions in binary form must reproduce the above copyright
+
.\"    notice, this list of conditions and the following disclaimer in the
+
.\"    documentation and/or other materials provided with the distribution.
+
.\"
+
.\"
+
.\"     @(#)pkg.8
+
.\" $FreeBSD$
+
.\"
+
.Dd March 25, 2013
+
.Dt PKG-WHICH 8
+
.Os
+
.Sh NAME
+
.Nm "pkg which"
+
.Nd displays which package installed a specific file
+
.Sh SYNOPSIS
+
.Nm
+
.Op Fl qog
+
.Ar file
+
.Sh DESCRIPTION
+
.Nm
+
is used for displaying the package that installed
+
.Ar file
+
.Sh OPTIONS
+
The following options are supported by
+
.Nm :
+
.Bl -tag -width F1
+
.It Fl q
+
Be quiet
+
.It Fl o
+
Shows the origin of the package instead of name-version
+
.It Fl g
+
Treat
+
.Ao file Ac
+
as a glob pattern.
+
.El
+
.Sh ENVIRONMENT
+
The following environment variables affect the execution of
+
.Nm .
+
See
+
.Xr pkg.conf 5
+
for further description.
+
.Bl -tag -width ".Ev NO_DESCRIPTIONS"
+
.It Ev PKG_DBDIR
+
.El
+
.Sh FILES
+
See
+
.Xr pkg.conf 5 .
+
.Sh SEE ALSO
+
.Xr pkg_printf 3 ,
+
.Xr pkg_repos 3 ,
+
.Xr pkg-repository 5 ,
+
.Xr pkg.conf 5 ,
+
.Xr pkg 8 ,
+
.Xr pkg-add 8 ,
+
.Xr pkg-annotate 8 ,
+
.Xr pkg-audit 8 ,
+
.Xr pkg-autoremove 8 ,
+
.Xr pkg-backup 8 ,
+
.Xr pkg-check 8 ,
+
.Xr pkg-clean 8 ,
+
.Xr pkg-config 8 ,
+
.Xr pkg-convert 8 ,
+
.Xr pkg-create 8 ,
+
.Xr pkg-delete 8 ,
+
.Xr pkg-fetch 8 ,
+
.Xr pkg-info 8 ,
+
.Xr pkg-install 8 ,
+
.Xr pkg-lock 8 ,
+
.Xr pkg-query 8 ,
+
.Xr pkg-register 8 ,
+
.Xr pkg-repo 8 ,
+
.Xr pkg-rquery 8 ,
+
.Xr pkg-search 8 ,
+
.Xr pkg-set 8 ,
+
.Xr pkg-shell 8 ,
+
.Xr pkg-shlib 8 ,
+
.Xr pkg-ssh 8 ,
+
.Xr pkg-stats 8 ,
+
.Xr pkg-update 8 ,
+
.Xr pkg-updating 8 ,
+
.Xr pkg-upgrade 8 ,
+
.Xr pkg-version 8
added docs/pkg.8
@@ -0,0 +1,401 @@
+
.\"
+
.\" FreeBSD pkg - a next generation package for the installation and maintenance
+
.\" of non-core utilities.
+
.\"
+
.\" Redistribution and use in source and binary forms, with or without
+
.\" modification, are permitted provided that the following conditions
+
.\" are met:
+
.\" 1. Redistributions of source code must retain the above copyright
+
.\"    notice, this list of conditions and the following disclaimer.
+
.\" 2. Redistributions in binary form must reproduce the above copyright
+
.\"    notice, this list of conditions and the following disclaimer in the
+
.\"    documentation and/or other materials provided with the distribution.
+
.\"
+
.\"
+
.\"     @(#)pkg.8
+
.\" $FreeBSD$
+
.\"
+
.Dd February 26, 2014
+
.Dt PKG 8
+
.Os
+
.\" ---------------------------------------------------------------------------
+
.Sh NAME
+
.Nm pkg ,
+
.Nm pkg-static
+
.Nd a utility for manipulating packages
+
.\" ---------------------------------------------------------------------------
+
.Sh SYNOPSIS
+
.Nm
+
.Op Fl v
+
.Op Fl d
+
.Op Fl l
+
.Op Fl N
+
.Op Fl j Ao jail name or id Ac | Fl c Ao chroot path Ac
+
.Op Fl C Ao configuration file Ac
+
.Op Fl R Ao repository configuration directory Ac
+
.Ao command Ac Ao Ar flags Ac
+
.\" ---------------------------------------------------------------------------
+
.Sh DESCRIPTION
+
provides an interface for manipulating packages - registering,
+
adding, removing and upgrading of packages.
+
.Nm pkg-static
+
is a statically linked variant of
+
.Nm
+
typically only used for the initial installation of
+
.Nm .
+
There are some differences in functionality.
+
See
+
.Xr pkg.conf 5
+
for details.
+
.\" ---------------------------------------------------------------------------
+
.Sh OPTIONS
+
The following options are supported by
+
.Nm :
+
.Bl -tag -width indent
+
.It Fl v
+
Displays the current version of
+
.Nm
+
.It Fl d
+
Show debug information
+
.It Fl l
+
List all the available command names, and exit without performing any
+
other action.
+
The
+
.Fl v
+
option takes precedence over
+
.Fl l
+
but
+
.Fl l
+
will override any other command line arguments.
+
.It Fl o Ao option=value Ac
+
Set configuration option for
+
.Nm
+
from the command line. Options that are set from the environment are
+
redefined. It is permitted to specify this option multiple times. 
+
.It Fl N
+
Activation status check mode.
+
Prevent
+
.Nm
+
from automatically creating or initializing the sqlite database in
+
.Pa /var/db/pkg/local.sqlite
+
if it does not already exist.
+
.Pp
+
Prevent
+
.Nm
+
from performing any actions if no packages are currently installed, on
+
the basis that a correctly initialised system using
+
.Nm
+
will always have at least the
+
.Nm
+
package itself registered.
+
.Pp
+
If used without any other arguments,
+
.Nm Fl N
+
will run the sanity tests and if successful print out a short message
+
showing how many packages are currently installed.
+
The exit status should be a reliable indication of whether a system
+
is configured to use
+
.Nm
+
as its package management system or not.
+
.Pp
+
Example usage:
+
.Bd -literal -offset indent
+
  if pkg -N >/dev/null 2>&1; then
+
    # pkgng-specifics
+
  else
+
    # pkg_install-specifics
+
  fi
+
.Ed
+
.Pp
+
The
+
.Fl N
+
flag was first released in the
+
.Pa /usr/sbin/pkg
+
bootstrapper
+
in FreeBSD 8.4,
+
but was missing from FreeBSD 9.1.
+
It may not be enough to just call
+
.Nm Fl N ,
+
as the bootstrapper may be invoked, or an error returned
+
from
+
.Nm .
+
The following script is the safest way to detect if
+
.Nm
+
is installed and activated:
+
.Bd -literal -offset indent
+
  if TMPDIR=/dev/null ASSUME_ALWAYS_YES=1 \\
+
       PACKAGESITE=file:///nonexistent \\
+
       pkg info -x 'pkg(-devel)?$' >/dev/null 2>&1; then
+
    # pkgng-specifics
+
  else
+
    # pkg_install-specifics
+
  fi
+
.Ed
+
.It Fl j Ao jail name or id Ac
+
.Nm
+
will execute in the given
+
.Ao jail name or id Ac ,
+
where
+
.Em name
+
matches
+
.Dq Cm jls Ar name
+
and
+
.Em id
+
matches
+
.Dq Cm jls Ar jid .
+
See
+
.Xr jail 8
+
and
+
.Xr jls 8 .
+
.It Fl c Ao chroot path Ac
+
.Nm
+
will chroot in the
+
.Ao chroot path Ac
+
Environment
+
.It Fl C Ao configuration file Ac
+
.Nm
+
will use the specified file as a configuration file
+
.It Fl R Ao repository configuration directory Ac
+
.Nm
+
will search the directory for per-repository configuration files.
+
This overrides any value of
+
.Ev REPOS_DIR
+
specified in the main configuration file.
+
.El
+
.\" ---------------------------------------------------------------------------
+
.Sh COMMANDS
+
The following commands are supported by
+
.Nm :
+
.Bl -tag -width indent
+
.It Ic help Ar command
+
Display usage information of the specified command.
+
.It Ic add
+
Install a package from either a local source or a remote one.
+
.Pp
+
When installing from remote source you need to specify the
+
protocol to use when fetching the package.
+
.Pp
+
Currently supported protocols are FTP, HTTP and HTTPS.
+
.It Ic annotate
+
Add, modify or delete tag-value style annotations on packages.
+
.It Ic audit
+
Audits installed packages against known vulnerabilities.
+
.It Ic autoremove
+
Delete packages which were automatically installed as dependencies and are not required any more.
+
.It Ic backup
+
Dump the local package database to a file specified on the command-line.
+
.It Ic bootstrap
+
This is for compatibility with the
+
.Xr pkg 7
+
bootstrapper.
+
If
+
.Nm
+
is already installed, nothing is done.
+
.Pp
+
If invoked with the
+
.Fl f
+
flag an attempt will be made to reinstall
+
.Nm
+
from remote repository.
+
This is not supported on FreeBSD 8.3 as it did not have
+
.Xr pkg 7 .
+
.It Ic check
+
Sanity checks installed packages.
+
.It Ic clean
+
Cleans the local cache of fetched remote packages.
+
.It Ic convert
+
Convert to and from the old
+
.Xr pkg_add 1
+
format.
+
.It Ic create
+
Create a package
+
.It Ic delete
+
Delete a package from the database and the system.
+
.It Ic fetch
+
Fetches packages from a remote repository.
+
.It Ic info
+
Display information about installed packages.
+
.It Ic install
+
Install a package from a remote package repository.
+
If a package is found in more than one remote repository,
+
then installation happens from the first one.
+
Downloading a package is tried from each package repository in turn,
+
until the package is successfully fetched.
+
.It Ic lock
+
Prevent modification or deletion of a package.
+
.It Ic plugins
+
List the available plugins.
+
.It Ic query
+
Query information about installed packages.
+
.It Ic register
+
Register a package in the database.
+
.It Ic repo
+
Create a local package repository for remote usage.
+
.It Ic rquery
+
Query information for remote repositories.
+
.It Ic search
+
Search for the given pattern in the remote package
+
repositories.
+
.It Ic set
+
Modify information in the installed database.
+
.It Ic shell
+
Fires up a sqlite shell to the local or remote database.
+
Extreme care should be taken when using this command.
+
.It Ic shlib
+
Displays which packages link to a specific shared library.
+
.It Ic stats
+
Display package database statistics.
+
.It Ic unlock
+
Unlocks packages, allowing them to be modified or deleted
+
.It Ic update
+
Update the available remote repositories as listed in
+
.Xr pkg.conf 5 .
+
.It Ic updating
+
Displays UPDATING entries of installed packages.
+
.It Ic upgrade
+
Upgrade a package to a newer version.
+
.It Ic version
+
Summarize installed versions of packages.
+
.It Ic which
+
Query the database for package(s) that installed a specific
+
file.
+
.El
+
.\" ---------------------------------------------------------------------------
+
.Sh ENVIRONMENT
+
The list of environment variables that affect the execution of
+
.Nm
+
is in
+
.Xr pkg.conf 5 .
+
.\" ---------------------------------------------------------------------------
+
.Sh FILES
+
See
+
.Xr pkg.conf 5 .
+
.\" ---------------------------------------------------------------------------
+
.Sh EXAMPLES
+
Search for a package:
+
.Dl $ pkg search perl
+
.Pp
+
Install a package:
+
.Dl Installing must specify a unique origin or version otherwise it will try installing all matches.
+
.Pp
+
.Dl % pkg install perl-5.14
+
.Pp
+
List installed packages:
+
.Dl $ pkg info
+
.Pp
+
Upgrade from remote repository:
+
.Dl % pkg upgrade
+
.Pp
+
Change the origin for an installed package:
+
.Dl % pkg set -o lang/perl5.12:lang/perl5.14
+
.Dl % pkg install -Rf lang/perl5.14
+
.Pp
+
List non-automatic packages:
+
.Dl $ pkg query -e '%a = 0' %o
+
.Pp
+
List automatic packages:
+
.Dl $ pkg query -e '%a = 1' %o
+
.Pp
+
Delete an installed package:
+
.Dl % pkg delete perl-5.14
+
.Pp
+
Remove unneeded dependencies:
+
.Dl % pkg autoremove
+
.Pp
+
Change a package from automatic to non-automatic, which will prevent
+
.Ic autoremove
+
from removing it:
+
.Dl % pkg set -A 0 perl-5.14
+
.Pp
+
Change a package from non-automatic to automatic, which will make
+
.Ic autoremove
+
allow it be removed once nothing depends on it:
+
.Dl % pkg set -A 1 perl-5.14
+
.Pp
+
Create package file from an installed package:
+
.Dl % pkg create -o /usr/ports/packages/All perl-5.14
+
.Pp
+
Determine which package installed a file:
+
.Dl $ pkg which /usr/local/bin/perl
+
.Pp
+
Audit installed packages for security advisories:
+
.Dl $ pkg audit
+
.Pp
+
Check installed packages for checksum mismatches:
+
.Dl # pkg check -s -a
+
.Pp
+
Check for missing dependencies:
+
.Dl # pkg check -d -a
+
.\" ---------------------------------------------------------------------------
+
.Sh SEE ALSO
+
.Xr SBUF 9 ,
+
.Xr elf 3 ,
+
.Xr fetch 3 ,
+
.Xr libarchive 3 ,
+
.Xr pkg_printf 3 ,
+
.Xr pkg_repos 3 ,
+
.Xr pkg-repository 5 ,
+
.Xr pkg.conf 5 ,
+
.Xr pkg-add 8 ,
+
.Xr pkg-annotate 8 ,
+
.Xr pkg-audit 8 ,
+
.Xr pkg-autoremove 8 ,
+
.Xr pkg-backup 8 ,
+
.Xr pkg-check 8 ,
+
.Xr pkg-clean 8 ,
+
.Xr pkg-config 8 ,
+
.Xr pkg-convert 8 ,
+
.Xr pkg-create 8 ,
+
.Xr pkg-delete 8 ,
+
.Xr pkg-fetch 8 ,
+
.Xr pkg-info 8 ,
+
.Xr pkg-install 8 ,
+
.Xr pkg-lock 8 ,
+
.Xr pkg-query 8 ,
+
.Xr pkg-register 8 ,
+
.Xr pkg-repo 8 ,
+
.Xr pkg-rquery 8 ,
+
.Xr pkg-search 8 ,
+
.Xr pkg-set 8 ,
+
.Xr pkg-shell 8 ,
+
.Xr pkg-shlib 8 ,
+
.Xr pkg-ssh 8 ,
+
.Xr pkg-stats 8 ,
+
.Xr pkg-update 8 ,
+
.Xr pkg-updating 8 ,
+
.Xr pkg-upgrade 8 ,
+
.Xr pkg-version 8 ,
+
.Xr pkg-which 8
+
.Pp
+
To build your own package set for one or multiple servers see
+
.Em ports-mgmt/poudriere
+
.\" ---------------------------------------------------------------------------
+
.Sh HISTORY
+
The
+
.Nm
+
command first appeared in
+
.Fx 9.1 .
+
.\" ---------------------------------------------------------------------------
+
.Sh AUTHORS AND CONTRIBUTORS
+
.An Baptiste Daroussin Aq bapt@FreeBSD.org
+
.An Julien Laffaye Aq jlaffaye@FreeBSD.org
+
.An Philippe Pepiot <phil@philpep.org>
+
.An Will Andrews <will@FreeBSD.org>
+
.An Marin Atanasov Nikolov <dnaeon@gmail.com>
+
.An Yuri Pankov <yuri.pankov@gmail.com>
+
.An Alberto Villa <avilla@FreeBSD.org>
+
.An Brad Davis <brd@FreeBSD.org>
+
.An Matthew Seaman <matthew@FreeBSD.org>
+
.An Bryan Drewery <bryan@shatow.net>
+
.An Eitan Adler <eadler@FreeBSD.org>
+
.An Romain Tarti\`ere <romain@FreeBSD.org>
+
.An Vsevolod Stakhov <vsevolod@FreeBSD.org>
+
.An Alexandre Perrin <alex@kaworu.ch>
+
.\" ---------------------------------------------------------------------------
+
.Sh BUGS
+
See the issue tracker at
+
.Em https://github.com/freebsd/pkg/issues
+
.Pp
+
Please direct questions and issues to the
+
.An pkg@FreeBSD.org
+
mailing list.
added docs/pkg.conf.5
@@ -0,0 +1,375 @@
+
.\"
+
.\" FreeBSD pkg - a next generation package for the installation and maintenance
+
.\" of non-core utilities.
+
.\"
+
.\" Redistribution and use in source and binary forms, with or without
+
.\" modification, are permitted provided that the following conditions
+
.\" are met:
+
.\" 1. Redistributions of source code must retain the above copyright
+
.\"    notice, this list of conditions and the following disclaimer.
+
.\" 2. Redistributions in binary form must reproduce the above copyright
+
.\"    notice, this list of conditions and the following disclaimer in the
+
.\"    documentation and/or other materials provided with the distribution.
+
.\"
+
.\"
+
.\"     @(#)pkg.1
+
.\" $FreeBSD$
+
.\"
+
.Dd December 15, 2013
+
.Dt PKG.CONF 5
+
.Os
+
.Sh NAME
+
.Nm "pkg.conf"
+
.Nd System-wide configuration file for
+
.Xr pkg 1
+
.Sh DESCRIPTION
+
.Nm
+
is the system-wide configuration file used by the
+
.Xr pkg 1
+
tools.
+
.Pp
+
The default location of this file is
+
.Pa /usr/local/etc/pkg.conf
+
.Pp
+
Lines in the file beginning with a "#" are comments
+
and are ignored.
+
.Pp
+
The file is in UCL format.
+
For more information on the syntax of UCL,
+
please visit the official UCL website - http://github.com/vstakhov/libucl.
+
.Pp
+
The following types of options are recognized -
+
boolean, string and list options.
+
.Pp
+
A boolean option is marked as enabled if one of the following values is
+
specified in the configuration file -
+
.Dv YES, TRUE
+
and
+
.Dv ON.
+
.Sh OPTIONS
+
The following options can be defined in
+
.Nm :
+
.Bl -tag -width ".Cm ASSUME_ALWAYS_YES(boolean)"
+
.It Cm ASSUME_ALWAYS_YES: boolean
+
When this option is enabled
+
.Xr pkg 1
+
will automatically assume "yes" to all questions
+
which require user confirmation before doing anything, as if it
+
the
+
.Fl y
+
flag was specified.
+
By default this option is disabled.
+
.It Cm PUBKEY: string
+
Specifies the location to the public RSA key used for signing the
+
repository database.
+
The default value for this file is
+
.Pa /etc/ssl/pkg.conf
+
.It Cm HANDLE_RC_SCRIPTS: boolean
+
This option when enabled
+
will automatically perform start/stop of services during package
+
installation and deinstallation.
+
Services are started on installation only
+
if they are enabled in
+
.Pa /etc/rc.conf .
+
By default this option is disabled.
+
.It Cm PACKAGESITE: string
+
Specifies the URL of the remote location to use
+
when fetching the database file and packages.
+
This supports using
+
.Sy ${ABI}
+
to create a dynamic URL based on the ABI being used. (deprecated)
+
.It Cm PKG_CACHEDIR: string
+
Specifies the cache directory for packages.
+
The default value
+
for this option is
+
.Pa /var/cache/pkg
+
.It Cm PKG_DBDIR: string
+
Specifies the directory to use for storing the package
+
database files.
+
The default value for this option is
+
.Pa /var/db/pkg
+
.It Cm PLIST_KEYWORDS_DIR: string
+
< To be added >
+
.It Cm PORTSDIR: string
+
Specifies the location to the Ports directory.
+
The default value
+
for this option is
+
.Pa /usr/ports
+
.It Cm SYSLOG: boolean
+
This option is enabled by default, log all the
+
installation/deinstallation/upgrade operation via syslog(3)
+
.It Cm AUTODEPS: boolean
+
Analyse the elf to add dependencies (shared libraries) that may have been
+
forgotten by the maintainer.
+
default: off
+
.It Cm ABI: string
+
the abi of the package you want to install, by default the /bin/sh abi is used
+
.It Cm DEVELOPER_MODE: boolean
+
Makes certain errors immediately fatal.
+
Adds various warnings and
+
suggestions to the output of
+
.Xr pkg 1
+
as an aide to port maintainers, including indicating when the port
+
might be marked as architecture independent.
+
default: off
+
.It Cm PERMISSIVE: boolean
+
Ignore conflicts while registering a package, note that the files conflicting
+
will not be marked as owned by the new package. (default: NO)
+
.It Cm PORTAUDIT_SITE: string
+
Specifies the remote location to use
+
when fetching the portaudit database.
+
See
+
.Xr pkg-audit 8
+
for more information.
+
.It Cm DEBUG_SCRIPTS: boolean
+
Activate debug mode for scripts (aka set -x)
+
.It Cm REPO_AUTOUPDATE: boolean
+
When true, automatically check for and download updates to
+
.Pa /var/db/pkg/repo.sqlite
+
when running one of:
+
.Nm pkg upgrade ,
+
.Nm pkg fetch ,
+
.Nm pkg install
+
or
+
.Nm pkg version -R .
+
(default: YES)
+
.It Cm PKG_ENV: Key/Value list
+
This tells
+
.Xr pkg 8
+
to set key/values passed in the environment.
+
Therefore underlying libraries
+
like
+
.Xr fetch 3
+
can be configured (e.g., setting
+
.Ev FTP_PROXY
+
and
+
.Ev HTTP_PROXY ) .
+
(default: empty)
+
.It Cm NAMESERVER: string
+
Bypass name resolution forcing a nameserver
+
.It Cm EVENT_PIPE: string
+
Send all events to the specified fifo or Unix socket, events will be formatted
+
in JSON.
+
.It Cm SSH_RESTRICT_DIR: string
+
Directory where the ssh subsystem will be restricted to
+
.It Cm DISABLE_MTREE: boolean
+
For experimental purposes only.
+
Not for use on production systems.
+
All this option does is prevent processing of
+
.Cm +MTREE
+
data when installing a package.
+
.Cm +MTREE
+
files are a legacy feature of the ports tree, which provide functionality
+
necessary for
+
.Xr pkg-install 8
+
as it cannot handle creating arbitrary directory heirarcies otherwise.
+
.Xr pkg 8
+
can create such directory structures natively, but currently still uses the
+
.Cm +MTREE
+
data.
+
This option exists to facilitate developing
+
.Cm +MTREE
+
free package sets.
+
.It Cm ALIAS: key/value list
+
Define local aliases for various
+
.Xr pkg 8
+
standard command lines.
+
Whenever the
+
.Em key
+
text occurs as a separate
+
.Sq action
+
word in a command line of the form
+
.Nm pkg Em key ... ,
+
substitute the
+
.Em value
+
text verbatim.
+
The replacement can consist of any sequence of text, which should form
+
a syntactically correct
+
.Xr pkg 8
+
command line when substituted in and followed by any remaining tokens from
+
the original command line.
+
.El
+
.Sh MULTIPLE REPOSITORIES
+
To use multiple repositories, specify the primary repository as shown above.
+
Further repositores can be configured using repository files.
+
.Pp
+
Repository files reside in
+
.Pa /etc/pkg/
+
and
+
.Pa /usr/local/etc/pkg/repos/ .
+
.Pp
+
Filenames are arbitrary, but should end in
+
.Sq .conf
+
For example
+
.Pa /usr/local/etc/pkg/repos/myrepo.conf .
+
.Pp
+
A repository file is in UCL format and has the following form (see
+
above for the description of most options):
+
.Bl -tag -width ".Cm myrepo:"
+
.It Cm myrepo:
+
.Bl -tag -width ".Cm MIRROR_TYPE: string"
+
.It Cm URL: string
+
URL for this repository only.
+
.It Cm ENABLED: boolean
+
The repository will be used only if this option is enabled. (default: YES)
+
.It Cm MIRROR_TYPE: string
+
MIRROR_TYPE for this repository only. (default: NONE).
+
Either
+
.Dv HTTP
+
or
+
.Dv SRV
+
or
+
.Dv NONE
+
can be used.
+
For a
+
.Cm MIRROR_TYPE
+
of
+
.Dv NONE ,
+
any of the URL schemes supported by
+
.Xr libfetch 3
+
can be used, including:
+
.Dv http:// ,
+
.Dv https:// ,
+
.Dv ftp:// ,
+
or
+
.Dv file://
+
plus
+
.Dv ssh:// .
+
Where
+
.Sy MIRROR_TYPE
+
is
+
.Dv SRV ,
+
you should use a
+
.Dv pkg+http://
+
or
+
.Dv pkg+https://
+
(etc.) URL scheme.
+
Using
+
.Dv http://
+
URLS implies that the hostname part is a simple hostname according to RFC 2616,
+
and is deprecated.
+
.It Cm SIGNATURE_TYPE: string
+
Specifies what type of signature this repository uses.
+
Can be either
+
.Dv NONE ,
+
.Dv PUBKEY or
+
.Dv FINGERPRINTS .
+
When
+
.Sy SIGNATURE_TYPE
+
is
+
.Dv NONE ,
+
then no signature checking will be done on the repository.
+
When
+
.Sy SIGNATURE_TYPE
+
is
+
.Dv PUBKEY ,
+
then the
+
.Sy PUBKEY
+
option will be used for signature verification.
+
When
+
.Sy SIGNATURE_TYPE
+
is
+
.Dv FINGERPRINTS ,
+
then the
+
.Sy FINGERPRINTS
+
option will be used for signature verification.
+
(default: NONE)
+
.It Cm PUBKEY: string
+
PUBKEY for this repository only. (default: NONE) (deprecated)
+
.It Cm FINGERPRINTS: string
+
This should be set to a path containing known signatures for the repository.
+
I.e., if
+
.Sy FINGERPRINTS
+
is set to
+
.Pa /usr/local/etc/pkg/fingerprints/myrepo ,
+
then the directories
+
.Pa /usr/local/etc/pkg/fingerprints/myrepo/trusted
+
and
+
.Pa /usr/local/etc/pkg/fingerprints/myrepo/revoked
+
should exist with known good and bad fingerprints, respectively.
+
Files in those directories should be in the format:
+
.Bd -literal -offset indent
+
function: sha256
+
fingerprint: sha256_representation_of_the_public_key
+
.Ed
+
.El
+
.El
+
.Pp
+
Note that
+
.Fa myrepo
+
could be any string.
+
However no two repositories may share the same name.
+
It is possible to specify more than one repository per file.
+
.Sh ENVIRONMENT
+
An environment variable with the same name as the option in the
+
configuration file always overrides the value of an option set in the
+
file.
+
.Sh EXAMPLES
+
Repository configuration file:
+
.Bd -literal -offset indent
+
FreeBSD: {
+
    url: "pkg+http://pkg.freebsd.org/${ABI}/latest",
+
    enabled: true,
+
    signature_type: "fingerprints",
+
    fingerprints: "/usr/share/keys/pkg",
+
    mirror_type: "srv"
+
}
+
.Ed
+
Example for pkg.conf
+
.Bd -literal -offset indent
+
pkg_dbdir: "/var/db/pkg"
+
pkg_cachedir: "/var/cache/pkg"
+
portsdir: "/usr/ports"
+
handle_rc_scripts: false
+
assume_always_yes: false
+
repos_dir: [
+
     "/etc/pkg",
+
     "/usr/local/etc/pkg/repos",
+
]
+
syslog: true
+
autodeps: true
+
developer_mode: false
+
pkg_env: {
+
    http_proxy: "http://myproxy:3128",
+
}
+
alias: {
+
    origin: "info -qo",
+
    nonauto: "query -e '%a == 0' '%n-%v'"
+
}
+
.Ed
+
.Sh SEE ALSO
+
.Xr fetch 3 ,
+
.Xr pkg_printf 3 ,
+
.Xr pkg_repos 3 ,
+
.Xr pkg-repository 5 ,
+
.Xr pkg 8 ,
+
.Xr pkg-add 8 ,
+
.Xr pkg-annotate 8 ,
+
.Xr pkg-audit 8 ,
+
.Xr pkg-autoremove 8 ,
+
.Xr pkg-backup 8 ,
+
.Xr pkg-check 8 ,
+
.Xr pkg-clean 8 ,
+
.Xr pkg-config 8 ,
+
.Xr pkg-convert 8 ,
+
.Xr pkg-create 8 ,
+
.Xr pkg-delete 8 ,
+
.Xr pkg-fetch 8 ,
+
.Xr pkg-info 8 ,
+
.Xr pkg-install 8 ,
+
.Xr pkg-lock 8 ,
+
.Xr pkg-query 8 ,
+
.Xr pkg-register 8 ,
+
.Xr pkg-repo 8 ,
+
.Xr pkg-rquery 8 ,
+
.Xr pkg-search 8 ,
+
.Xr pkg-set 8 ,
+
.Xr pkg-shell 8 ,
+
.Xr pkg-shlib 8 ,
+
.Xr pkg-ssh 8 ,
+
.Xr pkg-stats 8 ,
+
.Xr pkg-update 8 ,
+
.Xr pkg-updating 8 ,
+
.Xr pkg-upgrade 8 ,
+
.Xr pkg-version 8 ,
+
.Xr pkg-which 8
added docs/pkg_printf.3
@@ -0,0 +1,1043 @@
+
.\" Copyright (c) 1990, 1991, 1993
+
.\"     The Regents of the University of California.  All rights reserved.
+
.\" Copyright (c) 2013 Matthew Seaman <matthew@FreeBSD.org>
+
.\"
+
.\" This code is derived from software contributed to Berkeley by
+
.\" Chris Torek and the American National Standards Committee X3,
+
.\" on Information Processing Systems.
+
.\"
+
.\" Redistribution and use in source and binary forms, with or without
+
.\" modification, are permitted provided that the following conditions
+
.\" are met:
+
.\" 1. Redistributions of source code must retain the above copyright
+
.\"    notice, this list of conditions and the following disclaimer.
+
.\" 2. Redistributions in binary form must reproduce the above copyright
+
.\"    notice, this list of conditions and the following disclaimer in the
+
.\"    documentation and/or other materials provided with the distribution.
+
.\" 4. Neither the name of the University nor the names of its contributors
+
.\"    may be used to endorse or promote products derived from this software
+
.\"    without specific prior written permission.
+
.\"
+
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+
.\" 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
+
.\" SUCH DAMAGE.
+
.\"
+
.Dd November 29, 2013
+
.Dt PKG_PRINTF 3
+
.Os
+
.Sh NAME
+
.Nm pkg_printf , pkg_fprintf , pkg_dprintf , pkg_snprintf , pkg_asprintf ,
+
.Nm pkg_sbuf_printf ,
+
.Nm pkg_vprintf , pkg_vfprintf , pkg_vdprintf , pkg_vsnprintf , pkg_vasprintf ,
+
.Nm pkg_sbuf_vprintf
+
.Nd formatted output of package data
+
.Sh LIBRARY
+
.Lb libpkg
+
.Sh SYNOPSIS
+
.In pkg.h
+
.Ft int
+
.Fn pkg_printf "const char * restrict format" ...
+
.Ft int
+
.Fn pkg_fprintf "FILE * restrict stream" "const char * restrict format" ...
+
.Ft int
+
.Fn pkg_dprintf "int fd" "const char * restrict format" ...
+
.Ft int
+
.Fn pkg_snprintf "char * restrict str" "size_t size" "const char * restrict format" ...
+
.Ft int
+
.Fn pkg_asprintf "char **ret" "const char * restrict format" ...
+
.Ft struct sbuf *
+
.Fn pkg_sbuf_printf "struct sbuf * restrict sbuf" "const char * restrict format" ...
+
.In stdarg.h
+
.Ft int
+
.Fn pkg_vprintf "const char * restrict format" "va_list ap"
+
.Ft int
+
.Fn pkg_vfprintf "FILE * restrict stream" "const char * restrict format" "va_list ap"
+
.Ft int
+
.Fn pkg_vdprintf "int fd" "const char * restrict format" "va_list ap"
+
.Ft int
+
.Fn pkg_vsnprintf "char * restrict str" "size_t size" "const char * restrict format" "va_list ap"
+
.Ft int
+
.Fn pkg_vasprintf "char **ret" "const char * restrict format" "va_list ap"
+
.Ft struct sbuf *
+
.Fn pkg_sbuf_vprintf "struct sbuf * restrict sbuf" "const char * restrict format" "va_list ap"
+
.Sh DESCRIPTION
+
The
+
.Fn pkg_printf
+
family of functions produces output of package data according to a
+
.Fa format
+
as described below, analogously to the similarly named
+
.Xr printf 3
+
family of functions.
+
The
+
.Fn pkg_printf
+
and
+
.Fn pkg_vprintf
+
functions
+
write output to
+
.Dv stdout ,
+
the standard output stream;
+
.Fn pkg_fprintf
+
and
+
.Fn pkg_vfprintf
+
write output to the given output
+
.Fa stream ;
+
.Fn pkg_dprintf
+
and
+
.Fn pkg_vdprintf
+
write output to the given file descriptor;
+
.Fn pkg_snprintf
+
and
+
.Fn pkg_vsnprintf
+
write to the character string
+
.Fa str ;
+
.Fn pkg_asprintf
+
and
+
.Fn pkg_vasprintf
+
dynamically allocate a new string with
+
.Xr malloc 3
+
to write to;
+
.Fn pkg_sbuf_printf
+
and
+
.Fn pkg_sbuf_vprintf
+
write to the given sbuf structure.
+
.Pp
+
These functions write the output under the control of a
+
.Fa format
+
string that specifies how subsequent arguments
+
(or arguments accessed via the variable-length argument facilities of
+
.Xr stdarg 3 )
+
are converted for output.
+
.Pp
+
These functions return the number of characters printed
+
(not including the trailing
+
.Ql \e0
+
used to end output to strings) or a negative value if an output error occurs,
+
except for
+
.Fn pkg_snprintf
+
or
+
.Fn pkg_vsnprintf
+
which return the number of characters that would have been printed if the
+
.Fa size
+
were unlimited
+
(again, not including the final
+
.Ql \e0 )
+
and the two functions
+
.Fn pkg_sbuf_printf
+
and
+
.Fn pkg_sbuf_vprintf
+
which return the given sbuf pointer, or
+
.Dv NULL
+
in the case of errors.
+
.Pp
+
The
+
.Fn pkg_asprintf
+
and
+
.Fn pkg_vasprintf
+
functions set
+
.Fa *ret
+
to be a pointer to a buffer sufficiently large to hold the formatted string.
+
This pointer should be passed to
+
.Xr free 3
+
to release the allocated storage when it is no longer needed.
+
If sufficient space cannot be allocated,
+
.Fn pkg_asprintf
+
and
+
.Fn pkg_vasprintf
+
will return \-1 and set
+
.Fa ret
+
to be a
+
.Dv NULL
+
pointer.
+
.Pp
+
The
+
.Fn pkg_snprintf
+
and
+
.Fn pkg_vsnprintf
+
functions will write at most
+
.Fa size Ns \-1
+
of the characters printed into the output string
+
(the
+
.Fa size Ns 'th
+
character then gets the terminating
+
.Ql \e0 ) ;
+
if the return value is greater than or equal to the
+
.Fa size
+
argument, the string was too short
+
and some of the printed characters were discarded.
+
The output is always null-terminated.
+
.Pp
+
The format string is composed of zero or more directives:
+
ordinary
+
.\" multibyte
+
characters (not
+
.Cm % ) ,
+
which are copied unchanged to the output stream;
+
and conversion specifications, each of which results
+
in fetching zero or more subsequent arguments.
+
Each conversion specification is introduced by
+
the
+
.Cm %
+
character.
+
The arguments must correspond properly with the conversion specifier.
+
After the
+
.Cm % ,
+
the following appear in sequence:
+
.Bl -bullet
+
.It
+
Zero or more of the following flags:
+
.Bl -tag -width ".So \  Sc (space)"
+
.It Cm \&?
+
The value should be converted to the
+
.Dq first alternate form .
+
.Pp
+
For integer valued conversions
+
.Cm ( I , s
+
and
+
.Cm t )
+
this is a
+
.Vt humanized
+
form as a floating point value scaled to the range 0 \- 1000
+
followed by the SI powers-of-10 scale factor.
+
See
+
.Sx SCALE FACTORS .
+
.Pp
+
For array valued conversions
+
.Cm ( A, B , C , D , F , G , L , O , U , d ,
+
and
+
.Cm r )
+
generate
+
.Dq 0
+
if there are no items in the array,
+
.Dq 1
+
otherwise.
+
.Pp
+
For formats returning file modes
+
.Cm ( Dp
+
or
+
.Cm Fp )
+
print the mode in the style of
+
.Xr strmode 3 .
+
.Pp
+
For boolean valued formats
+
.Cm ( Dk , \^Dt , Fk , dk , rk , a
+
and
+
.Cm k )
+
generate either
+
.Dq yes
+
or
+
.Dq no
+
for
+
.Sq true
+
and
+
.Sq false
+
respectively.
+
.Pp
+
For the licence logic format
+
.Cm (l)
+
generate
+
.Dq \^
+
(empty),
+
.Dq &
+
or
+
.Dq |
+
for types
+
.Sq SINGLE ,
+
.Sq AND
+
and
+
.Sq OR
+
respectively.
+
.It Cm #
+
The value should be converted to the
+
.Dq second alternate form .
+
.Pp
+
For the integer valued conversions
+
.Cm ( I , s , t  )
+
this is a
+
.Dq humanized
+
form as a floating point value scaled to the range 0 \- 1024
+
followed by the IEE/IEC and SI powers-of-2 scale factor.
+
See
+
.Sx SCALE FACTORS .
+
.Pp
+
For array valued conversions
+
.Cm ( A, B , C , D , F , G , L , O , U , d ,
+
and
+
.Cm r )
+
generate the number of items in the array.
+
.Pp
+
For formats returning file modes
+
.Cm ( Dp
+
or
+
.Cm Fp )
+
print the mode as an octal integer with a leading 0.
+
.Pp
+
For boolean valued formats
+
.Cm ( Dk , \^Dt , Fk , dk , rk , a
+
and
+
.Cm k )
+
generate either
+
.Dq (*)
+
or
+
.Dq \^
+
(empty) for
+
.Sq true
+
and
+
.Sq false
+
respectively.
+
.Pp
+
For the licence logic format
+
.Cm (l)
+
generate
+
.Dq == ,
+
.Dq &&
+
or
+
.Dq ||
+
for types
+
.Sq SINGLE ,
+
.Sq AND
+
and
+
.Sq OR
+
respectively.
+
.It Cm 0 (zero)
+
Zero padding.
+
For all integer valued conversions and humanized numbers the converted
+
value is padded on the left with zeros rather than blanks.
+
.It Cm \-
+
A negative field width flag;
+
the converted value is to be left adjusted on the field boundary.
+
The converted value is padded on the right with blanks,
+
rather than on the left with blanks or zeros.
+
Applies to all scalar-valued conversions.
+
.Dq Cm \-
+
overrides a
+
.Dq Cm 0
+
if both are given.
+
.It So "\ " Sc (space)
+
A blank should be left before a positive number
+
produced by a signed conversion
+
.Cm ( I , s ,
+
or
+
.Cm t ) .
+
.It Cm +
+
A sign must always be placed before an integer or humanized
+
number produced by a numerical conversion.
+
A
+
.Dq Cm +
+
overrides a space if both are used.
+
.It Sq Cm '
+
Numerical (integer) conversions should be grouped and separated by
+
thousands using the non-monetary separator returned by
+
.Xr localeconv 3 .
+
Has no visible effect in the default
+
.Dq C
+
locale.
+
.El
+
.It
+
An optional decimal digit string specifying a minimum field width.
+
If the converted value has fewer characters than the field width,
+
it will be padded with spaces (or zeroes, if the zero-padding flag has
+
been given and the conversion supports it) on the left (or spaces on
+
the right, if the left-adjustment flag has been given) to fill out the
+
field width.
+
.It
+
One or two characters that specify the type of conversion to be applied.
+
.It
+
An optional
+
.Dq row format
+
for array valued conversions
+
.Cm ( A, B , C , D , F , G , L , O , U , d ,
+
and
+
.Cm r )
+
or the timestamp value conversion
+
.Cm ( t ) .
+
Which conversion characters are permissible in the row format is
+
context dependent.
+
See the
+
.Sx FORMAT CODES
+
section for details.
+
.El
+
.Ss SCALE FACTORS
+
Humanized number conversions scale the number to lie within
+
the range 1 \- 1000 (power of ten conversions using the
+
.Cm \&?
+
format modifier) or 1 \- 1024 (power of two conversions using the
+
.Cm #
+
format modifier) and append a scale factor as follows:
+
.Pp
+
The SI power of ten suffixes are
+
.Bl -column "Suffix" "Description" "1,000,000,000,000,000,000" -offset indent
+
.It Sy "Suffix" Ta Sy "Description" Ta Sy "Multiplier"
+
.It Li \^ Ta No (none) Ta 1
+
.It Li k Ta No kilo   Ta 1,000
+
.It Li M Ta No mega   Ta 1,000,000
+
.It Li G Ta No giga   Ta 1,000,000,000
+
.It Li T Ta No tera   Ta 1,000,000,000,000
+
.It Li P Ta No peta   Ta 1,000,000,000,000,000
+
.It Li E Ta No exa    Ta 1,000,000,000,000,000,000
+
.El
+
.Pp
+
The IEE/IEC (and now also SI) power of two suffixes are:
+
.Bl -column "Suffix" "Description" "1,000,000,000,000,000,000" -offset indent
+
.It Sy "Suffix" Ta Sy "Description" Ta Sy "Multiplier"
+
.It Li \^ Ta No (none) Ta 1
+
.It Li Ki Ta No kibi   Ta 1,024
+
.It Li Mi Ta No mebi   Ta 1,048,576
+
.It Li Gi Ta No gibi   Ta 1,073,741,824
+
.It Li Ti Ta No tebi   Ta 1,099,511,627,776
+
.It Li Pi Ta No pebi   Ta 1,125,899,906,842,624
+
.It Li Ei Ta No exbi   Ta 1,152,921,504,606,846,976
+
.El
+
.Ss FORMAT CODES
+
Format codes will format the output classified as the type shown in
+
square brackets.
+
.Cm %\^I
+
is unique in that it can only be used inside a
+
.Dq row format.
+
All other format codes may be used stand-alone.
+
When used in this fashion they will consume one argument of the indicated
+
type from the function's argument list.
+
.Pp
+
The array valued format codes
+
.Cm ( A , B , C , D , F , G , L , O , U , d ,
+
and
+
.Cm r )
+
and the timestamp format code
+
.Cm ( t )
+
can be followed by a
+
.Dq row format .
+
They will use a default row format (detailed below) if one is not
+
given explicitly.
+
.Pp
+
The row format is bracketed by the character sequences
+
.Cm %{
+
and
+
.Cm %}
+
and, for array values only, may be optionally divided into two by the
+
character sequence
+
.Cm %| .
+
For array values, it contains one or two strings containing any number
+
of a context sensitive subset of format conversions from those
+
described here.
+
For timestamp values it contains any number of format conversion
+
specifiers with meanings as described in
+
.Xr strftime 3 .
+
.Pp
+
The first or only format string is repeatedly processed for each of the
+
array items in turn.
+
The optional second format string is processed as a separator between
+
each of the array items.
+
If no row format is given, output will be generated according to a
+
default format, detailed below.
+
.Pp
+
Within a
+
.Dq row format
+
string, you may use any of the single-character non-array valued
+
format codes except for
+
.Cm %S ,
+
but only the two-character format codes which correspond
+
to the parent item and have the same first character.
+
Array valued format codes may not be used within row formats,
+
nor may you embed one
+
.Dq row format
+
within another.
+
Only one argument, a
+
.Vt struct pkg *
+
pointer is consumed from the argument list.
+
Thus this is a legal
+
.Fa format
+
string:
+
.Bd -literal -offset indent
+
"%B%{%n-%v:%Bn%|\en%}"
+
.Ed
+
.Pp
+
which serves to print out a list of the shared libraries required by
+
the programs within the package, each prefixed by the package name and
+
version.
+
.Pp
+
The conversion specifiers and their meanings are:
+
.Bl -tag -width ".Cm %Bn"
+
.It Cm \^%A
+
Annotations [array]
+
.Vt struct pkg *
+
.Pp
+
Default row format
+
.Cm "%A%{%An: %Av\en%|%}"
+
.It Cm \^%An
+
Annotation tag name [string]
+
.Vt struct pkg_note *
+
.It Cm \^%Av
+
Annotation value [string]
+
.Vt struct pkg_note *
+
.It Cm \^%B
+
Required shared libraries [array]
+
.Vt struct pkg *
+
.Pp
+
Default row format:
+
.Cm "%B%{%Bn\en%|%}"
+
.It Cm %Bn
+
Required shared library name [string]
+
.Vt struct pkg_shlib *
+
.It Cm %C
+
Categories [array]
+
.Vt struct pkg *
+
.Pp
+
Default row format:
+
.Cm "%C%{%Cn%|, %}"
+
.It Cm %Cn
+
Category name [string]
+
.Vt struct pkg_category *
+
.It Cm \^%D
+
Directories [array]
+
.Vt struct pkg *
+
.Pp
+
Default row format:
+
.Cm "%D%{%Dn\en%|%}"
+
.It Cm %Dg
+
Directory ownership: group name [string]
+
.Vt struct pkg_dir *
+
.It Cm %Dk
+
Directory keep flag [boolean]
+
.Vt struct pkg_dir *
+
.It Cm %Dn
+
Directory path name [string]
+
.Vt struct pkg_dir *
+
.It Cm %Dp
+
Directory permissions [mode]
+
.Vt struct pkg_dir *
+
.It Cm %Dt
+
Directory try flag [boolean]
+
.Vt struct pkg_dir *
+
.It Cm %Du
+
Directory ownership: user name [string]
+
.Vt struct pkg_dir *
+
.It Cm %F
+
Files [array]
+
.Vt struct pkg *
+
.Pp
+
Default row format:
+
.Cm "%F%{%Fn\en%|%}"
+
.It Cm %Fg
+
File ownership: group name [string]
+
.Vt struct pkg_file *
+
.It Cm %Fk
+
File keep flag [boolean]
+
.Vt struct pkg_file *
+
.It Cm %\^Fn
+
File path name [string]
+
.Vt struct pkg_file *
+
.It Cm %Fp
+
File permissions [mode]
+
.Vt struct pkg_file *
+
.It Cm %Fs
+
File SHA256 checksum [string]
+
.Vt struct pkg_file *
+
.It Cm %Fu
+
File ownership: user name [string]
+
.Vt struct pkg_file *
+
.It Cm %G
+
Groups [array]
+
.Vt struct pkg *
+
.Pp
+
Default row format:
+
.Cm "%G%{%Gn\en%|%}"
+
.It Cm %Gg
+
Group GID-string [string]
+
.Vt struct pkg_group *
+
.Pp
+
The GID-string consists of a colon-separated list containing the
+
group name,
+
.Sq *
+
as a place holder instead of any hashed password for the group,
+
the group identifier number and a possibly empty comma separated list
+
of the group members,
+
equivalent to one line from
+
.Fa /etc/group
+
as described in
+
.Xr group 5 .
+
.It Cm %Gn
+
Group name [string]
+
.Vt struct pkg_group *
+
.It Cm \^%I
+
Row counter [integer].
+
.Pp
+
This format code may only be used as part of a
+
.Dq row format.
+
.It Cm %L
+
Licenses [array]
+
.Vt struct pkg *
+
.Pp
+
Default row format:
+
.Cm "%L%{%Ln%| %l %}"
+
.It Cm %Ln
+
Licence name [string]
+
.Vt struct pkg_license *
+
.It Cm %M
+
Package message [string]
+
.Vt struct pkg *
+
.It Cm \&%N
+
Repository identity [string]
+
.Vt struct pkg *
+
.It Cm \^%O
+
Options [array]
+
.Vt struct pkg *
+
.Pp
+
Default row format:
+
.Cm "%O%{%On %Ov\en%|%}"
+
.It Cm %On
+
Option name [string]
+
.Vt struct pkg_option *
+
.It Cm %Ov
+
Option value [string]
+
.Vt struct pkg_option *
+
.It Cm %Od
+
Option default value [string] (if known: will produce an empty string
+
if not.)
+
.Vt struct pkg_option *
+
.It Cm %OD
+
Option description [string] (if known: will produce an empty string
+
if not.)
+
.Vt struct pkg_option *
+
.It Cm \^%R
+
Repository path - the path relative to the repository root that
+
package may be downloaded from [string].
+
.Vt struct pkg *
+
.It Cm \^%S
+
Arbitrary character string [string]
+
.Vt const char *
+
.Pp
+
.It Cm \^%U
+
Users [array]
+
.Vt struct pkg *
+
.Pp
+
Default row format:
+
.Cm "%U%{%Un\en%|%}"
+
.It Cm %Un
+
User name [string]
+
.Vt struct pkg_user *
+
.It Cm %Uu
+
User UID-str [string]
+
.Vt struct pkg_user *
+
.Pp
+
The UID-string consists of a colon-separated list containing the
+
user name,
+
.Sq *
+
as a place holder instead of any hashed password for the user, the
+
user identifier number, the user's login group id, an empty field for
+
the user login class, zero for the password change time, zero for the
+
account expiry time,
+
.Sq gecos
+
string (general information about the user), the user's home directory
+
and the user's login shell; equivalent to one line from
+
.Fa /etc/master.passwd
+
as described in
+
.Xr passwd 5 .
+
.It Cm \^%V
+
Old version [string].
+
Valid only during operations when one version of a package is being
+
replaced by another.
+
.Vt struct pkg *
+
.It Cm %a
+
Autoremove flag [boolean]
+
.Vt struct pkg *
+
.It Cm \^%b
+
Provided shared libraries [array]
+
.Vt struct pkg *
+
.Pp
+
Default row format:
+
.Cm "%b%{%bn\en%|%}"
+
.It Cm %bn
+
Provided shared library name [string]
+
.Vt struct pkg_shlib *
+
.It Cm %c
+
Comment [string]
+
.Vt struct pkg *
+
.It Cm %d
+
Dependencies [array]
+
.Vt struct pkg *
+
.Pp
+
Default row format:
+
.Cm "%d%{%dn-%dv\en%|%}"
+
.It Cm %dk
+
Dependency lock status [boolean]
+
.Vt struct pkg_dep *
+
.It Cm %dn
+
Dependency name [string]
+
.Vt struct pkg_dep *
+
.It Cm %do
+
Dependency origin [string]
+
.Vt struct pkg_dep *
+
.It Cm %dv
+
Dependency version [string]
+
.Vt struct pkg_dep *
+
.It Cm %e
+
Description [string]
+
.Vt struct pkg *
+
.It Cm %i
+
Additional information [string]
+
.Vt struct pkg *
+
.It Cm %k
+
Locking status [boolean]
+
.Vt struct pkg *
+
.It Cm %l
+
License logic [licence-logic]
+
.Vt struct pkg *
+
.It Cm %m
+
Maintainer [string]
+
.Vt struct pkg *
+
.It Cm %n
+
Package name [string]
+
.Vt struct pkg *
+
.It Cm %o
+
Origin [string]
+
.Vt struct pkg *
+
.It Cm %p
+
Prefix [string]
+
.Vt struct pkg *
+
.It Cm %r
+
Requirements [array]
+
.Vt struct pkg *
+
.Pp
+
Default row format:
+
.Cm "%r%{%rn-%rv\en%|%}"
+
.It Cm %rk
+
Requirement lock status [boolean]
+
.Vt struct pkg_dep *
+
.It Cm %rn
+
Requirement name [string]
+
.Vt struct pkg_dep *
+
.It Cm %ro
+
Requirement origin [string]
+
.Vt struct pkg_dep *
+
.It Cm %rv
+
Requirement version [string]
+
.Vt struct pkg_dep *
+
.It Cm %s
+
Package flat size [integer]
+
.Vt struct pkg *
+
.It Cm %t
+
Installation timestamp [date-time]
+
.Vt struct pkg *
+
.It Cm %u
+
Package checksum [string]
+
.Vt struct pkg *
+
.It Cm %v
+
Package version [string]
+
.Vt struct pkg *
+
.It Cm %w
+
Home page URL [string]
+
.Vt struct pkg *
+
.It Cm %%
+
A
+
.Ql %
+
is written.
+
No argument is converted.
+
The complete conversion specification
+
is
+
.Ql %% .
+
.El
+
.Pp
+
The decimal point
+
character is defined in the program's locale (category
+
.Dv LC_NUMERIC ) .
+
.Pp
+
In no case does a non-existent or small field width cause truncation of
+
a numeric field;
+
if the result of a conversion is wider than the field width, the field
+
is expanded to contain the conversion result.
+
.Ss ARRAY VALUES
+
Effective format modifiers:
+
.Bl -tag -width ".So \  Sc" -offset indent
+
.It Cm \&?
+
1st Alternate Form: 0 if the array is empty, 1 if it has any number
+
of elements within it
+
.It Cm #
+
2nd Alternate Form: The number of elements in the array
+
.El
+
.Ss STRING VALUES
+
Effective format modifiers:
+
.Bl -tag -width ".So \  Sc" -offset indent
+
.It Cm \-
+
Left align
+
.El
+
.Ss INTEGER VALUES
+
Effective format modifiers:
+
.Bl -tag -width ".So \  Sc" -offset indent
+
.It Cm \-
+
Left align
+
.It Cm \&?
+
1st Alternate Form: humanized number (decimal)
+
.It Cm #
+
2nd Alternate Form: humanized number (binary)
+
.It Cm 0
+
Zero pad
+
.It So "\ " Sc
+
Blank for plus
+
.It Cm +
+
Explicit + or \- sign
+
.It Sq Cm '
+
Thousands separator
+
.El
+
.Ss BOOLEAN VALUES
+
The two possible values
+
.Sq true
+
or
+
.Sq false
+
may be output in one of three different styles: plain; or alternate
+
forms 1 and 2 specified using format modifiers.
+
.Bl -column "FALSE" "Plain (%a)" "Alt 1 (%?a)" "Alt 2 (%#a)" -offset indent
+
.It Sy "Value" Ta Sy "Plain (%a)" Ta Sy "Alt 1 (%?a)" Ta Sy "Alt 2 (%#a)"
+
.It Li FALSE Ta No false Ta no  Ta \^
+
.It Li TRUE  Ta No true  Ta yes Ta (*)
+
.El
+
The second alternate form produces no output for
+
.Cm false .
+
.Pp
+
Effective format modifiers:
+
.Bl -tag -width ".Cm #" -offset indent
+
.It Cm \&?
+
1st Alternate Form
+
.It Cm #
+
2nd Alternate Form
+
.It Cm \-
+
Left align
+
.El
+
.Ss FILE MODE VALUES
+
The file mode is a bitmap representing setid, user, group and other
+
permissions.
+
The plain format prints it as an octal value, for example:
+
.Bd -literal -offset indent
+
4755
+
.Ed
+
.Pp
+
The first alternate form is similar but adds a leading zero:
+
.Bd -literal -offset indent
+
04755
+
.Ed
+
.Pp
+
Whilst the second alternate form produces a string in the style of
+
.Xr strmode 3 :
+
.Bd -literal -offset indent
+
-rwsr-xr-x
+
.Ed
+
.Pp
+
Note: there is always a space at the end of the
+
.Xr strmode 3
+
output.
+
.Pp
+
Effective format modifiers (all forms):
+
.Bl -tag -width ".Cm \-" -offset indent
+
.It Cm \-
+
Left align
+
.El
+
.Pp
+
Additionally, when the value is printed as an integer (ie. plain
+
or alternate form 1), these additional modifiers take effect:
+
.Bl -tag -width ".So \  Sc" -offset indent
+
.It Cm \&?
+
1st Alternate Form: add leading zero to octal integer
+
.It Cm 0
+
Zero pad
+
.El
+
.Ss LICENSE LOGIC VALUES
+
License-logic  is a three-valued type: one of
+
.Sq SINGLE ,
+
.Sq OR
+
or
+
.Sq AND ,
+
which shows whether the package is distributed under the terms of a
+
single license, or when there are several applicable licenses, whether
+
these should be treated as alternatives or applied in agregate.
+
There are three different output styles: plain; or alternate forms 1
+
and 2 specified using format modifiers.
+
.Bl -column "SINGLE" "Plain (%l)" "Alt 1 (%?l)" "Alt 2 (%#l)" -offset indent
+
.It Sy "Logic" Ta Sy "Plain (%l)" Ta Sy "Alt 1 (%?l)" Ta Sy "Alt 2 (%#l)"
+
.It Li SINGLE Ta No single Ta \^ Ta ==
+
.It Li OR     Ta No or     Ta |  Ta ||
+
.It Li AND    Ta No and    Ta &  Ta &&
+
.El
+
.Pp
+
Effective format modifiers:
+
.Bl -tag -width ".Cm #" -offset indent
+
.It Cm \&?
+
1st Alternate Form
+
.It Cm #
+
2nd Alternate Form
+
.It Cm \-
+
Left align
+
.El
+
.Ss DATE-TIME VALUES
+
When used outside of a
+
.Dq row format
+
string may be followed by an optional
+
.Xr strftime 3
+
format, enclosed in
+
.Cm %{
+
and
+
.Cm %} ,
+
which will be used to format the timestamp.
+
Otherwise the timestamp is printed as an integer value of the
+
number of seconds since the Epoch (00:00:00 UTC, 1 January 1970; see
+
.Xr time 3).
+
.Pp
+
Effective format modifiers:
+
.Bl -tag -width ".Cm \-" -offset indent
+
.It Cm \-
+
Left align
+
.El
+
.Pp
+
Additionally, when the value is printed as an integer (ie. without
+
.Xr strftime 3
+
format codes enclosed in
+
.Cm %{
+
and
+
.Cm %} ,
+
the following format modifiers are also effective:
+
.Bl -tag -width ".So \  Sc" -offset indent
+
.It Cm \&?
+
1st Alternate Form: humanized number (decimal)
+
.It Cm #
+
2nd Alternate Form: humanized number (binary)
+
.It Cm 0
+
Zero pad
+
.It So "\ " Sc
+
Blank for plus
+
.It Cm +
+
Explicit + or \- sign
+
.It Sq Cm '
+
Thousands separator
+
.El
+
.Sh EXAMPLES
+
To print the package installation timestamp in the form
+
.Dq Li "Sunday, July 3, 10:02" ,
+
.Bd -literal -offset indent
+
#include <pkg.h>
+
pkg_fprintf(stdout, "%t%{%A, %B %e, %R%}\en", pkg);
+
.Ed
+
.Pp
+
To print the package name and version, followed by the name and
+
version of all of the packages it depends upon, one per line, each
+
indented by one tab stop:
+
.Bd -literal -offset indent
+
#include <pkg.h>
+
pkg_printf("%n-%v\en%d%{\et%dn-%dv%|%\en%}\en", pkg, pkg, pkg);
+
.Ed
+
.Pp
+
Note that the item separator part of the row format is only printed
+
between individual row items.
+
Thus to fill the character array
+
.Fa buf
+
with a one-line string listing all of the licenses for the package
+
separated by
+
.Dq and
+
or
+
.Dq or
+
as appropriate:
+
.Bd -literal -offset indent
+
#include <pkg.h>
+
char buf[256];
+
pkg_snprintf(buf, sizeof(buf), "%L%{%Ln%| %l %}", pkg);
+
.Ed
+
.Sh ERRORS
+
In addition to the errors documented for the
+
.Xr write 2
+
system call, the
+
.Fn pkg_printf
+
family of functions may fail if:
+
.Bl -tag -width Er
+
.It Bq Er EILSEQ
+
An invalid wide character code was encountered.
+
.It Bq Er ENOMEM
+
Insufficient storage space is available.
+
.El
+
.Sh SEE ALSO
+
.Xr printf 1 ,
+
.Xr printf 3 ,
+
.Xr strftime 3 ,
+
.Xr setlocale 3
+
.Xr pkg_repos 3 ,
+
.Xr pkg-repository 5 ,
+
.Xr pkg.conf 5 ,
+
.Xr pkg 8 ,
+
.Xr pkg-add 8 ,
+
.Xr pkg-annotate 8 ,
+
.Xr pkg-audit 8 ,
+
.Xr pkg-autoremove 8 ,
+
.Xr pkg-backup 8 ,
+
.Xr pkg-check 8 ,
+
.Xr pkg-clean 8 ,
+
.Xr pkg-config 8 ,
+
.Xr pkg-convert 8 ,
+
.Xr pkg-create 8 ,
+
.Xr pkg-delete 8 ,
+
.Xr pkg-fetch 8 ,
+
.Xr pkg-info 8 ,
+
.Xr pkg-install 8 ,
+
.Xr pkg-lock 8 ,
+
.Xr pkg-query 8 ,
+
.Xr pkg-register 8 ,
+
.Xr pkg-repo 8 ,
+
.Xr pkg-rquery 8 ,
+
.Xr pkg-search 8 ,
+
.Xr pkg-set 8 ,
+
.Xr pkg-shell 8 ,
+
.Xr pkg-shlib 8 ,
+
.Xr pkg-ssh 8 ,
+
.Xr pkg-stats 8 ,
+
.Xr pkg-update 8 ,
+
.Xr pkg-updating 8 ,
+
.Xr pkg-upgrade 8 ,
+
.Xr pkg-version 8 ,
+
.Xr pkg-which 8
+
.Sh BUGS
+
The
+
.Nm pkg_printf
+
family of functions do not correctly handle multibyte characters in the
+
.Fa format
+
argument.
+
.Pp
+
There is no way to sort the output of array valued items.
+
.Sh SECURITY CONSIDERATIONS
+
Equivalents to the
+
.Fn sprintf
+
and
+
.Fn vsprintf
+
functions are not supplied.
+
Instead, use
+
.Fn pkg_snprintf
+
to write into a fixed length buffer without danger of overflow.
+
.Pp
+
The
+
.Fn pkg_printf
+
family, like the
+
.Fn printf
+
family of functions it is modelled on, is also easily misused in a manner
+
allowing malicious users to arbitrarily change a running program's
+
functionality by either causing the program
+
to print potentially sensitive data
+
.Dq "left on the stack" ,
+
or causing it to generate a memory fault or bus error
+
by dereferencing an invalid pointer.
+
.Pp
+
Programmers are therefore strongly advised to never pass untrusted strings
+
as the
+
.Fa format
+
argument, as an attacker can put format specifiers in the string
+
to mangle your stack,
+
leading to a possible security hole.
+
This holds true even if the string was built using a function like
+
.Fn snprintf ,
+
as the resulting string may still contain user-supplied conversion specifiers
+
for later interpolation by
+
.Fn pkg_printf .
+
.Pp
+
Always use the proper secure idiom:
+
.Pp
+
.Dl "pkg_snprintf(buffer, sizeof(buffer), \*q%s\*q, string);"
added docs/pkg_repos.3
@@ -0,0 +1,124 @@
+
.Dd November 29, 2013
+
.Dt PKG_REPOS 3
+
.Os
+
.Sh NAME
+
.Nm pkg_repos , pkg_repos_total_count , pkg_repos_activated_count
+
.Nm pkg_repo_url , pkg_repo_ident , pkg_repo_name , pkg_repo_ident_from_name
+
.Nm pkg_repo_key , pkg_repo_fingerprints
+
.Nm pkg_repo_signature_type , pkg_repo_mirror_type , pkg_repo_enabled
+
.Nm pkg_repo_find_ident , pkg_repo_find_name
+
.Nd manipulate repositories
+
.Sh LIBRARY
+
.Lb libpkg
+
.Sh SYNOPSIS
+
.In pkg.h
+
.Ft int
+
.Fn pkg_repos "struct pkg_repo **r"
+
.Ft int
+
.Fn pkg_repos_total_count "void"
+
.Ft int
+
.Fn pkg_repos_activated_count "void"
+
.Ft const char *
+
.Fn pkg_repos_url "struct pkg_repo *"
+
.Ft const char *
+
.Fn pkg_repo_ident "struct pkg_repo *"
+
.Ft const char *
+
.Fn pkg_repo_name "struct pkg_repo *"
+
.Ft const char *
+
.Fn pkg_repo_ident_from_name "const char *"
+
.Ft const char *
+
.Fn pkg_repo_key "struct pkg_repo *"
+
.Ft const char *
+
.Fn pkg_repo_fingerprints "struct pkg_repo *"
+
.Ft signature_t
+
.Fn pkg_repo_signature_type "struct pkg_repo *"
+
.Ft bool
+
.Fn pkg_repo_enabled "struct pkg_repo *"
+
.Ft mirror_t
+
.Fn pkg_repo_mirror_type "struct pkg_repo *"
+
.Ft struct pkg_repo *
+
.Fn pkg_repo_find_ident "const char *ident";
+
.Ft struct pkg_repo *
+
.Fn pkg_repo_find_name "const char *name";
+
.Sh DESCRIPTION
+
.Fn pkg_repos
+
Takes the address of a pointer to the repository. The pointer should be
+
initialized to NULL before being passed to the function, on each iteration
+
the r will point to the next repository. Returns EPKG_FATAL if an error
+
occured, otherwise return EPKG_OK until the last repository is found in that
+
case EPKG_END is returned.
+
.Pp
+
.Fn pkg_repos_total_count
+
returns the total number of defined repositories.
+
.Pp
+
.Fn pkg_repos_activated_count
+
returns the total number of
+
.Qq enabled
+
repositories.
+
.Pp
+
.Fn pkg_repo_url
+
takes a pointer to a repository as argument and returns the
+
.Qq url
+
defined for this repository.
+
.Pp
+
.Fn pkg_repo_ident
+
takes a pointer to a repository as argument and returns the internal
+
identification string of the repository.
+
.Pp
+
.Fn pkg_repo_name
+
takes a pointer to a repository as argument and returns the
+
.Qq name
+
of the repository.
+
.Pp
+
.Fn pkg_repo_key
+
takes a pointer to a repository as argument and returns the path to
+
the public key. If the repository is not signed by a public key, NULL
+
will be returned.
+
.Pp
+
.Fn pkg_repo_fingerprints
+
takes a pointer to a repository as argument and returns the path to
+
the fingerprints. If the repository is not signed using the
+
.Qq FINGERPRINT
+
method, NULL will be returned.
+
.Pp
+
.Fn pkg_repo_signature_type
+
Take a pointer to a repository as argument and return the type of
+
signature it uses.
+
.Bl -tag -width SIG_FINGERPRINT
+
.It Cm SIG_NONE
+
The repository isn't signed
+
.It Cm SIG_PUBKEY
+
The repository is signed using the PUBKEY method
+
.It Cm SIG_FINGERPRINT
+
The repository is signed using the FINGERPRINT method
+
.El
+
.Pp
+
.Fn pkg_repo_enabled
+
takes a pointer to a repository as argument and returns
+
.Cm true
+
if the repository is
+
.Qq enabled .
+
Otherwise, return
+
.Cm false .
+
.Pp
+
.Fn pkg_repo_mirror_type
+
takes a pointer to a repository as argument and returns the type of
+
mirroring it uses.
+
.Bl -tag -width NOMIRROR
+
.It Cm SRV
+
The repository is using SRV record query to get the mirrors.
+
.It Cm HTTP
+
The repository is using the HTTP query method to get the mirrors.
+
.It Cm NOMIRROR
+
The repository does not have any mirror.
+
.El
+
.Pp
+
.Fn pkg_repo_find_ident
+
Take an internal indentification string as argument and return a pointer to
+
a reprository. If no repository matches, NULL is returned.
+
.Pp
+
.Fn pkg_repo_find_name
+
Take a repository
+
.Qq name
+
as argument and return a pointer to a reprository. If no repository matches,
+
NULL is returned.
deleted libpkg/pkg-repository.5
@@ -1,276 +0,0 @@
-
.\"
-
.\" FreeBSD pkg - a next generation package for the installation and
-
.\" maintenance of non-core utilities.
-
.\"
-
.\" Redistribution and use in source and binary forms, with or without
-
.\" modification, are permitted provided that the following conditions
-
.\" are met:
-
.\" 1. Redistributions of source code must retain the above copyright
-
.\"    notice, this list of conditions and the following disclaimer.
-
.\" 2. Redistributions in binary form must reproduce the above copyright
-
.\"    notice, this list of conditions and the following disclaimer in the
-
.\"    documentation and/or other materials provided with the distribution.
-
.\"
-
.\"
-
.\"     @(#)pkg-repository.5
-
.\" $FreeBSD$
-
.\"
-
.Dd September 30, 2013
-
.Dt PKG-REPOSITORY 5
-
.Os
-
.Sh NAME
-
.Nm "package repository"
-
.Nd format and operation of package repositories used by
-
.Xr pkg 8 .
-
.Sh DESCRIPTION
-
.Nm "Package repositories"
-
used by the
-
.Xr pkg 8
-
program consist of one or more collections of
-
.Dq package tarballs
-
together with package catalogues and optionally various other
-
collected package metadata.
-
.Pp
-
Each collection consists of packages suitable for installation on a
-
specific system
-
.Sy ABI :
-
a combination of operating system, CPU architecture, OS version, word
-
size, and for certain processors endianness or similar attributes.
-
.Pp
-
The package collections are typically made available to users for
-
download via a web or FTP server although various other means of access
-
may be employed.
-
Encoding the
-
.Sy ABI
-
value into the repository URL allows
-
.Nm pkg
-
to automatically select the correct package collection by expanding the
-
special token
-
.Cm ${ABI}
-
in
-
.Pa pkg.conf .
-
.Pp
-
Repositories may be mirrored over several sites:
-
.Nm pkg
-
has built-in support for discovering available mirrors dynamically
-
given a common URL by several mechanisms.
-
.Sh FILESYSTEM ORGANIZATION
-
Only very minimal constraints on repository layout are prescribed by
-
.Nm pkg .
-
The following constraints are all that must be met:
-
.Bl -bullet
-
.It
-
A repository may contain several package collections with parallel
-
.Cm REPOSITORY_ROOTs
-
in order to support diverse system
-
.Cm ABIs .
-
.It
-
All of the content for one
-
.Sy ABI
-
should be accessible in a filesystem or URL hierarchy beneath the
-
.Cm REPOSITORY_ROOT .
-
.It
-
All packages available beneath one
-
.Cm REPOSITORY_ROOT
-
should be binary compatible with a specific system
-
.Cm ABI .
-
.It
-
The repository catalogue is located at the apex of the
-
repository, at a specific location relative to the
-
.Cm REPOSITORY_ROOT .
-
.El
-
.Pp
-
Package catalogues contain the paths relative to the
-
.Cm REPOSITORY_ROOT
-
for each package, allowing the full URL for downloading the
-
package to be constructed.
-
.Pp
-
Where a package may be applicable to more than one
-
.Sy ABI
-
(e.g., it contains only text files) symbolic or hard links, URL mappings
-
or other techniques may be utilised to avoid duplication of storage.
-
.Pp
-
Although no specific filesystem organization is required, the usual
-
convention (inherited from
-
.Xr pkg-install 8 )
-
is to create a filesystem hierarchy thus:
-
.Bl -tag -width "REPOSITORY"
-
.It Pa $REPOSITORY_ROOT/All
-
One directory that contains every package available from the
-
repository for that
-
.Sy ABI .
-
Packages are stored as package tarballs identified by name and
-
version.
-
This directory may contain several different versions of each package
-
accumulated over time, but the repository catalogue will only record
-
the latest version for each distinct package origin.
-
.It Pa $REPOSITORY_ROOT/Latest/
-
May contains symbolic links to the latest versions of packages in the
-
.Pa All
-
directory.
-
Symbolic links contain a
-
.Sq latest link
-
style name only, without version.
-
As the whole
-
.Sq latest link
-
concept is rendered obsolete by
-
.Nm pkg ,
-
this will usually contain only the
-
.Pa pkg.txz
-
link, used for bootstrapping
-
.Nm pkg
-
itself on a new system.
-
.It Pa $REPOSITORY_ROOT/digests.txz
-
Package checksum data and optionally package signatures.
-
.It Pa $REPOSITORY_ROOT/packagesite.txz
-
Contains one
-
.Cm YAML
-
document, which is the concatenation of the
-
.Pa +MANIFEST
-
files from each of the packages in the repository.
-
This is used by
-
.Nm pkg-1.1
-
or later.
-
.It Pa $REPOSITORY_ROOT/repo.txz
-
(Deprecated).
-
Contains the package manifest data as above, but pre-loaded into
-
an Sqlite database.
-
This is supplied for backwards compatibility with
-
.Nm pkg-1.0 .
-
.It Pa $REPOSITORY_ROOT/filesite.txz
-
(Optional).
-
Contains a YAML document listing all of the files contained in all
-
of the packages within the repository.
-
.Pp
-
The repository may optionally contain sub-directories corresponding to
-
the package origins within the
-
.Os
-
ports tree.
-
.El
-
.Pp
-
Each of the packages listed in the repository catalogue must have a
-
unique
-
.Cm origin .
-
There are no other constraints: package sets are not required to be
-
either complete (i.e., with all dependencies satisfied) or
-
self-consistent within a single repository.
-
.Sh REPOSITORY ACCESS METHODS
-
.Nm pkg
-
uses standard network protocols for repository access.
-
Any URL scheme understood by the
-
.Xr fetch 3
-
library may be used
-
.Cm ( HTTP ,
-
.Cm HTTPS ,
-
.Cm FTP
-
or
-
.Cm FILE )
-
as well as remote access over
-
.Cm SSH .
-
See
-
.Xr fetch 3
-
for a description of additional environment variables, including
-
.Ev FETCH_BIND_ADDRESS ,
-
.Ev FTP_LOGIN ,
-
.Ev FTP_PASSIVE_MODE ,
-
.Ev FTP_PASSWORD ,
-
.Ev FTP_PROXY ,
-
.Ev ftp_proxy ,
-
.Ev HTTP_AUTH ,
-
.Ev HTTP_PROXY ,
-
.Ev http_proxy ,
-
.Ev HTTP_PROXY_AUTH ,
-
.Ev HTTP_REFERER ,
-
.Ev HTTP_USER_AGENT ,
-
.Ev NETRC ,
-
.Ev NO_PROXY No and
-
.Ev no_proxy .
-
.Sh REPOSITORY MIRRORING
-
Multiple copies of a repository can be provided for resilience or
-
to scale up site capacity.
-
Two schemes are provided to auto-discover sets of mirrors given a
-
single repository URL.
-
.Bl -tag -width "HTTP"
-
.It Cm HTTP
-
The repository URL should download a text document containing a sequence
-
of lines beginning with
-
.Sq URL:
-
followed by any amount of while space and one URL for a repository
-
mirror.
-
Any lines not matching this pattern are ignored.
-
Mirrors are tried in the order listed until a download succeeds.
-
.It Cm SRV
-
For an SRV mirrored repository where the URL is specified as
-
.Pa http://pkgrepo.example.org/
-
.Cm SRV
-
records should be set up in the DNS:
-
.Bd -literal -offset indent
-
$ORIGIN example.com
-
_http._tcp.pkgrepo IN SRV 10 1 80 mirror0
-
                   IN SRV 20 1 80 mirror1
-
.Ed
-
.Pp
-
where the
-
.Cm SRV
-
priority and weight parameters are used to control search order and
-
traffic weighting between sites, and the port number and hostname are
-
used to construct the individual mirror URLs.
-
.El
-
.Pp
-
Mirrored repositories are assumed to have identical content, and only
-
one copy of the repository catalogue will be downloaded to apply to
-
all mirror sites.
-
.Sh WORKING WITH MULTIPLE REPOSITORIES
-
Where several different repositories are configured
-
.Nm pkg
-
will search amongst them all in the order specified,
-
unless directed to use a single repository by the
-
.Fl r
-
flag to
-
.Xr pkg-fetch 8 ,
-
.Xr pkg-install 8 ,
-
.Xr pkg-upgrade 8 ,
-
.Xr pkg-search 8
-
or
-
.Xr pkg-rquery 8 .
-
The search order is as displayed in the output of
-
.Bd -literal -offset indent
-
pkg -v -v
-
.Ed
-
.Pp
-
Where several different versions of the same package are available,
-
.Nm pkg
-
will select the one with the highest version to install or to upgrade
-
an installed package to, even if a lower numbered version can be found
-
in a repository earlier in the list.
-
This applies even if an explicit version is stated on the command line.
-
Thus if packages
-
.Pa example-1.0.0
-
and
-
.Pa example-1.0.1
-
are available in configured repositories, then
-
.Bd -literal -offset indent
-
pkg install example-1.0.0
-
.Ed
-
.Pp
-
will actually result in
-
.Pa example-1.0.1
-
being installed.
-
To override this behaviour, on first installation of the package,
-
select the repository with the appropriate version:
-
.Bd -literal -offset indent
-
pkg install -r repo-a example-1.0.0
-
.Ed
-
.Pp
-
and then to make updates to that package
-
.Dq sticky
-
to the same repository, add an annotation to the package:
-
.Bd -literal -offset indent
-
pkg annotate -A example repository repo-a
-
.Ed
-
.Pp
-
.Sh SEE ALSO
-
.Xr pkg 8
-
.Xr pkg.conf 5
-
.Xr pkg-repo 8
-
.Xr fetch 3
deleted libpkg/pkg_printf.3
@@ -1,1009 +0,0 @@
-
.\" Copyright (c) 1990, 1991, 1993
-
.\"     The Regents of the University of California.  All rights reserved.
-
.\" Copyright (c) 2013 Matthew Seaman <matthew@FreeBSD.org>
-
.\"
-
.\" This code is derived from software contributed to Berkeley by
-
.\" Chris Torek and the American National Standards Committee X3,
-
.\" on Information Processing Systems.
-
.\"
-
.\" Redistribution and use in source and binary forms, with or without
-
.\" modification, are permitted provided that the following conditions
-
.\" are met:
-
.\" 1. Redistributions of source code must retain the above copyright
-
.\"    notice, this list of conditions and the following disclaimer.
-
.\" 2. Redistributions in binary form must reproduce the above copyright
-
.\"    notice, this list of conditions and the following disclaimer in the
-
.\"    documentation and/or other materials provided with the distribution.
-
.\" 4. Neither the name of the University nor the names of its contributors
-
.\"    may be used to endorse or promote products derived from this software
-
.\"    without specific prior written permission.
-
.\"
-
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-
.\" 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
-
.\" SUCH DAMAGE.
-
.\"
-
.Dd November 29, 2013
-
.Dt PKG_PRINTF 3
-
.Os
-
.Sh NAME
-
.Nm pkg_printf , pkg_fprintf , pkg_dprintf , pkg_snprintf , pkg_asprintf ,
-
.Nm pkg_sbuf_printf ,
-
.Nm pkg_vprintf , pkg_vfprintf , pkg_vdprintf , pkg_vsnprintf , pkg_vasprintf ,
-
.Nm pkg_sbuf_vprintf
-
.Nd formatted output of package data
-
.Sh LIBRARY
-
.Lb libpkg
-
.Sh SYNOPSIS
-
.In pkg.h
-
.Ft int
-
.Fn pkg_printf "const char * restrict format" ...
-
.Ft int
-
.Fn pkg_fprintf "FILE * restrict stream" "const char * restrict format" ...
-
.Ft int
-
.Fn pkg_dprintf "int fd" "const char * restrict format" ...
-
.Ft int
-
.Fn pkg_snprintf "char * restrict str" "size_t size" "const char * restrict format" ...
-
.Ft int
-
.Fn pkg_asprintf "char **ret" "const char * restrict format" ...
-
.Ft struct sbuf *
-
.Fn pkg_sbuf_printf "struct sbuf * restrict sbuf" "const char * restrict format" ...
-
.In stdarg.h
-
.Ft int
-
.Fn pkg_vprintf "const char * restrict format" "va_list ap"
-
.Ft int
-
.Fn pkg_vfprintf "FILE * restrict stream" "const char * restrict format" "va_list ap"
-
.Ft int
-
.Fn pkg_vdprintf "int fd" "const char * restrict format" "va_list ap"
-
.Ft int
-
.Fn pkg_vsnprintf "char * restrict str" "size_t size" "const char * restrict format" "va_list ap"
-
.Ft int
-
.Fn pkg_vasprintf "char **ret" "const char * restrict format" "va_list ap"
-
.Ft struct sbuf *
-
.Fn pkg_sbuf_vprintf "struct sbuf * restrict sbuf" "const char * restrict format" "va_list ap"
-
.Sh DESCRIPTION
-
The
-
.Fn pkg_printf
-
family of functions produces output of package data according to a
-
.Fa format
-
as described below, analogously to the similarly named
-
.Xr printf 3
-
family of functions.
-
The
-
.Fn pkg_printf
-
and
-
.Fn pkg_vprintf
-
functions
-
write output to
-
.Dv stdout ,
-
the standard output stream;
-
.Fn pkg_fprintf
-
and
-
.Fn pkg_vfprintf
-
write output to the given output
-
.Fa stream ;
-
.Fn pkg_dprintf
-
and
-
.Fn pkg_vdprintf
-
write output to the given file descriptor;
-
.Fn pkg_snprintf
-
and
-
.Fn pkg_vsnprintf
-
write to the character string
-
.Fa str ;
-
.Fn pkg_asprintf
-
and
-
.Fn pkg_vasprintf
-
dynamically allocate a new string with
-
.Xr malloc 3
-
to write to;
-
.Fn pkg_sbuf_printf
-
and
-
.Fn pkg_sbuf_vprintf
-
write to the given sbuf structure.
-
.Pp
-
These functions write the output under the control of a
-
.Fa format
-
string that specifies how subsequent arguments
-
(or arguments accessed via the variable-length argument facilities of
-
.Xr stdarg 3 )
-
are converted for output.
-
.Pp
-
These functions return the number of characters printed
-
(not including the trailing
-
.Ql \e0
-
used to end output to strings) or a negative value if an output error occurs,
-
except for
-
.Fn pkg_snprintf
-
or
-
.Fn pkg_vsnprintf
-
which return the number of characters that would have been printed if the
-
.Fa size
-
were unlimited
-
(again, not including the final
-
.Ql \e0 )
-
and the two functions
-
.Fn pkg_sbuf_printf
-
and
-
.Fn pkg_sbuf_vprintf
-
which return the given sbuf pointer, or
-
.Dv NULL
-
in the case of errors.
-
.Pp
-
The
-
.Fn pkg_asprintf
-
and
-
.Fn pkg_vasprintf
-
functions set
-
.Fa *ret
-
to be a pointer to a buffer sufficiently large to hold the formatted string.
-
This pointer should be passed to
-
.Xr free 3
-
to release the allocated storage when it is no longer needed.
-
If sufficient space cannot be allocated,
-
.Fn pkg_asprintf
-
and
-
.Fn pkg_vasprintf
-
will return \-1 and set
-
.Fa ret
-
to be a
-
.Dv NULL
-
pointer.
-
.Pp
-
The
-
.Fn pkg_snprintf
-
and
-
.Fn pkg_vsnprintf
-
functions will write at most
-
.Fa size Ns \-1
-
of the characters printed into the output string
-
(the
-
.Fa size Ns 'th
-
character then gets the terminating
-
.Ql \e0 ) ;
-
if the return value is greater than or equal to the
-
.Fa size
-
argument, the string was too short
-
and some of the printed characters were discarded.
-
The output is always null-terminated.
-
.Pp
-
The format string is composed of zero or more directives:
-
ordinary
-
.\" multibyte
-
characters (not
-
.Cm % ) ,
-
which are copied unchanged to the output stream;
-
and conversion specifications, each of which results
-
in fetching zero or more subsequent arguments.
-
Each conversion specification is introduced by
-
the
-
.Cm %
-
character.
-
The arguments must correspond properly with the conversion specifier.
-
After the
-
.Cm % ,
-
the following appear in sequence:
-
.Bl -bullet
-
.It
-
Zero or more of the following flags:
-
.Bl -tag -width ".So \  Sc (space)"
-
.It Cm \&?
-
The value should be converted to the
-
.Dq first alternate form .
-
.Pp
-
For integer valued conversions
-
.Cm ( I , s
-
and
-
.Cm t )
-
this is a
-
.Vt humanized
-
form as a floating point value scaled to the range 0 \- 1000
-
followed by the SI powers-of-10 scale factor.
-
See
-
.Sx SCALE FACTORS .
-
.Pp
-
For array valued conversions
-
.Cm ( A, B , C , D , F , G , L , O , U , d ,
-
and
-
.Cm r )
-
generate
-
.Dq 0
-
if there are no items in the array,
-
.Dq 1
-
otherwise.
-
.Pp
-
For formats returning file modes
-
.Cm ( Dp
-
or
-
.Cm Fp )
-
print the mode in the style of
-
.Xr strmode 3 .
-
.Pp
-
For boolean valued formats
-
.Cm ( Dk , \^Dt , Fk , dk , rk , a
-
and
-
.Cm k )
-
generate either
-
.Dq yes
-
or
-
.Dq no
-
for
-
.Sq true
-
and
-
.Sq false
-
respectively.
-
.Pp
-
For the licence logic format
-
.Cm (l)
-
generate
-
.Dq \^
-
(empty),
-
.Dq &
-
or
-
.Dq |
-
for types
-
.Sq SINGLE ,
-
.Sq AND
-
and
-
.Sq OR
-
respectively.
-
.It Cm #
-
The value should be converted to the
-
.Dq second alternate form .
-
.Pp
-
For the integer valued conversions
-
.Cm ( I , s , t  )
-
this is a
-
.Dq humanized
-
form as a floating point value scaled to the range 0 \- 1024
-
followed by the IEE/IEC and SI powers-of-2 scale factor.
-
See
-
.Sx SCALE FACTORS .
-
.Pp
-
For array valued conversions
-
.Cm ( A, B , C , D , F , G , L , O , U , d ,
-
and
-
.Cm r )
-
generate the number of items in the array.
-
.Pp
-
For formats returning file modes
-
.Cm ( Dp
-
or
-
.Cm Fp )
-
print the mode as an octal integer with a leading 0.
-
.Pp
-
For boolean valued formats
-
.Cm ( Dk , \^Dt , Fk , dk , rk , a
-
and
-
.Cm k )
-
generate either
-
.Dq (*)
-
or
-
.Dq \^
-
(empty) for
-
.Sq true
-
and
-
.Sq false
-
respectively.
-
.Pp
-
For the licence logic format
-
.Cm (l)
-
generate
-
.Dq == ,
-
.Dq &&
-
or
-
.Dq ||
-
for types
-
.Sq SINGLE ,
-
.Sq AND
-
and
-
.Sq OR
-
respectively.
-
.It Cm 0 (zero)
-
Zero padding.
-
For all integer valued conversions and humanized numbers the converted
-
value is padded on the left with zeros rather than blanks.
-
.It Cm \-
-
A negative field width flag;
-
the converted value is to be left adjusted on the field boundary.
-
The converted value is padded on the right with blanks,
-
rather than on the left with blanks or zeros.
-
Applies to all scalar-valued conversions.
-
.Dq Cm \-
-
overrides a
-
.Dq Cm 0
-
if both are given.
-
.It So "\ " Sc (space)
-
A blank should be left before a positive number
-
produced by a signed conversion
-
.Cm ( I , s ,
-
or
-
.Cm t ) .
-
.It Cm +
-
A sign must always be placed before an integer or humanized
-
number produced by a numerical conversion.
-
A
-
.Dq Cm +
-
overrides a space if both are used.
-
.It Sq Cm '
-
Numerical (integer) conversions should be grouped and separated by
-
thousands using the non-monetary separator returned by
-
.Xr localeconv 3 .
-
Has no visible effect in the default
-
.Dq C
-
locale.
-
.El
-
.It
-
An optional decimal digit string specifying a minimum field width.
-
If the converted value has fewer characters than the field width,
-
it will be padded with spaces (or zeroes, if the zero-padding flag has
-
been given and the conversion supports it) on the left (or spaces on
-
the right, if the left-adjustment flag has been given) to fill out the
-
field width.
-
.It
-
One or two characters that specify the type of conversion to be applied.
-
.It
-
An optional
-
.Dq row format
-
for array valued conversions
-
.Cm ( A, B , C , D , F , G , L , O , U , d ,
-
and
-
.Cm r )
-
or the timestamp value conversion
-
.Cm ( t ) .
-
Which conversion characters are permissible in the row format is
-
context dependent.
-
See the
-
.Sx FORMAT CODES
-
section for details.
-
.El
-
.Ss SCALE FACTORS
-
Humanized number conversions scale the number to lie within
-
the range 1 \- 1000 (power of ten conversions using the
-
.Cm \&?
-
format modifier) or 1 \- 1024 (power of two conversions using the
-
.Cm #
-
format modifier) and append a scale factor as follows:
-
.Pp
-
The SI power of ten suffixes are
-
.Bl -column "Suffix" "Description" "1,000,000,000,000,000,000" -offset indent
-
.It Sy "Suffix" Ta Sy "Description" Ta Sy "Multiplier"
-
.It Li \^ Ta No (none) Ta 1
-
.It Li k Ta No kilo   Ta 1,000
-
.It Li M Ta No mega   Ta 1,000,000
-
.It Li G Ta No giga   Ta 1,000,000,000
-
.It Li T Ta No tera   Ta 1,000,000,000,000
-
.It Li P Ta No peta   Ta 1,000,000,000,000,000
-
.It Li E Ta No exa    Ta 1,000,000,000,000,000,000
-
.El
-
.Pp
-
The IEE/IEC (and now also SI) power of two suffixes are:
-
.Bl -column "Suffix" "Description" "1,000,000,000,000,000,000" -offset indent
-
.It Sy "Suffix" Ta Sy "Description" Ta Sy "Multiplier"
-
.It Li \^ Ta No (none) Ta 1
-
.It Li Ki Ta No kibi   Ta 1,024
-
.It Li Mi Ta No mebi   Ta 1,048,576
-
.It Li Gi Ta No gibi   Ta 1,073,741,824
-
.It Li Ti Ta No tebi   Ta 1,099,511,627,776
-
.It Li Pi Ta No pebi   Ta 1,125,899,906,842,624
-
.It Li Ei Ta No exbi   Ta 1,152,921,504,606,846,976
-
.El
-
.Ss FORMAT CODES
-
Format codes will format the output classified as the type shown in
-
square brackets.
-
.Cm %\^I
-
is unique in that it can only be used inside a
-
.Dq row format.
-
All other format codes may be used stand-alone.
-
When used in this fashion they will consume one argument of the indicated
-
type from the function's argument list.
-
.Pp
-
The array valued format codes
-
.Cm ( A , B , C , D , F , G , L , O , U , d ,
-
and
-
.Cm r )
-
and the timestamp format code
-
.Cm ( t )
-
can be followed by a
-
.Dq row format .
-
They will use a default row format (detailed below) if one is not
-
given explicitly.
-
.Pp
-
The row format is bracketed by the character sequences
-
.Cm %{
-
and
-
.Cm %}
-
and, for array values only, may be optionally divided into two by the
-
character sequence
-
.Cm %| .
-
For array values, it contains one or two strings containing any number
-
of a context sensitive subset of format conversions from those
-
described here.
-
For timestamp values it contains any number of format conversion
-
specifiers with meanings as described in
-
.Xr strftime 3 .
-
.Pp
-
The first or only format string is repeatedly processed for each of the
-
array items in turn.
-
The optional second format string is processed as a separator between
-
each of the array items.
-
If no row format is given, output will be generated according to a
-
default format, detailed below.
-
.Pp
-
Within a
-
.Dq row format
-
string, you may use any of the single-character non-array valued
-
format codes except for
-
.Cm %S ,
-
but only the two-character format codes which correspond
-
to the parent item and have the same first character.
-
Array valued format codes may not be used within row formats,
-
nor may you embed one
-
.Dq row format
-
within another.
-
Only one argument, a
-
.Vt struct pkg *
-
pointer is consumed from the argument list.
-
Thus this is a legal
-
.Fa format
-
string:
-
.Bd -literal -offset indent
-
"%B%{%n-%v:%Bn%|\en%}"
-
.Ed
-
.Pp
-
which serves to print out a list of the shared libraries required by
-
the programs within the package, each prefixed by the package name and
-
version.
-
.Pp
-
The conversion specifiers and their meanings are:
-
.Bl -tag -width ".Cm %Bn"
-
.It Cm \^%A
-
Annotations [array]
-
.Vt struct pkg *
-
.Pp
-
Default row format
-
.Cm "%A%{%An: %Av\en%|%}"
-
.It Cm \^%An
-
Annotation tag name [string]
-
.Vt struct pkg_note *
-
.It Cm \^%Av
-
Annotation value [string]
-
.Vt struct pkg_note *
-
.It Cm \^%B
-
Required shared libraries [array]
-
.Vt struct pkg *
-
.Pp
-
Default row format:
-
.Cm "%B%{%Bn\en%|%}"
-
.It Cm %Bn
-
Required shared library name [string]
-
.Vt struct pkg_shlib *
-
.It Cm %C
-
Categories [array]
-
.Vt struct pkg *
-
.Pp
-
Default row format:
-
.Cm "%C%{%Cn%|, %}"
-
.It Cm %Cn
-
Category name [string]
-
.Vt struct pkg_category *
-
.It Cm \^%D
-
Directories [array]
-
.Vt struct pkg *
-
.Pp
-
Default row format:
-
.Cm "%D%{%Dn\en%|%}"
-
.It Cm %Dg
-
Directory ownership: group name [string]
-
.Vt struct pkg_dir *
-
.It Cm %Dk
-
Directory keep flag [boolean]
-
.Vt struct pkg_dir *
-
.It Cm %Dn
-
Directory path name [string]
-
.Vt struct pkg_dir *
-
.It Cm %Dp
-
Directory permissions [mode]
-
.Vt struct pkg_dir *
-
.It Cm %Dt
-
Directory try flag [boolean]
-
.Vt struct pkg_dir *
-
.It Cm %Du
-
Directory ownership: user name [string]
-
.Vt struct pkg_dir *
-
.It Cm %F
-
Files [array]
-
.Vt struct pkg *
-
.Pp
-
Default row format:
-
.Cm "%F%{%Fn\en%|%}"
-
.It Cm %Fg
-
File ownership: group name [string]
-
.Vt struct pkg_file *
-
.It Cm %Fk
-
File keep flag [boolean]
-
.Vt struct pkg_file *
-
.It Cm %\^Fn
-
File path name [string]
-
.Vt struct pkg_file *
-
.It Cm %Fp
-
File permissions [mode]
-
.Vt struct pkg_file *
-
.It Cm %Fs
-
File SHA256 checksum [string]
-
.Vt struct pkg_file *
-
.It Cm %Fu
-
File ownership: user name [string]
-
.Vt struct pkg_file *
-
.It Cm %G
-
Groups [array]
-
.Vt struct pkg *
-
.Pp
-
Default row format:
-
.Cm "%G%{%Gn\en%|%}"
-
.It Cm %Gg
-
Group GID-string [string]
-
.Vt struct pkg_group *
-
.Pp
-
The GID-string consists of a colon-separated list containing the
-
group name,
-
.Sq *
-
as a place holder instead of any hashed password for the group,
-
the group identifier number and a possibly empty comma separated list
-
of the group members,
-
equivalent to one line from
-
.Fa /etc/group
-
as described in
-
.Xr group 5 .
-
.It Cm %Gn
-
Group name [string]
-
.Vt struct pkg_group *
-
.It Cm \^%I
-
Row counter [integer].
-
.Pp
-
This format code may only be used as part of a
-
.Dq row format.
-
.It Cm %L
-
Licenses [array]
-
.Vt struct pkg *
-
.Pp
-
Default row format:
-
.Cm "%L%{%Ln%| %l %}"
-
.It Cm %Ln
-
Licence name [string]
-
.Vt struct pkg_license *
-
.It Cm %M
-
Package message [string]
-
.Vt struct pkg *
-
.It Cm \&%N
-
Repository identity [string]
-
.Vt struct pkg *
-
.It Cm \^%O
-
Options [array]
-
.Vt struct pkg *
-
.Pp
-
Default row format:
-
.Cm "%O%{%On %Ov\en%|%}"
-
.It Cm %On
-
Option name [string]
-
.Vt struct pkg_option *
-
.It Cm %Ov
-
Option value [string]
-
.Vt struct pkg_option *
-
.It Cm %Od
-
Option default value [string] (if known: will produce an empty string
-
if not.)
-
.Vt struct pkg_option *
-
.It Cm %OD
-
Option description [string] (if known: will produce an empty string
-
if not.)
-
.Vt struct pkg_option *
-
.It Cm \^%R
-
Repository path - the path relative to the repository root that
-
package may be downloaded from [string].
-
.Vt struct pkg *
-
.It Cm \^%S
-
Arbitrary character string [string]
-
.Vt const char *
-
.Pp
-
.It Cm \^%U
-
Users [array]
-
.Vt struct pkg *
-
.Pp
-
Default row format:
-
.Cm "%U%{%Un\en%|%}"
-
.It Cm %Un
-
User name [string]
-
.Vt struct pkg_user *
-
.It Cm %Uu
-
User UID-str [string]
-
.Vt struct pkg_user *
-
.Pp
-
The UID-string consists of a colon-separated list containing the
-
user name,
-
.Sq *
-
as a place holder instead of any hashed password for the user, the
-
user identifier number, the user's login group id, an empty field for
-
the user login class, zero for the password change time, zero for the
-
account expiry time,
-
.Sq gecos
-
string (general information about the user), the user's home directory
-
and the user's login shell; equivalent to one line from
-
.Fa /etc/master.passwd
-
as described in
-
.Xr passwd 5 .
-
.It Cm \^%V
-
Old version [string].
-
Valid only during operations when one version of a package is being
-
replaced by another.
-
.Vt struct pkg *
-
.It Cm %a
-
Autoremove flag [boolean]
-
.Vt struct pkg *
-
.It Cm \^%b
-
Provided shared libraries [array]
-
.Vt struct pkg *
-
.Pp
-
Default row format:
-
.Cm "%b%{%bn\en%|%}"
-
.It Cm %bn
-
Provided shared library name [string]
-
.Vt struct pkg_shlib *
-
.It Cm %c
-
Comment [string]
-
.Vt struct pkg *
-
.It Cm %d
-
Dependencies [array]
-
.Vt struct pkg *
-
.Pp
-
Default row format:
-
.Cm "%d%{%dn-%dv\en%|%}"
-
.It Cm %dk
-
Dependency lock status [boolean]
-
.Vt struct pkg_dep *
-
.It Cm %dn
-
Dependency name [string]
-
.Vt struct pkg_dep *
-
.It Cm %do
-
Dependency origin [string]
-
.Vt struct pkg_dep *
-
.It Cm %dv
-
Dependency version [string]
-
.Vt struct pkg_dep *
-
.It Cm %e
-
Description [string]
-
.Vt struct pkg *
-
.It Cm %i
-
Additional information [string]
-
.Vt struct pkg *
-
.It Cm %k
-
Locking status [boolean]
-
.Vt struct pkg *
-
.It Cm %l
-
License logic [licence-logic]
-
.Vt struct pkg *
-
.It Cm %m
-
Maintainer [string]
-
.Vt struct pkg *
-
.It Cm %n
-
Package name [string]
-
.Vt struct pkg *
-
.It Cm %o
-
Origin [string]
-
.Vt struct pkg *
-
.It Cm %p
-
Prefix [string]
-
.Vt struct pkg *
-
.It Cm %r
-
Requirements [array]
-
.Vt struct pkg *
-
.Pp
-
Default row format:
-
.Cm "%r%{%rn-%rv\en%|%}"
-
.It Cm %rk
-
Requirement lock status [boolean]
-
.Vt struct pkg_dep *
-
.It Cm %rn
-
Requirement name [string]
-
.Vt struct pkg_dep *
-
.It Cm %ro
-
Requirement origin [string]
-
.Vt struct pkg_dep *
-
.It Cm %rv
-
Requirement version [string]
-
.Vt struct pkg_dep *
-
.It Cm %s
-
Package flat size [integer]
-
.Vt struct pkg *
-
.It Cm %t
-
Installation timestamp [date-time]
-
.Vt struct pkg *
-
.It Cm %u
-
Package checksum [string]
-
.Vt struct pkg *
-
.It Cm %v
-
Package version [string]
-
.Vt struct pkg *
-
.It Cm %w
-
Home page URL [string]
-
.Vt struct pkg *
-
.It Cm %%
-
A
-
.Ql %
-
is written.
-
No argument is converted.
-
The complete conversion specification
-
is
-
.Ql %% .
-
.El
-
.Pp
-
The decimal point
-
character is defined in the program's locale (category
-
.Dv LC_NUMERIC ) .
-
.Pp
-
In no case does a non-existent or small field width cause truncation of
-
a numeric field;
-
if the result of a conversion is wider than the field width, the field
-
is expanded to contain the conversion result.
-
.Ss ARRAY VALUES
-
Effective format modifiers:
-
.Bl -tag -width ".So \  Sc" -offset indent
-
.It Cm \&?
-
1st Alternate Form: 0 if the array is empty, 1 if it has any number
-
of elements within it
-
.It Cm #
-
2nd Alternate Form: The number of elements in the array
-
.El
-
.Ss STRING VALUES
-
Effective format modifiers:
-
.Bl -tag -width ".So \  Sc" -offset indent
-
.It Cm \-
-
Left align
-
.El
-
.Ss INTEGER VALUES
-
Effective format modifiers:
-
.Bl -tag -width ".So \  Sc" -offset indent
-
.It Cm \-
-
Left align
-
.It Cm \&?
-
1st Alternate Form: humanized number (decimal)
-
.It Cm #
-
2nd Alternate Form: humanized number (binary)
-
.It Cm 0
-
Zero pad
-
.It So "\ " Sc
-
Blank for plus
-
.It Cm +
-
Explicit + or \- sign
-
.It Sq Cm '
-
Thousands separator
-
.El
-
.Ss BOOLEAN VALUES
-
The two possible values
-
.Sq true
-
or
-
.Sq false
-
may be output in one of three different styles: plain; or alternate
-
forms 1 and 2 specified using format modifiers.
-
.Bl -column "FALSE" "Plain (%a)" "Alt 1 (%?a)" "Alt 2 (%#a)" -offset indent
-
.It Sy "Value" Ta Sy "Plain (%a)" Ta Sy "Alt 1 (%?a)" Ta Sy "Alt 2 (%#a)"
-
.It Li FALSE Ta No false Ta no  Ta \^
-
.It Li TRUE  Ta No true  Ta yes Ta (*)
-
.El
-
The second alternate form produces no output for
-
.Cm false .
-
.Pp
-
Effective format modifiers:
-
.Bl -tag -width ".Cm #" -offset indent
-
.It Cm \&?
-
1st Alternate Form
-
.It Cm #
-
2nd Alternate Form
-
.It Cm \-
-
Left align
-
.El
-
.Ss FILE MODE VALUES
-
The file mode is a bitmap representing setid, user, group and other
-
permissions.
-
The plain format prints it as an octal value, for example:
-
.Bd -literal -offset indent
-
4755
-
.Ed
-
.Pp
-
The first alternate form is similar but adds a leading zero:
-
.Bd -literal -offset indent
-
04755
-
.Ed
-
.Pp
-
Whilst the second alternate form produces a string in the style of
-
.Xr strmode 3 :
-
.Bd -literal -offset indent
-
-rwsr-xr-x
-
.Ed
-
.Pp
-
Note: there is always a space at the end of the
-
.Xr strmode 3
-
output.
-
.Pp
-
Effective format modifiers (all forms):
-
.Bl -tag -width ".Cm \-" -offset indent
-
.It Cm \-
-
Left align
-
.El
-
.Pp
-
Additionally, when the value is printed as an integer (ie. plain
-
or alternate form 1), these additional modifiers take effect:
-
.Bl -tag -width ".So \  Sc" -offset indent
-
.It Cm \&?
-
1st Alternate Form: add leading zero to octal integer
-
.It Cm 0
-
Zero pad
-
.El
-
.Ss LICENSE LOGIC VALUES
-
License-logic  is a three-valued type: one of
-
.Sq SINGLE ,
-
.Sq OR
-
or
-
.Sq AND ,
-
which shows whether the package is distributed under the terms of a
-
single license, or when there are several applicable licenses, whether
-
these should be treated as alternatives or applied in agregate.
-
There are three different output styles: plain; or alternate forms 1
-
and 2 specified using format modifiers.
-
.Bl -column "SINGLE" "Plain (%l)" "Alt 1 (%?l)" "Alt 2 (%#l)" -offset indent
-
.It Sy "Logic" Ta Sy "Plain (%l)" Ta Sy "Alt 1 (%?l)" Ta Sy "Alt 2 (%#l)"
-
.It Li SINGLE Ta No single Ta \^ Ta ==
-
.It Li OR     Ta No or     Ta |  Ta ||
-
.It Li AND    Ta No and    Ta &  Ta &&
-
.El
-
.Pp
-
Effective format modifiers:
-
.Bl -tag -width ".Cm #" -offset indent
-
.It Cm \&?
-
1st Alternate Form
-
.It Cm #
-
2nd Alternate Form
-
.It Cm \-
-
Left align
-
.El
-
.Ss DATE-TIME VALUES
-
When used outside of a
-
.Dq row format
-
string may be followed by an optional
-
.Xr strftime 3
-
format, enclosed in
-
.Cm %{
-
and
-
.Cm %} ,
-
which will be used to format the timestamp.
-
Otherwise the timestamp is printed as an integer value of the
-
number of seconds since the Epoch (00:00:00 UTC, 1 January 1970; see
-
.Xr time 3).
-
.Pp
-
Effective format modifiers:
-
.Bl -tag -width ".Cm \-" -offset indent
-
.It Cm \-
-
Left align
-
.El
-
.Pp
-
Additionally, when the value is printed as an integer (ie. without
-
.Xr strftime 3
-
format codes enclosed in
-
.Cm %{
-
and
-
.Cm %} ,
-
the following format modifiers are also effective:
-
.Bl -tag -width ".So \  Sc" -offset indent
-
.It Cm \&?
-
1st Alternate Form: humanized number (decimal)
-
.It Cm #
-
2nd Alternate Form: humanized number (binary)
-
.It Cm 0
-
Zero pad
-
.It So "\ " Sc
-
Blank for plus
-
.It Cm +
-
Explicit + or \- sign
-
.It Sq Cm '
-
Thousands separator
-
.El
-
.Sh EXAMPLES
-
To print the package installation timestamp in the form
-
.Dq Li "Sunday, July 3, 10:02" ,
-
.Bd -literal -offset indent
-
#include <pkg.h>
-
pkg_fprintf(stdout, "%t%{%A, %B %e, %R%}\en", pkg);
-
.Ed
-
.Pp
-
To print the package name and version, followed by the name and
-
version of all of the packages it depends upon, one per line, each
-
indented by one tab stop:
-
.Bd -literal -offset indent
-
#include <pkg.h>
-
pkg_printf("%n-%v\en%d%{\et%dn-%dv%|%\en%}\en", pkg, pkg, pkg);
-
.Ed
-
.Pp
-
Note that the item separator part of the row format is only printed
-
between individual row items.
-
Thus to fill the character array
-
.Fa buf
-
with a one-line string listing all of the licenses for the package
-
separated by
-
.Dq and
-
or
-
.Dq or
-
as appropriate:
-
.Bd -literal -offset indent
-
#include <pkg.h>
-
char buf[256];
-
pkg_snprintf(buf, sizeof(buf), "%L%{%Ln%| %l %}", pkg);
-
.Ed
-
.Sh ERRORS
-
In addition to the errors documented for the
-
.Xr write 2
-
system call, the
-
.Fn pkg_printf
-
family of functions may fail if:
-
.Bl -tag -width Er
-
.It Bq Er EILSEQ
-
An invalid wide character code was encountered.
-
.It Bq Er ENOMEM
-
Insufficient storage space is available.
-
.El
-
.Sh SEE ALSO
-
.Xr printf 1 ,
-
.Xr printf 3 ,
-
.Xr strftime 3 ,
-
.Xr setlocale 3
-
.Sh BUGS
-
The
-
.Nm pkg_printf
-
family of functions do not correctly handle multibyte characters in the
-
.Fa format
-
argument.
-
.Pp
-
There is no way to sort the output of array valued items.
-
.Sh SECURITY CONSIDERATIONS
-
Equivalents to the
-
.Fn sprintf
-
and
-
.Fn vsprintf
-
functions are not supplied.
-
Instead, use
-
.Fn pkg_snprintf
-
to write into a fixed length buffer without danger of overflow.
-
.Pp
-
The
-
.Fn pkg_printf
-
family, like the
-
.Fn printf
-
family of functions it is modelled on, is also easily misused in a manner
-
allowing malicious users to arbitrarily change a running program's
-
functionality by either causing the program
-
to print potentially sensitive data
-
.Dq "left on the stack" ,
-
or causing it to generate a memory fault or bus error
-
by dereferencing an invalid pointer.
-
.Pp
-
Programmers are therefore strongly advised to never pass untrusted strings
-
as the
-
.Fa format
-
argument, as an attacker can put format specifiers in the string
-
to mangle your stack,
-
leading to a possible security hole.
-
This holds true even if the string was built using a function like
-
.Fn snprintf ,
-
as the resulting string may still contain user-supplied conversion specifiers
-
for later interpolation by
-
.Fn pkg_printf .
-
.Pp
-
Always use the proper secure idiom:
-
.Pp
-
.Dl "pkg_snprintf(buffer, sizeof(buffer), \*q%s\*q, string);"
deleted libpkg/pkg_repos.3
@@ -1,124 +0,0 @@
-
.Dd November 29, 2013
-
.Dt PKG_REPOS 3
-
.Os
-
.Sh NAME
-
.Nm pkg_repos , pkg_repos_total_count , pkg_repos_activated_count
-
.Nm pkg_repo_url , pkg_repo_ident , pkg_repo_name , pkg_repo_ident_from_name
-
.Nm pkg_repo_key , pkg_repo_fingerprints
-
.Nm pkg_repo_signature_type , pkg_repo_mirror_type , pkg_repo_enabled
-
.Nm pkg_repo_find_ident , pkg_repo_find_name
-
.Nd manipulate repositories
-
.Sh LIBRARY
-
.Lb libpkg
-
.Sh SYNOPSIS
-
.In pkg.h
-
.Ft int
-
.Fn pkg_repos "struct pkg_repo **r"
-
.Ft int
-
.Fn pkg_repos_total_count "void"
-
.Ft int
-
.Fn pkg_repos_activated_count "void"
-
.Ft const char *
-
.Fn pkg_repos_url "struct pkg_repo *"
-
.Ft const char *
-
.Fn pkg_repo_ident "struct pkg_repo *"
-
.Ft const char *
-
.Fn pkg_repo_name "struct pkg_repo *"
-
.Ft const char *
-
.Fn pkg_repo_ident_from_name "const char *"
-
.Ft const char *
-
.Fn pkg_repo_key "struct pkg_repo *"
-
.Ft const char *
-
.Fn pkg_repo_fingerprints "struct pkg_repo *"
-
.Ft signature_t
-
.Fn pkg_repo_signature_type "struct pkg_repo *"
-
.Ft bool
-
.Fn pkg_repo_enabled "struct pkg_repo *"
-
.Ft mirror_t
-
.Fn pkg_repo_mirror_type "struct pkg_repo *"
-
.Ft struct pkg_repo *
-
.Fn pkg_repo_find_ident "const char *ident";
-
.Ft struct pkg_repo *
-
.Fn pkg_repo_find_name "const char *name";
-
.Sh DESCRIPTION
-
.Fn pkg_repos
-
Takes the address of a pointer to the repository. The pointer should be
-
initialized to NULL before being passed to the function, on each iteration
-
the r will point to the next repository. Returns EPKG_FATAL if an error
-
occured, otherwise return EPKG_OK until the last repository is found in that
-
case EPKG_END is returned.
-
.Pp
-
.Fn pkg_repos_total_count
-
returns the total number of defined repositories.
-
.Pp
-
.Fn pkg_repos_activated_count
-
returns the total number of
-
.Qq enabled
-
repositories.
-
.Pp
-
.Fn pkg_repo_url
-
takes a pointer to a repository as argument and returns the
-
.Qq url
-
defined for this repository.
-
.Pp
-
.Fn pkg_repo_ident
-
takes a pointer to a repository as argument and returns the internal
-
identification string of the repository.
-
.Pp
-
.Fn pkg_repo_name
-
takes a pointer to a repository as argument and returns the
-
.Qq name
-
of the repository.
-
.Pp
-
.Fn pkg_repo_key
-
takes a pointer to a repository as argument and returns the path to
-
the public key. If the repository is not signed by a public key, NULL
-
will be returned.
-
.Pp
-
.Fn pkg_repo_fingerprints
-
takes a pointer to a repository as argument and returns the path to
-
the fingerprints. If the repository is not signed using the
-
.Qq FINGERPRINT
-
method, NULL will be returned.
-
.Pp
-
.Fn pkg_repo_signature_type
-
Take a pointer to a repository as argument and return the type of
-
signature it uses.
-
.Bl -tag -width SIG_FINGERPRINT
-
.It Cm SIG_NONE
-
The repository isn't signed
-
.It Cm SIG_PUBKEY
-
The repository is signed using the PUBKEY method
-
.It Cm SIG_FINGERPRINT
-
The repository is signed using the FINGERPRINT method
-
.El
-
.Pp
-
.Fn pkg_repo_enabled
-
takes a pointer to a repository as argument and returns
-
.Cm true
-
if the repository is
-
.Qq enabled .
-
Otherwise, return
-
.Cm false .
-
.Pp
-
.Fn pkg_repo_mirror_type
-
takes a pointer to a repository as argument and returns the type of
-
mirroring it uses.
-
.Bl -tag -width NOMIRROR
-
.It Cm SRV
-
The repository is using SRV record query to get the mirrors.
-
.It Cm HTTP
-
The repository is using the HTTP query method to get the mirrors.
-
.It Cm NOMIRROR
-
The repository does not have any mirror.
-
.El
-
.Pp
-
.Fn pkg_repo_find_ident
-
Take an internal indentification string as argument and return a pointer to
-
a reprository. If no repository matches, NULL is returned.
-
.Pp
-
.Fn pkg_repo_find_name
-
Take a repository
-
.Qq name
-
as argument and return a pointer to a reprository. If no repository matches,
-
NULL is returned.
modified src/Makefile.am
@@ -1,5 +1,4 @@
-
noinst_HEADERS=	pkgcli.h \
-
				progressmeter.h
+
noinst_HEADERS=	pkgcli.h progressmeter.h

pkg_SOURCES=		annotate.c \
			audit.c \
@@ -96,14 +95,3 @@ pkg_static_LDFLAGS= -all-static -pthread
sbin_PROGRAMS=		pkg pkg-static

dist_sysconf_DATA=	pkg.conf.sample
-

-
install-data-hook:
-
	$(LN_S) -f pkg-install.8 \
-
	$(DESTDIR)$(man8dir)/pkg-add.8
-
	$(LN_S) -f pkg-delete.8 \
-
	$(DESTDIR)$(man8dir)/pkg-remove.8
-
	$(LN_S) -f pkg-lock.8 \
-
	$(DESTDIR)$(man8dir)/pkg-unlock.8
-
	$(LN_S) -f pkg.8 \
-
	$(DESTDIR)$(man8dir)/pkg-static.8
-

deleted src/fix-xrefs
@@ -1,63 +0,0 @@
-
#!/usr/bin/perl
-

-
use strict;
-
use warnings;
-
use autodie;
-
use feature qw(switch);
-

-
require 5.10.1;
-

-
$0 =~ s@.*/@@;
-

-
MAIN:
-
{
-
    my @xrefs;
-
    my $see_also;
-

-
    @xrefs =
-
      map { ".Xr $_->[0] $_->[1]" }
-
      sort {
-
             ( $a->[1] <=> $b->[1] )
-
          || ( ( $b->[0] eq 'pkg' ) <=> ( $a->[0] eq 'pkg' ) )
-
          || ( $a->[0] cmp $b->[0] )
-
      }
-
      map {
-
        [m/^(\S+)\.(\d)$/]
-
      } @ARGV;
-

-
    eval {
-
        for my $man (@ARGV) {
-
            my ($match) = ( $man =~ m/^(\S+)\./ );
-

-
            open READ,  "<$man";
-
            open WRITE, ">$man.new";
-

-
            $see_also = undef;
-

-
            while (<READ>) {
-
                if (/^\.Sh SEE ALSO/) {
-
                    $see_also = 1;
-
                    print WRITE $_;
-
                    print WRITE join( " ,\n", grep { !m/$match / } @xrefs ),
-
                      "\n";
-
                    next;
-
                }
-
                if ( $see_also && /^\.Xr/ ) {
-
                    next;
-
                }
-
                print WRITE $_;
-
            }
-
            close READ;
-
            close WRITE;
-

-
            rename "$man.new", $man;
-
        }
-
    };
-
    given ($@) {
-
        when (undef)  { exit 0; }
-
        when ('')     { exit 0; }
-
        when ('open') { die "$0: open() failed -- $@\n"; }
-
        default       { die "$0: Error -- $@\n"; }
-
    }
-
    exit 0;
-
}
deleted src/pkg-add.8
@@ -1,68 +0,0 @@
-
.\"
-
.\" FreeBSD pkg - a next generation package for the installation and maintenance
-
.\" of non-core utilities.
-
.\"
-
.\" Redistribution and use in source and binary forms, with or without
-
.\" modification, are permitted provided that the following conditions
-
.\" are met:
-
.\" 1. Redistributions of source code must retain the above copyright
-
.\"    notice, this list of conditions and the following disclaimer.
-
.\" 2. Redistributions in binary form must reproduce the above copyright
-
.\"    notice, this list of conditions and the following disclaimer in the
-
.\"    documentation and/or other materials provided with the distribution.
-
.\"
-
.\"
-
.\"     @(#)pkg.8
-
.\" $FreeBSD$
-
.\"
-
.Dd March 20, 2014
-
.Dt PKG-ADD 8
-
.Os
-
.Sh NAME
-
.Nm "pkg add"
-
.Nd alias on
-
.Xr pkg-install 8
-
.Sh SYNOPSIS
-
See
-
.Xr pkg-install 8
-
.Sh DESCRIPTION
-
.Nm
-
is an alias on:
-
.Bd -literal -offset indent
-
pkg install -ylq
-
.Ed
-
.Sh FILES
-
See
-
.Xr pkg.conf 5 .
-
.Sh SEE ALSO
-
.Xr pkg.conf 5 ,
-
.Xr pkg 8 ,
-
.Xr pkg-annotate 8 ,
-
.Xr pkg-audit 8 ,
-
.Xr pkg-autoremove 8 ,
-
.Xr pkg-backup 8 ,
-
.Xr pkg-check 8 ,
-
.Xr pkg-clean 8 ,
-
.Xr pkg-config 8 ,
-
.Xr pkg-convert 8 ,
-
.Xr pkg-create 8 ,
-
.Xr pkg-delete 8 ,
-
.Xr pkg-fetch 8 ,
-
.Xr pkg-info 8 ,
-
.Xr pkg-install 8 ,
-
.Xr pkg-lock 8 ,
-
.Xr pkg-query 8 ,
-
.Xr pkg-register 8 ,
-
.Xr pkg-repo 8 ,
-
.Xr pkg-rquery 8 ,
-
.Xr pkg-search 8 ,
-
.Xr pkg-set 8 ,
-
.Xr pkg-shell 8 ,
-
.Xr pkg-shlib 8 ,
-
.Xr pkg-ssh 8 ,
-
.Xr pkg-stats 8 ,
-
.Xr pkg-update 8 ,
-
.Xr pkg-updating 8 ,
-
.Xr pkg-upgrade 8 ,
-
.Xr pkg-version 8 ,
-
.Xr pkg-which 8
deleted src/pkg-annotate.8
@@ -1,157 +0,0 @@
-
.\"
-
.\" FreeBSD pkg - a next generation package for the installation and maintenance
-
.\" of non-core utilities.
-
.\"
-
.\" Redistribution and use in source and binary forms, with or without
-
.\" modification, are permitted provided that the following conditions
-
.\" are met:
-
.\" 1. Redistributions of source code must retain the above copyright
-
.\"    notice, this list of conditions and the following disclaimer.
-
.\" 2. Redistributions in binary form must reproduce the above copyright
-
.\"    notice, this list of conditions and the following disclaimer in the
-
.\"    documentation and/or other materials provided with the distribution.
-
.\"
-
.\"
-
.\"     @(#)pkg.8
-
.\" $FreeBSD$
-
.\"
-
.Dd April 6, 2013
-
.Dt PKG-ANNOTATE 8
-
.Os
-
.Sh NAME
-
.Nm "pkg annotate"
-
.Nd add, modify or delete arbitrary annotations from packages
-
.Sh SYNOPSIS
-
.Nm
-
.Op Fl giqxy
-
.Fl A|M
-
.Ar pkg-name
-
.Ar tag
-
.Op Ar value
-
.Nm
-
.Op Fl giqxy
-
.Fl D
-
.Ar pkg-name
-
.Ar tag
-
.Nm
-
.Op Fl qy
-
.Fl a
-
.Fl A|M
-
.Ar tag
-
.Op Ar value
-
.Nm
-
.Op Fl qy
-
.Fl a
-
.Fl D
-
.Ar tag
-
.Sh DESCRIPTION
-
.Nm
-
is used to add, modify or delete package annotations.
-
These are freeform tag-value pairs which may contain any arbitrary text.
-
.Ar Tags
-
must be unique per package, but there is no restriction on what
-
text
-
.Ar values
-
may be attached to them.
-
.Pp
-
The
-
.Ar tag
-
is always specified on the command line, but when adding or modifying
-
an annotation, the
-
.Ar value
-
may be supplied either on the command line or as a text stream on stdin.
-
.Sh OPTIONS
-
The following options are supported by
-
.Nm :
-
.Bl -tag -width F1
-
.It Fl a
-
Annotate all installed packages.
-
.It Fl A
-
The operation is to add a new annotation.
-
Attempting to add an annotation with a
-
.Ar tag
-
that already applies to that package is an error, but this will not
-
cause
-
.Nm
-
to exit before attempting to apply the annotation to all remaining
-
matched packages.
-
.It Fl D
-
The operation is to delete an annotation.
-
Only the
-
.Ar tag
-
needs to be specified.
-
Attempting to delete an annotation which does not exist on a package
-
is an error, but this will not prevent
-
.Nm
-
carrying on to delete the annotation from all matched packages.
-
.It Fl g
-
Treat
-
.Ar pkg-name
-
as a shell glob pattern.
-
.It Fl i
-
Make the default or the regular expression
-
.Fl ( x )
-
.Ar pkg-name
-
matching case insensitive.
-
.It Fl M
-
The operation is to modify a previously existing annotation.
-
Functionally, this behaves similarly to
-
.Fl A
-
except that it will succeed irrespective of whether the tag already
-
applies to all the matched packages.
-
.It Fl q
-
Operate quietly: do not output anything other than confirmatory questions.
-
.It Fl x
-
Treat
-
.Ar pkg-name
-
as a regular expression according to the "modern" or "extended" syntax
-
of
-
.Xr re_format 7 .
-
.It Fl y
-
Assume "yes" as the answer to all questions.
-
.El
-
.Sh ENVIRONMENT
-
The following environment variables affect the execution of
-
.Nm .
-
See
-
.Xr pkg.conf 5
-
for further description.
-
.Bl -tag -width ".Ev NO_DESCRIPTIONS"
-
.It Ev PKG_DBDIR
-
.It Ev ASSUME_ALWAYS_YES
-
.El
-
.Sh FILES
-
See
-
.Xr pkg.conf 5 .
-
.Sh SEE ALSO
-
.Xr pkg.conf 5 ,
-
.Xr pkg 8 ,
-
.Xr pkg-add 8 ,
-
.Xr pkg-audit 8 ,
-
.Xr pkg-autoremove 8 ,
-
.Xr pkg-backup 8 ,
-
.Xr pkg-check 8 ,
-
.Xr pkg-clean 8 ,
-
.Xr pkg-config 8 ,
-
.Xr pkg-convert 8 ,
-
.Xr pkg-create 8 ,
-
.Xr pkg-delete 8 ,
-
.Xr pkg-fetch 8 ,
-
.Xr pkg-info 8 ,
-
.Xr pkg-install 8 ,
-
.Xr pkg-lock 8 ,
-
.Xr pkg-query 8 ,
-
.Xr pkg-register 8 ,
-
.Xr pkg-repo 8 ,
-
.Xr pkg-rquery 8 ,
-
.Xr pkg-search 8 ,
-
.Xr pkg-set 8 ,
-
.Xr pkg-shell 8 ,
-
.Xr pkg-shlib 8 ,
-
.Xr pkg-ssh 8 ,
-
.Xr pkg-stats 8 ,
-
.Xr pkg-update 8 ,
-
.Xr pkg-updating 8 ,
-
.Xr pkg-upgrade 8 ,
-
.Xr pkg-version 8 ,
-
.Xr pkg-which 8
deleted src/pkg-audit.8
@@ -1,108 +0,0 @@
-
.\"
-
.\" FreeBSD pkg - a next generation package for the installation and maintenance
-
.\" of non-core utilities.
-
.\"
-
.\" Redistribution and use in source and binary forms, with or without
-
.\" modification, are permitted provided that the following conditions
-
.\" are met:
-
.\" 1. Redistributions of source code must retain the above copyright
-
.\"    notice, this list of conditions and the following disclaimer.
-
.\" 2. Redistributions in binary form must reproduce the above copyright
-
.\"    notice, this list of conditions and the following disclaimer in the
-
.\"    documentation and/or other materials provided with the distribution.
-
.\"
-
.\"
-
.\"     @(#)pkg.8
-
.\" $FreeBSD$
-
.\"
-
.Dd December  24, 2013
-
.Dt PKG-AUDIT 8
-
.Os
-
.Sh NAME
-
.Nm "pkg audit"
-
.Nd Audits installed packages against known vulnerabilities.
-
.Sh SYNOPSIS
-
.Nm
-
.Op Fl Fq
-
.Ar pkg-name
-
.Sh DESCRIPTION
-
.Nm
-
checks installed packages for known vulnerabilities and generates reports
-
including references to security advisories.
-
Its intended audience is system
-
administrators and individual users.
-
.Pp
-
.Nm
-
uses a database maintained by port committers and the FreeBSD security team
-
to check if security advisories for any installed packages exist.
-
Note that a current ports tree (or any local copy of the ports tree) is not
-
required for operation.
-
.Pp
-
The URL that is used to fetch the database can be overridden via the VULNXML_SITE
-
config variable.
-
See
-
.Xr pkg.conf 5
-
for more information.
-
.Pp
-
If you have a vulnerable package installed, you are advised to update or
-
deinstall it immediately.
-
.Pp
-
Supplying a
-
.Ar pkg-name
-
will audit only that package.
-
.Sh OPTIONS
-
The following options are supported by
-
.Nm :
-
.Bl -tag -width F1
-
.It Fl F
-
Fetch the database before checking.
-
.It Fl q
-
Be ``quiet''.
-
Prints only the requested information without
-
displaying many hints.
-
.El
-
.Sh ENVIRONMENT
-
The following environment variables affect the execution of
-
.Nm .
-
See
-
.Xr pkg.conf 5
-
for further description.
-
.Bl -tag -width ".Ev NO_DESCRIPTIONS"
-
.It Ev PKG_DBDIR
-
.It Ev VULNXML_SITE
-
.El
-
.Sh FILES
-
See
-
.Xr pkg.conf 5 .
-
.Sh SEE ALSO
-
.Xr pkg.conf 5 ,
-
.Xr pkg 8 ,
-
.Xr pkg-add 8 ,
-
.Xr pkg-annotate 8 ,
-
.Xr pkg-autoremove 8 ,
-
.Xr pkg-backup 8 ,
-
.Xr pkg-check 8 ,
-
.Xr pkg-clean 8 ,
-
.Xr pkg-config 8 ,
-
.Xr pkg-convert 8 ,
-
.Xr pkg-create 8 ,
-
.Xr pkg-delete 8 ,
-
.Xr pkg-fetch 8 ,
-
.Xr pkg-info 8 ,
-
.Xr pkg-install 8 ,
-
.Xr pkg-lock 8 ,
-
.Xr pkg-query 8 ,
-
.Xr pkg-register 8 ,
-
.Xr pkg-repo 8 ,
-
.Xr pkg-rquery 8 ,
-
.Xr pkg-search 8 ,
-
.Xr pkg-set 8 ,
-
.Xr pkg-shell 8 ,
-
.Xr pkg-shlib 8 ,
-
.Xr pkg-ssh 8 ,
-
.Xr pkg-stats 8 ,
-
.Xr pkg-update 8 ,
-
.Xr pkg-updating 8 ,
-
.Xr pkg-upgrade 8 ,
-
.Xr pkg-version 8 ,
-
.Xr pkg-which 8
deleted src/pkg-autoremove.8
@@ -1,89 +0,0 @@
-
.\"
-
.\" FreeBSD pkg - a next generation package for the installation and maintenance
-
.\" of non-core utilities.
-
.\"
-
.\" Redistribution and use in source and binary forms, with or without
-
.\" modification, are permitted provided that the following conditions
-
.\" are met:
-
.\" 1. Redistributions of source code must retain the above copyright
-
.\"    notice, this list of conditions and the following disclaimer.
-
.\" 2. Redistributions in binary form must reproduce the above copyright
-
.\"    notice, this list of conditions and the following disclaimer in the
-
.\"    documentation and/or other materials provided with the distribution.
-
.\"
-
.\"
-
.\"     @(#)pkg.8
-
.\" $FreeBSD$
-
.\"
-
.Dd February 25, 2013
-
.Dt PKG-AUTOREMOVE 8
-
.Os
-
.Sh NAME
-
.Nm "pkg autoremove"
-
.Nd removes orphan packages
-
.Sh SYNOPSIS
-
.Nm
-
.Op Fl ynq
-
.Sh DESCRIPTION
-
.Nm
-
is used for removing orphan packages, which were installed
-
during dependency resolution and are no longer needed.
-
.Sh OPTIONS
-
The following options are supported by
-
.Nm :
-
.Bl -tag -width F1
-
.It Fl y
-
Assume yes when asked for confirmation before package autoremoval.
-
.It Fl n
-
Dry-run mode.
-
The list of changes to packages is always printed, but
-
no changes are actually made.
-
.It Fl q
-
Force quiet output
-
.El
-
.Sh ENVIRONMENT
-
The following environment variables affect the execution of
-
.Nm .
-
See
-
.Xr pkg.conf 5
-
for further description.
-
.Bl -tag -width ".Ev NO_DESCRIPTIONS"
-
.It Ev ASSUME_ALWAYS_YES
-
.It Ev HANDLE_RC_SCRIPTS
-
.It Ev PKG_DBDIR
-
.El
-
.Sh FILES
-
See
-
.Xr pkg.conf 5 .
-
.Sh SEE ALSO
-
.Xr pkg.conf 5 ,
-
.Xr pkg 8 ,
-
.Xr pkg-add 8 ,
-
.Xr pkg-annotate 8 ,
-
.Xr pkg-audit 8 ,
-
.Xr pkg-backup 8 ,
-
.Xr pkg-check 8 ,
-
.Xr pkg-clean 8 ,
-
.Xr pkg-config 8 ,
-
.Xr pkg-convert 8 ,
-
.Xr pkg-create 8 ,
-
.Xr pkg-delete 8 ,
-
.Xr pkg-fetch 8 ,
-
.Xr pkg-info 8 ,
-
.Xr pkg-install 8 ,
-
.Xr pkg-lock 8 ,
-
.Xr pkg-query 8 ,
-
.Xr pkg-register 8 ,
-
.Xr pkg-repo 8 ,
-
.Xr pkg-rquery 8 ,
-
.Xr pkg-search 8 ,
-
.Xr pkg-set 8 ,
-
.Xr pkg-shell 8 ,
-
.Xr pkg-shlib 8 ,
-
.Xr pkg-ssh 8 ,
-
.Xr pkg-stats 8 ,
-
.Xr pkg-update 8 ,
-
.Xr pkg-updating 8 ,
-
.Xr pkg-upgrade 8 ,
-
.Xr pkg-version 8 ,
-
.Xr pkg-which 8
deleted src/pkg-backup.8
@@ -1,95 +0,0 @@
-
.\"
-
.\" FreeBSD pkg - a next generation package for the installation and maintenance
-
.\" of non-core utilities.
-
.\"
-
.\" Redistribution and use in source and binary forms, with or without
-
.\" modification, are permitted provided that the following conditions
-
.\" are met:
-
.\" 1. Redistributions of source code must retain the above copyright
-
.\"    notice, this list of conditions and the following disclaimer.
-
.\" 2. Redistributions in binary form must reproduce the above copyright
-
.\"    notice, this list of conditions and the following disclaimer in the
-
.\"    documentation and/or other materials provided with the distribution.
-
.\"
-
.\"
-
.\"     @(#)pkg.8
-
.\" $FreeBSD$
-
.\"
-
.Dd February 25, 2013
-
.Dt PKG-BACKUP 8
-
.Os
-
.Sh NAME
-
.Nm "pkg backup"
-
.Nd backup and restore the local package database
-
.Sh SYNOPSIS
-
.Nm
-
.Fl d
-
.Ar dest_file
-
.Nm
-
.Fl r
-
.Ar src_file
-
.Sh DESCRIPTION
-
.Nm
-
is used for backing up and restoring of the local package database.
-
.Sh OPTIONS
-
The following options are supported by
-
.Nm :
-
.Bl -tag -width F1
-
.It Fl d Ar dest_file
-
Dumps the local package database to a file specified on the command-line.
-
If
-
.Ar -
-
is specified as the argument
-
.Nm
-
will use stdout for its output.
-
.It Fl r Ar src_file
-
Uses
-
.Ar file
-
in order to restore the local package database.
-
Useful in case of a database
-
crash of lost to restore your database from previously made backup.
-
.El
-
.Sh ENVIRONMENT
-
The following environment variables affect the execution of
-
.Nm .
-
See
-
.Xr pkg.conf 5
-
for further description.
-
.Bl -tag -width ".Ev NO_DESCRIPTIONS"
-
.It Ev PKG_DBDIR
-
.El
-
.Sh FILES
-
See
-
.Xr pkg.conf 5 .
-
.Sh SEE ALSO
-
.Xr pkg.conf 5 ,
-
.Xr pkg 8 ,
-
.Xr pkg-add 8 ,
-
.Xr pkg-annotate 8 ,
-
.Xr pkg-audit 8 ,
-
.Xr pkg-autoremove 8 ,
-
.Xr pkg-check 8 ,
-
.Xr pkg-clean 8 ,
-
.Xr pkg-config 8 ,
-
.Xr pkg-convert 8 ,
-
.Xr pkg-create 8 ,
-
.Xr pkg-delete 8 ,
-
.Xr pkg-fetch 8 ,
-
.Xr pkg-info 8 ,
-
.Xr pkg-install 8 ,
-
.Xr pkg-lock 8 ,
-
.Xr pkg-query 8 ,
-
.Xr pkg-register 8 ,
-
.Xr pkg-repo 8 ,
-
.Xr pkg-rquery 8 ,
-
.Xr pkg-search 8 ,
-
.Xr pkg-set 8 ,
-
.Xr pkg-shell 8 ,
-
.Xr pkg-shlib 8 ,
-
.Xr pkg-ssh 8 ,
-
.Xr pkg-stats 8 ,
-
.Xr pkg-update 8 ,
-
.Xr pkg-updating 8 ,
-
.Xr pkg-upgrade 8 ,
-
.Xr pkg-version 8 ,
-
.Xr pkg-which 8
deleted src/pkg-check.8
@@ -1,117 +0,0 @@
-
.\"
-
.\" FreeBSD pkg - a next generation package for the installation and maintenance
-
.\" of non-core utilities.
-
.\"
-
.\" Redistribution and use in source and binary forms, with or without
-
.\" modification, are permitted provided that the following conditions
-
.\" are met:
-
.\" 1. Redistributions of source code must retain the above copyright
-
.\"    notice, this list of conditions and the following disclaimer.
-
.\" 2. Redistributions in binary form must reproduce the above copyright
-
.\"    notice, this list of conditions and the following disclaimer in the
-
.\"    documentation and/or other materials provided with the distribution.
-
.\"
-
.\"
-
.\"     @(#)pkg.8
-
.\" $FreeBSD$
-
.\"
-
.Dd July 11, 2013
-
.Dt PKG-CHECK 8
-
.Os
-
.Sh NAME
-
.Nm "pkg check"
-
.Nd sanity checks installed packages
-
.Sh SYNOPSIS
-
.Nm
-
.Op Fl Bdsr
-
.Op Fl vyn
-
.Op Fl a | gix Ar pattern
-
.Sh DESCRIPTION
-
.Nm
-
.Fl B
-
is used to reanalyse shared libraries of installed packages.
-
.Pp
-
.Nm
-
.Fl d
-
is used to check for and install missing dependencies.
-
.Pp
-
.Nm
-
.Fl r
-
is used to recompute sizes and checksums of installed packages.
-
.Pp
-
.Nm
-
.Fl s
-
is used to find invalid checksums for installed packages.
-
.Sh OPTIONS
-
The following options are supported by
-
.Nm :
-
.Bl -tag -width F1
-
.It Fl y
-
Assume yes when asked for confirmation before installing missing dependencies.
-
.It Fl v
-
Be verbose.
-
.It Fl n
-
Merely check for missing dependencies and do not install them.
-
.It Fl a
-
Process all packages.
-
.It Fl i
-
Make the standard or regular expression
-
.Fl ( x )
-
matching against
-
.Ar pattern
-
case insensitive.
-
.It Fl g
-
Treat
-
.Ar pattern
-
as a shell glob pattern.
-
.It Fl x
-
Treat
-
.Ar pattern
-
as a regular expression.
-
This uses the "modern" or "extended" syntax described in
-
.Xr re_format 7
-
.El
-
.Sh ENVIRONMENT
-
The following environment variables affect the execution of
-
.Nm .
-
See
-
.Xr pkg.conf 5
-
for further description.
-
.Bl -tag -width ".Ev NO_DESCRIPTIONS"
-
.It Ev PKG_DBDIR
-
.El
-
.Sh FILES
-
See
-
.Xr pkg.conf 5 .
-
.Sh SEE ALSO
-
.Xr pkg.conf 5 ,
-
.Xr pkg 8 ,
-
.Xr pkg-add 8 ,
-
.Xr pkg-annotate 8 ,
-
.Xr pkg-audit 8 ,
-
.Xr pkg-autoremove 8 ,
-
.Xr pkg-backup 8 ,
-
.Xr pkg-clean 8 ,
-
.Xr pkg-config 8 ,
-
.Xr pkg-convert 8 ,
-
.Xr pkg-create 8 ,
-
.Xr pkg-delete 8 ,
-
.Xr pkg-fetch 8 ,
-
.Xr pkg-info 8 ,
-
.Xr pkg-install 8 ,
-
.Xr pkg-lock 8 ,
-
.Xr pkg-query 8 ,
-
.Xr pkg-register 8 ,
-
.Xr pkg-repo 8 ,
-
.Xr pkg-rquery 8 ,
-
.Xr pkg-search 8 ,
-
.Xr pkg-set 8 ,
-
.Xr pkg-shell 8 ,
-
.Xr pkg-shlib 8 ,
-
.Xr pkg-ssh 8 ,
-
.Xr pkg-stats 8 ,
-
.Xr pkg-update 8 ,
-
.Xr pkg-updating 8 ,
-
.Xr pkg-upgrade 8 ,
-
.Xr pkg-version 8 ,
-
.Xr pkg-which 8
deleted src/pkg-clean.8
@@ -1,102 +0,0 @@
-
.\"
-
.\" FreeBSD pkg - a next generation package for the installation and maintenance
-
.\" of non-core utilities.
-
.\"
-
.\" Redistribution and use in source and binary forms, with or without
-
.\" modification, are permitted provided that the following conditions
-
.\" are met:
-
.\" 1. Redistributions of source code must retain the above copyright
-
.\"    notice, this list of conditions and the following disclaimer.
-
.\" 2. Redistributions in binary form must reproduce the above copyright
-
.\"    notice, this list of conditions and the following disclaimer in the
-
.\"    documentation and/or other materials provided with the distribution.
-
.\"
-
.\"
-
.\"     @(#)pkg.8
-
.\" $FreeBSD$
-
.\"
-
.Dd July 10, 2013
-
.Dt PKG-CLEAN 8
-
.Os
-
.Sh NAME
-
.Nm "pkg clean"
-
.Nd Cleans the local cache of fetched remote packages.
-
.Sh SYNOPSIS
-
.Nm
-
.Op Fl anqy
-
.Sh DESCRIPTION
-
.Nm
-
is used to cleanup the local cache of packages downloaded from remote
-
repositories.
-
It removes packages that have been superseded by newer versions, and
-
any packages that are no longer provided.
-
.Sh OPTIONS
-
The following options are supported by
-
.Nm :
-
.Bl -tag -width F1
-
.It Fl a
-
Delete all cached packages.
-
.It Fl n
-
Dry-run: do not delete any package files from the cache, but show what
-
would be done instead.
-
Forces the preview of the packages that would be deleted to be shown,
-
even when used with
-
.Fl y .
-
Note: the package cache file permissions only permit root access.
-
Results will be disappointing for any other user.
-
.It Fl q
-
Be quiet.
-
Suppress most output.
-
All output is suppressed if
-
.Fl y
-
is also used.
-
.It Fl y
-
Assume a yes answer instead of asking for confirmation before deleting
-
any out-of-date or redundant packages from the cache.
-
.El
-
.Sh ENVIRONMENT
-
The following environment variables affect the execution of
-
.Nm .
-
See
-
.Xr pkg.conf 5
-
for further description.
-
.Bl -tag -width ".Ev NO_DESCRIPTIONS"
-
.It Ev ASSUME_ALWAYS_YES
-
.It Ev PKG_DBDIR
-
.It Ev PKG_CONFIG_CACHEDIR
-
.El
-
.Sh FILES
-
See
-
.Xr pkg.conf 5 .
-
.Sh SEE ALSO
-
.Xr pkg.conf 5 ,
-
.Xr pkg 8 ,
-
.Xr pkg-add 8 ,
-
.Xr pkg-annotate 8 ,
-
.Xr pkg-audit 8 ,
-
.Xr pkg-autoremove 8 ,
-
.Xr pkg-backup 8 ,
-
.Xr pkg-check 8 ,
-
.Xr pkg-config 8 ,
-
.Xr pkg-convert 8 ,
-
.Xr pkg-create 8 ,
-
.Xr pkg-delete 8 ,
-
.Xr pkg-fetch 8 ,
-
.Xr pkg-info 8 ,
-
.Xr pkg-install 8 ,
-
.Xr pkg-lock 8 ,
-
.Xr pkg-query 8 ,
-
.Xr pkg-register 8 ,
-
.Xr pkg-repo 8 ,
-
.Xr pkg-rquery 8 ,
-
.Xr pkg-search 8 ,
-
.Xr pkg-set 8 ,
-
.Xr pkg-shell 8 ,
-
.Xr pkg-shlib 8 ,
-
.Xr pkg-ssh 8 ,
-
.Xr pkg-stats 8 ,
-
.Xr pkg-update 8 ,
-
.Xr pkg-updating 8 ,
-
.Xr pkg-upgrade 8 ,
-
.Xr pkg-version 8 ,
-
.Xr pkg-which 8
deleted src/pkg-config.8
@@ -1,72 +0,0 @@
-
.\"
-
.\" FreeBSD pkg - a next generation package for the installation and maintenance
-
.\" of non-core utilities.
-
.\"
-
.\" Redistribution and use in source and binary forms, with or without
-
.\" modification, are permitted provided that the following conditions
-
.\" are met:
-
.\" 1. Redistributions of source code must retain the above copyright
-
.\"    notice, this list of conditions and the following disclaimer.
-
.\" 2. Redistributions in binary form must reproduce the above copyright
-
.\"    notice, this list of conditions and the following disclaimer in the
-
.\"    documentation and/or other materials provided with the distribution.
-
.\"
-
.\"
-
.\"     @(#)pkg.8
-
.\" $FreeBSD$
-
.\"
-
.Dd November 29, 2013
-
.Dt PKG-CONFIG 8
-
.Os
-
.Sh NAME
-
.Nm "pkg config"
-
.Nd retrieve the value of a given configuration option
-
.Sh SYNOPSIS
-
.Nm
-
.Ar configname
-
.Sh DESCRIPTION
-
.Nm
-
retrieve the value of a given configuration option.
-
For lists,
-
one line per entry will be printed, key/values will be printed
-
as one line per key/value pair.
-
.Sh FILES
-
See
-
.Xr pkg.conf 5 .
-
.Sh EXAMPLES
-
Getting the ABI:
-
.Dl % pkg config abi
-
Getting the directories where the repositories configuration are read:
-
.Dl % pkg config repos_dir
-
.Sh SEE ALSO
-
.Xr pkg.conf 5 ,
-
.Xr pkg 8 ,
-
.Xr pkg-add 8 ,
-
.Xr pkg-annotate 8 ,
-
.Xr pkg-audit 8 ,
-
.Xr pkg-autoremove 8 ,
-
.Xr pkg-backup 8 ,
-
.Xr pkg-check 8 ,
-
.Xr pkg-clean 8 ,
-
.Xr pkg-convert 8 ,
-
.Xr pkg-create 8 ,
-
.Xr pkg-delete 8 ,
-
.Xr pkg-fetch 8 ,
-
.Xr pkg-info 8 ,
-
.Xr pkg-install 8 ,
-
.Xr pkg-lock 8 ,
-
.Xr pkg-query 8 ,
-
.Xr pkg-register 8 ,
-
.Xr pkg-repo 8 ,
-
.Xr pkg-rquery 8 ,
-
.Xr pkg-search 8 ,
-
.Xr pkg-set 8 ,
-
.Xr pkg-shell 8 ,
-
.Xr pkg-shlib 8 ,
-
.Xr pkg-ssh 8 ,
-
.Xr pkg-stats 8 ,
-
.Xr pkg-update 8 ,
-
.Xr pkg-updating 8 ,
-
.Xr pkg-upgrade 8 ,
-
.Xr pkg-version 8 ,
-
.Xr pkg-which 8
deleted src/pkg-convert.8
@@ -1,83 +0,0 @@
-
.\"
-
.\" FreeBSD pkg - a next generation package for the installation and maintenance
-
.\" of non-core utilities.
-
.\"
-
.\" Redistribution and use in source and binary forms, with or without
-
.\" modification, are permitted provided that the following conditions
-
.\" are met:
-
.\" 1. Redistributions of source code must retain the above copyright
-
.\"    notice, this list of conditions and the following disclaimer.
-
.\" 2. Redistributions in binary form must reproduce the above copyright
-
.\"    notice, this list of conditions and the following disclaimer in the
-
.\"    documentation and/or other materials provided with the distribution.
-
.\"
-
.\"
-
.\"     @(#)pkg.8
-
.\" $FreeBSD$
-
.\"
-
.Dd February 25, 2013
-
.Dt PKG-CONVERT 8
-
.Os
-
.Sh NAME
-
.Nm "pkg convert"
-
.Nd convert from/to pkgng database format
-
.Sh SYNOPSIS
-
.Nm
-
.Op Fl d Ar pkg_dbdir
-
.Op Fl nr
-
.Sh DESCRIPTION
-
.Nm
-
is used to convert from/to pkgng local database to legacy pkg_install tools
-
format.
-
.Sh OPTIONS
-
The following options are supported by
-
.Nm :
-
.Bl -tag -width F1
-
.It Fl d
-
The location of the
-
.Xr pkg_add 1
-
dbdir.
-
Defaults to
-
.Fa /var/db/pkg .
-
.It Fl n
-
Dry-run mode.
-
Do not actually convert anything.
-
Just show what would be done.
-
.It Fl r
-
Revert conversion
-
.El
-
.Sh FILES
-
See
-
.Xr pkg.conf 5 .
-
.Sh SEE ALSO
-
.Xr pkg.conf 5 ,
-
.Xr pkg 8 ,
-
.Xr pkg-add 8 ,
-
.Xr pkg-annotate 8 ,
-
.Xr pkg-audit 8 ,
-
.Xr pkg-autoremove 8 ,
-
.Xr pkg-backup 8 ,
-
.Xr pkg-check 8 ,
-
.Xr pkg-clean 8 ,
-
.Xr pkg-config 8 ,
-
.Xr pkg-create 8 ,
-
.Xr pkg-delete 8 ,
-
.Xr pkg-fetch 8 ,
-
.Xr pkg-info 8 ,
-
.Xr pkg-install 8 ,
-
.Xr pkg-lock 8 ,
-
.Xr pkg-query 8 ,
-
.Xr pkg-register 8 ,
-
.Xr pkg-repo 8 ,
-
.Xr pkg-rquery 8 ,
-
.Xr pkg-search 8 ,
-
.Xr pkg-set 8 ,
-
.Xr pkg-shell 8 ,
-
.Xr pkg-shlib 8 ,
-
.Xr pkg-ssh 8 ,
-
.Xr pkg-stats 8 ,
-
.Xr pkg-update 8 ,
-
.Xr pkg-updating 8 ,
-
.Xr pkg-upgrade 8 ,
-
.Xr pkg-version 8 ,
-
.Xr pkg-which 8
deleted src/pkg-create.8
@@ -1,424 +0,0 @@
-
.\"
-
.\" FreeBSD pkg - a next generation package for the installation and maintenance
-
.\" of non-core utilities.
-
.\"
-
.\" Redistribution and use in source and binary forms, with or without
-
.\" modification, are permitted provided that the following conditions
-
.\" are met:
-
.\" 1. Redistributions of source code must retain the above copyright
-
.\"    notice, this list of conditions and the following disclaimer.
-
.\" 2. Redistributions in binary form must reproduce the above copyright
-
.\"    notice, this list of conditions and the following disclaimer in the
-
.\"    documentation and/or other materials provided with the distribution.
-
.\"
-
.\"
-
.\"     @(#)pkg.8
-
.\" $FreeBSD$
-
.\"
-
.Dd November 29, 2013
-
.Dt PKG-CREATE 8
-
.Os
-
.\" ---------------------------------------------------------------------------
-
.Sh NAME
-
.Nm "pkg create"
-
.Nd a utility for creating software package distributions
-
.\" ---------------------------------------------------------------------------
-
.Sh SYNOPSIS
-
.Nm
-
.Op Fl n
-
.Op Fl f Ar format
-
.Op Fl o Ar outdir
-
.Op Fl p Ar plist
-
.Op Fl r Ar rootdir
-
.Fl m Ar manifestdir
-
.Nm
-
.Op Fl gnx
-
.Op Fl f Ar format
-
.Op Fl o Ar outdir
-
.Op Fl r Ar rootdir
-
.Ar pkg-name ...
-
.Nm
-
.Op Fl n
-
.Op Fl f Ar format
-
.Op Fl o Ar outdir
-
.Op Fl r Ar rootdir
-
.Fl a
-
.\" ---------------------------------------------------------------------------
-
.Sh DESCRIPTION
-
.Nm
-
is used to create packages from binaries or other files installed on
-
your computer.
-
Package tarballs can created from the files of a previously installed
-
package using metadata from the local package database.
-
Any number of packages may be created in one invocation of this style.
-
.Pp
-
Alternatively, a single package can be created from an arbitrary
-
selection of files on your system, but this requires a
-
.Ar manifestdir
-
and optionally
-
.Ar plist
-
to be supplied.
-
The package name will be derived from the
-
.Pa +MANIFEST
-
file which must be contained within the
-
.Ar manifestdir .
-
.Pp
-
Packages thus created can be distributed and subsequently installed on
-
other machines using the
-
.Cm pkg add
-
command.
-
.\" ---------------------------------------------------------------------------
-
.Sh OPTIONS
-
The following options are supported by
-
.Nm :
-
.Bl -tag -width ".Fl m Ar manifestdir"
-
.It Fl a
-
Create package tarballs from all packages installed on your system.
-
This option is incompatible with the
-
.Fl g , x
-
or
-
.Fl m Ar manifestdir
-
options.
-
.It Fl g
-
Interpret
-
.Ar pkg-name
-
as a shell glob pattern and create package only for installed binaries whose
-
name match this pattern.
-
This option is incompatible with the
-
.Fl a , x
-
or
-
.Fl m Ar manifestdir
-
options.
-
.It Fl x
-
Like
-
.Fl g ,
-
but interpret
-
.Ar pkg-name
-
as a regular expression using the "modern" or "extended" syntax described in
-
.Xr re_format 7 .
-
This option is incompatible with the
-
.Fl a, g
-
or
-
.Fl m Ar manifestdir
-
options.
-
.It Fl f Ar format
-
Set
-
.Ar format
-
as the package output format.
-
It can be one of
-
.Ar txz , tbz , tgz
-
or
-
.Ar tar
-
which are currently the only supported format.
-
If an invalid or no format is specified
-
.Ar txz
-
is assumed.
-
.It Fl m Ar manifestdir
-
Specify the directory containing the package manifest,
-
.Pa +MANIFEST
-
and optionally three other files; one containing a message to be
-
displayed on package installation,
-
.Pa +DISPLAY .
-
Another containing the description for the packages,
-
.Pa +DESC .
-
The last containing an mtree specification,
-
.Pa +MTREE_DIRS ,
-
for the directory tree the package will use.
-
See
-
.Xr mtree 5
-
for the format of the mtree file.
-
If specified, only a single package will be created.
-
.Pa +DISPLAY
-
,
-
.Pa +MTREE_DIRS
-
, and
-
.Pa +DESC
-
are not required; the
-
.Pa +MANIFEST
-
file can contain all the required information needed to build a
-
package.
-
This option is incompatible with the
-
.Fl a, g
-
or
-
.Fl x
-
options.
-
.It Fl n
-
Do not overwrite already existing packages
-
.It Fl o Ar outdir
-
Set
-
.Ar outdir
-
as the output directory.
-
If this option is not given, all created packages will
-
be saved in the current directory.
-
.It Fl p Ar plist
-
Specify some package metadata using the legacy plist format from
-
.Xr pkg_add 1 ,
-
commonly found in
-
.Pa pkg-plist
-
files in the ports tree.
-
Metadata from the
-
G.Ar plist
-
file, if specified, will take precedence over any equivalents from
-
the
-
.Ar manifestdir .
-
Only has any effect when used with
-
.Ar manifestdir .
-
See
-
.Sx "PLIST FORMAT"
-
for details
-
.It Fl r Ar rootdir
-
.Ar rootdir
-
specifies the top-level directory to be treated as the root of the
-
filesystem hierarchy containing the package files.
-
File paths in generated packages will be relative to
-
.Ar rootdir .
-
This allows a package to be generated from content offset from its
-
intended final location, which allows a package building without
-
disturbing similar content already on the system.
-
If unspecified, the default is effectively
-
.Pa / ,
-
the actual root directory.
-
.El
-
.\" ---------------------------------------------------------------------------
-
.Sh MANIFEST FILE DETAILS
-
.Bl -tag -width ".Cm www"
-
.It Cm name Ar pkg-name
-
This entry sets the package's name to
-
.Ar pkg-name . \" TODO: Find out why there is a space after the ``.''
-
Among other things, this name is used - with the version and the origin of the
-
concerned package - to identify a dependency.
-
.It Cm version Ar pkg-version
-
This entry sets the package's version to
-
.Ar pkg-version .
-
.It Cm origin Ar pkg-origin
-
This entry sets the package's origin to
-
.Ar pkg-origin .
-
This is a string of the form
-
.Pa category/port-dir
-
which designate the port this package was built from.
-
.It Cm comment Ar comment-string
-
.Ar comment-string
-
is a one-line description of this package.
-
It is the equivalent of the
-
.Dv COMMENT
-
variable for a port, not a way to put comments in a
-
.Pa +MANIFEST
-
file.
-
.It Cm arch Ar cpu-type
-
The architecture of the machine the package was built on.
-
.Ar cpu-type
-
takes values like x86, amd64...
-
.It Cm www Ar url
-
The software's official website.
-
.It Cm maintainer Ar mail-address
-
The maintainer's mail address.
-
.It Cm prefix Ar path-prefix
-
The path where the files contained in this package are installed
-
.Pq usually Pa /usr/local .
-
.It Cm flatsize Ar size
-
The size that the files contained in this package will occupy on your system
-
once uncompressed.
-
This value does not take into account files stored in the
-
package database.
-
.It Cm dep Ar dep-name dep-origin dep-version
-
Declare a dependency on the package which name, origin and version match
-
.Ar dep-name , dep-origin
-
and
-
.Ar dep-version
-
respectively.
-
.It Cm conflict Ar pkg-glob
-
Flag this package as incompatible with the one designated by
-
.Ar pkg-glob .
-
Conflicting packages cannot be installed on the same system as they may contain
-
references to the sames files.
-
.It Cm option Ar option-name option-value
-
Set the option
-
.Ar option-name
-
to the value
-
.Ar option-value .
-
.It Cm file Ar sha256-hash path
-
.Cm file
-
entries list files included in the package.
-
If the file is a regular one, such
-
an entry contains its sha256 digest along with its path.
-
If a packaged file is
-
a link, you must use this entry's other form, as described below.
-
.It Cm file Ar - path
-
Same as above but for file links.
-
The sha256 hash is replaced with a
-
.Ar -
-
(dash).
-
.It Cm dir Ar path
-
Mimics the
-
.Cm file
-
entry but for directories.
-
.El
-
.Sh PLIST FORMAT
-
The following describes the plist format:
-
.Pp
-
The plist is a sequential list of lines which can have keywords prepended.
-
A keyword starts with an
-
.Sq @ .
-
Lines not starting with a keyword are considered as paths to a file.
-
If started with a
-
.Sq /
-
then it is considered an absolute path.
-
Otherwise the file is considered as relative to
-
.Ev PREFIX .
-
.Pp
-
Keyword lines are formed as follows:
-
.Ar @keyword
-
.Ar line
-
.Pp
-
Available keywords are the following:
-
.Pp
-
.Bl -tag -width indent -compact
-
.It Cm @cwd Op Ar directory
-
Set the internal directory pointer to point to
-
.Ar directory .
-
All subsequent filenames will be assumed relative to this directory.
-
.It Cm @exec Ar command Pq deprecated
-
Execute
-
.Ar command
-
as part of the unpacking process.
-
If
-
.Ar command
-
contains any of the following sequences somewhere in it, they will
-
be expanded inline.
-
For the following examples, assume that
-
.Cm @cwd
-
is set to
-
.Pa /usr/local
-
and the last extracted file was
-
.Pa bin/emacs .
-
.Bl -tag -width indent -compact
-
.It Cm "%F"
-
Expands to the last filename extracted (as specified), in the example case
-
.Pa bin/emacs
-
.It Cm "\&%D"
-
Expand to the current directory prefix, as set with
-
.Cm @cwd ,
-
in the example case
-
.Pa /usr/local .
-
.It Cm "\&%B"
-
Expand to the
-
.Dq basename
-
of the fully qualified filename, that is the current directory prefix,
-
plus the last filespec, minus the trailing filename.
-
In the example case, that would be
-
.Pa /usr/local/bin .
-
.It Cm "%f"
-
Expand to the filename part of the fully qualified name, or
-
the converse of
-
.Cm \&%B ,
-
being in the example case,
-
.Pa emacs .
-
.El
-
.It Cm @unexec Ar command Pq deprecated
-
Execute
-
.Ar command
-
as part of the deinstallation process.
-
Expansion of special
-
.Cm %
-
sequences is the same as for
-
.Cm @exec .
-
This command is not executed during the package add, as
-
.Cm @exec
-
is, but rather when the package is deleted.
-
This is useful for deleting links and other ancillary files that were
-
created as a result of adding the package, but not directly known to
-
the package's table of contents (and hence not automatically
-
removable).
-
.It Cm @mode Ar mode
-
Set default permission for all subsequently extracted files to
-
.Ar mode .
-
Format is the same as that used by the
-
.Cm chmod
-
command.
-
Use without an arg to set back to default (mode of the file while being packed)
-
permissions.
-
.It Cm @owner Ar user
-
Set default ownership for all subsequently files to
-
.Ar user .
-
Use without an arg to set back to default (root)
-
ownership.
-
.It Cm @group Ar group
-
Set default group ownership for all subsequently files to
-
.Ar group .
-
Use without an arg to set back to default (wheel)
-
group ownership.
-
.It Cm @comment Ar string
-
The line will be ignored when packing
-
.It Cm @dirrm Ar name
-
Declare directory
-
.Pa name
-
to be deleted at deinstall time.
-
By default, directories created by a package installation are not
-
deleted when the package is deinstalled.
-
This provides an explicit directory cleanup method.
-
These directives should appear at the end of the package list.
-
If the directory is not empty a warning will be printed, and the
-
directory will not be removed.
-
.It Cm @dirrmtry Ar name
-
Declare directory
-
.Pa name
-
to be removed, as for
-
.Cm @dirrm ,
-
but does not issue a warning if the directory cannot be removed.
-
.El
-
.\" ---------------------------------------------------------------------------
-
.Sh ENVIRONMENT
-
The following environment variables affect the execution of
-
.Nm .
-
See
-
.Xr pkg.conf 5
-
for further description.
-
.Bl -tag -width ".Ev NO_DESCRIPTIONS"
-
.It Ev PKG_DBDIR
-
.It Ev PLIST_KEYWORDS_DIR
-
.It Ev PORTSDIR
-
.El
-
.\" ---------------------------------------------------------------------------
-
.Sh FILES
-
See
-
.Xr pkg.conf 5 .
-
.\" ---------------------------------------------------------------------------
-
.Sh EXAMPLES
-
Create package files for installed packages:
-
.Dl % pkg create -a -o /usr/ports/packages/All
-
.Pp
-
Create package file for pkg:
-
.Dl % pkg create -o /usr/ports/packages/All pkg
-
.\" ---------------------------------------------------------------------------
-
.Sh SEE ALSO
-
.Xr pkg.conf 5 ,
-
.Xr pkg 8 ,
-
.Xr pkg-add 8 ,
-
.Xr pkg-annotate 8 ,
-
.Xr pkg-audit 8 ,
-
.Xr pkg-autoremove 8 ,
-
.Xr pkg-backup 8 ,
-
.Xr pkg-check 8 ,
-
.Xr pkg-clean 8 ,
-
.Xr pkg-config 8 ,
-
.Xr pkg-convert 8 ,
-
.Xr pkg-delete 8 ,
-
.Xr pkg-fetch 8 ,
-
.Xr pkg-info 8 ,
-
.Xr pkg-install 8 ,
-
.Xr pkg-lock 8 ,
-
.Xr pkg-query 8 ,
-
.Xr pkg-register 8 ,
-
.Xr pkg-repo 8 ,
-
.Xr pkg-rquery 8 ,
-
.Xr pkg-search 8 ,
-
.Xr pkg-set 8 ,
-
.Xr pkg-shell 8 ,
-
.Xr pkg-shlib 8 ,
-
.Xr pkg-ssh 8 ,
-
.Xr pkg-stats 8 ,
-
.Xr pkg-update 8 ,
-
.Xr pkg-updating 8 ,
-
.Xr pkg-upgrade 8 ,
-
.Xr pkg-version 8 ,
-
.Xr pkg-which 8
deleted src/pkg-delete.8
@@ -1,134 +0,0 @@
-
.\"
-
.\" FreeBSD pkg - a next generation package for the installation and maintenance
-
.\" of non-core utilities.
-
.\"
-
.\" Redistribution and use in source and binary forms, with or without
-
.\" modification, are permitted provided that the following conditions
-
.\" are met:
-
.\" 1. Redistributions of source code must retain the above copyright
-
.\"    notice, this list of conditions and the following disclaimer.
-
.\" 2. Redistributions in binary form must reproduce the above copyright
-
.\"    notice, this list of conditions and the following disclaimer in the
-
.\"    documentation and/or other materials provided with the distribution.
-
.\"
-
.\"
-
.\"     @(#)pkg.8
-
.\" $FreeBSD$
-
.\"
-
.Dd February 25, 2013
-
.Dt PKG-DELETE 8
-
.Os
-
.Sh NAME
-
.Nm "pkg delete"
-
.Nd deletes packages from the database and the system
-
.Sh SYNOPSIS
-
.Nm
-
.Op Fl DfginqRxy
-
.Ar pkg-name ...
-
.Nm
-
.Op Fl Dnqy
-
.Fl a
-
.Sh DESCRIPTION
-
.Nm
-
is used for deleting installed packages from the system.
-
.Nm
-
creates a work-list of all the installed packages matching the package
-
names on the command line.
-
The list is presented to the user.
-
If the user confirms that they do want to remove those packages, or
-
if the
-
.Cm ASSUME_ALWAYS_YES
-
configuration option is set,
-
.Nm
-
proceeds to remove the listed packages.
-
.Pp
-
If the set of packages to be deleted would leave installed packages
-
with unfulfilled dependencies,
-
.Nm
-
will emit an error message and quit without deleting anything unless
-
forced to proceed by the
-
.Fl f
-
option.
-
.Sh OPTIONS
-
The following options are supported by
-
.Nm :
-
.Bl -tag -width F1
-
.It Fl a
-
Deletes all installed packages from the system and empties the database.
-
.It Fl D
-
If a deinstallation script exists for a given package, do not execute it.
-
.It Fl f
-
Forces packages to be removed despite leaving unresolved dependencies.
-
.It Fl g
-
Treat the package names as shell glob patterns.
-
.It Fl i
-
Make the standard or regular expression
-
.Fl ( x )
-
matching against
-
.Ar pkg-name
-
case insensitive.
-
.It Fl n
-
Dry run mode.
-
The list of packages to delete is always printed, but no packages are
-
actually deleted.
-
.It Fl q
-
Force quiet output, except where
-
.Fl n
-
is also used, when
-
.Nm
-
will show the list of packages to be deleted.
-
.It Fl R
-
Delete all packages that require the listed packages as well.
-
.It Fl x
-
Treat the package names as regular expressions according to the
-
"modern" or "extended" syntax of
-
.Xr re_format 7 .
-
.It Fl y
-
Assume yes when asked for confirmation before package deletion.
-
.El
-
.Sh ENVIRONMENT
-
The following environment variables affect the execution of
-
.Nm .
-
See
-
.Xr pkg.conf 5
-
for further description.
-
.Bl -tag -width ".Ev NO_DESCRIPTIONS"
-
.It Ev ASSUME_ALWAYS_YES
-
.It Ev HANDLE_RC_SCRIPTS
-
.It Ev PKG_DBDIR
-
.El
-
.Sh FILES
-
See
-
.Xr pkg.conf 5 .
-
.Sh SEE ALSO
-
.Xr pkg.conf 5 ,
-
.Xr pkg 8 ,
-
.Xr pkg-add 8 ,
-
.Xr pkg-annotate 8 ,
-
.Xr pkg-audit 8 ,
-
.Xr pkg-autoremove 8 ,
-
.Xr pkg-backup 8 ,
-
.Xr pkg-check 8 ,
-
.Xr pkg-clean 8 ,
-
.Xr pkg-config 8 ,
-
.Xr pkg-convert 8 ,
-
.Xr pkg-create 8 ,
-
.Xr pkg-fetch 8 ,
-
.Xr pkg-info 8 ,
-
.Xr pkg-install 8 ,
-
.Xr pkg-lock 8 ,
-
.Xr pkg-query 8 ,
-
.Xr pkg-register 8 ,
-
.Xr pkg-repo 8 ,
-
.Xr pkg-rquery 8 ,
-
.Xr pkg-search 8 ,
-
.Xr pkg-set 8 ,
-
.Xr pkg-shell 8 ,
-
.Xr pkg-shlib 8 ,
-
.Xr pkg-ssh 8 ,
-
.Xr pkg-stats 8 ,
-
.Xr pkg-update 8 ,
-
.Xr pkg-updating 8 ,
-
.Xr pkg-upgrade 8 ,
-
.Xr pkg-version 8 ,
-
.Xr pkg-which 8
deleted src/pkg-fetch.8
@@ -1,136 +0,0 @@
-
.\"
-
.\" FreeBSD pkg - a next generation package for the installation and maintenance
-
.\" of non-core utilities.
-
.\"
-
.\" Redistribution and use in source and binary forms, with or without
-
.\" modification, are permitted provided that the following conditions
-
.\" are met:
-
.\" 1. Redistributions of source code must retain the above copyright
-
.\"    notice, this list of conditions and the following disclaimer.
-
.\" 2. Redistributions in binary form must reproduce the above copyright
-
.\"    notice, this list of conditions and the following disclaimer in the
-
.\"    documentation and/or other materials provided with the distribution.
-
.\"
-
.\"
-
.\"     @(#)pkg.8
-
.\" $FreeBSD$
-
.\"
-
.Dd June 30, 2013
-
.Dt PKG-FETCH 8
-
.Os
-
.Sh NAME
-
.Nm "pkg fetch"
-
.Nd Fetches remote packages.
-
.Sh SYNOPSIS
-
.Nm
-
.Op Fl r Ar reponame
-
.Op Fl dgiqUxy
-
.Ar pkg-name
-
.Op ...
-
.Nm
-
.Op Fl r Ar reponame
-
.Op Fl dqUy
-
.Fl a
-
.Nm
-
.Op Fl r Ar reponame
-
.Op Fl dqUy
-
.Fl u
-
.Sh DESCRIPTION
-
.Nm
-
is used to download binary packages from a remote repository.
-
.Pp
-
One or more packages, or patterns can be specified.
-
.Pp
-
Repository catalogues will be updated automatically using
-
.Xr pkg-update 8 .
-
This can be disabled with the
-
.Fl U
-
flag.
-
.Sh OPTIONS
-
The following options are supported by
-
.Nm :
-
.Bl -tag -width F1
-
.It Fl a
-
Fetch all packages.
-
.It Fl d
-
Fetch the package and its dependencies as well.
-
.It Fl g
-
Treat
-
.Ar pkg-name
-
as a shell glob pattern.
-
.It Fl i
-
Make the standard or regular expression
-
.Fl ( x )
-
matching against
-
.Ar pkg-name
-
case insensitive.
-
.It Fl q
-
Quiet mode.
-
Show less output.
-
.It Fl r Ar reponame
-
Fetches packages from the given
-
.Ar reponame
-
if multiple repo support is enabled.
-
See
-
.Xr pkg.conf 5 .
-
.It Fl u
-
Fetch all available updates for the currently installed packages.
-
.It Fl U
-
Skip updating the repository catalogues with
-
.Xr pkg-update 8 .
-
Use the local cache only.
-
.It Fl x
-
Treat
-
.Ar pkg-name
-
as a regular expression according to the "modern" or "extended" syntax
-
of
-
.Xr re_format 7 .
-
.It Fl y
-
Assume yes when asked for confirmation before fetching packages.
-
.El
-
.Sh ENVIRONMENT
-
The following environment variables affect the execution of
-
.Nm :
-
.Bl -tag -width ".Ev NO_DESCRIPTIONS"
-
.It Ev PKG_DBDIR
-
.El
-
.Pp
-
See
-
.Xr pkg.conf 5
-
for additional environment variables that control behaviour.
-
.Sh FILES
-
See
-
.Xr pkg.conf 5 .
-
.Sh SEE ALSO
-
.Xr fetch 3 ,
-
.Xr pkg.conf 5 ,
-
.Xr pkg 8 ,
-
.Xr pkg-add 8 ,
-
.Xr pkg-annotate 8 ,
-
.Xr pkg-audit 8 ,
-
.Xr pkg-autoremove 8 ,
-
.Xr pkg-backup 8 ,
-
.Xr pkg-check 8 ,
-
.Xr pkg-clean 8 ,
-
.Xr pkg-config 8 ,
-
.Xr pkg-convert 8 ,
-
.Xr pkg-create 8 ,
-
.Xr pkg-delete 8 ,
-
.Xr pkg-info 8 ,
-
.Xr pkg-install 8 ,
-
.Xr pkg-lock 8 ,
-
.Xr pkg-query 8 ,
-
.Xr pkg-register 8 ,
-
.Xr pkg-repo 8 ,
-
.Xr pkg-rquery 8 ,
-
.Xr pkg-search 8 ,
-
.Xr pkg-set 8 ,
-
.Xr pkg-shell 8 ,
-
.Xr pkg-shlib 8 ,
-
.Xr pkg-ssh 8 ,
-
.Xr pkg-stats 8 ,
-
.Xr pkg-update 8 ,
-
.Xr pkg-updating 8 ,
-
.Xr pkg-upgrade 8 ,
-
.Xr pkg-version 8 ,
-
.Xr pkg-which 8
deleted src/pkg-info.8
@@ -1,174 +0,0 @@
-
.\"
-
.\" FreeBSD pkg - a next generation package for the installation and maintenance
-
.\" of non-core utilities.
-
.\"
-
.\" Redistribution and use in source and binary forms, with or without
-
.\" modification, are permitted provided that the following conditions
-
.\" are met:
-
.\" 1. Redistributions of source code must retain the above copyright
-
.\"    notice, this list of conditions and the following disclaimer.
-
.\" 2. Redistributions in binary form must reproduce the above copyright
-
.\"    notice, this list of conditions and the following disclaimer in the
-
.\"    documentation and/or other materials provided with the distribution.
-
.\"
-
.\"
-
.\"     @(#)pkg.8
-
.\" $FreeBSD$
-
.\"
-
.Dd February 1, 2014
-
.Dt PKG-INFO 8
-
.Os
-
.Sh NAME
-
.Nm "pkg info"
-
.Nd displays information for packages
-
.Sh SYNOPSIS
-
.Nm
-
.Ar pkg-name
-
.Nm
-
.Fl a
-
.Nm
-
.Op Fl AbBDdefgiIklOqRrsx
-
.Ar pkg-name
-
.Nm
-
.Op Fl AbBDdfIlqRrs
-
.Fl F Ar pkg-file
-
.Sh DESCRIPTION
-
.Nm
-
is used for displaying information for packages.
-
.Sh OPTIONS
-
The following options are supported by
-
.Nm :
-
.Bl -tag -width F1
-
.It Fl a
-
Display all installed packages.
-
.It Fl A
-
Display any annotations added to the package.
-
.It Fl f
-
Display full information about the packages matching
-
.Ar pkg-name .
-
This is the default.
-
.It Fl R
-
Display the full manifest (raw) about the packages matching
-
.Ar pkg-name .
-
.It Fl e
-
If
-
.Ar pkg-name
-
is installed and registered in the database, return 0, otherwise return 1.
-
Useful for checking whether the package is installed.
-
.It Fl D
-
Show the pkg-message for matching packages.
-
.It Fl g
-
Treat
-
.Ar pkg-name
-
as a shell glob pattern.
-
.It Fl i
-
Make the default or the regular expression
-
.Fl ( x )
-
.Ar pkg-name
-
matching case insensitive.
-
.It Fl x
-
Treat
-
.Ar pkg-name
-
as a regular expression according to the "modern" or "extended" syntax
-
of
-
.Xr re_format 7 .
-
.It Fl d
-
Display the list of packages on which
-
.Ar pkg-name
-
depends.
-
.It Fl r
-
Display the list of packages which require
-
.Ar pkg-name .
-
.It Fl k
-
Show the locking status for
-
.Ar pkg-name .
-
When used in combination with
-
.Fl d
-
or
-
.Fl r ,
-
indicate which packages, dependencies or requirements are locked
-
by '(*)'.
-
Locking status is only meaningful for installed packages; all locking
-
statuses will show as unlocked when information about a
-
.Ar pkg-file
-
is queried.
-
.It Fl l
-
Display all files installed by
-
.Ar pkg-name .
-
.It Fl b
-
Display all shared libraries provided by
-
.Ar pkg-name .
-
.It Fl B
-
Display all shared libraries used by
-
.Ar pkg-name .
-
.It Fl s
-
Display the total size of files installed by
-
.Ar pkg-name
-
.It Fl q
-
Be
-
.Dq quiet .
-
Prints only the requested information without displaying many hints.
-
.It Fl O
-
Search is done by the
-
.Ar pkg-name
-
origin.
-
Added only for Ports compatibility.
-
.Pp
-
.It Fl E
-
Hides the full package output and only shows the package name.
-
This option is deprecated and exists only for Ports compatibility.
-
.It Fl o
-
Display
-
.Ar pkg-name
-
origin.
-
.It Fl p
-
Display the installation prefix for each package matching
-
.Ar pkg-name .
-
.It Fl F Ar pkg-file
-
Displays information from the package archive
-
.Ar pkg-file .
-
.El
-
.Sh ENVIRONMENT
-
The following environment variables affect the execution of
-
.Nm .
-
See
-
.Xr pkg.conf 5
-
for further description.
-
.Bl -tag -width ".Ev NO_DESCRIPTIONS"
-
.It Ev PKG_DBDIR
-
.El
-
.Sh FILES
-
See
-
.Xr pkg.conf 5 .
-
.Sh SEE ALSO
-
.Xr pkg.conf 5 ,
-
.Xr pkg 8 ,
-
.Xr pkg-add 8 ,
-
.Xr pkg-annotate 8 ,
-
.Xr pkg-audit 8 ,
-
.Xr pkg-autoremove 8 ,
-
.Xr pkg-backup 8 ,
-
.Xr pkg-check 8 ,
-
.Xr pkg-clean 8 ,
-
.Xr pkg-config 8 ,
-
.Xr pkg-convert 8 ,
-
.Xr pkg-create 8 ,
-
.Xr pkg-delete 8 ,
-
.Xr pkg-fetch 8 ,
-
.Xr pkg-install 8 ,
-
.Xr pkg-lock 8 ,
-
.Xr pkg-query 8 ,
-
.Xr pkg-register 8 ,
-
.Xr pkg-repo 8 ,
-
.Xr pkg-rquery 8 ,
-
.Xr pkg-search 8 ,
-
.Xr pkg-set 8 ,
-
.Xr pkg-shell 8 ,
-
.Xr pkg-shlib 8 ,
-
.Xr pkg-ssh 8 ,
-
.Xr pkg-stats 8 ,
-
.Xr pkg-update 8 ,
-
.Xr pkg-updating 8 ,
-
.Xr pkg-upgrade 8 ,
-
.Xr pkg-version 8 ,
-
.Xr pkg-which 8
deleted src/pkg-install.8
@@ -1,206 +0,0 @@
-
.\"
-
.\" FreeBSD pkg - a next generation package for the installation and
-
.\" maintenance of non-core utilities.
-
.\"
-
.\" Redistribution and use in source and binary forms, with or without
-
.\" modification, are permitted provided that the following conditions
-
.\" are met:
-
.\" 1. Redistributions of source code must retain the above copyright
-
.\"    notice, this list of conditions and the following disclaimer.
-
.\" 2. Redistributions in binary form must reproduce the above copyright
-
.\"    notice, this list of conditions and the following disclaimer in the
-
.\"    documentation and/or other materials provided with the distribution.
-
.\"
-
.\"
-
.\"     @(#)pkg.8
-
.\" $FreeBSD$
-
.\"
-
.Dd March 11, 2014
-
.Dt PKG-INSTALL 8
-
.Os
-
.Sh NAME
-
.Nm "pkg install"
-
.Nd installs packages from remote package repositories or local archives
-
.Sh SYNOPSIS
-
.Nm
-
.Op Fl AfgIinFqRUxy
-
.Op Fl r Ar reponame
-
.Ar pkg-origin ...
-
.Sh DESCRIPTION
-
.Nm
-
is used for installation of packages from a package repository or local archives.
-
Multiple package names can be specified on the command line, either
-
explicitly or by matching against package names in the repository
-
catalogues using shell globbing or regular expressions.
-
.Pp
-
.Nm
-
first updates any out-of-date repository catalogues, unless
-
.Cm REPO_AUTOUPDATE
-
has been set to
-
.Sy NO
-
in
-
.Pa pkg.conf .
-
.Pp
-
It then creates a work-list of all the package installations to do.
-
Any already installed and up-to-date packages will be dropped from the
-
list unless the
-
.Fl f
-
(force) option is supplied, in which case those packages will be
-
reinstalled.
-
.Pp
-
The dependencies of packages in the list are examined and any missing
-
packages are added to the list for installation.
-
Such implicitly added packages are flagged as candidates for
-
autoremoval.
-
See
-
.Xr pkg-autoremove 8
-
for details.
-
.Pp
-
Autoremoval flags are sticky, and will persist over reinstallation or
-
upgrade of the packages concerned, even if subsequently the packages
-
are named explicitly on a command line.
-
See
-
.Xr pkg-query 8
-
for finding the autoremoval status of a package, and
-
.Xr pkg-set 8
-
for modifying it.
-
.Pp
-
Any already installed but out of date packages, either named on the
-
command line or from the sum of all their dependencies are added to
-
the work list as upgrade jobs.
-
The work list is sorted into dependency order and
-
.Nm
-
will present it to the user for approval before proceeding, unless
-
overridden by the
-
.Fl y
-
option or the
-
.Cm ASSUME_ALWAYS_YES
-
setting in
-
.Pa pkg.conf .
-
.Pp
-
Packages are fetched from the repositories into the local package
-
cache if they are not already present, or if the checksum of the
-
cached package file differs from the one in the repository.
-
Packages may be downloaded from any of the repositories mentioned
-
in
-
.Xr pkg.conf 5
-
or in the files in
-
.Pa /usr/local/etc/pkg/repo .
-
See
-
.Xr pkg-repository 5
-
for details.
-
.Pp
-
Package repository catalogues will be automatically updated whenever
-
.Xr pkg-update 8
-
is run, unless disabled by the
-
.Fl U
-
flag.
-
Updating repository catalogues is highly recommended before doing any
-
package installation with
-
.Nm .
-
.Sh OPTIONS
-
The following options are supported by
-
.Nm :
-
.Bl -tag -width F1
-
.It Fl A
-
Mark the installed packages as orphan.
-
Will be automatically removed if no other packages depend on them.
-
For more information please refer to
-
.Xr pkg-autoremove 8
-
.It Fl f
-
Force the reinstallation of the package if already installed.
-
.It Fl g
-
Treat the package names as shell glob patterns.
-
.It Fl I
-
If any installation scripts (pre-install or post-install) exist for a given
-
package, do not execute them.
-
When a package is updated, deinstallation
-
scripts (pre-deinstall or post-deinstall) are not run either.
-
.It Fl i
-
Make the standard or the regular expression
-
.Fl ( x )
-
matching against
-
.Ar pkg-name
-
case insensitive.
-
.It Fl n
-
Dry-run mode.
-
The list of changes to packages is always printed, but
-
no changes are actually made.
-
.It Fl F
-
Do not perform actual installation of packages, merely fetch packages
-
that should be upgraded and detect possible conflicts.
-
.It Fl q
-
Force quiet output, except when
-
.Fl n
-
is used, where
-
.Nm
-
will always show packages to be installed, upgraded or deleted.
-
.It Fl R
-
When used with
-
.Fl f ,
-
reinstalls any packages that require the given package.
-
.It Fl r Ar reponame
-
In multi-repo mode, override the
-
.Fa pkg.conf
-
ordering and only attempt to download packages from the named
-
repository.
-
.It Fl U
-
Skip updating the repository catalogues with
-
.Xr pkg-update 8 .
-
Use the locally cached copies only.
-
.It Fl x
-
Treat the package names as regular expressions according to the
-
"modern" or "extended" syntax of
-
.Xr re_format 7 .
-
.It Fl y
-
Assume yes when asked for confirmation before package installation.
-
.El
-
.Sh ENVIRONMENT
-
The following environment variables affect the execution of
-
.Nm .
-
See
-
.Xr pkg.conf 5
-
for further description.
-
.Bl -tag -width ".Ev NO_DESCRIPTIONS"
-
.It Ev ASSUME_ALWAYS_YES
-
.It Ev HANDLE_RC_SCRIPTS
-
.It Ev PACKAGESITE
-
.It Ev PKG_CACHEDIR
-
.It Ev PKG_DBDIR
-
.It Ev REPO_AUTOUPDATE
-
.El
-
.Sh FILES
-
See
-
.Xr pkg.conf 5 .
-
.Sh SEE ALSO
-
.Xr pkg.conf 5 ,
-
.Xr pkg 8 ,
-
.Xr pkg-add 8 ,
-
.Xr pkg-annotate 8 ,
-
.Xr pkg-audit 8 ,
-
.Xr pkg-autoremove 8 ,
-
.Xr pkg-backup 8 ,
-
.Xr pkg-check 8 ,
-
.Xr pkg-clean 8 ,
-
.Xr pkg-config 8 ,
-
.Xr pkg-convert 8 ,
-
.Xr pkg-create 8 ,
-
.Xr pkg-delete 8 ,
-
.Xr pkg-fetch 8 ,
-
.Xr pkg-info 8 ,
-
.Xr pkg-lock 8 ,
-
.Xr pkg-query 8 ,
-
.Xr pkg-register 8 ,
-
.Xr pkg-repo 8 ,
-
.Xr pkg-rquery 8 ,
-
.Xr pkg-search 8 ,
-
.Xr pkg-set 8 ,
-
.Xr pkg-shell 8 ,
-
.Xr pkg-shlib 8 ,
-
.Xr pkg-ssh 8 ,
-
.Xr pkg-stats 8 ,
-
.Xr pkg-update 8 ,
-
.Xr pkg-updating 8 ,
-
.Xr pkg-upgrade 8 ,
-
.Xr pkg-version 8 ,
-
.Xr pkg-which 8
deleted src/pkg-lock.8
@@ -1,139 +0,0 @@
-
.\"
-
.\" FreeBSD pkg - a next generation package for the installation and maintenance
-
.\" of non-core utilities.
-
.\"
-
.\" Redistribution and use in source and binary forms, with or without
-
.\" modification, are permitted provided that the following conditions
-
.\" are met:
-
.\" 1. Redistributions of source code must retain the above copyright
-
.\"    notice, this list of conditions and the following disclaimer.
-
.\" 2. Redistributions in binary form must reproduce the above copyright
-
.\"    notice, this list of conditions and the following disclaimer in the
-
.\"    documentation and/or other materials provided with the distribution.
-
.\"
-
.\"
-
.\"     @(#)pkg.8
-
.\" $FreeBSD$
-
.\"
-
.Dd February 25, 2013
-
.Dt PKG-LOCK 8
-
.Os
-
.Sh NAME
-
.Nm "pkg lock" ,
-
.Nm "pkg unlock"
-
.Nd lock or unlock packages
-
.Sh SYNOPSIS
-
.Nm
-
.Op Fl qy
-
.Fl a
-
.Nm
-
.Op Fl giqxy
-
.Ar pkg-name
-
.Nm "pkg unlock"
-
.Op Fl qy
-
.Fl a
-
.Nm "pkg unlock"
-
.Op Fl giqxy
-
.Ar pkg-name
-
.Sh DESCRIPTION
-
.Nm
-
is used to lock packages against reinstallation,
-
modification or deletion.
-
.Nm "pkg unlock"
-
unlocks the named packages.
-
Either variant only has an effect on currently installed packages.
-
Consequently it is impossible to block installation of a new package
-
by using this mechanism, unless such an installation implies updating
-
a locked package.
-
.Pp
-
The impact of locking a package is wider than simply preventing
-
modifications to the package itself.
-
.Cm Any
-
operation implying modification of the locked package will be
-
blocked.
-
This includes:
-
.Pp
-
.Bl -bullet -compact
-
.It
-
Attempts to reinstall, up- or downgrade or delete the locked package
-
itself.
-
.It
-
Installation, up- or downgrade of a package where the resultant
-
package would have a dependency on a different version of the locked
-
package.
-
.It
-
Deletion, up- or downgrade of any package the locked package depends
-
upon, either directly or as a consequence of installing or upgrading
-
some third package.
-
.El
-
.Sh OPTIONS
-
The following options are supported by
-
.Nm :
-
.Bl -tag -width F1
-
.It Fl a
-
Lock or unlock all installed packages.
-
.It Fl g
-
Treat
-
.Ar pkg-name
-
as a shell glob pattern.
-
.It Fl i
-
Make the default or the regular expression
-
.Fl ( x )
-
.Ar pkg-name
-
matching case insensitive.
-
.It Fl q
-
Operate quietly: do not output anything other than confirmatory questions.
-
.It Fl x
-
Treat
-
.Ar pkg-name
-
as a regular expression according to the "modern" or "extended" syntax
-
of
-
.Xr re_format 7 .
-
.It Fl y
-
Assume "yes" as the answer to all questions.
-
.El
-
.Sh ENVIRONMENT
-
The following environment variables affect the execution of
-
.Nm .
-
See
-
.Xr pkg.conf 5
-
for further description.
-
.Bl -tag -width ".Ev NO_DESCRIPTIONS"
-
.It Ev PKG_DBDIR
-
.It Ev ASSUME_ALWAYS_YES
-
.El
-
.Sh FILES
-
See
-
.Xr pkg.conf 5 .
-
.Sh SEE ALSO
-
.Xr pkg.conf 5 ,
-
.Xr pkg 8 ,
-
.Xr pkg-add 8 ,
-
.Xr pkg-annotate 8 ,
-
.Xr pkg-audit 8 ,
-
.Xr pkg-autoremove 8 ,
-
.Xr pkg-backup 8 ,
-
.Xr pkg-check 8 ,
-
.Xr pkg-clean 8 ,
-
.Xr pkg-config 8 ,
-
.Xr pkg-convert 8 ,
-
.Xr pkg-create 8 ,
-
.Xr pkg-delete 8 ,
-
.Xr pkg-fetch 8 ,
-
.Xr pkg-info 8 ,
-
.Xr pkg-install 8 ,
-
.Xr pkg-query 8 ,
-
.Xr pkg-register 8 ,
-
.Xr pkg-repo 8 ,
-
.Xr pkg-rquery 8 ,
-
.Xr pkg-search 8 ,
-
.Xr pkg-set 8 ,
-
.Xr pkg-shell 8 ,
-
.Xr pkg-shlib 8 ,
-
.Xr pkg-ssh 8 ,
-
.Xr pkg-stats 8 ,
-
.Xr pkg-update 8 ,
-
.Xr pkg-updating 8 ,
-
.Xr pkg-upgrade 8 ,
-
.Xr pkg-version 8 ,
-
.Xr pkg-which 8
deleted src/pkg-query.8
@@ -1,360 +0,0 @@
-
.\"
-
.\" FreeBSD pkg - a next generation package for the installation and maintenance
-
.\" of non-core utilities.
-
.\"
-
.\" Redistribution and use in source and binary forms, with or without
-
.\" modification, are permitted provided that the following conditions
-
.\" are met:
-
.\" 1. Redistributions of source code must retain the above copyright
-
.\"    notice, this list of conditions and the following disclaimer.
-
.\" 2. Redistributions in binary form must reproduce the above copyright
-
.\"    notice, this list of conditions and the following disclaimer in the
-
.\"    documentation and/or other materials provided with the distribution.
-
.\"
-
.\"
-
.\"     @(#)pkg.8
-
.\" $FreeBSD$
-
.\"
-
.Dd January 14, 2014
-
.Dt PKG-QUERY 8
-
.Os
-
.Sh NAME
-
.Nm "pkg query"
-
.Nd query information for installed packages
-
.Sh SYNOPSIS
-
.Nm
-
.Ao query-format Ac Ao pkg-name Ac
-
.Nm
-
.Op Fl a
-
.Ao query-format Ac
-
.Nm
-
.Fl F Ao pkg-name Ac Ao query-format Ac
-
.Nm
-
.Fl e Ao evaluation-condition Ac Ao query-format Ac
-
.Nm
-
.Op Fl gix
-
.Ao query-format Ac Ao pattern Ac Ao ... Ac
-
.Sh DESCRIPTION
-
.Nm
-
is used for displaying information about packages.
-
.Sh OPTIONS
-
The following options are supported by
-
.Nm :
-
.Bl -tag -width F1
-
.It Fl a
-
Match all packages from the database
-
.It Fl e
-
Match packages using the given
-
.Ar evaluation-condition.
-
See EVALUATION FORMAT for details.
-
.It Fl F Ar pkg-name
-
Display information only for the package file
-
.Ar pkg-name
-
.It Fl i
-
Make the standard or regular expression
-
.Fl ( x )
-
matching against
-
.Ar pkg-name
-
case insensitive.
-
.It Fl g
-
Treat
-
.Ao pattern Ac
-
as a glob pattern.
-
.It Fl x
-
Treat
-
.Ao pattern Ac
-
as a regular expression according to the "modern" or "extended" syntax
-
of
-
.Xr re_format 7 .
-
.El
-
.Sh QUERY FORMAT
-
There are two type of keyword for the query format: the multiline and the normal
-
one. Only one type of multiline pattern is accepted for a given query.
-
.Ss Normal patterns:
-
.Bl -tag -width F1
-
.It Cm \&%n
-
Name of the matched package
-
.It Cm \&%v
-
Version of the matched package
-
.It Cm \&%o
-
Origin of the matched package
-
.It Cm \&%p
-
Prefix of the matched package
-
.It Cm \&%m
-
Maintainer of the matched package
-
.It Cm \&%c
-
Comment of the matched package
-
.It Cm \&%e
-
Description of the matched package
-
.It Cm \&%w
-
Home page of the matched package
-
.It Cm \&%l
-
license logic of the matched package - nothing for single, & for AND, and | for OR
-
.It Cm \&%s Ns Op bh
-
The flat size of the matched package, where
-
.Cm b
-
is in bytes, and
-
.Cm h
-
is in human readable format.
-
.It Cm \&%a
-
Returns 1 if the matched package is an orphan package and can be pkg-autoremove(1)'d, 0 otherwise
-
.It Cm \&%q
-
Architecture of the matched package
-
.It Cm \&%k
-
Returns 1 if the matched package is locked against modification or deletion, 0 otherwise
-
.It Cm \&%M
-
message contained in the matched package
-
.It Cm \&%t
-
Timestamp that the package was installed
-
.It Cm \&%? Ns Op drCFODLUGBbA
-
Returns 0 if the list is empty and 1 if the list has information to display
-
.Bl -tag -width indent
-
.It Cm d
-
for dependencies
-
.It Cm r
-
for reverse dependencies
-
.It Cm C
-
for categories
-
.It Cm F
-
for files
-
.It Cm O
-
for options
-
.It Cm D
-
for directories
-
.It Cm L
-
for licenses
-
.It Cm U
-
for users
-
.It Cm G
-
for groups
-
.It Cm B
-
for required shared libraries
-
.It Cm b
-
for provided shared libraries
-
.It Cm A
-
for annotations
-
.El
-
.It Cm \&%# Ns Op drCFODLUGBbA
-
Returns the number of elements in the list
-
.Bl -tag -width indent
-
.It Cm d
-
for dependencies
-
.It Cm r
-
for reverse dependencies
-
.It Cm C
-
for categories
-
.It Cm F
-
for files
-
.It Cm O
-
for options
-
.It Cm D
-
for directories
-
.It Cm L
-
for licenses
-
.It Cm U
-
for users
-
.It Cm G
-
for groups
-
.It Cm b
-
for shared
-
.It Cm B
-
for required shared libraries
-
.It Cm b
-
for provided shared libraries
-
.It Cm A
-
for annotations
-
.El
-
.El
-
.Ss Multiline patterns:
-
.Bl -tag -width F1
-
.It Cm \&%d Ns Op nov
-
Expands to the list of dependencies for the matched package, where
-
.Cm n
-
stands for the package name,
-
.Cm o
-
for the package origin, and
-
.Cm v
-
for the package version.
-
.It Cm \&%r Ns Op nov
-
Expands to the list of reverse dependencies for the matched package, where
-
.Cm n
-
stands for the package name,
-
.Cm o
-
for the package origin, and
-
.Cm v
-
for the package version.
-
.It Cm \&%C
-
Expands to the list of categories the matched package belongs to.
-
.It Cm \&%F Ns Op ps
-
Expands to the list of files of the matched package, where
-
.Cm p
-
stands for path, and
-
.Cm s
-
for sum.
-
.It Cm \&%D
-
Expands to the list of directories of the matched package.
-
.It Cm \&%O Ns Op kvdD
-
Expands to the list of options of the matched package, where
-
.Cm k
-
stands for option key,
-
.Cm v
-
for option value,
-
.Cm d
-
for option default value and
-
.Cm D
-
for option description.
-
Option default values and descriptions are optional metadata and may
-
beblank for certain packages.
-
.It Cm \&%L
-
Expands to the list of license(s) for the matched package.
-
.It Cm \&%U
-
Expands to the list of users needed by the matched package.
-
.It Cm \&%G
-
Expands to the list of groups needed by the matched package.
-
.It Cm \&%B
-
Expands to the list of shared libraries used by programs from the matched package.
-
.It Cm \&%b
-
Expands to the list of shared libraries provided by the matched package.
-
.It Cm \&%A Ns Op tv
-
Expands to the list of annotations for the matched package,
-
where
-
.Cm t
-
stands for the annotation tag, and
-
.Cm v
-
stands for the annotation value.
-
.El
-
.Sh EVALUATION FORMAT
-
Packages can be selected by using expressions comparing
-
.Ar Variables
-
(see below) to string or integer values. The mode of comparison is specified
-
by the
-
.Ar Operator
-
(also listed below).
-
Expressions can be combined using && (for and) and || (for or).
-
Parentheses can be used for grouping in the usual manner.
-
.Pp
-
String values are either any text not containing whitespace (possibly
-
followed by but not including whitespace) or any text enclosed in single or
-
double quotes.
-
.Ss Variables
-
.Bl -tag -width F1
-
.It Cm \&%n
-
Name of the package (type string)
-
.It Cm \&%o
-
Origin of the package (type string)
-
.It Cm \&%p
-
Prefix of the package (type string)
-
.It Cm \&%m
-
Maintainer of the package (type string)
-
.It Cm \&%c
-
Comment of the package (type string)
-
.It Cm \&%e
-
Description of the package (type string)
-
.It Cm \&%w
-
WWW address of the package (type string)
-
.It Cm \&%s
-
Flatsize of the package (type integer)
-
.It Cm \&%a
-
Automatic status of the package (type integer)
-
.It Cm \&%q
-
Architecture of the package (type string)
-
.It Cm \&%k
-
Locking status of the package (type integer)
-
.It Cm \&%M
-
Message of the package (type string)
-
.It Cm \&%t
-
Timestamp that the package was installed (type integer)
-
.It Cm \&%i
-
Additionnal information about the package (type string)
-
.It Cm \&%# Ns Op drCFODLUGBbA
-
Number of elements in the list of information (type integer).
-
See
-
.Cm %?
-
above for what information is used.
-
.El
-
.Ss Operators
-
.Bl -tag -width F1
-
.It Cm ~
-
String glob pattern matching
-
.It Cm > Ns Op =
-
Integer comparison
-
.It Cm < Ns Op =
-
Integer comparison
-
.It Cm = Ns Op =
-
Integer or string equality comparison
-
.It Cm !=
-
Integer or string inequality comparison
-
.El
-
.Sh ENVIRONMENT
-
The following environment variables affect the execution of
-
.Nm .
-
See
-
.Xr pkg.conf 5
-
for further description.
-
.Bl -tag -width ".Ev NO_DESCRIPTIONS"
-
.It Ev PKG_DBDIR
-
.El
-
.Sh FILES
-
See
-
.Xr pkg.conf 5 .
-
.Sh EXIT STATUS
-
.Ex -std
-
.Sh EXAMPLES
-
List all installed packages by name-version:
-
.Dl $ pkg query %n-%v
-
.Pp
-
List all dependencies for a package by origin:
-
.Dl $ pkg query %do subversion
-
.Pp
-
List all dependencies by package name-version:
-
.Dl $ pkg query %dn-%dv subversion
-
.Pp
-
List all reverse dependencies for a package:
-
.Dl $ pkg query %ro perl
-
.Pp
-
List all files and their known checksums for a package:
-
.Dl $ pkg query '%Fp %Fs' perl
-
.Pp
-
List all files for all packages:
-
.Dl $ pkg query '%o: %Fp'
-
.Pp
-
List all packages with no reverse dependencies:
-
.Dl $ pkg query -e '%#r = 0' %o
-
.Pp
-
List non-automatic packages:
-
.Dl $ pkg query -e '%a = 0' %o
-
.Pp
-
List automatic packages:
-
.Dl $ pkg query -e '%a = 1' %o
-
.Sh SEE ALSO
-
.Xr pkg.conf 5 ,
-
.Xr pkg 8 ,
-
.Xr pkg-add 8 ,
-
.Xr pkg-annotate 8 ,
-
.Xr pkg-audit 8 ,
-
.Xr pkg-autoremove 8 ,
-
.Xr pkg-backup 8 ,
-
.Xr pkg-check 8 ,
-
.Xr pkg-clean 8 ,
-
.Xr pkg-config 8 ,
-
.Xr pkg-convert 8 ,
-
.Xr pkg-create 8 ,
-
.Xr pkg-delete 8 ,
-
.Xr pkg-fetch 8 ,
-
.Xr pkg-info 8 ,
-
.Xr pkg-install 8 ,
-
.Xr pkg-lock 8 ,
-
.Xr pkg-register 8 ,
-
.Xr pkg-repo 8 ,
-
.Xr pkg-rquery 8 ,
-
.Xr pkg-search 8 ,
-
.Xr pkg-set 8 ,
-
.Xr pkg-shell 8 ,
-
.Xr pkg-shlib 8 ,
-
.Xr pkg-ssh 8 ,
-
.Xr pkg-stats 8 ,
-
.Xr pkg-update 8 ,
-
.Xr pkg-updating 8 ,
-
.Xr pkg-upgrade 8 ,
-
.Xr pkg-version 8 ,
-
.Xr pkg-which 8
deleted src/pkg-register.8
@@ -1,189 +0,0 @@
-
.\"
-
.\" FreeBSD pkg - a next generation package for the installation and maintenance
-
.\" of non-core utilities.
-
.\"
-
.\" Redistribution and use in source and binary forms, with or without
-
.\" modification, are permitted provided that the following conditions
-
.\" are met:
-
.\" 1. Redistributions of source code must retain the above copyright
-
.\"    notice, this list of conditions and the following disclaimer.
-
.\" 2. Redistributions in binary form must reproduce the above copyright
-
.\"    notice, this list of conditions and the following disclaimer in the
-
.\"    documentation and/or other materials provided with the distribution.
-
.\"
-
.\"
-
.\"     @(#)pkg.8
-
.\" $FreeBSD$
-
.\"
-
.Dd April 14, 2013
-
.Dt PKG-REGISTER 8
-
.Os
-
.Sh NAME
-
.Nm "pkg register"
-
.Nd registers a package into the local package database
-
.Sh SYNOPSIS
-
.Nm
-
.Op Fl dlOt
-
.Op Fl f Ar plist-file
-
.Fl m Ar metadatadir
-
.Fl i Ar input-path
-
.Nm
-
.Op Fl dlOt
-
.Fl M Ar metadatafile
-
.Sh DESCRIPTION
-
.Nm
-
is used for registering a package into the local package database.
-
.Pp
-
.Nm
-
assembles a full set of package meta-data from various possible inputs,
-
and writes the meta-data into the package registry database.
-
This is one of the final steps when installing software from ports:
-
the package files are installed into the filesystem, and then
-
.Nm
-
is called to record what was installed into the package database.
-
.Pp
-
.Nm
-
can derive package meta-data from a number of different sources:
-
.Bl -bullet
-
.It
-
The package manifest
-
.It
-
The metadata directory
-
.It
-
Direct analysis of files installed by the package
-
.El
-
.Pp
-
The package manifest is a
-
.Cm YAML
-
format listing of package meta-data.
-
It can contain all of the necessary meta-data needed by the package,
-
but the more usual approach is to provide selected items via the
-
manifest, and fill in the rest, either from legacy files such as
-
.Fa pkg-plist ,
-
.Fa +DESC,
-
.Fa +DISPLAY,
-
.Fa +MESSAGE
-
or
-
.Fa +MTREE_DIRS
-
which are optional and mostly located in the
-
.Ar metadatadir
-
given as the argument to the
-
.Fl m
-
option.
-
.Pp
-
Other information about shared library requirements and the packages
-
necessary to provide them may be obtained by direct analysis of the
-
files installed by the package.
-
This is the mechanism currently used when installing software directly
-
from the ports tree, as it provides reasonable backwards compatibility
-
with the old style
-
.Xr pkg_add 1
-
command.
-
.Pp
-
Reading in a complete and comprehensive manifest from one file is a
-
simpler alternative, but requires all the meta-data to have been
-
assembled beforehand.
-
.Pp
-
Direct analysis of the installed files can be suppressed by use of
-
the
-
.Fl t
-
option.
-
This is intended for testing the functionality of
-
.Xr pkg 8
-
itself, and should not be routinely used.
-
.Sh OPTIONS
-
The following options are supported by
-
.Nm :
-
.Bl -tag -width F1
-
.It Fl d
-
Mark the package to be automatically removed if no other packages
-
depend on it.
-
For more information please refer to
-
.Xr pkg-autoremove 8
-
.It Fl f Ar plist-file
-
Specifies a
-
.Fa pkg-plist
-
style packing list file
-
.It Fl i Ar input-path
-
Specifies the package input path or staging directory.
-
.It Fl l
-
Tells
-
.Nm
-
to generate an old-style package registry entry in a sub-directory of
-
.Sy $PKG_DBDIR
-
rather than updating the
-
.Fa local.sqlite
-
database.
-
.It Fl M Ar manifest
-
Specifies the package manifest file.
-
Use of this option means that the only file which will be used as a
-
source of package meta-data is the named
-
.Ar manifest
-
file.
-
The
-
.Fl M
-
option is mutually exclusive with
-
.Fl m .
-
.It Fl m Ar metadatadir
-
Specifies the meta data directory to use when registering the package.
-
This directory will hold the package manifest, and optionally may contain
-
a number of other old-style metadata input files.
-
The
-
.Fl m
-
option is mutually exclusive with
-
.Fl M .
-
.It Fl t
-
Enable testing mode.
-
This allows
-
.Nm
-
to update the package database without performing any of the usual
-
analyses of files installed by the package.
-
This option should only be used with caution, and preferably only
-
for the intended purpose of performing regression tests on
-
.Xr pkg 8
-
itself.
-
.El
-
.Sh ENVIRONMENT
-
The following environment variables affect the execution of
-
.Nm .
-
See
-
.Xr pkg.conf 5
-
for further description.
-
.Bl -tag -width ".Ev NO_DESCRIPTIONS"
-
.It Ev PKG_DBDIR
-
.El
-
.Sh FILES
-
See
-
.Xr pkg.conf 5 .
-
.Sh SEE ALSO
-
.Xr pkg.conf 5 ,
-
.Xr pkg 8 ,
-
.Xr pkg-add 8 ,
-
.Xr pkg-annotate 8 ,
-
.Xr pkg-audit 8 ,
-
.Xr pkg-autoremove 8 ,
-
.Xr pkg-backup 8 ,
-
.Xr pkg-check 8 ,
-
.Xr pkg-clean 8 ,
-
.Xr pkg-config 8 ,
-
.Xr pkg-convert 8 ,
-
.Xr pkg-create 8 ,
-
.Xr pkg-delete 8 ,
-
.Xr pkg-fetch 8 ,
-
.Xr pkg-info 8 ,
-
.Xr pkg-install 8 ,
-
.Xr pkg-lock 8 ,
-
.Xr pkg-query 8 ,
-
.Xr pkg-repo 8 ,
-
.Xr pkg-rquery 8 ,
-
.Xr pkg-search 8 ,
-
.Xr pkg-set 8 ,
-
.Xr pkg-shell 8 ,
-
.Xr pkg-shlib 8 ,
-
.Xr pkg-ssh 8 ,
-
.Xr pkg-stats 8 ,
-
.Xr pkg-update 8 ,
-
.Xr pkg-updating 8 ,
-
.Xr pkg-upgrade 8 ,
-
.Xr pkg-version 8 ,
-
.Xr pkg-which 8
deleted src/pkg-repo.8
@@ -1,222 +0,0 @@
-
.\"
-
.\" FreeBSD pkg - a next generation package for the installation and maintenance
-
.\" of non-core utilities.
-
.\"
-
.\" Redistribution and use in source and binary forms, with or without
-
.\" modification, are permitted provided that the following conditions
-
.\" are met:
-
.\" 1. Redistributions of source code must retain the above copyright
-
.\"    notice, this list of conditions and the following disclaimer.
-
.\" 2. Redistributions in binary form must reproduce the above copyright
-
.\"    notice, this list of conditions and the following disclaimer in the
-
.\"    documentation and/or other materials provided with the distribution.
-
.\"
-
.\"
-
.\"     @(#)pkg.8
-
.\" $FreeBSD$
-
.\"
-
.Dd November 12, 2013
-
.Dt PKG-REPO 8
-
.Os
-
.Sh NAME
-
.Nm "pkg repo"
-
.Nd creates a package repository catalogue
-
.Sh SYNOPSIS
-
.Nm
-
.Op Fl lq
-
.Op Fl o Ar output-dir
-
.Ao Ar repo-path Ac Op Ao Ar rsa-key Ac | signing_command: Ao Ar the command Ac
-
.Sh DESCRIPTION
-
.Nm
-
is used for creating a catalogue of the available
-
packages in a repository.
-
.Nm
-
catalogues are necessary for sharing your package repository with
-
other people.
-
.Pp
-
When
-
.Nm
-
is invoked it creates a package repository catalogue (repo.sqlite),
-
with an optional cryptographic signature, as a compressed tarball
-
(repo.txz).
-
Repository users download and cache this on their local machines,
-
for fast lookup of available packages by programs such as
-
.Xr pkg-install 8 .
-
.Pp
-
To create a package repository catalogue you must specify the
-
top-level directory where all the packages are stored as
-
.Ar repo-path .
-
.Nm
-
will search the filesystem beneath
-
.Ar repo-path
-
to find all the packages it contains.
-
Symbolic links are ignored, and only the most recent package for each
-
origin is included in the catalogue.
-
.Pp
-
The repository will be created in the package directory unless the
-
.Fl o Ar output-dir
-
is specified, in which case it will be created there.
-
.Pp
-
Optionally you may sign the repository catalogue by specifying the
-
path to an RSA private key as the
-
.Ar rsa-key
-
argument or an external command.
-
.Pp
-
If
-
.Ar rsa-key
-
is used, the SHA256 of the repository is signed using the provided key.
-
The signature is added into the repository catalogue.
-
The client side should use
-
.Sy SIGNATURE_TYPE
-
set to
-
.Dv PUBKEY
-
and
-
.Sy PUBKEY
-
set to a local path of the public key in its
-
.Pa pkg.conf .
-
.Pp
-
An external command can be useful to create a signing server to keep the
-
private key separate from the repository.
-
The external command is passed the SHA256 of the repository
-
catalogue on its stdin.
-
It should output the following format:
-
.Bd -literal -offset indent
-
SIGNATURE
-
signature data here
-
CERT
-
public key data here
-
END
-
.Ed
-
.Pp
-
When using an external command, the client's
-
.Pa pkg.conf
-
must have
-
.Sy SIGNATURE_TYPE
-
set to
-
.Dv FINGERPRINTS
-
and
-
.Sy FINGERPRINTS
-
set to a directory having a
-
.Pa trusted/myrepo
-
containing a fingerprint style representation of the public key:
-
.Bd -literal -offset indent
-
function: sha256
-
fingerprint: sha256_representation_of_the_public_key
-
.Ed
-
.Pp
-
See the
-
.Sx EXAMPLES
-
section and
-
.Xr pkg.conf 5
-
for more information.
-
.Pp
-
Signing the catalogue is strongly recommended.
-
.Sh OPTIONS
-
The following options are supported by
-
.Nm :
-
.Bl -tag -width F1
-
.It Fl q
-
Force quiet output
-
.It Fl l
-
Generate list of all files in repo as filesite.txz archive.
-
.It Fl o Ar output-dir
-
Create the repository in the specified directory instead of the package directory.
-
.El
-
.Sh ENVIRONMENT
-
The following environment variables affect the execution of
-
.Nm .
-
See
-
.Xr pkg.conf 5
-
for further description.
-
.Bl -tag -width ".Ev NO_DESCRIPTIONS"
-
.It Ev PUBKEY
-
.El
-
.Sh FILES
-
See
-
.Xr pkg.conf 5 .
-
.Sh SEE ALSO
-
.Xr pkg.conf 5 ,
-
.Xr pkg 8 ,
-
.Xr pkg-add 8 ,
-
.Xr pkg-annotate 8 ,
-
.Xr pkg-audit 8 ,
-
.Xr pkg-autoremove 8 ,
-
.Xr pkg-backup 8 ,
-
.Xr pkg-check 8 ,
-
.Xr pkg-clean 8 ,
-
.Xr pkg-config 8 ,
-
.Xr pkg-convert 8 ,
-
.Xr pkg-create 8 ,
-
.Xr pkg-delete 8 ,
-
.Xr pkg-fetch 8 ,
-
.Xr pkg-info 8 ,
-
.Xr pkg-install 8 ,
-
.Xr pkg-lock 8 ,
-
.Xr pkg-query 8 ,
-
.Xr pkg-register 8 ,
-
.Xr pkg-rquery 8 ,
-
.Xr pkg-search 8 ,
-
.Xr pkg-set 8 ,
-
.Xr pkg-shell 8 ,
-
.Xr pkg-shlib 8 ,
-
.Xr pkg-ssh 8 ,
-
.Xr pkg-stats 8 ,
-
.Xr pkg-update 8 ,
-
.Xr pkg-updating 8 ,
-
.Xr pkg-upgrade 8 ,
-
.Xr pkg-version 8 ,
-
.Xr pkg-which 8
-
.Sh EXAMPLES
-
Create an RSA key pair:
-
.Bd -literal -offset indent
-
% openssl genrsa -out repo.key 2048
-
% chmod 0400 repo.key
-
% openssl rsa -in repo.key -out repo.pub -pubout
-
.Ed
-
.Pp
-
Create a repository and sign it with a local RSA key.
-
The public key would be shared on all client servers with
-
.Sy SIGNATURE_TYPE
-
set to
-
.Dv PUBKEY
-
and its path set via
-
.Sy PUBKEY
-
setting in the
-
.Xr pkg.conf 5 :
-
.Pp
-
.Dl pkg repo /usr/ports/packages repo.key
-
.Pp
-
Create a repository and sign it with an external command.
-
The client should set, via
-
.Xr pkg.conf 5 ,
-
.Sy SIGNATURE_TYPE
-
to
-
.Dv FINGERPRINTS
-
and
-
.Sy FINGERPRINTS
-
to a path containing a file with the SHA256 of the public key:
-
.Bd -literal -offset indent
-
# On signing server:
-
% cat > sign.sh << EOF
-
#!/bin/sh
-
read -t 2 sum
-
[ -z "$sum" ] && exit 1
-
echo SIGNATURE
-
echo -n $sum | /usr/bin/openssl dgst -sign repo.key -sha256 -binary
-
echo
-
echo CERT
-
cat repo.pub
-
echo END
-
EOF
-

-
# On package server:
-
% pkg repo /usr/ports/packages signing_command: ssh signing-server sign.sh
-
# Generate fingerprint for sharing with clients
-
% sh -c '( echo "function: sha256"; echo "fingerprint: $(sha256 -q repo.pub)"; ) > fingerprint'
-
# The 'fingerprint' file should be distributed to all clients.
-

-
# On clients with FINGERPRINTS: /usr/local/etc/pkg/fingerprints/myrepo:
-
$ mkdir -p /usr/local/etc/pkg/fingerprints/myrepo/trusted
-
# Add 'fingerprint' into /usr/local/etc/pkg/fingerprints/myrepo/trusted
-

-
.Ed
deleted src/pkg-rquery.8
@@ -1,295 +0,0 @@
-
.\"
-
.\" FreeBSD pkg - a next generation package for the installation and maintenance
-
.\" of non-core utilities.
-
.\"
-
.\" Redistribution and use in source and binary forms, with or without
-
.\" modification, are permitted provided that the following conditions
-
.\" are met:
-
.\" 1. Redistributions of source code must retain the above copyright
-
.\"    notice, this list of conditions and the following disclaimer.
-
.\" 2. Redistributions in binary form must reproduce the above copyright
-
.\"    notice, this list of conditions and the following disclaimer in the
-
.\"    documentation and/or other materials provided with the distribution.
-
.\"
-
.\"
-
.\"     @(#)pkg.8
-
.\" $FreeBSD$
-
.\"
-
.Dd February 1, 2014
-
.Dt PKG-RQUERY 8
-
.Os
-
.Sh NAME
-
.Nm "pkg rquery"
-
.Nd query information from remote repositories
-
.Sh SYNOPSIS
-
.Nm
-
.Ao query-format Ac Ao pkg-name Ac
-
.Nm
-
.Op Fl aU
-
.Op Fl r Ar reponame
-
.Ao query-format Ac
-
.Nm
-
.Op Fl U
-
.Fl e Ao evaluation-condition Ac
-
.Op Fl r Ar reponame
-
.Ao query-format Ac
-
.Nm
-
.Op Fl giUx
-
.Op Fl r Ar reponame
-
.Ao query-format Ac Ao pattern Ac Ao ... Ac
-
.Sh DESCRIPTION
-
.Nm
-
is used for displaying information about remote packages.
-
.Pp
-
Package repository catalogues will be automatically updated whenever
-
.Xr pkg-update 8
-
is run, unless disabled by the
-
.Fl U
-
flag.
-
.Sh OPTIONS
-
The following options are supported by
-
.Nm :
-
.Bl -tag -width F1
-
.It Fl a
-
Match all packages from the database
-
.It Fl e
-
Match packages using the given
-
.Ar evaluation-condition.
-
See EVALUATION FORMAT for details.
-
.It Fl r Ar reponame
-
Fetches packages from the given
-
.Ar reponame
-
if multiple repo support is enabled.
-
See
-
.Xr pkg.conf 5 .
-
.It Fl g
-
Treat
-
.Ao pattern Ac
-
as a glob pattern.
-
.It Fl i
-
Make the standard or regular expression
-
.Fl ( x )
-
matching against
-
.Ar pkg-name
-
case insensitive.
-
.It Fl U
-
Skip updating the repository catalogues with
-
.Xr pkg-update 8 .
-
Use the locally cached copies only.
-
.It Fl x
-
Treat
-
.Ao pattern Ac
-
as a regular expression according to the "modern" or "extended" syntax
-
of
-
.Xr re_format 7 .
-
.El
-
.Sh QUERY FORMAT
-
There are two type of keyword for the query format: the multiline and the normal
-
one. Only one type of multiline pattern is accepted for a given query.
-
.Ss Normal patterns:
-
.Bl -tag -width F1
-
.It Cm \&%R
-
Name of the repository package is in
-
.It Cm \&%n
-
Name of the matched package
-
.It Cm \&%v
-
Version of the matched package
-
.It Cm \&%o
-
Origin of the matched package
-
.It Cm \&%p
-
Prefix of the matched package
-
.It Cm \&%m
-
Maintainer of the matched package
-
.It Cm \&%c
-
Comment of the matched package
-
.It Cm \&%e
-
Description of the matched package
-
.It Cm \&%w
-
Home page of the matched package
-
.It Cm \&%q
-
Architecture of the matched package
-
.It Cm \&%l
-
license logic of the matched package - nothing for single, & for AND, and | for OR
-
.It Cm \&%s Ns Op bh
-
The flat size of the matched package, where
-
.Cm b
-
is in bytes, and
-
.Cm h
-
is in human readable format.
-
.It Cm \&%M
-
message contained in the matched package
-
.It Cm \&%? Ns Op drCOLBbA
-
Returns 0 if the list is empty and 1 if the list has information to display
-
.Bl -tag -width indent
-
.It Cm d
-
for dependencies
-
.It Cm r
-
for reverse dependencies
-
.It Cm C
-
for categories
-
.It Cm O
-
for options
-
.It Cm L
-
for licenses
-
.It Cm B
-
for required shared libraries
-
.It Cm b
-
for provided shared libraries
-
.It Cm A
-
for annotations
-
.It Cm \&%# Ns Op drCOLBbA
-
Returns the number of elements in the list
-
.Bl -tag -width indent
-
.It Cm d
-
for dependencies
-
.It Cm r
-
for reverse dependencies
-
.It Cm C
-
for categories
-
.It Cm O
-
for options
-
.It Cm L
-
for licenses
-
.It Cm B
-
for required shared libraries
-
.It Cm b
-
for provided shared libraries
-
.It Cm A
-
for annotations
-
.El
-
.El
-
.El
-
.Ss Multiline patterns:
-
.Bl -tag -width F1
-
.It Cm \&%d Ns Op nov
-
Expands to the list of dependencies for the matched package, where
-
.Cm n
-
stands for the package name,
-
.Cm o
-
for the package origin, and
-
.Cm v
-
for the package version.
-
.It Cm \&%r Ns Op nov
-
Expands to the list of reverse dependencies for the matched package, where
-
.Cm n
-
stands for the package name,
-
.Cm o
-
for the package origin, and
-
.Cm v
-
for the package version.
-
.It Cm \&%C
-
Expands to the list of categories the matched package belongs to.
-
.It Cm \&%O Ns Op kvdD
-
Expands to the list of options of the matched package, where
-
.Cm k
-
stands for option key
-
.Cm v
-
for option value,
-
.Cm d
-
for option default value, and
-
.Cm D
-
for option description.
-
Option default values and descriptions are optional metadata and may
-
be blank for certain packages or repositories.
-
.It Cm \&%L
-
Expands to the list of license(s) for the matched package.
-
.It Cm \&%B
-
Expands to the list of shared libraries used by programs from the matched package.
-
.It Cm \&%b
-
Expands to the list of shared libraries provided by the matched package.
-
.It Cm \&%A Ns Op tv
-
Expands to the list of annotations associated with the matched
-
package, where
-
.Cm t
-
stands for the annotation tag, and
-
.Cm v
-
stands for the annotation value.
-
.El
-
.Sh EVALUATION FORMAT
-
.Ss Variables
-
.Bl -tag -width F1
-
.It Cm \&%n
-
Name of the package (type string)
-
.It Cm \&%o
-
Origin of the package (type string)
-
.It Cm \&%p
-
Prefix of the package (type string)
-
.It Cm \&%m
-
Maintainer of the package (type string)
-
.It Cm \&%c
-
Comment of the package (type string)
-
.It Cm \&%e
-
Description of the package (type string)
-
.It Cm \&%w
-
WWW address of the package (type string)
-
.It Cm \&%s
-
Flatsize of the package (type integer)
-
.It Cm \&%a
-
Automatic status of the package (type integer)
-
.It Cm \&%q
-
Architecture of the package (type string)
-
.It Cm \&%M
-
Message of the package (type string)
-
.It Cm \&%# Ns Op drCOLBbA
-
Number of elements in the list of information (type integer).
-
See
-
.Cm %?
-
above for what information is used.
-
.El
-
.Ss Operators
-
.Bl -tag -width F1
-
.It Cm ~
-
String glob pattern matching
-
.It Cm > Ns Op =
-
Integer comparison
-
.It Cm > Ns Op =
-
Integer comparison
-
.It Cm = Ns Op =
-
Integer or string comparison
-
.El
-
.Sh ENVIRONMENT
-
The following environment variables affect the execution of
-
.Nm .
-
See
-
.Xr pkg.conf 5
-
for further description.
-
.Bl -tag -width ".Ev NO_DESCRIPTIONS"
-
.It Ev PKG_DBDIR
-
.El
-
.Sh FILES
-
See
-
.Xr pkg.conf 5 .
-
.Sh EXIT STATUS
-
.Ex -std
-
.Sh SEE ALSO
-
.Xr pkg.conf 5 ,
-
.Xr pkg 8 ,
-
.Xr pkg-add 8 ,
-
.Xr pkg-annotate 8 ,
-
.Xr pkg-audit 8 ,
-
.Xr pkg-autoremove 8 ,
-
.Xr pkg-backup 8 ,
-
.Xr pkg-check 8 ,
-
.Xr pkg-clean 8 ,
-
.Xr pkg-config 8 ,
-
.Xr pkg-convert 8 ,
-
.Xr pkg-create 8 ,
-
.Xr pkg-delete 8 ,
-
.Xr pkg-fetch 8 ,
-
.Xr pkg-info 8 ,
-
.Xr pkg-install 8 ,
-
.Xr pkg-lock 8 ,
-
.Xr pkg-query 8 ,
-
.Xr pkg-register 8 ,
-
.Xr pkg-repo 8 ,
-
.Xr pkg-search 8 ,
-
.Xr pkg-set 8 ,
-
.Xr pkg-shell 8 ,
-
.Xr pkg-shlib 8 ,
-
.Xr pkg-ssh 8 ,
-
.Xr pkg-stats 8 ,
-
.Xr pkg-update 8 ,
-
.Xr pkg-updating 8 ,
-
.Xr pkg-upgrade 8 ,
-
.Xr pkg-version 8 ,
-
.Xr pkg-which 8
deleted src/pkg-search.8
@@ -1,449 +0,0 @@
-
.\"
-
.\" Freebsd pkg - a next generation package for the installation and
-
.\" maintenance of non-core utilities.
-
.\"
-
.\" Redistribution and use in source and binary forms, with or without
-
.\" modification, are permitted provided that the following conditions
-
.\" are met:
-
.\" 1. Redistributions of source code must retain the above copyright
-
.\"    notice, this list of conditions and the following disclaimer.
-
.\" 2. Redistributions in binary form must reproduce the above copyright
-
.\"    notice, this list of conditions and the following disclaimer in the
-
.\"    documentation and/or other materials provided with the distribution.
-
.\"
-
.\"
-
.\"     @(#)pkg.8
-
.\" $FreeBSD$
-
.\"
-
.Dd November 29, 2013
-
.Dt PKG-SEARCH 8
-
.Os
-
.Sh NAME
-
.Nm "pkg search"
-
.Nd search package repository catalogues
-
.Sh SYNOPSIS
-
.Nm
-
.Op Fl egix
-
.Op Fl r Ar repo
-
.Op Fl S Ar search
-
.Op Fl L Ar label
-
.Op Fl Q Ar query-modifier
-
.Ar pattern
-
.Nm
-
.Op Fl cDdefgiopqRx
-
.Op Fl r Ar repo
-
.Ar pattern
-
.Sh DESCRIPTION
-
.Nm
-
is used for searching package repository catalogues.
-
Packages available for installation can be matched by name, by name
-
and version, by origin or by text in the package comments or package
-
descriptions.
-
The output defaults to displaying the field matched by the search
-
term, but any of the searchable fields may be displayed.
-
The output may be modified to additionally show many other package
-
data available from the repository catalogues.
-
.Pp
-
It is recommended to update the local copies of the repository
-
catalogues before running
-
.Nm .
-
See
-
.Xr pkg-update 8 .
-
Package repositories are defined in the
-
.Fa pkg.conf
-
file or by creating repository definitions in
-
.Pa /usr/local/etc/pkg/repos ;
-
see
-
.Xr pkg.conf 5
-
for details.
-
.Sh OPTIONS
-
The following options are supported by
-
.Nm :
-
.Bl -tag -width F1
-
.It Fl c
-
Search for packages with comment text matching
-
.Ar pattern .
-
Equivalent to
-
.Fl "S comment" .
-
.It Fl D
-
Search for packages with description text matching
-
.Ar pattern .
-
Equivalent to
-
.Fl "S description" .
-
.It Fl d
-
Display the list of packages depended on by each matched package.
-
Equivalent to
-
.Fl "Q depends-on" .
-
.It Fl e
-
.Ar pattern
-
should be an exact match against the search field.
-
.It Fl f
-
Show ``full'' information about the package.
-
Equivalent to
-
.Fl "Q full" .
-
.It Fl g
-
Treat
-
.Ar pattern
-
as a shell globbing expression.
-
The glob pattern must match the entire field being seached.
-
.It Fl i
-
Make the exact
-
.Fl ( e )
-
or regular expression
-
.Fl ( x )
-
matching against
-
.Ar pattern
-
case insensitive.
-
.It Fl L Ar label
-
Select which identifying label is printed for each matched package,
-
unless
-
.Fl q
-
is used.
-
Several different fields from the repository catalogue database may be
-
used to search on, or to generate the label, as indicated by the
-
.Ar label
-
argument.
-
See the
-
.Qq Sx Search and Label Options
-
section for details.
-
If unspecified,
-
.Ar label
-
is set to the same as the value searched via the
-
.Fl S Ar search
-
option.
-
.It Fl o
-
List packages by origin for each package matching
-
.Ar pattern .
-
Equivalent to
-
.Fl "L origin" .
-
.It Fl p
-
Display the package installation prefix for each matched package.
-
Equivalent to
-
.Fl "Q prefix" .
-
.It Fl q
-
Be ``quiet''.
-
Produce less output.
-
In particular do not show an identifying label field for each package.
-
.It Fl Q Ar query-modifier
-
Modify the query output by adding an additional field to the result.
-
Multiple fields can be added by using additional
-
.Fl Q Ar query-modifier
-
flags.
-
See the
-
.Qq Sx Output Modifier Options
-
section for details.
-
.It Fl r Ar repo
-
Select only the repository catalogue named as
-
.Sy repo
-
to search.
-
By default all configured repository catalogues are searched.
-
.It Fl R
-
Display the full manifest (raw) about the packages matching.
-
.It Fl S Ar search
-
Specify the field to search the repository catalogue on.
-
If unspecified, searches on
-
.Ar pkg-name
-
unless the search term contains a
-
.Sy /
-
character, when it searches on port
-
.Ar origin .
-
Output will be sorted in order of the
-
.Ar search
-
field.
-
See the
-
.Qq Sx Search and Label Options
-
sections for more details.
-
.It Fl s
-
Display the installed size of matched packages.
-
Equivalent to
-
.Fl "Q size" .
-
.It Fl x
-
Treat
-
.Ar pattern
-
as a regular expression according to the "modern" or "extended"
-
syntax of
-
.Xr re_format 7 .
-
This is the default.
-
Matches any substring of the search field unless explicit beginning
-
or ending anchor terms are used.
-
.El
-
.Ss Search and Label Options
-
The following database fields (or composites of several fields) can
-
be used both for searching for a match to the given
-
.Ar pattern
-
and as identifying labels for the block of output for each package.
-
.Bl -tag -width 2n
-
.It Sy comment
-
The one line comment field describing the port, derived from the
-
.Cm COMMENT
-
variable in the port's
-
.Fa Makefile .
-
When chosen as a label option, the output format will additionally
-
include the packge name, equivalent to
-
.Fl "L pkg-name"
-
.Fl "Q comment" .
-
When chosen as a search option, only the
-
.Sy comment
-
field is used for sorting the output.
-
.It Sy description
-
The multi-line package description from the
-
.Fa pkg-descr
-
file in the port.
-
This does include the
-
.Cm WWW
-
URL reference, if any, from that file.
-
When chosen as a label option, the output format will additionally
-
include the package name, equivalent to
-
.Fl "L pkg-name"
-
.Fl "Q description" .
-
When chosen as a search option, only the
-
.Sy description
-
field is used for sorting the output.
-
.It Sy name
-
The name of the package, derived from the
-
.Cm PORTNAME
-
variable in the port's
-
.Fa Makefile .
-
.It Sy origin
-
The port origin, in the format
-
.Fa category/port ,
-
that the package was compiled from.
-
.It Sy pkg-name
-
The package name in the format
-
.Sy name Ns - Ns Cm version .
-
The same as the
-
.Cm PKGNAME
-
variable in the port's
-
.Fa Makefile .
-
.El
-
.Pp
-
Any unambiguous prefix of the label name may be used on the command line.
-
Thus
-
.Fl "Sd" ,
-
.Fl "S descr"
-
and
-
.Fl "S description"
-
are all equivalent.
-
.Ss Output Modifier Options
-
Additional data from the repository catalogue to print for each matched
-
package.
-
Multiple output modifiers can be combined.
-
Where more than one output field is required, either because multiple
-
.Fl Q Ar query-modifier
-
options were given, or one or more
-
.Fl Q Ar query-modifier
-
option was combined with the
-
.Fl "L comment"
-
or
-
.Fl "L description"
-
options, then each output field will be tagged with the field name.
-
.Bl -tag -width 2n
-
.It Sy annotations
-
Arbitrary text in tag-value format that can be added to any package.
-
.It Sy arch
-
The architecture string indicating what OS version and CPU architecture
-
the package is suitable for.
-
For example,
-
.Ar freebsd:9:x86:64
-
indicates a package suitable for FreeBSD 9.x running on an amd64 processor,
-
while
-
.Ar freebsd:*
-
indicates an architecture independent package suitable for any version of
-
FreeBSD.
-
.It Sy categories
-
All categories, real and virtual, the underlying package belongs to,
-
derived from the
-
.Cm CATEGORIES
-
variable in the port's
-
.Fa Makefile .
-
.It Sy comment
-
The one line comment field describing the port, derived from the
-
.Cm COMMENT
-
variable in the port's
-
.Fa Makefile .
-
.It Sy depends-on
-
The list of packages the named package depends on.
-
Dependency packages are listed in the format
-
.Sy name Ns - Ns Cm version
-
one per line.
-
If the port has no dependencies, nothing will be output for
-
this field, including suppressing the tag name when multiple
-
output fields are requested.
-
.It Sy description
-
The multi-line package description from the
-
.Fa pkg-descr
-
file in the port.
-
This does include the
-
.Cm WWW
-
URL reference, if any, from that file.
-
.It Sy full
-
Show a standard set of fields, equivalent to a combination of the
-
.Sy name ,
-
.Sy version ,
-
.Sy origin ,
-
.Sy prefix ,
-
.Sy repository ,
-
.Sy categories ,
-
.Sy license ,
-
.Sy maintainer ,
-
.Sy www ,
-
.Sy comment ,
-
.Sy options ,
-
.Sy shared-libs-required ,
-
.Sy shared-libs-provided ,
-
.Sy annotations ,
-
.Sy size ,
-
.Sy pkg-size
-
and
-
.Sy descr
-
fields, in that order.
-
.It Sy licenses
-
Displays a list of all the licenses the package is relesed under on a
-
single line.
-
Where more than one license applies, indicate if the terms of all
-
licenses should apply
-
.Sy (&)
-
or if one or more licenses may be selected out of those available
-
.Sy (|) .
-
.It Sy maintainer
-
Display the maintainer's e-mail address.
-
.It Sy name
-
Display the port name, which is derived from the
-
.Cm PORTNAME
-
variable in the port's
-
.Fa Makefile .
-
.It Sy options
-
Displays a list of the port options and their state (
-
.Sy on
-
or
-
.Sy off )
-
when the package was built.
-
If the package does not have any options to set, nothing will be
-
output for this field, including suppressing the tag name when
-
multiple output fields are requested.
-
.It Sy pkg-size
-
Display the size of the compressed package tarball, i.e., how much would
-
need to be downloaded from the repository.
-
.It Sy prefix
-
Display the installation prefix for the package, usually
-
.Fa /usr/local .
-
.It Sy repository
-
Displays the repository name and the corresponding base Url for the
-
repository.
-
For a default repository defined in
-
.Pa pkg.conf
-
or one derived from the value of the
-
.Ev PACKAGESITE
-
environment variable the name will be
-
.Dq packagesite .
-
.It Sy required-by
-
Displays all of the packages in the repository that require the named
-
package as a dependency.
-
Dependency packages are listed in the format
-
.Sy name Ns - Ns Cm version
-
one per line.
-
If no other packages require the named package, nothing will be
-
output for this field, including suppressing the tag name when
-
multiple output fields are requested.
-
.It Sy shared-libs-required
-
If the package contains dynamically linked FreeBSD ELF binaries,
-
display a list of all of the shared libraries other than those from
-
the base system required for those binaries to run.
-
Shared libraries for foreign (e.g., Linux) binaries run
-
under emulation will not be displayed.
-
If the package does not require any shared libraries, nothing will be
-
output for this field including suppressing the tag name when multiple
-
fields are requested.
-
.It Sy shared-libs-provided
-
If the package contains any shared libraries, display a list of
-
the library names, including the ABI version number, if any.
-
A shared library, of either the same or differing ABI versions, may
-
legitimately be provided by more than installed package,
-
but this frequently indicates a problem.
-
.It Sy size
-
Display the total amount of filesystem space the package files will
-
take up once unpacked and installed.
-
.It Sy url
-
Display the URL that would be used to download the package from the
-
repository.
-
.It Sy version
-
Display the package version, which is derived from the
-
.Cm PKGVERSION
-
variable in the port's
-
.Fa Makefile .
-
.It Sy www
-
Display the general URL, if any, for the project developing the
-
software used in the package.
-
This is extracted from the
-
.Fa pkg-descr
-
file in the port.
-
.El
-
.Pp
-
Any unambiguous prefix of the query modifier name may be used on the
-
command line.
-
Thus
-
.Fl "Qm" ,
-
.Fl "Q maint"
-
and
-
.Fl "Q maintainer"
-
are all equivalent,
-
but you need to use at least
-
.Fl "Q si"
-
and
-
.Fl "Q sh"
-
to distinguish
-
.Cm size
-
from
-
.Cm shared-libs-required
-
or
-
.Cm shared-libs-provided ,
-
and you'll need at least
-
.Fl "Q shared-libs-p"
-
 to select the
-
.Cm shared-libs-provided
-
unambiguously.
-
.Sh ENVIRONMENT
-
The following environment variables affect the execution of
-
.Nm .
-
See
-
.Xr pkg.conf 5
-
for further description.
-
.Bl -tag -width ".Ev NO_DESCRIPTIONS"
-
.It Ev PACKAGESITE
-
.It Ev PKG_DBDIR
-
.El
-
.Sh FILES
-
See
-
.Xr pkg.conf 5 .
-
.Sh SEE ALSO
-
.Xr pkg.conf 5 ,
-
.Xr pkg 8 ,
-
.Xr pkg-add 8 ,
-
.Xr pkg-annotate 8 ,
-
.Xr pkg-audit 8 ,
-
.Xr pkg-autoremove 8 ,
-
.Xr pkg-backup 8 ,
-
.Xr pkg-check 8 ,
-
.Xr pkg-clean 8 ,
-
.Xr pkg-config 8 ,
-
.Xr pkg-convert 8 ,
-
.Xr pkg-create 8 ,
-
.Xr pkg-delete 8 ,
-
.Xr pkg-fetch 8 ,
-
.Xr pkg-info 8 ,
-
.Xr pkg-install 8 ,
-
.Xr pkg-lock 8 ,
-
.Xr pkg-query 8 ,
-
.Xr pkg-register 8 ,
-
.Xr pkg-repo 8 ,
-
.Xr pkg-rquery 8 ,
-
.Xr pkg-set 8 ,
-
.Xr pkg-shell 8 ,
-
.Xr pkg-shlib 8 ,
-
.Xr pkg-ssh 8 ,
-
.Xr pkg-stats 8 ,
-
.Xr pkg-update 8 ,
-
.Xr pkg-updating 8 ,
-
.Xr pkg-upgrade 8 ,
-
.Xr pkg-version 8 ,
-
.Xr pkg-which 8
deleted src/pkg-set.8
@@ -1,149 +0,0 @@
-
.\"
-
.\" FreeBSD pkg - a next generation package for the installation and maintenance
-
.\" of non-core utilities.
-
.\"
-
.\" Redistribution and use in source and binary forms, with or without
-
.\" modification, are permitted provided that the following conditions
-
.\" are met:
-
.\" 1. Redistributions of source code must retain the above copyright
-
.\"    notice, this list of conditions and the following disclaimer.
-
.\" 2. Redistributions in binary form must reproduce the above copyright
-
.\"    notice, this list of conditions and the following disclaimer in the
-
.\"    documentation and/or other materials provided with the distribution.
-
.\"
-
.\"
-
.\"     @(#)pkg.8
-
.\" $FreeBSD$
-
.\"
-
.Dd May 18, 2013
-
.Dt PKG-SET 8
-
.Os
-
.Sh NAME
-
.Nm "pkg set"
-
.Nd modify information in the installed database
-
.Sh SYNOPSIS
-
.Nm
-
.Op Fl a
-
.Op Fl A Op Ar 01
-
.Op Fl o Ar oldorigin:neworigin
-
.Op Fl y
-
.Op Fl gix
-
.Ar pkg-name
-
.Sh DESCRIPTION
-
.Nm
-
is used to modify information concerning installed packages.
-
.Nm
-
should always be used with caution.
-
.Sh OPTIONS
-
The following options are supported by
-
.Nm :
-
.Bl -tag -width F1
-
.It Fl A Ar 01
-
Set automatic flag for the package: 0 is not automatic, 1 is automatic.
-
This affects the operation of
-
.Xr pkg-autoremove 8 .
-
.It Fl a
-
Match all installed packages.
-
.It Fl g
-
Match
-
.Ar pkg-name
-
as a globbing expression.
-
.It Fl i
-
Make the standard or regular expression
-
.Fl ( x )
-
matching against
-
.Ar pkg-name
-
case insensitive.
-
.It Fl o Ar oldorigin:neworigin
-
Change the port origin of a given dependency from
-
.Ar oldorigin
-
to
-
.Ar neworigin .
-
This corresponds to the port directory that the package originated from.
-
Typically, this is only needed for upgrading a library or package that
-
has MOVED or when the default version of a major port dependency
-
changes.
-
Usually this will be explained in /usr/ports/UPDATING.
-
Also see
-
.Xr pkg-updating 8
-
and
-
.Sx EXAMPLES .
-
.It Fl x
-
Match
-
.Ar pkg-name
-
as a regular expression according to the "modern" or "extended" syntax of
-
.Xr re_format 7 .
-
.It Fl y
-
Assume yes rather than asking for confirmation before package autoremoval.
-
.El
-
.Pp
-
If neither the
-
.Fl g
-
nor
-
.Fl x
-
options are used, the default is to match pkg-name exactly.
-
.Sh FILES
-
See
-
.Xr pkg.conf 5 .
-
.Sh EXAMPLES
-
Upgrade perl from 5.12 to 5.14.
-
This involes moving the origin from
-
.Sy lang/perl5.12
-
to
-
.Sy lang/perl5.14 :
-
.Dl % pkg set -o lang/perl5.12:lang/perl5.14
-
.Dl % pkg install -Rf lang/perl5.14
-
.Pp
-
Upgrade ruby from 1.8 to 1.9.
-
This involes moving the origin from
-
.Sy lang/ruby18
-
to
-
.Sy lang/ruby19 :
-
.Dl % pkg set -o lang/ruby18:lang/ruby19
-
.Dl % pkg install -Rf lang/ruby19
-
.Pp
-
Move the origin libglut to freeglut, and then reinstall everything depending on glut to use the new shared library:
-
.Dl % pkg set -o graphics/libglut:graphics/freeglut
-
.Dl % pkg install -Rf graphics/freeglut
-
.Pp
-
Change a package from automatic to non-automatic, which will prevent
-
.Ic autoremove
-
from removing it:
-
.Dl % pkg set -A 0 perl-5.14
-
.Pp
-
Change a package from non-automatic to automatic, which will make
-
.Ic autoremove
-
allow it be removed once nothing depends on it:
-
.Dl % pkg set -A 1 perl-5.14
-
.Sh SEE ALSO
-
.Xr pkg.conf 5 ,
-
.Xr pkg 8 ,
-
.Xr pkg-add 8 ,
-
.Xr pkg-annotate 8 ,
-
.Xr pkg-audit 8 ,
-
.Xr pkg-autoremove 8 ,
-
.Xr pkg-backup 8 ,
-
.Xr pkg-check 8 ,
-
.Xr pkg-clean 8 ,
-
.Xr pkg-config 8 ,
-
.Xr pkg-convert 8 ,
-
.Xr pkg-create 8 ,
-
.Xr pkg-delete 8 ,
-
.Xr pkg-fetch 8 ,
-
.Xr pkg-info 8 ,
-
.Xr pkg-install 8 ,
-
.Xr pkg-lock 8 ,
-
.Xr pkg-query 8 ,
-
.Xr pkg-register 8 ,
-
.Xr pkg-repo 8 ,
-
.Xr pkg-rquery 8 ,
-
.Xr pkg-search 8 ,
-
.Xr pkg-shell 8 ,
-
.Xr pkg-shlib 8 ,
-
.Xr pkg-ssh 8 ,
-
.Xr pkg-stats 8 ,
-
.Xr pkg-update 8 ,
-
.Xr pkg-updating 8 ,
-
.Xr pkg-upgrade 8 ,
-
.Xr pkg-version 8 ,
-
.Xr pkg-which 8
deleted src/pkg-shell.8
@@ -1,84 +0,0 @@
-
.\"
-
.\" FreeBSD pkg - a next generation package for the installation and maintenance
-
.\" of non-core utilities.
-
.\"
-
.\" Redistribution and use in source and binary forms, with or without
-
.\" modification, are permitted provided that the following conditions
-
.\" are met:
-
.\" 1. Redistributions of source code must retain the above copyright
-
.\"    notice, this list of conditions and the following disclaimer.
-
.\" 2. Redistributions in binary form must reproduce the above copyright
-
.\"    notice, this list of conditions and the following disclaimer in the
-
.\"    documentation and/or other materials provided with the distribution.
-
.\"
-
.\"
-
.\"     @(#)pkg.8
-
.\" $FreeBSD$
-
.\"
-
.Dd March 11, 2013
-
.Dt PKG-SHELL 8
-
.Os
-
.Sh NAME
-
.Nm "pkg shell"
-
.Nd interact with the pkg database
-
.Sh SYNOPSIS
-
.Nm
-
.Sh DESCRIPTION
-
.Nm
-
is used to interact with the local or remote database through a sqlite3 console.
-
Extreme care should be taken when using this command.
-
.Pp
-
Do not rely on this command.
-
The underlying schema is subject to change on any release.
-
Use
-
.Xr pkg-query 8 ,
-
.Xr pkg-rquery 8 ,
-
.Xr pkg-search 8
-
and
-
.Xr pkg-set 8
-
instead for querying and modiying the database.
-
These commands are expected to have a stable API, unlike the database schema.
-
.Sh ENVIRONMENT
-
The following environment variables affect the execution of
-
.Nm .
-
See
-
.Xr pkg.conf 5
-
for further description.
-
.Bl -tag -width ".Ev NO_DESCRIPTIONS"
-
.It Ev PKG_DBDIR
-
.El
-
.Sh FILES
-
See
-
.Xr pkg.conf 5 .
-
.Sh SEE ALSO
-
.Xr pkg.conf 5 ,
-
.Xr pkg 8 ,
-
.Xr pkg-add 8 ,
-
.Xr pkg-annotate 8 ,
-
.Xr pkg-audit 8 ,
-
.Xr pkg-autoremove 8 ,
-
.Xr pkg-backup 8 ,
-
.Xr pkg-check 8 ,
-
.Xr pkg-clean 8 ,
-
.Xr pkg-config 8 ,
-
.Xr pkg-convert 8 ,
-
.Xr pkg-create 8 ,
-
.Xr pkg-delete 8 ,
-
.Xr pkg-fetch 8 ,
-
.Xr pkg-info 8 ,
-
.Xr pkg-install 8 ,
-
.Xr pkg-lock 8 ,
-
.Xr pkg-query 8 ,
-
.Xr pkg-register 8 ,
-
.Xr pkg-repo 8 ,
-
.Xr pkg-rquery 8 ,
-
.Xr pkg-search 8 ,
-
.Xr pkg-set 8 ,
-
.Xr pkg-shlib 8 ,
-
.Xr pkg-ssh 8 ,
-
.Xr pkg-stats 8 ,
-
.Xr pkg-update 8 ,
-
.Xr pkg-updating 8 ,
-
.Xr pkg-upgrade 8 ,
-
.Xr pkg-version 8 ,
-
.Xr pkg-which 8
deleted src/pkg-shlib.8
@@ -1,95 +0,0 @@
-
.\"
-
.\" FreeBSD pkg - a next generation package for the installation and maintenance
-
.\" of non-core utilities.
-
.\"
-
.\" Redistribution and use in source and binary forms, with or without
-
.\" modification, are permitted provided that the following conditions
-
.\" are met:
-
.\" 1. Redistributions of source code must retain the above copyright
-
.\"    notice, this list of conditions and the following disclaimer.
-
.\" 2. Redistributions in binary form must reproduce the above copyright
-
.\"    notice, this list of conditions and the following disclaimer in the
-
.\"    documentation and/or other materials provided with the distribution.
-
.\"
-
.\"
-
.\"     @(#)pkg.8
-
.\" $FreeBSD$
-
.\"
-
.Dd March 3, 2013
-
.Dt PKG-SHLIB 8
-
.Os
-
.Sh NAME
-
.Nm "pkg shlib"
-
.Nd displays which installed packages provide a specfic shared library,
-
and those which require it by containg binaries that link to it
-
.Pp
-
.Ar library
-
is the filename of the library, without any leading path, but
-
including the ABI version number.
-
Only exact matches are handled.
-
.Sh SYNOPSIS
-
.Nm
-
.Op Fl PR
-
.Ar library
-
.Sh DESCRIPTION
-
.Nm
-
is used for displaying the packages that provide
-
.Ar library
-
or that require
-
.Ar library
-
by containing binaries that link to it.
-
.Sh OPTIONS
-
The following mutually exclusive options are supported by
-
.Nm :
-
.Bl -tag -width F1
-
.It Fl P
-
Show only the installed packages which provide the named
-
.Ar library .
-
.It Fl R
-
Show only the installed packages which require
-
.Ar library.
-
.El
-
.Sh ENVIRONMENT
-
The following environment variables affect the execution of
-
.Nm .
-
See
-
.Xr pkg.conf 5
-
for further description.
-
.Bl -tag -width ".Ev NO_DESCRIPTIONS"
-
.It PKG_DBDIR
-
.El
-
.Sh FILES
-
See
-
.Xr pkg.conf 5 .
-
.Sh SEE ALSO
-
.Xr pkg.conf 5 ,
-
.Xr pkg 8 ,
-
.Xr pkg-add 8 ,
-
.Xr pkg-annotate 8 ,
-
.Xr pkg-audit 8 ,
-
.Xr pkg-autoremove 8 ,
-
.Xr pkg-backup 8 ,
-
.Xr pkg-check 8 ,
-
.Xr pkg-clean 8 ,
-
.Xr pkg-config 8 ,
-
.Xr pkg-convert 8 ,
-
.Xr pkg-create 8 ,
-
.Xr pkg-delete 8 ,
-
.Xr pkg-fetch 8 ,
-
.Xr pkg-info 8 ,
-
.Xr pkg-install 8 ,
-
.Xr pkg-lock 8 ,
-
.Xr pkg-query 8 ,
-
.Xr pkg-register 8 ,
-
.Xr pkg-repo 8 ,
-
.Xr pkg-rquery 8 ,
-
.Xr pkg-search 8 ,
-
.Xr pkg-set 8 ,
-
.Xr pkg-shell 8 ,
-
.Xr pkg-ssh 8 ,
-
.Xr pkg-stats 8 ,
-
.Xr pkg-update 8 ,
-
.Xr pkg-updating 8 ,
-
.Xr pkg-upgrade 8 ,
-
.Xr pkg-version 8 ,
-
.Xr pkg-which 8
deleted src/pkg-ssh.8
@@ -1,81 +0,0 @@
-
.\"
-
.\" FreeBSD pkg - a next generation package for the installation and maintenance
-
.\" of non-core utilities.
-
.\"
-
.\" Redistribution and use in source and binary forms, with or without
-
.\" modification, are permitted provided that the following conditions
-
.\" are met:
-
.\" 1. Redistributions of source code must retain the above copyright
-
.\"    notice, this list of conditions and the following disclaimer.
-
.\" 2. Redistributions in binary form must reproduce the above copyright
-
.\"    notice, this list of conditions and the following disclaimer in the
-
.\"    documentation and/or other materials provided with the distribution.
-
.\"
-
.\"
-
.\"     @(#)pkg.8
-
.\" $FreeBSD$
-
.\"
-
.Dd March 12, 2014
-
.Dt PKG-SSH 8
-
.Os
-
.Sh NAME
-
.Nm "pkg ssh"
-
.Nd package server
-
.Sh SYNOPSIS
-
.Nm
-
.Sh DESCRIPTION
-
.Nm
-
provides a minimal package server and it's most commonly used with the SSH
-
transport protocol.
-
.Pp
-
This command is not meant to be used by the user.
-
.Xr pkg 8
-
will do start the server automatically through
-
.Xr ssh 1
-
when the ssh:// scheme is specified in the repository configuration.
-
.Sh OPTIONS
-
.Nm
-
supports no options.
-
.Sh ENVIRONMENT
-
The following environment variables affect the execution of
-
.Nm .
-
See
-
.Xr pkg.conf 5
-
for further description.
-
.Bl -tag -width ".Ev NO_DESCRIPTIONS"
-
.It Ev SSH_RESTRICT_DIR
-
.El
-
.Sh FILES
-
See
-
.Xr pkg.conf 5 .
-
.Sh SEE ALSO
-
.Xr pkg.conf 5 ,
-
.Xr pkg 8 ,
-
.Xr pkg-annotate 8 ,
-
.Xr pkg-audit 8 ,
-
.Xr pkg-autoremove 8 ,
-
.Xr pkg-backup 8 ,
-
.Xr pkg-check 8 ,
-
.Xr pkg-clean 8 ,
-
.Xr pkg-config 8 ,
-
.Xr pkg-convert 8 ,
-
.Xr pkg-create 8 ,
-
.Xr pkg-delete 8 ,
-
.Xr pkg-fetch 8 ,
-
.Xr pkg-info 8 ,
-
.Xr pkg-install 8 ,
-
.Xr pkg-lock 8 ,
-
.Xr pkg-query 8 ,
-
.Xr pkg-register 8 ,
-
.Xr pkg-repo 8 ,
-
.Xr pkg-rquery 8 ,
-
.Xr pkg-search 8 ,
-
.Xr pkg-set 8 ,
-
.Xr pkg-shell 8 ,
-
.Xr pkg-shlib 8 ,
-
.Xr pkg-stats 8 ,
-
.Xr pkg-update 8 ,
-
.Xr pkg-updating 8 ,
-
.Xr pkg-upgrade 8 ,
-
.Xr pkg-version 8 ,
-
.Xr pkg-which 8
deleted src/pkg-stats.8
@@ -1,84 +0,0 @@
-
.\"
-
.\" FreeBSD pkg - a next generation package for the installation and maintenance
-
.\" of non-core utilities.
-
.\"
-
.\" Redistribution and use in source and binary forms, with or without
-
.\" modification, are permitted provided that the following conditions
-
.\" are met:
-
.\" 1. Redistributions of source code must retain the above copyright
-
.\"    notice, this list of conditions and the following disclaimer.
-
.\" 2. Redistributions in binary form must reproduce the above copyright
-
.\"    notice, this list of conditions and the following disclaimer in the
-
.\"    documentation and/or other materials provided with the distribution.
-
.\"
-
.\"
-
.\"     @(#)pkg.8
-
.\" $FreeBSD$
-
.\"
-
.Dd February 25, 2013
-
.Dt PKG-STATS 8
-
.Os
-
.Sh NAME
-
.Nm "pkg stats"
-
.Nd package database statistics
-
.Sh SYNOPSIS
-
.Nm
-
.Op Fl qlrb
-
.Sh DESCRIPTION
-
.Nm
-
is used to display different statistics about the package databases.
-
.Sh OPTIONS
-
The following options are supported by
-
.Nm :
-
.Bl -tag -width F1
-
.It Fl q
-
Quiet mode.
-
Show less output.
-
.It Fl l
-
Display stats only for the local package database.
-
.It Fl r
-
Display stats only for the remote package database(s).
-
.It Fl b
-
Display disk space usage in bytes only.
-
.El
-
.Sh ENVIRONMENT
-
The following environment variables affect the execution of
-
.Nm .
-
See
-
.Xr pkg.conf 5
-
for further description.
-
.Sh FILES
-
See
-
.Xr pkg.conf 5 .
-
.Sh SEE ALSO
-
.Xr pkg.conf 5 ,
-
.Xr pkg 8 ,
-
.Xr pkg-add 8 ,
-
.Xr pkg-annotate 8 ,
-
.Xr pkg-audit 8 ,
-
.Xr pkg-autoremove 8 ,
-
.Xr pkg-backup 8 ,
-
.Xr pkg-check 8 ,
-
.Xr pkg-clean 8 ,
-
.Xr pkg-config 8 ,
-
.Xr pkg-convert 8 ,
-
.Xr pkg-create 8 ,
-
.Xr pkg-delete 8 ,
-
.Xr pkg-fetch 8 ,
-
.Xr pkg-info 8 ,
-
.Xr pkg-install 8 ,
-
.Xr pkg-lock 8 ,
-
.Xr pkg-query 8 ,
-
.Xr pkg-register 8 ,
-
.Xr pkg-repo 8 ,
-
.Xr pkg-rquery 8 ,
-
.Xr pkg-search 8 ,
-
.Xr pkg-set 8 ,
-
.Xr pkg-shell 8 ,
-
.Xr pkg-shlib 8 ,
-
.Xr pkg-ssh 8 ,
-
.Xr pkg-update 8 ,
-
.Xr pkg-updating 8 ,
-
.Xr pkg-upgrade 8 ,
-
.Xr pkg-version 8 ,
-
.Xr pkg-which 8
deleted src/pkg-update.8
@@ -1,124 +0,0 @@
-
.\"
-
.\" FreeBSD pkg - a next generation package for the installation and
-
.\" maintenance of non-core utilities.
-
.\"
-
.\" Redistribution and use in source and binary forms, with or without
-
.\" modification, are permitted provided that the following conditions
-
.\" are met:
-
.\" 1. Redistributions of source code must retain the above copyright
-
.\"    notice, this list of conditions and the following disclaimer.
-
.\" 2. Redistributions in binary form must reproduce the above copyright
-
.\"    notice, this list of conditions and the following disclaimer in the
-
.\"    documentation and/or other materials provided with the distribution.
-
.\"
-
.\"
-
.\"     @(#)pkg.8
-
.\" $FreeBSD$
-
.\"
-
.Dd August 12, 2013
-
.Dt PKG-UPDATE 8
-
.Os
-
.Sh NAME
-
.Nm "pkg update"
-
.Nd updates the local copies of repository catalogues from the configured
-
package repositories
-
.Sh SYNOPSIS
-
.Nm
-
.Op Fl fq
-
.Sh DESCRIPTION
-
.Nm
-
is used for updating the local copy of a repository catalogue from
-
each of the package repository databases.
-
Updates to catalogues are normally downloaded only when the master
-
copy on the remote package repository is newer than the local copy.
-
.Pp
-
The repository catalogues to be updated are defined in the
-
.Xr pkg.conf 5
-
file or by the entries in
-
.Pa /usr/local/etc/pkg/repos .
-
See
-
.Xr pkg.conf 5
-
for details.
-
.Pp
-
It is best practice to ensure your package repository catalogues are
-
up to date before doing any package installation (via
-
.Xr pkg-install 8 )
-
or upgrades (via
-
.Xr pkg-upgrade 8 ) .
-
However, explicitly running
-
.Nm
-
is not normally necessary.
-
By default invoking either of
-
.Nm pkg install
-
or
-
.Nm pkg upgrade
-
will cause repository
-
catalogues to be updated automatically, unless disabled by setting
-
.Ev REPO_AUTOUPDATE
-
to false in
-
.Xr pkg.conf 5 .
-
.Pp
-
.Ss Signed repositories
-
If the repository catalogue is signed and
-
.Ev PUBKEY
-
is defined, the signature will be verified after download.
-
See
-
.Xr pkg.conf 5
-
for more information.
-
.Sh OPTIONS
-
The following options are supported by
-
.Nm :
-
.Bl -tag -width F1
-
.It Fl q
-
Force quiet output
-
.It Fl f
-
Force a full download of the repository catalogue without regard to the
-
respective ages of the local and remote copies of the catalogue
-
.El
-
.Sh ENVIRONMENT
-
The following environment variables affect the execution of
-
.Nm .
-
See
-
.Xr pkg.conf 5
-
for further description.
-
.Bl -tag -width ".Ev NO_DESCRIPTIONS"
-
.It Ev PACKAGESITE
-
.It Ev PKG_DBDIR
-
.It Ev PUBKEY
-
.It Ev REPO_AUTOUPDATE
-
.El
-
.Sh FILES
-
See
-
.Xr pkg.conf 5 .
-
.Sh SEE ALSO
-
.Xr pkg.conf 5 ,
-
.Xr pkg 8 ,
-
.Xr pkg-add 8 ,
-
.Xr pkg-annotate 8 ,
-
.Xr pkg-audit 8 ,
-
.Xr pkg-autoremove 8 ,
-
.Xr pkg-backup 8 ,
-
.Xr pkg-check 8 ,
-
.Xr pkg-clean 8 ,
-
.Xr pkg-config 8 ,
-
.Xr pkg-convert 8 ,
-
.Xr pkg-create 8 ,
-
.Xr pkg-delete 8 ,
-
.Xr pkg-fetch 8 ,
-
.Xr pkg-info 8 ,
-
.Xr pkg-install 8 ,
-
.Xr pkg-lock 8 ,
-
.Xr pkg-query 8 ,
-
.Xr pkg-register 8 ,
-
.Xr pkg-repo 8 ,
-
.Xr pkg-rquery 8 ,
-
.Xr pkg-search 8 ,
-
.Xr pkg-set 8 ,
-
.Xr pkg-shell 8 ,
-
.Xr pkg-shlib 8 ,
-
.Xr pkg-ssh 8 ,
-
.Xr pkg-stats 8 ,
-
.Xr pkg-updating 8 ,
-
.Xr pkg-upgrade 8 ,
-
.Xr pkg-version 8 ,
-
.Xr pkg-which 8
deleted src/pkg-updating.8
@@ -1,108 +0,0 @@
-
.\"
-
.\" FreeBSD pkg - a next generation package for the installation and maintenance
-
.\" of non-core utilities.
-
.\"
-
.\" Redistribution and use in source and binary forms, with or without
-
.\" modification, are permitted provided that the following conditions
-
.\" are met:
-
.\" 8. Redistributions of source code must retain the above copyright
-
.\"    notice, this list of conditions and the following disclaimer.
-
.\" 2. Redistributions in binary form must reproduce the above copyright
-
.\"    notice, this list of conditions and the following disclaimer in the
-
.\"    documentation and/or other materials provided with the distribution.
-
.\"
-
.\"
-
.\"     @(#)pkg.8
-
.\" $FreeBSD$
-
.\"
-
.Dd February 25, 2013
-
.Dt PKG-UPDATING 8
-
.Os
-
.Sh NAME
-
.Nm "pkg updating"
-
.Nd displays UPDATING entries of software packages
-
.Sh SYNOPSIS
-
.Nm
-
.Op Fl d Ar date
-
.Op Fl f Ar file
-
.Op Ar pkg-name ...
-
.Nm
-
.Sh DESCRIPTION
-
The
-
.Nm
-
command scans the installed ports and show all UPDATING entries that affect one
-
of the installed ports.
-
Alternativly a list of pkg-names could be passed.
-
.Sh OPTIONS
-
The following options are supported by
-
.Nm :
-
.Bl -tag -width F1
-
.It Ar pkg-name ...
-
UPDATING entries for the named packages are displayed.
-
.It Fl d Ar date
-
Only entries newer than
-
.Ar date
-
are shown.
-
Use a YYYYMMDD date format.
-
.It Fl f Ar file
-
Defines a alternative location of the UPDATING
-
.Ar file .
-
.El
-
.Sh ENVIRONMENT
-
The following environment variables affect the execution of
-
.Nm :
-
.Bl -tag -width F1
-
.It Ev PORTSDIR
-
Location of the ports tree.
-
.El
-
.Sh FILES
-
See
-
.Xr pkg.conf 5 .
-
.Sh EXAMPLES
-
Shows all entries of all installed ports:
-
.Dl % pkg updating
-
.Pp
-
Shows all entries of all installed ports since 2012-01-01:
-
.Dl % pkg updating -d 20120101
-
.Pp
-
Shows all entries for all apache and mysql ports:
-
.Dl % pkg updating apache mysql
-
.Pp
-
Shows all apache entries since 2012-01-01:
-
.Dl % pkg updating -d 20120101 apache
-
.Pp
-
Defines that the UPDATING file is in /tmp and shows all entries of all
-
installed ports:
-
.Dl % pkg updating -f /tmp/UPDATING
-
.Sh SEE ALSO
-
.Xr pkg.conf 5 ,
-
.Xr pkg 8 ,
-
.Xr pkg-add 8 ,
-
.Xr pkg-annotate 8 ,
-
.Xr pkg-audit 8 ,
-
.Xr pkg-autoremove 8 ,
-
.Xr pkg-backup 8 ,
-
.Xr pkg-check 8 ,
-
.Xr pkg-clean 8 ,
-
.Xr pkg-config 8 ,
-
.Xr pkg-convert 8 ,
-
.Xr pkg-create 8 ,
-
.Xr pkg-delete 8 ,
-
.Xr pkg-fetch 8 ,
-
.Xr pkg-info 8 ,
-
.Xr pkg-install 8 ,
-
.Xr pkg-lock 8 ,
-
.Xr pkg-query 8 ,
-
.Xr pkg-register 8 ,
-
.Xr pkg-repo 8 ,
-
.Xr pkg-rquery 8 ,
-
.Xr pkg-search 8 ,
-
.Xr pkg-set 8 ,
-
.Xr pkg-shell 8 ,
-
.Xr pkg-shlib 8 ,
-
.Xr pkg-ssh 8 ,
-
.Xr pkg-stats 8 ,
-
.Xr pkg-update 8 ,
-
.Xr pkg-upgrade 8 ,
-
.Xr pkg-version 8 ,
-
.Xr pkg-which 8
deleted src/pkg-upgrade.8
@@ -1,181 +0,0 @@
-
.\"
-
.\" FreeBSD pkg - a next generation package for the installation and
-
.\" maintenance of non-core utilities.
-
.\"
-
.\" Redistribution and use in source and binary forms, with or without
-
.\" modification, are permitted provided that the following conditions
-
.\" are met:
-
.\" 1. Redistributions of source code must retain the above copyright
-
.\"    notice, this list of conditions and the following disclaimer.
-
.\" 2. Redistributions in binary form must reproduce the above copyright
-
.\"    notice, this list of conditions and the following disclaimer in the
-
.\"    documentation and/or other materials provided with the distribution.
-
.\"
-
.\"
-
.\"     @(#)pkg.8
-
.\" $FreeBSD$
-
.\"
-
.Dd June 30, 2013
-
.Dt PKG-UPGRADE 8
-
.Os
-
.Sh NAME
-
.Nm "pkg upgrade"
-
.Nd performs upgrades of package software distributions
-
.Sh SYNOPSIS
-
.Nm
-
.Op Fl fInFqUy
-
.Op Fl r Ar reponame
-
.Sh DESCRIPTION
-
.Nm
-
is used for upgrading packaged software distributions.
-
.Pp
-
.Nm
-
compares the versions of all of the packages installed on the system
-
to what is available in the configured package repositories.
-
Any out-of-date packages are added to a work list for processing.
-
If the
-
.Fl f
-
(force) flag is given, all installed packages are added to the work
-
list.
-
.Pp
-
The package metadata downloaded from the repositories is then examined
-
for each of the packages in the work list, and any missing
-
dependencies are added to the work list as install jobs.
-
Such implicitly added packages are flagged as candidates for
-
autoremoval.
-
See
-
.Xr pkg-autoremove 8
-
for details.
-
.Pp
-
Autoremoval flags are sticky, and will persist over reinstallation or
-
upgrade of the packages concerned, even if subsequently the packages
-
are named explicitly on a command line.
-
See
-
.Xr pkg-query 8
-
for finding the autoremoval status of a package, and
-
.Xr pkg-set 8
-
for modifying it.
-
.Pp
-
Where a package on the work list supplies a shared library, and that
-
library has been updated, all packages requiring that shared library
-
will also be added to the work list as reinstallation jobs.
-
.Pp
-
The work list is sorted into dependency order and
-
.Nm
-
will present it to the user for approval before proceeding, unless
-
overridden by the
-
.Fl y
-
option or the
-
.Cm ASSUME_ALWAYS_YES
-
setting in
-
.Pa pkg.conf .
-
.Pp
-
Packages are fetched from the repositories into the local package
-
cache if they are not already present, or if the checksum of the
-
cached package file differs from the one in the repository.
-
Packages may be downloaded from any of the repositories mentioned
-
in
-
.Xr pkg.conf 5
-
or in the files in
-
.Pa /usr/local/etc/pkg/repo .
-
See
-
.Xr pkg-repository 5
-
for details.
-
.Pp
-
Repository catalogues will automatically be updated whenever
-
.Xr pkg-update 8
-
is run, unless disabled by the
-
.Fl U
-
flag or setting
-
.Cm REPO_AUTOUPDATE
-
to
-
.Sy NO
-
in
-
.Xr pkg.conf 5 .
-
.Pp
-
Finally, the work list is executed in dependency order.
-
Package reinstall or update jobs are processed by removing the currently
-
installed package and immediately installing the replacement.
-
New dependencies are processed as installation jobs as part of the
-
work list.
-
.Sh OPTIONS
-
The following options are supported by
-
.Nm :
-
.Bl -tag -width F1
-
.It Fl f
-
Force reinstalling/upgrading the whole set of packages
-
.It Fl I
-
If any installation scripts (pre-install or post-install) or deinstallation
-
scripts (pre-deinstall or post-deinstall) exist for a given package, do not
-
execute them.
-
.It Fl n
-
Dry-run mode: show what packages have updates available, but do not perform
-
any upgrades.
-
Repository catalogues will be updated as usual unless the
-
.Fl U
-
option is also given.
-
.It Fl F
-
Do not perform installation of packages, merely fetch packages that should be
-
upgraded and detect possible conflicts.
-
.It Fl q
-
Force quiet output, except when
-
.Fl n
-
is used, where a summary of the work list is always displayed.
-
.It Fl U
-
Skip updating the repository catalogues with
-
.Xr pkg-update 8 .
-
Use the local cache only.
-
.Nm
-
will always print out the list of packages with available updates.
-
.It Fl y
-
Assume yes when asked for confirmation before package installation.
-
.El
-
.Sh ENVIRONMENT
-
The following environment variables affect the execution of
-
.Nm .
-
See
-
.Xr pkg.conf 5
-
for further description.
-
.Bl -tag -width ".Ev NO_DESCRIPTIONS"
-
.It Ev ASSUME_ALWAYS_YES
-
.It Ev HANDLE_RC_SCRIPTS
-
.It Ev PACKAGESITE
-
.It Ev PKG_CACHEDIR
-
.It Ev PKG_DBDIR
-
.It Ev REPO_AUTOUPDATE
-
.El
-
.Sh FILES
-
See
-
.Xr pkg.conf 5 .
-
.Sh SEE ALSO
-
.Xr pkg.conf 5 ,
-
.Xr pkg 8 ,
-
.Xr pkg-add 8 ,
-
.Xr pkg-annotate 8 ,
-
.Xr pkg-audit 8 ,
-
.Xr pkg-autoremove 8 ,
-
.Xr pkg-backup 8 ,
-
.Xr pkg-check 8 ,
-
.Xr pkg-clean 8 ,
-
.Xr pkg-config 8 ,
-
.Xr pkg-convert 8 ,
-
.Xr pkg-create 8 ,
-
.Xr pkg-delete 8 ,
-
.Xr pkg-fetch 8 ,
-
.Xr pkg-info 8 ,
-
.Xr pkg-install 8 ,
-
.Xr pkg-lock 8 ,
-
.Xr pkg-query 8 ,
-
.Xr pkg-register 8 ,
-
.Xr pkg-repo 8 ,
-
.Xr pkg-rquery 8 ,
-
.Xr pkg-search 8 ,
-
.Xr pkg-set 8 ,
-
.Xr pkg-shell 8 ,
-
.Xr pkg-shlib 8 ,
-
.Xr pkg-ssh 8 ,
-
.Xr pkg-stats 8 ,
-
.Xr pkg-update 8 ,
-
.Xr pkg-updating 8 ,
-
.Xr pkg-version 8 ,
-
.Xr pkg-which 8
deleted src/pkg-version.8
@@ -1,221 +0,0 @@
-
.\"
-
.\" FreeBSD pkg - a next generation package for the installation and maintenance
-
.\" of non-core utilities.
-
.\"
-
.\" Redistribution and use in source and binary forms, with or without
-
.\" modification, are permitted provided that the following conditions
-
.\" are met:
-
.\" 1. Redistributions of source code must retain the above copyright
-
.\"    notice, this list of conditions and the following disclaimer.
-
.\" 2. Redistributions in binary form must reproduce the above copyright
-
.\"    notice, this list of conditions and the following disclaimer in the
-
.\"    documentation and/or other materials provided with the distribution.
-
.\"
-
.\"
-
.\"     @(#)pkg.8
-
.\" $FreeBSD$
-
.\"
-
.Dd February 25, 2013
-
.Dt PKG-VERSION 8
-
.Os
-
.Sh NAME
-
.Nm "pkg version"
-
.Nd summarize installed versions of packages
-
.Sh SYNOPSIS
-
.Nm
-
.Op Fl IPR
-
.Op Fl hoqvU
-
.Op Fl l Ar limchar
-
.Op Fl L Ar limchar
-
.Op Fl egix Ar pattern
-
.Op Fl r Ar reponame
-
.Op Fl O Ar origin
-
.Op Ar index
-
.Nm
-
.Fl t Ar version1 Ar version2
-
.Nm
-
.Fl T Ar pkgname Ar pattern
-
.Sh DESCRIPTION
-
.Nm
-
is used for generating a report of packages installed by
-
.Xr pkg 8 .
-
.Pp
-
By default, if a ports tree exists it is used to compare versions.
-
If it does not exist, the remote repository catalogue is used.
-
These defaults can be overridden by specifying one of
-
.Fl P ,
-
.Fl R
-
or
-
.Fl I .
-
.Pp
-
When comparing package versions the package name and a comparison character are printed:
-
.Bl -tag -width indent
-
.It Li =
-
The installed version of the package is current.
-
.It Li \&<
-
The installed version of the package is older than the current version.
-
.It Li \&>
-
The installed version of the package is newer than the current version.
-
This situation can arise with an out-of-date index file, or when
-
testing new ports.
-
.It Li \&?
-
The installed package does not appear in the index.
-
This could be due to an out of date index or a package taken from a PR
-
that has not yet been committed.
-
.It Li \&!
-
The installed package exists in the index but for some reason,
-
.Nm
-
was unable to compare the version number of the installed package
-
with the corresponding entry in the index.
-
.El
-
.Sh OPTIONS
-
The following options are supported by
-
.Nm :
-
.Bl -tag -width F1
-
.It Fl h
-
Displays usage information
-
.It Fl I
-
Use INDEX file for determining if a package is out of date.
-
.It Fl P
-
Use ports for determining if a package is out of date.
-
This is the default if a ports tree exists.
-
The tree used can be overridden by PORTSDIR, see
-
.Xr pkg 5
-
for more information.
-
.It Fl R
-
Use repository catalogue for determining if a package is out of date.
-
This is the default if no ports tree exists.
-
.It Fl U
-
Suppress the automatic update of the local copy of the repository catalogue
-
from remote.
-
This only has any effect in combination with the
-
.Fl R
-
option.
-
.It Fl r Ar reponame
-
Use the given
-
.Ar reponame
-
for comparison when using
-
.Fl R
-
.It Fl o
-
Display package origin, instead of package name.
-
.It Fl q
-
Be quiet.
-
Less output will be produced.
-
.It Fl v
-
Be verbose.
-
.It Fl l Ar limchar
-
Display only the packages which status flag matches the one specified by
-
.Ar limchar
-
.It Fl L Ar limchar
-
Does the opposite of
-
.Fl l
-
flag.
-
Displays the packages which status flag does not match the one
-
specified by
-
.Ar limchar
-
.It Fl i
-
Make the exact
-
.Fl ( e )
-
or regular expression
-
.Fl ( x )
-
matching against
-
.Ar pattern
-
case insensitive.
-
.It Fl x Ar pattern
-
Only display the packages that match the regular expression.
-
Uses the "modern" or "extended" syntax of
-
.Xr re_format 7 .
-
.It Fl g Ar pattern
-
Only display the packages that match the glob expression.
-
.It Fl e Ar string
-
Only display the packages that exactly match the string.
-
.It Fl O Ar origin
-
Display only the packages which origin matches
-
.Ar origin
-
.It Fl t Ar version1 Ar version2
-
Test a pair of version number strings and exit.
-
The output consists of one of the single characters
-
.Li =
-
(equal),
-
.Li \&<
-
(right-hand number greater), or
-
.Li \&>
-
(left-hand number greater) on standard output.
-
This flag is mostly useful for scripts or for testing.
-
.It Fl T Ar pkgname Ar pattern
-
Compare
-
.Ar pkgname
-
against shell glob
-
.Ar pattern
-
and set exit code accordingly.
-
.Fl T
-
can also be used in `filter mode':
-
When one of the arguments is `-', standard input is used, and lines
-
with matching package names/patterns are echoed to standard output.
-
.El
-
.Sh ENVIRONMENT
-
The following environment variables affect the execution of
-
.Nm .
-
See
-
.Xr pkg.conf 5
-
for further description.
-
.Bl -tag -width ".Ev NO_DESCRIPTIONS"
-
.It Ev PKG_DBDIR
-
.It Ev PORTSDIR
-
.El
-
.Sh FILES
-
See
-
.Xr pkg.conf 5 .
-
.Sh EXAMPLES
-
The following is a typical invocation of the
-
.Nm
-
command, which checks the installed packages against the local ports
-
index file:
-
.Pp
-
.Dl % pkg version -v
-
.Pp
-
The command below generates a report against the versions in the repository catalogue:
-
.Pp
-
.Dl % pkg update
-
.Dl % pkg version -vR
-
.Pp
-
The following lists packages needing upgrade, compared to the repository catalogue:
-
.Pp
-
.Dl % pkg update
-
.Dl % pkg version -vRL=
-
.Pp
-
The following command compares two package version strings:
-
.Pp
-
.Dl % pkg version -t 1.5 1.5.1
-
.Sh SEE ALSO
-
.Xr pkg.conf 5 ,
-
.Xr pkg 8 ,
-
.Xr pkg-add 8 ,
-
.Xr pkg-annotate 8 ,
-
.Xr pkg-audit 8 ,
-
.Xr pkg-autoremove 8 ,
-
.Xr pkg-backup 8 ,
-
.Xr pkg-check 8 ,
-
.Xr pkg-clean 8 ,
-
.Xr pkg-config 8 ,
-
.Xr pkg-convert 8 ,
-
.Xr pkg-create 8 ,
-
.Xr pkg-delete 8 ,
-
.Xr pkg-fetch 8 ,
-
.Xr pkg-info 8 ,
-
.Xr pkg-install 8 ,
-
.Xr pkg-lock 8 ,
-
.Xr pkg-query 8 ,
-
.Xr pkg-register 8 ,
-
.Xr pkg-repo 8 ,
-
.Xr pkg-rquery 8 ,
-
.Xr pkg-search 8 ,
-
.Xr pkg-set 8 ,
-
.Xr pkg-shell 8 ,
-
.Xr pkg-shlib 8 ,
-
.Xr pkg-ssh 8 ,
-
.Xr pkg-stats 8 ,
-
.Xr pkg-update 8 ,
-
.Xr pkg-updating 8 ,
-
.Xr pkg-upgrade 8 ,
-
.Xr pkg-which 8
deleted src/pkg-which.8
@@ -1,88 +0,0 @@
-
.\"
-
.\" FreeBSD pkg - a next generation package for the installation and maintenance
-
.\" of non-core utilities.
-
.\"
-
.\" Redistribution and use in source and binary forms, with or without
-
.\" modification, are permitted provided that the following conditions
-
.\" are met:
-
.\" 1. Redistributions of source code must retain the above copyright
-
.\"    notice, this list of conditions and the following disclaimer.
-
.\" 2. Redistributions in binary form must reproduce the above copyright
-
.\"    notice, this list of conditions and the following disclaimer in the
-
.\"    documentation and/or other materials provided with the distribution.
-
.\"
-
.\"
-
.\"     @(#)pkg.8
-
.\" $FreeBSD$
-
.\"
-
.Dd March 25, 2013
-
.Dt PKG-WHICH 8
-
.Os
-
.Sh NAME
-
.Nm "pkg which"
-
.Nd displays which package installed a specific file
-
.Sh SYNOPSIS
-
.Nm
-
.Op Fl qog
-
.Ar file
-
.Sh DESCRIPTION
-
.Nm
-
is used for displaying the package that installed
-
.Ar file
-
.Sh OPTIONS
-
The following options are supported by
-
.Nm :
-
.Bl -tag -width F1
-
.It Fl q
-
Be quiet
-
.It Fl o
-
Shows the origin of the package instead of name-version
-
.It Fl g
-
Treat
-
.Ao file Ac
-
as a glob pattern.
-
.El
-
.Sh ENVIRONMENT
-
The following environment variables affect the execution of
-
.Nm .
-
See
-
.Xr pkg.conf 5
-
for further description.
-
.Bl -tag -width ".Ev NO_DESCRIPTIONS"
-
.It Ev PKG_DBDIR
-
.El
-
.Sh FILES
-
See
-
.Xr pkg.conf 5 .
-
.Sh SEE ALSO
-
.Xr pkg.conf 5 ,
-
.Xr pkg 8 ,
-
.Xr pkg-add 8 ,
-
.Xr pkg-annotate 8 ,
-
.Xr pkg-audit 8 ,
-
.Xr pkg-autoremove 8 ,
-
.Xr pkg-backup 8 ,
-
.Xr pkg-check 8 ,
-
.Xr pkg-clean 8 ,
-
.Xr pkg-config 8 ,
-
.Xr pkg-convert 8 ,
-
.Xr pkg-create 8 ,
-
.Xr pkg-delete 8 ,
-
.Xr pkg-fetch 8 ,
-
.Xr pkg-info 8 ,
-
.Xr pkg-install 8 ,
-
.Xr pkg-lock 8 ,
-
.Xr pkg-query 8 ,
-
.Xr pkg-register 8 ,
-
.Xr pkg-repo 8 ,
-
.Xr pkg-rquery 8 ,
-
.Xr pkg-search 8 ,
-
.Xr pkg-set 8 ,
-
.Xr pkg-shell 8 ,
-
.Xr pkg-shlib 8 ,
-
.Xr pkg-ssh 8 ,
-
.Xr pkg-stats 8 ,
-
.Xr pkg-update 8 ,
-
.Xr pkg-updating 8 ,
-
.Xr pkg-upgrade 8 ,
-
.Xr pkg-version 8
deleted src/pkg.8
@@ -1,398 +0,0 @@
-
.\"
-
.\" FreeBSD pkg - a next generation package for the installation and maintenance
-
.\" of non-core utilities.
-
.\"
-
.\" Redistribution and use in source and binary forms, with or without
-
.\" modification, are permitted provided that the following conditions
-
.\" are met:
-
.\" 1. Redistributions of source code must retain the above copyright
-
.\"    notice, this list of conditions and the following disclaimer.
-
.\" 2. Redistributions in binary form must reproduce the above copyright
-
.\"    notice, this list of conditions and the following disclaimer in the
-
.\"    documentation and/or other materials provided with the distribution.
-
.\"
-
.\"
-
.\"     @(#)pkg.8
-
.\" $FreeBSD$
-
.\"
-
.Dd February 26, 2014
-
.Dt PKG 8
-
.Os
-
.\" ---------------------------------------------------------------------------
-
.Sh NAME
-
.Nm pkg ,
-
.Nm pkg-static
-
.Nd a utility for manipulating packages
-
.\" ---------------------------------------------------------------------------
-
.Sh SYNOPSIS
-
.Nm
-
.Op Fl v
-
.Op Fl d
-
.Op Fl l
-
.Op Fl N
-
.Op Fl j Ao jail name or id Ac | Fl c Ao chroot path Ac
-
.Op Fl C Ao configuration file Ac
-
.Op Fl R Ao repository configuration directory Ac
-
.Ao command Ac Ao Ar flags Ac
-
.\" ---------------------------------------------------------------------------
-
.Sh DESCRIPTION
-
provides an interface for manipulating packages - registering,
-
adding, removing and upgrading of packages.
-
.Nm pkg-static
-
is a statically linked variant of
-
.Nm
-
typically only used for the initial installation of
-
.Nm .
-
There are some differences in functionality.
-
See
-
.Xr pkg.conf 5
-
for details.
-
.\" ---------------------------------------------------------------------------
-
.Sh OPTIONS
-
The following options are supported by
-
.Nm :
-
.Bl -tag -width indent
-
.It Fl v
-
Displays the current version of
-
.Nm
-
.It Fl d
-
Show debug information
-
.It Fl l
-
List all the available command names, and exit without performing any
-
other action.
-
The
-
.Fl v
-
option takes precedence over
-
.Fl l
-
but
-
.Fl l
-
will override any other command line arguments.
-
.It Fl o Ao option=value Ac
-
Set configuration option for
-
.Nm
-
from the command line. Options that are set from the environment are
-
redefined. It is permitted to specify this option multiple times. 
-
.It Fl N
-
Activation status check mode.
-
Prevent
-
.Nm
-
from automatically creating or initializing the sqlite database in
-
.Pa /var/db/pkg/local.sqlite
-
if it does not already exist.
-
.Pp
-
Prevent
-
.Nm
-
from performing any actions if no packages are currently installed, on
-
the basis that a correctly initialised system using
-
.Nm
-
will always have at least the
-
.Nm
-
package itself registered.
-
.Pp
-
If used without any other arguments,
-
.Nm Fl N
-
will run the sanity tests and if successful print out a short message
-
showing how many packages are currently installed.
-
The exit status should be a reliable indication of whether a system
-
is configured to use
-
.Nm
-
as its package management system or not.
-
.Pp
-
Example usage:
-
.Bd -literal -offset indent
-
  if pkg -N >/dev/null 2>&1; then
-
    # pkgng-specifics
-
  else
-
    # pkg_install-specifics
-
  fi
-
.Ed
-
.Pp
-
The
-
.Fl N
-
flag was first released in the
-
.Pa /usr/sbin/pkg
-
bootstrapper
-
in FreeBSD 8.4,
-
but was missing from FreeBSD 9.1.
-
It may not be enough to just call
-
.Nm Fl N ,
-
as the bootstrapper may be invoked, or an error returned
-
from
-
.Nm .
-
The following script is the safest way to detect if
-
.Nm
-
is installed and activated:
-
.Bd -literal -offset indent
-
  if TMPDIR=/dev/null ASSUME_ALWAYS_YES=1 \\
-
       PACKAGESITE=file:///nonexistent \\
-
       pkg info -x 'pkg(-devel)?$' >/dev/null 2>&1; then
-
    # pkgng-specifics
-
  else
-
    # pkg_install-specifics
-
  fi
-
.Ed
-
.It Fl j Ao jail name or id Ac
-
.Nm
-
will execute in the given
-
.Ao jail name or id Ac ,
-
where
-
.Em name
-
matches
-
.Dq Cm jls Ar name
-
and
-
.Em id
-
matches
-
.Dq Cm jls Ar jid .
-
See
-
.Xr jail 8
-
and
-
.Xr jls 8 .
-
.It Fl c Ao chroot path Ac
-
.Nm
-
will chroot in the
-
.Ao chroot path Ac
-
Environment
-
.It Fl C Ao configuration file Ac
-
.Nm
-
will use the specified file as a configuration file
-
.It Fl R Ao repository configuration directory Ac
-
.Nm
-
will search the directory for per-repository configuration files.
-
This overrides any value of
-
.Ev REPOS_DIR
-
specified in the main configuration file.
-
.El
-
.\" ---------------------------------------------------------------------------
-
.Sh COMMANDS
-
The following commands are supported by
-
.Nm :
-
.Bl -tag -width indent
-
.It Ic help Ar command
-
Display usage information of the specified command.
-
.It Ic add
-
Install a package from either a local source or a remote one.
-
.Pp
-
When installing from remote source you need to specify the
-
protocol to use when fetching the package.
-
.Pp
-
Currently supported protocols are FTP, HTTP and HTTPS.
-
.It Ic annotate
-
Add, modify or delete tag-value style annotations on packages.
-
.It Ic audit
-
Audits installed packages against known vulnerabilities.
-
.It Ic autoremove
-
Delete packages which were automatically installed as dependencies and are not required any more.
-
.It Ic backup
-
Dump the local package database to a file specified on the command-line.
-
.It Ic bootstrap
-
This is for compatibility with the
-
.Xr pkg 7
-
bootstrapper.
-
If
-
.Nm
-
is already installed, nothing is done.
-
.Pp
-
If invoked with the
-
.Fl f
-
flag an attempt will be made to reinstall
-
.Nm
-
from remote repository.
-
This is not supported on FreeBSD 8.3 as it did not have
-
.Xr pkg 7 .
-
.It Ic check
-
Sanity checks installed packages.
-
.It Ic clean
-
Cleans the local cache of fetched remote packages.
-
.It Ic convert
-
Convert to and from the old
-
.Xr pkg_add 1
-
format.
-
.It Ic create
-
Create a package
-
.It Ic delete
-
Delete a package from the database and the system.
-
.It Ic fetch
-
Fetches packages from a remote repository.
-
.It Ic info
-
Display information about installed packages.
-
.It Ic install
-
Install a package from a remote package repository.
-
If a package is found in more than one remote repository,
-
then installation happens from the first one.
-
Downloading a package is tried from each package repository in turn,
-
until the package is successfully fetched.
-
.It Ic lock
-
Prevent modification or deletion of a package.
-
.It Ic plugins
-
List the available plugins.
-
.It Ic query
-
Query information about installed packages.
-
.It Ic register
-
Register a package in the database.
-
.It Ic repo
-
Create a local package repository for remote usage.
-
.It Ic rquery
-
Query information for remote repositories.
-
.It Ic search
-
Search for the given pattern in the remote package
-
repositories.
-
.It Ic set
-
Modify information in the installed database.
-
.It Ic shell
-
Fires up a sqlite shell to the local or remote database.
-
Extreme care should be taken when using this command.
-
.It Ic shlib
-
Displays which packages link to a specific shared library.
-
.It Ic stats
-
Display package database statistics.
-
.It Ic unlock
-
Unlocks packages, allowing them to be modified or deleted
-
.It Ic update
-
Update the available remote repositories as listed in
-
.Xr pkg.conf 5 .
-
.It Ic updating
-
Displays UPDATING entries of installed packages.
-
.It Ic upgrade
-
Upgrade a package to a newer version.
-
.It Ic version
-
Summarize installed versions of packages.
-
.It Ic which
-
Query the database for package(s) that installed a specific
-
file.
-
.El
-
.\" ---------------------------------------------------------------------------
-
.Sh ENVIRONMENT
-
The list of environment variables that affect the execution of
-
.Nm
-
is in
-
.Xr pkg.conf 5 .
-
.\" ---------------------------------------------------------------------------
-
.Sh FILES
-
See
-
.Xr pkg.conf 5 .
-
.\" ---------------------------------------------------------------------------
-
.Sh EXAMPLES
-
Search for a package:
-
.Dl $ pkg search perl
-
.Pp
-
Install a package:
-
.Dl Installing must specify a unique origin or version otherwise it will try installing all matches.
-
.Pp
-
.Dl % pkg install perl-5.14
-
.Pp
-
List installed packages:
-
.Dl $ pkg info
-
.Pp
-
Upgrade from remote repository:
-
.Dl % pkg upgrade
-
.Pp
-
Change the origin for an installed package:
-
.Dl % pkg set -o lang/perl5.12:lang/perl5.14
-
.Dl % pkg install -Rf lang/perl5.14
-
.Pp
-
List non-automatic packages:
-
.Dl $ pkg query -e '%a = 0' %o
-
.Pp
-
List automatic packages:
-
.Dl $ pkg query -e '%a = 1' %o
-
.Pp
-
Delete an installed package:
-
.Dl % pkg delete perl-5.14
-
.Pp
-
Remove unneeded dependencies:
-
.Dl % pkg autoremove
-
.Pp
-
Change a package from automatic to non-automatic, which will prevent
-
.Ic autoremove
-
from removing it:
-
.Dl % pkg set -A 0 perl-5.14
-
.Pp
-
Change a package from non-automatic to automatic, which will make
-
.Ic autoremove
-
allow it be removed once nothing depends on it:
-
.Dl % pkg set -A 1 perl-5.14
-
.Pp
-
Create package file from an installed package:
-
.Dl % pkg create -o /usr/ports/packages/All perl-5.14
-
.Pp
-
Determine which package installed a file:
-
.Dl $ pkg which /usr/local/bin/perl
-
.Pp
-
Audit installed packages for security advisories:
-
.Dl $ pkg audit
-
.Pp
-
Check installed packages for checksum mismatches:
-
.Dl # pkg check -s -a
-
.Pp
-
Check for missing dependencies:
-
.Dl # pkg check -d -a
-
.\" ---------------------------------------------------------------------------
-
.Sh SEE ALSO
-
.Xr SBUF 9 ,
-
.Xr elf 3 ,
-
.Xr fetch 3 ,
-
.Xr libarchive 3 ,
-
.Xr pkg.conf 5 ,
-
.Xr pkg-add 8 ,
-
.Xr pkg-annotate 8 ,
-
.Xr pkg-audit 8 ,
-
.Xr pkg-autoremove 8 ,
-
.Xr pkg-backup 8 ,
-
.Xr pkg-check 8 ,
-
.Xr pkg-clean 8 ,
-
.Xr pkg-config 8 ,
-
.Xr pkg-convert 8 ,
-
.Xr pkg-create 8 ,
-
.Xr pkg-delete 8 ,
-
.Xr pkg-fetch 8 ,
-
.Xr pkg-info 8 ,
-
.Xr pkg-install 8 ,
-
.Xr pkg-lock 8 ,
-
.Xr pkg-query 8 ,
-
.Xr pkg-register 8 ,
-
.Xr pkg-repo 8 ,
-
.Xr pkg-rquery 8 ,
-
.Xr pkg-search 8 ,
-
.Xr pkg-set 8 ,
-
.Xr pkg-shell 8 ,
-
.Xr pkg-shlib 8 ,
-
.Xr pkg-ssh 8 ,
-
.Xr pkg-stats 8 ,
-
.Xr pkg-update 8 ,
-
.Xr pkg-updating 8 ,
-
.Xr pkg-upgrade 8 ,
-
.Xr pkg-version 8 ,
-
.Xr pkg-which 8
-
.Pp
-
To build your own package set for one or multiple servers see
-
.Em ports-mgmt/poudriere
-
.\" ---------------------------------------------------------------------------
-
.Sh HISTORY
-
The
-
.Nm
-
command first appeared in
-
.Fx 9.1 .
-
.\" ---------------------------------------------------------------------------
-
.Sh AUTHORS AND CONTRIBUTORS
-
.An Baptiste Daroussin Aq bapt@FreeBSD.org
-
.An Julien Laffaye Aq jlaffaye@FreeBSD.org
-
.An Philippe Pepiot <phil@philpep.org>
-
.An Will Andrews <will@FreeBSD.org>
-
.An Marin Atanasov Nikolov <dnaeon@gmail.com>
-
.An Yuri Pankov <yuri.pankov@gmail.com>
-
.An Alberto Villa <avilla@FreeBSD.org>
-
.An Brad Davis <brd@FreeBSD.org>
-
.An Matthew Seaman <matthew@FreeBSD.org>
-
.An Bryan Drewery <bryan@shatow.net>
-
.An Eitan Adler <eadler@FreeBSD.org>
-
.An Romain Tarti\`ere <romain@FreeBSD.org>
-
.An Vsevolod Stakhov <vsevolod@FreeBSD.org>
-
.An Alexandre Perrin <alex@kaworu.ch>
-
.\" ---------------------------------------------------------------------------
-
.Sh BUGS
-
See the issue tracker at
-
.Em https://github.com/freebsd/pkg/issues
-
.Pp
-
Please direct questions and issues to the
-
.An pkg@FreeBSD.org
-
mailing list.
deleted src/pkg.conf.5
@@ -1,371 +0,0 @@
-
.\"
-
.\" FreeBSD pkg - a next generation package for the installation and maintenance
-
.\" of non-core utilities.
-
.\"
-
.\" Redistribution and use in source and binary forms, with or without
-
.\" modification, are permitted provided that the following conditions
-
.\" are met:
-
.\" 1. Redistributions of source code must retain the above copyright
-
.\"    notice, this list of conditions and the following disclaimer.
-
.\" 2. Redistributions in binary form must reproduce the above copyright
-
.\"    notice, this list of conditions and the following disclaimer in the
-
.\"    documentation and/or other materials provided with the distribution.
-
.\"
-
.\"
-
.\"     @(#)pkg.1
-
.\" $FreeBSD$
-
.\"
-
.Dd December 15, 2013
-
.Dt PKG.CONF 5
-
.Os
-
.Sh NAME
-
.Nm "pkg.conf"
-
.Nd System-wide configuration file for
-
.Xr pkg 1
-
.Sh DESCRIPTION
-
.Nm
-
is the system-wide configuration file used by the
-
.Xr pkg 1
-
tools.
-
.Pp
-
The default location of this file is
-
.Pa /usr/local/etc/pkg.conf
-
.Pp
-
Lines in the file beginning with a "#" are comments
-
and are ignored.
-
.Pp
-
The file is in UCL format.
-
For more information on the syntax of UCL,
-
please visit the official UCL website - http://github.com/vstakhov/libucl.
-
.Pp
-
The following types of options are recognized -
-
boolean, string and list options.
-
.Pp
-
A boolean option is marked as enabled if one of the following values is
-
specified in the configuration file -
-
.Dv YES, TRUE
-
and
-
.Dv ON.
-
.Sh OPTIONS
-
The following options can be defined in
-
.Nm :
-
.Bl -tag -width ".Cm ASSUME_ALWAYS_YES(boolean)"
-
.It Cm ASSUME_ALWAYS_YES: boolean
-
When this option is enabled
-
.Xr pkg 1
-
will automatically assume "yes" to all questions
-
which require user confirmation before doing anything, as if it
-
the
-
.Fl y
-
flag was specified.
-
By default this option is disabled.
-
.It Cm PUBKEY: string
-
Specifies the location to the public RSA key used for signing the
-
repository database.
-
The default value for this file is
-
.Pa /etc/ssl/pkg.conf
-
.It Cm HANDLE_RC_SCRIPTS: boolean
-
This option when enabled
-
will automatically perform start/stop of services during package
-
installation and deinstallation.
-
Services are started on installation only
-
if they are enabled in
-
.Pa /etc/rc.conf .
-
By default this option is disabled.
-
.It Cm PACKAGESITE: string
-
Specifies the URL of the remote location to use
-
when fetching the database file and packages.
-
This supports using
-
.Sy ${ABI}
-
to create a dynamic URL based on the ABI being used. (deprecated)
-
.It Cm PKG_CACHEDIR: string
-
Specifies the cache directory for packages.
-
The default value
-
for this option is
-
.Pa /var/cache/pkg
-
.It Cm PKG_DBDIR: string
-
Specifies the directory to use for storing the package
-
database files.
-
The default value for this option is
-
.Pa /var/db/pkg
-
.It Cm PLIST_KEYWORDS_DIR: string
-
< To be added >
-
.It Cm PORTSDIR: string
-
Specifies the location to the Ports directory.
-
The default value
-
for this option is
-
.Pa /usr/ports
-
.It Cm SYSLOG: boolean
-
This option is enabled by default, log all the
-
installation/deinstallation/upgrade operation via syslog(3)
-
.It Cm AUTODEPS: boolean
-
Analyse the elf to add dependencies (shared libraries) that may have been
-
forgotten by the maintainer.
-
default: off
-
.It Cm ABI: string
-
the abi of the package you want to install, by default the /bin/sh abi is used
-
.It Cm DEVELOPER_MODE: boolean
-
Makes certain errors immediately fatal.
-
Adds various warnings and
-
suggestions to the output of
-
.Xr pkg 1
-
as an aide to port maintainers, including indicating when the port
-
might be marked as architecture independent.
-
default: off
-
.It Cm PERMISSIVE: boolean
-
Ignore conflicts while registering a package, note that the files conflicting
-
will not be marked as owned by the new package. (default: NO)
-
.It Cm PORTAUDIT_SITE: string
-
Specifies the remote location to use
-
when fetching the portaudit database.
-
See
-
.Xr pkg-audit 8
-
for more information.
-
.It Cm DEBUG_SCRIPTS: boolean
-
Activate debug mode for scripts (aka set -x)
-
.It Cm REPO_AUTOUPDATE: boolean
-
When true, automatically check for and download updates to
-
.Pa /var/db/pkg/repo.sqlite
-
when running one of:
-
.Nm pkg upgrade ,
-
.Nm pkg fetch ,
-
.Nm pkg install
-
or
-
.Nm pkg version -R .
-
(default: YES)
-
.It Cm PKG_ENV: Key/Value list
-
This tells
-
.Xr pkg 8
-
to set key/values passed in the environment.
-
Therefore underlying libraries
-
like
-
.Xr fetch 3
-
can be configured (e.g., setting
-
.Ev FTP_PROXY
-
and
-
.Ev HTTP_PROXY ) .
-
(default: empty)
-
.It Cm NAMESERVER: string
-
Bypass name resolution forcing a nameserver
-
.It Cm EVENT_PIPE: string
-
Send all events to the specified fifo or Unix socket, events will be formatted
-
in JSON.
-
.It Cm SSH_RESTRICT_DIR: string
-
Directory where the ssh subsystem will be restricted to
-
.It Cm DISABLE_MTREE: boolean
-
For experimental purposes only.
-
Not for use on production systems.
-
All this option does is prevent processing of
-
.Cm +MTREE
-
data when installing a package.
-
.Cm +MTREE
-
files are a legacy feature of the ports tree, which provide functionality
-
necessary for
-
.Xr pkg-install 8
-
as it cannot handle creating arbitrary directory heirarcies otherwise.
-
.Xr pkg 8
-
can create such directory structures natively, but currently still uses the
-
.Cm +MTREE
-
data.
-
This option exists to facilitate developing
-
.Cm +MTREE
-
free package sets.
-
.It Cm ALIAS: key/value list
-
Define local aliases for various
-
.Xr pkg 8
-
standard command lines.
-
Whenever the
-
.Em key
-
text occurs as a separate
-
.Sq action
-
word in a command line of the form
-
.Nm pkg Em key ... ,
-
substitute the
-
.Em value
-
text verbatim.
-
The replacement can consist of any sequence of text, which should form
-
a syntactically correct
-
.Xr pkg 8
-
command line when substituted in and followed by any remaining tokens from
-
the original command line.
-
.El
-
.Sh MULTIPLE REPOSITORIES
-
To use multiple repositories, specify the primary repository as shown above.
-
Further repositores can be configured using repository files.
-
.Pp
-
Repository files reside in
-
.Pa /etc/pkg/
-
and
-
.Pa /usr/local/etc/pkg/repos/ .
-
.Pp
-
Filenames are arbitrary, but should end in
-
.Sq .conf
-
For example
-
.Pa /usr/local/etc/pkg/repos/myrepo.conf .
-
.Pp
-
A repository file is in UCL format and has the following form (see
-
above for the description of most options):
-
.Bl -tag -width ".Cm myrepo:"
-
.It Cm myrepo:
-
.Bl -tag -width ".Cm MIRROR_TYPE: string"
-
.It Cm URL: string
-
URL for this repository only.
-
.It Cm ENABLED: boolean
-
The repository will be used only if this option is enabled. (default: YES)
-
.It Cm MIRROR_TYPE: string
-
MIRROR_TYPE for this repository only. (default: NONE).
-
Either
-
.Dv HTTP
-
or
-
.Dv SRV
-
or
-
.Dv NONE
-
can be used.
-
For a
-
.Cm MIRROR_TYPE
-
of
-
.Dv NONE ,
-
any of the URL schemes supported by
-
.Xr libfetch 3
-
can be used, including:
-
.Dv http:// ,
-
.Dv https:// ,
-
.Dv ftp:// ,
-
or
-
.Dv file://
-
plus
-
.Dv ssh:// .
-
Where
-
.Sy MIRROR_TYPE
-
is
-
.Dv SRV ,
-
you should use a
-
.Dv pkg+http://
-
or
-
.Dv pkg+https://
-
(etc.) URL scheme.
-
Using
-
.Dv http://
-
URLS implies that the hostname part is a simple hostname according to RFC 2616,
-
and is deprecated.
-
.It Cm SIGNATURE_TYPE: string
-
Specifies what type of signature this repository uses.
-
Can be either
-
.Dv NONE ,
-
.Dv PUBKEY or
-
.Dv FINGERPRINTS .
-
When
-
.Sy SIGNATURE_TYPE
-
is
-
.Dv NONE ,
-
then no signature checking will be done on the repository.
-
When
-
.Sy SIGNATURE_TYPE
-
is
-
.Dv PUBKEY ,
-
then the
-
.Sy PUBKEY
-
option will be used for signature verification.
-
When
-
.Sy SIGNATURE_TYPE
-
is
-
.Dv FINGERPRINTS ,
-
then the
-
.Sy FINGERPRINTS
-
option will be used for signature verification.
-
(default: NONE)
-
.It Cm PUBKEY: string
-
PUBKEY for this repository only. (default: NONE) (deprecated)
-
.It Cm FINGERPRINTS: string
-
This should be set to a path containing known signatures for the repository.
-
I.e., if
-
.Sy FINGERPRINTS
-
is set to
-
.Pa /usr/local/etc/pkg/fingerprints/myrepo ,
-
then the directories
-
.Pa /usr/local/etc/pkg/fingerprints/myrepo/trusted
-
and
-
.Pa /usr/local/etc/pkg/fingerprints/myrepo/revoked
-
should exist with known good and bad fingerprints, respectively.
-
Files in those directories should be in the format:
-
.Bd -literal -offset indent
-
function: sha256
-
fingerprint: sha256_representation_of_the_public_key
-
.Ed
-
.El
-
.El
-
.Pp
-
Note that
-
.Fa myrepo
-
could be any string.
-
However no two repositories may share the same name.
-
It is possible to specify more than one repository per file.
-
.Sh ENVIRONMENT
-
An environment variable with the same name as the option in the
-
configuration file always overrides the value of an option set in the
-
file.
-
.Sh EXAMPLES
-
Repository configuration file:
-
.Bd -literal -offset indent
-
FreeBSD: {
-
    url: "pkg+http://pkg.freebsd.org/${ABI}/latest",
-
    enabled: true,
-
    signature_type: "fingerprints",
-
    fingerprints: "/usr/share/keys/pkg",
-
    mirror_type: "srv"
-
}
-
.Ed
-
Example for pkg.conf
-
.Bd -literal -offset indent
-
pkg_dbdir: "/var/db/pkg"
-
pkg_cachedir: "/var/cache/pkg"
-
portsdir: "/usr/ports"
-
handle_rc_scripts: false
-
assume_always_yes: false
-
repos_dir: [
-
     "/etc/pkg",
-
     "/usr/local/etc/pkg/repos",
-
]
-
syslog: true
-
autodeps: true
-
developer_mode: false
-
pkg_env: {
-
    http_proxy: "http://myproxy:3128",
-
}
-
alias: {
-
    origin: "info -qo",
-
    nonauto: "query -e '%a == 0' '%n-%v'"
-
}
-
.Ed
-
.Sh SEE ALSO
-
.Xr fetch 3 ,
-
.Xr pkg 8 ,
-
.Xr pkg-add 8 ,
-
.Xr pkg-annotate 8 ,
-
.Xr pkg-audit 8 ,
-
.Xr pkg-autoremove 8 ,
-
.Xr pkg-backup 8 ,
-
.Xr pkg-check 8 ,
-
.Xr pkg-clean 8 ,
-
.Xr pkg-config 8 ,
-
.Xr pkg-convert 8 ,
-
.Xr pkg-create 8 ,
-
.Xr pkg-delete 8 ,
-
.Xr pkg-fetch 8 ,
-
.Xr pkg-info 8 ,
-
.Xr pkg-install 8 ,
-
.Xr pkg-lock 8 ,
-
.Xr pkg-query 8 ,
-
.Xr pkg-register 8 ,
-
.Xr pkg-repo 8 ,
-
.Xr pkg-rquery 8 ,
-
.Xr pkg-search 8 ,
-
.Xr pkg-set 8 ,
-
.Xr pkg-shell 8 ,
-
.Xr pkg-shlib 8 ,
-
.Xr pkg-stats 8 ,
-
.Xr pkg-update 8 ,
-
.Xr pkg-updating 8 ,
-
.Xr pkg-upgrade 8 ,
-
.Xr pkg-version 8 ,
-
.Xr pkg-which 8