portinstall

提供: FreeBSD入門
2015年9月27日 (日) 19:07時点におけるDaemon (トーク | 投稿記録)による版

移動: 案内検索
スポンサーリンク

portmaster は、 portsパッケージを管理するツールです。FreeBSD 10.0-RELEASE以降であれば、pkgコマンドで管理するほうが簡単でしょう。

読み方

portmaster
ぽーとますたー

概要

portmasterは、外部データベースや言語なしに、portsを管理するツールです。

インストール

portmasterそのものをインストールします。

% cd /usr/ports/ports-mgmt/portmaster
% sudo make install clean

使い方

コマンドラインオプション

% portmaster --help
 
===>>> Version 3.11
 
Usage:
Common flags: [--force-config -CGHKgntvw -[B|b] -[f|i] -[D|d]]
    [[[--packages|-P]|[--packages-only|-PP]] | [--packages-build]]
    [--packages-if-newer] [--delete-build-only] [--always-fetch]
    [--local-packagedir=<path>] [--packages-local] [--delete-packages]
    [--no-confirm] [--no-term-title] [--no-index-fetch]
    [--index|--index-first|--index-only] [-m <arguments for make>]
    [-x <glob pattern to exclude from building>]
portmaster [Common flags] <full name of port directory in /var/db/pkg>
portmaster [Common flags] <full path to /usr/ports/foo/bar>
portmaster [Common flags] <glob pattern of directories in /var/db/pkg>
portmaster [Common flags] [--update-if-newer] Multiple full names/paths
         from /var/db/pkg|/usr/ports and/or multiple globs from /var/db/pkg
 
portmaster [Common flags] . [Use in /usr/ports/foo/bar to build that port]
 
portmaster [Common flags] -a
 
portmaster --show-work [-Gv] [-m <args>] <single port, as above>
 
portmaster [Common flags] -o <new port dir in /usr/ports> <installed port>
portmaster [Common flags] [-R] -r <name/glob of port directory in /var/db/pkg>
         (-r <port> can be specified multiple times)
 
portmaster -l
portmaster [--index-only [-t]] -L
 
portmaster --list-origins
 
portmaster [--force-config|-G] [-P|-PP] [-aftv] -F
 
portmaster [-n|y] [-b] [-D|d] -e <name/glob of a single port in /var/db/pkg>
portmaster [-n|y] [-b] [-D|d] -s
 
portmaster [-n|y] [-t] --clean-distfiles
 
portmaster [-n|y] [--index|--index-only] --clean-packages
 
portmaster [-n|y] [--index|--index-only] [-v] --check-depends
 
portmaster [-n|y] [-v] --check-port-dbdir
 
portmaster -h|--help
portmaster --version
 
--force-config run 'make config' for all ports (overrides -G)
-C prevents 'make clean' from being run before building
-G prevents 'make config'
-H hide details of the port build and install in a log file
-K prevents 'make clean' from being run after building
-B prevents creation of the backup package for the installed port
-b create and keep a backup package of an installed port
-g create a package of the new port
-n run through all steps, but do not make or install any ports
-t recurse dependencies thoroughly, using all-depends-list
-v verbose output
-w save old shared libraries before deinstall
-i interactive update mode -- ask whether to rebuild ports
-D no cleaning of distfiles
-d always clean distfiles
-m <arguments for the 'make' command line>
-x <avoid building or updating ports that match this pattern>
   Can be specified more than once
 
--no-confirm do not ask user to confirm list of ports to be
   installed and/or updated before proceeding
--no-term-title do not update the xterm title bar
(stdin):Terminated
 
--no-index-fetch skip fetching the INDEX file
--index use INDEX-[7-9] exclusively to check if a port is up to date
--index-first use the INDEX for status, but double-check with the port
--index-only do not try to use /usr/ports
 
--delete-build-only delete ports that are build-only dependencies
   after a successful run, only if installed this run
 
--update-if-newer (only for multiple ports listed on command line)
   do not rebuild/reinstall if the installed version is up to date
 
-P|--packages use packages, but build port if not available
-PP|--packages-only fail if no package is available
--packages-build use packages for all build dependencies
--packages-if-newer use package if newer than installed even
   if the package is not the latest according to the ports tree
--always-fetch fetch package even if it already exists locally
--local-packagedir=<path> where local packages can be found,
   will fall back to fetching if no local version exists
--packages-local use packages from --local-packagedir only
--delete-packages after installing from a package, delete it
 
-a check all ports, update as necessary
 
--show-work list what ports are and would be installed
 
-o replace the installed port with a port from a different origin
[-R] -r rebuild port, and all ports that depend on it
-R used with -[rf] to skip ports updated on a previous run
 
-l list all installed ports by category
-L list all installed ports by category, and search for updates
 
--list-origins list directories from /usr/ports for root and leaf ports
 
[--force-config|-G] [-aftv] -F fetch distfiles only
 
-n answer no to all user prompts for the features below
-y answer yes to all user prompts for the features below
 
[-n|y] [-b] [-D|d] -e expunge one port via pkg_delete, and remove its distfiles
[-n|y] [-b] [-D|d] -s clean out stale ports that used to be depended on
 
[-t] [-n] --clean-distfiles offer to delete stale distfiles
[-t] -y --clean-distfiles delete stale distfiles without prompting
   with -t distfile is valid from any port, not just those installed
 
[--index|--index-only] [-n] --clean-packages offer to delete stale packages
[--index|--index-only] -y --clean-packages delete without prompting
   --index-only is required if no ports tree is available
 
[-n|y] [-v] --check-depends cross-check and update dependency info for all ports
 
[-n|y] [-v] --check-port-dbdir check for stale entries in /var/db/ports
 
-h|--help display this help message
--version display the version number
 
Please see the portmaster(8) man page for more information

ソフトウェアをインストールする

nmap をインストールする例です。

% whereis -q -s nmap
/usr/ports/security/nmap
% sudo portmaster -y -d /usr/ports/security/nmap

すべてのソフトウェアをアップデートする

アップデートが必要なすべてのportsをアップデートします。

% sudo portmaster -a

アップデートが必要なすべてのportsをアップデートし、アップデート後に、古い distfile を削除します。

% sudo portmaster -aD
% sudo portmaster --clean-distfiles

ソフトウェアをアップデートする

nmap をアップデートする例です。

% sudo portmaster nmap
% sudo portmaster security/nmap
% sudo portmaster /var/db/pkg/nmap-6.25_1/

複数のパッケージをアップデートする例です。

% sudo portmaster nmap amap

関連項目




スポンサーリンク