Ubuntu Manpages

書式

control

説明

Debian の各ソースパッケージには、マスタとなる "control" ファイルがある。ファイルには、空白行で区切られた最低 2 つの段落が含まれる。最初の段落には、通常ソースパッケージに関するすべての情報が列挙されている。以降の段落は、各々が 1 つのバイナリパッケージに関する設定となる。各段落は、最低 1 つのフィールドからなる。フィールドは Package やSection (大文字小文字の区別なし) といったフィールド名から始まり、コロンの後にフィールドの本体 (値) が続き、改行で終わる。フィールドは複数行にまたがっても構わないが、フィールド名を含まない追加の行は、最低 1 つのスペースから始まる必要がある。通常、複数行にまたがるフィールドの本体は、ツールによって 1行にまとめられる (ただし、以下で説明する Description フィールドは例外である)。空行を追加したい場合は、スペースに続けてドットを 1 つだけ記述する。'#' で始まる行はコメントとして扱われる。

このフィールドの値がソースパッケージ名となる。これは debian/changelog ファイル内のソースパッケージ名と合致させるべきである。パッケージ名には、小文字(a-z)、数字 (0-9)、プラス (+)、マイナス (-) 記号とピリオド (.) のみを含めることができる。パッケージ名は最低 2 文字以上の長さとし、英数字で始めなければならない。

`Joe Bloggs <jbloggs@foo.com>' 形式で設定すること。パッケージ化されたソフトウェアの開発者や元々のパッケージ作成者ではなく、*このパッケージ* の現在のメンテナの情報を記載する。

パッケージの共同メンテナの名前と電子メールアドレスを Maintainer フィールドと同じ形式で列挙する。共同メンテナが複数人いる場合はコンマで区切ること。

このパッケージが準拠した標準 (debian-policy パッケージに含まれる Debian Policy Manual と関連ドキュメントから構成される) の最新バージョンを示す。

アップストリームのプロジェクトのホームページ URL。

パッケージのバグトラッキングシステムの url。現在使われている形式は、debbugs://bugs.debian.org のような bts-type://bts_address 形式である。このフィールドは一般的に必要とされない。

このパッケージの管理に用いられているバージョン管理システムのリポジトリ url。現在サポートされているのは、Arch, Bzr (Bazaar), Cvs, Darcs, Git, Hg(Mercurial), Mtn (Monotone), Svn (Subversion) である。通常、このフィールドは、main ブランチや trunk といった最新版のパッケージを示している。

バージョン管理システムのリポジトリを閲覧するための Web インタフェースの url

パッケージの起源となったディストリビューション名。このフィールドは、通常不要である。

パッケージによりインストールされるソフトウェアがどのセクションの分類に属するかを示すフィールドである。一般的なセクションには "utils" や "net"、"mail"、"text"、"x11" などがある。

システム全体からみたこのパッケージの重要度を示す。一般的に使われる priority には "required"、"standard"、"optional"、"extra" などがある。

Debian では、SectionPriority フィールドで使える値がポリシーマニュアルで定められている。最新の debian-policy パッケージから一覧を取得できる。

ソースパッケージをビルドするためにインストールと設定が必要なパッケージのリスト。このリストで定義した依存関係は、Build-Depends-ArchBuild-Depends-Indep の両方で行った定義と同じ効力を持つだけでなく、ソースのみのビルドにおいても効力を持つ。

Same as Build-Depends, but they are only needed when building the architecture dependent packages. The Build-Depends are also installed in this case. This field is supported since dpkg 1.16.4; in order to build with older dpkg versions, Build-Depends should be used instead.

Build-Depends と同様だが、アーキテクチャ非依存なパッケージをビルドする場合にのみ必要とされるもの。Build-Depends もインストールされる。

ビルドシステムの動作に影響するなど、パッケージがビルドされる時にインストールされていることが好ましくないパッケージのリスト。このリストで定義した依存関係は、Build-Conflicts-ArchBuild-Conflicts-Indep の両方で行った定義と同じ効力を持つだけでなく、ソースのみのビルドにおいても効力を持つ。

Same as Build-Conflicts, but only when building the architecture dependent packages. This field is supported since dpkg 1.16.4; in order to build with older dpkg versions, Build-Conflicts should be used instead.

Build-Conflicts と同様だが、アーキテクチャ非依存なパッケージをビルドする場合にのみ影響するもの。

The syntax of the Build-Depends, Build-Depends-Arch and Build-Depends-Indep fields is a list of groups of alternative packages. Each group is a list of packages separated by vertical bar (or "pipe") symbols, "|". The groups are separated by commas. Commas are to be read as "AND", and pipes as "OR", with pipes binding more tightly. Each package name is optionally followed by a version number specification in parentheses, an architecture specification in square brackets, and a profile specification in angle brackets.

The syntax of the Build-Conflicts, Build-Conflicts-Arch and Build-Conflicts-Indep fields is a list of comma-separated package names, where the comma is read as an "AND". Specifying alternative packages using a "pipe" is not supported. Each package name is optionally followed by a version number specification in parentheses, an architecture specification in square brackets, and a profile specification in angle brackets.

バージョン番号が ">>" で始まる場合は、それより新しいバージョンすべてにマッチする。バージョン番号には、(ハイフンに続けて) Debian パッケージリビジョンを指定することもできるが、省略しても構わない。「より新しい」を意味する ">>"、「より古い」を意味する "<<"、「同じか新しい」を意味する ">="、「同じか古い」を意味する "<="、「同じ」を意味する "=" を使用できる。

An architecture specification consists of one or more architecture names, separated by whitespace. Exclamation marks may be prepended to each of the names, meaning "NOT".

A profile specification consists of one or more profile names, prefixed with the "profile." namespace, separated by whitespace. Exclamation marks may be prepended to each of the names, meaning "NOT".

build-essential に含まれるパッケージとの依存関係は省略できること、これらのパッケージと競合するようなビルド設定は禁止されている点に留意すること。該当するパッケージの一覧は、build-essential パッケージに含まれている。

Priority, Section, Homepage フィールドは、BINARY 段落に設定することで、ソースパッケージで定義されたグローバルな値を上書きすることも可能である点に留意すること。

このフィールドはバイナリパッケージ名の指定に用いられる。ソースパッケージ名と同様の制約が適用される。

アーキテクチャ (Architecture) は、このパッケージが動作するハードウェア種別を指定する。すべてのアーキテクチャで動作するパッケージは、値 any を使用する。シェルスクリプトや Perl スクリプト、ドキュメントといったアーキテクチャ非依存のパッケージは、値 all を使用する。パッケージのアーキテクチャを制約したい場合は、アーキテクチャ名をスペースで区切って指定する。アーキテクチャのワイルドカードを使用することも可能である (詳細は dpkg-architecture(1) を参照のこと)。

このフィールドは、パッケージのタイプを指定する。"udeb" は debian installer が使用するサイズの制約があるパッケージである。"deb" はデフォルトの値であり、フィールドが存在しなかった場合に仮定される値である。将来的にはこれ以外のタイプが追加されるかもしれない。

これらのフィールドは、debian-installer によって用いられるもので、通常は不要である。詳細については、debian-installer パッケージに含まれている/usr/share/doc/debian-installer/devel/modules.txt を参照のこと

これらのフィールドは、バイナリパッケージの control ファイルにそのままコピーされるため、deb-control(5) のマニュアルページで解説されている。

これらのフィールドは、パッケージ間の関連性を指定するものであり、deb-control(5) マニュアルページと debian-policy パッケージで説明されている。

ユーザ定義フィールド

control ファイルに、ユーザが定義する追加のフィールドを含めることもできる。ツール類は、これらのフィールドを無視する。フィールドをバイナリパッケージなどの出力ファイルにもコピーしたい場合は、X に続き、文字 BCS から 1 文字以上とハイフンとをつなげた custom naming scheme を使用する必要がある。文字 B を使用する場合、フィールドはバイナリパッケージの control ファイルに複製される。deb-control(5) も参照のこと。文字 S の場合は dpkg-source(1) によって作成されるソースパッケージ内の control ファイルに、文字 C の場合はアップロードの制御ファイル (.changes ファイル) に、各々複製される。フィールドが出力ファイルにコピーされる時に、X[BCS]- というプレフィックスは削除されることに注意。例えば XC-Approved-By というフィールドは changes ファイルでは Approved-Byとなり、バイナリやソースパッケージ内 の control ファイルには複製されない点に留意すること。

こうしたユーザ定義のフィールドはグローバルな名前空間を使用するため、将来的に公式に定義されたフィールドと衝突する可能性がある点に注意。このような潜在的な可能性を避けるために、これらのフィールドを XB-Private-New-Field のように Private- から開始するとよい。これには、dpkg-deb がこれらを不明なフィールドとして警告しなくなるという副次的効果もある。

# Comment
Source: dpkg
Section: admin
Priority: required
Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
# this field is copied to the binary and source packages
XBS-Upstream-Release-Status: stable
Homepage: https://wiki.debian.org/Teams/Dpkg
Vcs-Browser: http://git.debian.org/?p=dpkg/dpkg.git
Vcs-Git: git://git.debian.org/git/dpkg/dpkg.git
Standards-Version: 3.7.3
Build-Depends: pkg-config, debhelper (>= 4.1.81),
 libselinux1-dev (>= 1.28-4) [!linux-any]
Package: dpkg-dev
Section: utils
Priority: optional
Architecture: all
# this is a custom field in the binary package
XB-Mentoring-Contact: Raphael Hertzog <hertzog@debian.org>
Depends: dpkg (>= 1.14.6), perl5, perl-modules, cpio (>= 2.4.2-2),
 bzip2, lzma, patch (>= 2.2-1), make, binutils, libtimedate-perl
Recommends: gcc | c-compiler, build-essential
Suggests: gnupg, debian-keyring
Conflicts: dpkg-cross (<< 2.0.0), devscripts (<< 2.10.26)
Replaces: manpages-pl (<= 20051117-1)
Description: Debian package development tools
 This package provides the development tools (including dpkg-source)
 required to unpack, build and upload Debian source packages.
 .
 Most Debian source packages will require additional tools to build;
 for example, most packages need make and the C compiler gcc.

関連項目

deb-control(5), deb-version(5), dpkg-source(1)

翻訳者

高橋 基信 <monyo@monyo.com>. 喜瀬 浩 <kise@fuyuneko.jp>. 関戸 幸一 <sekido@mbox.kyoto-inet.or.jp>. 鍋谷 栄展 <nabe@debian.or.jp>. 倉澤 望 <nabetaro@debian.or.jp>. 石川 睦 <ishikawa@linux.or.jp>. 鵜飼 文敏 <ukai@debian.or.jp>. 中野 武雄 <nakano@apm.seikei.ac.jp>.

翻訳校正

Debian JP Documentation ML <debian-doc@debian.or.jp>.