1debhelper(7)                       Debhelper                      debhelper(7)
2
3
4

NAME

6       debhelper - the debhelper tool suite
7

SYNOPSIS

9       dh_* [-v] [-a] [-i] [--no-act] [-ppackage] [-Npackage] [-Ptmpdir]
10

DESCRIPTION

12       Debhelper is used to help you build a Debian package. The philosophy
13       behind debhelper is to provide a collection of small, simple, and
14       easily understood tools that are used in debian/rules to automate
15       various common aspects of building a package. This means less work for
16       you, the packager.  It also, to some degree means that these tools can
17       be changed if Debian policy changes, and packages that use them will
18       require only a rebuild to comply with the new policy.
19
20       A typical debian/rules file that uses debhelper will call several
21       debhelper commands in sequence, or use dh(1) to automate this process.
22       Examples of rules files that use debhelper are in
23       /usr/share/doc/debhelper/examples/
24
25       To create a new Debian package using debhelper, you can just copy one
26       of the sample rules files and edit it by hand. Or you can try the dh-
27       make package, which contains a dh_make command that partially automates
28       the process. For a more gentle introduction, the maint-guide Debian
29       package contains a tutorial about making your first package using
30       debhelper.
31
32       Except where the tool explicitly denotes otherwise, all of the
33       debhelper tools assume that they run from the root directory of an
34       unpacked source package.  This is so they can locate find files like
35       debian/control when needed.
36

DEBHELPER COMMANDS

38       Here is the list of debhelper commands you can use. See their man pages
39       for additional documentation.
40
41       dh_auto_build(1)
42           automatically builds a package
43
44       dh_auto_clean(1)
45           automatically cleans up after a build
46
47       dh_auto_configure(1)
48           automatically configure a package prior to building
49
50       dh_auto_install(1)
51           automatically runs make install or similar
52
53       dh_auto_test(1)
54           automatically runs a package's test suites
55
56       dh_bugfiles(1)
57           install bug reporting customization files into package build
58           directories
59
60       dh_builddeb(1)
61           build Debian binary packages
62
63       dh_clean(1)
64           clean up package build directories
65
66       dh_compress(1)
67           compress files and fix symlinks in package build directories
68
69       dh_dwz(1)
70           optimize DWARF debug information in ELF binaries via dwz
71
72       dh_fixperms(1)
73           fix permissions of files in package build directories
74
75       dh_gencontrol(1)
76           generate and install control file
77
78       dh_icons(1)
79           Update caches of Freedesktop icons
80
81       dh_install(1)
82           install files into package build directories
83
84       dh_installalternatives(1)
85           install declarative alternative rules
86
87       dh_installcatalogs(1)
88           install and register SGML Catalogs
89
90       dh_installchangelogs(1)
91           install changelogs into package build directories
92
93       dh_installcron(1)
94           install cron scripts into etc/cron.*
95
96       dh_installdeb(1)
97           install files into the DEBIAN directory
98
99       dh_installdebconf(1)
100           install files used by debconf in package build directories
101
102       dh_installdirs(1)
103           create subdirectories in package build directories
104
105       dh_installdocs(1)
106           install documentation into package build directories
107
108       dh_installemacsen(1)
109           register an Emacs add on package
110
111       dh_installexamples(1)
112           install example files into package build directories
113
114       dh_installgsettings(1)
115           install GSettings overrides and set dependencies
116
117       dh_installifupdown(1)
118           install if-up and if-down hooks
119
120       dh_installinfo(1)
121           install info files
122
123       dh_installinit(1)
124           install service init files into package build directories
125
126       dh_installinitramfs(1)
127           install initramfs hooks and setup maintscripts
128
129       dh_installlogcheck(1)
130           install logcheck rulefiles into etc/logcheck/
131
132       dh_installlogrotate(1)
133           install logrotate config files
134
135       dh_installman(1)
136           install man pages into package build directories
137
138       dh_installmenu(1)
139           install Debian menu files into package build directories
140
141       dh_installmime(1)
142           install mime files into package build directories
143
144       dh_installmodules(1)
145           register kernel modules
146
147       dh_installpam(1)
148           install pam support files
149
150       dh_installppp(1)
151           install ppp ip-up and ip-down files
152
153       dh_installsystemd(1)
154           install systemd unit files
155
156       dh_installsystemduser(1)
157           install systemd unit files
158
159       dh_installsysusers(1)
160           install and integrates systemd sysusers files
161
162       dh_installtmpfiles(1)
163           install tmpfiles.d configuration files
164
165       dh_installudev(1)
166           install udev rules files
167
168       dh_installwm(1)
169           register a window manager
170
171       dh_installxfonts(1)
172           register X fonts
173
174       dh_link(1)
175           create symlinks in package build directories
176
177       dh_lintian(1)
178           install lintian override files into package build directories
179
180       dh_listpackages(1)
181           list binary packages debhelper will act on
182
183       dh_makeshlibs(1)
184           automatically create shlibs file and call dpkg-gensymbols
185
186       dh_md5sums(1)
187           generate DEBIAN/md5sums file
188
189       dh_missing(1)
190           check for missing files
191
192       dh_movefiles(1)
193           move files out of debian/tmp into subpackages
194
195       dh_perl(1)
196           calculates Perl dependencies and cleans up after MakeMaker
197
198       dh_prep(1)
199           perform cleanups in preparation for building a binary package
200
201       dh_shlibdeps(1)
202           calculate shared library dependencies
203
204       dh_strip(1)
205           strip executables, shared libraries, and some static libraries
206
207       dh_systemd_enable(1)
208           enable/disable systemd unit files
209
210       dh_systemd_start(1)
211           start/stop/restart systemd unit files
212
213       dh_testdir(1)
214           test directory before building Debian package
215
216       dh_testroot(1)
217           ensure that a package is built with necessary level of root
218           permissions
219
220       dh_ucf(1)
221           register configuration files with ucf
222
223       dh_update_autotools_config(1)
224           Update autotools config files
225
226       dh_usrlocal(1)
227           migrate usr/local directories to maintainer scripts
228
229   Deprecated Commands
230       A few debhelper commands are deprecated and should not be used.
231
232       dh_gconf(1)
233           install GConf defaults files and register schemas (deprecated)
234
235       dh_installmanpages(1)
236           old-style man page installer (deprecated)
237
238   Other Commands
239       If a program's name starts with dh_, and the program is not on the
240       above lists, then it is not part of the debhelper package, but it
241       should still work like the other programs described on this page.
242

DEBHELPER CONFIG FILES

244       Many debhelper commands make use of files in debian/ to control what
245       they do. Besides the common debian/changelog and debian/control, which
246       are in all packages, not just those using debhelper, some additional
247       files can be used to configure the behavior of specific debhelper
248       commands. These files are typically named debian/package.foo (where
249       package of course, is replaced with the package that is being acted
250       on).
251
252       For example, dh_installdocs uses files named debian/package.docs to
253       list the documentation files it will install. See the man pages of
254       individual commands for details about the names and formats of the
255       files they use.  Generally, these files will list files to act on, one
256       file per line. Some programs in debhelper use pairs of files and
257       destinations or slightly more complicated formats.
258
259       Note for the first (or only) binary package listed in debian/control,
260       debhelper will use debian/foo when there's no debian/package.foo file.
261       However, it is often a good idea to keep the package. prefix as it is
262       more explicit.  The primary exception to this are files that debhelper
263       by default installs in every binary package when it does not have a
264       package prefix (such as debian/copyright or debian/changelog).
265
266       In some rare cases, you may want to have different versions of these
267       files for different architectures or OSes. If files named
268       debian/package.foo.ARCH or debian/package.foo.OS exist, where ARCH and
269       OS are the same as the output of "dpkg-architecture -qDEB_HOST_ARCH" /
270       "dpkg-architecture -qDEB_HOST_ARCH_OS", then they will be used in
271       preference to other, more general files.
272
273       Mostly, these config files are used to specify lists of various types
274       of files. Documentation or example files to install, files to move, and
275       so on.  When appropriate, in cases like these, you can use standard
276       shell wildcard characters (? and * and [..] character classes) in the
277       files.  You can also put comments in these files; lines beginning with
278       # are ignored.
279
280       The syntax of these files is intentionally kept very simple to make
281       them easy to read, understand, and modify.
282
283   Substitutions in debhelper config files
284       In compatibility level 13 and later, it is possible to use simple
285       substitutions in debhelper config files for the following tools:
286
287       •   dh_clean
288
289       •   dh_install
290
291       •   dh_installcatalogs
292
293       •   dh_installdeb
294
295       •   dh_installdirs
296
297       •   dh_installdocs
298
299       •   dh_installexamples
300
301       •   dh_installinfo
302
303       •   dh_installman
304
305       •   dh_installwm
306
307       •   dh_link
308
309       •   dh_missing
310
311       •   dh_ucf
312
313       All substitution variables are of the form ${foo} and the braces are
314       mandatory.  Variable names are case-sensitive and consist of
315       alphanumerics (a-zA-Z0-9), hyphens (-), underscores (_), and colons
316       (:).  The first character must be an alphanumeric.
317
318       If you need a literal dollar sign that cannot trigger a substitution,
319       you can either use the ${Dollar} substitution or the sequence ${}.
320
321       The following expansions are available:
322
323       DEB_HOST_*, DEB_BUILD_*, DEB_TARGET_*
324           Expands to the relevant dpkg-architecture(1) value (similar to
325           dpkg-architecture -qVARIABLE_HERE).
326
327           When in doubt, the DEB_HOST_* variant is the one that will work
328           both for native and cross builds.
329
330           For performance reasons, debhelper will attempt to resolve these
331           names from the environment first before consulting
332           dpkg-architecture(1).  This is mostly mentioned for completeness as
333           it will not matter for most cases.
334
335       Dollar
336           Expands to a single literal $-symbol.  This symbol will never be
337           considered part of a substitution variable.  That is:
338
339              # Triggers an error
340              ${NO_SUCH_TOKEN}
341              # Expands to the literal value "${NO_SUCH_TOKEN}"
342              ${Dollar}{NO_SUCH_TOKEN}
343
344           This variable equivalent to the sequence ${} and the two can be
345           used interchangeably.
346
347       Newline, Space, Tab
348           Expands to a single ASCII newline, space and tab respectively.
349
350           This can be useful if you need to include a literal whitespace
351           character (e.g. space) where it would otherwise be stripped or used
352           as a separator.
353
354       env:NAME
355           Expands to the environment variable NAME.  The environment variable
356           must be set (but can be set to the empty string).
357
358       Note that all variables must expand to a defined value.  As an example,
359       if debhelper sees ${env:FOO}, then it will insist that the environment
360       variable FOO is set (it can be set to the empty string).
361
362       Substitution limits
363
364       To avoid infinite loops and resource exhaustion, debhelper will stop
365       with an error if the text contains many substitution variables (50) or
366       they expand beyond a certain size (4096 characters or 3x length of the
367       original input - whichever is bigger).
368
369   Executable debhelper config files
370       If you need additional flexibility, many of the debhelper tools (e.g.
371       dh_install(1)) support executing a config file as a script.
372
373       To use this feature, simply mark the config file as executable (e.g.
374       chmod +x debian/package.install) and the tool will attempt to execute
375       it and use the output of the script.  In many cases, you can use
376       dh-exec(1) as interpreter of the config file to retain most of the
377       original syntax while getting the additional flexibility you need.
378
379       When using executable debhelper config files, please be aware of the
380       following:
381
382       •   The executable config file must exit with success (i.e. its return
383           code should indicate success).
384
385       •   In compatibility level 13+, the output will be subject to
386           substitutions (see "Substitutions in debhelper config files") where
387           the tool support these.  Remember to be careful if your generator
388           also provides substitutions as this can cause unnecessary
389           confusion.
390
391           Otherwise, the output will be used exactly as-is.  Notably,
392           debhelper will not expand wildcards or strip comments or strip
393           whitespace in the output.
394
395       If you need the package to build on a file system where you cannot
396       disable the executable bit, then you can use dh-exec(1) and its strip-
397       output script.
398

SHARED DEBHELPER OPTIONS

400       The following command line options are supported by all debhelper
401       programs.
402
403       -v, --verbose
404           Verbose mode: show all commands that modify the package build
405           directory.
406
407       --no-act
408           Do not really do anything. If used with -v, the result is that the
409           command will output what it would have done.
410
411       -a, --arch
412           Act on architecture dependent packages that should be built for the
413           DEB_HOST_ARCH architecture.
414
415       -i, --indep
416           Act on all architecture independent packages.
417
418       -ppackage, --package=package
419           Act on the package named package. This option may be specified
420           multiple times to make debhelper operate on a given set of
421           packages.
422
423       -s, --same-arch
424           Deprecated alias of -a.
425
426           This option is removed in compat 12.
427
428       -Npackage, --no-package=package
429           Do not act on the specified package even if an -a, -i, or -p option
430           lists the package as one that should be acted on.
431
432       --remaining-packages
433           Do not act on the packages which have already been acted on by this
434           debhelper command earlier (i.e. if the command is present in the
435           package debhelper log).  For example, if you need to call the
436           command with special options only for a couple of binary packages,
437           pass this option to the last call of the command to process the
438           rest of packages with default settings.
439
440       -Ptmpdir, --tmpdir=tmpdir
441           Use tmpdir for package build directory. The default is
442           debian/package
443
444       --mainpackage=package
445           This little-used option changes the package which debhelper
446           considers the "main package", that is, the first one listed in
447           debian/control, and the one for which debian/foo files can be used
448           instead of the usual debian/package.foo files.
449
450       -O=option|bundle
451           This is used by dh(1) when passing user-specified options to all
452           the commands it runs. If the command supports the specified option
453           or option bundle, it will take effect. If the command does not
454           support the option (or any part of an option bundle), it will be
455           ignored.
456

COMMON DEBHELPER OPTIONS

458       The following command line options are supported by some debhelper
459       programs.  See the man page of each program for a complete explanation
460       of what each option does.
461
462       -n  Do not modify postinst, postrm, etc. scripts.
463
464       -Xitem, --exclude=item
465           Exclude an item from processing. This option may be used multiple
466           times, to exclude more than one thing. The item is typically part
467           of a filename, and any file containing the specified text will be
468           excluded.
469
470       -A, --all
471           Makes files or other items that are specified on the command line
472           take effect in ALL packages acted on, not just the first.
473

BUILD SYSTEM OPTIONS

475       The following command line options are supported by all of the
476       dh_auto_* debhelper programs. These programs support a variety of build
477       systems, and normally heuristically determine which to use, and how to
478       use them.  You can use these command line options to override the
479       default behavior.  Typically these are passed to dh(1), which then
480       passes them to all the dh_auto_* programs.
481
482       -Sbuildsystem, --buildsystem=buildsystem
483           Force use of the specified buildsystem, instead of trying to auto-
484           select one which might be applicable for the package.
485
486           Pass none as buildsystem to disable auto-selection.
487
488       -Ddirectory, --sourcedir=directory, --sourcedirectory=directory
489           Assume that the original package source tree is at the specified
490           directory rather than the top level directory of the Debian source
491           package tree.
492
493           Warning: The --sourcedir variant matches a similar named option in
494           dh_install and dh_missing (etc.) for historical reasons.  While
495           they have a similar name, they have very distinct purposes and in
496           some cases it can cause errors when this variant is passed to dh
497           (when then passes it on to all tools).
498
499       -B[directory], --builddir[=directory], --builddirectory[=directory]
500           Enable out of source building and use the specified directory as
501           the build directory. If directory parameter is omitted, a default
502           build directory will be chosen.
503
504           If this option is not specified, building will be done in source by
505           default unless the build system requires or prefers out of source
506           tree building.  In such a case, the default build directory will be
507           used even if --builddirectory is not specified.
508
509           If the build system prefers out of source tree building but still
510           allows in source building, the latter can be re-enabled by passing
511           a build directory path that is the same as the source directory
512           path.
513
514       --parallel, --no-parallel
515           Control whether parallel builds should be used if underlying build
516           system supports them.  The number of parallel jobs is controlled by
517           the DEB_BUILD_OPTIONS environment variable ("Debian Policy, section
518           4.9.1") at build time. It might also be subject to a build system
519           specific limit.
520
521           If neither option is specified, debhelper currently defaults to
522           --parallel in compat 10 (or later) and --no-parallel otherwise.
523
524           As an optimization, dh will try to avoid passing these options to
525           subprocesses, if they are unnecessary and the only options passed.
526           Notably this happens when DEB_BUILD_OPTIONS does not have a
527           parallel parameter (or its value is 1).
528
529       --max-parallel=maximum
530           This option implies --parallel and allows further limiting the
531           number of jobs that can be used in a parallel build. If the package
532           build is known to only work with certain levels of concurrency, you
533           can set this to the maximum level that is known to work, or that
534           you wish to support.
535
536           Notably, setting the maximum to 1 is effectively the same as using
537           --no-parallel.
538
539       --reload-all-buildenv-variables
540           By default, dh(1) will compute several environment (e.g. by using
541           dpkg-buildflags(1)) and cache them to avoid having all dh_auto_*
542           tool recompute them.
543
544           When passing this option, the concrete dh_auto_* tool will ignore
545           the cache from dh(1) and retrigger a rebuild of these variables.
546           This is useful in the very rare case where the package need to do
547           multiple builds but with different ...FLAGS options.  A concrete
548           example would be needing to change the -O parameter in CFLAGS in
549           the second build:
550
551               export DEB_CFLAGS_MAINT_APPEND=-O3
552
553               %:
554                   dh $@
555
556               override_dh_auto_configure:
557                   dh_auto_configure -Bbuild-deb ...
558                   DEB_CFLAGS_MAINT_APPEND=-Os dh_auto_configure \
559                      --reload-all-buildenv-variables -Bbuild-udeb ...
560
561           Without --reload-all-buildenv-variables in the second call to
562           dh_auto_configure(1), the change in DEB_CFLAGS_MAINT_APPEND would
563           be ignored as dh_auto_configure(1) would use the cached value of
564           CFLAGS set by dh(1).
565
566           This option is only available with debhelper (>= 12.7~) when the
567           package uses compatibility level 9 or later.
568
569       --list, -l
570           List all build systems supported by debhelper on this system. The
571           list includes both default and third party build systems (marked as
572           such). Also shows which build system would be automatically
573           selected, or which one is manually specified with the --buildsystem
574           option.
575

COMPATIBILITY LEVELS

577       From time to time, major non-backwards-compatible changes need to be
578       made to debhelper, to keep it clean and well-designed as needs change
579       and its author gains more experience. To prevent such major changes
580       from breaking existing packages, the concept of debhelper compatibility
581       levels was introduced. You must tell debhelper which compatibility
582       level it should use, and it modifies its behavior in various ways.
583
584       In current debhelper, you can specify the compatibility level in
585       debian/control by adding a Build-Depends on the debhelper-compat
586       package.  For example, to use v13 mode, ensure debian/control has:
587
588         Build-Depends: debhelper-compat (= 13)
589
590       This also serves as an appropriate versioned build dependency on a
591       sufficient version of the debhelper package, so you do not need to
592       specify a separate versioned build dependency on the debhelper package
593       unless you need a specific point release of debhelper (such as for the
594       introduction of a new feature or bugfix within a compatibility level).
595
596       Note that debhelper does not provide debhelper-compat for experimental
597       or beta compatibility levels; packages experimenting with those
598       compatibility levels should use debian/compat or DH_COMPAT.
599
600       Prior versions of debhelper required specifying the compatibility level
601       in the file debian/compat, and current debhelper still supports this
602       for backward compatibility, though a package may not specify a
603       compatibility level via multiple methods at once. To use this method,
604       debian/compat should contain the compatibility level as a single
605       number, and no other content. If you specify the compatibility level by
606       this method, your package will also need a versioned build dependency
607       on a version of the debhelper package equal to (or greater than) the
608       compatibility level your package uses. So, if you specify compatibility
609       level 13 in debian/compat, ensure debian/control has:
610
611         Build-Depends: debhelper (>= 13~)
612
613       Unless otherwise indicated, all debhelper documentation assumes that
614       you are using the most recent compatibility level, and in most cases
615       does not indicate if the behavior is different in an earlier
616       compatibility level, so if you are not using the most recent
617       compatibility level, you're advised to read below for notes about what
618       is different in earlier compatibility levels.
619
620   Supported compatibility levels
621       These are the available compatibility levels:
622
623       v5  This is the lowest supported compatibility level.
624
625           If you are upgrading from an earlier compatibility level, please
626           review debhelper-obsolete-compat(7).
627
628           This mode is deprecated.
629
630       v6  Changes from v5 are:
631
632           -       Commands that generate maintainer script fragments will
633                   order the fragments in reverse order for the prerm and
634                   postrm scripts.
635
636           -       dh_installwm will install a slave manpage link for
637                   x-window-manager.1.gz, if it sees the man page in
638                   usr/share/man/man1 in the package build directory.
639
640           -       dh_builddeb did not previously delete everything matching
641                   DH_ALWAYS_EXCLUDE, if it was set to a list of things to
642                   exclude, such as CVS:.svn:.git. Now it does.
643
644           -       dh_installman allows overwriting existing man pages in the
645                   package build directory. In previous compatibility levels
646                   it silently refuses to do this.
647
648           This mode is deprecated.
649
650       v7  Changes from v6 are:
651
652           -       dh_install, will fall back to looking for files in
653                   debian/tmp if it doesn't find them in the current directory
654                   (or wherever you tell it look using --sourcedir). This
655                   allows dh_install to interoperate with dh_auto_install,
656                   which installs to debian/tmp, without needing any special
657                   parameters.
658
659           -       dh_clean will read debian/clean and delete files listed
660                   there.
661
662           -       dh_clean will delete toplevel *-stamp files.
663
664           -       dh_installchangelogs will guess at what file is the
665                   upstream changelog if none is specified.
666
667           This mode is deprecated.
668
669       v8  Changes from v7 are:
670
671           -       Commands will fail rather than warning when they are passed
672                   unknown options.
673
674           -       dh_makeshlibs will run dpkg-gensymbols on all shared
675                   libraries that it generates shlibs files for. So -X can be
676                   used to exclude libraries.  Also, libraries in unusual
677                   locations that dpkg-gensymbols would not have processed
678                   before will be passed to it, a behavior change that can
679                   cause some packages to fail to build.
680
681           -       dh requires the sequence to run be specified as the first
682                   parameter, and any switches come after it. Ie, use "dh $@
683                   --foo", not "dh --foo $@".
684
685           -       dh_auto_* prefer to use Perl's Module::Build in preference
686                   to Makefile.PL.
687
688           This mode is deprecated.
689
690       v9  Changes from v8 are:
691
692           -       Multiarch support. In particular, dh_auto_configure passes
693                   multiarch directories to autoconf in --libdir and
694                   --libexecdir.
695
696           -       dh is aware of the usual dependencies between targets in
697                   debian/rules.  So, "dh binary" will run any build, build-
698                   arch, build-indep, install, etc targets that exist in the
699                   rules file. There's no need to define an explicit binary
700                   target with explicit dependencies on the other targets.
701
702           -       dh_strip compresses debugging symbol files to reduce the
703                   installed size of -dbg packages.
704
705           -       dh_auto_configure does not include the source package name
706                   in --libexecdir when using autoconf.
707
708           -       dh does not default to enabling --with=python-support
709
710                   (Obsolete: As the dh_pysupport tool was removed from Debian
711                   stretch.  Since debhelper/10.3, dh no longer enables this
712                   sequence add-on regardless of compat level)
713
714           -       All of the dh_auto_* debhelper programs and dh set
715                   environment variables listed by dpkg-buildflags, unless
716                   they are already set.
717
718           -       dh_auto_configure passes dpkg-buildflags CFLAGS, CPPFLAGS,
719                   and LDFLAGS to perl Makefile.PL and Build.PL
720
721           -       dh_strip puts separated debug symbols in a location based
722                   on their build-id.
723
724           -       Executable debhelper config files are run and their output
725                   used as the configuration.
726
727           This mode is deprecated.
728
729       v10 Changes from v9 are:
730
731           -       dh_installinit will no longer install a file named
732                   debian/package as an init script.
733
734           -       dh_installdocs will error out if it detects links created
735                   with --link-doc between packages of architecture "all" and
736                   non-"all" as it breaks binNMUs.
737
738           -       dh_installdeb no longer installs a maintainer-provided
739                   debian/package.shlibs file.  This is now done by
740                   dh_makeshlibs instead.
741
742           -       dh_installwm refuses to create a broken package if no man
743                   page can be found (required to register for the x-window-
744                   manager alternative).
745
746           -       Debhelper will default to --parallel for all buildsystems
747                   that support parallel building.  This can be disabled by
748                   using either --no-parallel or passing --max-parallel with a
749                   value of 1.
750
751           -       The dh command will not accept any of the deprecated
752                   "manual sequence control" parameters (--before, --after,
753                   etc.).  Please use override targets instead.
754
755                   Retroactively applied to earlier compat levels: dh no
756                   longer accepts any of these since debhelper/12.4.
757
758           -       The dh command will no longer use log files to track which
759                   commands have been run.  The dh command still keeps track
760                   of whether it already ran the "build" sequence and skip it
761                   if it did.
762
763                   The main effects of this are:
764
765                   -   With this, it is now easier to debug the install or/and
766                       binary sequences because they can now trivially be re-
767                       run (without having to do a full "clean and rebuild"
768                       cycle)
769
770                   -   The main caveat is that dh_* now only keeps track of
771                       what happened in a single override target.  When all
772                       the calls to a given dh_cmd command happens in the same
773                       override target everything will work as before.
774
775                       Example of where it can go wrong:
776
777                         override_dh_foo:
778                           dh_foo -pmy-pkg
779
780                         override_dh_bar:
781                           dh_bar
782                           dh_foo --remaining
783
784                       In this case, the call to dh_foo --remaining will also
785                       include my-pkg, since dh_foo -pmy-pkg was run in a
786                       separate override target.  This issue is not limited to
787                       --remaining, but also includes -a, -i, etc.
788
789           -       The dh_installdeb command now shell-escapes the lines in
790                   the maintscript config file.  This was the original intent
791                   but it did not work properly and packages have begun to
792                   rely on the incomplete shell escaping (e.g. quoting file
793                   names).
794
795           -       The dh_installinit command now defaults to
796                   --restart-after-upgrade.  For packages needing the previous
797                   behaviour, please use --no-restart-after-upgrade.
798
799           -       The autoreconf sequence is now enabled by default.  Please
800                   pass --without autoreconf to dh if this is not desirable
801                   for a given package
802
803           -       The systemd sequence is now enabled by default.  Please
804                   pass --without systemd to dh if this is not desirable for a
805                   given package.
806
807           -       Retroactively removed: dh no longer creates the package
808                   build directory when skipping running debhelper commands.
809                   This will not affect packages that only build with
810                   debhelper commands, but it may expose bugs in commands not
811                   included in debhelper.
812
813                   This compatibility feature had a bug since its inception in
814                   debhelper/9.20130516 that made it fail to apply in compat 9
815                   and earlier.  As there has been no reports of issues caused
816                   by this bug in those ~5 years, this item have been removed
817                   rather than fixed.
818
819       v11 This mode is discouraged.
820
821           The compat 11 is discouraged for new packages as it suffers from
822           feature interaction between dh_installinit and dh_installsystemd
823           causing services to not run correctly in some cases.  Please
824           consider using compatibility mode 10 or 12 instead.  More details
825           about the issue are available in Debian#887904 and
826           <https://lists.debian.org/debian-release/2019/04/msg01442.html>.
827
828           Changes from v10 are:
829
830           -       dh_installinit no longer installs service or tmpfile files,
831                   nor generates maintainer scripts for those files.  Please
832                   use the new dh_installsystemd helper.
833
834           -       The dh_systemd_enable and dh_systemd_start helpers have
835                   been replaced by the new dh_installsystemd helper.  For the
836                   same reason, the systemd sequence for dh has also been
837                   removed.  If you need to disable the dh_installsystemd
838                   helper tool, please use an empty override target.
839
840                   Please note that the dh_installsystemd tool has a slightly
841                   different behaviour in some cases (e.g. when using the
842                   --name parameter).
843
844           -       dh_installdirs no longer creates debian/package directories
845                   unless explicitly requested (or it has to create a
846                   subdirectory in it).
847
848                   The vast majority of all packages will be unaffected by
849                   this change.
850
851           -       The makefile buildsystem now passes INSTALL="install
852                   --strip-program=true" to make(1).  Derivative buildsystems
853                   (e.g. configure or cmake) are unaffected by this change.
854
855           -       The autoconf buildsystem now passes --runstatedir=/run to
856                   ./configure.
857
858           -       The cmake buildsystem now passes
859                   -DCMAKE_INSTALL_RUNSTATEDIR=/run to cmake(1).
860
861           -       dh_installman will now prefer detecting the language from
862                   the path name rather than the extension.
863
864           -       dh_auto_install will now only create the destination
865                   directory it needs.  Previously, it would create the
866                   package build directory for all packages.  This will not
867                   affect packages that only build with debhelper commands,
868                   but it may expose bugs in commands not included in
869                   debhelper.
870
871           -       The helpers dh_installdocs, dh_installexamples,
872                   dh_installinfo, and dh_installman now error out if their
873                   config has a pattern that does not match anything or
874                   reference a path that does not exist.
875
876                   Known exceptions include building with the nodoc profile,
877                   where the above tools will silently permit failed matches
878                   where the patterns are used to specify documentation.
879
880           -       The helpers dh_installdocs, dh_installexamples,
881                   dh_installinfo, and dh_installman now accept the parameter
882                   --sourcedir with same meaning as dh_install. Furthermore,
883                   they now also fall back to debian/tmp like dh_install.
884
885                   Migration note: A bug in debhelper 11 up to 11.1.5 made
886                   dh_installinfo incorrectly ignore --sourcedir.
887
888           -       The perl-makemaker and perl-build build systems no longer
889                   pass -I. to perl.  Packages that still need this behaviour
890                   can emulate it by using the PERL5LIB environment variable.
891                   E.g. by adding export PERL5LIB=. in their debian/rules file
892                   (or similar).
893
894           -       The PERL_USE_UNSAFE_INC environment variable is no longer
895                   set by dh or any of the dh_auto_* tools.  It was added as a
896                   temporary work around to avoid a lot of packages failing to
897                   build at the same time.
898
899                   Note this item will eventually become obsolete as upstream
900                   intends to drop support for the PERL_USE_UNSAFE_INC
901                   environment variable.  When perl drops support for it, then
902                   this variable will be removed retroactively from existing
903                   compat levels as well.
904
905           -       The dh_makeshlibs helper will now exit with an error if
906                   objdump returns a non-zero exit from analysing a given
907                   file.
908
909           -       The dh_installdocs and dh_installexamples tools may now
910                   install most of the documentation in a different path to
911                   comply with the recommendation from Debian policy §12.3
912                   (since version 3.9.7).
913
914                   Note that if a given source package only contains a single
915                   binary package in debian/control or none of the packages
916                   are -doc packages, then this change is not relevant for
917                   that source package and you can skip to the next change.
918
919                   By default, these tools will now attempt to determine a
920                   "main package for the documentation" (called a doc-main-
921                   package from here on) for every -doc package.  If they find
922                   such a doc-main-package, they will now install the
923                   documentation into the path /usr/share/doc/doc-main-package
924                   in the given doc package.  I.e. the path can change but the
925                   documentation is still shipped in the -doc package.
926
927                   The --doc-main-package option can be used when the auto-
928                   detection is insufficient or to reset the path to its
929                   previous value if there is a reason to diverge from Debian
930                   policy recommendation.
931
932                   Some documentation will not be affected by this change.
933                   These exceptions include the copyright file, changelog
934                   files, README.Debian, etc.  These files will still be
935                   installed in the path /usr/share/doc/package.
936
937           -       The dh_strip and dh_shlibdeps tools no longer uses filename
938                   patterns to determine which files to process.  Instead,
939                   they open the file and look for an ELF header to determine
940                   if a given file is an shared object or an ELF executable.
941
942                   This change may cause the tools to process more files than
943                   previously.
944
945       v12 Changes from v11 are:
946
947           -       The dh_makeshlibs tool now generates shlibs files with
948                   versioned dependency by default.  This means that
949                   -VUpstream-Version (a.k.a. -V) is now the default.
950
951                   If an unversioned dependency in the shlibs file is wanted,
952                   this can be obtained by passing -VNone instead.  However,
953                   please see dh_makeshlibs(1) for the caveat of unversioned
954                   dependencies.
955
956           -       The -s (--same-arch) option is removed.  Please use -a
957                   (--arch) instead.
958
959           -       Invoking dh_clean -k now causes an error instead of a
960                   deprecation warning.
961
962           -       The --no-restart-on-upgrade option in dh_installinit has
963                   been removed.  Please use the new name --no-stop-on-upgrade
964
965           -       There was a bug in the doit (and similar) functions from
966                   Debian::Debhelper::Dh_Lib that made them spawn a shell in
967                   one particular circumstance.  This bug is now removed and
968                   will cause helpers that rely on the bug to fail with a
969                   "command not found"-error.
970
971           -       The --list-missing and --fail-missing in dh_install has
972                   been removed.  Please use dh_missing and its corresponding
973                   options, which can also see the files installed by other
974                   helpers.
975
976           -       The dh_installinit helper no longer installs configuration
977                   for the upstart init system.  Instead, it will abort the
978                   build if it finds an old upstart configuration file.  The
979                   error is there to remind the package maintainer to ensure
980                   the proper removal of the conffiles shipped in previous
981                   versions of the package (if any).
982
983           -       The dh_installdeb tool will do basic validation of some
984                   dpkg-maintscript-helper(1) commands and will error out if
985                   the commands appear to be invalid.
986
987           -       The dh_missing tool will now default to --list-missing.
988
989           -       The dh_makeshlibs tool will now only pass libraries to
990                   dpkg-gensymbols(1) if the ELF binary has a SONAME
991                   (containing ".so").
992
993           -       The dh_compress tool no longer compresses examples (i.e.
994                   anything installed in </usr/share/doc/package/examples>.)
995
996           -       The standard sequence in dh now includes dh_dwz and
997                   dh_installinitramfs by default.  This makes the dwz and
998                   installinitramfs sequences obsolete and they will now fail
999                   with an error.  If you want to skip these commands, then
1000                   please insert an empty override target for them in
1001                   debian/rules (e.g. override_dh_dwz:)
1002
1003           -       The build systems meson and autoconf no longer explicitly
1004                   set the --libexecdir variable and thus relies on the build
1005                   system default - which should be /usr/libexec (per FHS 3.0,
1006                   adopted in Debian Policy 4.1.5).
1007
1008                   If a particular upstream package does not use the correct
1009                   default, the parameter can often be passed manually via
1010                   dh_auto_configure(1).  E.g.  via the following example:
1011
1012                       override_dh_auto_configure:
1013                           dh_auto_configure -- --libexecdir=/usr/libexec
1014
1015                   Note the -- before the --libexecdir parameter.
1016
1017           -       The dh_installdeb tool no longer installs the maintainer
1018                   provided conffiles file.  The file has mostly been obsolete
1019                   since compatibility level 3, where dh_installdeb began to
1020                   automatically compute the resulting conffiles control file.
1021
1022           -       The dh_installsystemd tool no longer relies on
1023                   dh_installinit for handling systemd services that have a
1024                   sysvinit alternative.  Both tools must now be used in such
1025                   a case to ensure the service is properly started under both
1026                   sysvinit and systemd.
1027
1028                   If you have an override for dh_installinit (e.g. to call it
1029                   with --no-start) then you will probably need one for
1030                   dh_installsystemd as well now.
1031
1032                   This change makes dh_installinit inject a misc:Pre-Depends
1033                   for init-system-helpers (>= 1.54~).  Please ensure that the
1034                   package lists ${misc:Pre-Depends} in its Pre-Depends field
1035                   before upgrading to compat 12.
1036
1037           -       The third-party dh_golang tool (from dh-golang package) now
1038                   defaults on honoring DH_GOLANG_EXCLUDES variable for source
1039                   installation in -dev packages and not only during the
1040                   building process. Please set DH_GOLANG_EXCLUDES_ALL to
1041                   false to revert to the previous behaviour. See
1042                   Debian::Debhelper::Buildsystem::golang(3pm) for details and
1043                   examples.
1044
1045           -       dh_installsystemduser is now included in the dh standard
1046                   sequence by default.
1047
1048           -       The python-distutils buildsystem is now removed.  Please
1049                   use the third-party build system pybuild instead.
1050
1051       v13 This is the recommended mode of operation.
1052
1053           Changes from v12 are:
1054
1055           -       The meson+ninja build system now uses meson test instead of
1056                   ninja test when running the test suite.  Any override of
1057                   dh_auto_test that passes extra parameters to upstream test
1058                   runner should be reviewed as meson test is not command line
1059                   compatible with ninja test.
1060
1061           -       All debhelper like tools based on the official debhelper
1062                   library (including dh and the official dh_* tools) no
1063                   longer accepts abbreviated command parameters.  At the same
1064                   time, dh now optimizes out calls to redundant dh_* helpers
1065                   even when passed long command line options.
1066
1067           -       The ELF related debhelper tools (dh_dwz, dh_strip,
1068                   dh_makeshlibs, dh_shlibdeps) are now only run for arch
1069                   dependent packages by default (i.e. they are excluded from
1070                   *-indep targets and are passed -a by default). If you need
1071                   them for *-indep targets, you can add an explicit Build-
1072                   Depends on dh-sequence-elf-tools.
1073
1074           -       The third-party gradle build system (from gradle-debian-
1075                   helper package) now runs the upstream-provided test suite
1076                   automatically.  To suppress such behavior, override
1077                   dh_auto_test.
1078
1079           -       The dh_installman tool now aborts if it sees conflicting
1080                   definitions of a manpage.  This typically happens if the
1081                   upstream build system is installing a compressed version
1082                   and the package lists an uncompressed version of the
1083                   manpage in debian/package.manpages.  Often the easiest fix
1084                   is to remove the manpage from debian/package.manpages
1085                   (assuming both versions are identical).
1086
1087           -       The dh_auto_* helpers now reset the environment variables
1088                   HOME and common XDG_* variable.  Please see description of
1089                   the environment variables in "ENVIRONMENT" for how this is
1090                   handled.
1091
1092                   This feature changed between debhelper 13 and debhelper
1093                   13.2.
1094
1095           -       The dh command will now error if an override or hook target
1096                   for an obsolete command are present in debian/rules (e.g.
1097                   override_dh_systemd_enable:).
1098
1099           -       The dh_missing command will now default to --fail-missing.
1100                   This can be reverted to a non-fatal warning by explicitly
1101                   passing --list-missing like it was in compat 12.
1102
1103                   If you do not want the warning either, please omit the call
1104                   to dh_missing.  If you use the dh command sequencer, then
1105                   you can do this by inserting an empty override target in
1106                   the debian/rules file of the relevant package.  As an
1107                   example:
1108
1109                       # Disable dh_missing
1110                       override_dh_missing:
1111
1112           -       The dh command sequencer now runs dh_installtmpfiles in the
1113                   default sequence.  The dh_installtmpfiles takes over
1114                   handling of tmpfiles.d configuration files.  Related
1115                   functionality in dh_installsystemd is now disabled.
1116
1117                   Note that dh_installtmpfiles responds to
1118                   debian/package.tmpfiles where dh_installsystemd used a name
1119                   without the trailing "s".
1120
1121           -       Many dh_* tools now support limited variable expansion via
1122                   the ${foo} syntax.  In many cases, this can be used to
1123                   reference paths that contain either spaces or
1124                   dpkg-architecture(1) values.  While this can reduce the
1125                   need for dh-exec(1) in some cases, it is not a replacement
1126                   dh-exec(1) in general.  If you need filtering, renaming,
1127                   etc., the package will still need dh-exec(1).
1128
1129                   Please see "Substitutions in debhelper config files" for
1130                   syntax and available substitution variables.  To dh_* tool
1131                   writers, substitution expansion occurs as a part of the
1132                   filearray and filedoublearray functions.
1133
1134           -       The dh command sequencer will now skip all hook and
1135                   override targets for dh_auto_test, dh_dwz and dh_strip when
1136                   DEB_BUILD_OPTIONS lists the relevant nocheck / nostrip
1137                   options.
1138
1139                   Any package relying on these targets to always be run
1140                   should instead move relevant logic out of those targets.
1141                   E.g. non-test related packaging code from
1142                   override_dh_auto_test would have to be moved to
1143                   execute_after_dh_auto_build or
1144                   execute_before_dh_auto_install.
1145
1146           -       The cmake buildsystem now passes
1147                   -DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY=ON to cmake(1) to speed
1148                   up automatic installation process. If for some reason you
1149                   need previous behavior, override the flag:
1150
1151                       dh_auto_configure -- -DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY=OFF ...
1152
1153       v14 This compatibility level is still open for development; use with
1154           caution.
1155
1156           Changes from v13 are:
1157
1158           -       The cmake buildsystem now passes -DCMAKE_SKIP_RPATH=ON and
1159                   -DCMAKE_BUILD_RPATH_USE_ORIGIN=ON to cmake(1) to avoid some
1160                   reproducibility issues.
1161
1162                   This can cause issues with running binaries directly from
1163                   the build directories as they might now require a manually
1164                   set LD_LIBRARY_PATH.  If you need to override this change,
1165                   we recommend that you try to pass the
1166                   -DCMAKE_SKIP_RPATH=OFF option first to see if that fixes
1167                   the problem (leaving CMAKE_BUILD_RPATH_USE_ORIGIN at its
1168                   new default).  This should undo the need for
1169                   LD_LIBRARY_PATH and avoid the reproducibility issues on
1170                   Linux, where $ORIGIN is supported by the runtime linkers.
1171
1172           -       The tool dh_installsysusers is now included in the default
1173                   sequence.
1174

NOTES

1176   Multiple binary package support
1177       If your source package generates more than one binary package,
1178       debhelper programs will default to acting on all binary packages when
1179       run. If your source package happens to generate one architecture
1180       dependent package, and another architecture independent package, this
1181       is not the correct behavior, because you need to generate the
1182       architecture dependent packages in the binary-arch debian/rules target,
1183       and the architecture independent packages in the binary-indep
1184       debian/rules target.
1185
1186       To facilitate this, as well as give you more control over which
1187       packages are acted on by debhelper programs, all debhelper programs
1188       accept the -a, -i, -p, and -s parameters. These parameters are
1189       cumulative.  If none are given, debhelper programs default to acting on
1190       all packages listed in the control file, with the exceptions below.
1191
1192       First, any package whose Architecture field in debian/control does not
1193       match the DEB_HOST_ARCH architecture will be excluded ("Debian Policy,
1194       section 5.6.8").
1195
1196       Also, some additional packages may be excluded based on the contents of
1197       the DEB_BUILD_PROFILES environment variable and Build-Profiles fields
1198       in binary package stanzas in debian/control, according to the draft
1199       policy at <https://wiki.debian.org/BuildProfileSpec>.
1200
1201       Interaction between package selections and Build-Profiles
1202
1203       Build-Profiles affect which packages are included in the package
1204       selections mechanisms in debhelper.  Generally, the package selections
1205       are described from the assumption that all packages are enabled.  This
1206       section describes how the selections react when a package is disabled
1207       due to the active Build-Profiles (or lack of active Build-Profiles).
1208
1209       -a/--arch, -i/--indep OR no selection options (a raw "dh_X" call)
1210           The package disabled by Build-Profiles is silently excluded from
1211           the selection.
1212
1213           Note you will receive a warning if all packages related to these
1214           selections are disabled.  In that case, it generally does not make
1215           sense to do the build in the first place.
1216
1217       -N package / --no-package package
1218           The option is accepted and effectively does nothing.
1219
1220       -p package / --package package
1221           The option is accepted, but debhelper will not act on the package.
1222
1223       Note that it does not matter whether a package is enabled or disabled
1224       by default.
1225
1226   Automatic generation of Debian install scripts
1227       Some debhelper commands will automatically generate parts of Debian
1228       maintainer scripts. If you want these automatically generated things
1229       included in your existing Debian maintainer scripts, then you need to
1230       add #DEBHELPER# to your scripts, in the place the code should be added.
1231       #DEBHELPER# will be replaced by any auto-generated code when you run
1232       dh_installdeb.
1233
1234       If a script does not exist at all and debhelper needs to add something
1235       to it, then debhelper will create the complete script.
1236
1237       All debhelper commands that automatically generate code in this way let
1238       it be disabled by the -n parameter (see above).
1239
1240       Note that the inserted code will be shell code, so you cannot directly
1241       use it in a Perl script. If you would like to embed it into a Perl
1242       script, here is one way to do that (note that I made sure that $1, $2,
1243       etc are set with the set command):
1244
1245         my $temp="set -e\nset -- @ARGV\n" . << 'EOF';
1246         #DEBHELPER#
1247         EOF
1248         if (system($temp)) {
1249            my $exit_code = ($? >> 8) & 0xff;
1250            my $signal = $? & 0x7f;
1251            if ($exit_code) {
1252                die("The debhelper script failed with error code: ${exit_code}");
1253            } else {
1254                die("The debhelper script was killed by signal: ${signal}");
1255            }
1256         }
1257
1258   Automatic generation of miscellaneous dependencies.
1259       Some debhelper commands may make the generated package need to depend
1260       on some other packages. For example, if you use dh_installdebconf(1),
1261       your package will generally need to depend on debconf. Or if you use
1262       dh_installxfonts(1), your package will generally need to depend on a
1263       particular version of xutils. Keeping track of these miscellaneous
1264       dependencies can be annoying since they are dependent on how debhelper
1265       does things, so debhelper offers a way to automate it.
1266
1267       All commands of this type, besides documenting what dependencies may be
1268       needed on their man pages, will automatically generate a substvar
1269       called ${misc:Depends}. If you put that token into your debian/control
1270       file, it will be expanded to the dependencies debhelper figures you
1271       need.
1272
1273       This is entirely independent of the standard ${shlibs:Depends}
1274       generated by dh_makeshlibs(1), and the ${perl:Depends} generated by
1275       dh_perl(1).  You can choose not to use any of these, if debhelper's
1276       guesses don't match reality.
1277
1278   Package build directories
1279       By default, all debhelper programs assume that the temporary directory
1280       used for assembling the tree of files in a package is debian/package.
1281
1282       Sometimes, you might want to use some other temporary directory. This
1283       is supported by the -P flag. For example, "dh_installdocs
1284       -Pdebian/tmp", will use debian/tmp as the temporary directory. Note
1285       that if you use -P, the debhelper programs can only be acting on a
1286       single package at a time. So if you have a package that builds many
1287       binary packages, you will need to also use the -p flag to specify which
1288       binary package the debhelper program will act on.
1289
1290   udebs
1291       Debhelper includes support for udebs. To create a udeb with debhelper,
1292       add "Package-Type: udeb" to the package's stanza in debian/control.
1293       Debhelper will try to create udebs that comply with debian-installer
1294       policy, by making the generated package files end in .udeb, not
1295       installing any documentation into a udeb, skipping over preinst,
1296       postrm, prerm, and config scripts, etc.
1297

ENVIRONMENT

1299       This section describes some of the environment variables that
1300       influences the behaviour of debhelper or which debhelper interacts
1301       with.
1302
1303       It is important to note that these must be actual environment variables
1304       in order to affect the behaviour of debhelper (not simply Makefile
1305       variables).  To specify them properly in debian/rules, be sure to
1306       "export" them. For example, "export DH_VERBOSE".
1307
1308       DH_VERBOSE
1309           Set to 1 to enable verbose mode. Debhelper will output every
1310           command it runs. Also enables verbose build logs for some build
1311           systems like autoconf.
1312
1313       DH_QUIET
1314           Set to 1 to enable quiet mode. Debhelper will not output commands
1315           calling the upstream build system nor will dh print which
1316           subcommands are called and depending on the upstream build system
1317           might make that more quiet, too.  This makes it easier to spot
1318           important messages but makes the output quite useless as buildd
1319           log.  Ignored if DH_VERBOSE is also set.
1320
1321       DH_COMPAT
1322           Temporarily specifies what compatibility level debhelper should run
1323           at, overriding any value specified via Build-Depends on debhelper-
1324           compat or via the debian/compat file.
1325
1326       DH_NO_ACT
1327           Set to 1 to enable no-act mode.
1328
1329       DH_OPTIONS
1330           All debhelper tools will parse command line arguments listed in
1331           this variable before any command option (as if they had been
1332           prepended to the command line arguments).  Unfortunately, some
1333           third-party provided tools may not support this variable and will
1334           ignore these command line arguments.
1335
1336           When using dh(1), it can be passed options that will be passed on
1337           to each debhelper command, which is generally better than using
1338           DH_OPTIONS.
1339
1340       DH_ALWAYS_EXCLUDE
1341           If set, this adds the value the variable is set to to the -X
1342           options of all commands that support the -X option. Moreover,
1343           dh_builddeb will rm -rf anything that matches the value in your
1344           package build tree.
1345
1346           This can be useful if you are doing a build from a CVS source tree,
1347           in which case setting DH_ALWAYS_EXCLUDE=CVS will prevent any CVS
1348           directories from sneaking into the package you build. Or, if a
1349           package has a source tarball that (unwisely) includes CVS
1350           directories, you might want to export DH_ALWAYS_EXCLUDE=CVS in
1351           debian/rules, to make it take effect wherever your package is
1352           built.
1353
1354           Multiple things to exclude can be separated with colons, as in
1355           DH_ALWAYS_EXCLUDE=CVS:.svn
1356
1357       DH_EXTRA_ADDONS
1358           If set, this adds the specified dh addons to be run in the
1359           appropriate places in the sequence of commands. This is equivalent
1360           to specifying the addon to run with the --with flag in the
1361           debian/rules file. Any --without calls specifying an addon in this
1362           environment variable will not be run.
1363
1364           This is intended to be used by downstreams or specific local
1365           configurations that require a debhelper addon to be run during
1366           multiple builds without having to patch a large number of rules
1367           file. If at all possible, this should be avoided in favor of a
1368           --with flag in the rules file.
1369
1370       DH_COLORS, DPKG_COLORS
1371           These variables can be used to control whether debhelper commands
1372           should use colors in their textual output.  Can be set to "always",
1373           "auto" (the default), or "never".
1374
1375           Note that DPKG_COLOR also affects a number of dpkg related tools
1376           and debhelper uses it on the assumption that you want the same
1377           color setting for dpkg and debhelper.  In the off-hand chance you
1378           want different color setting for debhelper, you can use DH_COLORS
1379           instead or in addition to DPKG_COLORS.
1380
1381       NO_COLOR
1382           If no explicit request for color has been given (e.g. DH_COLORS and
1383           DPKG_COLORS are both unset), the presence of this environment
1384           variable cause the default color setting to be "never".
1385
1386           The variable is defined according to <https://no-color.org/>.  In
1387           this project, the environment variables (such as DH_COLORS) are
1388           considered an explicit request for color.
1389
1390       CFLAGS, CPPFLAGS, CXXFLAGS, OBJCFLAGS, OBJCXXFLAGS, GCJFLAGS, FFLAGS,
1391       FCFLAGS, LDFLAGS
1392           By default (in any non-deprecated compat level), debhelper will
1393           automatically set these flags by using dpkg-buildflags(1), when
1394           they are unset.  If you need to change the default flags, please
1395           use the features from dpkg-buildflags(1) to do this (e.g.
1396           DEB_BUILD_MAINT_OPTIONS=hardening=all or
1397           DEB_CPPFLAGS_MAINT_APPEND=-DCUSTOM_MACRO=true) rather than setting
1398           the concrete variable directly.
1399
1400       HOME, XDG_*
1401           In compat 13 and later, these environment variables are reset
1402           before invoking the upstream build system via the dh_auto_*
1403           helpers.  The variables HOME (all dh_auto_* helpers) and
1404           XDG_RUNTIME_DIR (dh_auto_test only) will be set to a writable
1405           directory. All remaining variables and XDG_RUNTIME_DIR (except for
1406           during dh_auto_test) will be cleared.
1407
1408           The HOME directory will be created as an empty directory but it
1409           will be reused between calls to dh_auto_*.  Any content will
1410           persist until explicitly deleted or dh_clean.
1411
1412       DEB_BUILD_OPTIONS
1413           Please see "Supported flags in DEB_BUILD_OPTIONS" for this
1414           environment variable.
1415
1416           Please note that this variable should not be altered by package
1417           maintainers inside debian/rules to change the behaviour of
1418           debhelper.  Instead, where the package maintainer need these
1419           features, they should look disabling the relevant feature directly
1420           (e.g. by overriding the concrete tools).
1421
1422       DEB_MAINT_BUILD_OPTIONS
1423           This is a dpkg specific environment variable (see e.g.
1424           dpkg-buildflags(1)).  The debhelper tool suite silently ignores it.
1425
1426           It is documented here because it has a similar name to
1427           DEB_BUILD_OPTIONS, which make some people mistakenly assume that
1428           debhelper will also react to this variable.
1429
1430   Supported flags in DEB_BUILD_OPTIONS
1431       The debhelper tool suite reacts to the following flags in
1432       DEB_BUILD_OPTIONS.
1433
1434       dherroron=obsolete-compat-levels
1435           This is a debhelper specific value.
1436
1437           When dherroron is present and set to obsolete-compat-levels, then
1438           debhelper tools will promote deprecation warnings for usage of old
1439           soon to be removed compat levels into errors.
1440
1441           This is useful for automated checking for code relying on
1442           deprecated compat levels that is scheduled for removal.
1443
1444           This option is intended for testing purposes; not production
1445           builds.
1446
1447       nostrip
1448           This value will change the content of the debs being built.  The
1449           .deb packages built when this is set is therefore not bit-for-bit
1450           reproducible with a regular build in the general case.
1451
1452           This value will cause the official debhelper tools will skip
1453           actions and helpers that either remove, detach or deduplicate
1454           debugging symbols in ELF binaries.
1455
1456           This value affects dh_dwz(1) and dh_strip(1).
1457
1458       nocheck
1459           This value will cause the official debhelper build systems to skip
1460           runs of upstream test suites.
1461
1462           Package maintainers looking to avoid running the upstream tests
1463           should not rely on this.  Instead, they can add an empty override
1464           target to skip dh_auto_test.
1465
1466           This value affects dh_auto_test(1).
1467
1468       nodoc
1469           This value will change the content of the debs being built.  The
1470           .deb packages built when this is set is therefore not bit-for-bit
1471           reproducible with a regular build in the general case.
1472
1473           This value will cause several debhelper tools to skip installation
1474           of documentation such as manpages or upstream provided
1475           documentation.  Additionally, the tools will also ignore if
1476           declared documentation is "missing" on the assumption that the
1477           documentation has not been built.
1478
1479           This value effects tools like dh_installdocs(1), which knows it is
1480           working with documentation.
1481
1482       noautodbgsym, noddebs
1483           The official name is autodbgsym.  The noddebs variant is accepted
1484           for historical reasons.
1485
1486           This value causes debhelper to skip the generation of automatically
1487           generated debug symbol packages.
1488
1489           This value affects dh_strip(1).
1490
1491       parallel=N
1492           This value enables debhelper to use up to N threads or processes
1493           (subject to parameters like --no-parallel and --max-parallel=M).
1494           Not all debhelper tools work with parallel tasks and may silently
1495           ignore the request.
1496
1497           This value affects many debhelper tools.  Most notably dh_auto_*,
1498           which will attempt to run the underlying upstream build system with
1499           that number of threads.
1500
1501       terse
1502           This value will cause the official debhelper build systems to
1503           configure upstream builds to be terse (i.e. reduce verbosity in
1504           their output).  This is subject to the upstream and the debhelper
1505           build system supporting such features.
1506
1507           This value affects most dh_auto_* tools.
1508
1509       Unknown flags are silently ignored.
1510
1511       Note third-party debhelper-like tools or third-party provided build
1512       systems may or may not react to the above flags.  This tends to depend
1513       on implementation details of the tool.
1514

SEE ALSO

1516       /usr/share/doc/debhelper/examples/
1517           A set of example debian/rules files that use debhelper.
1518
1519       <http://joeyh.name/code/debhelper/>
1520           Debhelper web site.
1521

AUTHOR

1523       Joey Hess <joeyh@debian.org>
1524
1525
1526
152713.3.4                            2021-05-13                      debhelper(7)
Impressum