eselect

From Gentoo Wiki
Jump to:navigation Jump to:search
This page is a translated version of the page Eselect and the translation is 100% complete.
Other languages:

eselect は Gentoo システムの管理と構成のためのツールです。システムの挙動を変更するものであり、システム管理者によって注意深く使用されるべきです。eselect は構成ユーティリティを書くためのモジュール化されたフレームワークであり、以下の要素から成ります:

  • eselect という名前のメインのプログラム (app-admin/eselect で見つかります)
  • それぞれのタスクを実施する、様々なモジュール (*.eselect ファイル)
  • 一貫した挙動を確保するのを助け、新しいモジュールを簡単に作成できるようにする、複数のライブラリ


モジュールは複数のアクションを提供します。典型的なアクションは、何らかの情報を表示したり (listshow アクションがよく使われます)、システムを何らかのかたちで更新したり (例えば、setupdate) します。各モジュールはまた、モジュールの使い方を説明する helpusage アクションも提供します。

現在インストールされているすべてのモジュールを一覧表示するには、eselect を引数なしで実行してください。eselect ユーザガイドも参照してください。

インストール

app-admin/eselect パッケージは system 集合の一部なので、デプロイされた Gentoo Linux にはすでに eselect がインストールされているはずです。

USE フラグ

USE flags for app-admin/eselect Gentoo's multi-purpose configuration and management tool

doc Add extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally
emacs Add support for GNU Emacs
vim-syntax Pulls in related vim syntax scripts

Emerge

USE フラグを変更したら

eselect パッケージのみに対する USE フラグを変更したら、新しいフラグが適用されるように eselect を再ビルドしてください。eselect は system 集合に含まれているので、world ファイルに追加しないように、--oneshot を使用するべきです:

root #emerge --ask --changed-use --oneshot app-admin/eselect

make.conf 内で eselect に影響するグローバルな USE フラグを変更した後は、新しい USE フラグにアップデートするように world を emerge してください:

root #emerge --ask --verbose --update --deep --newuse @world

モジュール

eselect モジュールは他のパッケージとまったく同じようにインストールできます。例えば、app-eselect/eselect-repository モジュールの場合は:

root #emerge --ask --verbose app-eselect/eselect-repository

一部のモジュールは、それらに依存するパッケージをインストールするときにいっしょにインストールされるでしょう。

インストールされている追加モジュールを見つけるための情報については、モジュールの節を参照してください。

呼び出し

単に eselecteselect help を実行することで、使い方の情報と、インストールされているモジュールとその機能の一覧が表示されるでしょう:

root #eselect help
Usage: eselect <global options> <module name> <module options>

Global options:
  --brief                   Make output shorter
  --colour=<yes|no|auto>    Enable or disable colour output (default 'auto')

Built-in modules:
  help                      Display a help message
  usage                     Display a usage message
  version                   Display version information

Extra modules:
  arptables                 Manage the iptables/arptables/ebtables symlinks
  binutils                  Manage installed versions of sys-devel/binutils
  cdparanoia                Manage /usr/bin/cdparanoia implementation
  ctags                     Manage /usr/bin/ctags implementations
  ebtables                  Manage the iptables/arptables/ebtables symlinks
  editor                    Manage the EDITOR environment variable
  emacs                     Manage /usr/bin/emacs version
  env                       Manage environment variables set in /etc/env.d/
  etags                     Manage /usr/bin/etags implementations
  fontconfig                Manage fontconfig /etc/fonts/conf.d/ symlinks
  gcc                       Manage installed versions of sys-devel/gcc
  gnuclient                 Manage /usr/bin/gnuclient implementations
  iptables                  Manage the iptables/arptables/ebtables symlinks
  kernel                    Manage the /usr/src/linux symlink
  locale                    Manage the LANG environment variable
  lua                       Manage lua symlinks
  modules                   Query eselect modules
  mpg123                    Manage /usr/bin/mpg123 implementation
  news                      Read Gentoo ("GLEP 42") news items
  notify-send               Manage /usr/bin/notify-send implementation
  pager                     Manage the PAGER environment variable
  pinentry                  Manage /usr/bin/pinentry implementation
  postgresql                Manage active PostgreSQL client applications and libraries
  profile                   Manage the make.profile symlink
  rc                        Manage /etc/init.d scripts in runlevels
  repository                Manage repository list in repos.conf
  rust                      Manage the Rust compiler versions
  sh                        Manage /bin/sh (POSIX shell) implementations
  vi                        Manage /usr/bin/vi implementations
  visual                    Manage the VISUAL environment variable
  wxwidgets                 Manage the system default wxWidgets profile

モジュール

Gentoo では、様々なシステム設定タスクを自動化するために、数十の eselect モジュールが利用可能です。インストールされている vi エディタパッケージのうちどれを使用するか、どの emacs ディストリビューションをデフォルトにするか、どのシェルをログインのために使用するか……など、複数のモジュールが、選択可能なサブシステムの中からの選択を可能にしています。

eselect と一緒にデフォルトで付いてくるモジュールもあれば、Gentoo リポジトリからインストールできるモジュールもあります。

現在インストールされているすべてのモジュールを一覧表示するには、eselect を引数無しで実行してください。

デフォルトモジュール

これらのモジュールは eselect プロジェクトの一部として保守されているので、app-admin/eselect パッケージがインストールされている限り、利用可能なはずです。

arptables、iptables、および ebtables

iptables/arptables/ebtables シンボリックリンクを管理します。sys-apps/iproute2system 集合の一部なので、これらのモジュールを提供するために app-eselect/eselect-iptables が依存関係グラフによってインストールされていることが多いでしょう。

user $eselect arptables help
Manage the iptables/arptables/ebtables symlinks
Usage: eselect arptables <action> <options>

Standard actions:
  help                      Display help text
  usage                     Display usage information
  version                   Display version information

Extra actions:
  list                      List available arptables symlink targets
  set                       Set a new arptables symlink target
    target                    Target name or number (from 'list' action)
  show                      Show the current arptables symlink
  unset                     Unset arptables symlink targets

binutils

インストールされている sys-devel/binutils のバージョンを管理します。このモジュールは app-admin/eselect パッケージの一部としては提供されておらず、sys-devel/binutils の依存である sys-devel/binutils-config によって提供されています。sys-devel/binutilssystem 集合 の一部なので、eselect binutils はすべての Gentoo システム上で利用可能なはずです。

user $eselect binutils help
Manage installed versions of sys-devel/binutils
Usage: eselect binutils <action> <options>

Standard actions:
  help                      Display help text
  usage                     Display usage information
  version                   Display version information

Extra actions:
  list                      List all installed version of binutils
  set <target>              Activate one of the installed binutils
    target                    Target name or number (from 'list' action)
  show                      Print the currently active binutils version

editor

EDITOR 環境変数を管理します。この変数によって、多くの CLI プログラムがテキストファイルを編集するために実行するコマンドが決定されます。

visual モジュールの節も参照してください。

user $eselect editor help
Manage the EDITOR environment variable

Usage: eselect editor <action> <options>

Standard actions:

 help                      Display help text
 usage                     Display usage information
 version                   Display version information

Extra actions:

 list                      List available targets for the EDITOR variable
 set <target>              Set the EDITOR variable in profile
   target                    Target name or number (from 'list' action)
 show                      Show value of the EDITOR variable in profile
 update                    Update the EDITOR variable if it is unset or invalid
関連
setting default text editor も参照してください。

env

/etc/env.d で設定される環境変数を管理します。

user $eselect env help
Manage environment variables set in /etc/env.d/
Usage: eselect env <action> <options>

Standard actions:
  help                      Display help text
  usage                     Display usage information
  version                   Display version information

Extra actions:
  update <noldconfig>       Collect environment variables from all scripts in /etc/env.d/
    noldconfig                Do not alter the ld.so cache or configuration.

gcc

インストールされている sys-devel/gcc のバージョンを管理します。sys-devel/gccsystem 集合の一部なので、sys-devel/gcc-config が依存関係としてインストールされ、このモジュールを提供するでしょう。

user $eselect gcc help
Manage installed versions of sys-devel/gcc
Usage: eselect gcc <action> <options>

Standard actions:
  help                      Display help text
  usage                     Display usage information
  version                   Display version information

Extra actions:
  list                      List all installed version of gcc
  set <target>              Activate one of the installed gcc
    target                    Target name or number (from 'list' action)
  show                      Print the currently active gcc version

GCC のアップグレードも参照してください。

kernel

/usr/src/linux シンボリックリンクは現在実行中のカーネルを指すべきです。eselect を使ってこの管理を行うことができます。

user $eselect kernel help
Manage the /usr/src/linux symlink
Usage: eselect kernel <action> <options>

Standard actions:
  help                      Display help text
  usage                     Display usage information
  version                   Display version information

Extra actions:
  list                      List available kernel symlink targets
  set <target>              Set a new kernel symlink target
    target                    Target name or number (from 'list' action)
  show                      Show the current kernel symlink

eselect でカーネルリンクを設定するの節を参照してください。

locale

LANG 環境変数を管理します。この変数は、ユーザのためのシステムの言語と、日時のフォーマットなどを設定します。

user $eselect locale help
Manage the LANG environment variable
Usage: eselect locale <action> <options>

Standard actions:
  help                      Display help text
  usage                     Display usage information
  version                   Display version information

Extra actions:
  list                      List available targets for the LANG variable
  set <target>              Set the LANG variable in profile
    target                    Target name or number (from 'list' action)
  show                      Show value of the LANG variable in profile

ハンドブックローカライゼーションガイドおよびUTF-8 の記事も参照してください。

modules

eselect モジュールを問い合わせます。

user $eselect modules help
Query eselect modules
Usage: eselect modules <action> <options>

Standard actions:
  help                      Display help text
  usage                     Display usage information
  version                   Display version information

Extra actions:
  has <module>              Return true if the module is installed, and false otherwise
  list                      List all available modules
    --only-names              Output names of modules only

news

Gentoo ("GLEP 42") ニュース項目を確認します。Gentoo ebuild リポジトリの同期後にニュース項目が表示された場合は、 それらを読んで内容に従うことが重要です

user $eselect news help
Read Gentoo ("GLEP 42") news items
Usage: eselect news <action> <options>

Standard actions:
  help                      Display help text
  usage                     Display usage information
  version                   Display version information

Extra actions:
  count                     Display number of news items
    new                       Count unread news items (default)
    all                       Count all news items
  list                      List news items
  purge                     Purge read news
  read <item>...            Read news items
    --mbox                    Output in mbox format
    --quiet                   Suppress output, only change status
    --raw                     Output in raw format
    new                       Read unread news items (default)
    all                       Read all news items
    item                      Item name or number (from 'list' action)
  unread <item>...          Mark read news items as unread again
    all                       Mark all news items as unread
    item                      Item name or number (from 'list' action)

pager

PAGER 環境変数を管理します。これは、ユーザに複数ページにわたるテキストを表示するために、どのプログラムが使用されるかに影響するでしょう。

user $eselect pager help
Manage the PAGER environment variable
Usage: eselect pager <action> <options>

Standard actions:
  help                      Display help text
  usage                     Display usage information
  version                   Display version information

Extra actions:
  list                      List available targets for the PAGER variable
  set <target>              Set the PAGER variable in profile
    target                    Target name or number (from 'list' action)
  show                      Show value of the PAGER variable in profile
  update                    Update the PAGER variable if it is unset or invalid

profile

make.profile シンボリックリンクを管理します。これは Portage にとって、そしてシステム全体にとって重要な設定です。

user $eselect profile help
Manage the make.profile symlink
Usage: eselect profile <action> <options>

Standard actions:
  help                      Display help text
  usage                     Display usage information
  version                   Display version information

Extra actions:
  list                      List available profile symlink targets
  set <target>              Set a new profile symlink target
    target                    Target name or number (from 'list' action)
    --force                   Forcibly set the symlink
  show                      Show the current make.profile symlink

ハンドブックと、プロファイルに関する記事を参照してください。

rc

OpenRC スクリプトを管理します。

user $eselect rc help
Manage /etc/init.d scripts in runlevels
Usage: eselect rc <action> <options>

Standard actions:
  help                      Display help text
  usage                     Display usage information
  version                   Display version information

Extra actions:
  add <script> <runlevels>  Add script to existing runlevel(s)
    script                    Init script (from 'list' action)
    runlevels                 Runlevels to add to (defaults to 'default')
  delete <script> <runlevels>
                            Delete script from existing runlevel(s)
    script                    Init script (from 'list' action)
    runlevels                 Runlevels to delete from (defaults to 'default')
  list <runlevel>           List all available init scripts
    runlevel                  Runlevel to list (defaults to all)
  pause <scripts>           Pauses given set of init scripts manually
    scripts                   Init scripts to pause
  reload <scripts>          Reload given set of init scripts
    scripts                   Init scripts to reload
  restart <scripts>         Restart given set of init scripts
    scripts                   Init scripts to restart
  show <runlevels>          Show init script status
    runlevels                 Runlevels to list (defaults to current runlevel)
    --all                     List all runlevels
    --unused                  Show scripts not assigned to any runlevel
  start <scripts>           Start given set of init scripts manually
    scripts                   Init scripts to start
  stop <scripts>            Stop given set of init scripts manually
    scripts                   Init scripts to stop

visual

VISUAL 環境変数を管理し、テキストエディタを実行できるターミナルのために、デフォルトのテキストエディタを設定します。

editor モジュールの節も参照してください。

user $eselect visual help
Manage the VISUAL environment variable
Usage: eselect visual <action> <options>

Standard actions:
  help                      Display help text
  usage                     Display usage information
  version                   Display version information

Extra actions:
  list                      List available targets for the VISUAL variable
  set <target>              Set the VISUAL variable in profile
    target                    Target name or number (from 'list' action)
  show                      Show value of the VISUAL variable in profile
  update                    Update the VISUAL variable if it is unset or invalid
関連
テキストエディタの記事を参照してください。

追加のモジュール

以下は、Gentoo リポジトリからインストールでき、wiki で文書化されているモジュールの一部です:

  • eselect bashcomp - 特定の補完を有効化または無効化します。
  • eselect blas / eselect lapack - BLAS/LAPACK 切り換え: 数値線形代数ライブラリ。
  • eselect emacs - /usr/bin/emacs と、その補助プログラムを、使用したい Emacs バージョンに属するものにリンクします。
  • eselect fontconfig - /etc/fonts/conf.avail/ 内のファイルへのシンボリックリンクを管理します。
  • eselect gnome-shell-extensions - Gnome shell 拡張機能をがシステム全体にインストールされたかどうかを制御する、システムデフォルトを管理します。
  • eselect java-vm - デフォルトの Java VM を設定します。
  • eselect php cli - どの CLI PHP バージョンをデフォルトで使用するかを選択します。
  • eselect php apache2 - Apache がどの PHP のバージョンを使用するかを変更します。
  • eselect pinentry - pinentry ウィンドウを選択します。
  • eselect python - 望ましい/アクティブな Python インタプリタを設定します。
  • eselect repositoryPortage のための ebuild リポジトリを設定するための eselect モジュール
  • eselect ruby - 選択されている Ruby スロットを変更します。
  • eselect vi - /usr/bin/vi シンボリックリンクを管理します。

関連項目