.\" 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 "2019-02-23" "12.1.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 "NAME" dh_strip \- strip executables, shared libraries, and some static libraries .SH "SYNOPSIS" .IX Header "SYNOPSIS" \&\fBdh_strip\fR [\fIdebhelperĀ options\fR] [\fB\-X\fR\fIitem\fR] [\fB\-\-dbg\-package=\fR\fIpackage\fR] [\fB\-\-keep\-debug\fR] .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\fBdh_strip\fR is a debhelper program that is responsible for stripping executables, shared libraries, and static libraries that are not used for debugging. .PP This program examines your package build directories and works out what to strip on its own. It uses \fBfile\fR\|(1) and file permissions and filenames to figure out what files are shared libraries (\fI*.so\fR), executable binaries, and static (\fIlib*.a\fR) and debugging libraries (\fIlib*_g.a\fR, \fIdebug/*.so\fR), and strips each as much as is possible. (Which is not at all for debugging libraries.) In general it seems to make very good guesses, and will do the right thing in almost all cases. .PP Since it is very hard to automatically guess if a file is a module, and hard to determine how to strip a module, \fBdh_strip\fR does not currently deal with stripping binary modules such as \fI.o\fR files. .SH "OPTIONS" .IX Header "OPTIONS" .IP "\fB\-X\fR\fIitem\fR, \fB\-\-exclude=\fR\fIitem\fR" 4 .IX Item "-Xitem, --exclude=item" Exclude files that contain \fIitem\fR anywhere in their filename from being stripped. You may use this option multiple times to build up a list of things to exclude. .IP "\fB\-\-dbg\-package=\fR\fIpackage\fR" 4 .IX Item "--dbg-package=package" \&\fBThis option is a now special purpose option that you normally do not need\fR. In most cases, there should be little reason to use this option for new source packages as debhelper automatically generates debug packages (\*(L"dbgsym packages\*(R"). \fBIf you have a manual \&\-\-dbg\-package\fR that you want to replace with an automatically generated debug symbol package, please see the \fB\-\-dbgsym\-migration\fR option. .Sp Causes \fBdh_strip\fR to save debug symbols stripped from the packages it acts on as independent files in the package build directory of the specified debugging package. .Sp For example, if your packages are libfoo and foo and you want to include a \&\fIfoo-dbg\fR package with debugging symbols, use \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" \&\fBThis option is a now special purpose option that you normally do not need\fR. In most cases, there should be little reason to use this option for new source packages as debhelper automatically generates debug packages (\*(L"dbgsym packages\*(R"). \fBIf you have a manual \&\-\-dbg\-package\fR that you want to replace with an automatically generated debug symbol package, please see the \fB\-\-dbgsym\-migration\fR option. .Sp Debug symbols will be retained, but split into an independent file in \fIusr/lib/debug/\fR in the package build directory. \fB\-\-dbg\-package\fR is easier to use than this option, but this option is more flexible. .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" This option is used to migrate from a manual \*(L"\-dbg\*(R" package (created with \fB\-\-dbg\-package\fR) to an automatic generated debug symbol package. This option should describe a valid \fBReplaces\fR\- and \&\fBBreaks\fR\-relation, which will be added to the debug symbol package to avoid file conflicts with the (now obsolete) \-dbg package. .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 Examples: .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" Control whether \fBdh_strip\fR should be creating debug symbol packages when possible. .Sp The default is to create debug symbol packages. .IP "\fB\-\-ddebs\fR, \fB\-\-no\-ddebs\fR" 4 .IX Item "--ddebs, --no-ddebs" Historical name for \fB\-\-automatic\-dbgsym\fR and \fB\-\-no\-automatic\-dbgsym\fR. .IP "\fB\-\-ddeb\-migration=\fR\fIpackage-relation\fR" 4 .IX Item "--ddeb-migration=package-relation" Historical name for \fB\-\-dbgsym\-migration\fR. .SH "NOTES" .IX Header "NOTES" 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 "CONFORMS TO" .IX Header "CONFORMS TO" Debian policy, version 3.0.1 .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBdebhelper\fR\|(7) .PP This program is a part of debhelper. .SH "AUTHOR" .IX Header "AUTHOR" Joey Hess