[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dbgsym packages and backports



On Thu, Jan 14, 2016, at 23:02, Bálint Réczey wrote:
> override_dh_strip:
>         dh_strip --ddeb-migration="kodi-dbg (<< 15.1+dfsg1-4~)" ||
>         dh_strip

I do a lot of backporting outside debian-backports for PHP and
not-having dbg symbols is not really an option, so I needed an option to
build both - real -dbgsym in unstable and old -dbg package in anything
older.

Here's the example patch that seems to work on src:libbson:

http://paste.debian.net/396361/

and here are the relevant annotated parts

ifeq ($(shell if dpkg --compare-versions 9.20160114 le $$(dpkg-query
-f'$${Version}' -W debhelper); then echo dbgsym; fi),dbgsym)
  DBGSYM_EXCLUDE_PACKAGES := -Nlibbson-dbg
  DBSYM_DH_STRIP_OPTIONS := --dbgsym-migration='libbson-dbg'
else
  DBSYM_DH_STRIP_OPTIONS := --dbg-package=libbson-dbg
endif

Set the excluded packages and dh_strip options according to debhelper
version. Note Niels comment here:

> A little known "secret": The relation given to "--ddeb-migration" is
> /not/ required to be versioned (if you do not mind a "I"-tag from lintian).

%:
       dh $@ --with autoreconf $(DBGSYM_EXCLUDE_PACKAGES)
 
This parts excludes old libbson-dbg package from any automatic debhelper
command; if you override something that touches dbg package, you need to
add $(DBGSYM_EXCLUDE) there as well.

override_dh_strip:
        dh_strip $(DBSYM_DH_STRIP_OPTIONS)

Runs the correct form of dh_strip. 

Cheers,
-- 
Ondřej Surý <ondrej@sury.org>
Knot DNS (https://www.knot-dns.cz/) – a high-performance DNS server


Reply to: