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

Bug#188731: debian-policy: "strip --strip-unneeded" is insufficient



On Mon, 11 May 2015 11:18:29 +0200 Bill Allombert <ballombe@debian.org>
wrote:
> On Mon, May 11, 2015 at 01:39:43PM +0500, Andrey Rahmatullin wrote:
> > On Sat, Apr 12, 2003 at 07:24:12PM +0200, Matthias Urlichs wrote:
> > > Section 11.2 says 
> > > 
> > > 	strip --strip-unneeded your-lib
> > This is still true (the section is 10.2 though).
> > 
> > > Lintian, however, complains if the sections .comment or .note are
> > > present, which strip doesn't think are unneeded.
> > This is still true, the tag is binary-has-unneeded-section.
> > Emitted (non-overridden): 537, overridden: 71, total: 608
> > 
> > > I don't know whether this is a bug in policy, strip, or lintian, but
> > > since Debian's "install -s" and dh_strip both use the additional options
> > > 
> > > 	--remove-section=.comment --remove-section=.note
> > > 
> > > I think that it's a policy bug.
> > This is still true for dh_strip but not for install -s (since 2005,
> > coreutils 5.93-1).
> 
> So to summary:
> Policy 11.2 recommends:
>   strip --strip-unneeded
> dh_strip does:
>   strip --strip-unneeded --remove-section=.comment --remove-section=.note
> install -s does currently:
>   strip --strip-unneeded
> lintian checks for:
>   strip --strip-unneeded --remove-section=.comment --remove-section=.note
> 
> is that correct ?
> 
> Did 'install -s' used to do 
> 'strip --strip-unneeded --remove-section=.comment --remove-section=.note' ?
> Do we know why it was changed ?
> 
> Cheers,
> -- 
> Bill. <ballombe@debian.org>
> 
> Imagine a large red swirl here. 
> 
> 

Hi,

AFAICT, Bill's follow up is nearly a accurate with the following remarks:

 * The Policy section is (now?) 10.2 (plus some bits in 10.1)

 * We now have auto-generated dbgsym packages by dh_strip (which were
   just an idea when Bill wrote that answer).

 * Policy mentions "--remove-section=.comment --remove-section=.note" in
   a footnote as a "You might also want to use ...".

 * Policy section 10.1 implies that "INSTALL = install -s" is a useful
   way of stripping binaries (both in text and examples).  Besides not
   covering the .comment + .note sections it also neuters dh_strip's
   ability to create dbgsym packages.


I think we should update the policy to say that you should use
"--strip-unneeded --remove-section=.comment --remove-section=.note" and
maybe recommend delegating that task (where possible) to dh_strip as it
provide dbgsym packages.

Thanks,
~Niels


Reply to: