Re: unstripped-static-library
Hi Herbert,
You have mentioned some great points that I haven't looked into yet.
First, according to the policy manual, we should support "nostrip" in
"DEB_BUILD_OPTIONS", so we should probably wrap the rule with:
ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS)))
some override_dh_strip stuff...
endif
About the debugging packages, are you going to provide them? I don't
know how to direct the result to a -dbg package or something similar.
Actually, I haven't used one of those before. I think you would have
to ask someone else.
The packages look good. I have checked your QA page, you maintains
quite a lot of packages!
<https://reproducible.debian.net/rb-pkg/unstable/amd64/gthumb.html>
reports gthumb is unreproducible because "Files have varying
permissions because of different umasks" . It would be great to look
into it if you have extra times.
Cheers,
Alex
On 04/10/2015, Herbert Parentes Fortes Neto <hpfn@ig.com.br> wrote:
> Hi Alex,
>
> Thanks for answering. And the details!
>
> continue
>
> On Sat, 3 Oct 2015 08:45:48 +0800
> Alex Vong <alexvong1995@gmail.com> wrote:
>
>> Hi Herbert,
>>
>> I am not a mentor. I think the static library striping is done by
>> dh_strip, the detection code looks like this:
>> # Is it a static library, and not a debug library?
>> if (m/lib.*\.a$/ && ! 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 $_) {
>> push @static_libs, $fn;
>> return;
>> }
>> }
>>
>> While the lintian warnings look like this:
>> X: libgphoto2-dev: unstripped-static-library
>> usr/lib/x86_64-linux-gnu/libgphoto2/2.5.8/adc65.a(adc65.o)
>>
>> It seems the static libraries built does not have the prefix ``lib'',
>> so dh_strip does not detect it as a static library. I am not sure if
>> this is intended.
>
> Yes, I saw the manpage of dh_strip and what I
> understood is you can exclude (-X) but you
> can not determinate which file to strip.
>
>>
>> I think the solution for now will be to add the following to ``rule'':
>> override_dh_strip:
>> dh_strip
>> find . -name '*.a' \( \! -name '*_g.a' \) \
>> -exec strip --strip-debug \
>> --remove-section=.comment \
>> --remove-section=.note {} \;
>
> And where I put the stripped part ? I mean, how
> to direct the result to a -dbg package or something ?
> Using a debian/*.install file ?
>
>
> regards,
>
>>
>> This is according to the striping code in dh_strip:
>> if (@static_libs) {
>> my $strip_help = qx{$strip 2>&1};
>> my @opts = ('--strip-debug', '--remove-section=.comment',
>> '--remove-section=.note');
>> if (index($strip_help, '--enable-deterministic-archives') > -1) {
>> # NB: The short variant (-D) is broken in Jessie
>> # (binutils/2.25-3)
>> push(@opts, '--enable-deterministic-archives');
>> }
>> foreach (@static_libs) {
>> doit($strip, @opts, $_);
>> }
>> }
>>
>> Feel free to discuss.
>>
>> Cheers,
>> Alex
>>
>> On 03/10/2015, Herbert Parentes Fortes Neto <hpfn@ig.com.br> wrote:
>> > Hi mentors,
>> >
>> > I've already checked with my mentor, but he
>> > said he isn't a expert in libraries. And
>> > here I can improve my english.
>> >
>> > I maintain libgphoto2 and lintian now says
>> > that the package has "unstripped-static-library"
>> > (.a files). We (me and my mentor) believe that
>> > this message can be ignored.
>> >
>> > Can someone take a look and confirm this ? I alert:
>> > this is an experimental tag. Just in case you don't
>> > waste time with this kind of tag.
>> >
>> > The package is at mentors:
>> > https://mentors.debian.net/package/libgphoto2
>> > http://mentors.debian.net/debian/pool/main/libg/libgphoto2/libgphoto2_2.5.8-2.dsc
>> >
>> >
>> > regards,
>> > --
>> > Herbert Parentes Fortes Neto (hpfn)
>> >
>> >
>
>
> --
> Herbert Parentes Fortes Neto (hpfn)
>
Reply to: