|Hi, I ran into this bug while packaging Transmission 4.1.3 on Ubuntu 24.04 with debhelper 13.14.1ubuntu5. Transmission 4.1.2 and 4.1.3 are built with the same relevant flags: -g -O2 -flto=auto -ffat-lto-objects In both builds, the unstripped libtransmission.a is about 518-519 MB and contains fat-LTO objects with debug information. However, Perl classifies the two valid ar archives differently: Transmission 4.1.2: -B = 1 -T = 0 Transmission 4.1.3: -B = 0 -T = 1 file(1) identifies both as "current ar archive". Consequently, dh_strip processes the 4.1.2 archive with: strip --strip-debug --remove-section=.comment --remove-section=.note \ --enable-deterministic-archives \ -R .gnu.lto_* -R .gnu.debuglto_* \ -N __gnu_lto_slim -N __gnu_lto_v1 \ debian/libtransmission-dev/usr/lib/x86_64-linux-gnu/libtransmission.a reducing it from about 519 MB to about 16 MB. For the 4.1.3 archive, dh_strip emits no corresponding strip command and leaves it at about 518 MB. As a result, the compressed libtransmission-dev package grows from about 1.5 MB to 127 MB. Running the same strip command manually on the 4.1.3 archive reduces it to about 16 MB as expected. This looks like a clear real-world example of why Perl's -B is not a reliable test for deciding whether a .a file is an actual ar archive. The proposed is_ar_archive() approach also seems like the right fix to me: the distinction dh_strip actually needs here is "real ar archive vs. something such as a linker script named .a", rather than Perl's text-vs-binary classification.|

--
With best regards,
Kirill Shtumf

Reply via email to