1DH_STRIP(1)                        Debhelper                       DH_STRIP(1)
2
3
4

NAME

6       dh_strip - strip executables, shared libraries, and some static
7       libraries
8

SYNOPSIS

10       dh_strip [debhelperĀ options] [-Xitem] [--dbg-package=package]
11       [--keep-debug]
12

DESCRIPTION

14       dh_strip is a debhelper program that is responsible for stripping
15       executables, shared libraries, and static libraries that are not used
16       for debugging.
17
18       This program examines your package build directories and works out what
19       to strip on its own. It uses file(1) and file permissions and filenames
20       to figure out what files are shared libraries (*.so), executable
21       binaries, and static (lib*.a) and debugging libraries (lib*_g.a,
22       debug/*.so), and strips each as much as is possible. (Which is not at
23       all for debugging libraries.) In general it seems to make very good
24       guesses, and will do the right thing in almost all cases.
25
26       Since it is very hard to automatically guess if a file is a module, and
27       hard to determine how to strip a module, dh_strip does not currently
28       deal with stripping binary modules such as .o files.
29

OPTIONS

31       -Xitem, --exclude=item
32           Exclude files that contain item anywhere in their filename from
33           being stripped. You may use this option multiple times to build up
34           a list of things to exclude.
35
36       --dbg-package=package
37           This option is a now special purpose option that you normally do
38           not need.  In most cases, there should be little reason to use this
39           option for new source packages as debhelper automatically generates
40           debug packages ("dbgsym packages").  If you have a manual
41           --dbg-package that you want to replace with an automatically
42           generated debug symbol package, please see the --dbgsym-migration
43           option.
44
45           Causes dh_strip to save debug symbols stripped from the packages it
46           acts on as independent files in the package build directory of the
47           specified debugging package.
48
49           For example, if your packages are libfoo and foo and you want to
50           include a foo-dbg package with debugging symbols, use dh_strip
51           --dbg-package=foo-dbg.
52
53           This option implies --no-automatic-dbgsym and cannot be used with
54           --automatic-dbgsym or --dbgsym-migration.
55
56       -k, --keep-debug
57           This option is a now special purpose option that you normally do
58           not need.  In most cases, there should be little reason to use this
59           option for new source packages as debhelper automatically generates
60           debug packages ("dbgsym packages").  If you have a manual
61           --dbg-package that you want to replace with an automatically
62           generated debug symbol package, please see the --dbgsym-migration
63           option.
64
65           Debug symbols will be retained, but split into an independent file
66           in usr/lib/debug/ in the package build directory. --dbg-package is
67           easier to use than this option, but this option is more flexible.
68
69           This option implies --no-automatic-dbgsym and cannot be used with
70           --automatic-dbgsym.
71
72       --dbgsym-migration=package-relation
73           This option is used to migrate from a manual "-dbg" package
74           (created with --dbg-package) to an automatic generated debug symbol
75           package. This option should describe a valid Replaces- and
76           Breaks-relation, which will be added to the debug symbol package to
77           avoid file conflicts with the (now obsolete) -dbg package.
78
79           This option implies --automatic-dbgsym and cannot be used with
80           --keep-debug, --dbg-package or --no-automatic-dbgsym.
81
82           Examples:
83
84             dh_strip --dbgsym-migration='libfoo-dbg (<< 2.1-3~)'
85
86             dh_strip --dbgsym-migration='libfoo-tools-dbg (<< 2.1-3~), libfoo2-dbg (<< 2.1-3~)'
87
88       --automatic-dbgsym, --no-automatic-dbgsym
89           Control whether dh_strip should be creating debug symbol packages
90           when possible.
91
92           The default is to create debug symbol packages.
93
94       --ddebs, --no-ddebs
95           Historical name for --automatic-dbgsym and --no-automatic-dbgsym.
96
97       --ddeb-migration=package-relation
98           Historical name for --dbgsym-migration.
99

NOTES

101       If the DEB_BUILD_OPTIONS environment variable contains nostrip, nothing
102       will be stripped, in accordance with Debian policy (section 10.1
103       "Binaries").  This will also inhibit the automatic creation of debug
104       symbol packages.
105
106       The automatic creation of debug symbol packages can also be prevented
107       by adding noautodbgsym to the DEB_BUILD_OPTIONS environment variable.
108       However, dh_strip will still add debuglinks to ELF binaries when this
109       flag is set.  This is to ensure that the regular deb package will be
110       identical with and without this flag (assuming it is otherwise "bit-
111       for-bit" reproducible).
112

CONFORMS TO

114       Debian policy, version 3.0.1
115

SEE ALSO

117       debhelper(7)
118
119       This program is a part of debhelper.
120

AUTHOR

122       Joey Hess <joeyh@debian.org>
123
124
125
12611.4                              2018-09-09                       DH_STRIP(1)
Impressum