lintianのエラーメッセージの覚え書き
xcur2pngをcli-apps.orgで公開する際、Ubuntu用のdebパッケージを作成した。debパッケージの作り方については以下が詳しい。
- PackagingGuide/Complete
- Ubuntu本家。非常に詳しい。まずはここを読むべき
- The Ubuntu Packaging Guide 日本語版
- 原文が意味不明の場合に使用。
- Debian 新メンテナガイド
- 2002年、きわめて古いが簡潔。野良パッケージならこれでも良いかもしれない。
ここでは今回の作業で出会った、debパッケージの誤りを指摘してくれるlintian(1)のメッセージとその対処を書き留めておく。
***E: xcur2png_0.5.1-1_i386.changes: bad-distribution-in-changes-file hardy
xcur2png (0.5.1-1) hardy; urgency=low #...以下略...
ディストリビューションがhardyなのに、リビジョンに文字列"ubuntu"を含んでいないのが原因。cf.hardy seems to be unknown to lintian
以下の様に修正する。
xcur2png (0.5.1-0ubuntu1) hardy; urgency=low #...以下略...
Ubuntuのリビジョンの付け方については、https://wiki.ubuntu.com/PackagingGuide/Complete#changelogを参照。
***W: xcur2png: missing-depends-line
debuildのログを追っていくと、ここでエラーが出ている。
dh_gencontrol dpkg-gencontrol: warning: unknown substitution variable ${shlibshardy:Depends} dpkg-gencontrol: warning: unknown substitution variable ${misc:Depends}
まずdebian/rulesの"dh_shlibdeps"の行のコメントアウトをはずす。
#...省略... # Build architecture-dependent files here. binary-arch: build install #...省略... dh_shlibdeps #ここの'#'をはずす #...省略...
debian/controlの"Depends:"の行を、"${shlibshardy:Depends}, ${misc:Depends}"から"{shlibs:Depends}"に修正。最終的には以下の様になる。
Source: xcur2png Section: x11 Priority: optional Maintainer: tks mashiw <xxxxxxxx@example.com> Build-Depends: debhelper (>= 5), autotools-dev Standards-Version: 3.7.3 Package: xcur2png Architecture: any Depends: ${shlibs:Depends} Description: Take PNG images from Xcursor and generate xcursorgen config-file xcur2png is a program which let you take PNG image from X cursor, and generate config-file which is reusable by xcursorgen. To put it simply, it is converter from X cursor to PNG image.
これらのエラーは9.2 上流ソフトウェアの更新にしたがってuupdateで作成したcontrolやruleをそのまま使うと起きるようだ。
Ubuntuでパッケージをアップデートする正しい方法はRecipe: Updating An Ubuntu Packageで解説してある。