UbuntuJapaneseWiki

dh_makeのサンプルファイル

When you use dh_make to create the initial "debianization", example files for various tasks are created in the debian/ directory. The templates have a .ex extension. If you want to use one, rename it to remove the extension. If you do not need it, remove it to keep the debian/ directory clean.

最初の"debianization"としてdh_makeを利用したとき、さまざまな作業に対する実例ファイルがdebian/ディレクトリに作成されます。これらのファイルは .ex という拡張子を持っています。これらを利用する場合は、この拡張子の部分を削除してください。必要ない場合は、ファイルそのものを削除し、debian/ディレクトリをきれいにしておいてください。

オリジナルアーカイブへの修正

There are two types of source packages, native and non-native. A native package is one that is specific to Ubuntu/Debian. It has the debian/ directory containing the packaging information and any changes to the source included in the tarball (usually <packagename>_<version>.tar.gz). Non-native packages are more common. A non-native package splits the source package into a <packagename>_<version>.orig.tar.gz tarball that is identical (hopefully including md5sum) to the source tarball downloaded from the project's homepage and a .diff.gz file that contains all the differences (debian/ directory and patches) from the original source tarball.

ソースパッケージにはネイティブと非ネイティブの二種類が存在します。ネイティブパッケージとは、Ubuntu/Debianに特化したパッケージです。その場合は、ソースコードの変更点やパッケージの情報などが記載されたdebian/ディレクトリがアーカイブファイル(通常は<packagename>_<version>.tar.gz)に含まれています。非ネイティブパッケージはより一般的なパッケージです。非ネイティブパッケージでは、プロジェクトのサイトからダウンロードしたソースアーカイブとまったく同じ(md5sumが含まれていることも期待される)アーカイブファイルである<packagename>_<version>.orig.tar.gzと、そのオリジナルソースアーカイブとの差分(debian/ディレクトリやパッチ)である.diff.gzファイルに分離されています。

Here is a list of potential problems that can occur if you change the original tarball:

オリジナルアーカイブに修正を加えた場合、以下の点で問題が生じる可能性があります:

  1. Reproducibility
    • If you take just the .diff.gz and .dsc, you or someone else has no means to reproduce the changes in the original tarball.
  2. 再現性
    • ほんのちょっと.diff.gzや.dscを修正したい場合でも、あなたや他の誰かがオリジナルソースアーカイブに加えた変更を再現する手段が存在しません。
  3. Upgradeability
    • It is much easier to upgrade to a new upstream (from the author) version if the .orig.tar.gz is preserved and there is a clear separation between the upstream source and the changes made to produce the Ubuntu source package.
  4. アップグレード時の利便性
    • orig.tar.gzに変更が加えられず、(ソフトウェア作成者による)上流のソースコードとUbuntuのソースパッケージ作成の際の変更点が明確に分けられていれば、上流の新しいバージョンにアップグレードする場合も簡単になります。
  5. Debian to Ubuntu Synchronization
    • Changing original tarballs makes it hard to automatically sync from Debian to Ubuntu. Normally, only the .diff.gz and .dsc files change within the same upstream version, since the .orig.tar.gz file is shared by all the Debian or Ubuntu revisions. It is much more difficult to sync if the md5sums of the
    • orig.tar.gz files are not the same.
  6. DebianとUbuntuの同期
    • オリジナルのソースアーカイブに変更を加えると、DebianからUbuntuへの同期作業が難しくなります。普通は、同じ上流バージョンに対して、DebianとUbuntuで同じ.orig.tar.gzファイルが共有されるので、.diff.gzと.dscファイルのみを修正するだけで済みます。もし、.orig.tar.gzファイルのmd5sum値が異なる場合は、同期作業がより難しくなります。
  7. Usage of Revision Control for Debian package
    • If you use svn (svn-buildpackage) to handle your Debian package, you usually don't store the original tarball inside. If someone else does a checkout, he'll need to get the original tarball separately. Other revision control systems can be used to track only the packaging files (debian/, etc.) and not the whole source. However, if the .orig.tar.gz is not the same, then obviously problems can occur.

  8. Debianパッケージ用のリビジョン管理システムの利用
    • Debianパッケージの管理にsvn(svn-buildpackage)を利用している場合、通常はオリジナルのソースアーカイブをそのパッケージの中に含みません。そのため誰かがチェックアウトするとき、オリジナルのソースアーカイブを別途取得する必要があります。他のリビジョン管理システムでは、パッケージに関するファイル(debian/など)のみを追跡し、ソースコードは扱いません。もし、.orig.tar.gzに修正が加えられている場合は、何らかの問題が生じるでしょう。

  9. Security tracking
    • Consider a situation where someone wants to introduce a backdoor/rootkit or other evil stuff. If the original tarball is intact, it can be scanned easily through the .diff.gz to see if the person who modified the package tried to do something evil. If the tarball has changed, however, you also need to check the differences between the tarball and the original source.

  10. 安全性の確認
    • 誰かがバックドアやルートキット、その他危険なものを導入したいという状況を考えてみましょう。もしオリジナルのソースアーカイブに変更が加えられていない場合、.diff.gzをチェックするだけで、何か悪さがされていないかを確認することができます。ところがソースアーカイブに変更が加えられていた場合、その修正後のアーカイブとオリジナルソースアーカイブの違いも確認する必要があります。

      • attachment:UbuntuPackagingGuideJa/conventions/note.png You still have to trust the authors of the software not to do anything evil, but that is the case regardless of whether the original is changed.

      • attachment:UbuntuPackagingGuideJa/conventions/note.png オリジナルのソースアーカイブに変更が加えられているかどうかに関わらず、ソフトウェアの作成者はそのソフトウェアに悪さをしないと信頼するべきでしょう。

  11. The .diff.gz
    • The option to use the .diff.gz to reflect changes to the original tarball already exists, so it is easy to make changes without touching the original tarball.
  12. .diff.gz
    • すでに存在するオリジナルソースアーカイブへの変更点を反映した.diff.gzを使うことにより、そのオリジナルアーカイブを触ることなく簡単に変更点を加えることができます。

It is acceptable to change the original tarball if one or more of the following hold true:

以下のうち、一つ以上が該当する場合は、オリジナルアーカイブへの変更が許可されます:

The following are not reasons to change the original tarball:

以下は、オリジナルアーカイブへ変更を加える理由にはなりません

copyrightの取り扱い

The debian/copyright file should contain:

debian/copyrightファイルには以下の内容が含まれているべきです:

<=

=>

CDBSによるパッケージング

よくある間違い

debian/rules

UbuntuJapaneseWiki: UbuntuPackagingGuideJa/basic-mistakes (最終更新日時 2012-01-10 11:49:12 更新者 匿名)