eselect/repository
eselect-repository は、Portage のための ebuild リポジトリを設定するための eselect モジュールです。ebuild リポジトリ設定ファイルは /etc/portage/repos.conf に保存されています。
さらなるオプションについては man repository.eselect を参照してください。
このユーティリティーは、代替レポジトリの列挙、設定、同期の処理について layman を置き換えるものです。Portage がネイティブに同期できないバージョン管理システム (Portage では darcs や g-sorcery など) を使用する場合など、layman が eselect-repository の機能を補完する例外もまだあります。
eselect-repository は Gentoo 開発者の Michał Górny (mgorny) によって作成され保守されています。
インストール
emerge
root #
emerge --ask app-eselect/eselect-repository
設定
初期セットアップ
モジュールが正しく動作するためには、/etc/eselect/repository.conf 内で REPOS_CONF 変数によって設定される repos.conf ファイルアまたはディレクトリが、あらかじめ存在している必要があります。Gentoo ハンドブックではディレクトリとして持つことを選んでいますが、そうしないと一部のツールが動作しないでしょう:
root #
mkdir -p /etc/portage/repos.conf
ファイル
/etc/eselect/repository.conf
# configuration for eselect-repo # (sourced by bash, so keep the values bash-compatible) # The following variables can be used below to reference paths # configured at build time: # CACHEDIR -- system cache directory (e.g. /var/cache) # SYSCONFDIR -- system configuration directory (e.g. /etc) # SHAREDSTATEDIR -- system shared state directory (e.g. /var) # Location of the repository configuration file or directory. If it is # a directory, Portage rules for subfiles are used. REPOS_CONF=${SYSCONFDIR}/portage/repos.conf # File to use for newly added repositories when REPOS_CONF is # a directory. You can use "${repository}" to refer to the name # of repository being added. REPOS_CONF_SUBFILE=${REPOS_CONF}/eselect-repo.conf # Top directory to keep newly added repositores in. New repositories # will be added with subdirectories following repository names. REPOS_BASE=${SHAREDSTATEDIR}/db/repos # Location of the remote repository list. The default is to use # the gentoo-mirror list that contains pregenerated metadata cache. REMOTE_LIST_URI=https://qa-reports.gentoo.org/output/repos/repositories.xml # Alternative: original Gentoo list. #REMOTE_LIST_URI=https://api.gentoo.org/overlays/repositories.xml # Directory to store repositories.xml cache. The file will always # be called "repositories.xml" due to technical limitations of wget. REMOTE_LIST_CACHEDIR=~/.cache/eselect-repo # Interval (in seconds) to check the remote repository list for changes. # The default is 2 hours. REMOTE_LIST_REFRESH=$(( 2 * 3600 ))
使い方
repos.gentoo.org
Gentoo では、ユーザーや開発者が、repos.gentoo.org 上でリポジトリを一般の利用のために登録できるようにしています。eselect repository はその既知のリストを取得して読み込みます。
repos.gentoo.org に登録された ebuild リポジトリを一覧表示する
eselect repository は repos.gentoo.org 上に列挙されているリポジトリをすべて表示することができます:
user $
eselect repository list
Available repositories: [1] foo [2] bar [3] baz [4] cross # [5] good * [6] my_overlay @
- インストールされ有効になっているリポジトリの前には * の文字が付きます。
- # が前につくリポジトリは、(disable/enable を通じて)同期情報を更新する必要があるか、またはユーザーによってカスタマイズされています。
- @ が前につくリポジトリは、公式の公開リストにおいて名前が列挙されていないものです。
現在設定済みのリポジトリのみを表示するには、-i
オプション引数を使用してください:
user $
eselect repository list -i
repos.gentoo.org から ebuild リポジトリを追加する
文法: enable (<name>|<index>)...
root #
eselect repository enable foo bar baz
リポジトリを追加する
Todo:
- 利用可能な sync type を列挙し説明する
文法: add <name> <sync-type> <sync-uri>
root #
eselect repository add test git https://github.com/test/test.git
ebuild リポジトリを初めて追加したときは、使用する前に同期する必要があります。
Gentoo ebuild リポジトリの内容は Gentoo 開発者によって書かたものか、Gentoo 開発者によるレビューを受けたものである一方で、GURU リポジトリは開発者の見落としを含んでいます。他の ebuild リポジトリも必ずしもそうとは限りません。ebuild リポジトリによっては、脆弱なソフトウェアやひどく壊れたソフトウェアを含んでいたり、理論上は、悪意のあるソフトウェアを含んでいるかもしれません。
内容を消去せずにリポジトリを無効化する
文法: disable [-f] (<name>|<index>)...
root #
eselect repository disable foo bar
repos.gentoo.org に登録されていないリポジトリや sync 属性のないリポジトリについては、-f
オプションが必要です。注意して使ってください。
リポジトリを無効化して内容を消去する
文法: remove [-f] (<name>|<index>)...
root #
eselect repository remove bar baz
repos.gentoo.org に登録されていないリポジトリや sync 属性のないリポジトリについては、-f
オプションが必要です。注意して使ってください。
新しい ebuild リポジトリを作成する
create サブコマンドは ebuild リポジトリのひな形を作成し、Portage に設定します:
文法: create <name> [<path>]
root #
eselect repository create <ebuild_repository_name>
Adding <ebuild_repository_name> to /etc/portage/repos.conf ... Repository <ebuild_repository_name> created and added
関連項目
- Eselect — Gentoo システムの管理と構成のためのツールです。
- Useful Portage tools — ebuild リポジトリから入手できる Gentoo 固有の、特に Portage のための、システム管理ツールのリストを提供します。
- Project:Portage/Sync