.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35) .\" .\" 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 .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . 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 "2021-03-06" "13.3.3~bpo10+1" "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 が自動的にデバッグパッケージ (\*(L"dbgsym パッケージ\*(R") を生成するので、このオプションを使う理由は少ないはずです。\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 が自動的にデバッグパッケージ (\*(L"dbgsym パッケージ\*(R") を生成するので、このオプションを使う理由は少ないはずです。\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) で作成した \*(L"\-dbg\*(R" パッケージから自動生成されたデバッグシンボルパッケージへ移行するのに利用されます。このオプションでは、(現在では廃止となっている) \-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 \fB\s-1DEB_BUILD_OPTIONS\s0\fR environment variable contains \fBnostrip\fR, nothing will be stripped, in accordance with Debian policy (section 10.1 \&\*(L"Binaries\*(R"). 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 \fB\s-1DEB_BUILD_OPTIONS\s0\fR environment variable. However, \fBdh_strip\fR will still add debuglinks to \s-1ELF\s0 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 \*(L"bit-for-bit\*(R" reproducible). .SH "確認すべき事" .IX Header "確認すべき事" Debian ポリシー バージョン 3.0.1 .SH "参照" .IX Header "参照" \&\fBdebhelper\fR\|(7) .PP このプログラムは debhelper の一部です。 .SH "作者" .IX Header "作者" Joey Hess