.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "DH_STRIP 1" .TH DH_STRIP 1 2024-03-27 13.15.3 Debhelper .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH 名前 .IX Header "名前" dh_strip \- 実行ファイル、共有ファイル、静的ライブラリのデバッグ情報を削る .SH 書式 .IX Header "書式" \&\fBdh_strip\fR [\fIdebhelper\ オプション\fR] [\fB\-X\fR\fIitem\fR] [\fB\-\-dbg\-package=\fR\fIパッケージ\fR] [\fB\-\-keep\-debug\fR] .SH 説明 .IX Header "説明" \&\fBdh_strip\fR is a debhelper program that is responsible for stripping out debug symbols in executables, shared libraries, and static libraries that are not needed during execution. .PP 本プログラムはパッケージビルドディレクトリ以下を探索し、どのファイルからデバッグ情報を取り除くべきかを見つけ出します。本プログラムは、\fBfile\fR\|(1) コマンドを利用し、ファイルパーミッション、ファイル名を利用して、どのファイルが共有ライブラリ (\fI*.so\fR)、実行可能バイナリ、静的ライブラリ (\fIlib*.a\fR)、デバッグ用ライブラリ (\fIlib*_g.a\fR, \fIdebug/*.so\fR) であるかを判断し、該当する場合は、デバッグシンボルをできる限り取り除きます (デバッグ用ライブラリについては全く何もしません)。多くの場合で、本プログラムは非常に良い推定を行い、正しくデバッグシンボルの除去を行います。 .PP 自動的にファイルがモジュールであるかどうかを見分けるのは難しく、また、どうやってモジュールからデバッグ情報を除外すれば良いかを決定するのも難しい為、\fBdh_strip\fR は、\fI.o\fR を拡張子に持つファイルのようなバイナリモジュールからデバッグ情報の除去を行う事について、未だサポートしていません。 .SH オプション .IX Header "オプション" .IP "\fB\-X\fR\fIitem\fR, \fB\-\-exclude=\fR\fIitem\fR" 4 .IX Item "-Xitem, --exclude=item" \&\fIitem\fR を名前に含むようなファイルを、デバッグ情報除去の対象から外します。もし、複数のファイルを処理させないように指定したければ、本オプションを複数回指定することによって行えます。 .IP \fB\-\-dbg\-package=\fR\fIpackage\fR 4 .IX Item "--dbg-package=package" \&\fBこのオプションは、現在特別な目的のためのオプションであり、通常必要ありません\fR。ほとんどの場合、新しいソースパッケージでは debhelper が自動的にデバッグパッケージ ("dbgsym パッケージ") を生成するので、このオプションを使う理由は少ないはずです。\fB手動で作られた \-\-dbg\-package\fR を自動生成されたデバッグシンボルパッケージで置き換えたい場合は \fB\-\-dbgsym\-migration\fR オプションを参照して下さい。 .Sp \&\fBdh_strip\fR を使ってパッケージからデバッグシンボルを取き、指定のデバッグ用パッケージのパッケージビルドディレクトリ内に独立したファイルとしてデバッグシンボルを保存します。 .Sp 例えば、ビルド予定のパッケージとして、libfoo、foo があり、\fIfoo-dbg\fR パッケージにはデバッグシンボルを含めておきたい場合、\fBdh_strip\-\-dbg\-package=\fR\fIfoo-dbg\fR を実行してください。 .Sp This option implies \fB\-\-no\-automatic\-dbgsym\fR and \fIcannot\fR be used with \fB\-\-automatic\-dbgsym\fR or \fB\-\-dbgsym\-migration\fR. .IP "\fB\-k\fR, \fB\-\-keep\-debug\fR" 4 .IX Item "-k, --keep-debug" \&\fBこのオプションは、現在特別な目的のためのオプションであり、通常必要ありません\fR。ほとんどの場合、新しいソースパッケージでは debhelper が自動的にデバッグパッケージ ("dbgsym パッケージ") を生成するので、このオプションを使う理由は少ないはずです。\fB手動で作られた \-\-dbg\-package\fR を自動生成されたデバッグシンボルパッケージで置き換えたい場合は \fB\-\-dbgsym\-migration\fR オプションを参照して下さい。 .Sp デバッグシンボルが取り除かれる一方、パッケージビルドディレクトリ以下にある \fIusr/lib/debug/\fR ディレクトリへ取り除いたデバッグシンボルを取り置きます。\fB\-\-dbg\-package\fR オプションの方が本オプションよりも使うのは易しいのですが、本オプションは \fB\-\-dbg\-package\fR オプションよりも柔軟な指定が可能です。 .Sp This option implies \fB\-\-no\-automatic\-dbgsym\fR and \fIcannot\fR be used with \fB\-\-automatic\-dbgsym\fR. .IP \fB\-\-dbgsym\-migration=\fR\fIpackage-relation\fR 4 .IX Item "--dbgsym-migration=package-relation" このオプションは、手動 (\fB\-\-dbg\-package\fR) で作成した "\-dbg" パッケージから自動生成されたデバッグシンボルパッケージへ移行するのに利用されます。このオプションでは、(現在では廃止となっている) \-dbg パッケージとファイルが衝突するのを避けるためにデバッグシンボルパッケージに追加される正しい \fBReplaces\fR 及び \fBBreaks\fR の依存関係を記述する筈です。 .Sp This option implies \fB\-\-automatic\-dbgsym\fR and \fIcannot\fR be used with \fB\-\-keep\-debug\fR, \fB\-\-dbg\-package\fR or \fB\-\-no\-automatic\-dbgsym\fR. .Sp 例: .Sp .Vb 1 \& dh_strip \-\-dbgsym\-migration=\*(Aqlibfoo\-dbg (<< 2.1\-3~)\*(Aq \& \& dh_strip \-\-dbgsym\-migration=\*(Aqlibfoo\-tools\-dbg (<< 2.1\-3~), libfoo2\-dbg (<< 2.1\-3~)\*(Aq .Ve .IP "\fB\-\-automatic\-dbgsym\fR, \fB\-\-no\-automatic\-dbgsym\fR" 4 .IX Item "--automatic-dbgsym, --no-automatic-dbgsym" 可能な際に \fBdh_strip\fR がデバッグシンボルパッケージを作るかどうかをコントロールします。 .Sp デフォルトはデバッグシンボルパッケージを作成します。 .IP "\fB\-\-ddebs\fR, \fB\-\-no\-ddebs\fR" 4 .IX Item "--ddebs, --no-ddebs" \&\fB\-\-automatic\-dbgsym\fR と \fB\-\-no\-automatic\-dbgsym\fR の歴史的な名前です。 .IP \fB\-\-ddeb\-migration=\fR\fIpackage-relation\fR 4 .IX Item "--ddeb-migration=package-relation" \&\fB\-\-dbgsym\-migration\fR の歴史的な名前です。 .SH 付記 .IX Header "付記" If the \fBDEB_BUILD_OPTIONS\fR environment variable contains \fBnostrip\fR, nothing will be stripped, in accordance with Debian policy (section 10.1 "Binaries"). This will also inhibit the automatic creation of debug symbol packages. .PP The automatic creation of debug symbol packages can also be prevented by adding \fBnoautodbgsym\fR to the \fBDEB_BUILD_OPTIONS\fR environment variable. However, \fBdh_strip\fR will still add debuglinks to ELF binaries when this flag is set. This is to ensure that the regular deb package will be identical with and without this flag (assuming it is otherwise "bit-for-bit" reproducible). .SH 確認すべき事 .IX Header "確認すべき事" Debian ポリシー バージョン 3.0.1 .SH 参照 .IX Header "参照" \&\fBdebhelper\fR\|(7) .PP このプログラムは debhelper の一部です。 .SH 作者 .IX Header "作者" Joey Hess