目次
この章には、メンテナが利用できるツールについて大まかな概要が含まれています。以下は完全なものでも決定版的なものでもありませんが、よく使われているツールについての説明です。
Debian メンテナツールは、開発者を手助けし、重要な作業のために時間を作れるようにしてくれるものです。Larry Wall が言うように、やり方は一つではありません (there's more than one way to do it)。
Some people prefer to use high-level package maintenance tools and some do not. Debian is officially agnostic on this issue; any tool that gets the job done is fine. Therefore, this section is not meant to stipulate to anyone which tools they should use or how they should go about their duties of maintainership. Nor is it meant to endorse any particular tool to the exclusion of a competing tool.
パッケージの説明文のほとんどは実際のパッケージの説明から取ったものです。より詳細な情報はパッケージ内のドキュメントで確認できます。apt-cache
show パッケージ名
コマンドでも情報を得られます。
以下のツールはどのメンテナであっても、必ず必要とするものです。
dpkg-dev
は、パッケージを展開、ビルド、Debian
ソースパッケージをアップロードするのに必要なツールを含んでいます (dpkg-source を含む)
。これらのユーティリティはパッケージを作成・操作するのに必要な基礎的で、低レイヤの機能を含んでいます。そのため、これらはあらゆる Debian
メンテナにとって必要不可欠なものです。
debconf
は、パッケージを対話形式で設定できる一貫したインターフェイスを提供します。これはユーザインターフェイスに依存せず、エンドユーザがテキストのみのインターフェイス、HTML
インターフェイス、ダイアログ形式のインターフェイスでパッケージを設定できます。新たなインターフェイスはモジュールとして追加できます。
このパッケージに関するドキュメントは debconf-doc
パッケージ中で確認できます。
Many feel that this system should be used for all packages that require
interactive configuration; see 「debconf
による設定管理」.
debconf
is not currently required by
Debian Policy, but that may change in the future.
According to the Free On-line Dictionary of Computing (FOLDOC), `lint' is: "A Unix C language processor which carries out more thorough checks on the code than is usual with C compilers." Package lint tools help package maintainers by automatically finding common problems and policy violations in their packages.
lintian
は Debian
パッケージを解剖してバグやポリシー違反の情報を出力します。一般的なエラーへのチェック同様にDebian
ポリシーの多くの部分を自動チェックする機能を含んでいます。
定期的に最新の lintian
を
unstable
から取得し、パッケージを全てチェックするべきです。-i
オプションは、各エラーや警告が何を意味しているのか、ポリシーを元に、詳細な説明を提供してくれ、一般的に問題をどのように修正するべきかを説明してくれることに留意してください。
何時、どのようにして Lintian を使うのか、詳細については 「パッケージをテストする」 を参照してください。
あなたのパッケージに対して Lintian によって報告されたの問題の要約はすべて https://lintian.debian.org/ から確認することもできます。このレポートは、最新の
lintian による開発版ディストリビューション (unstable
)
全体についての出力を含んでいます。
(devscripts
パッケージ、「devscripts
」 より) debdiff は二つのパッケージのファイルのリストと
control ファイルを比較します。前回のアップロードからバイナリパッケージ数が変わったことや、control
ファイル内で何が変わったのかなどに気付く手助けをしてくれるなど、簡単なリグレッションテストとなります。もちろん、報告される変更の多くは問題ありませんが、様々なアクシデントを防止するのに役立ってくれるでしょう。
バイナリパッケージのペアに対して実行することができます:
debdiff package_1-1_arch.deb package_2-1_arch.deb
changes ファイルのペアに対してさえも実行できます:
debdiff package_1-1_arch.changes package_2-1_arch.changes
より詳細については、debdiff(1)を参照してください。
パッケージ構築ツールは debian/rules
ファイルを書く作業を楽にしてくれます。これらが望ましい、あるいは望ましくない理由の詳細については 「ヘルパースクリプト」 を参照してください。
debhelper
is a collection of
programs that can be used in debian/rules
to automate
common tasks related to building binary Debian packages. debhelper
includes programs to install various
files into your package, compress files, fix file permissions, and integrate
your package with the Debian menu system.
Unlike some approaches, debhelper
is
broken into several small, simple commands, which act in a consistent
manner. As such, it allows more fine-grained control than some of the other
debian/rules tools.
ここに記すには一時的な、大量の小さな debhelper
のアドオンパッケージがあります。apt-cache search ^dh-
と実行することで一覧の多くを参照できます。
When choosing a debhelper
compatibility level for your package, you should choose the highest
compatibility level that is supported in the most recent stable release.
Only use a higher compatibility level if you need specific features that are
provided by that compatibility level that are not available in earlier
levels.
In the past the compatibility level was defined in
debian/compat
, however nowadays it is much better to
not use that but rather to use a versioned build-dependency like
debhelper-compat (=12)
.
The dh-make
package contains
dh_make, a program that creates a skeleton of files
necessary to build a Debian package out of a source tree. As the name
suggests, dh_make is a rewrite of debmake
, and its template files use
dh_* programs from debhelper
.
dh_make によって生成された rules ファイルは、大抵の場合作業するパッケージに対して十分な基礎にはなりますが、まだこれは下地でしかありません。メンテナに残っている責務は、生成されたファイルをきれいに整理して、完全に動作してポリシーに準拠したパッケージにすることです。
The following packages help with the package building process, general driving of dpkg-buildpackage, as well as handling supporting tasks.
git-buildpackage
は、Debian ソースパッケージを
Git リポジトリに挿入あるいはインポートし、Debian パッケージを Git
リポジトリから生成、そして開発元での変更をリポジトリに統合するのに役立つ機能を提供します。
これらのユーティリティは、Debian メンテナによる Git
の利用を促進するインフラストラクチャを提供します。これは、バージョンコントロールシステムの他の利点と同様に、stable
、unstable
、おそらく
experimental
ディストリビューション用にパッケージに個々の Git ブランチを持つことができます。
debootstrap
パッケージとスクリプトは、システムのどこででも
Debian
ベースシステムをブートストラップできるようにしてくれます。ベースシステムとは、操作するのに必要となる素の最小限パッケージ群を意味し、それに加えてシステムの残りの部分をインストールします。
この様なシステムを持つことは、様々な面で役に立つでしょう。例えば、ビルドの依存関係をテストしたい場合に chroot でそのシステムの中に入ることができます。あるいは素のベースシステムにインストールした際にパッケージがどのように振る舞うかをテストできます。chroot 作成ツールはこのパッケージを使います。以下を参照ください。
pbuilder
constructs a chrooted
system, and builds a package inside the chroot. It is very useful to check
that a package's build dependencies are correct, and to be sure that
unnecessary and wrong build dependencies will not exist in the resulting
package.
A related package is cowbuilder
,
which speeds up the build process using a COW filesystem on any standard
Linux filesystem.
sbuild
はもう一つの自動ビルドシステムです。同様に chroot
された環境を使うことが出来ます。単独で使うことも、分散ビルド環境のネットワークの一部として使うこともできます。文字通り、移植者たちによって利用可能な全アーキテクチャのバイナリパッケージをビルドするのに使われているシステムの一部です。詳細については「wanna-build
」 を参照してください。それからシステムの動作については https://buildd.debian.org/ を参照してください。
以下のパッケージはパッケージを公式アーカイブにアップロードする作業を自動化、あるいは単純化してくれるのに役立ちます。
dupload
は、自動的に Debian パッケージを Debian
アーカイブにアップロードし、アップロードを記録し、パッケージのアップロードについてのメールを送信してくれるパッケージであり、スクリプトです。新しいアップロード先や方法を設定することもできます。
The dput
package and script do much
the same thing as dupload
, but in a
different way. It has some features over dupload
, such as the ability to check the GnuPG
signature and checksums before uploading, and the possibility of running
dinstall in dry-run mode after the upload.
dcut スクリプト (dput
パッケージの一部、「dput
」 参照)は、ftp アップロードディレクトリからファイルを削除するのに役立ちます。
以下のツールは changelog のエントリや署名行の追加、Emacs 内でのバグの参照から最新かつ公式の
config.sub
を使うようにするまで、様々なメンテナンス作業を自動化するのに役立ちます。
devscripts
is a package containing
wrappers and tools that are very helpful for maintaining your Debian
packages. Example scripts include debchange (or its
alias, dch), which manipulates your
debian/changelog
file from the command-line, and
debuild, which is a wrapper around
dpkg-buildpackage. The bts utility is
also very helpful to update the state of bug reports on the command line.
uscan can be used to watch for new upstream versions of
your packages.
利用可能なスクリプトの全リストについては devscripts(1) マニュアルページを参照してください。
autotools-dev
contains best
practices for people who maintain packages that use
autoconf and/or automake. Also
contains canonical config.sub
and
config.guess
files, which are known to work on all
Debian ports.
dpkg-repack creates a Debian package file out of a
package that has already been installed. If any changes have been made to
the package while it was unpacked (e.g., files in /etc
were modified), the new package will inherit the changes.
This utility can make it easy to copy packages from one computer to another, or to recreate packages that are installed on your system but no longer available elsewhere, or to save the current state of a package before you upgrade it.
alien は、Debian、RPM (RedHat)、LSB (Linux Standard Base)、Solaris、Slackware などの各種バイナリパッケージのパッケージ形式を変換します。
dpkg-dev-el
is an Emacs lisp package
that provides assistance when editing some of the files in the
debian
directory of your package. For instance, there
are handy functions for listing a package's current bugs, and for finalizing
the latest entry in a debian/changelog
file.
(devscripts
パッケージ、「devscripts
」 より) dpkg-depcheck
は、指定されたコマンドによって使われた全てのパッケージを確認するため、コマンドを strace の下で実行します。
Debian パッケージについていうと、これは新しいパッケージの Build-Depends
行を構成するのが必要になった際に役立ちます。dpkg-depcheck
を通してビルド作業を実行すると、最初の大まかなビルドの依存関係を良い形で得られます。例えば以下の様にします:
dpkg-depcheck -b debian/rules build
dpkg-depcheck は、特にパッケージが他のプログラムを実行するのに exec(2) を使っている場合に実行時の依存性を確認するのにも使えます。
より詳細については、dpkg-depcheck(1) を参照してください。
以下のツールが、移植作業者やクロスコンパイル作業に役立ちます。
以下のパッケージが、メンテナへの情報提供やドキュメントの作成に役立ちます。
docbook-xml
は Debian
のドキュメントで一般的に使われている DocBook XML DTD を提供します (古いものは debiandoc SGML DTD を使っています)
。例えば、このマニュアルは DocBook XML で書かれています。
docbook-xsl
パッケージは、ソースをビルドして様々な出力フォーマットに整形する XSL ファイルを提供します。XSL スタイルシートを使うには xsltproc
のような XSLT
プロセッサが必要になります。スタイルシートのドキュメントは各種 docbook-xsl-doc-*
パッケージで確認できます。
FO から PDF を生成するには、xmlroff
や
fop
のような FO プロセッサが必要です。他に DocBook
XML から PDF を生成するツールとしては dblatex
があります。
debiandoc-sgml
は Debian
のドキュメントで一般的に使われている DebianDoc SGML DTD を提供します。しかし、現在は非推奨 (deprecated) となっています
(代わりにdocbook-xml
を使うようにしてください)。これも、ソースをビルドして様々な出力フォーマットに整形するスクリプトを提供します。
ドキュメント用の DTD は debiandoc-sgml-doc
パッケージで確認できます。
Debian 開発者および Debian メンテナの公開 GPG 鍵を含んでいます。詳細については 「公開鍵をメンテナンスする」 とパッケージ内のドキュメントを参照してください。