「portmaster」の版間の差分
提供: セキュリティ
(ページの作成:「<!-- vim: filetype=mediawiki --> portmaster は、 portsパッケージを管理するツールです。 読み方 ぽーとますたー __TOC__ == 概要 ==...」) |
|||
| (同じ利用者による、間の1版が非表示) | |||
| 行5: | 行5: | ||
読み方 | 読み方 | ||
| − | ぽーとますたー | + | ;[[portmaster]]:ぽーとますたー |
__TOC__ | __TOC__ | ||
| 行22: | 行22: | ||
== 使い方 == | == 使い方 == | ||
| − | nmap をインストールする例です。 | + | === オプション === |
| + | |||
| + | <syntaxhighlight lang="bash"> | ||
| + | % 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 | ||
| + | |||
| + | </syntaxhighlight> | ||
| + | |||
| + | === ソフトウェアをインストールする === | ||
| + | |||
| + | [[nmap]] をインストールする例です。 | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
% whereis -q -s nmap | % whereis -q -s nmap | ||
/usr/ports/security/nmap | /usr/ports/security/nmap | ||
| − | % sudo portmaster -y -d | + | % sudo portmaster -y -d /usr/ports/security/nmap |
</syntaxhighlight> | </syntaxhighlight> | ||
| + | |||
| + | === すべてのソフトウェアをアップデートする === | ||
アップデートが必要なすべての[[ports]]をアップデートします。 | アップデートが必要なすべての[[ports]]をアップデートします。 | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
% sudo portmaster -a | % sudo portmaster -a | ||
| + | </syntaxhighlight> | ||
| + | |||
| + | アップデートが必要なすべての[[ports]]をアップデートし、アップデート後に、古い distfile を削除します。 | ||
| + | <syntaxhighlight lang="bash"> | ||
| + | % sudo portmaster -aD | ||
| + | % sudo portmaster --clean-distfiles | ||
| + | </syntaxhighlight> | ||
| + | |||
| + | === ソフトウェアをアップデートする === | ||
| + | |||
| + | [[nmap]] をアップデートする例です。 | ||
| + | <syntaxhighlight lang="bash"> | ||
| + | % sudo portmaster nmap | ||
| + | % sudo portmaster security/nmap | ||
| + | % sudo portmaster /var/db/pkg/nmap-6.25_1/ | ||
| + | </syntaxhighlight> | ||
| + | |||
| + | 複数のパッケージをアップデートする例です。 | ||
| + | |||
| + | <syntaxhighlight lang="bash"> | ||
| + | % sudo portmaster nmap amap | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| 行39: | 行202: | ||
* [[ports]] | * [[ports]] | ||
* [[pkg]] | * [[pkg]] | ||
| + | * [[portsnap]] | ||
2013年4月26日 (金) 01:09時点における最新版
portmaster は、 portsパッケージを管理するツールです。
読み方
- portmaster
- ぽーとますたー
目次
概要
portmasterは、外部データベースや言語なしに、portsを管理するツールです。
インストール
% 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