Package: debhelper
Version: 10.7.2
Severity: normal
File: /usr/bin/dh_strip

Dear Maintainer,

I'm working around #35733 and #468333 by renaming *.rlib to *.rlib.a before
running dh_strip(1). This works well, however one file is omitted by debhelper:

----
$ xxd 
debian/libstd-rust-dev/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-b6402de156fe6ac9.rlib
 | head -n16
00000000: 213c 6172 6368 3e0a 2f20 2020 2020 2020  !<arch>./       
00000010: 2020 2020 2020 2020 3020 2020 2020 2020          0       
00000020: 2020 2020 3020 2020 2020 3020 2020 2020      0     0     
00000030: 3020 2020 2020 2020 3132 3037 3634 2020  0       120764  
00000040: 2020 600a 0000 0511 0001 d892 0001 d892    `.............
00000050: 0001 d892 0001 d892 0001 d892 0001 d892  ................
00000060: 0001 d892 0001 d892 0001 d892 0001 d892  ................
00000070: 0001 d892 0001 d892 0001 d892 0001 d892  ................
00000080: 0001 d892 0001 d892 0001 d892 0001 d892  ................
00000090: 0001 d892 0001 d892 0001 d892 0001 d892  ................
000000a0: 0001 d892 0001 d892 0001 d892 0001 d892  ................
000000b0: 0001 d892 0001 d892 0001 d892 0001 d892  ................
000000c0: 0001 d892 0001 d892 0001 d892 0001 d892  ................
000000d0: 0001 d892 0001 d892 0001 d892 0001 d892  ................
000000e0: 0001 d892 0001 d892 0001 d892 0001 d892  ................
000000f0: 0001 d892 0001 d892 0001 d892 0001 d892  ................
----

This is because dh_strip uses perl's -B check to filter out "text" files for 
stripping, see here:

----
        # Is it a static library, and not a debug library?
        if ($fn =~ m/\/lib[^\/]*\.a$/ && $fn !~ m/.*_g\.a$/) {
                # Is it a binary file, or something else (maybe a linker
                # script on Hurd, for example? I don't use file, because
                # file returns a variety of things on static libraries.
                if (-B $fn) {
                        push @static_libs, $fn;
                        return;
                }
        }
----

This fails for the libstd-*.rlib I just gave - but if I remove the -B check
everything works. Obviously I can't do that in the packaging files however. Is
there another way I can work around this issue, before it is fixed?

X

-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable-debug'), (500, 
'testing-debug'), (500, 'buildd-unstable'), (300, 'unstable'), (100, 
'experimental'), (1, 'experimental-debug')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.11.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8), LANGUAGE=en_GB:en 
(charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages debhelper depends on:
ii  autotools-dev            20161112.1
ii  binutils                 2.29-8
ii  dh-autoreconf            14
ii  dh-strip-nondeterminism  0.038-1
ii  dpkg                     1.18.24
ii  dpkg-dev                 1.18.24
ii  file                     1:5.31-1
ii  libdpkg-perl             1.18.24
ii  man-db                   2.7.6.1-2
ii  perl                     5.26.0-5
ii  po-debconf               1.0.20

debhelper recommends no packages.

Versions of packages debhelper suggests:
ii  dh-make  2.201608

-- no debconf information

-- debsums errors found:
debsums: changed file /usr/bin/dh_strip (from debhelper package)

Reply via email to