On Wed, 24 Jan 2018 13:37:40 +0100 Ansgar Burchardt <[email protected]>
wrote:
> Package: debhelper
> Version: 11.1.2
> Severity: wishlist
> 
> dh_strip should also include debug symbols for maintainer "scripts"
> that are binary programs in the *-dbgsym packages.
> 
> The only example I'm aware of is dash (preinst).
> 
> Ansgar
> 
> 

Having reviewed the code; I /think/ dh_strip does that by default.
However, the default dh sequence calls dh_strip prior to dh_installdeb
(which installs the "maintscripts" files).

AFAICT:

 * dh_strip must be run before dh_gencontrol (or we get inaccurate
   Installed-Size fields)

 * dh_installdeb can be run before or after dh_strip (they have no
   particular relation beyond the one mentioned above).

 * dh_strip + dh_dwz can be run before or after dh_makeshlibs and
   dh_shlibdeps.  (Presumably at some negligible overhead of having
   the tooling to wade through debug info)

 * dh_installdeb wants to be run after dh_makeshlibs and dh_shlibs.
   Notably, there are some compat constraints that require this at the
   moment.

With this, the following sequence should satisfy the constraints (review
welcome):


NEW SEQUENCE:
        [...]
        dh_compress
        dh_fixperms
        dh_missing
        dh_makeshlibs  # ARCH-only
        dh_shlibdeps   # ARCH-only
        dh_installdeb
        dh_dwz         # ARCH-only (compat 12+)
        dh_strip       # ARCH-only
        dh_gencontrol
        dh_md5sums
        dh_builddeb


CURRENT SEQUENCE (for comparison):
        [...]
        dh_compress
        dh_fixperms
        dh_missing
        dh_dwz         # ARCH-only (compat 12+)
        dh_strip       # ARCH-only
        dh_makeshlibs  # ARCH-only
        dh_shlibdeps   # ARCH-only
        dh_installdeb
        dh_gencontrol
        dh_md5sums
        dh_builddeb

As mentioned; a review is welcome.  Changes to the sequence require a
compat bump, so it can at earliest appear in compat 12.

Thanks,
~Niels

Reply via email to