かねこです。題記。全文を添付。メールに 3.8.0.1 からの diff をつけます。
なお、過去の経緯で EUC-JP になっています。どっかの時点で
UTF-8 化する予定。
------>8------------>8------------>8------------>8------------>8
--- policy-3801.sgml 2008-06-13 22:14:52.965163000 +0900
+++ policy.sgml 2009-04-24 19:44:18.000000000 +0900
@@ -2,7 +2,7 @@
<!-- include version information so we don't have to hard code it
within the document -->
<!-- 文書の中に直接書き込まなくても良いように、
- ここでバージョン情報を挿入する。現在 3.8.0.1 ベース-->
+ ここでバージョン情報を挿入する。現在 3.8.1.0 ベース-->
<!--
<!entity % versiondata SYSTEM "version.ent"> %versiondata;
]>
@@ -10,6 +10,7 @@
<!entity % versiondata SYSTEM "version.ja.ent"> %versiondata;
]>
+
<debiandoc>
<!-- JAPANESE
日本語訳は八田真行 mhatta@debian.or.jp 、かねこ skaneko@a2.mbn.or.jp、
@@ -451,6 +452,43 @@
にあります。
</p>
</sect>
+ <sect id="definitions">
+ <heading>Definitions</heading>
+
+ <p><!--
+ The following terms are used in this Policy Manual:-->
+ 以下の用語がこのポリシーマニュアル中で使われています。
+ <taglist>
+ <tag>ASCII</tag>
+ <item><!--
+ The character encoding specified by ANSI X3.4-1986 and its
+ predecessor standards, referred to in MIME as US-ASCII, and
+ corresponding to an encoding in eight bits per character of
+ the first 128 <url id="http://www.unicode.org/"
+ name="Unicode"> characters, with the eighth bit always zero.-->
+ ANSI X3.4-1986 およびその先行する標準で規定された文字エンコーディング
であり、MIME
+ では US-ASCII として参照され、一文字を 8 ビット (列) で表現するエン
コーディングである
+ <url id="http://www.unicode.org/"
+ name="Unicode"> の最初の 128 文字 (8 ビット目は常に 0) に一致します。
+ <!-- 原文のまま。間違いだらけだがとりあえず批判は差し控える。 -->
+ </item>
+ <tag>UTF-8</tag>
+ <item><!--
+ The transformation format (sometimes called encoding) of
+ <url id="http://www.unicode.org/" name="Unicode"> defined by
+ <url id="http://www.rfc-editor.org/rfc/rfc3629.txt"
+ name="RFC 3629">. UTF-8 has the useful property of having
+ ASCII as a subset, so any text encoded in ASCII is trivially
+ also valid UTF-8.-->
+ <url id="http://www.unicode.org/" name="Unicode"> の転送形式
+(エンコーディングと呼ばれることもあります) で、<url
+id="http://www.rfc-editor.org/rfc/rfc3629.txt" name="RFC 3629"> で定義されています。
+UTF-8 は ASCII をサブセットとして含むという役に立つ性質を持っているため、ASCII
+エンコードされたテキストは自動的に有効な UTF-8 テキストにもなります。
+ </item>
+ </taglist>
+ </p>
+ </sect>
</chapt>
<chapt id="archive">
@@ -480,13 +518,21 @@
system, but not every package we want to make accessible is
<em>free</em> in our sense (see the Debian Free Software
Guidelines, below), or may be imported/exported without
- restrictions. Thus, the archive is split into the distribution
- areas or categories based on their licenses and other restrictions.
+ restrictions. Thus, the archive is split into areas<footnote>
+ The Debian archive software uses the term "component" internally
+ and in the Release file format to refer to the division of an
+ archive. The Debian Social Contract simply refers to "areas."
+ This document uses terminology similar to the Social Contract.
+ </footnote> based on their licenses and other restrictions.
-->
Debian プロジェクトはフリーなオペレーティングシステムの構築を目指して努力を重ねてい
ますが、私たちが利用可能にしたいと思う全てのパッケージが私たちの定義に沿った
<em>フリー</em> (詳しくは下記記載の <ref id="dfsg"> をご覧下さい)
なものとなっているわけではなく、また制限なしに輸出入ができるものともなっていません。
- そこで、Debian アーカイブは、そのソフトウェアのライセンスやその他の制限条件に基づい
て、いくつかの配布エリアまたはカテゴリとして分割されています。
+ そこで、Debian アーカイブは、そのソフトウェアのライセンスやその他の制限条件に基づい
て、いくつかの配布エリア<footnote>
+Debian アーカイブソフトウェアでは内部的に、およびリリースファイルフォーマットで、
アーカイブの分類を示すのに component という用語を使っています。
+Debian 社会契約では単に『エリア』と呼んでいます。
+この文書では、社会契約と同じ用語法を用いています。</footnote>
+として分割されています。
</p>
<p><!--
The aims of this are:-->この目的は
@@ -517,11 +563,11 @@
</p>
<p>
<!--
- The <em>main</em> category forms the <em>Debian GNU/Linux
+ The <em>main</em> archive area forms the <em>Debian GNU/Linux
distribution</em>.
-->
<em>Debian GNU/Linux ディストリビューション</em> とは <em>main</em>
- カテゴリのことです。
+ アーカイブエリアのことです。
</p>
<p>
<!--
@@ -715,13 +761,13 @@
</p>
</sect>
<sect id="sections">
- <heading><!--Categories-->カテゴリ</heading>
+ <heading><!--Archive areas-->アーカイブエリア</heading>
<sect1 id="main">
<!--
- <heading>The main category</heading>
+ <heading>The main archive area</heading>
-->
- <heading>main カテゴリ</heading>
+ <heading>main アーカイブエリア</heading>
<p>
<!--
Every package in <em>main</em> must comply with the DFSG
@@ -771,9 +817,9 @@
<sect1 id="contrib">
<!--
- <heading>The contrib category</heading>
+ <heading>The contrib archive area</heading>
-->
- <heading>contrib カテゴリ</heading>
+ <heading>contrib アーカイブエリア</heading>
<p>
<!--
@@ -837,9 +883,9 @@
<sect1 id="non-free">
<!--
- <heading>The non-free category</heading>
+ <heading>The non-free archive area</heading>
-->
- <heading>non-free カテゴリ</heading>
+ <heading>non-free アーカイブエリア</heading>
<p>
<!--
@@ -1027,23 +1073,23 @@
<p>
<!--
- The packages in the categories <em>main</em>,
+ The packages in the archive areas <em>main</em>,
<em>contrib</em> and <em>non-free</em> are grouped further
into <em>sections</em> to simplify handling.
-->
取り扱いを簡略化するため、<em>main</em>、<em>contrib</em>、
- <em>non-free</em> の各カテゴリに含まれる全てのパッケージは、更に
+ <em>non-free</em> の各アーカイブエリアに含まれる全てのパッケージは、更に
<em>セクション</em> に分類されます。
</p>
<p><!--
- The category and section for each package should be
+ The archive area and section for each package should be
specified in the package's <tt>Section</tt> control record
(see <ref id="f-Section">). However, the maintainer of the
Debian archive may override this selection to ensure the
consistency of the Debian distribution. The <tt>Section</tt> field
should be of the form:-->
- それぞれのパッケージのカテゴリとセクションはパッケージの
+ それぞれのパッケージのアーカイブエリアとセクションはパッケージの
<tt>Section</tt> <em>コントロールファイル</em> (control record)
で指定すべきです (<ref id="f-Section"> 参照)。但し、
Debian ディストリビューションとしての一貫性を保証するため、Debian
@@ -1053,18 +1099,18 @@
<item>
<!--
<em>section</em> if the package is in the
- <em>main</em> category,-->
+ <em>main</em> archive area,-->
<em>section</em> これはパッケージが <em>main</em>
- カテゴリに属する場合です。
+ アーカイブエリアに属する場合です。
</item>
<item>
<!--
- <em>section/section</em> if the package is in
+ <em>area/section</em> if the package is in
the <em>contrib</em> or <em>non-free</em> section,
- and-->
- <em>section/section</em> これはパッケージが
+ archive areas.-->
+ <em>area/section</em> これはパッケージが
<em>contrib</em> または <em>non-free</em>
- 配布エリアに属する場合です。
+ アーカイブエリアに属する場合です。
</item>
</list>
</p>
@@ -1217,12 +1263,15 @@
with required, important, standard or optional
priorities, or are only likely to be useful if you
already know what they are or have specialized
- requirements.
+ requirements (such as packages containing only detached
+ debugging symbols).
-->
プライオリティとして required、important、standard、optional
のいずれかが指定されている他のパッケージと衝突するパッケージは全てこれに含まれます。
- また、それが何なのかすでに知っている場合や、特段の要求事項がある場合にのみ有用であ
ると考えられるパッケージ群もこのプライオリティに収録されます。
- </item>
+ また、それが何なのかすでに知っている場合や、特殊な要求に対応したもの
+ (例として、分離したデバッグシンボルのみを含むパッケージなど)
+ である場合にのみ有用であると考えられるパッケージ群もこのプライオリ
ティに収録されます。
+ </item>
</taglist>
</p>
@@ -1616,21 +1665,17 @@
と指定されているパッケージに対して、それ以外のパッケージが依存関係を宣言する必
要はありません。
また、そのようなパッケージの特定のバージョンに依存しているのでなければ、依存関
係を宣言すべきではありません<footnote>
<p><!--
- Essential is defined as the minimal set of functionality
- that must be available and usable on the system even
- when packages are in an unconfigured (but unpacked)
- state. This is needed to avoid unresolvable dependency
- loops on upgrade. If packages add unnecessary
- dependencies on packages in this set, the chances that
- there <strong>will</strong> be an unresolvable
- dependency loop caused by forcing these Essential
- packages to be configured first before they need to be
- is greatly increased. It also increases the chances
- that frontends will be unable to
- <strong>calculate</strong> an upgrade path, even if one
- exists.-->
- Essential は、パッケージ群が展開されてはいるが未設定な状態でも、システ
ム上で提供され使用できなければならない最小の機能の集合として定義されています。
- これは、アップグレードの際の解決できない依存関係のループを避けるために
必要になります。
+ Essential is needed in part to avoid unresolvable dependency
+ loops on upgrade. If packages add unnecessary dependencies
+ on packages in this set, the chances that there
+ <strong>will</strong> be an unresolvable dependency loop
+ caused by forcing these Essential packages to be configured
+ first before they need to be is greatly increased. It also
+ increases the chances that frontends will be unable to
+ <strong>calculate</strong> an upgrade path, even if one
+ exists.
+ -->
+ Essential は、アップグレードの際の解決できない依存関係のループを避ける
ために必要になります。
パッケージが不必要な依存関係をこの分類に属するパッケージに対して設定し
た場合、Essential
として指定されたパッケージを先に設定しなければならないという、
解決不能の依存関係のループが起こる可能性が
@@ -1647,10 +1692,16 @@
from the Essential set when the functionality moved to a
different package. So depending on these packages
<em>just in case</em> they stop being essential does way
- more harm than good.-->
+ more harm than good.
+ Also, functionality is rarely ever removed from the
+ Essential set, but <em>packages</em> have been removed from
+ the Essential set when the functionality moved to a
+ different package. So depending on these packages <em>just
+ in case</em> they stop being essential does way more harm
+ than good.
+ -->
また、Essential
- の提供する機能が削除されると言うことは通常起こりませんが
- (これは Essential パッケージ集合に加えるのに慎重な注意が必要になる理由
の一つでもあります)、
+ の提供する機能が削除されると言うことは通常起こりませんが、
その機能が異なったパッケージに移されたことによって、
<em>パッケージ</em> が Essential から削除されることはあります。
このため、これらのパッケージに依存することは Essential
@@ -1797,8 +1848,16 @@
using the <tt>Essential</tt> control file field.
The format of the <tt>Essential</tt> control field is
described in <ref id="f-Essential">.
+ Essential is defined as the minimal set of functionality that
+ must be available and usable on the system at all times, even
+ when packages are in an unconfigured (but unpacked) state.
+ Packages are tagged <tt>essential</tt> for a system using the
+ <tt>Essential</tt> control file field. The format of the
+ <tt>Essential</tt> control field is described in <ref
+ id="f-Essential">.
-->
- いくつかのパッケージには <tt>Essential</tt> 制御ファイルフィールドで
+ Essential は、パッケージ群が展開されてはいるが未設定な状態でも、システム上
で提供され使用できなければならない最小の機能の集合として定義されています。
+ そのようなパッケージには <tt>Essential</tt> 制御ファイルフィールドで
<tt>Essential</tt> 指定が付加されています。<tt>Essential</tt>
制御ファイルフィールドの書式は <ref id="f-Essential">
で記載されています。
@@ -1836,6 +1895,25 @@
あるパッケージがこの条件を満たせない場合にはこのパッケージに
<tt>Essential</tt> 指定を行ってはいけませんし、そのパッケージに依存する
他のパッケージは明示的に適切な依存関係フィールドを与えなければいけません。
</p>
+ <p><!--
+ Maintainers should take great care in adding any programs,
+ interfaces, or functionality to <tt>essential</tt> packages.
+ Packages may assume that functionality provided by
+ <tt>essential</tt> packages is always available without
+ declaring explicit dependencies, which means that removing
+ functionality from the Essential set is very difficult and is
+ almost never done. Any capability added to an
+ <tt>essential</tt> package therefore creates an obligation to
+ support that capability as part of the Essential set in
+ perpetuity.
+ -->
+ メンテナは、プログラム、インターフェース、機能を <tt>essential</tt>
+ パッケージに加える際には細心の注意を払う必要があります。パッケージは
+ <tt>essential</tt> パッケージの提供する機能は明示的な依存関係の宣言なしに常に提供
されていることを期待してよく、逆に Essential
+ パッケージ群から機能を削除することは非常に難しく、ほとんどできないものになります。
+ また、<tt>essential</tt> パッケージに機能を加えることは、その機能を Essential
+ 群で永久にサポートする義務を負わせることになります。
+ </p>
<p>
<!--
You must not tag any packages <tt>essential</tt> before
@@ -1928,8 +2006,8 @@
Package maintainer scripts may prompt the user if
necessary. Prompting should be done by communicating
through a program, such as <prgn>debconf</prgn>, which
- conforms to the Debian Configuration management
- specification, version 2 or higher. Prompting the user by
+ conforms to the Debian Configuration Management
+ Specification, version 2 or higher. Prompting the user by
other means, such as by hand<footnote>
From the Jargon file: by hand 2. By extension,
writing code which does something in an explicit or
@@ -1950,7 +2028,7 @@
</p>
<p><!--
- The Debian Configuration management specification is included
+ The Debian Configuration Management Specification is included
in the <file>debconf_specification</file> files in the
<package>debian-policy</package> package.
It is also available from the Debian web mirrors at
@@ -1966,8 +2044,8 @@
</p>
<p><!--
- Packages which use the Debian Configuration management
- specification may contain an additional
+ Packages which use the Debian Configuration Management
+ Specification may contain an additional
<prgn>config</prgn> script and a <tt>templates</tt>
file in their control archive<footnote>
The control.tar.gz inside the .deb.
@@ -1992,8 +2070,8 @@
<footnote><p>
<!--
<package>Debconf</package> or another tool that
- implements the Debian Configuration management
- specification will also be installed, and any
+ implements the Debian Configuration Management
+ Specification will also be installed, and any
versioned dependencies on it will be satisfied
before preconfiguration begins.-->
初期設定が始まるまでに Debian 設定管理仕様を満たす
@@ -2004,13 +2082,13 @@
使う必要があります。
</p>
<p><!--
- Packages which use the Debian Configuration management
- specification must allow for translation of their messages
+ Packages which use the Debian Configuration Management
+ Specification must allow for translation of their user-visible messages
by using a gettext-based system such as the one provided by
the <package>po-debconf</package> package.-->
Debian 設定管理仕様に準拠したパッケージでは、
<package>po-debconf</package> パッケージなどで提供される gettext
- ベースのシステムを使った、メッセージの翻訳が可能なようにしなければなりません。
+ ベースのシステムを使った、ユーザから見えるメッセージの翻訳が可能なようにしなけ
ればなりません。
</p>
<p><!--
Packages should try to minimize the amount of prompting
@@ -2559,9 +2637,9 @@
<p>
<!--
- The <var>date</var> should be in RFC822 format<footnote>
+ The <var>date</var> must be in RFC822 format<footnote>
This is generated by <tt>date -R</tt>.
- </footnote>; it should include the time zone specified
+ </footnote>; it must include the time zone specified
numerically, with the time zone name or abbreviation
optionally present as a comment in parentheses.
-->
@@ -2571,22 +2649,27 @@
</p></footnote>
<footnote><p>
訳注: RFC2822 参照。
- </p></footnote> にすべきです。
- このフォーマットは、数字によって表現されたタイムゾーンを含むべきで、
+ </p></footnote> でなければいけません。
+ このフォーマットは、数字によって表現されたタイムゾーンを含まなければならず、
オプションとして、かっこに入ったコメントの形でタイムゾーン名かその省略形を付加す
ることができます。
</p>
<p>
<!--
- The first "title" line with the package name should start
- at the left hand margin; the "trailer" line with the
- maintainer and date details should be preceded by exactly
+ The first "title" line with the package name must start
+ at the left hand margin. The "trailer" line with the
+ maintainer and date details must be preceded by exactly
one space. The maintainer details and the date must be
separated by exactly two spaces.
-->
- パッケージ名ではじまる最初の「タイトル」の行は、左詰めにすべきです。
- それに続く管理者、日付フィールドの詳細は正確に一つのスペースからはじめるべきです。
+ パッケージ名ではじまる最初の「タイトル」の行は、左詰めにしなければいけません。
+ それに続く管理者、日付フィールドの詳細は正確に一つのスペースからはじめなければい
けません。
管理者の詳細と日付フィールドは、正確に二つのスペースによって区切られていなければ
いけません。
- <!-- ここって「べき」なのかなぁ。元は must みたい -->
+ </p>
+
+ <p><!--
+ The entire changelog must be encoded in UTF-8.
+ -->
+ changelog 全体が UTF-8 でエンコードされていなければいけません。
</p>
<p>
@@ -2599,49 +2682,6 @@
を参照ください。
</p>
- <sect1>
- <heading><!-- Defining alternative changelog formats-->changelog の別書式の定義
</heading>
- <p>
- <!--
- In non-experimental packages you must use a format for
- <file>debian/changelog</file> which is supported by the most
- recent released version of <prgn>dpkg</prgn>.
- -->
- 試験的なパッケージ以外では、
- <file>debian/changelog</file> には、最新版の <prgn>dpkg</prgn>
- がサポートするフォーマットを用いなければいけません。
- </p>
-
- <p>
- <!--
- It is possible to use a format different from the standard
- one by providing a changelog parser for the format you wish
- to use. The parser must have an API compatible with that
- expected by <prgn>dpkg-genchanges</prgn> and
- <prgn>dpkg-gencontrol</prgn>, and it must not interact with
- the user at all.
- <footnote>
- If there is general interest in the new format, you should
- contact the <package>dpkg</package> maintainer to have the
- parser script for it included in the <prgn>dpkg</prgn>
- package. (You will need to agree that the parser and its
- man page may be distributed under the GNU GPL, just as the rest
- of <prgn>dpkg</prgn> is.)
- </footnote>
- -->
- 使用したい書式のパーザを用意することで、標準的でない書式を使用することが可能です。
- このパーザは <prgn>dpkg-genchanges</prgn> および
- <prgn>dpkg-gencontrol</prgn> が期待しているものと API
- 互換である必要があり、ユーザとの対話的処理を一切行ってはなりません
- <footnote><p>
- 新しい書式が広く関心を引く (であろう) ものであるときには、
- <prgn>dpkg</prgn> のメンテナに連絡をとり、その書式に対応するパーザを
- <prgn>dpkg</prgn> パッケージに含めてもらうようにして下さい。
- そのパーザパーサとマニュアルページは、<prgn>dpkg</prgn> の一部として
- dpkg の他の部分同様 GNU GPL で配付することを認める必要があります。
- </p></footnote>。
- </p>
- </sect1>
</sect>
<sect id="dpkgcopyright">
@@ -3287,6 +3327,12 @@
The meaning of the following tags has been standardized:-->
以下のタグの意味は標準化されています。
<taglist>
+ <tag>nocheck</tag>
+ <item><!--
+ This tag says to not run any build-time test suite
+ provided by the package.-->
+ このタグは、パッケージで提供されているビルド時のテスト集を実行しないことを指示し
ます。
+ </item>
<tag>noopt</tag>
<item><!--
The presence of this tag means that the package should
@@ -3375,6 +3421,12 @@
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
MAKEFLAGS += -j$(NUMJOBS)
endif
+build:
+ # ...
+ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
+<!-- # Code to run the package test suite.-->
+ # パッケージテスト群を実行するためのコード
+endif
</example>
</p>
</sect1>
@@ -3759,6 +3811,11 @@
空白行や空白とタブでだけ構成されている行は、フィールドの値や、フィールドとフィー
ルドの間にあってはいけません
- それは、新しい段落を意味してしまいます。
</p>
+ <p><!--
+ All control files must be encoded in UTF-8.-->
+ コントロールファイルは UTF-8 でエンコードしなければいけません。
+ </p>
+ </sect>
<sect id="sourcecontrolfiles">
<!--<heading>Source package control files --
<file>debian/control</file></heading>-->
@@ -3866,6 +3923,18 @@
及び <prgn>dpkg-source</prgn> によって使用されます。
詳細は、<ref id="substvars"> をご覧ください。
</p>
+ <p><!--
+ In addition to the control file syntax described <qref
+ id="controlsyntax">above</qref>, this file may also contain
+ comment lines starting with <tt>#</tt> without any preceding
+ whitespace. All such lines are ignored, even in the middle of
+ continuation lines for a multiline field, and do not end a
+ multiline field.-->
+ <qref id="controlsyntax">上記のコントロールファイルの書式</qref>
+ に加え、このファイルには先頭に空白なしで <tt>#</tt>
+ から始まるコメント行を含めることができます。
+ そのような行は、複数行からなるフィールドの途中でも無視され、フィールドを終わらせ
るようなことはありません。
+ </p>
</sect>
<sect id="binarycontrolfiles">
@@ -5310,7 +5379,7 @@
scripts this means that you <em>almost always</em> need to
use <tt>set -e</tt> (this is usually true when writing shell
scripts, in fact). It is also important, of course, that
- they don't exit with a non-zero status if everything went
+ they don't exit with a zero status if everything went
well.-->
パッケージ管理システムはこれらのスクリプトからの終了ステータスを見ます。
パッケージ管理システムが手続きを止められるように、
@@ -5319,7 +5388,7 @@
シェルスクリプトでは <em>ほとんど常に</em> <tt>set -e</tt>
を使う必要があるということを意味します (実際には、
通常シェルスクリプトを書く場合は一般に、このようにします)。
- もちろん、全てがうまくいった場合に、0 でないステータスで終了しないことも重要です。
+ もちろん、全てがうまくいった場合に、0 ステータスで終了しないことも重要です。
</p>
<p><!--
Additionally, packages interacting with users using
@@ -6352,7 +6421,32 @@
Build-Depends-Indep: texinfo
Build-Depends: kernel-headers-2.2.10 [!hurd-i386],
hurd-dev [hurd-i386], gnumach-dev [hurd-i386]
- </example>
+ </example><!--
+ requires <tt>kernel-headers-2.2.10</tt> on all architectures
+ other than hurd-i386 and requires <tt>hurd-dev</tt> and
+ <tt>gnumach-dev</tt> only on hurd-i386.-->
+ という指定は hurd-i386 以外のすべてのアーキテクチャで
+ <tt>kernel-headers-2.2.10</tt> を要求し、hurd-i386 のみで
+ <tt>gnumach-dev</tt> を要求するものとなります。
+ </p>
+
+ <p><!--
+ If the architecture-restricted dependency is part of a set of
+ alternatives using <tt>|</tt>, that alternative is ignored
+ completely on architectures that do not match the restriction.
+ For example:-->
+ アーキテクチャ制限つきの依存関係が <tt>|</tt>
+ を使った代替パッケージ集合の一部であった場合、制約を満たさないアーキテクチャ上で
は代替パッケージは完全に無視されます。
+ 例を以下に示します。
+ <example compact="compact">
+Build-Depends: foo [!i386] | bar [!amd64]
+ </example><!--
+ is equivalent to <tt>bar</tt> on the i386 architecture, to
+ <tt>foo</tt> on the amd64 architecture, and to <tt>foo |
+ bar</tt> on all other architectures.-->
+ という記載は i386 アーキテクチャでは <tt>bar</tt> に等しく、amd64 アーキテクチャでは
+ <tt>foo</tt> に等しく、その他のアーキテクチャでは <tt>foo | bar</tt>
+ に等しいものとなります。
</p>
<p><!--
@@ -8622,11 +8716,11 @@
<!-- The <file>/usr/local</file> directory itself and all the
subdirectories created by the package should (by default) have
permissions 2775 (group-writable and set-group-id) and be
- owned by <tt>root.staff</tt>. -->
+ owned by <tt>root:staff</tt>. -->
<file>/usr/local</file>
ディレクトリ自身と、パッケージによって作成されたそのサブディレクトリは、標準設
定のパーミッションとして
2775 (group 書き込み許可、group id セット)
- を、そしてオーナとしては <tt>root.staff</tt>
+ を、そしてオーナとしては <tt>root:staff</tt>
を設定しておくべきです。
</p>
</sect1>
@@ -9004,19 +9098,6 @@
<tt>K</tt> で始まるスクリプトの後に実行されるという点では他と変わりませんが、ど
ちらも引数
<tt>stop</tt> 付きで実行されます。
</p>
-
- <p><!--
- Also, if the script name ends in <tt>.sh</tt>, the script
- will be sourced in runlevel <tt>S</tt> rather than being
- run in a forked subprocess, but will be explicitly run by
- <prgn>sh</prgn> in all other runlevels.-->
- また、もしスクリプト名が <tt>.sh</tt>
- で終わっていた場合、そのようなスクリプトはランレベル
- <tt>S</tt> ではフォークされた子プロセスではなく、そのまま実行されます。
- その他のランレベルでは、スクリプトは明示的に <prgn>sh</prgn>
- で実行されます。
- <!-- 原文首傾げるが、要するに S 以外では fork するということらしい-->
- </p>
</sect1>
<sect1>
@@ -9084,20 +9165,23 @@
</p>
<p>
- <!-- The <file>init.d</file> scripts must ensure that they
- will behave sensibly if invoked with <tt>start</tt> when
- the service is already running, or with <tt>stop</tt> when
- it isn't, and that they don't kill unfortunately-named
- user processes. The best way to achieve this is usually
- to use <prgn>start-stop-daemon</prgn>. -->
+ <!-- The <file>init.d</file> scripts must ensure that they will
+ behave sensibly (i.e., returning success and not starting
+ multiple copies of a service) if invoked with <tt>start</tt>
+ when the service is already running, or with <tt>stop</tt>
+ when it isn't, and that they don't kill unfortunately-named
+ user processes. The best way to achieve this is usually to
+ use <prgn>start-stop-daemon</prgn> with the <tt>--oknodo</tt>
+ option. -->
<file>init.d</file>
スクリプトは、該当するサービスが既に起動しているのに
<tt>start</tt>
- オプション付きで実行された場合の動作に慎重さをもって実行されるようにしなければ
なりません。
- 逆に起動していないのに
+ オプション付きで実行された場合の動作に慎重さをもって
+ (即ち、実行時に成功を返し、複数のサービスのコピーを同時に起動しない)
+ 実行されるようにしなければなりません。逆に起動していないのに
<tt>stop</tt> オプション付きで実行された際には、他のユーザプロセスを落さないよ
うにしなければなりません。
- これを実現するのに通常最良の方法は
- <prgn>start-stop-daemon</prgn> を用いるようにすることです。
+ これを実現するのに通常最良の方法は <prgn>start-stop-daemon</prgn> に
+ <tt>--oknodo</tt> オプションをつけて用いるようにすることです。
</p>
<p>
@@ -9213,6 +9297,24 @@
また、<file>init.d</file> スクリプトは <file>/etc/default/</file>
が消されていた場合にも失敗することなく妥当に振る舞わなければいけません。
</p>
+ <p><!--
+ <file>/var/run</file> and <file>/var/lock</file> may be mounted
+ as temporary filesystems<footnote>
+ For example, using the <tt>RAMRUN</tt> and <tt>RAMLOCK</tt>
+ options in <file>/etc/default/rcS</file>.
+ </footnote>, so the <file>init.d</file> scripts must handle this
+ correctly. This will typically amount to creating any required
+ subdirectories dynamically when the <file>init.d</file> script
+ is run, rather than including them in the package and relying on
+ <prgn>dpkg</prgn> to create them.-->
+ <file>/var/run</file> および <file>/var/lock</file> は一時ファイルシステムとし
てマウントされている場合があるため<footnote>
+ 例えば、<file>/etc/default/rcS</file> で <tt>RAMRUN</tt> や <tt>RAMLOCK</tt>
+ オプションを用いた場合などです。
+ </footnote>、<file>init.d</file>
+ はそのような場合を正しく処理できなければいけません。これは <file>init.d</file>
+ 実行時に、パッケージにサブディレクトリを含めて <prgn>dpkg</prgn>
+ に作成を任せるのではなく、必要なディレクトリを動的に生成することによって実現可
能です。
+ </p>
</sect1>
<sect1>
@@ -10687,25 +10789,28 @@
support <tt>-a</tt> and <tt>-o</tt> as binary logical
operators.</item>
<item><tt>local</tt> to create a scoped variable must be
- supported; however, <tt>local</tt> may or may not preserve
- the variable value from an outer scope and may or may not
- support arguments more complex than simple variables. Only
- uses such as:-->
+ supported, including listing multiple variables in a single
+ local command and assigning a value to a variable at the
+ same time as localizing it. <tt>local</tt> may or
+ may not preserve the variable value from an outer scope if
+ no assignment is present. Uses such as:-->
<item><tt>echo -n</tt> これがシェルの内部コマンドとして実装されている場合、改行
を挿入してはいけません。</item>
<item><tt>test</tt> これがシェルの内部コマンドとして実装されている場合、
<tt>-a</tt> と <tt>-o</tt> を二値の論理値を返すオペレータとしてサポートしていな
ければいけません。</item>
<item>スコープをもつ変数を作成する <tt>local</tt>
- をサポートしていなければいけません。但し、<tt>local</tt>
- がスコープ外で変数の値を保持してもしなくてもよく、単純な変数以上に複雑な引数の
サポートも要求されません。
- 使用は以下のような場合に限られます。
+ を、複数の変数を一つの local コマンドに並べて、ローカル変数として生成するととも
に初期値を設定することを含めてサポートしていなければいけません。
+ 但し、<tt>local</tt>
+ が代入を伴わない場合は、スコープ外からの変数の値を保持してもしなくてもかまいま
せん。
+ 即ち、以下のような使用方法はサポートされ、<tt>c</tt> の値は <tt>delta</tt>
+ に設定されなければいけません。
<example compact>
fname () {
- local a
- a=''
- # ... use a ...
+ local a b c=delta d
+ # ... use a, b, c, d ...
}
-</example>
- <!--must be supported.-->
+</example><!--
+ must be supported and must set the value of <tt>c</tt> to
+ <tt>delta</tt>.-->
</item>
</list><!--
If a shell script requires non-SUSv3 features from the shell
@@ -11423,10 +11528,10 @@
</p>
<p>
- <!-- Files should be owned by <tt>root.root</tt>, and made
+ <!-- Files should be owned by <tt>root:root</tt>, and made
writable only by the owner and universally readable (and
executable, if appropriate), that is mode 644 or 755.-->
- ファイルは <tt>root.root</tt>
+ ファイルは <tt>root:root</tt>
の所有権で、所有者書き込み可能で誰でも読める
(および適宜実行可能である) ようにしてください。
すなわち、ファイルモードは 644 か 755 になります。</p>
@@ -12229,27 +12334,54 @@
</p>
<p><!--
- Mailboxes are generally mode 660
- <tt><var>user</var>.mail</tt> unless the system
- administrator has chosen otherwise. A MUA may remove a
- mailbox (unless it has nonstandard permissions) in which
- case the MTA or another MUA must recreate it if needed.
- Mailboxes must be writable by group mail.-->
- メールボックスはシステム管理者が他を選ばない限り、通常はモード
- 660 <tt><var>user</var>.mail</tt> のパーミッションです。
+ Mailboxes are generally either mode 600 and owned by
+ <var>user</var> or mode 660 and owned by
+ <tt><var>user</var>:mail</tt><footnote>
+ There are two traditional permission schemes for mail spools:
+ mode 600 with all mail delivery done by processes running as
+ the destination user, or mode 660 and owned by group mail with
+ mail delivery done by a process running as a system user in
+ group mail. Historically, Debian required mode 660 mail
+ spools to enable the latter model, but that model has become
+ increasingly uncommon and the principle of least privilege
+ indicates that mail systems that use the first model should
+ use permissions of 600. If delivery to programs is permitted,
+ it's easier to keep the mail system secure if the delivery
+ agent runs as the destination user. Debian Policy therefore
+ permits either scheme.
+ </footnote>. The local system administrator may choose a
+ different permission scheme; packages should not make
+ assumptions about the permission and ownership of mailboxes
+ unless required (such as when creating a new mailbox). A MUA
+ may remove a mailbox (unless it has nonstandard permissions) in
+ which case the MTA or another MUA must recreate it if needed.-->
+ メールボックスは、通常は <var>user</var> 所有でモード 600
+ か、<tt><var>user</var>:mail</tt> 所有でモード 660 のいずれかとします
+ <footnote>
+ メールスプールに関しては、昔から使われている二つのパーミッション手法があります。
+ 一つは宛先ユーザ権限で動かすプロセスですべてのメール配送を行い、モード
+ 600 を使うもの、もう一つは mail グループのシステムユーザがメール配送を行い、モード
+ 660 で所有権を mail とするものです。歴史的には、Debian
+ では後者の手法を使うためモード 660 のメールスプールを要求していました。
+ しかしながら、この方法は時とともに一般的ではないものとなり、また最小特権の原理
に基づいても最初のモデルでメールシステムがモード 600 を使う方法の方が望ましいものです。
+ 配送プログラムさえ許すなら、配送エージェントを宛先ユーザ権限で動かす方がメール
システムのセキュリティを保つのが容易です。
+ このため Debian Policy では両方の手法を許しています。
+ </footnote>。
+ ローカルのシステム管理者は、これと異なったパーミッション手法をとることができます。
+ このため、パッケージは特定の要求 (例えば新規にメールボックスを作成するなど)
+ がない限り、メールボックスのパーミッションと所有者について仮定を置くべきではあり
ません。
MUA は必要に応じてメールボックスを削除してもかまいません
(特殊なパーミッションになっていない場合)。
その場合には MTA や ほかの MUA
- は必要に応じてメールボックスを再作成できなければなりません。
- メールボックスは mail グループから書き込み可能でなければなりません。
+ は必要に応じてメールボックスを再作成しなければなりません。
</p>
<p>
- <!-- The mail spool is 2775 <tt>root.mail</tt>, and MUAs should
+ <!-- The mail spool is 2775 <tt>root:mail</tt>, and MUAs should
be setgid mail to do the locking mentioned above (and
must obviously avoid accessing other users' mailboxes
using this privilege).-->
- メールスプールディレクトリは 2775 <tt>root.mail</tt> で、MUA
+ メールスプールディレクトリは 2775 <tt>root:mail</tt> で、MUA
は上記のロックを取得するため mail に setgid されているべきです。
当然、この特権を使って他の人のメールボックスにアクセスすることは避けなければなり
ません。
</p>
@@ -13185,8 +13317,8 @@
<!-- Games which require protected, privileged access to
high-score files, saved games, etc., may be made
set-<em>group</em>-id (mode 2755) and owned by
- <tt>root.games</tt>, and use files and directories with
- appropriate permissions (770 <tt>root.games</tt>, for
+ <tt>root:games</tt>, and use files and directories with
+ appropriate permissions (770 <tt>root:games</tt>, for
example). They must not be made
set-<em>user</em>-id, as this causes security problems. (If
an attacker can subvert any set-user-id game they can
@@ -13198,9 +13330,9 @@
effort.)-->
ハイスコアファイル、保存ファイルなどの保護され、アクセスに特権
が必要なファイルを持つゲームは、オーナ・グループを
- <tt>root.games</tt> にして 2755 で set-gid
+ <tt>root:games</tt> にして 2755 で set-gid
しておき、ファイルとディレクトリには適当なパーミッション
- (例えば、770 <tt>root.games</tt>) を与えてもかまいません。
+ (例えば、770 <tt>root:games</tt>) を与えてもかまいません。
set-<em>user</em>-id はセキュリティ上の問題が起きるのでしてはいけません
(アタックする人は set-<em>user</em>-id
されたゲームを破ることができたら、そのファイルを他の実行ファイルで上書きし、ほか
のプレイヤーがトロイの木馬を実行してしまうことになります。
@@ -13688,11 +13820,11 @@
Debian メンテナの名前を載せるべきです。
</p>
<p><!--
- Packages in the <em>contrib</em> or <em>non-free</em> categories
- should state in the copyright file that the package is not part
+ Packages in the <em>contrib</em> or <em>non-free</em> archive
+ areas should state in the copyright file that the package is not part
of the Debian GNU/Linux distribution and briefly explain why.-->
<em>contrib</em> または <em>non-free</em>
- カテゴリのパッケージは、著作権情報ファイルにこのパッケージが
+ アーカイブエリアのパッケージは、著作権情報ファイルにこのパッケージが
Debian GNU/Linux の一部ではないこと、およびその簡潔な理由を示すべきです。
</p>
<p>
@@ -14185,7 +14317,7 @@
To view the copyright file for a package you could use this command:-->
パッケージの copyright 関連のファイルを見るには、以下のコマンドを使います。
<example>
- dpkg --fsys-tarfile <var>filename</var>.deb | tar xOf - \*/copyright | pager
+ dpkg --fsys-tarfile <var>filename</var>.deb | tar xOf - --wildcards \*/copyright |
pager
</example>
</p>
</sect>
@@ -14994,54 +15126,6 @@
<ref id="dpkgchangelog"> を参照ください。
</p>
- <p><!--
- It is recommended that the entire changelog be encoded in the
- <url id="http://www.cis.ohio-state.edu/cgi-bin/rfc/rfc2279.html" name="UTF-8">
- encoding of
- <url id="http://www.unicode.org/"
- name="Unicode">.-->
- changelog 全体は、<url id="http://www.unicode.org/"
- name="Unicode"> の <url
id="http://www.cis.ohio-state.edu/cgi-bin/rfc/rfc2279.html" name="UTF-8">
- でエンコードすることを推奨します。
- <footnote>
- <p><!--
- I think it is fairly obvious that we need to
- eventually transition to UTF-8 for our package
- infrastructure; it is really the only sane char-set in
- an international environment. Now, we can't switch to
- using UTF-8 for package control fields and the like
- until dpkg has better support, but one thing we can
- start doing today is requesting that Debian changelogs
- are UTF-8 encoded. At some point in time, we can start
- requiring them to do so. -->
- また、パッケージの枠組を UTF-8
- に移行する必要があるのはほとんど明らかだと思います。
- 国際化環境ではほとんど唯一のまともな文字集合ですから。
- 現在、dpkg のサポートが改善されるまでは UTF-8 をパッケージのコントロールファイル
フィールドなどに書くことはできませんが、少なくとも
- Debian changelogs を UTF-8 エンコードすることを推奨は可能です。
- ある時点からは、それを要請することも可能になるでしょう。
- </p>
- <p><!--
- Checking for non-UTF8 characters in a changelog is
- trivial. Dump the file through
- <example>iconv -f utf-8 -t ucs-4</example>
- discard the output, and check the return
- value. If there are any characters in the stream
- which are invalid UTF-8 sequences, iconv will exit
- with an error code; and this will be the case for the
- vast majority of other character sets.-->
- changelog 中で UTF-8 ではない文字を調べるのは簡単です。
- ファイルを <example>iconv -f utf-8 -t ucs-4</example>
- に通して、出力を捨て、結果の値を調べてください。
- もし UTF-8 として不正な文字列があった場合、iconv
- はエラーコードを返して終了します。ほとんどの UTF-8
- 以外の文字集合では、このようなエラーになります。
- <!-- このチェック方法はあんまりでは -->
- </p>
- </footnote>
- </p>
-
-
<!--<sect2><heading>Defining alternative changelog formats-->
<sect2><heading>changelog の別書式の定義
</heading>
@@ -16091,33 +16175,67 @@
<file>/usr/sbin/smail</file>
を包含するラッパーをインストールしようとしている場合を考えます。
<example>
- if [ install = "$1" ]; then
- dpkg-divert --package smailwrapper --add --rename \
- --divert /usr/sbin/smail.real /usr/sbin/smail
- fi
- </example>
- <!--Testing <tt>$1</tt> is necessary so that the script
- doesn't try to add the diversion again when
- <prgn>smailwrapper</prgn> is upgraded. The <tt>--package
- smailwrapper</tt> ensures that <prgn>smailwrapper</prgn>'s
- copy of <file>/usr/sbin/smail</file> can bypass the diversion and
- get installed as the true version.-->
- 最初の引数 <tt>$1</tt> をテストしているのは、<prgn>smailwrapper</prgn>
- を更新するときに、スクリプトが再度退避操作を行わないようにするためです。
+ dpkg-divert --package smailwrapper --add --rename \
+ --divert /usr/sbin/smail.real /usr/sbin/smail
+ </example><!--
+ The <tt>--package smailwrapper</tt> ensures that
+ <prgn>smailwrapper</prgn>'s copy of <file>/usr/sbin/smail</file>
+ can bypass the diversion and get installed as the true version.
+ It's safe to add the diversion unconditionally on upgrades since
+ it will be left unchanged if it already exists, but
+ <prgn>dpkg-divert</prgn> will display a message. To suppress that
+ message, make the command conditional on the version from which
+ the package is being upgraded:-->
オプション <tt>--package smailwrapper</tt> は、<prgn>smailwrapper</prgn>
に含まれる <file>/usr/sbin/smail</file>
が、退避バージョンではなく本来のバージョンとしてそのままインストールされることを保
証します。
+ アップグレード時に退避バージョンを無条件に指定することは問題ありません。
+ これは、もし既に存在していた場合には変更は行われず、<prgn>dpkg-divert</prgn>
+ がメッセージを表示するだけとなるためです。このメッセージを抑止する場合には、
+ コマンドをアップグレードしようとするバージョンを条件とするものとしてください。
+ <example>
+ if [ upgrade != "$1" ] || dpkg --compare-versions "$2" lt 1.0-2; then
+ dpkg-divert --package smailwrapper --add --rename \
+ --divert /usr/sbin/smail.real /usr/sbin/smail
+ fi
+ </example><!-- where <tt>1.0-2</tt> is the version at which the
+ diversion was first added to the package. Running the command
+ during abort-upgrade is pointless but harmless.-->
+ 以上の例では、<tt>1.0-2</tt> が、最初にパッケージに退避バージョンが追加されたバー
ジョンです。
+ abort-upgrade 時にこのコマンドを実行することに意味はありませんが、害もありません。
</p>
<p><!--
The postrm has to do the reverse:-->
postrm の場合はちょうどこの逆を行ないます。
<example>
- if [ remove = "$1" ]; then
+ if [ remove = "$1" -o abort-install = "$1" -o disappear = "$1" ]; then
+ dpkg-divert --package smailwrapper --remove --rename \
+ --divert /usr/sbin/smail.real /usr/sbin/smail
+ fi
+ </example><!-- If the diversion was added at a particular version, the
+ postrm should also handle the failure case of upgrading from an
+ older version (unless the older version is so old that direct
+ upgrades are no longer supported):-->
+ 特定のバージョン以降で退避バージョンが導入されている場合、postrm
+ はそれ以前のバージョンからのアップグレード失敗の場合を扱えなければいけません
+ (旧バージョンがあまりにも古く、直接のアップグレードがすでにサポートされていない場合
は除きます)。
+ 以下に例を示します。
+ <example>
+ if [ abort-upgrade = "$1" ] && dpkg --compare-versions "$2" lt 1.0-2; then
dpkg-divert --package smailwrapper --remove --rename \
--divert /usr/sbin/smail.real /usr/sbin/smail
fi
- </example>
+ </example><!-- where <tt>1.02-2</tt> is the version at which the
+ diversion was first added to the package. The postrm should not
+ remove the diversion on upgrades both because there's no reason to
+ remove the diversion only to immediately re-add it and since the
+ postrm of the old package is run after unpacking so the removal of
+ the diversion will fail.-->
+ ここでは、<tt>1.02-2</tt> が退避バージョンの追加がおこなわれたバージョンです。
+ アップグレードの際の postrm ではいずれの退避バージョンも削除してはいけません。
+ これは、直後に再度追加するために退避バージョンを削除する理由がないこと、および古い
パッケージの
+ postrm が展開後に走った場合、退避バージョンの削除は失敗するためです。
</p>
<p><!--
@@ -16126,7 +16244,7 @@
there is a time, after it has been diverted but before
<prgn>dpkg</prgn> has installed the new version, when the file
does not exist.-->
- システムの運用に必須となるファイルを退避しようとしないで下さい。
+ システムの運用に必須となるファイルに、退避バージョンを用いようとはしないで下さい。
<prgn>dpkg-divert</prgn> の使用時には、ファイルの退避が行われた後に
<prgn>dpkg</prgn> が新しいバージョンをインストールするまでの間、そのファイルが存在
しないタイミングがあるのです。
</p>
------>8------------>8------------>8------------>8------------>8
--
--
Seiji Kaneko
Attachment:
policy.sgml.gz
Description: GNU Zip compressed data