Package: debhelper
Version: 13.23~bpo12+1
Severity: wishlist
X-Debbugs-Cc: cru...@debian.org

As the primary maintainer of a header-only C/C++ package, I'm really happy to 
see the progress in formalizing the use of 'Static-Built-Using' [0] to aid in 
determining when packages that use header-only libraries [1] need a binNMU 
rebuild.

However I'm concerned about the cost of implementing this manually and I would 
like to find an automatic solution so that we don't have to manually update 
every packaged that Build-Depends on a header-only library.

While `dh_builtusing`[2] makes this a lot easier, maintainers still have to 
identify which of their dependencies are header-only libraries, not to mention 
which of their packages need upgrading.

I would like to help extend debhelper to detect these automatically, and add 
the appropriate 'Static-Built-Using' lines to the binary package control file 
(DEBIAN/control)[3], so that no effort is required for the maintainers of 
packages that Build-Depend on header-only libraries.

While I don't have any experience writing Perl or working on debhelper, I'm 
happy to help in any other way.

Here is my initial algorithm for detecting header-only libraries in 
'Build-Depends'
1. The packages is in section 'libdevel` and the package name ends in "-dev"
2. The package is "Architecture: all"
3. The package contains one or more "*.h" or "*.hpp" files
   LC_ALL=C.UTF-8 dpkg-query -L ${package} | grep -E '\.(h|hpp)$'
4. The package does NOT contain any "*.so" files/symlinks

[0] https://bugs.debian.org/1069256
[1] and other situations, see  Maytham Alsudany's current proposed policy 
changes at 
https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=1069256;filename=0001-Require-use-of-Static-Built-Using-to-declare-statica.patch;msg=95
[2] https://manpages.debian.org/testing/dh-builtusing/dh_builtusing.1.en.html
[3] 
https://www.debian.org/doc/debian-policy/ch-controlfields.html#debian-binary-package-control-files-debian-control

--
Many thanks in advance

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to